/* ═══════════════════════════════════════════════════════════════
   Timekeeping Platform — timekeeping.css
   Design: Parker-Lambert DNA × Harvest familiarity
   Nav: horizontal top bar (white + cobalt accents)
   Auth: dot-grid background
   Font: Manrope via Google Fonts
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Aldrich&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Parker-Lambert brand */
  --cobalt:      #2347e8;
  --cobalt-dark: #1a38c4;
  --cobalt-light:#eef1fd;
  --cobalt-muted:#c5cff8;
  --amber:       #f0a500;
  --ink:         #0f1535;
  --muted:       #6b7a99;
  --offwhite:    #f7f8fc;
  --border:      rgba(15,21,53,.1);
  --border-med:  rgba(15,21,53,.15);

  /* Surfaces */
  --white:       #ffffff;
  --surface-2:   #f3f5fb;

  /* Semantic */
  --success:     #16a34a;
  --error:       #dc2626;
  --warning:     #d97706;

  /* Layout */
  --nav-h:       48px;
  --radius:      6px;
  --radius-lg:   10px;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(15,21,53,.08), 0 1px 2px rgba(15,21,53,.05);
  --shadow-md:   0 4px 16px rgba(15,21,53,.10);
  --shadow-lg:   0 12px 48px rgba(15,21,53,.15);

  --font-display: 'Aldrich', system-ui, sans-serif;

  font-size: 15px;
  font-family: 'Manrope', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--offwhite);
  color: var(--ink);
  line-height: 1.5;
}

a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── TOP NAV ─────────────────────────────────────────────────── */
.app-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.app-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
  margin-right: 32px;
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 28px; height: 28px;
  background: var(--cobalt);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: .85rem;
}
.nav-logo-text {
  font-size: .88rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .38rem .75rem;
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
  letter-spacing: .01em;
}
.nav-link svg {
  width: 15px; height: 15px;
  stroke: currentColor;
  flex-shrink: 0;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}
.nav-link.active {
  background: var(--cobalt-light);
  color: var(--cobalt);
}
.nav-link.active svg { stroke: var(--cobalt); }

.nav-right {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}

.nav-company {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
  padding-right: .75rem;
  border-right: 1px solid var(--border);
}

.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}
.nav-avatar-initial {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cobalt);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* User dropdown */
.nav-user-wrap {
  position: relative;
}
.nav-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  padding: .4rem 0;
  z-index: 200;
}
.nav-user-wrap:hover .nav-user-dropdown,
.nav-user-wrap.open .nav-user-dropdown { display: block; }

.nav-dropdown-name {
  padding: .5rem 1rem .4rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  margin-bottom: .3rem;
}
.nav-dropdown-link {
  display: block;
  padding: .45rem 1rem;
  font-size: .82rem;
  color: var(--muted);
  text-decoration: none;
  transition: background .12s, color .12s;
}
.nav-dropdown-link:hover {
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
}
.nav-dropdown-link.signout { color: var(--error); }
.nav-dropdown-link.signout:hover { background: #fef2f2; }

/* ── App body (offset for fixed nav) ────────────────────────── */
body.app-layout {
  padding-top: var(--nav-h);
  background: var(--offwhite);
}

.content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 2rem;
}

/* Page header row */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-title {
  font-size: 1.4rem;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: .04em;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  line-height: 1.4;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
}
.btn:hover { transform: scale(1.02); text-decoration: none; }
.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--cobalt);
  color: white;
  border-color: var(--cobalt);
  box-shadow: 0 1px 4px rgba(35,71,232,.25);
}
.btn-primary:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); }

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-med);
}
.btn-outline:hover { background: var(--surface-2); }

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger {
  background: transparent;
  color: var(--error);
  border-color: rgba(220,38,38,.25);
}
.btn-danger:hover { background: #fef2f2; }

.btn-sm {
  padding: .3rem .75rem;
  font-size: .78rem;
}

.btn-full { width: 100%; justify-content: center; }

.btn-google {
  background: var(--white);
  color: var(--ink);
  border-color: var(--border-med);
  gap: .6rem;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .3rem; }

label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.label-optional {
  font-weight: 500;
  color: rgba(107,122,153,.6);
  text-transform: none;
  letter-spacing: 0;
  font-size: .75rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--ink);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px rgba(35,71,232,.12);
}
textarea { resize: vertical; }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert {
  padding: .7rem .9rem;
  border-radius: var(--radius);
  font-size: .85rem;
  margin-bottom: .875rem;
  font-weight: 500;
}
.alert-error   { background: #fef2f2; color: var(--error);   border: 1px solid rgba(220,38,38,.2); }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid rgba(22,163,74,.2); }
.alert-dev {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid rgba(240,165,0,.3);
  line-height: 1.6;
}
.alert-dev a { color: #b45309; font-weight: 700; }

/* ── Auth layout ─────────────────────────────────────────────── */
body.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--offwhite);
  padding-top: 0;
}

