/* ══════════════════════════════════════════════════════════════
   CC Tracker — Stylesheet v7.0
   Warm mono · Geist · Hairline dividers · Fluid motion
   ══════════════════════════════════════════════════════════════ */

/* ─── Tokens ─── */
:root {
  --font-sans: 'Geist', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', Menlo, Consolas, monospace;
  --font-serif: 'Instrument Serif', Georgia, serif;

  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 999px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;

  --t-fast: 120ms cubic-bezier(.4,0,.2,1);
  --t-base: 200ms cubic-bezier(.4,0,.2,1);
  --t-slow: 320ms cubic-bezier(.32,.72,0,1);
  --t-spring: 420ms cubic-bezier(.34,1.2,.64,1);

  --header-h: 56px;
}

/* ─── Light theme (warm off-white) ─── */
[data-theme="light"] {
  --bg:           #F6F4EF;
  --bg-subtle:    #F0EDE6;
  --surface:      #FFFFFF;
  --surface-2:    #FAF8F3;
  --surface-hover:#F2EFE8;

  --text:         #16140F;
  --text-2:       #4A463D;
  --text-muted:   #8B8678;
  --text-faint:   #B8B3A5;

  --border:       rgba(22,20,15,0.08);
  --border-2:     rgba(22,20,15,0.14);
  --border-strong:rgba(22,20,15,0.22);

  --accent:       #16140F;
  --accent-hover: #2B2822;
  --accent-soft:  rgba(22,20,15,0.06);

  --success:      #3F7A3A;
  --success-soft: rgba(63,122,58,0.10);
  --warning:      #B06A1E;
  --warning-soft: rgba(176,106,30,0.10);
  --danger:       #9E3939;
  --danger-soft:  rgba(158,57,57,0.08);
  --info:         #2F5B85;
  --info-soft:    rgba(47,91,133,0.08);
  --purple:       #5E4B8C;
  --purple-soft:  rgba(94,75,140,0.08);

  --input-bg:     #FFFFFF;
  --hover:        rgba(22,20,15,0.035);
  --overlay:      rgba(22,20,15,0.32);

  --shadow-sm:  0 1px 2px rgba(22,20,15,0.04);
  --shadow:     0 2px 6px rgba(22,20,15,0.04), 0 1px 2px rgba(22,20,15,0.03);
  --shadow-md:  0 6px 16px rgba(22,20,15,0.06), 0 2px 4px rgba(22,20,15,0.04);
  --shadow-lg:  0 16px 40px rgba(22,20,15,0.10), 0 4px 8px rgba(22,20,15,0.04);
  --shadow-xl:  0 32px 80px rgba(22,20,15,0.14);
}

/* ─── Dark theme (warm near-black) ─── */
[data-theme="dark"] {
  --bg:           #100F0D;
  --bg-subtle:    #15130F;
  --surface:      #1A1813;
  --surface-2:    #1E1C17;
  --surface-hover:#23201A;

  --text:         #F0EDE5;
  --text-2:       #B5B0A3;
  --text-muted:   #7E7A6E;
  --text-faint:   #4E4B43;

  --border:       rgba(240,237,229,0.07);
  --border-2:     rgba(240,237,229,0.12);
  --border-strong:rgba(240,237,229,0.20);

  --accent:       #F0EDE5;
  --accent-hover: #FFFFFF;
  --accent-soft:  rgba(240,237,229,0.08);

  --success:      #7BB275;
  --success-soft: rgba(123,178,117,0.10);
  --warning:      #D99B4E;
  --warning-soft: rgba(217,155,78,0.10);
  --danger:       #D87070;
  --danger-soft:  rgba(216,112,112,0.10);
  --info:         #7BA4D4;
  --info-soft:    rgba(123,164,212,0.10);
  --purple:       #A99BD2;
  --purple-soft:  rgba(169,155,210,0.10);

  --input-bg:     #16140F;
  --hover:        rgba(240,237,229,0.04);
  --overlay:      rgba(8,7,5,0.60);

  --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
  --shadow:     0 2px 6px rgba(0,0,0,0.3);
  --shadow-md:  0 6px 20px rgba(0,0,0,0.40);
  --shadow-lg:  0 16px 44px rgba(0,0,0,0.50);
  --shadow-xl:  0 28px 72px rgba(0,0,0,0.60);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 13px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  font-feature-settings: 'ss01', 'ss02', 'cv11';
  letter-spacing: -0.005em;
  transition: background var(--t-base), color var(--t-base);
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-sans); font-weight: 500; letter-spacing: -0.02em; }
input, select, textarea, button { font-family: inherit; font-size: .875rem; color: inherit; }

/* Mono everywhere there's a number/ID/code */
.mono, kbd, code,
.kpi-value, .kpi-mono, .task-table td:first-child,
.task-id, .td-meta-mono, .sla-labels, .timeline-item .tl-time,
.event-item .event-time, .range-arrow, .section-meta {
  font-family: var(--font-mono);
  font-feature-settings: 'ss01', 'ss02', 'zero', 'tnum';
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: var(--r-full); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

.screen { display: none; }
.screen.active { display: flex; }

/* ═══ ICONS (Material Symbols Rounded) ═══ */
.material-symbols-rounded {
  font-family: 'Material Symbols Rounded';
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  vertical-align: -3px;
  user-select: none;
}

/* ═══ LOGIN ═══ */
#login-screen {
  height: 100vh;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  position: relative;
}
#login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(800px 500px at 30% 30%, var(--accent-soft), transparent 60%),
    radial-gradient(600px 400px at 70% 70%, var(--accent-soft), transparent 60%);
  opacity: .5;
  pointer-events: none;
}
.login-container { text-align: center; animation: fadeInUp .6s var(--t-slow); position: relative; z-index: 1; }
.login-mark {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-5);
}
.mark-square {
  width: 32px; height: 32px; border-radius: var(--r-md);
  background: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-md);
}
.login-title { font-size: 22px; font-weight: 500; letter-spacing: -0.03em; margin-bottom: var(--s-1); }
.login-subtitle { color: var(--text-muted); font-size: 12px; margin-bottom: var(--s-8); }
.btn-google {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 10px 20px;
  background: var(--surface); color: var(--text);
  border: 0.5px solid var(--border-2); border-radius: var(--r-md);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all var(--t-base);
  box-shadow: var(--shadow-sm);
}
.btn-google:hover { background: var(--surface-hover); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.btn-google:active { transform: scale(.98); }
.login-footnote { color: var(--text-muted); font-size: 11px; margin-top: var(--s-4); font-family: var(--font-mono); }

/* ═══ APP SHELL ═══ */
#app-shell { flex-direction: column; height: 100vh; background: var(--bg); }

/* ─── Top header ─── */
#app-header {
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 var(--s-5);
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
  position: relative;
  z-index: 100;
  flex-shrink: 0;
  gap: var(--s-5);
}
.hdr-brand { display: flex; align-items: center; gap: var(--s-2); cursor: pointer; transition: opacity var(--t-fast); }
.hdr-brand:hover { opacity: .75; }
.brand-mark {
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: var(--r-xs);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.brand-text { font-weight: 500; font-size: 13px; letter-spacing: -0.015em; }

.hdr-nav {
  display: flex; align-items: center; gap: 2px;
  padding-left: var(--s-4);
  border-left: 0.5px solid var(--border);
  height: 28px;
}
.nav-item {
  display: inline-flex; align-items: center;
  padding: 6px 12px;
  font-size: 12.5px; font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
  letter-spacing: -0.005em;
  position: relative;
}
.nav-item:hover { color: var(--text); background: var(--hover); }
.nav-item.active { color: var(--text); background: var(--accent-soft); }

.hdr-right {
  margin-left: auto;
  display: flex; align-items: center; gap: var(--s-1);
}
.search-bar {
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--bg-subtle);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 6px var(--s-3);
  width: 260px;
  transition: all var(--t-fast);
  margin-right: var(--s-2);
}
.search-bar:focus-within { background: var(--surface); border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-bar .material-symbols-rounded { font-size: 16px; color: var(--text-muted); }
.search-bar input {
  border: none; background: transparent; outline: none;
  width: 100%; font-size: 12.5px;
}
.search-bar input::placeholder { color: var(--text-muted); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: none;
  color: var(--text-2);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .material-symbols-rounded { font-size: 18px; }

.notif-badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--danger); color: #fff;
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 600;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--surface);
  animation: pop-in var(--t-spring);
}

