/* ============================================================
   TIME LOG — two-column layout: table + slide panel
   ============================================================ */

.timelog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.timelog-search .form-control { max-width: 200px; font-size: 13px; }
.timelog-search input[type="date"] { max-width: 160px; }

.timelog-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - var(--header-h) - 113px);
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.timelog-table-wrap {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
}

.timelog-layout .slide-panel.open {
  width: 400px;
  min-width: 400px;
}
.timelog-layout .slide-panel-inner { width: 400px; }

/* ---- Hours display in panel ------------------------------ */
.timelog-hours-block {
  padding: 14px 0 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.timelog-hours-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}
.timelog-hours-unit {
  font-size: 14px;
  color: var(--text-2);
}

/* ---- Billable badge -------------------------------------- */
.badge-billable    { background: #D1FAE5; color: #065F46; }
/* Billed is deliberately the brand blue rather than another green: the
   distinction that matters on this screen is billed vs not-yet-billed, and
   two greens make it a thing you have to read rather than see. */
.badge-billed      { background: #DBEAFE; color: #114486; }
.badge-nonbillable { background: var(--bg); color: var(--text-2); border: 1px solid var(--border); }

/* ---- Totals (audit G19) -----------------------------------
   grep "reduce|sum|total" over this module returned nothing before this: a
   timesheet that would not add itself up. Every class below is used by
   renderTotals() in timelog.js. */

#timelog-totals { margin-bottom: 16px; }

.timelog-totals {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.timelog-total-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  background: var(--card);
  min-width: 140px;
}
.timelog-total-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.timelog-total-value { font-size: 18px; font-weight: 700; color: var(--text-1); }
.timelog-total-sub   { font-size: 11.5px; color: var(--text-2); }

/* Billable hours not yet on an invoice: the money not yet asked for. Before
   0030 nothing wrote billed_on_invoice_id, so this could not be shown at all. */
.timelog-total-attention { border-color: var(--warning); }
.timelog-total-attention .timelog-total-value { color: var(--warning); }

.timelog-breakdown {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  margin: 0 10px 10px 0;
  background: var(--card);
  min-width: 220px;
  vertical-align: top;
}
.timelog-breakdown-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 3px;
}
.timelog-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  font-size: 12.5px;
  color: var(--text-1);
}

@media (max-width: 900px) {
  .timelog-total-chip, .timelog-breakdown { flex: 1 1 100%; min-width: 0; }
}