/* Dot grid on auth only */
body.auth-layout::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(15,21,53,.065) 1px, transparent 1px);
  background-size: 28px 28px;
}

.auth-card {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 380px;
}
.auth-card-wide { max-width: 460px; }

.auth-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.75rem;
}
.auth-logo-mark {
  width: 32px; height: 32px;
  background: var(--cobalt);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 1rem;
}
.auth-logo-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

.auth-title { font-size: 1.3rem; font-weight: 400; font-family: var(--font-display); margin-bottom: .4rem; color: var(--ink); letter-spacing: .04em; }
.auth-sub   { color: var(--muted); margin-bottom: 1.5rem; font-size: .88rem; line-height: 1.5; }

.auth-form { display: flex; flex-direction: column; gap: .875rem; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: .25rem 0;
}
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Company picker ──────────────────────────────────────────── */
.company-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .25rem; }

.company-card {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
  text-align: left;
  width: 100%;
  font-family: inherit;
}
.company-card:hover {
  border-color: var(--cobalt-muted);
  background: var(--cobalt-light);
  transform: translateX(2px);
}
.company-initial {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--cobalt);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 800;
  flex-shrink: 0;
}
.company-info { flex: 1; display: flex; flex-direction: column; gap: .1rem; }
.company-name { font-weight: 700; font-size: .9rem; color: var(--ink); }
.company-role { font-size: .75rem; color: var(--muted); text-transform: capitalize; }
.company-arrow { font-size: 1.2rem; color: var(--muted); }

/* ── Time screen chrome ──────────────────────────────────────── */
.time-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 0;
}

.week-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-med);
  background: var(--white);
  color: var(--muted);
  font-size: 1rem;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1;
  flex-shrink: 0;
}
.week-nav-btn:hover {
  background: var(--cobalt-light);
  color: var(--cobalt);
  border-color: var(--cobalt-muted);
  text-decoration: none;
}

.week-label {
  font-size: 1.5rem;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--ink);
  white-space: nowrap;
  letter-spacing: .01em;
}

.badge-current {
  display: inline-block;
  background: var(--cobalt-light);
  color: var(--cobalt);
  font-size: .65rem;
  font-weight: 700;
  padding: .15em .5em;
  border-radius: var(--radius-pill);
  margin-left: .4rem;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ── Day strip ───────────────────────────────────────────────── */
.day-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr) auto;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--white);
  overflow: hidden;
  margin-top: 1.25rem;
}

.day-tab {
  padding: .7rem .75rem .6rem;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background .15s;
  user-select: none;
}
.day-tab:hover { background: var(--offwhite); }
.day-tab.active {
  background: var(--cobalt-light);
  border-bottom: 2.5px solid var(--cobalt);
}

.day-tab-name {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  display: block;
}
.day-tab.active .day-tab-name { color: var(--cobalt); }

.day-tab-date {
  font-size: 1.3rem;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--ink);
  display: block;
  letter-spacing: -.01em;
  margin-top: .1rem;
}
.day-tab.active .day-tab-date { color: var(--cobalt); }

.day-tab-hours {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-top: .15rem;
}
.day-tab-hours.has-hours { color: var(--cobalt); font-weight: 700; }

/* Week total cell */
.week-total-cell {
  padding: .7rem 1rem .6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  background: var(--offwhite);
  min-width: 90px;
}
.week-total-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.week-total-hours {
  font-size: 2rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -.03em;
  margin-top: .1rem;
  font-family: var(--font-display);
}

/* ── Entry area ──────────────────────────────────────────────── */
.entry-area {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  min-height: 320px;
  padding: 1rem;
}

.entry-day-section { display: none; }
.entry-day-section.active { display: block; }