.user-avatar {
  width: 28px; height: 28px;
  border-radius: var(--r-full);
  overflow: hidden;
  cursor: pointer;
  margin-left: var(--s-1);
  border: 0.5px solid var(--border-strong);
  transition: all var(--t-fast);
  position: relative;
}
.user-avatar:hover { box-shadow: 0 0 0 3px var(--accent-soft); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--accent-soft); color: var(--text);
  font-weight: 500; font-size: 11px;
}

/* ─── Dropdowns ─── */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px); right: var(--s-5);
  background: var(--surface);
  border: 0.5px solid var(--border-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 200;
  animation: fadeInDown var(--t-base);
  overflow: hidden;
}
.dropdown-user-info { padding: var(--s-3) var(--s-4); }
.dropdown-user-info strong { display: block; font-size: 13px; font-weight: 500; }
.dropdown-user-info small { color: var(--text-muted); font-size: 11px; font-family: var(--font-mono); display: block; margin-top: 2px; }
.role-badge {
  display: inline-block; margin-top: var(--s-2);
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  background: var(--accent-soft); color: var(--text);
  font-family: var(--font-mono);
}
.dropdown-divider { height: 0.5px; background: var(--border); }
.dropdown-menu button {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; padding: 8px var(--s-4);
  border: none; background: transparent; color: var(--text);
  cursor: pointer; font-size: 12.5px; font-weight: 500;
  transition: background var(--t-fast);
  text-align: left;
}
.dropdown-menu button:hover { background: var(--hover); }
.dropdown-menu button .material-symbols-rounded { font-size: 16px; color: var(--text-muted); }

/* ─── Main ─── */
#main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: var(--s-8) var(--s-10);
  position: relative;
  background: var(--bg);
  min-width: 0;
}
.view { display: none; animation: viewIn var(--t-slow); }
.view.active { display: block; }

.view-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  margin-bottom: var(--s-8);
  flex-wrap: wrap;
}
.view-title-block { display: flex; flex-direction: column; gap: 2px; }
.view-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.view-title { font-size: 26px; font-weight: 500; letter-spacing: -0.035em; line-height: 1.1; }
.view-actions { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 7px 14px;
  border: 0.5px solid transparent;
  border-radius: var(--r-md);
  font-weight: 500;
  font-size: 12.5px;
  cursor: pointer;
  transition: all var(--t-fast);
  line-height: 1;
  letter-spacing: -0.005em;
  background: transparent;
  color: var(--text);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn .material-symbols-rounded { font-size: 15px; margin: -1px 0; }
.btn-primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border-2); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(1.1); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { filter: brightness(1.1); }
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover { filter: brightness(1.1); }
.btn-sm { padding: 5px 10px; font-size: 11.5px; }
.btn-sm .material-symbols-rounded { font-size: 14px; }
.btn-icon-sm {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border: 0.5px solid var(--border-2); background: var(--surface);
  color: var(--text-2); border-radius: var(--r-md);
  cursor: pointer; transition: all var(--t-fast);
}
.btn-icon-sm:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-hover); }
.btn-icon-sm .material-symbols-rounded { font-size: 15px; }

/* ═══ INPUTS ═══ */
select, input[type="text"], input[type="url"], input[type="number"],
input[type="date"], input[type="time"], input[type="email"], textarea {
  padding: 7px 10px;
  border: 0.5px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--input-bg);
  color: var(--text);
  outline: none;
  font-size: 12.5px;
  transition: all var(--t-fast);
  font-family: inherit;
}
select { cursor: pointer; padding-right: 28px; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='%238B8678' stroke-width='1.2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 10px center;
}
[data-theme="dark"] select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 4l3 3 3-3' stroke='%237E7A6E' stroke-width='1.2' fill='none' stroke-linecap='round'/></svg>");
}
select:focus, input:focus, textarea:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; min-height: 64px; }
.filter-group { display: flex; gap: var(--s-2); flex-wrap: wrap; }

.req { color: var(--danger); font-weight: 500; }

/* ═══ KPI STRIP (newspaper style) ═══ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  margin-bottom: var(--s-8);
}
.kpi-card {
  padding: var(--s-4) var(--s-5);
  border-right: 0.5px solid var(--border);
  animation: kpiIn var(--t-slow) both;
  position: relative;
}
.kpi-card:last-child { border-right: none; }
.kpi-value {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  font-feature-settings: 'tnum', 'ss01';
}
.kpi-value.v-warn { color: var(--warning); }
.kpi-value.v-danger { color: var(--danger); }
.kpi-value.v-success { color: var(--success); }
.kpi-value.v-purple { color: var(--purple); }
.kpi-value.v-info { color: var(--info); }
.kpi-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* ═══ DASHBOARD GRID ═══ */
.dash-primary {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--s-8);
  margin-bottom: var(--s-8);
}
.dash-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s-8);
}

.dash-section, .settings-card {
  animation: sectionIn var(--t-slow) both;
}

/* Stack spacing for Operations view (each section sits in its own block) */
#view-operations .dash-section { margin-bottom: var(--s-6); }
#view-operations .dash-section:last-child { margin-bottom: 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--s-3);
  padding-bottom: 0;
}
.section-head h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
}
.section-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.section-body {
  border-top: 0.5px solid var(--border);
  padding-top: var(--s-3);
  max-height: 380px;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
}

/* Mini tables (used inside dash sections) */
.mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mini-table thead { display: none; }
.mini-table td {
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  vertical-align: middle;
}
.mini-table tr:last-child td { border-bottom: none; }
.mini-table tr { transition: background var(--t-fast); }
.mini-table tr:hover { background: var(--hover); cursor: pointer; }

/* Bandwidth row custom */
.bw-row {
  display: grid;
  grid-template-columns: 24px 1fr 120px 60px;
  gap: var(--s-3);
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  transition: background var(--t-fast);
}
.bw-row:last-child { border-bottom: none; }
.bw-row:hover { background: var(--hover); }
.bw-avatar {
  width: 24px; height: 24px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 500;
}
.bw-name { font-size: 12.5px; font-weight: 500; }
.bw-name small { display: block; color: var(--text-muted); font-size: 10.5px; font-weight: 400; margin-top: 1px; }
.bw-bar { height: 4px; background: var(--border); border-radius: var(--r-full); overflow: hidden; position: relative; }
.bw-bar-fill { height: 100%; border-radius: var(--r-full); transition: width 800ms var(--t-slow); background: var(--success); }
.bw-bar-fill.over { background: var(--warning); }
.bw-bar-fill.breached { background: var(--danger); }
.bw-stat { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }

/* Attention item */
.attention-item {
  padding: var(--s-3) 0;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
  margin: 0 calc(var(--s-2) * -1);
  padding-left: var(--s-2);
  padding-right: var(--s-2);
  border-radius: var(--r-sm);
}
.attention-item:last-child { border-bottom: none; }
.attention-item:hover { background: var(--hover); }
.attention-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.attention-id { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); letter-spacing: 0.03em; }
.attention-delay { font-family: var(--font-mono); font-size: 11px; font-weight: 500; color: var(--danger); font-variant-numeric: tabular-nums; }
.attention-delay.warn { color: var(--warning); }
.attention-title { font-size: 12.5px; font-weight: 500; margin-bottom: 2px; }
.attention-sub { font-size: 11px; color: var(--text-muted); }

