/* ═════════════════════════════════════════════════════════════════════
   components.css · Full component library
   Aligned to v1 visual language: navy bands, gold accents,
   editorial serif numerics, mono labels, cream surfaces.
═════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════
   1. App shell
════════════════════════════════════════════════════════════════════ */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#panelHost {
  padding: var(--sp-5) var(--sp-4) var(--sp-9);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 720px) {
  #panelHost { padding: var(--sp-6) var(--sp-6) var(--sp-9); }
}

/* ════════════════════════════════════════════════════════════════════
   2. Navy band — used as app header AND as panel header on inner views
════════════════════════════════════════════════════════════════════ */
.navy-band {
  background: var(--accent-2);
  color: var(--on-navy);
  padding: var(--sp-5) var(--sp-4) var(--sp-7);
  position: relative;
  overflow: hidden;  /* contain wide children */
  box-shadow: 0 1px 0 rgba(212, 184, 114, 0.18);
}
@media (max-width: 380px) {
  .navy-band { padding: var(--sp-4) var(--sp-3) var(--sp-6); }
}
@media (min-width: 720px) {
  .navy-band { padding: var(--sp-6) var(--sp-6) var(--sp-7); }
}

/* App-level top bar that lives at the top of every page */
.app-topbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  flex-wrap: nowrap;
  min-width: 0;
}
.app-topbar > * { min-width: 0; }
.app-topbar .grow { flex: 1 1 auto; min-width: 0; }
@media (max-width: 380px) {
  .app-topbar { gap: 6px; }
}

/* Brand monogram in the top-right of overview */
.brand-monogram {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--on-navy);
  line-height: 0.95;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--on-navy-border);
  border-radius: var(--r);
  background: var(--on-navy-bg);
}
.brand-monogram .top { font-size: 14px; }
.brand-monogram .rule {
  width: 100%;
  height: 1px;
  background: var(--on-navy-bg-3);
  margin: 2px 0;
}
.brand-monogram .bot { font-size: 12px; letter-spacing: 0.05em; }

/* Eyebrow above titles in navy band */
.navy-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--on-navy-dim);
  margin-bottom: var(--sp-2);
}

/* Big brand title (used on the Overview navy band) */
.brand-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 8vw, 44px);
  font-weight: 600;
  color: var(--gold);
  line-height: 0.95;
  letter-spacing: var(--tracking-tighter);
  margin-bottom: var(--sp-4);
}

/* Panel-level title (smaller, used on inner views) */
.panel-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 5.2vw, 30px);
  font-weight: 500;
  color: var(--on-navy);
  letter-spacing: var(--tracking-tight);
  line-height: 1.05;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-title em { font-style: italic; color: var(--gold); font-weight: 500; }
/* When centered in a panel header, allow soft wrap rather than ellipsis */
.panel-title[style*="text-align: center"] {
  white-space: normal;
  text-overflow: clip;
}

.panel-sublabel {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--on-navy-dim);
  margin-top: 2px;
}

/* Action row under brand title (pills + buttons on overview) */
.brand-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* Project header inside navy band (project name large, with edit icon) */
.proj-header {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.proj-header-row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  justify-content: space-between;
}
.proj-name-large {
  font-family: var(--font-serif);
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 500;
  color: var(--gold);
  line-height: 1.0;
  letter-spacing: var(--tracking-tighter);
  flex: 1;
  min-width: 0;
}
.proj-name-large em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.inline-edit {
  background: transparent;
  border: 0;
  color: var(--on-navy-dim);
  padding: var(--sp-1) var(--sp-2);
  font-size: 16px;
  line-height: 1;
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}
.inline-edit:hover {
  color: var(--gold);
  background: var(--on-navy-bg);
}

.proj-start {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-navy-dim);
  letter-spacing: 0.05em;
}

/* ════════════════════════════════════════════════════════════════════
   3. Hamburger / icon button (in navy bands)
════════════════════════════════════════════════════════════════════ */
.icon-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--on-navy-bg);
  border: 1px solid var(--on-navy-border);
  border-radius: var(--r);
  color: var(--on-navy);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.icon-btn:hover {
  background: var(--on-navy-bg-2);
  border-color: var(--on-navy-bg-3);
}
.icon-btn span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--on-navy);
  border-radius: 1px;
  transition: background var(--t-fast);
}

/* Light-mode equivalent (for cards/inner panels) */
.icon-btn-light {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--ink);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.icon-btn-light:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

/* "Back" pill button on inner pages (navy band) */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--on-navy-bg);
  border: 1px solid var(--on-navy-border);
  border-radius: var(--r);
  color: var(--on-navy);
  padding: 8px 14px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.btn-back:hover {
  background: var(--on-navy-bg-2);
  border-color: var(--on-navy-bg-3);
}
@media (max-width: 380px) {
  .btn-back { padding: 7px 10px; font-size: 12px; }
}

/* ════════════════════════════════════════════════════════════════════
   4. Status pills (live, on-site, badges)
════════════════════════════════════════════════════════════════════ */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-mono);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill--green {
  color: var(--green);
  background: var(--green-soft);
  border-color: var(--green-line);
}
.status-pill--amber {
  color: var(--gold-deep);
  background: var(--gold-bg);
  border-color: var(--green-line);
  border-color: rgba(201, 165, 87, 0.30);
}
.status-pill--red {
  color: var(--red);
  background: var(--red-soft);
  border-color: var(--red-line);
}
.status-pill--blue {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: var(--blue-line);
}
.status-pill--dim {
  color: var(--muted);
  background: var(--surf2);
  border-color: var(--border);
}

/* On-navy variants */
.status-pill--on-navy.status-pill--green {
  color: #7AC79C;
  background: rgba(46, 125, 82, 0.18);
  border-color: rgba(46, 125, 82, 0.45);
}

/* "Live" pulsing variant */
.status-pill--live::before {
  animation: pulse-dot 2.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(0.9); opacity: 0.75; }
}

/* ════════════════════════════════════════════════════════════════════
   5. Buttons
════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 18px;
  border-radius: var(--r);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-1);
  transition: transform var(--t-fast) var(--ease-out-expo),
              box-shadow var(--t-base),
              background var(--t-fast),
              border-color var(--t-fast);
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
  transition-duration: 80ms;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Primary navy (default) */
.btn-navy {
  background: var(--accent);
  color: #fff;
}

/* Gold high-stakes */
.btn-primary {
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(160, 130, 62, 0.20),
              0 2px 6px rgba(160, 130, 62, 0.18);
}

/* Cream secondary (the most common neutral) */
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold-deep);
}

/* On-navy secondary (Sync, Sign Out style) */
.btn-on-navy {
  background: var(--on-navy-bg);
  color: var(--on-navy);
  border-color: var(--on-navy-border);
  box-shadow: none;
}
.btn-on-navy:hover:not(:disabled) {
  background: var(--on-navy-bg-2);
  border-color: var(--on-navy-bg-3);
}

/* Outlined ghost variants for actions inside cards */
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
  box-shadow: none;
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold-deep);
}
.btn-outline-green {
  background: transparent;
  color: var(--green);
  border-color: var(--green-line);
  box-shadow: none;
}
.btn-outline-green:hover:not(:disabled) {
  background: var(--green-soft);
  border-color: var(--green);
}
.btn-outline-gold {
  background: transparent;
  color: var(--gold-deep);
  border-color: rgba(201, 165, 87, 0.40);
  box-shadow: none;
}
.btn-outline-gold:hover:not(:disabled) {
  background: var(--gold-bg);
  border-color: var(--gold);
}
.btn-danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red-line);
  box-shadow: none;
}
.btn-danger:hover:not(:disabled) {
  background: var(--red-soft);
  border-color: var(--red);
}
.btn-danger.armed {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  font-weight: 600;
  animation: pulse-danger 1.5s ease infinite;
}
@keyframes pulse-danger {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 52, 43, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(168, 52, 43, 0); }
}

.btn-small {
  padding: 7px 12px;
  font-size: 12px;
  border-radius: var(--r-sm);
}
.btn-large {
  padding: 14px 24px;
  font-size: 14px;
  border-radius: var(--r-lg);
}