.entry-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.entry-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .12s;
}
.entry-row:hover {
  border-color: var(--cobalt-muted);
  background: var(--cobalt-light);
  transform: translateX(2px);
}
.entry-row-left { min-width: 0; }
.entry-project {
  font-weight: 700;
  color: var(--ink);
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entry-task {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .1rem;
}
.entry-notes {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entry-hours {
  font-size: 1rem;
  font-weight: 800;
  color: var(--cobalt);
  letter-spacing: -.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.entry-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-size: .85rem;
}
.entry-empty-icon { font-size: 1.75rem; margin-bottom: .5rem; }

.add-time-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .75rem;
  border: 1.5px dashed var(--border-med);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  width: 100%;
  font-family: inherit;
  margin-top: .25rem;
  letter-spacing: .01em;
}
.add-time-row:hover {
  background: var(--cobalt-light);
  color: var(--cobalt);
  border-color: var(--cobalt-muted);
  border-style: solid;
}

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,21,53,.4);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 1rem;
  opacity: 0;
  transition: opacity .2s ease;
}
.modal-overlay.visible { opacity: 1; }

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px);
  transition: transform .2s ease;
}
.modal-overlay.visible .modal-card { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem .9rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-size: 1rem;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: .04em;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: .15rem .3rem;
  border-radius: var(--radius);
  transition: background .12s, color .12s;
}
.modal-close:hover { background: var(--surface-2); color: var(--ink); }

.modal-form {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.modal-actions {
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
  align-items: center;
  margin-top: .25rem;
  padding-top: .875rem;
  border-top: 1px solid var(--border);
}
.modal-actions-left { margin-right: auto; }

/* ── Toast notification ──────────────────────────────────────── */
.toast-wrap {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  pointer-events: none;
}
.toast {
  background: var(--ink);
  color: white;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: .82rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.toast-error { background: var(--error); }

/* ── Delete confirm ──────────────────────────────────────────── */
.confirm-band {
  background: #fef2f2;
  border-top: 1px solid rgba(220,38,38,.15);
  padding: .75rem 1.25rem;
  display: none;
  align-items: center;
  gap: .75rem;
  font-size: .82rem;
  color: var(--error);
  font-weight: 600;
}
.confirm-band.visible { display: flex; }
.confirm-band-msg { flex: 1; }

/* ── Coming-soon stub ────────────────────────────────────────── */
.coming-soon {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--muted);
}
.coming-soon .coming-icon { font-size: 2.25rem; margin-bottom: 1rem; }
.coming-soon h2 {
  font-size: 1.1rem;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--ink);
  margin-bottom: .4rem;
  letter-spacing: .04em;
}
.coming-soon p { font-size: .88rem; line-height: 1.6; }

/* ── Section eyebrow (Parker-Lambert style) ──────────────────── */
.eyebrow {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cobalt);
  margin-bottom: .4rem;
}

/* ── Timer ───────────────────────────────────────────────────── */
.timer-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .85rem;
  background: var(--offwhite);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s;
}
.timer-row.running {
  border-color: var(--cobalt-muted);
  background: var(--cobalt-light);
}
.timer-display {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: .04em;
  flex: 1;
  font-variant-numeric: tabular-nums;
}
.timer-row.running .timer-display { color: var(--cobalt); }

.timer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform .12s, background .15s;
  flex-shrink: 0;
  font-size: .85rem;
}
.timer-btn:hover { transform: scale(1.08); }
.timer-btn-start { background: var(--cobalt); color: white; }
.timer-btn-stop  { background: var(--error);  color: white; }

.timer-or {
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: center;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.timer-or::before,
.timer-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Clients list ────────────────────────────────────────────── */
.list-toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.list-search {
  flex: 1;
  min-width: 180px;
  max-width: 320px;
}
.list-search input {
  width: 100%;
  padding: .42rem .75rem;
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius-pill);
  font-size: .85rem;
  background: var(--white);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .88rem;
}
.data-table th {
  text-align: left;
  padding: .6rem 1rem;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--offwhite);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr {
  transition: background .12s;
}
.data-table tbody tr:hover { background: var(--offwhite); }

.client-name-cell { font-weight: 700; }
.client-name-cell a {
  color: var(--ink);
  text-decoration: none;
  transition: color .12s;
}
.client-name-cell a:hover { color: var(--cobalt); }