/* ═══ TASK TABLE ═══ */
.task-table-wrap {
  overflow-x: auto;
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.task-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 500;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 0.5px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  font-family: var(--font-mono);
}
.task-table td {
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
  white-space: nowrap;
  transition: background var(--t-fast);
}
.task-table tbody tr { cursor: pointer; transition: background var(--t-fast); animation: rowIn var(--t-base) both; }
.task-table tbody tr:hover td { background: var(--hover); }
.task-table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.task-table td:first-child { color: var(--text-muted); font-weight: 500; }

/* ═══ STATUS BADGES ═══ */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: -0.005em;
  border: 0.5px solid transparent;
  background: var(--accent-soft);
  color: var(--text-2);
}
.status-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: var(--r-full);
  background: currentColor; opacity: .8;
}
.status-CREATED { background: var(--info-soft); color: var(--info); }
.status-PICKED_UP { background: var(--warning-soft); color: var(--warning); }
.status-IN_PROGRESS { background: var(--warning-soft); color: var(--warning); }
.status-SUBMITTED { background: var(--purple-soft); color: var(--purple); }
.status-APPROVED { background: var(--success-soft); color: var(--success); }
.status-REJECTED { background: var(--danger-soft); color: var(--danger); }
.status-RESOLVED { background: var(--success-soft); color: var(--success); }

.priority-High { color: var(--danger); font-weight: 500; }
.priority-Medium { color: var(--warning); font-weight: 500; }
.priority-Low { color: var(--text-muted); }

/* ═══ MY TASKS BOARD ═══ */
.my-tasks-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-4);
}
.my-task-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
  cursor: pointer;
  transition: all var(--t-base);
  position: relative;
  animation: cardIn var(--t-slow) both;
}
.my-task-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.my-task-card .card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--s-2); }
.my-task-card .card-type { font-size: 14px; font-weight: 500; letter-spacing: -0.015em; }
.my-task-card .card-ref { color: var(--text-muted); font-size: 12px; margin-bottom: var(--s-3); }
.my-task-card .card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-3); font-size: 11px; color: var(--text-muted); }
.card-sla-mini { height: 3px; background: var(--border); border-radius: var(--r-full); overflow: hidden; margin-top: var(--s-3); }
.card-sla-mini-fill { height: 100%; border-radius: var(--r-full); transition: width 600ms var(--t-slow); }
.card-sla-mini-fill.sla-green { background: var(--success); }
.card-sla-mini-fill.sla-amber { background: var(--warning); }
.card-sla-mini-fill.sla-red { background: var(--danger); }
.my-task-card.breached { border-color: var(--danger); }
.my-task-card.breached::before {
  content: ''; position: absolute; top: -0.5px; left: -0.5px; right: -0.5px;
  height: 2px; background: var(--danger);
  border-radius: var(--r-md) var(--r-md) 0 0;
}

/* ═══ TASK DETAIL PANEL ═══ */
.slide-panel {
  position: fixed;
  top: 0; right: -540px;
  width: 520px; max-width: 94vw; height: 100vh;
  background: var(--surface);
  border-left: 0.5px solid var(--border-2);
  box-shadow: var(--shadow-xl);
  z-index: 300;
  transition: right var(--t-slow);
  display: flex;
  flex-direction: column;
}
.slide-panel.open { right: 0; }
.panel-overlay {
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: 299;
  display: none;
  opacity: 0;
  transition: opacity var(--t-slow);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.panel-overlay.open { display: block; opacity: 1; }
.panel-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: var(--s-5) var(--s-6);
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.panel-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: var(--s-2);
}
.panel-body { flex: 1; overflow-y: auto; padding: var(--s-5) var(--s-6); }
.td-meta {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  padding-bottom: var(--s-5);
  border-bottom: 0.5px solid var(--border);
  margin-bottom: var(--s-5);
}
.td-meta-item { font-size: 12.5px; }
.td-meta-item label {
  display: block; font-family: var(--font-mono);
  color: var(--text-muted); font-size: 10px;
  margin-bottom: 3px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.td-meta-item a { color: var(--info); word-break: break-all; }
.td-meta-item a:hover { text-decoration: underline; }
.td-section { margin-bottom: var(--s-5); }
.td-section h4 {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: var(--s-3);
}

/* SLA Meter */
.sla-bar {
  height: 6px; background: var(--border);
  border-radius: var(--r-full); overflow: hidden;
  position: relative;
}
.sla-fill {
  height: 100%; border-radius: var(--r-full);
  transition: width 900ms var(--t-slow), background 300ms;
  width: 0;
}
.sla-green { background: var(--success); }
.sla-amber { background: var(--warning); }
.sla-red { background: var(--danger); }
.sla-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
  margin-top: var(--s-2);
  font-variant-numeric: tabular-nums;
}

/* Timeline */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute;
  left: 4px; top: 5px; bottom: 5px;
  width: 1px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: var(--s-3); padding-left: var(--s-2); font-size: 12px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute;
  left: -20px; top: 4px;
  width: 9px; height: 9px; border-radius: var(--r-full);
  background: var(--surface);
  border: 1.5px solid var(--accent);
}
.timeline-item .tl-time { color: var(--text-muted); font-size: 10.5px; }
.timeline-item .tl-text { margin-top: 2px; font-weight: 500; }
.timeline-item .tl-actor { color: var(--text-2); font-size: 11px; }

.rejection-card {
  background: var(--danger-soft);
  border: 0.5px solid var(--danger);
  border-radius: var(--r-sm);
  padding: var(--s-3);
  margin-bottom: var(--s-2);
  font-size: 12px;
}
.rejection-card .rej-remark { font-weight: 500; margin-bottom: 2px; }
.rejection-card .rej-meta { color: var(--text-muted); font-size: 10.5px; font-family: var(--font-mono); }

.td-actions {
  display: flex; gap: var(--s-2);
  flex-wrap: wrap;
  padding: var(--s-4) 0;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  margin-bottom: var(--s-5);
}

.note-item { padding: var(--s-3) 0; border-bottom: 0.5px solid var(--border); font-size: 12px; }
.note-item:last-child { border-bottom: none; }
.note-item .note-author { font-weight: 500; font-size: 11.5px; color: var(--text); }
.note-item .note-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); margin-left: var(--s-2); }
.note-input { display: flex; gap: var(--s-2); margin-top: var(--s-3); padding-top: var(--s-3); border-top: 0.5px solid var(--border); }
.note-input input { flex: 1; }

/* ═══ FORM ═══ */
.form-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-6);
  max-width: 760px;
  animation: sectionIn var(--t-slow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.form-group-full { grid-column: 1 / -1; }
.form-actions { margin-top: var(--s-6); display: flex; gap: var(--s-2); justify-content: flex-end; padding-top: var(--s-5); border-top: 0.5px solid var(--border); }
.drive-link-group { display: flex; gap: var(--s-2); }
.drive-link-group input { flex: 1; }

/* ═══ ATTACHMENTS (tabbed: drive link + file upload) ═══ */
.attach-block {
  border: 0.5px solid var(--border-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color var(--t-base), background var(--t-base);
}
.attach-block:focus-within { border-color: var(--border-strong); }

.attach-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: var(--bg-subtle);
  border-bottom: 0.5px solid var(--border);
}
.attach-tab {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--t-base), background var(--t-base), transform var(--t-fast);
}
.attach-tab:hover { color: var(--text-2); }
.attach-tab.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.attach-tab:active { transform: scale(0.98); }
.attach-tab .material-symbols-rounded { font-size: 16px; }
.attach-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600;
  color: var(--surface);
  background: var(--accent);
  border-radius: var(--r-full);
  margin-left: 2px;
}