/* Action bar (one or more buttons aligned right) */
.action-bar {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.action-bar.split {
  justify-content: space-between;
}
.action-bar-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.action-bar-grid-2 .btn { width: 100%; }

/* "Card head + action right" */
.card-head-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.card-head-with-action h3 { margin: 0; }

/* ════════════════════════════════════════════════════════════════════
   6. Project tabs (the navy band's bottom edge → tabs)
════════════════════════════════════════════════════════════════════ */
.proj-tabs-wrap {
  background: var(--accent);
  padding-top: var(--sp-4);
  margin-top: calc(var(--sp-7) * -1 + var(--sp-4));
}
.proj-tabs {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--sp-4);
  max-width: 1100px;
  margin: 0 auto;
}
.proj-tabs::-webkit-scrollbar { display: none; }

.proj-tab {
  position: relative;
  flex-shrink: 0;
  background: var(--on-navy-bg);
  border: 1px solid var(--on-navy-border);
  border-bottom: none;
  border-radius: var(--r) var(--r) 0 0;
  color: var(--on-navy-dim);
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 500;
  padding: 10px var(--sp-4);
  white-space: nowrap;
  letter-spacing: var(--tracking-tight);
  transition: background var(--t-base) var(--ease-out-expo), color var(--t-base) var(--ease-out-expo), transform var(--t-base) var(--ease-out-expo), padding var(--t-base) var(--ease-out-expo);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.proj-tab:hover {
  background: var(--on-navy-bg-2);
  color: var(--on-navy);
  transform: translateY(-1px);
}
.proj-tab.active {
  background: var(--bg);
  color: var(--accent-fg);
  font-weight: 600;
  padding: 11px var(--sp-4) 14px;
}
.proj-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 0 0 2px 2px;
}

.proj-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}
.proj-tab.active .proj-tab-dot {
  opacity: 1;
  box-shadow: 0 0 0 3px var(--gold-bg);
}

/* ════════════════════════════════════════════════════════════════════
   7. Sidebar drawer
════════════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 28, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
  z-index: 90;
}
.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 80%;
  max-width: 300px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform var(--t-base) var(--ease-out-expo);
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-3);
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  padding: var(--sp-6) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.sidebar-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.sidebar-title em { font-style: italic; color: var(--gold); font-weight: 500; }
.sidebar-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  margin-top: 4px;
}

.sidebar-list {
  flex: 1;
  padding: var(--sp-3) 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
}
.sb-group {
  padding: var(--sp-4) var(--sp-5) var(--sp-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
  font-weight: 500;
}
/* Clickable group header. Looks like a label, behaves like a toggle. */
.sb-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color var(--t-fast), opacity var(--t-fast);
  /* Override the muted look on hover so the user knows it's tappable */
}
.sb-group-toggle:hover,
.sb-group-toggle:active {
  color: var(--gold-deep);
  opacity: 1;
}
.sb-group-label {
  flex: 1;
  pointer-events: none;
}
.sb-group-chevron {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: inherit;
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
}
.sb-group-toggle.is-collapsed .sb-group-chevron {
  transform: rotate(-90deg);
}
.sb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  border-left: 2px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.sb-item:hover {
  background: var(--surf2);
  color: var(--gold-deep);
}
.sb-item.active {
  background: var(--surf2);
  border-left-color: var(--gold);
  color: var(--gold-deep);
  font-weight: 500;
}
.sb-label { flex: 1; }
.sb-divider {
  height: 1px;
  background: var(--border);
  margin: var(--sp-2) var(--sp-5);
}
.sidebar-footer {
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
}

/* Sidebar item badge (for counts) */
.sb-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--accent);
  color: #fff;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  font-weight: 500;
}
.sb-badge.gold { background: var(--gold); color: var(--accent); }
.sb-badge.red { background: var(--red); color: #fff; }

/* ════════════════════════════════════════════════════════════════════
   8. Card (universal container)
════════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-1);
  transition: border-color var(--t-fast);
  margin-bottom: var(--sp-3);
}
.card.flat { box-shadow: none; }
.card.tonal { background: var(--surf2); }
.card h3 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: var(--sp-3);
  letter-spacing: var(--tracking-tight);
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card,
.stat-card,
.project-row,
.emp-row,
.reimb-row,
.hours-row,
.list-row {
  animation: rise-in var(--t-slow) var(--ease-out-expo) both;
}

/* ════════════════════════════════════════════════════════════════════
   9. Stat cards (overview & inner pages — 4-up grid)
════════════════════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
@media (min-width: 540px) {
  .stat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  box-shadow: var(--shadow-1);
  transition: transform var(--t-base) var(--ease-out-expo),
              border-color var(--t-fast),
              box-shadow var(--t-base);
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}
.stat-value {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
  line-height: 1.05;
}
.stat-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.stat-card.green .stat-value { color: var(--green); }
.stat-card.amber .stat-value { color: var(--gold-deep); }
.stat-card.red   .stat-value { color: var(--red); }
.stat-card.blue  .stat-value { color: var(--accent-fg); }

/* Stat card on green band (for compact inner stats) */
.stat-card-mono .stat-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════
  10. Team-today live card (Overview hero)
════════════════════════════════════════════════════════════════════ */
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-1);
  margin-bottom: var(--sp-3);
}
.team-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border-soft);
}
.team-card-head-l,
.team-card-head-r {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--muted);
  font-weight: 500;
}
.team-card-onsite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
}
.team-card-onsite::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.team-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.team-row + .team-row {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  border: 2px solid var(--accent);
  letter-spacing: -0.02em;
}
.avatar.live {
  border-color: var(--green);
}
.avatar.live::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface);
}
.avatar.sm {
  width: 40px; height: 40px; font-size: 16px;
}
.avatar.lg {
  width: 64px; height: 64px; font-size: 26px;
}

.team-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.team-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.team-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.team-totals {
  text-align: right;
  flex-shrink: 0;
}
.team-hours {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.02em;
}
.team-pay {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* ════════════════════════════════════════════════════════════════════
  11. Today's summary card (3 cols)
════════════════════════════════════════════════════════════════════ */
.today-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-1);
  margin-bottom: var(--sp-3);
}
.today-summary-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  font-weight: 500;
  margin-bottom: var(--sp-4);
}
.today-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  text-align: center;
}
.today-summary-cell {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.today-summary-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.today-summary-value.cost { color: var(--red); }
.today-summary-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.today-summary-label .live-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.today-summary-foot {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.today-summary-foot strong {
  color: var(--ink);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ════════════════════════════════════════════════════════════════════
  12. Project info cards (OWNER / ADDRESS / PHONE on navy band)
════════════════════════════════════════════════════════════════════ */
.info-card {
  background: var(--on-navy-bg);
  border: 1px solid var(--on-navy-border);
  border-radius: var(--r);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2);
}
.info-card-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--on-navy-dim);
  font-weight: 500;
  margin-bottom: 4px;
}
.info-card-value {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--on-navy);
  font-weight: 500;
  word-wrap: break-word;
}