.status-badge {
  display: inline-block;
  padding: .2em .65em;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.status-active   { background: #dcfce7; color: #15803d; }
.status-archived { background: var(--offwhite); color: var(--muted); border: 1px solid var(--border); }

.row-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity .15s;
}
.data-table tbody tr:hover .row-actions { opacity: 1; }

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--muted);
}
.empty-state-icon { font-size: 2rem; margin-bottom: .75rem; }
.empty-state h3 {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink);
  margin-bottom: .35rem;
  letter-spacing: .04em;
}
.empty-state p { font-size: .85rem; line-height: 1.6; }

/* ── Project form ────────────────────────────────────────────── */
.project-form {
  max-width: 760px;
}

.form-section {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.form-section:last-of-type { border-bottom: none; }

.form-section-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  padding-top: .5rem;
  letter-spacing: -.01em;
}
.form-section-label .section-hint {
  display: block;
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: .25rem;
  line-height: 1.5;
}

.form-section-body {
  display: flex;
  flex-direction: column;
  gap: .875rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .75rem;
}

.field-hint {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .2rem;
  line-height: 1.5;
}

/* Project type tabs */
.type-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius);
  overflow: hidden;
}
.type-tab {
  padding: .65rem .5rem;
  text-align: center;
  cursor: pointer;
  border-right: 1px solid var(--border-med);
  background: var(--white);
  transition: background .15s, color .15s;
  user-select: none;
}
.type-tab:last-child { border-right: none; }
.type-tab-name {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}
.type-tab-desc {
  display: block;
  font-size: .68rem;
  color: var(--muted);
  margin-top: .15rem;
  line-height: 1.3;
}
.type-tab.active {
  background: var(--cobalt-light);
  border-bottom: 2.5px solid var(--cobalt);
}
.type-tab.active .type-tab-name { color: var(--cobalt); }
.type-tab.active .type-tab-desc { color: var(--cobalt); opacity: .7; }
.type-tab:hover:not(.active) { background: var(--offwhite); }
input[type="hidden"].type-input {}

/* Type-specific config panels */
.type-config {
  display: none;
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  flex-direction: column;
  gap: .875rem;
}
.type-config.visible { display: flex; }
.type-config-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .1rem;
}

/* Permissions radios */
.radio-group { display: flex; flex-direction: column; gap: .5rem; }
.radio-label {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  cursor: pointer;
  font-size: .88rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.radio-label input[type="radio"] { margin-top: .2rem; flex-shrink: 0; accent-color: var(--cobalt); }
.radio-hint { font-size: .75rem; color: var(--muted); display: block; margin-top: .1rem; }

/* Checkbox */
.check-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  font-size: .88rem;
  color: var(--ink);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}
.check-label input[type="checkbox"] { accent-color: var(--cobalt); width: 15px; height: 15px; flex-shrink: 0; }

/* Tasks list */
.task-list { display: flex; flex-direction: column; gap: .35rem; }
.task-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .6rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .12s;
}
.task-row:hover { border-color: var(--border-med); }
.task-row-name {
  flex: 1;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}
.task-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: .1rem .25rem;
  border-radius: 3px;
  transition: color .12s, background .12s;
  flex-shrink: 0;
}
.task-remove:hover { color: var(--error); background: #fef2f2; }
.task-billable-wrap {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-shrink: 0;
}
.task-billable-wrap label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
}
.task-add-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-top: .25rem;
}
.task-add-row input {
  flex: 1;
}

/* Team list */
.team-list { display: flex; flex-direction: column; gap: .35rem; }
.team-member-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .45rem .6rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.team-member-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--cobalt);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  flex-shrink: 0;
}
.team-member-name {
  flex: 1;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}
.team-manager-wrap {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-shrink: 0;
}
.team-manager-wrap label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  cursor: pointer;
}
.team-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: .1rem .25rem;
  border-radius: 3px;
  transition: color .12s, background .12s;
}
.team-remove:hover { color: var(--error); background: #fef2f2; }

/* Form actions bar */
.form-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.5rem 0 .5rem;
  border-top: 1px solid var(--border);
  margin-top: .5rem;
}