/* Panes */
.attach-pane {
  display: none;
  padding: var(--s-4);
  animation: attachFade var(--t-slow);
}
.attach-pane.active { display: block; }
@keyframes attachFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Submit OR-choice toggle ── */
.sub-or-toggle {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--bg-subtle);
  border: 0.5px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 4px;
  margin-bottom: var(--s-4);
}
.sub-or-btn {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: 9px 14px;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color var(--t-base), background var(--t-base), box-shadow var(--t-base), transform var(--t-fast);
}
.sub-or-btn:hover { color: var(--text-2); }
.sub-or-btn.active {
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.sub-or-btn:active { transform: scale(0.98); }
.sub-or-btn .material-symbols-rounded { font-size: 16px; }
.sub-or-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 2px;
}
.sub-or-pane {
  animation: attachFade var(--t-slow);
}

/* Dropzone */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-2);
  padding: var(--s-8) var(--s-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--t-base), background var(--t-base), transform var(--t-base);
}
.dropzone:hover {
  border-color: var(--text-2);
  background: var(--surface-hover);
}
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.005);
}
.dropzone-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: var(--bg-subtle);
  color: var(--text-2);
  transition: transform var(--t-spring), background var(--t-base), color var(--t-base);
}
.dropzone:hover .dropzone-icon,
.dropzone.is-dragover .dropzone-icon {
  transform: translateY(-2px);
  background: var(--surface-hover);
  color: var(--text);
}
.dropzone-icon .material-symbols-rounded { font-size: 24px; }
.dropzone-text {
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--font-sans); font-size: 13.5px;
  color: var(--text);
}
.dropzone-text strong { font-weight: 500; }
.dropzone-text span { font-size: 12px; color: var(--text-muted); }
.dropzone-text em {
  font-style: normal; font-weight: 500;
  color: var(--text-2);
  border-bottom: 0.5px solid var(--border-strong);
}
.dropzone-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-top: var(--s-1);
}

/* File list (preview chips) */
.attach-list {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-top: var(--s-3);
}
.attach-list:empty { display: none; }
.attach-item {
  display: flex; align-items: center;
  gap: var(--s-3);
  padding: 8px 10px 8px 8px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
  animation: attachItemIn var(--t-spring);
}
.attach-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
@keyframes attachItemIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.attach-thumb {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.attach-thumb-file { color: var(--text-2); }
.attach-thumb-file .material-symbols-rounded { font-size: 20px; }
.attach-meta {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.attach-name {
  font-family: var(--font-sans);
  font-size: 12.5px; font-weight: 500;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attach-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 6px;
}
.attach-progress-bar {
  flex: 1; max-width: 80px;
  height: 3px;
  background: var(--border);
  border-radius: var(--r-full);
  overflow: hidden;
}
.attach-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-full);
  transition: width var(--t-base);
}
.attach-remove {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast);
}
.attach-remove:hover {
  color: var(--danger);
  background: var(--danger-soft);
}
.attach-remove .material-symbols-rounded { font-size: 16px; }
.attach-item.is-uploading .attach-remove { opacity: 0.4; pointer-events: none; }
.attach-item.is-done .attach-progress-bar { display: none; }

/* Task detail — attachment list */
.td-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-2);
}
.td-attach {
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--t-base), transform var(--t-fast), box-shadow var(--t-base);
}
.td-attach:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.td-attach-thumb {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
}
.td-attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.td-attach-thumb .material-symbols-rounded { font-size: 28px; }
.td-attach-name {
  font-size: 11.5px; font-weight: 500;
  color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.td-attach-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* ═══ SUBMIT MODAL — attachment block tweaks ═══ */
/* When the attach-block is inside a modal, the modal's default
   input margin-bottom rule would mis-space the tabbed layout. Reset it. */
.modal .attach-block input,
.modal .attach-block textarea,
.modal .attach-block select { margin-bottom: 0; }
.modal .attach-block .modal-field { margin-bottom: var(--s-3); }
.modal .attach-block .modal-field:last-child { margin-bottom: 0; }

/* Make the submit modal roomier so the dropzone has breathing space */
.modal:has(.attach-block) { width: 540px; }

/* Small descriptive paragraph above the tabs */
.modal-desc-sub {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0 0 var(--s-4) 0;
}

/* ═══ SETTINGS ═══ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--s-6);
}
.settings-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.settings-card .section-head {
  padding: var(--s-4) var(--s-5);
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 0;
}
.settings-card .section-body {
  padding: var(--s-3) var(--s-5) var(--s-4);
  border-top: none;
  max-height: none;
}
.settings-card .card-footer {
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  border-top: 0.5px solid var(--border);
  background: var(--bg-subtle);
}
.settings-card .card-footer input { flex: 1; min-width: 0; }

.setting-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 12.5px;
  gap: var(--s-3);
}
.setting-row:last-child { border-bottom: none; }
.setting-row label { font-weight: 500; color: var(--text-2); }
.setting-help { font-size: 11.5px; color: var(--text-muted); margin-bottom: var(--s-3); line-height: 1.5; }

/* Toggle */
.toggle { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-strong);
  border-radius: var(--r-full);
  transition: background var(--t-base);
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 14px; height: 14px; left: 3px; bottom: 3px;
  background: #fff;
  border-radius: var(--r-full);
  transition: transform var(--t-spring);
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); }

/* Team member row */
.team-member-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto auto;
  gap: var(--s-3);
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 12.5px;
}
.team-member-row:last-child { border-bottom: none; }
.team-member-row .member-avatar {
  width: 28px; height: 28px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
}
.team-member-row .member-name {
  font-weight: 500;
}
.team-member-row .member-sub {
  display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); margin-top: 1px; font-weight: 400;
}
.team-member-row .member-status {
  font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 6px; border-radius: var(--r-xs);
}
.status-active { background: var(--success-soft); color: var(--success); }
.status-inactive { background: var(--accent-soft); color: var(--text-muted); }

.holiday-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
}
.holiday-row:last-child { border-bottom: none; }
.holiday-date { font-family: var(--font-mono); color: var(--text-muted); margin-right: var(--s-2); }

/* Breach CC toggle row */
.cc-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: var(--s-3);
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 12.5px;
}
.cc-row:last-child { border-bottom: none; }
.cc-label { font-weight: 500; }
.cc-label small { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); font-weight: 400; margin-top: 1px; }

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed; inset: 0;
  background: var(--overlay);
  z-index: 400;
  display: flex; align-items: center; justify-content: center;
  animation: overlayIn var(--t-base);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  padding: var(--s-4);
}
.modal-overlay.closing { animation: overlayOut var(--t-fast) forwards; }
.modal {
  background: var(--surface);
  border: 0.5px solid var(--border-2);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  width: 460px; max-width: 100%;
  box-shadow: var(--shadow-xl);
  animation: modalIn var(--t-spring);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.closing .modal { animation: modalOut var(--t-fast) forwards; }
.modal h3 { font-size: 16px; font-weight: 500; margin-bottom: 6px; letter-spacing: -0.02em; }
.modal p { font-size: 12.5px; color: var(--text-2); margin-bottom: var(--s-4); line-height: 1.55; }
.modal textarea, .modal input, .modal select { width: 100%; margin-bottom: var(--s-3); }
.modal textarea:last-of-type, .modal input:last-of-type, .modal select:last-of-type { margin-bottom: var(--s-4); }
.modal-field { margin-bottom: var(--s-3); }
.modal-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.modal-field input, .modal-field select, .modal-field textarea { margin-bottom: 0; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: var(--s-2);
  padding-top: var(--s-4);
  border-top: 0.5px solid var(--border);
  margin-top: var(--s-5);
}

/* Date-range picker modal */
.modal-range-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.modal-range-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.modal-range-grid label > span {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.modal-range-grid input[type="date"] {
  margin-bottom: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.modal-range-presets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: 2px;
}
.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  line-height: 1.4;
  border-radius: var(--r-xs);
}
@media (max-width: 480px) {
  .modal-range-grid { grid-template-columns: 1fr; }
}

/* ═══ TOAST ═══ */
.toast-container {
  position: fixed; bottom: var(--s-5); right: var(--s-5);
  z-index: 500;
  display: flex; flex-direction: column-reverse; gap: var(--s-2);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 10px var(--s-4);
  background: var(--surface);
  border: 0.5px solid var(--border-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px; font-weight: 500;
  animation: toastIn var(--t-spring), toastOut var(--t-base) 3.5s forwards;
  min-width: 280px; max-width: 420px;
  pointer-events: auto;
}
.toast .material-symbols-rounded { font-size: 17px; }
.toast-success { border-left: 2px solid var(--success); border-radius: 2px var(--r-md) var(--r-md) 2px; }
.toast-success .material-symbols-rounded { color: var(--success); }
.toast-error { border-left: 2px solid var(--danger); border-radius: 2px var(--r-md) var(--r-md) 2px; }
.toast-error .material-symbols-rounded { color: var(--danger); }
.toast-info { border-left: 2px solid var(--info); border-radius: 2px var(--r-md) var(--r-md) 2px; }
.toast-info .material-symbols-rounded { color: var(--info); }

/* ═══ NOTIFICATIONS ═══ */
.notif-panel {
  position: fixed;
  top: calc(var(--header-h) + 4px); right: var(--s-4);
  width: 360px; max-height: 70vh;
  background: var(--surface);
  border: 0.5px solid var(--border-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
  z-index: 200;
  overflow-y: auto;
  animation: fadeInDown var(--t-base);
}
.notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--s-3) var(--s-4);
  border-bottom: 0.5px solid var(--border);
}
.notif-header h4 { font-size: 13px; font-weight: 500; }
.notif-list { padding: 0; }
.notif-item {
  display: flex; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 0.5px solid var(--border);
  font-size: 12px; cursor: pointer;
  transition: background var(--t-fast);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--hover); }