/* ════════════════════════════════════════════════════════════════════
  13. Budget grid (6 cells inside navy)
════════════════════════════════════════════════════════════════════ */
.budget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--on-navy-border);
}
@media (min-width: 540px) {
  .budget-grid { grid-template-columns: repeat(3, 1fr); }
}
.budget-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.budget-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--on-navy-dim);
  font-weight: 500;
}
.budget-value {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
  color: var(--on-navy);
}
.budget-value.gold  { color: var(--gold); }
.budget-value.green { color: #7AC79C; }
.budget-value.red   { color: #E89089; }
.budget-value.percent {
  font-size: 13px;
  margin-left: 6px;
  color: var(--on-navy-faint);
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.budget-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-navy-faint);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.budget-bar {
  grid-column: 1 / -1;
  height: 4px;
  background: var(--on-navy-bg);
  border-radius: 2px;
  overflow: hidden;
  margin-top: var(--sp-2);
}
.budget-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  transition: width var(--t-slow) var(--ease-out-expo);
}
.budget-bar-fill.over {
  background: linear-gradient(90deg, var(--red), #C5564A);
}

/* ════════════════════════════════════════════════════════════════════
  14. Sub-tabs (segmented control)
════════════════════════════════════════════════════════════════════ */
.subtabs {
  display: inline-flex;
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 3px;
  gap: 2px;
  margin-bottom: var(--sp-4);
}
.subtab {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 7px;
  letter-spacing: 0.01em;
  transition: background var(--t-base) var(--ease-out-expo), color var(--t-base) var(--ease-out-expo), box-shadow var(--t-base) var(--ease-out-expo);
  white-space: nowrap;
}
.subtab:hover { color: var(--ink); }
.subtab.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════
  15. Project list rows (overview)
════════════════════════════════════════════════════════════════════ */
.project-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.project-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  transition: transform var(--t-base) var(--ease-out-expo),
              border-color var(--t-fast),
              box-shadow var(--t-base);
}
.project-row:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.project-row:active {
  transform: translateY(0) scale(0.99);
  transition-duration: 80ms;
}
.project-row.over-budget {
  border-color: rgba(168, 52, 43, 0.4);
}
.pr-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}
.pr-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: var(--tracking-tight);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pr-name em { font-style: italic; color: var(--gold); font-weight: 500; }
.pr-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-deep);
  font-weight: 600;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.pr-pct.over { color: var(--red); }

.pr-bar {
  height: 4px;
  background: var(--surf2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--sp-2);
}
.pr-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  transition: width var(--t-slow) var(--ease-out-expo);
}
.pr-fill.over {
  background: linear-gradient(90deg, var(--red), #C5564A);
}
.pr-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.pr-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pr-amount {
  color: var(--ink);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════════════
  16. Cash-flow project row (deposit + spent bars)
════════════════════════════════════════════════════════════════════ */
.cf-project {
  margin-bottom: var(--sp-4);
}
.cf-project-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}
.cf-project-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  flex: 1;
  min-width: 0;
}
.cf-project-name em { font-style: italic; color: var(--gold); font-weight: 500; }
.cf-project-left {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.cf-project-left.over { color: var(--red); }

.cf-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: var(--sp-3);
  align-items: center;
  padding: 4px 0;
}
.cf-bar-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  font-weight: 500;
}
.cf-bar-track {
  height: 14px;
  background: var(--surf2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.cf-bar-fill {
  height: 100%;
  border-radius: var(--r-sm);
  transition: width var(--t-slow) var(--ease-out-expo);
}
.cf-bar-fill.deposit { background: #6FB58A; }
.cf-bar-fill.spent { background: var(--accent); }
.cf-bar-fill.over { background: linear-gradient(90deg, var(--accent), var(--red)); }
.cf-bar-amount {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Cash-flow legend (top of card) */
.cf-legend {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.cf-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-tight);
  font-weight: 500;
}
.cf-legend-item::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: currentColor;
}
.cf-legend-deposit::before { background: #6FB58A; }
.cf-legend-spent::before { background: var(--accent); }
.cf-legend-over::before { background: var(--red); }

/* ════════════════════════════════════════════════════════════════════
  17. 7-day cash-flow chart
════════════════════════════════════════════════════════════════════ */
.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-2);
  align-items: end;
  height: 160px;
  padding: var(--sp-3) 0;
}
.bar-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  height: 100%;
  gap: 4px;
}
.bar-chart-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  font-weight: 500;
}
.bar-chart-bar {
  width: 100%;
  max-width: 28px;
  background: #C5564A;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height var(--t-slow) var(--ease-out-expo);
}
.bar-chart-day {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: var(--sp-1);
}
.bar-chart-foot {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.bar-chart-total {
  color: var(--red);
  font-weight: 600;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ════════════════════════════════════════════════════════════════════
  18. Appointments rows (overview + appointments page)
════════════════════════════════════════════════════════════════════ */
.appt-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-2);
  box-shadow: var(--shadow-1);
  position: relative;
}
.appt-row.overdue { border-color: var(--red-line); }
.appt-row.tomorrow { border-color: var(--blue-line); }

.appt-row-top {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-1);
  flex-wrap: wrap;
}
.appt-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  flex: 1;
  min-width: 0;
}
.appt-when {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.appt-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px dashed var(--border);
}

/* ════════════════════════════════════════════════════════════════════
  19. Active-shift / Clock-in cards (employees page)
════════════════════════════════════════════════════════════════════ */
.active-shift {
  background: var(--green-bg-band);
  border: 1px solid var(--green-line);
  border-radius: var(--r);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.active-shift-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--green);
  font-weight: 600;
  margin-bottom: 2px;
}
.active-shift-info {
  flex: 1;
  min-width: 0;
}
.active-shift-proj {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.active-shift-since {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.active-shift-timer {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.location-card {
  background: var(--green-bg-band);
  border: 1px solid var(--green-line);
  border-radius: var(--r);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
}
.location-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--green);
  font-weight: 600;
  margin-bottom: 4px;
}
.location-coords {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.location-link {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
  margin-top: 4px;
  display: inline-block;
}

/* ════════════════════════════════════════════════════════════════════
  20. Employee row (employees page)
════════════════════════════════════════════════════════════════════ */
.emp-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-1);
  margin-bottom: var(--sp-3);
  transition: border-color var(--t-fast), transform var(--t-base) var(--ease-out-expo);
}
.emp-row.live {
  border-color: var(--green-line);
}
.emp-row:hover {
  border-color: var(--gold);
}
.emp-row-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.emp-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.emp-row-name {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.emp-row-name .name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
}
.emp-row-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.emp-row-actions {
  display: flex;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.emp-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.emp-stat {
  background: var(--surf2);
  border-radius: var(--r);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.emp-stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--muted);
  font-weight: 500;
}
.emp-stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.emp-stat-money {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold-deep);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.emp-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
@media (min-width: 540px) {
  .emp-quick-actions { grid-template-columns: repeat(4, 1fr); }
}

.emp-foot {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--border);
}
.emp-foot-line {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.emp-foot-line .week {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-weight: 500;
}
.emp-foot-line .amt {
  color: var(--gold-deep);
  font-weight: 600;
  font-family: var(--font-serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.emp-foot-line .hrs {
  color: var(--muted);
  margin-left: var(--sp-2);
}

.emp-archive-toggle {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--r);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  margin-top: var(--sp-3);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.emp-archive-toggle:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

/* ════════════════════════════════════════════════════════════════════
  21. Generic list rows (hours, history)
════════════════════════════════════════════════════════════════════ */
.list { display: flex; flex-direction: column; }
.list-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
  align-items: center;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.list-row:last-child { border-bottom: 0; }
.list-row.clickable { cursor: pointer; }
.list-row.clickable:hover { background: var(--surf2); }
.lr-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.lr-text {
  font-family: var(--font-sans);
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lr-amount {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.lr-was {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
  margin-left: var(--sp-1);
}
.list-row.locked .lr-text { color: var(--gold-deep); }
.lr-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-bg);
  border: 1px solid rgba(201, 165, 87, 0.4);
  color: var(--gold-deep);
  font-size: 11px;
  margin-left: var(--sp-2);
  vertical-align: middle;
  padding: 0;
  line-height: 1;
  transition: background var(--t-fast), color var(--t-fast);
}
.lr-photo-btn:hover { background: var(--gold); color: var(--accent); }

/* ════════════════════════════════════════════════════════════════════
  22. Hours panel row
════════════════════════════════════════════════════════════════════ */
.hours-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border-soft);
  align-items: center;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.hours-row:last-child { border-bottom: 0; }
.hours-row.clickable { cursor: pointer; }
.hours-row.clickable:hover { background: var(--surf2); }
.hours-row.live {
  background: var(--green-soft);
}
.hours-row.edited {
  border-left: 2px solid var(--gold);
}
.hr-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hr-date {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  font-weight: 500;
}
.hr-emp {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hr-project {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hr-totals {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  flex-shrink: 0;
}
.hr-hours {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0.05em;
  font-weight: 500;
}
.hr-cost {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hr-was {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  color: var(--muted);
  display: block;
}

/* ════════════════════════════════════════════════════════════════════
  23. Reimbursement / day-off / estimate / invoice rows
════════════════════════════════════════════════════════════════════ */
/* ── Reimbursement-style row (also used by estimates / invoices / day-off) ──
   Layout: 72px thumb on left, body on right (flex 1).
   On phones below 480px the thumb stacks above the body. */
.reimb-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-2);
  box-shadow: var(--shadow-1);
  transition: transform var(--t-base) var(--ease-out-expo),
              border-color var(--t-fast),
              box-shadow var(--t-base);
  display: flex;
  gap: var(--sp-4);
  align-items: stretch;
  overflow: hidden;
}
.reimb-row:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.reimb-row.denied { border-color: var(--red-line); }
.reimb-row.draft  { border-color: var(--border); }

.rb-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surf2);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.rb-thumb:hover {
  border-color: var(--gold);
  transform: scale(1.04);
}
.rb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--r) - 4px);
}