/* Inline select+input combos */
.input-group {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.input-group select { flex-shrink: 0; width: auto; }
.input-group input  { flex: 1; }
.input-group span   { font-size: .88rem; color: var(--muted); white-space: nowrap; }

/* ── Progress bar ────────────────────────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--surface-2, #f1f5f9);
  border-radius: 99px;
  overflow: hidden;
  min-width: 80px;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--cobalt);
  transition: width .3s ease;
}
.progress-bar-fill.over-budget { background: var(--error); }
.progress-bar-fill.near-budget { background: var(--amber); }

/* ── Project list (grouped) ──────────────────────────────────── */
.projects-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.projects-table th {
  text-align: right;
  padding: .5rem .75rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.projects-table th:first-child { text-align: left; }
.projects-table th.col-project  { text-align: left; width: 100%; }
.projects-table th.col-num      { text-align: right; min-width: 70px; }
.projects-table th.col-bar      { min-width: 120px; }
.projects-table th.col-actions  { width: 40px; }

/* Client group header row */
.client-group-row td {
  padding: .55rem .75rem .45rem;
  background: var(--offwhite);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.client-group-row:first-child td { border-top: none; }

/* Project row */
.project-row td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.project-row:last-child td { border-bottom: none; }
.project-row:hover td { background: var(--offwhite); }

.project-row .proj-name {
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  font-size: .88rem;
}
.project-row .proj-name:hover { color: var(--cobalt); }
.project-type-pill {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: .15em .55em;
  border-radius: 99px;
  border: 1px solid var(--border-med);
  color: var(--muted);
  margin-left: .4rem;
  vertical-align: middle;
  white-space: nowrap;
}
.num-cell {
  text-align: right;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.num-cell.muted { color: var(--muted); }
.num-cell.over  { color: var(--error); font-weight: 700; }

/* Actions dropdown */
.actions-wrap { position: relative; }
.actions-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .65rem;
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius);
  background: var(--white);
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  transition: border-color .12s, background .12s;
}
.actions-btn:hover { border-color: var(--cobalt-muted); background: var(--cobalt-light); }
.actions-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 4px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 140px;
  z-index: 50;
  padding: .3rem 0;
}
.actions-wrap.open .actions-dropdown { display: block; }
.actions-dropdown a,
.actions-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: .45rem 1rem;
  font-size: .82rem;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: background .1s;
}
.actions-dropdown a:hover,
.actions-dropdown button:hover { background: var(--offwhite); }
.actions-dropdown .danger { color: var(--error); }
.actions-dropdown .danger:hover { background: #fef2f2; }

/* ── Client typeahead ────────────────────────────────────────── */
.client-typeahead {
  position: relative;
}
.client-typeahead-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1.5px solid var(--cobalt-muted);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
}
.client-typeahead-list.open { display: block; }
.client-option {
  padding: .5rem .75rem;
  font-size: .88rem;
  cursor: pointer;
  color: var(--ink);
  transition: background .1s;
}
.client-option:hover,
.client-option.focused { background: var(--cobalt-light); color: var(--cobalt); }
.client-option.new-client {
  border-top: 1px solid var(--border);
  color: var(--cobalt);
  font-weight: 700;
  font-size: .82rem;
}
.client-new-input { display: none; }
.client-new-input.visible { display: flex; gap: .5rem; align-items: center; }

/* ── Team page ───────────────────────────────────────────────── */
.team-week-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.team-week-label {
  font-size: 1.75rem;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -.01em;
}
.team-summary {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: center;
  flex-wrap: wrap;
}
.team-summary-stat { display: flex; flex-direction: column; gap: .15rem; }
.team-summary-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.team-summary-value {
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -.03em;
  font-family: var(--font-display);
}
.team-summary-divider {
  width: 1px; height: 36px;
  background: var(--border);
}