.notif-item .material-symbols-rounded { font-size: 16px; color: var(--text-muted); flex-shrink: 0; margin-top: 1px; }

/* ═══ EMPTY / FEED ═══ */
.empty-state { text-align: center; padding: var(--s-10) var(--s-6); color: var(--text-muted); }
.empty-state .material-symbols-rounded { font-size: 40px; margin-bottom: var(--s-2); opacity: .25; }
.empty-state p { font-size: 13px; font-weight: 500; }
.empty-state.small { padding: var(--s-6) var(--s-4); }
.empty-state.small .material-symbols-rounded { font-size: 24px; }
.empty-state.small p { font-size: 11.5px; }

.event-feed { max-height: 340px; overflow-y: auto; }
.event-item {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: var(--s-3);
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
  animation: rowIn var(--t-base) both;
}
.event-item:last-child { border-bottom: none; }
.event-dot { width: 6px; height: 6px; border-radius: var(--r-full); margin-top: 5px; background: var(--info); }
.event-item .event-time { color: var(--text-muted); font-size: 10.5px; white-space: nowrap; }
.event-actor { font-weight: 500; }
.event-body { color: var(--text-2); font-size: 11.5px; margin-top: 1px; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut { from { opacity: 1 } to { opacity: 0 } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: translateY(0) } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: translateY(0) } }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: translateY(0) } }
@keyframes sectionIn { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: translateY(0) } }
@keyframes kpiIn { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: translateY(0) } }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px) scale(.98) } to { opacity: 1; transform: translateY(0) scale(1) } }
@keyframes rowIn { from { opacity: 0; transform: translateY(4px) } to { opacity: 1; transform: translateY(0) } }
@keyframes pop-in { from { transform: scale(0); } 60% { transform: scale(1.2); } to { transform: scale(1); } }
@keyframes overlayIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes overlayOut { from { opacity: 1 } to { opacity: 0 } }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(8px) } to { opacity: 1; transform: scale(1) translateY(0) } }
@keyframes modalOut { from { opacity: 1; transform: scale(1) } to { opacity: 0; transform: scale(.98) } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) } to { opacity: 1; transform: translateX(0) } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0) } to { opacity: 0; transform: translateX(16px) } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1200px) {
  .kpi-strip { grid-template-columns: repeat(4, 1fr); }
  .kpi-card:nth-child(4) { border-right: none; }
  .kpi-card:nth-child(5),
  .kpi-card:nth-child(6),
  .kpi-card:nth-child(7) { border-top: 0.5px solid var(--border); }
  .dash-secondary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .dash-primary { grid-template-columns: 1fr; }
  .dash-secondary { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  #main-content { padding: var(--s-6) var(--s-5); }
  .search-bar { width: 160px; }
}
/* Hamburger menu button — hidden by default, shown on mobile */
.hdr-menu-btn { display: none; }
.hdr-nav-mobile-search { display: none; }

@media (max-width: 768px) {
  /* Show hamburger */
  .hdr-menu-btn { display: inline-flex; }

  /* Turn the nav into a dropdown panel anchored to the header */
  .hdr-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    height: auto;
    padding: var(--s-3);
    border-left: none;
    border-top: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
    background: var(--surface);
    box-shadow: 0 8px 16px -8px rgb(0 0 0 / 0.08);
    z-index: 99;
  }
  #app-header.nav-open .hdr-nav { display: flex; }

  .hdr-nav .nav-item {
    padding: 10px 12px;
    font-size: 14px;
    border-radius: var(--r-sm);
    justify-content: flex-start;
  }

  /* Mobile-only search lives inside the dropdown */
  .hdr-nav-mobile-search {
    display: flex; align-items: center; gap: var(--s-2);
    margin-top: var(--s-2);
    padding: 8px var(--s-3);
    background: var(--bg-subtle);
    border: 0.5px solid var(--border);
    border-radius: var(--r-md);
  }
  .hdr-nav-mobile-search .material-symbols-rounded {
    font-size: 16px; color: var(--text-muted);
  }
  .hdr-nav-mobile-search input {
    border: none; background: transparent; outline: none;
    width: 100%; font-size: 13px;
  }

  /* Desktop search stays hidden on mobile (mobile version is in the dropdown) */
  .search-bar { display: none; }

  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi-card:nth-child(n) { border-right: 0.5px solid var(--border); border-top: 0.5px solid var(--border); }
  .kpi-card:nth-child(even) { border-right: none; }
  .td-meta { grid-template-columns: 1fr; }
  .my-tasks-board { grid-template-columns: 1fr; }
}

/* ═══ v7.1 — CANCELLED status + secondary actions + correction events ═══ */
.status-CANCELLED { background: var(--accent-soft); color: var(--text-muted); }
.status-CANCELLED::before { opacity: .4; }

.td-actions { display: flex; flex-direction: column; gap: var(--s-3); align-items: stretch; }
.td-actions-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.td-actions-secondary {
  padding-top: var(--s-3);
  border-top: 0.5px dashed var(--border);
}

.timeline-item.tl-correction::before { background: var(--warning); border-color: var(--warning); }
.timeline-item.tl-edited::before { background: var(--purple); border-color: var(--purple); }
.timeline-item.tl-cancelled::before { background: var(--text-muted); border-color: var(--text-muted); }

/* ═══ v7.1.1 — Settings alignment fixes ═══ */

/* Settings cards should size to content, not stretch to row height */
.settings-grid { align-items: start; }

/* Team member row — give the edit button breathing room, handle long emails */
.team-member-row {
  grid-template-columns: 28px minmax(0, 1fr) auto auto 32px;
  gap: var(--s-3);
  padding-right: var(--s-1);
}
.team-member-row .member-name { min-width: 0; }
.team-member-row .member-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* CC rows — proper right padding so toggle isn't flush against card edge */
.cc-row {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding-right: var(--s-1);
}
.cc-row .cc-label { min-width: 0; }
.cc-row .cc-label small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}

/* Holidays empty state shouldn't balloon to fill the card */
#settings-holidays .empty-state {
  padding: var(--s-5) var(--s-4);
}
#settings-holidays .empty-state .material-symbols-rounded { display: none; }

/* Keep settings card bodies from growing taller than their content */
.settings-card .section-body { max-height: none; }