.rb-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  width: 100%;
}

/* Top line: NAME on left, AMOUNT on right with explicit gap */
.rb-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-4);
  width: 100%;
}
.rb-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: var(--tracking-tight);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 4px;  /* explicit fallback if gap fails */
}
.rb-amount {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Meta line: small mono items separated by · */
.rb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--sp-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  align-items: center;
  line-height: 1.6;
}
.rb-meta > span:not(.rb-tag):not(.status-pill):not(.denied-text):not(:last-child)::after {
  content: '·';
  margin-left: var(--sp-2);
  color: var(--border);
}
.rb-tag {
  background: var(--surf2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.rb-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  margin-top: 2px;
  word-break: break-word;
  /* clamp very long descriptions on the row — full text shows on detail */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action buttons: contained inside the card, wrap nicely */
.rb-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}
.rb-actions > .btn,
.rb-actions > .btn-x {
  flex-shrink: 0;
}
.rb-actions-right {
  margin-left: auto;
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.rb-status-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--sp-1);
  letter-spacing: 0.03em;
}

/* Mobile: stack thumb above body so cramped phones get full-width content */
@media (max-width: 480px) {
  .reimb-row {
    flex-direction: column;
    padding: var(--sp-4);
    gap: var(--sp-3);
  }
  .rb-thumb {
    width: 56px;
    height: 56px;
    align-self: flex-start;
  }
  .rb-name { font-size: 16px; }
  .rb-amount { font-size: 18px; }
}

/* Inline armed-delete button. Day-26: text labels (Delete/Confirm)
   instead of × / ✓ glyphs, so size to content. */
.btn-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 4px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  white-space: nowrap;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.btn-x:hover { border-color: var(--red); color: var(--red); }
.btn-x.armed {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════
  24. Modal
════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 22, 28, 0.50), rgba(20, 22, 28, 0.30));
  backdrop-filter: blur(3px);
  z-index: 200;
  opacity: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: opacity var(--t-base);
}
.modal-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(201, 165, 87, 0.08), transparent 60%);
  pointer-events: none;
}
.modal-overlay.open { opacity: 1; }

.modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--t-base) var(--ease-out-expo);
  box-shadow: var(--shadow-4);
}
.modal::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 28%;
  right: 28%;
  height: 2px;
  background: var(--gold);
  border-radius: 0 0 2px 2px;
}
.modal-overlay.open .modal { transform: translateY(0); }

@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: var(--sp-5); }
  .modal {
    border-bottom: 1px solid var(--border);
    border-radius: var(--r-2xl);
    transform: translateY(20px);
  }
  .modal-overlay.open .modal { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-6) var(--sp-6) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  margin: 0;
}
.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.modal-close:hover { border-color: var(--red); color: var(--red); }
.modal-body {
  padding: var(--sp-5) var(--sp-6);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
  background: var(--surf2);
  border-radius: 0 0 var(--r-2xl) var(--r-2xl);
}
.modal-footer.split {
  justify-content: space-between;
}
.modal-footer-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
  width: 100%;
}
.modal-footer-grid-2 .btn { width: 100%; }

/* Destructive zone — separate, italic, soft */
.modal-destructive-zone {
  margin: var(--sp-4) calc(var(--sp-6) * -1) calc(var(--sp-5) * -1);
  padding: var(--sp-3) var(--sp-6);
  border-top: 1px solid var(--border);
  background: var(--surf2);
  text-align: center;
}
.modal-destructive-link {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  padding: var(--sp-2);
  transition: color var(--t-fast);
}
.modal-destructive-link:hover { color: var(--red); }

/* ════════════════════════════════════════════════════════════════════
  25. Forms
════════════════════════════════════════════════════════════════════ */
.form { display: flex; flex-direction: column; gap: var(--sp-5); }

/* Section divider with eyebrow */
.form-section + .form-section {
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}
.form-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.form-section-head {
  position: relative;
  padding-left: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0;
}
.form-section-head::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  bottom: 1px;
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.fld-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--muted);
  font-weight: 500;
}
.fld-label .req {
  color: var(--red);
  margin-left: var(--sp-2);
  font-size: 12px;
  letter-spacing: var(--tracking-mono-wide);
}

/* Card-style input wrapper (the v1 form treatment) */
.fld-input {
  width: 100%;
  background: var(--surf2);
  border: 1.5px solid transparent;
  border-radius: var(--r);
  padding: 12px 14px;
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--ink);
  letter-spacing: 0.005em;
  transition: border-color var(--t-base) var(--ease-out-expo),
              background var(--t-base);
  -webkit-appearance: none;
  outline: none;
}
.fld-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
  font-style: italic;
}
.fld-input:focus {
  background: var(--surface);
  border-color: var(--gold);
}

.fld-textarea {
  font-family: var(--font-sans);
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.fld-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23A0823E' d='M0 0l6 8 6-8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px;
  padding-right: 36px;
}

.fld-time { font-family: var(--font-mono); letter-spacing: 0.03em; }

.fld-mono {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.02em;
}

.fld-hint {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.005em;
}

.form-err {
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  color: var(--red);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r);
  font-size: 13px;
  font-family: var(--font-sans);
  margin-bottom: var(--sp-3);
}

.form-warning {
  background: var(--gold-bg);
  border: 1px solid rgba(201, 165, 87, 0.30);
  color: var(--gold-deep);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.5;
}

.form-original-banner {
  background: var(--surf2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--r);
  padding: var(--sp-3) var(--sp-4);
}
.fob-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--muted);
  margin-bottom: 2px;
  font-weight: 500;
}
.fob-value {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
@media (max-width: 540px) { .two-col { grid-template-columns: 1fr; } }

.time-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.time-cell { display: flex; flex-direction: column; gap: 4px; }
.time-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  font-weight: 500;
}

/* Two-column action row inside the body of a modal (Use current location / View on map) */
.field-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}

/* ════════════════════════════════════════════════════════════════════
  26. Photo upload field
════════════════════════════════════════════════════════════════════ */
.photo-preview {
  position: relative;
  width: 100%;
  min-height: 140px;
  border: 1px dashed var(--border);
  border-radius: var(--r);
  background: var(--surf2);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.photo-preview:hover { border-color: var(--gold); }
.photo-preview-img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  display: block;
}
.photo-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-6);
  pointer-events: none;
}
.photo-preview-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-deep);
  font-size: 24px;
  font-weight: 300;
}
.photo-preview-hint {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 12px;
  color: var(--muted);
}
.photo-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 22, 28, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
}
.photo-clear:hover { background: var(--red); border-color: var(--red); }