.team-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.team-table th {
  text-align: right;
  padding: .5rem .75rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.team-table th:first-child { text-align: left; }
.team-table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.team-table tr:last-child td { border-bottom: none; }
.team-table tbody tr:hover td { background: var(--offwhite); }

.member-cell {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.member-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-med);
  flex-shrink: 0;
}
.member-dot.active { background: var(--success); }
.member-initials {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--cobalt);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700;
  flex-shrink: 0;
}
.member-name-wrap { display: flex; flex-direction: column; }
.member-name { font-weight: 700; color: var(--ink); font-size: .88rem; }
.member-role-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  padding: .1em .45em;
  border-radius: 99px;
  border: 1px solid var(--border-med);
  color: var(--muted);
  margin-left: .4rem;
  vertical-align: middle;
  text-transform: capitalize;
}
.group-header-row td {
  padding: .45rem .75rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  background: var(--offwhite);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── Rate history table ──────────────────────────────────────── */
.rate-history {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.rate-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: .6rem .875rem;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.rate-row:last-child { border-bottom: none; }
.rate-row.rate-header {
  background: var(--offwhite);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  padding: .45rem .875rem;
}
.rate-amount {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.rate-date { color: var(--muted); font-size: .82rem; }
.rate-current {
  font-size: .68rem;
  font-weight: 700;
  padding: .15em .5em;
  border-radius: 99px;
  background: var(--cobalt-light);
  color: var(--cobalt);
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: nowrap;
}
.rate-add-form {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: .875rem;
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: .5rem;
}
.rate-add-form .form-group { flex: 1; min-width: 140px; }

/* ── Project view ────────────────────────────────────────────── */
.project-view-header {
  margin-bottom: 1.5rem;
}
.project-view-client {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: .25rem;
}
.project-view-title {
  font-size: 2rem;
  font-weight: 400;
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: .03em;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.project-view-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Chart section */
.chart-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem 1rem;
  margin-bottom: 1.25rem;
}
.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.chart-toggle {
  display: flex;
  gap: .25rem;
}
.chart-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .75rem;
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius);
  background: var(--white);
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: background .12s, color .12s, border-color .12s;
}
.chart-toggle-btn.active {
  background: var(--cobalt-light);
  color: var(--cobalt);
  border-color: var(--cobalt-muted);
}
.year-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.year-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-med);
  background: var(--white);
  color: var(--muted);
  font-size: 1rem;
  text-decoration: none;
  transition: background .12s, color .12s;
  cursor: pointer;
  font-family: inherit;
}
.year-nav-btn:hover { background: var(--cobalt-light); color: var(--cobalt); border-color: var(--cobalt-muted); text-decoration: none; }
.year-label {
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  padding: .25rem .6rem;
  background: var(--cobalt-light);
  color: var(--cobalt);
  border-radius: var(--radius);
  white-space: nowrap;
}

/* Bar chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  position: relative;
  margin-bottom: .5rem;
}
.bar-chart-axis {
  position: absolute;
  left: 0; right: 0;
  border-top: 1px dashed var(--border);
  font-size: .65rem;
  color: var(--muted);
}
.bar-chart-axis span {
  position: absolute;
  left: 0;
  top: -10px;
}
.bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}
.bar-wrap:hover .bar { opacity: .8; }
.bar {
  width: 100%;
  background: var(--cobalt);
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height .3s ease, opacity .15s;
  position: relative;
}
.bar.current-month { background: var(--cobalt); }
.bar.other-month   { background: #c7d2fe; }
.bar.over-budget   { background: var(--error); }
.bar-budget-line {
  position: absolute;
  left: -2px; right: -2px;
  border-top: 2px dashed var(--amber);
}
.bar-label {
  font-size: .65rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}
.bar-wrap.active .bar-label { color: var(--cobalt); font-weight: 700; }

/* Summary cards */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}
.summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .875rem 1rem;
}
.summary-card-period {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: .35rem;
}
.summary-card-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: .25rem;
}
.summary-card-value {
  font-size: 2rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -.03em;
  font-family: var(--font-display);
}
.summary-card-sub {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .3rem;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.summary-card-sub span { display: flex; justify-content: space-between; gap: .75rem; }

/* Tabs */
.project-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.25rem;
}
.project-tab {
  padding: .55rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: color .15s;
  text-decoration: none;
}
.project-tab:hover { color: var(--ink); text-decoration: none; }
.project-tab.active { color: var(--cobalt); border-bottom-color: var(--cobalt); }

/* Entry table */
.entry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.entry-table th {
  text-align: left;
  padding: .45rem .75rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}
.entry-table th.right { text-align: right; }
.entry-table td {
  padding: .6rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.entry-table td.right { text-align: right; font-variant-numeric: tabular-nums; }
.entry-table tr:last-child td { border-bottom: none; }
.entry-table tbody tr:hover td { background: var(--offwhite); }
.entry-table .group-row td {
  background: var(--offwhite);
  font-weight: 700;
  font-size: .82rem;
  color: var(--ink);
  cursor: pointer;
}
.entry-table .group-row td:first-child { padding-left: .75rem; }
.entry-table .group-row td.right { text-align: right; }
.entry-table .detail-row td { padding-left: 1.5rem; font-size: .82rem; color: var(--muted); }
.entry-table .detail-row td.right { text-align: right; font-variant-numeric: tabular-nums; }
.entry-table .total-row td {
  font-weight: 800;
  border-top: 2px solid var(--border);
  padding-top: .65rem;
}
.entry-table .total-row td.right { text-align: right; font-variant-numeric: tabular-nums; }
.hours-link { color: var(--cobalt); font-weight: 700; text-decoration: none; }
.hours-link:hover { text-decoration: underline; }

/* Period nav */
.period-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .875rem;
}
.period-label {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.01em;
}