/* ═══ v7.2 — Settings two-column (B) layout ═══ */
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}
.settings-col-main { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.settings-col-side { display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }

.settings-card-compact .section-head {
  padding: var(--s-3) var(--s-5);
}
.settings-card-compact .section-body {
  padding: var(--s-3) var(--s-5) var(--s-4);
}
.settings-card-compact .setting-row {
  padding: 8px 0;
}

@media (max-width: 1100px) {
  .settings-grid { grid-template-columns: 1fr; }
}

/* ═══ v7.2.1 — Team row with delete button ═══ */
.team-member-row {
  grid-template-columns: 28px minmax(0, 1fr) auto auto 32px 32px;
}

/* ═══ v7.2.2 — SLA-none (cancelled) state ═══ */
.sla-fill.sla-none, .card-sla-mini-fill.sla-none { background: var(--border-2); }
.sla-inline-text { font-family: var(--font-mono); font-size: 11px; }

/* ═══ v7.3 — Allotted time editor ═══ */
.allotted-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: center;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}
.allotted-row:last-child { border-bottom: none; }
.allotted-name {
  font-size: 12.5px;
  font-weight: 500;
  min-width: 0;
}
.allotted-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}
.allotted-name small.allotted-override-tag {
  color: var(--warning);
}
.allotted-input-wrap {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.allotted-input-wrap input {
  width: 80px;
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.allotted-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.allotted-unit-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  border: 0.5px solid transparent;
  border-radius: var(--r-xs);
  padding: 3px 0;
  width: 32px;
  text-align: center;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.allotted-unit-btn:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--border);
}
.allotted-unit-btn:focus-visible {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* ═══ v7.4 — Notification system ═══ */
.notif-item {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--t-fast);
  align-items: flex-start;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--hover); }
.notif-item.notif-unread { background: var(--accent-soft); }
.notif-item.notif-unread:hover { background: var(--hover); }
.notif-dot-wrap { padding-top: 6px; flex-shrink: 0; }
.notif-dot {
  width: 6px; height: 6px;
  border-radius: var(--r-full);
  background: transparent;
}
.notif-dot.active { background: var(--info); }
.notif-content { min-width: 0; flex: 1; }
.notif-text { font-weight: 500; line-height: 1.4; }
.notif-subtext { color: var(--text-muted); font-size: 11px; margin-top: 2px; }
.notif-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }

/* ═══ v7.4.1 — Bandwidth table with visible headers ═══ */
.bw-table thead { display: table-header-group; }
.bw-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 10px;
  border-bottom: 0.5px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.bw-table td {
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.bw-table td:first-child { font-family: var(--font-sans); }

/* ═══════════════════════════════════════════════════════════════
   v7.5 — Sizing editor, content body, hints
═══════════════════════════════════════════════════════════════ */

/* Form hint under fields */
.form-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* Repeatable size-row editor */
.size-editor {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  background: var(--bg-subtle);
  border: 0.5px dashed var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3);
}
.size-rows { display: flex; flex-direction: column; gap: 6px; }
.size-row {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: var(--s-2);
  align-items: center;
}
.size-row input {
  font-family: var(--font-mono);
  font-size: 12px;
}
.size-row .size-label-input { font-family: var(--font-sans); }
.size-row .size-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms, color 120ms;
}
.size-row .size-remove:hover { background: var(--surface-hover); color: var(--danger); }
.size-row .size-remove .material-symbols-rounded { font-size: 18px; }
.size-add-btn {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
}
.size-empty {
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
  padding: 6px 2px;
}

/* Size chips in task detail meta */
.size-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.size-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  border: 0.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.size-chip .size-chip-label {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-muted);
  padding-left: 6px;
  margin-left: 4px;
  border-left: 0.5px solid var(--border);
}

/* Full-width meta item (Product line sometimes needs the full row) */
.td-meta-item-full { grid-column: 1 / -1; }

/* Task detail: Content body section — preserves line breaks, wraps long lines */
.td-content-body {
  background: var(--bg-subtle);
  border: 0.5px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-1);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 320px;
  overflow-y: auto;
}
.td-content-body:empty::before {
  content: "No content";
  color: var(--text-muted);
  font-style: italic;
}

/* Modal: textarea for content-like fields should be tall enough */
.modal .modal-field textarea[data-field="content"],
.modal .modal-field textarea[data-field="title"] {
  min-height: 140px;
  font-size: 13px;
  line-height: 1.5;
}

/* Modal: inline size editor rows (same look as form, tighter) */
.modal-size-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-subtle);
  border: 0.5px dashed var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-2);
}
.modal-size-editor .size-row { grid-template-columns: 130px 1fr auto; }
.modal-size-editor .size-add-btn { align-self: flex-start; }

/* Morning brief settings row */
.mb-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border);
}
.mb-row:last-child { border-bottom: none; }
.mb-row .bw-avatar { flex: 0 0 auto; }
.mb-row .mb-label { flex: 1; min-width: 0; }
.mb-row .mb-label strong { font-size: 12.5px; display: block; color: var(--text-1); }
.mb-row .mb-label small { color: var(--text-muted); font-size: 10.5px; font-family: var(--font-mono); }
.mb-row .toggle { flex: 0 0 auto; }

/* Breach CC per-member visibility row (already uses .cc-row) — slight tweak
   so two toggles side-by-side read well */
.cc-row .cc-toggle-group {
  display: flex; align-items: center; gap: var(--s-3);
}
.cc-row .cc-toggle-group .toggle-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 720px) {
  .size-row { grid-template-columns: 1fr 1fr auto; }
  .modal-size-editor .size-row { grid-template-columns: 1fr 1fr auto; }
}

/* ═══════════════════════════════════════════════════════════════
   v7.5.1 — Custom task types
═══════════════════════════════════════════════════════════════ */

/* "custom" tag under a user-added task type */
.allotted-name small.allotted-custom-tag {
  color: var(--info);
}