/* ════════════════════════════════════════════════════════════════════
  27. Lightbox
════════════════════════════════════════════════════════════════════ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 28, 0.92);
  z-index: 300;
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  transition: opacity var(--t-fast);
  cursor: zoom-out;
}
.lightbox-overlay.open { opacity: 1; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
}
.lightbox-close {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 22, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  padding: 0;
}
.lightbox-close:hover { background: var(--red); border-color: var(--red); }

/* ════════════════════════════════════════════════════════════════════
  28. Line-items editor (estimates / invoices)
════════════════════════════════════════════════════════════════════ */
.li-editor {
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-3);
}
.li-header {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 60px 50px 80px 80px 28px;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  padding: 0 var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-3);
  font-weight: 500;
}
.li-h-qty,
.li-h-price,
.li-h-total { text-align: right; }
.li-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.li-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 60px 50px 80px 80px 28px;
  gap: var(--sp-2);
  align-items: center;
}
.li-row .fld-input {
  font-size: 13px;
  padding: 8px 10px;
  background: var(--surface);
}
.li-qty,
.li-price { text-align: right; font-variant-numeric: tabular-nums; }
.li-total {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--gold-deep);
  text-align: right;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.li-remove {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.li-remove:hover { border-color: var(--red); color: var(--red); }

.li-add {
  width: 100%;
  margin-bottom: var(--sp-3);
  padding: var(--sp-3);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--r);
  color: var(--muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.li-add:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  background: var(--gold-bg);
}

.li-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.li-sub-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  font-weight: 500;
}
.li-sub-value {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--gold-deep);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
}

@media (max-width: 540px) {
  .li-header {
    grid-template-columns: minmax(0, 1.5fr) 50px 40px 70px 70px 24px;
    gap: 4px;
    font-size: 8px;
  }
  .li-row {
    grid-template-columns: minmax(0, 1.5fr) 50px 40px 70px 70px 24px;
    gap: 4px;
  }
  .li-row .fld-input { font-size: 12px; padding: 6px 8px; }
}

/* ════════════════════════════════════════════════════════════════════
  29. Misc helpers
════════════════════════════════════════════════════════════════════ */
.spacer-sm { height: var(--sp-3); }
.spacer    { height: var(--sp-5); }
.spacer-lg { height: var(--sp-7); }

/* "view all" right link in card heads */
.view-all-link {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-weight: 500;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.view-all-link:hover { border-color: var(--gold); color: var(--gold-deep); }

/* Recent activity collapsible */
.collapsible {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-3);
}
.collapsible-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}
.collapsible-chev {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  transition: transform var(--t-base);
}
.collapsible.open .collapsible-chev { transform: rotate(180deg); }

/* ════════════════════════════════════════════════════════════════════
  30. Legacy-compat fallback rules (for class names used in JS panels
       that haven't been refactored to use the new component names yet).
       These are minimal stylings to keep the views readable until each
       panel is upgraded in a follow-up slice.
════════════════════════════════════════════════════════════════════ */

/* Employees panel legacy classes */
.emp-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.emp-top {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.emp-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  flex: 1;
  min-width: 0;
}
.emp-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.emp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.emp-tag {
  background: var(--surf2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-weight: 600;
}
.emp-live-tag {
  background: var(--green-soft);
  border: 1px solid var(--green-line);
  color: var(--green);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.emp-live-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

/* Archive section toggles */
.archive-toggle {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--r);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-weight: 500;
  margin-top: var(--sp-3);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.archive-toggle:hover { border-color: var(--gold); color: var(--gold-deep); }
.archive-chevron {
  font-family: var(--font-mono);
  font-size: 14px;
  transition: transform var(--t-base);
}
.archive-toggle[aria-expanded="true"] .archive-chevron { transform: rotate(180deg); }

/* Open shifts banner card */
.open-shifts {
  background: linear-gradient(180deg, var(--green-soft), var(--surface));
  border-color: var(--green-line);
}
.os-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  margin-top: var(--sp-2);
}

/* Hour-row lock indicator */
.hr-lock,
.lr-lock {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  color: var(--gold-deep);
}

/* Form-warning locked variant */
.form-warning--locked {
  background: var(--gold-bg);
  border-color: rgba(201, 165, 87, 0.30);
  color: var(--gold-deep);
}

/* Modal footer split layout */
.modal-footer-left {
  margin-right: auto;
  display: flex;
  gap: var(--sp-2);
}
.modal-footer-right {
  margin-left: auto;
  display: flex;
  gap: var(--sp-2);
}
.modal-footer-split {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* Line-items: extra header / column slots */
.li-h-desc { text-align: left; }
.li-h-unit { text-align: left; }
.li-h-x { text-align: center; }
.li-desc {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink);
}
.li-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-align: left;
}

/* Reimbursement row legacy split */
.rb-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.rb-left {
  flex: 1;
  min-width: 0;
}

/* ════════════════════════════════════════════════════════════════════
  30. Tasks sub-panel
════════════════════════════════════════════════════════════════════ */
.tg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.tg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  cursor: pointer;
  user-select: none;
  transition: background var(--t-fast);
}
.tg-head:hover { background: var(--surf2); }
.tg-head-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: 1;
  min-width: 0;
}
.tg-chev {
  width: 18px;
  display: inline-block;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  transition: transform var(--t-base);
}
.tg-card.open .tg-chev { transform: rotate(90deg); }
.tg-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  flex: 1;
  min-width: 0;
}
.tg-name em { font-style: italic; color: var(--gold); font-weight: 500; }
.tg-progress {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  font-weight: 500;
  flex-shrink: 0;
}
.tg-progress.complete { color: var(--green); }
.tg-progress-bar {
  height: 3px;
  background: var(--surf2);
  margin: 0 var(--sp-5);
  border-radius: 2px;
  overflow: hidden;
}
.tg-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  transition: width var(--t-slow) var(--ease-out-expo);
}
.tg-progress-fill.complete {
  background: var(--green);
}
.tg-body {
  display: none;
  padding: var(--sp-3) var(--sp-5) var(--sp-4);
}
.tg-card.open .tg-body { display: block; }

.tk-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px dashed var(--border-soft);
  transition: background var(--t-fast);
}
.tk-row:last-child { border-bottom: 0; }
.tk-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--gold);
  transition: border-color var(--t-fast), background var(--t-fast);
  padding: 0;
  line-height: 1;
}
.tk-check:hover { border-color: var(--gold); }
.tk-check.checked {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--accent);
}
.tk-label {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
  cursor: text;
}
.tk-row.done .tk-label {
  color: var(--muted);
  text-decoration: line-through;
}
.tk-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: var(--tracking-mono);
  flex-shrink: 0;
}
.tk-x {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
  padding: var(--sp-1);
  border-radius: var(--r-sm);
  line-height: 1;
  flex-shrink: 0;
  transition: color var(--t-fast), background var(--t-fast);
}
.tk-x:hover { color: var(--red); background: var(--red-soft); }
.tk-x.armed { color: #fff; background: var(--red); }

.tk-add-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
}
.tk-add-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  padding: 6px 0;
}
.tk-add-input::placeholder {
  color: var(--muted);
  opacity: 0.6;
}
.tk-add-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--gold-deep);
  background: transparent;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-weight: 600;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.tk-add-btn:hover {
  border-color: var(--gold);
  background: var(--gold-bg);
}

/* Add-group button (full-width dashed) */
.tg-add-btn {
  width: 100%;
  padding: var(--sp-4);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  color: var(--muted);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  margin-bottom: var(--sp-3);
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}
.tg-add-btn:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
  background: var(--gold-bg);
}

/* ════════════════════════════════════════════════════════════════════
  31. Expense categories sub-panel
════════════════════════════════════════════════════════════════════ */
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-1);
}
.cat-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.cat-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cat-name {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
}
.cat-amount {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.cat-bar {
  height: 4px;
  background: var(--surf2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--sp-2);
}
.cat-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--t-slow) var(--ease-out-expo);
}
.cat-foot {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.cat-pct {
  color: var(--gold-deep);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════
  32. Worker hour cards (Project Info > Hours)
════════════════════════════════════════════════════════════════════ */
.wh-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-1);
}
.wh-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border-soft);
}
.wh-info {
  flex: 1;
  min-width: 0;
}
.wh-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.wh-rate {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.wh-totals {
  text-align: right;
  flex-shrink: 0;
}
.wh-hrs {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.wh-pay {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}

.wh-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-3);
  padding: 6px 0;
  font-size: 12px;
  align-items: center;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
}
.wh-entry.clickable { cursor: pointer; padding: 6px var(--sp-2); }
.wh-entry.clickable:hover { background: var(--surf2); }
.wh-entry-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.wh-entry-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.wh-entry-amt {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.wh-source-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  padding: 2px 5px;
  border-radius: var(--r-sm);
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-fg);
  border: 1px solid var(--border);
}
.wh-source-pill.field { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.wh-source-pill.live { background: var(--green); color: #fff; border-color: var(--green); }


/* ════════════════════════════════════════════════════════════════════
  33. Filter pills (status segmented filters)
════════════════════════════════════════════════════════════════════ */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.filter-pill:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}
.filter-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.filter-pill .count {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.7;
  font-weight: 400;
}

/* ════════════════════════════════════════════════════════════════════
  34. Document number pill (EST-001, INV-001, CO-001)
════════════════════════════════════════════════════════════════════ */
.doc-num-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-mono);
  color: var(--gold-deep);
  background: var(--gold-bg);
  border: 1px solid rgba(201, 165, 87, 0.30);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  margin-right: var(--sp-2);
  text-transform: uppercase;
  vertical-align: middle;
}