/* Track Time nav button — distinct from regular nav links */
.nav-track-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .85rem;
  background: var(--cobalt);
  color: white;
  border: none;
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .01em;
  transition: background .15s, transform .1s;
  white-space: nowrap;
  margin-right: .5rem;
}
.nav-track-btn:hover { background: var(--cobalt-dark); transform: scale(1.02); }
.nav-track-btn.timer-running { background: var(--error); animation: pulse 2s infinite; }
.nav-track-icon { font-size: 1rem; line-height: 1; font-weight: 800; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .75; }
}

/* ── Reports page ────────────────────────────────────────────── */
.reports-period-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.period-nav { display: flex; align-items: center; gap: .5rem; }
.period-title {
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -.02em;
  font-family: var(--font-display);
  font-weight: 400;
}
.period-selector {
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  margin-left: auto;
}
.period-btn {
  padding: .3rem .7rem;
  border: 1.5px solid var(--border-med);
  border-radius: var(--radius);
  background: var(--white);
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
}
.period-btn:hover { background: var(--cobalt-light); color: var(--cobalt); border-color: var(--cobalt-muted); text-decoration: none; }
.period-btn.active { background: var(--cobalt); color: white; border-color: var(--cobalt); }
.period-rounded-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  padding: .15em .55em;
  border-radius: 99px;
  border: 1px solid var(--border-med);
  color: var(--muted);
  margin-left: .25rem;
  vertical-align: middle;
}

/* Summary stats */
.reports-summary {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.reports-stat { display: flex; flex-direction: column; gap: .15rem; min-width: 100px; }
.reports-stat-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.reports-stat-value { font-size: 2.2rem; font-weight: 400; font-family: var(--font-display); color: var(--ink); letter-spacing: -.03em; }
.reports-stat-sub { font-size: .78rem; color: var(--muted); display: flex; flex-direction: column; gap: .1rem; margin-top: .1rem; }
.reports-stat-sub span { display: flex; gap: .5rem; align-items: center; }

/* Donut chart */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.donut {
  width: 72px; height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
}
.donut-legend { display: flex; flex-direction: column; gap: .35rem; }
.donut-legend-item { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--muted); font-weight: 500; }
.donut-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Reports divider */
.reports-summary-divider { width: 1px; height: 52px; background: var(--border); flex-shrink: 0; }

/* Reports table tabs */
.reports-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1rem;
}
.reports-tab {
  padding: .5rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  text-decoration: none;
  transition: color .12s;
  white-space: nowrap;
}
.reports-tab:hover { color: var(--ink); text-decoration: none; }
.reports-tab.active { color: var(--cobalt); border-bottom-color: var(--cobalt); }

/* Reports table */
.reports-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.reports-table th {
  text-align: left;
  padding: .45rem .75rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.reports-table th:hover { color: var(--ink); }
.reports-table th.right { text-align: right; }
.reports-table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.reports-table td.right { text-align: right; font-variant-numeric: tabular-nums; }
.reports-table tr:last-child td { border-bottom: none; }
.reports-table tbody tr:hover td { background: var(--offwhite); }
.reports-table .total-row td {
  font-weight: 800;
  border-top: 2px solid var(--border);
  border-bottom: none;
}
.reports-table .total-row td.right { text-align: right; font-variant-numeric: tabular-nums; }
.reports-bar-cell { min-width: 140px; padding: .65rem .5rem; }
.reports-hours-link { color: var(--cobalt); font-weight: 700; text-decoration: none; }
.reports-hours-link:hover { text-decoration: underline; }

/* Custom date inputs */
.custom-range-form {
  display: none;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: .75rem 1rem;
  background: var(--offwhite);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .85rem;
}
.custom-range-form.visible { display: flex; }
.custom-range-form input[type="date"] { padding: .35rem .6rem; font-size: .85rem; width: auto; }
.custom-range-form label { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .week-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  .app-nav { padding: 0 16px; }
  .nav-company { display: none; }
  .content-wrap { padding: 1.25rem 1rem; }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .week-grid { grid-template-columns: 1fr; }
}