/* Remove button on custom allotted-time rows */
.allotted-input-wrap .allotted-remove-btn {
  margin-left: 4px;
  padding: 4px;
  border-radius: var(--r-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms, color 120ms;
}
.allotted-input-wrap .allotted-remove-btn:hover {
  background: var(--surface-hover);
  color: var(--danger);
}
.allotted-input-wrap .allotted-remove-btn .material-symbols-rounded {
  font-size: 16px;
}

/* Narrower "mins" input in the add-task-type footer so the name field
   gets the bulk of the width */
.settings-card .card-footer .allotted-group-select {
  flex: 0 0 120px;
  font-size: var(--text-sm);
  padding: 0 8px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.settings-card .card-footer .allotted-mins-input {
  flex: 0 0 80px;
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════════════════════
   ANALYTICS VIEW
   ══════════════════════════════════════════════════════════════ */

/* ─── Tabs ─── */
.analytics-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin: 0 0 var(--s-5) 0;
  overflow-x: auto;
}
.analytics-tab {
  background: transparent;
  border: none;
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-fast), border-color var(--t-fast);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.analytics-tab:hover {
  color: var(--text);
}
.analytics-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.analytics-body {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* ─── Summary strip (top KPI row on each tab) ─── */
.analytics-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.analytics-summary-card {
  background: var(--surface);
  padding: var(--s-4) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.asc-label {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.asc-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.asc-value.v-success { color: var(--success); }
.asc-value.v-danger { color: var(--danger); }
.asc-value.v-warn { color: var(--warning); }
.asc-value.v-info { color: var(--info); }

/* ─── Charts layout ─── */
.analytics-charts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  min-width: 0;
}
.analytics-charts > section {
  min-width: 0;
}
@media (min-width: 1100px) {
  .analytics-charts {
    grid-template-columns: repeat(2, 1fr);
  }
  .analytics-charts > section:first-child {
    grid-column: 1 / -1;
  }
}
.chart-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.chart-svg {
  display: block;
  width: 100%;
  max-width: 100%;
}

/* ─── Analytics table (extends mini-table feel but with headers) ─── */
.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.analytics-table thead th {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 10px var(--s-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.analytics-table thead th.num { text-align: right; }
.analytics-table tbody td {
  padding: 12px var(--s-4);
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
}
.analytics-table tbody td.num {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.analytics-table tbody td.num.v-success { color: var(--success); }
.analytics-table tbody td.num.v-danger { color: var(--danger); }
.analytics-table tbody td.num.v-warn { color: var(--warning); }
.analytics-table tbody td.num small {
  font-size: 11px;
  color: var(--text-muted);
}
.analytics-table tbody td.chev {
  width: 32px;
  text-align: center;
  color: var(--text-faint);
}
.analytics-table tbody tr {
  transition: background var(--t-fast);
  cursor: pointer;
}
.analytics-table tbody tr:hover {
  background: var(--hover);
}
.analytics-table tbody tr:hover td.chev {
  color: var(--accent);
}
.analytics-table tbody tr:last-child td {
  border-bottom: none;
}

/* ─── Member cell in table ─── */
.member-cell strong {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}
.member-cell small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
  text-transform: capitalize;
}

/* ─── Deep-dive header (member or type detail) ─── */
.deep-dive-header {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-2) 0 var(--s-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-1);
}
.dd-title-block h2 {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0;
}
.dd-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Speed badge (fastest / slowest) ─── */
.speed-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}
.speed-badge.v-success {
  background: var(--success-soft);
  color: var(--success);
}
.speed-badge.v-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ─── Rejections grid ─── */
.rejections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 1100px) {
  .rejections-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Rejection bar row (bar chart in list form) ─── */
.rej-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 40px;
  align-items: center;
  gap: var(--s-3);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.rej-bar-row:last-child {
  border-bottom: none;
}
.rej-bar-label {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rej-bar-track {
  height: 6px;
  background: var(--accent-soft);
  border-radius: var(--r-full);
  overflow: hidden;
}
.rej-bar-fill {
  height: 100%;
  background: var(--danger);
  border-radius: var(--r-full);
  transition: width var(--t-slow);
}
.rej-bar-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ─── Word cloud (rejection remarks) ─── */
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: var(--s-2) 0;
}
.word-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 12px;
  color: var(--text);
  line-height: 1.2;
}
.word-tag small {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ─── Rejection list item ─── */
.rejection-list-item {
  padding: var(--s-3) var(--s-4);
  border-left: 2px solid var(--warning);
  background: var(--warning-soft);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: var(--s-2);
}
.rejection-list-item:last-child {
  margin-bottom: 0;
}
.rli-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: 4px;
}
.rli-head strong {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
}
.rli-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.rli-body {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  font-style: italic;
}

/* ─── Range arrow (custom date picker) ─── */
#analytics-custom-range {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}

/* ─── View header analytics actions — wrap nicely on narrow screens ─── */
#view-analytics .view-actions {
  flex-wrap: wrap;
}

/* ══════════════════════════════════════════════════════════════
   OPERATIONS VIEW (WFM)
   ══════════════════════════════════════════════════════════════ */

/* ─── Live indicator ─── */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
}
.live-indicator .live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 var(--success);
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(123,178,117,0.6); }
  70%  { box-shadow: 0 0 0 6px rgba(123,178,117,0); }
  100% { box-shadow: 0 0 0 0 rgba(123,178,117,0); }
}

/* ─── Presence strip ─── */
.presence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.presence-chip {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 12px 8px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  transition: background var(--t-fast), border-color var(--t-fast);
  min-width: 0;
}
.presence-chip.presence-online {
  background: var(--success-soft);
  border-color: rgba(123,178,117,0.25);
}
.presence-chip.presence-idle {
  background: var(--warning-soft);
  border-color: rgba(217,155,78,0.25);
}
.presence-chip.presence-offline {
  opacity: 0.55;
}
.presence-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.presence-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--text-muted);
}
.presence-online .presence-dot { background: var(--success); }
.presence-idle .presence-dot   { background: var(--warning); }
.presence-offline .presence-dot{ background: var(--text-faint); }
.presence-meta {
  line-height: 1.2;
  min-width: 0;
}
.presence-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.presence-status {
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 1px;
}

/* ─── Capacity bars ─── */
.capacity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.capacity-row {
  display: grid;
  grid-template-columns: 32px minmax(140px, 1.2fr) minmax(0, 2.4fr) 110px;
  align-items: center;
  gap: var(--s-4);
  padding: 12px var(--s-3);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}
.capacity-row:hover { background: var(--hover); }
.capacity-row:last-child { border-bottom: none; }

.capacity-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.capacity-name strong {
  display: block;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
}
.capacity-name small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
  font-family: var(--font-mono);
}
.capacity-bar {
  display: flex;
  align-items: center;
  min-width: 0;
}
.capacity-bar-track {
  position: relative;
  width: 100%;
  height: 8px;
  background: var(--accent-soft);
  border-radius: var(--r-full);
  overflow: hidden;
}
.capacity-bar-fill {
  height: 100%;
  background: var(--info);
  border-radius: var(--r-full);
  transition: width var(--t-slow);
}
.capacity-bar-over {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  background: var(--danger);
  border-radius: 0 var(--r-full) var(--r-full) 0;
  transition: width var(--t-slow);
  opacity: 0.85;
}
.capacity-low    .capacity-bar-fill { background: var(--success); }
.capacity-medium .capacity-bar-fill { background: var(--info); }
.capacity-high   .capacity-bar-fill { background: var(--warning); }
.capacity-overloaded .capacity-bar-fill { background: var(--danger); }

.capacity-stat {
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  padding-right: var(--s-2);
  white-space: nowrap;
}
.capacity-stat strong {
  display: block;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.3;
}
.capacity-stat small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
}
.capacity-overloaded .capacity-stat strong { color: var(--danger); }
.capacity-high       .capacity-stat strong { color: var(--warning); }

/* ─── Kanban board ─── */
.kanban-board {
  display: flex;
  gap: var(--s-3);
  overflow-x: auto;
  padding-bottom: var(--s-3);
  margin-left: calc(var(--s-4) * -1);
  padding-left: var(--s-4);
  margin-right: calc(var(--s-4) * -1);
  padding-right: var(--s-4);
}
.kanban-col {
  flex: 0 0 260px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  max-height: 560px;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.kanban-col.drag-over {
  background: var(--accent-soft);
  border-color: var(--accent);
  border-style: dashed;
}
.kanban-col-pool {
  background: var(--bg-subtle);
  border-style: dashed;
}
.kanban-col-head {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.kanban-col-title {
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.kanban-col-title strong {
  display: block;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
}
.kanban-col-title small {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
  font-family: var(--font-mono);
}
.kanban-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.kc-icon {
  font-size: 22px !important;
  color: var(--text-muted);
}
.kanban-col-body {
  padding: var(--s-2);
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.kanban-empty {
  text-align: center;
  font-size: 11px;
  color: var(--text-faint);
  padding: var(--s-5) var(--s-2);
  font-style: italic;
}

/* ─── Kanban card ─── */
.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px;
  cursor: grab;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
  user-select: none;
}
.kanban-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
}
.kanban-card:active {
  cursor: grabbing;
}
.kanban-card.dragging {
  opacity: 0.5;
  transform: rotate(-1deg);
}
.kanban-card.card-warn {
  border-left: 3px solid var(--warning);
}
.kanban-card.card-breach {
  border-left: 3px solid var(--danger);
  background: var(--danger-soft);
}
.kc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: 6px;
}
.kc-type {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
}
.kc-prio {
  font-size: 9.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--text-2);
}
.kc-prio.prio-high   { background: var(--danger-soft); color: var(--danger); }
.kc-prio.prio-medium { background: var(--warning-soft); color: var(--warning); }
.kc-prio.prio-low    { background: var(--success-soft); color: var(--success); }
.kc-content {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 6px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}
.kc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.kc-status {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.kc-sla {
  font-variant-numeric: tabular-nums;
}
.card-breach .kc-sla { color: var(--danger); font-weight: 600; }
.card-warn .kc-sla   { color: var(--warning); }

/* ══════════════════════════════════════════════════════════════
   ANALYTICS → REPORTS TAB
   ══════════════════════════════════════════════════════════════ */

.reports-intro {
  padding: var(--s-3) 0;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.reports-intro p {
  margin: 0;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-4);
}

.report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.report-card:hover {
  border-color: var(--border-2);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.report-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}
.report-icon .material-symbols-rounded {
  font-size: 22px;
}

.report-card h3 {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}

.report-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.report-card p strong {
  color: var(--text-2);
  font-weight: 500;
}

.report-card .btn {
  align-self: flex-start;
  margin-top: var(--s-1);
}

/* ══════════════════════════════════════════════════════════════
   BREAK / ACTIVE SYSTEM — toggle, management, indicators
   ══════════════════════════════════════════════════════════════ */

/* ─── Header toggle (top-right, designer self-serve) ─── */
.break-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px 0 10px;
  margin-right: var(--s-1);
  background: var(--surface-2);
  border: 0.5px solid var(--border-2);
  border-radius: var(--r-full);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background var(--t-base),
    border-color var(--t-base),
    color var(--t-base),
    transform var(--t-fast),
    box-shadow var(--t-base);
}
.break-toggle-btn::before {
  /* subtle gradient shimmer swept on hover */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform var(--t-slow);
  pointer-events: none;
}
.break-toggle-btn:hover::before { transform: translateX(120%); }
.break-toggle-btn:active { transform: scale(.96); }