/* ════════════════════════════════════════════════════════════════════
  35. From-project pre-fill bar (Estimates / Invoices)
════════════════════════════════════════════════════════════════════ */
.from-project-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: var(--sp-4);
}
.from-project-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--muted);
  font-weight: 500;
  width: 100%;
}
.from-project-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  white-space: nowrap;
}
.from-project-btn:hover {
  border-color: var(--gold);
  background: var(--gold-bg);
  color: var(--gold-deep);
}
.from-project-btn em {
  font-style: italic;
  color: var(--gold);
  margin-left: 3px;
}
.from-project-btn .arrow {
  margin-right: 6px;
  color: var(--muted);
  font-size: 12px;
}

/* ════════════════════════════════════════════════════════════════════
  36. Generic collapsible section (sec)
════════════════════════════════════════════════════════════════════ */
.sec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.sec-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  user-select: none;
  font: inherit;
  color: inherit;
  transition: background var(--t-fast);
}
.sec-head:hover { background: var(--surf2); }
.sec-chev {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 14px;
  transition: transform var(--t-base) var(--ease-out-expo);
}
.sec.sec-open .sec-chev { transform: rotate(90deg); }
.sec-title {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  margin: 0;
  min-width: 0;
}
.sec-title em { font-style: italic; color: var(--gold); font-weight: 500; }
.sec-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  flex-shrink: 0;
  font-weight: 500;
}
.sec-meta.green { color: var(--green); }
.sec-meta.gold  { color: var(--gold-deep); }
.sec-meta.red   { color: var(--red); }
.sec-body {
  display: none;
  padding: 0 var(--sp-5) var(--sp-5);
}
.sec.sec-open .sec-body { display: block; }

/* When the head is also clickable but contains action buttons,
   actions sit at the right and don't trigger toggle */
.sec-head-actions {
  display: flex;
  gap: var(--sp-2);
  flex-shrink: 0;
}
.sec-head-actions > * { pointer-events: auto; }

/* ════════════════════════════════════════════════════════════════════
  37. Empty state with icon
════════════════════════════════════════════════════════════════════ */
.empty-rich {
  text-align: center;
  padding: var(--sp-8) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.empty-rich-icon {
  font-size: 36px;
  margin-bottom: var(--sp-3);
  filter: grayscale(0.3);
}
.empty-rich-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--sp-2);
  letter-spacing: var(--tracking-tight);
}
.empty-rich-body {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto var(--sp-5);
}
.empty-rich-cta {
  display: inline-block;
  margin-top: var(--sp-3);
}

/* ════════════════════════════════════════════════════════════════════
  38. Day-off, reimbursement denied row red border + DENIED text
════════════════════════════════════════════════════════════════════ */
.reimb-row.is-denied,
.reimb-row.is-rejected {
  border-color: var(--red-line);
  background: linear-gradient(180deg, var(--red-soft), var(--surface));
}
.denied-text {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--red);
  font-weight: 600;
  margin-left: var(--sp-2);
}

/* Overdue inline tag */
.rb-overdue {
  color: var(--red);
  font-weight: 600;
}

/* "Generate PDF" specific look (light navy with gold flush) */
.btn-generate-pdf {
  background: var(--accent);
  color: #fff;
  font-weight: 500;
}
.btn-generate-pdf:hover:not(:disabled) {
  background: var(--accent-2);
}


/* ════════════════════════════════════════════════════════════════════
  39. Modal sub-tabs (PENDING / APPROVED with gold underline)
════════════════════════════════════════════════════════════════════ */
.modal-tabs {
  display: flex;
  gap: var(--sp-6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}
.modal-tab {
  background: transparent;
  border: 0;
  padding: var(--sp-3) 0;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  font-weight: 500;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.modal-tab:hover { color: var(--ink); }
.modal-tab.active {
  color: var(--gold-deep);
  border-bottom-color: var(--gold);
}

/* ════════════════════════════════════════════════════════════════════
  40. Backups modal — status card, snapshot rows
════════════════════════════════════════════════════════════════════ */
.backup-status {
  background: var(--surf2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-4);
}
.backup-status-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.backup-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.backup-status-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.backup-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.backup-line strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--green);
}
.backup-line .icon {
  display: inline-block;
  width: 14px;
  text-align: center;
  color: var(--muted);
}

.backup-explainer {
  background: var(--gold-bg);
  border: 1px solid rgba(201, 165, 87, 0.30);
  border-radius: var(--r);
  padding: var(--sp-4) var(--sp-5);
  margin-bottom: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.backup-explainer-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: 4px;
}

.snap-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2);
}
.snap-row-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}
.snap-when {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
  flex: 1;
  min-width: 0;
}
.snap-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-weight: 600;
  border: 1px solid;
}
.snap-pill.cloud {
  background: var(--green-soft);
  color: var(--green);
  border-color: var(--green-line);
}
.snap-pill.local {
  background: var(--surf2);
  color: var(--muted);
  border-color: var(--border);
}
.snap-counts {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: var(--sp-2);
}

/* ════════════════════════════════════════════════════════════════════
  41. Review card (Website Reviews modal)
════════════════════════════════════════════════════════════════════ */
.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-5);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-1);
}
.review-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}
.review-stars {
  font-family: var(--font-mono);
  letter-spacing: 2px;
  color: var(--gold);
  font-size: 16px;
}
.review-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  color: var(--ink);
}
.review-meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.review-svc {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: var(--sp-3);
  line-height: 1.5;
}
.review-quote {
  background: var(--surf2);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}
.review-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-2);
}

/* ════════════════════════════════════════════════════════════════════
  42. Portfolio modal — upload bar, photo group, photo card
════════════════════════════════════════════════════════════════════ */
.pf-upload-bar {
  background: var(--surf3);
  border-radius: var(--r);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
}
.pf-upload-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.pf-upload-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-3);
  align-items: end;
}
.pf-counter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.pf-group {
  margin-bottom: var(--sp-5);
}
.pf-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border);
}
.pf-group-name {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  color: var(--ink);
  text-transform: uppercase;
}
.pf-group-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.pf-photo {
  background: var(--surf3);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.pf-photo-info {
  background: var(--gold-bg);
  border: 1px solid rgba(201, 165, 87, 0.30);
  border-radius: var(--r);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.pf-photo-info-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--gold-deep);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.pf-photo-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: var(--r);
  display: block;
  margin-bottom: var(--sp-3);
  cursor: zoom-in;
}
.pf-photo-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
}


/* ════════════════════════════════════════════════════════════════════
  39. Project Info Overview/Hours mini visualizations
════════════════════════════════════════════════════════════════════ */

/* Donut chart wrapper (CSS conic-gradient based, super lightweight) */
.donut {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  flex-shrink: 0;
}
.donut::after {
  content: '';
  position: absolute;
  inset: 18px;
  background: var(--surface);
  border-radius: 50%;
}
.donut-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.donut-value {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
  line-height: 1;
}
.donut-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  margin-top: 4px;
}

/* Mini bar chart for spend by category / hours by day */
.mini-chart {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
}
.mini-bar {
  display: grid;
  grid-template-columns: 90px 1fr 80px;
  gap: var(--sp-3);
  align-items: center;
  font-size: 12px;
}
.mini-bar-label {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mini-bar-track {
  height: 12px;
  background: var(--surf2);
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
}
.mini-bar-fill {
  height: 100%;
  border-radius: var(--r-sm);
  transition: width var(--t-slow) var(--ease-out-expo);
  background: var(--gold);
}
.mini-bar-fill.green { background: var(--green); }
.mini-bar-fill.red   { background: var(--red); }
.mini-bar-fill.navy  { background: var(--accent); }
.mini-bar-amount {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-weight: 500;
}
.mini-bar-amount.gold { color: var(--gold-deep); }
.mini-bar-amount.green { color: var(--green); }

/* Daily hours mini chart (vertical bars by weekday) */
.daily-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-1);
  height: 100px;
  align-items: end;
  padding-bottom: var(--sp-1);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: var(--sp-2);
}
.daily-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
  gap: 4px;
  height: 100%;
}
.daily-bar {
  width: 100%;
  max-width: 32px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: height var(--t-slow) var(--ease-out-expo);
}
.daily-bar.zero { background: var(--surf3); min-height: 2px; }
.daily-cap {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--sp-1);
  text-align: center;
  margin-top: 2px;
}

/* Project overview hero card (top of Overview sub-tab) */
.pi-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.pi-hero-meta {
  flex: 1;
  min-width: 0;
}
.pi-hero-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
}
.pi-hero-row:last-child { border-bottom: 0; }
.pi-hero-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-mono);
  font-weight: 500;
}
.pi-hero-value {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
}
.pi-hero-value.green { color: var(--green); }
.pi-hero-value.red   { color: var(--red); }
.pi-hero-value.gold  { color: var(--gold-deep); }

@media (max-width: 480px) {
  .pi-hero { flex-direction: column; gap: var(--sp-3); align-items: stretch; }
  .donut { align-self: center; }
}


/* ════════════════════════════════════════════════════════════════════
  40. Overview drag-to-reorder
  Every section in the Overview is wrapped in a .reorder-row that the
  user can long-press → drag to reorder. No handle, no mode toggle.
════════════════════════════════════════════════════════════════════ */

.reorder-row {
  margin-bottom: var(--sp-3);
  /* Allow normal vertical scroll on touch; the long-press JS handles the
     drag intent itself by waiting 220ms before arming and aborting if the
     user moves more than 10px. */
  touch-action: pan-y;
  /* Smooth transforms when siblings shift during drag */
  transition: transform 180ms cubic-bezier(0.2, 0, 0, 1);
  will-change: transform;
}

/* Active drag state — the row that's being lifted */
.reorder-row.dragging {
  transition: none;            /* JS sets transform every frame */
  z-index: 50;
}
.reorder-row.dragging .sec {
  box-shadow: 0 12px 32px rgba(14, 27, 53, 0.18),
              0 2px 6px rgba(14, 27, 53, 0.10);
  border-color: var(--gold-deep);
  background: linear-gradient(180deg,
    rgba(201, 165, 87, 0.10) 0%,
    var(--surface) 100%);
}

/* While anyone is dragging, freeze the body and dim non-dragged rows
   subtly so the lifted card is the focus */
body.reorder-dragging {
  overflow: hidden;
  -webkit-overflow-scrolling: auto;
  touch-action: none;
  cursor: grabbing;
}
body.reorder-dragging .reorder-row:not(.dragging) {
  opacity: 0.85;
}

/* Locked head (no onToggle) — remove pointer cursor + hover */
.sec-head-locked {
  cursor: default;
}
.sec-head-locked:hover {
  background: transparent;
}

/* ════════════════════════════════════════════════════════════════════
  41. Appointments panel
  Full-panel variants of the .appt-row preview (overview also uses these)
════════════════════════════════════════════════════════════════════ */

.appt-row--full {
  /* Inherit base .appt-row paddings; add room for actions row */
  padding-bottom: var(--sp-3);
}
.appt-row.completed {
  opacity: 0.65;
  border-color: var(--border);
  background: var(--surf2);
}
.appt-row.completed .appt-name {
  text-decoration: line-through;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
}
.appt-row.nodate {
  border-color: var(--gold);
  background: linear-gradient(180deg,
    rgba(201,165,87,0.06) 0%,
    var(--surface) 100%);
}

.appt-project {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  flex-wrap: wrap;
}
.appt-project-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-mono-wide);
  color: var(--muted);
  text-transform: uppercase;
}
.appt-project-name {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--ink);
  font-style: italic;
}

.appt-actions {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.appt-actions-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

@media (max-width: 480px) {
  .appt-actions { gap: 6px; }
  .appt-actions .btn { font-size: 11px; padding: 6px 10px; }
}

/* ════════════════════════════════════════════════════════════════════
  42. Change-order preview strip (in addChangeOrder form)
════════════════════════════════════════════════════════════════════ */
.co-preview-strip {
  margin-top: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: linear-gradient(180deg,
    rgba(201, 165, 87, 0.08) 0%,
    rgba(201, 165, 87, 0.03) 100%);
  border: 1px solid rgba(201, 165, 87, 0.30);
  border-radius: var(--r-sm);
}
.co-preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-3);
}
.co-preview-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}
.co-preview-lbl {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--tracking-mono);
  text-transform: uppercase;
  color: var(--muted);
}
.co-preview-val {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.co-preview-val.is-credit {
  color: var(--red);
}
.co-preview-val.co-preview-grand {
  color: var(--gold-deep);
  font-size: 18px;
}
@media (max-width: 480px) {
  .co-preview-row { grid-template-columns: 1fr; gap: var(--sp-2); }
  .co-preview-row > div {
    flex-direction: row; justify-content: space-between; text-align: left;
  }
}

/* ════════════════════════════════════════════════════════════════════
  Skeletons — Firebase loading placeholders
════════════════════════════════════════════════════════════════════ */
@keyframes skel-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skel,
.skel-row-avatar,
.skel-row-body span,
.skel-row-trail span {
  background: linear-gradient(
    90deg,
    var(--surf2) 0%,
    var(--surf3) 50%,
    var(--surf2) 100%
  );
  background-size: 200% 100%;
  animation: skel-shimmer 1.6s linear infinite;
}
.skel-card,
.skel-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-3);
}
.skel-stat-card { padding: var(--sp-4) var(--sp-5); margin-bottom: 0; }
.skel-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.skel-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-3) var(--sp-4);
}
.skel-row-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skel-row-body { flex: 1; min-width: 0; }
.skel-row-trail { flex-shrink: 0; }
.skel-fade-in { animation: skel-fade-in var(--t-base) var(--ease-out-expo) both; }
@keyframes skel-fade-in {
  from { opacity: 0; } to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .skel,
  .skel-row-avatar,
  .skel-row-body span,
  .skel-row-trail span {
    animation: none;
    background: var(--surf2);
  }
}

/* ════════════════════════════════════════════════════════════════════
  Connectivity badge — Firebase offline / back-online indicator
════════════════════════════════════════════════════════════════════ */
.conn-badge {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 8px);
  left: 50%;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -180%);
  opacity: 0;
  transition:
    transform var(--t-base) var(--ease-out-expo),
    opacity var(--t-base);
  box-shadow: var(--shadow-3);
}
.conn-badge.is-visible { transform: translate(-50%, 0); opacity: 1; }
.conn-badge.is-offline { background: linear-gradient(180deg, #B83B32 0%, #8E2620 100%); color: #fff; }
.conn-badge.is-online  { background: linear-gradient(180deg, var(--green) 0%, #155033 100%); color: #fff; }
.conn-badge.is-syncing { background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%); color: #fff; }
.conn-badge.is-syncing .icon { animation: ptr-spin 0.9s linear infinite; }
.conn-badge .icon { stroke-width: 2.5; }
@media (max-width: 380px) {
  .conn-badge {
    left: 8px;
    right: 8px;
    transform: translateY(-180%);
    justify-content: center;
  }
  .conn-badge.is-visible { transform: translateY(0); }
}

/* ════════════════════════════════════════════════════════════════════
  Toast — non-modal feedback notifications
════════════════════════════════════════════════════════════════════ */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + var(--sp-5) + 70px);
  z-index: 320;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  width: max-content;
  max-width: min(92vw, 460px);
  pointer-events: none;
}
.toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px 22px 12px 18px;
  background: rgba(245, 239, 227, 0.94);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  color: var(--ink);
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.40) inset,
    0 4px 12px rgba(20, 22, 28, 0.10),
    0 12px 32px rgba(20, 22, 28, 0.16);
  pointer-events: auto;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition:
    opacity var(--t-base) var(--ease-out-expo),
    transform var(--t-base) var(--ease-out-expo);
}
.toast.is-shown { opacity: 1; transform: translateY(0) scale(1); }
.toast.is-leaving { opacity: 0; transform: translateY(10px) scale(0.96); }