.break-toggle-btn .break-toggle-icon {
  font-size: 15px;
  transition: transform var(--t-spring), color var(--t-base);
}
.break-toggle-btn .break-toggle-label {
  line-height: 1;
  white-space: nowrap;
  transition: color var(--t-base);
}

/* Active state — calm success tint */
.break-toggle-btn.is-active {
  background: var(--success-soft);
  border-color: rgba(123,178,117,0.25);
  color: var(--success);
}
[data-theme="light"] .break-toggle-btn.is-active {
  border-color: rgba(63,122,58,0.22);
}
.break-toggle-btn.is-active:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

/* On-break state — warm amber with gentle pulse */
.break-toggle-btn.is-on-break {
  background: var(--warning-soft);
  border-color: rgba(217,155,78,0.30);
  color: var(--warning);
}
[data-theme="light"] .break-toggle-btn.is-on-break {
  border-color: rgba(176,106,30,0.28);
}
.break-toggle-btn.is-on-break .break-toggle-icon {
  animation: break-icon-pulse 2.4s cubic-bezier(.4,0,.2,1) infinite;
}
.break-toggle-btn.is-on-break:hover {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
  box-shadow: 0 4px 14px rgba(217,155,78,0.28);
}
[data-theme="light"] .break-toggle-btn.is-on-break:hover {
  box-shadow: 0 4px 14px rgba(176,106,30,0.24);
}
.break-toggle-btn.is-on-break:hover .break-toggle-icon {
  animation: none;
  transform: scale(1.08);
}

@keyframes break-icon-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.12); opacity: 0.75; }
}

/* Hide label on narrower screens, keep icon */
@media (max-width: 900px) {
  .break-toggle-btn { padding: 0 10px; }
  .break-toggle-btn .break-toggle-label { display: none; }
}

/* ─── Presence: add "on_break" state (separate from online/idle/offline) ─── */
.presence-chip.presence-on_break {
  background: var(--warning-soft);
  border-color: rgba(217,155,78,0.30);
}
.presence-on_break .presence-dot {
  background: var(--warning);
  animation: presence-dot-breathe 2s ease-in-out infinite;
}
@keyframes presence-dot-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,155,78,0.50); }
  50%      { box-shadow: 0 0 0 4px rgba(217,155,78,0); }
}

/* ─── Break Management grid (Operations view, for managers/admins) ─── */
.break-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-3);
}

.break-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 14px 14px 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition:
    background var(--t-base),
    border-color var(--t-base),
    transform var(--t-fast),
    box-shadow var(--t-base);
  animation: break-card-in var(--t-spring) both;
}
.break-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-2);
}

@keyframes break-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.break-card-left {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-width: 0;
  flex: 1 1 auto;
}

.break-card-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  position: relative;
  transition: background var(--t-base);
}
.break-card-avatar.on-break {
  background: var(--warning);
  color: #fff;
}
.break-card-avatar.on-break::after {
  /* gentle pulsing ring while on break */
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--warning);
  opacity: 0;
  animation: avatar-ring 2.2s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes avatar-ring {
  0%   { transform: scale(0.94); opacity: 0.6; }
  100% { transform: scale(1.28); opacity: 0; }
}

.break-card-info { min-width: 0; line-height: 1.25; }
.break-card-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.break-card-status {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
  transition: color var(--t-base);
}

.break-card.break-card-on-break {
  background: var(--warning-soft);
  border-color: rgba(217,155,78,0.28);
}
.break-card.break-card-on-break .break-card-status {
  color: var(--warning);
}
[data-theme="light"] .break-card.break-card-on-break {
  border-color: rgba(176,106,30,0.22);
}

/* Break action buttons */
.btn.btn-break-start,
.btn.btn-break-end {
  border-radius: var(--r-full);
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 500;
  flex-shrink: 0;
  transition: all var(--t-base);
}

.btn.btn-break-start {
  background: var(--surface);
  border: 0.5px solid var(--border-2);
  color: var(--text-2);
}
.btn.btn-break-start:hover {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(217,155,78,0.25);
}
[data-theme="light"] .btn.btn-break-start:hover {
  box-shadow: 0 3px 10px rgba(176,106,30,0.22);
}

.btn.btn-break-end {
  background: var(--success);
  border: 0.5px solid var(--success);
  color: #fff;
}
.btn.btn-break-end:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(123,178,117,0.30);
}
[data-theme="light"] .btn.btn-break-end:hover {
  box-shadow: 0 3px 10px rgba(63,122,58,0.22);
}
.btn.btn-break-start .material-symbols-rounded,
.btn.btn-break-end .material-symbols-rounded {
  font-size: 14px;
}

/* ─── Kanban column: on-break indicator ─── */
.kanban-col.kanban-col-on-break {
  background: var(--warning-soft);
  border-color: rgba(217,155,78,0.22);
}
.kanban-col.kanban-col-on-break .kanban-avatar {
  background: var(--warning);
  color: #fff;
}

.kanban-break-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--warning);
  background: rgba(217,155,78,0.14);
  border: 0.5px solid rgba(217,155,78,0.28);
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  vertical-align: middle;
  line-height: 1;
  animation: badge-breathe 2.4s ease-in-out infinite;
}
[data-theme="light"] .kanban-break-badge {
  color: var(--warning);
  background: rgba(176,106,30,0.10);
  border-color: rgba(176,106,30,0.25);
}
@keyframes badge-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}


/* ════════════════════════════════════════════════════════════
   GOOGLE DRIVE UPLOAD PROGRESS UI
   ════════════════════════════════════════════════════════════ */

.drive-upload-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.drive-upload-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
}

.drive-upload-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
}

.drive-upload-name {
  font-size: 12px;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  grid-column: 1;
  grid-row: 1;
}

.drive-upload-status {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  grid-column: 2;
  grid-row: 1 / 3;
  text-align: right;
  white-space: nowrap;
  min-width: 46px;
}
.drive-upload-status.done  { color: var(--success); }
.drive-upload-status.error { color: var(--danger);  }

.drive-upload-bar-wrap {
  height: 4px;
  background: var(--surface-3);
  border-radius: var(--r-full);
  overflow: hidden;
  grid-column: 1;
  grid-row: 2;
}

.drive-upload-bar {
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-full);
  transition: width 0.15s ease;
}
.drive-upload-bar.done  { background: var(--success); }
.drive-upload-bar.error { background: var(--danger);  }

/* Inline panel at top of task detail during submit upload */
.td-upload-progress {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 0 12px 0;
  border-radius: var(--r-md) var(--r-md) 0 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