html[data-theme="dark"] .toast {
  background: rgba(30, 36, 46, 0.88);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 4px 12px rgba(0, 0, 0, 0.40),
    0 12px 32px rgba(0, 0, 0, 0.55);
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold-deep);
}
.toast--success::before { background: var(--green); }
.toast--error::before   { background: var(--red); }
.toast--info::before    { background: var(--gold-deep); }

.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.toast-icon .icon { stroke-width: 2.4; }
.toast--success .toast-icon { color: var(--green); }
.toast--error   .toast-icon { color: var(--red); }
.toast--info    .toast-icon { color: var(--gold-deep); }

.toast-message {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  min-width: 0;
  letter-spacing: 0.005em;
  overflow-wrap: anywhere;
  white-space: normal;
}
.toast-action {
  background: transparent;
  border: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--gold-deep);
  cursor: pointer;
  padding: 4px 10px;
  margin-left: var(--sp-2);
  border-radius: 999px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  transition: background var(--t-fast), color var(--t-fast);
}
.toast-action:hover {
  background: var(--gold-bg);
  color: var(--ink);
}
@media (max-width: 380px) {
  .toast-stack { width: calc(100vw - 16px); max-width: none; }
  .toast {
    padding: 12px 18px 12px 16px;
    gap: var(--sp-2);
  }
  .toast-message { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity var(--t-fast); transform: none; }
  .toast.is-shown,
  .toast.is-leaving { transform: none; }
}

/* Field has no FAB so toast positioning needs no adjustment.
   Keeping this section for parity with owner styles. */

/* ════════════════════════════════════════════════════════════════════
  Pull-to-refresh indicator
════════════════════════════════════════════════════════════════════ */
.ptr-indicator {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 4px);
  left: 50%;
  z-index: 250;
  transform: translate(-50%, -180%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms, transform 220ms cubic-bezier(0.2, 0, 0, 1);
}
.ptr-indicator .ptr-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms;
}
.ptr-indicator.is-armed {
  color: var(--gold-deep);
  border-color: var(--gold);
  background: var(--gold-bg);
}
.ptr-indicator.is-armed .ptr-icon { transform: rotate(180deg); }
.ptr-indicator.is-refreshing { transition: none; }
.ptr-indicator.is-refreshing .ptr-icon { animation: ptr-spin 0.8s linear infinite; }
@keyframes ptr-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ptr-indicator.is-refreshing .ptr-icon { animation: none; }
}

/* Theme-flip transition (fallback) */
html.theme-flipping,
html.theme-flipping body,
html.theme-flipping .card,
html.theme-flipping .modal-shell,
html.theme-flipping .btn,
html.theme-flipping input,
html.theme-flipping select,
html.theme-flipping textarea {
  transition:
    background-color 220ms cubic-bezier(0.2, 0, 0, 1),
    color 220ms cubic-bezier(0.2, 0, 0, 1),
    border-color 220ms cubic-bezier(0.2, 0, 0, 1) !important;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 240ms;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
@media (prefers-reduced-motion: reduce) {
  html.theme-flipping,
  html.theme-flipping * { transition: none !important; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}

/* ─── My Card modal (Day-59, navy editorial) ───────────────────── */

/* Navy theme override for the modal chrome */
.modal.modal--navy {
  background: var(--accent);
  color: var(--on-navy);
  border-color: var(--on-navy-border);
}
.modal.modal--navy .modal-header {
  background: transparent;
  border-bottom-color: var(--on-navy-border);
  padding: var(--sp-5) var(--sp-5) var(--sp-3);
}
.modal.modal--navy .modal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
}
.modal.modal--navy .modal-close {
  color: var(--on-navy-dim);
  border-color: var(--on-navy-border);
  background: transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.modal.modal--navy .modal-close:hover {
  color: var(--gold);
  border-color: var(--gold);
}
.modal.modal--navy .modal-body {
  background: transparent;
  padding: 0;
}
.modal.modal--navy .modal-footer {
  background: transparent;
  border-top-color: var(--on-navy-border);
}

/* The card frame */
.mycard-frame {
  padding: var(--sp-3) var(--sp-5) var(--sp-6);
  text-align: center;
}
.mycard-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: var(--sp-2) 0 var(--sp-5);
  font-weight: 500;
}

/* QR — black on white card */
.mycard-qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-6);
}
.mycard-qr-card {
  background: #FFFFFF;
  padding: var(--sp-4);
  border-radius: var(--r-lg, 12px);
  box-shadow: 0 12px 32px -10px rgba(0,0,0,0.4),
              0 4px 10px -2px rgba(0,0,0,0.2);
}
.mycard-qr-loading {
  width: 240px;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px dashed var(--on-navy-border);
  border-radius: var(--r-lg, 12px);
  color: var(--on-navy-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin: 0 auto;
}

/* Identity — Fraunces serif, italic last name */
.mycard-identity {
  margin-bottom: var(--sp-3);
}
.mycard-name {
  font-family: var(--font-serif);
  font-size: clamp(28px, 7vw, 36px);
  font-weight: 500;
  color: var(--gold);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 var(--sp-2);
}
.mycard-name em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.mycard-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--on-navy-dim);
  font-weight: 400;
}

/* Rule between identity and rows */
.mycard-rule {
  height: 1px;
  background: var(--on-navy-border);
  margin: var(--sp-5) auto;
  width: 60px;
}

/* Contact rows — flat, no boxes (Day-59 refinement) */
.mycard-rows {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--sp-6);
  text-align: left;
}
.mycard-row {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: var(--sp-3) 0;
  transition: opacity var(--t-fast);
}
.mycard-row + .mycard-row {
  border-top: 1px solid var(--on-navy-border);
}
.mycard-row:hover,
.mycard-row:active {
  opacity: 0.78;
}
.mycard-row--empty {
  cursor: default;
}
.mycard-row--empty:hover {
  opacity: 1;
}
.mycard-row-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
  margin-bottom: 4px;
  font-weight: 500;
}
.mycard-row-value {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--on-navy);
  font-weight: 500;
  word-break: break-all;
  letter-spacing: -0.005em;
}
.mycard-row-value--faint {
  color: var(--on-navy-faint);
  font-style: italic;
  font-size: 13px;
  font-weight: 400;
}

.mycard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.mycard-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--on-navy-faint);
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
}

.mycard-error {
  padding: var(--sp-6);
  text-align: center;
  color: #f9a4a4;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ─── Notification settings modal (Day-59) ───────────────────────── */
.notif-status {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) 0;
  margin: var(--sp-4) 0 var(--sp-3);
}
.notif-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.notif-status-text {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--on-navy);
  font-weight: 500;
}

.notif-hint {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--on-navy-dim);
  line-height: 1.5;
  margin-bottom: var(--sp-4);
  padding: var(--sp-3);
  background: rgba(212, 184, 114, 0.08);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--r) var(--r) 0;
}

.notif-events-title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-navy-dim);
  font-weight: 500;
  margin-bottom: var(--sp-3);
  text-align: left;
}
.notif-events {
  list-style: none;
  margin: 0 0 var(--sp-5);
  padding: 0;
  text-align: left;
}
.notif-event {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--on-navy);
  line-height: 1.5;
  padding: var(--sp-2) 0;
  position: relative;
  padding-left: 18px;
}
.notif-event::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
}
