  :root {
    --navy: #1a1a1a; --navy-light: #2a2a2a; --navy-mid: #333333; --blue: #e8a600; --blue-light: #f0b000;
    --accent: #e8a600; --accent-light: #f5bc1a; --green: #10b981; --green-bg: rgba(16,185,129,0.1); --blue-bg: rgba(232,166,0,0.08);
    --red: #ef4444; --red-bg: rgba(239,68,68,0.08); --orange: #f97316; --orange-bg: rgba(249,115,22,0.1);
    --gray: #6b7280; --gray-bg: #f3f4f6; --border: #e2e8f0; --white: #ffffff;
    --text: #1a1a1a; --text-light: #555555; --text-muted: #6b7280;
    --surface: #ffffff; --surface-hover: #fafafa; --surface-alt: #f5f5f5;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05); --shadow: 0 1px 3px rgba(0,0,0,0.08),0 1px 2px rgba(0,0,0,0.04); --shadow-md: 0 4px 12px rgba(0,0,0,0.08); --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 10px; --radius-sm: 6px; --radius-lg: 14px;
    --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
    --tnt-gold: #e8a600; --tnt-dark-red: #c98f00; --tnt-black: #1a1a1a;
  }
  [data-theme="dark"] {
    --navy: #0d0d0d; --navy-light: #1a1a1a; --navy-mid: #262626; --blue-light: #f5bc1a;
    --accent: #f0b000; --green: #34d399; --green-bg: rgba(52,211,153,0.12); --blue-bg: rgba(232,166,0,0.15);
    --red: #f87171; --red-bg: rgba(248,113,113,0.1); --orange: #fb923c; --orange-bg: rgba(251,146,60,0.1);
    --gray: #9ca3af; --gray-bg: #1e1e1e; --border: #333333; --white: #111111;
    --text: #e2e8f0; --text-light: #94a3b8; --text-muted: #64748b;
    --surface: #1e1e1e; --surface-hover: #2a2a2a; --surface-alt: #151515;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3); --shadow: 0 1px 3px rgba(0,0,0,0.4); --shadow-md: 0 4px 12px rgba(0,0,0,0.4); --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body { font-family: 'Inter',-apple-system,'Segoe UI',system-ui,sans-serif; background: var(--surface-alt); color: var(--text); min-height: 100vh; transition: background var(--transition), color var(--transition); -webkit-font-smoothing: antialiased; }
  .header { background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%); color: white; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; height: 58px; box-shadow: 0 2px 16px rgba(0,0,0,0.35); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); border-bottom: 3px solid var(--tnt-gold); }
  .header-left { display: flex; align-items: center; gap: 16px; }
  .logo { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; color: white; display: flex; align-items: center; gap: 8px; }
  .logo-icon { width: 36px; height: 28px; background: linear-gradient(135deg, #e8a600, #c98f00); border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; color: white; letter-spacing: 0.5px; }
  .header-right { display: flex; align-items: center; gap: 8px; }
  .last-updated { font-size: 11px; color: var(--text-muted); }
  .btn { padding: 7px 14px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-size: 12px; font-weight: 600; transition: all var(--transition); letter-spacing: 0.01em; display: inline-flex; align-items: center; gap: 5px; }
  .btn-outline { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); }
  .btn-outline:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); color: white; transform: translateY(-1px); }
  .btn-primary { background: linear-gradient(135deg, #e8a600, #c98f00); color: white; box-shadow: 0 2px 8px rgba(232,166,0,0.3); }
  .btn-primary:hover { background: linear-gradient(135deg, #f0b000, #d49800); box-shadow: 0 4px 12px rgba(232,166,0,0.4); transform: translateY(-1px); }
  .btn-danger { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }
  .btn-danger:hover { background: var(--red); color: white; }
  .period-badge-btn { background: linear-gradient(135deg, #e8a600, #f5bc1a); color: #1a1a1a; font-size: 10px; font-weight: 800; padding: 4px 12px; border-radius: 20px; letter-spacing: 0.5px; border: none; cursor: pointer; transition: all var(--transition); box-shadow: 0 2px 8px rgba(232,166,0,0.3); }
  .period-badge-btn:hover { transform: scale(1.05); box-shadow: 0 4px 16px rgba(232,166,0,0.4); }
  .today-badge { background: linear-gradient(135deg, var(--green), #059669); color: white; font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 20px; letter-spacing: 0.3px; margin-left: 4px; }
  .countdown-badge { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 20px; letter-spacing: 0.3px; margin-left: 4px; border: 1px solid rgba(255,255,255,0.15); display: inline-flex; align-items: center; gap: 5px; }
  .countdown-badge.urgent { background: linear-gradient(135deg, #dc2626, #b91c1c); color: white; border-color: transparent; animation: countdownPulse 2s ease-in-out infinite; }
  .countdown-badge.warning { background: linear-gradient(135deg, #ea580c, #c2410c); color: white; border-color: transparent; }
  .countdown-badge.closed { background: linear-gradient(135deg, var(--green), #059669); color: white; border-color: transparent; }
  .countdown-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
  @keyframes countdownPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.5); } 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } }
  @media (max-width: 768px) { .countdown-badge { display: none; } }
  .theme-toggle { background: none; border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.8); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 16px; transition: all var(--transition); display: flex; align-items: center; justify-content: center; }
  .theme-toggle:hover { background: rgba(255,255,255,0.1); }
  .icon-btn { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); color: rgba(255,255,255,0.85); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; transition: all var(--transition); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .icon-btn svg { width: 16px; height: 16px; }
  .icon-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); color: white; transform: translateY(-1px); }
  .btn-icon { width: 14px; height: 14px; }
  .menu-wrap { position: relative; }
  .menu-drop { position: absolute; top: calc(100% + 8px); right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 200; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all 0.18s cubic-bezier(0.4,0,0.2,1); }
  .menu-drop.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13px; font-weight: 500; color: var(--text); cursor: pointer; border-radius: var(--radius-sm); background: none; border: none; width: 100%; text-align: left; transition: background var(--transition); }
  .menu-item:hover { background: var(--surface-alt); }
  .menu-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-light); }
  .menu-item.danger { color: var(--red); }
  .menu-item.danger svg { color: var(--red); }
  .menu-item.danger:hover { background: var(--red-bg); }
  .menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }
  .menu-section { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); padding: 8px 12px 4px; }
  .user-chip { display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 20px; cursor: pointer; transition: all var(--transition); }
  .user-chip:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); }
  .user-chip .avatar { width: 24px; height: 24px; font-size: 10px; }
  .user-chip-name { font-size: 12px; color: white; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-badge { font-size: 9px; background: var(--tnt-gold); color: var(--tnt-black); padding: 1px 6px; border-radius: 8px; font-weight: 800; letter-spacing: 0.3px; }
  .last-updated-wrap { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: rgba(255,255,255,0.55); padding: 5px 10px; background: none; border: 1px solid transparent; border-radius: 14px; cursor: pointer; font-family: inherit; transition: all var(--transition); }
  .last-updated-wrap:hover { color: white; background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15); }
  .last-updated-wrap:hover svg { color: var(--tnt-gold); }
  .last-updated-wrap svg { width: 12px; height: 12px; transition: color var(--transition); }
  .last-updated-wrap.syncing { color: var(--tnt-gold); pointer-events: none; }
  .last-updated-wrap.syncing svg { animation: spin 0.8s linear infinite; color: var(--tnt-gold); }
  @keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
  /* Skeleton loader */
  .skeleton-wrap { padding: 30px 28px; }
  .skeleton { background: linear-gradient(90deg, var(--border) 0%, rgba(0,0,0,0.03) 50%, var(--border) 100%); background-size: 200% 100%; border-radius: 8px; animation: skeletonPulse 1.4s ease-in-out infinite; }
  [data-theme="dark"] .skeleton { background: linear-gradient(90deg, var(--border) 0%, rgba(255,255,255,0.04) 50%, var(--border) 100%); background-size: 200% 100%; }
  @keyframes skeletonPulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
  .skeleton-day { height: 56px; margin-bottom: 14px; }
  /* Mobile header */
  @media (max-width: 900px) { .header-desktop-only { display: none !important; } }
  @media (min-width: 901px) { .header-mobile-toggle { display: none !important; } }
  /* On mobile the floating-action button (.fab) covers Add Task, so
     drop the header copy to give the period/today badges room. */
  @media (max-width: 768px) { .header-add-task { display: none !important; } }

  /* STATS DASHBOARD */
  .sticky-bundle { position: sticky; top: 58px; z-index: 99; background: var(--surface-alt); backdrop-filter: blur(12px); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
  [data-theme="dark"] .sticky-bundle { box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
  .stats-bar { background: var(--surface-alt); padding: 16px 28px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: stretch; transition: background var(--transition); border-bottom: 1px solid var(--border); }
  .stats-progress-hero { background: var(--surface); border-radius: var(--radius-lg); padding: 20px 24px; display: flex; align-items: center; gap: 20px; box-shadow: var(--shadow); border: 1px solid var(--border); min-width: 260px; }
  .progress-ring { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
  .progress-ring svg { transform: rotate(-90deg); width: 72px; height: 72px; }
  .progress-ring-bg { fill: none; stroke: var(--border); stroke-width: 6; }
  .progress-ring-fill { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.8s cubic-bezier(0.4,0,0.2,1), stroke 0.3s; }
  .progress-ring-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 900; color: var(--text); letter-spacing: -0.5px; }
  .progress-hero-info { display: flex; flex-direction: column; gap: 6px; }
  .progress-hero-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
  .progress-hero-bar { width: 120px; height: 6px; background: var(--border); border-radius: 6px; overflow: hidden; }
  .progress-hero-fill { height: 100%; border-radius: 6px; transition: width 0.8s cubic-bezier(0.4,0,0.2,1), background 0.3s; }
  .progress-hero-sub { font-size: 12px; color: var(--text-light); font-weight: 500; }
  .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; }
  .stat-card { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); transition: all 0.25s cubic-bezier(0.4,0,0.2,1); }
  .stat-card[data-chip] { cursor: pointer; }
  .stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 3px 3px 0 0; transition: opacity 0.3s; }
  .stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
  .stat-card[data-chip]:active { transform: translateY(0); }
  .stat-card[data-chip].active { box-shadow: 0 0 0 2px var(--tnt-gold), var(--shadow-md); transform: translateY(-2px); }
  .stat-card.stat-overdue[data-chip].active { box-shadow: 0 0 0 2px #ef4444, var(--shadow-md); }
  .stat-card.stat-completed[data-chip].active { box-shadow: 0 0 0 2px #10b981, var(--shadow-md); }
  .stat-card.stat-inprocess[data-chip].active { box-shadow: 0 0 0 2px var(--tnt-gold), var(--shadow-md); }
  .stat-card.stat-total[data-chip].active { box-shadow: 0 0 0 2px #64748b, var(--shadow-md); }
  .stat-card-top { display: flex; align-items: center; justify-content: space-between; }
  .stat-card-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .stat-card-icon svg { width: 18px; height: 18px; }
  .stat-card-content { display: flex; flex-direction: column; gap: 1px; }
  .stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
  .stat-num { font-size: 26px; font-weight: 900; line-height: 1.1; letter-spacing: -1px; transition: color var(--transition); }
  .stat-card.stat-total::before { background: linear-gradient(90deg, #64748b, #94a3b8); }
  .stat-card.stat-total { background: linear-gradient(135deg, rgba(100,116,139,0.06), rgba(100,116,139,0.02)); }
  .stat-card.stat-total .stat-card-icon { background: rgba(100,116,139,0.12); }
  .stat-card.stat-total .stat-card-icon svg { color: #64748b; stroke: #64748b; }
  .stat-card.stat-completed::before { background: linear-gradient(90deg, #10b981, #34d399); }
  .stat-card.stat-completed { background: linear-gradient(135deg, rgba(16,185,129,0.07), rgba(16,185,129,0.02)); }
  .stat-card.stat-completed .stat-card-icon { background: rgba(16,185,129,0.12); }
  .stat-card.stat-completed .stat-card-icon svg { color: #10b981; stroke: #10b981; }
  .stat-card.stat-inprocess::before { background: linear-gradient(90deg, #e8a600, #f5bc1a); }
  .stat-card.stat-inprocess { background: linear-gradient(135deg, rgba(232,166,0,0.07), rgba(232,166,0,0.02)); }
  .stat-card.stat-inprocess .stat-card-icon { background: rgba(232,166,0,0.12); }
  .stat-card.stat-inprocess .stat-card-icon svg { color: var(--tnt-gold); stroke: var(--tnt-gold); }
  .stat-card.stat-overdue::before { background: linear-gradient(90deg, #ef4444, #f87171); }
  .stat-card.stat-overdue { background: linear-gradient(135deg, rgba(239,68,68,0.06), rgba(239,68,68,0.02)); }
  .stat-card.stat-overdue .stat-card-icon { background: rgba(239,68,68,0.12); }
  .stat-card.stat-overdue .stat-card-icon svg { color: #ef4444; stroke: #ef4444; }
  .stat-card.stat-overdue.has-overdue { border-color: rgba(239,68,68,0.3); background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(239,68,68,0.04)); }
  @keyframes overdueGlow { 0%,100% { box-shadow: var(--shadow-sm), 0 0 0 0 rgba(239,68,68,0.15); } 50% { box-shadow: var(--shadow-sm), 0 0 12px 2px rgba(239,68,68,0.12); } }
  .stat-card.stat-overdue.has-overdue { animation: overdueGlow 3s ease-in-out infinite; }
  .stat-card.stat-hours::before { background: linear-gradient(90deg, #e8a600, #f5bc1a); }
  .stat-card.stat-hours { background: linear-gradient(135deg, rgba(232,166,0,0.07), rgba(232,166,0,0.02)); }
  .stat-card.stat-hours .stat-card-icon { background: rgba(232,166,0,0.12); }
  .stat-card.stat-hours .stat-card-icon svg { color: var(--tnt-gold); stroke: var(--tnt-gold); }
  .stat-card.stat-hrsleft::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
  .stat-card.stat-hrsleft { background: linear-gradient(135deg, rgba(99,102,241,0.07), rgba(99,102,241,0.02)); }
  .stat-card.stat-hrsleft .stat-card-icon { background: rgba(99,102,241,0.12); }
  .stat-card.stat-hrsleft .stat-card-icon svg { color: #6366f1; stroke: #6366f1; }
  [data-theme="dark"] .stat-card.stat-total { background: linear-gradient(135deg, rgba(100,116,139,0.1), rgba(100,116,139,0.04)); }
  [data-theme="dark"] .stat-card.stat-completed { background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(16,185,129,0.04)); }
  [data-theme="dark"] .stat-card.stat-inprocess { background: linear-gradient(135deg, rgba(232,166,0,0.1), rgba(232,166,0,0.04)); }
  [data-theme="dark"] .stat-card.stat-overdue { background: linear-gradient(135deg, rgba(239,68,68,0.1), rgba(239,68,68,0.04)); }
  [data-theme="dark"] .stat-card.stat-hours { background: linear-gradient(135deg, rgba(232,166,0,0.1), rgba(232,166,0,0.04)); }
  [data-theme="dark"] .stat-card.stat-hrsleft { background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(99,102,241,0.04)); }
  [data-theme="dark"] .stat-card { border-color: var(--border); }
  [data-theme="dark"] .stat-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.35); }
  [data-theme="dark"] .stats-progress-hero { background: var(--surface); border-color: var(--border); }
  .stat-divider { display: none; }
  .progress-section { flex: 1; min-width: 160px; }
  .progress-label { font-size: 12px; color: var(--text-light); margin-bottom: 6px; display: flex; justify-content: space-between; font-weight: 500; }
  .progress-ring-wrap { display: contents; }
  .progress-bar-wrap { background: var(--border); border-radius: 10px; height: 8px; overflow: hidden; }
  .progress-bar-fill { height: 100%; border-radius: 10px; transition: width 0.6s cubic-bezier(0.4,0,0.2,1); position: relative; }
  .progress-bar-fill.red { background: linear-gradient(90deg, #ef4444, #f87171); }
  .progress-bar-fill.yellow { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
  .progress-bar-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
  .progress-bar-fill::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); animation: shimmer 2s infinite; }
  @keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
  @keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); } 50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); } }
  .today-pulse { animation: pulse 2s ease-in-out infinite; }
  @media (max-width: 900px) { .stats-bar { grid-template-columns: 1fr; padding: 14px 16px; } .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } .stat-card { padding: 12px 14px; } .stat-num { font-size: 22px; } .stats-progress-hero { padding: 14px 18px; gap: 14px; } }
  @media (max-width: 600px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } .stat-card { padding: 10px 12px; gap: 6px; } .stat-num { font-size: 20px; } .stat-card-icon { width: 28px; height: 28px; } .stat-card-icon svg { width: 14px; height: 14px; } }
  /* TRENDS */
  .stat-trend { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; display: inline-flex; align-items: center; gap: 2px; line-height: 1; margin-top: 4px; opacity: 0; transition: opacity 0.4s; }
  .stat-trend.show { opacity: 1; }
  .stat-trend.up-good { background: rgba(16,185,129,0.12); color: #059669; }
  .stat-trend.down-good { background: rgba(16,185,129,0.12); color: #059669; }
  .stat-trend.up-bad { background: rgba(239,68,68,0.12); color: #dc2626; }
  .stat-trend.down-bad { background: rgba(239,68,68,0.12); color: #dc2626; }
  .stat-trend.neutral { background: rgba(100,116,139,0.1); color: #64748b; }
  [data-theme="dark"] .stat-trend.up-good, [data-theme="dark"] .stat-trend.down-good { background: rgba(52,211,153,0.15); color: #34d399; }
  [data-theme="dark"] .stat-trend.up-bad, [data-theme="dark"] .stat-trend.down-bad { background: rgba(248,113,113,0.15); color: #f87171; }
  /* TOAST */
  .toast-stack { position: fixed; top: 80px; right: 24px; z-index: 400; display: flex; flex-direction: column; gap: 10px; pointer-events: none; max-width: 360px; }
  .toast { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--tnt-gold); padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: 13px; color: var(--text); display: flex; align-items: flex-start; gap: 10px; min-width: 240px; opacity: 0; transform: translateX(100%); transition: all 0.3s cubic-bezier(0.4,0,0.2,1); pointer-events: auto; }
  .toast.show { opacity: 1; transform: translateX(0); }
  .toast.success { border-left-color: #10b981; }
  .toast.error { border-left-color: #ef4444; }
  .toast.info { border-left-color: #6366f1; }
  .toast-icon { font-size: 16px; line-height: 1; margin-top: 1px; }
  .toast.success .toast-icon { color: #10b981; }
  .toast.error .toast-icon { color: #ef4444; }
  .toast.info .toast-icon { color: #6366f1; }
  .toast-content { flex: 1; line-height: 1.4; }
  .toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; padding: 0 0 0 6px; line-height: 1; }
  .toast-close:hover { color: var(--text); }
  @media (max-width: 600px) { .toast-stack { top: auto; bottom: 80px; right: 12px; left: 12px; max-width: none; } .toast { min-width: 0; } }
  /* DAY COMPLETE BANNER */
  .day-complete-banner { position: fixed; top: 80px; left: 50%; transform: translateX(-50%) translateY(-30px); background: linear-gradient(135deg, #10b981, #059669); color: white; padding: 14px 28px; border-radius: 50px; box-shadow: 0 8px 32px rgba(16,185,129,0.4); font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; z-index: 350; opacity: 0; transition: all 0.5s cubic-bezier(0.4,0,0.2,1); pointer-events: none; }
  .day-complete-banner.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .day-complete-banner .icon { font-size: 18px; }
  /* MOBILE — table */
  @media (max-width: 768px) { .header-right .last-updated, .header-right .signout-btn, .header-right .login-user-bar { display: none !important; } .header { padding: 0 14px; } th.hide-mobile, td.hide-mobile { display: none !important; } }

  /* CONTROLS */
  .controls { background: var(--surface); border-top: 3px solid var(--tnt-gold); border-bottom: 1px solid var(--border); padding: 10px 28px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; transition: background var(--transition); }
  .search-wrap { position: relative; flex: 1; min-width: 180px; }
  .search-wrap input { width: 100%; padding: 8px 12px 8px 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; outline: none; background: var(--surface); color: var(--text); transition: all var(--transition); }
  .search-wrap input:focus { border-color: #e8a600; box-shadow: 0 0 0 3px rgba(232,166,0,0.1); }
  .search-wrap input::placeholder { color: var(--text-muted); }
  .search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
  .search-shortcut { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--text-muted); background: var(--surface-alt); padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); font-family: monospace; pointer-events: none; }
  .filter-select { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); outline: none; cursor: pointer; color: var(--text); transition: all var(--transition); }
  .filter-select:hover { border-color: var(--blue-light); }
  .toggle-group { display: flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
  .toggle-btn { padding: 7px 14px; font-size: 11px; font-weight: 600; border: none; cursor: pointer; background: var(--surface); color: var(--text-muted); transition: all var(--transition); }
  .toggle-btn:hover { color: var(--text); background: var(--surface-hover); }
  .toggle-btn.active { background: #e8a600; color: white; }
  .qtr-toggle { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-light); cursor: pointer; white-space: nowrap; }

  .main { padding: 20px 28px; max-width: 1440px; margin: 0 auto; }

  /* DAY SECTIONS */
  .day-section { margin-bottom: 14px; background: var(--surface); backdrop-filter: blur(8px); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); transition: all var(--transition); }
  .day-section:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
  .day-section.is-today { border: 2px solid var(--green); box-shadow: 0 0 0 3px rgba(16,185,129,0.12), var(--shadow); }
  .day-section.is-overdue { border-color: var(--red); }
  .day-header { padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%); color: white; transition: background var(--transition); border-left: 3px solid var(--tnt-gold); }
  .day-header:hover { background: linear-gradient(135deg, #252525 0%, #383838 100%); }
  .day-section.is-today .day-header { background: linear-gradient(135deg, #065f46, #047857); }
  .day-section.is-overdue .day-header { background: linear-gradient(135deg, #7f1d1d, #991b1b); }
  .day-title { display: flex; align-items: center; gap: 10px; }
  .day-num { font-size: 13px; font-weight: 700; letter-spacing: -0.2px; }
  .day-date { font-size: 11px; color: rgba(255,255,255,0.5); }
  .day-stats { display: flex; align-items: center; gap: 12px; font-size: 11px; }
  .day-prog-bar { width: 80px; height: 4px; background: rgba(255,255,255,0.15); border-radius: 4px; overflow: hidden; }
  .day-prog-fill { height: 100%; border-radius: 4px; transition: width 0.4s cubic-bezier(0.4,0,0.2,1); }
  .day-prog-fill.red { background: linear-gradient(90deg, #ef4444, #f87171); }
  .day-prog-fill.yellow { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
  .day-prog-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }
  .day-chevron { font-size: 12px; transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); opacity: 0.6; }
  .day-chevron.open { transform: rotate(180deg); }
  .day-tag { font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 4px; letter-spacing: 0.3px; }
  .day-tag-today { background: rgba(52,211,153,0.2); color: #6ee7b7; }
  .day-tag-overdue { background: rgba(248,113,113,0.2); color: #fca5a5; }

  /* TABLE */
  .task-table { width: 100%; border-collapse: collapse; }
  .task-table thead tr { background: var(--surface-alt); border-bottom: 1px solid var(--border); }
  .task-table th { padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); white-space: nowrap; }
  .task-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; transition: background var(--transition); }
  .task-table tbody tr:last-child td { border-bottom: none; }
  .task-table tbody tr { transition: background var(--transition); }
  .task-table tbody tr:hover { background: var(--surface-hover); }
  .task-table tbody tr.overdue-row { background: var(--red-bg); }
  .task-name { font-weight: 500; color: var(--text); max-width: 320px; line-height: 1.4; }
  .task-name small { display: block; font-size: 10px; color: var(--text-muted); margin-top: 2px; font-weight: 400; }
  .task-name mark { background: rgba(251,191,36,0.3); color: inherit; border-radius: 2px; padding: 0 1px; }
  .overdue-tag { display: inline-block; background: var(--red); color: white; font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; letter-spacing: 0.3px; }
  .dep-tag { display: inline-block; background: var(--orange-bg); color: var(--orange); font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 4px; vertical-align: middle; cursor: help; }

  .multi-filter { position: relative; display: inline-block; }
  .multi-filter-btn { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); cursor: pointer; color: var(--text); min-width: 100px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; transition: all var(--transition); }
  .multi-filter-btn:hover { border-color: var(--blue-light); }
  .multi-filter-btn.has-selection { border-color: var(--blue-light); background: var(--blue-bg); color: var(--blue-light); font-weight: 600; }
  .multi-filter-drop { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 160px; max-height: 260px; overflow: hidden; margin-top: 4px; animation: dropIn 0.15s ease; }
  .multi-filter-drop.open { display: flex; }
  .multi-filter-drop label { display: flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; transition: background var(--transition); }
  .multi-filter-drop label:hover { background: var(--surface-hover); }
  .multi-filter-drop .mf-list { flex: 1 1 auto; overflow-y: auto; padding: 4px 0; }
  .multi-filter-drop .mf-clear { flex-shrink: 0; padding: 8px 12px; font-size: 11px; color: var(--blue-light); cursor: pointer; border-bottom: 1px solid var(--border); font-weight: 600; }
  .multi-filter-drop .mf-clear:hover { background: var(--blue-bg); }
  .multi-filter-drop .mf-done { flex-shrink: 0; padding: 8px 12px; font-size: 12px; color: var(--blue-light); background: var(--surface); cursor: pointer; border-top: 1px solid var(--border); font-weight: 700; text-align: center; }
  .multi-filter-drop .mf-done:hover { background: var(--blue-bg); }
  @keyframes dropIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

  .col-settings-btn { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); cursor: pointer; color: var(--text-light); transition: all var(--transition); }
  .col-settings-btn:hover { border-color: var(--blue-light); color: var(--blue-light); }
  .col-modal-list { display: flex; flex-direction: column; gap: 5px; }
  .col-modal-item { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface-alt); border-radius: var(--radius-sm); font-size: 12px; border: 1px solid transparent; transition: all var(--transition); }
  .col-modal-item:hover { border-color: var(--border); }
  .col-modal-item .col-drag { cursor: grab; color: var(--text-muted); font-size: 14px; }
  .col-modal-item .col-name { flex: 1; font-weight: 500; }
  .col-modal-item .col-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 14px; padding: 0 4px; opacity: 0.6; transition: opacity var(--transition); }
  .col-modal-item .col-remove:hover { opacity: 1; }
  .col-add-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
  .col-add-row input, .col-add-row select { padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-family: inherit; outline: none; background: var(--surface); color: var(--text); }
  .col-add-row input:focus, .col-add-row select:focus { border-color: var(--blue-light); }
  .custom-cell-input { width: 100%; padding: 3px 6px; border: 1px solid transparent; border-radius: 4px; font-size: 12px; background: transparent; font-family: inherit; outline: none; color: var(--text); transition: all var(--transition); }
  .custom-cell-input:hover { border-color: var(--border); background: var(--surface-hover); }
  .custom-cell-input:focus { border-color: var(--blue-light); background: var(--surface); }

  .multi-day-wrap { position: relative; display: inline-block; }
  .multi-day-btn { padding: 4px 8px; border: 1px solid var(--border); border-radius: 5px; font-size: 11px; background: var(--surface); cursor: pointer; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .multi-day-btn:hover { border-color: var(--blue-light); }
  .multi-day-drop { display: none; position: absolute; top: 100%; left: 0; z-index: 50; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); padding: 6px 0; min-width: 150px; max-height: 220px; overflow-y: auto; }
  .multi-day-drop.open { display: block; }
  .multi-day-drop label { display: flex; align-items: center; gap: 6px; padding: 4px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; }
  .multi-day-drop label:hover { background: var(--surface-hover); }

  .owner-chip { display: inline-flex; align-items: center; gap: 6px; }
  .avatar { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; color: white; flex-shrink: 0; box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
  .owner-inline-select { padding: 3px 4px; border: 1px solid transparent; border-radius: 4px; font-size: 12px; background: transparent; cursor: pointer; font-family: inherit; color: var(--text); max-width: 140px; appearance: none; -webkit-appearance: none; transition: all var(--transition); }
  .owner-inline-select:hover { border-color: var(--border); background: var(--surface-hover); }
  .owner-inline-select:focus { border-color: var(--blue-light); background: var(--surface); outline: none; appearance: auto; -webkit-appearance: menulist; }

  .badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
  .badge-qtr { background: rgba(245,158,11,0.12); color: var(--accent); }
  .badge-late { background: var(--red-bg); color: var(--red); font-size: 9px; }
  .badge-ontime { background: var(--green-bg); color: var(--green); font-size: 9px; }

  .status-select { padding: 5px 10px; border-radius: 20px; border: 2px solid transparent; font-size: 11px; font-weight: 600; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none; text-align: center; transition: all var(--transition); min-width: 110px; }
  .status-select.completed { background: var(--green-bg); color: var(--green); border-color: rgba(16,185,129,0.3); }
  .status-select.in-process { background: var(--blue-bg); color: var(--blue-light); border-color: rgba(59,130,246,0.3); }
  .status-select.not-started { background: var(--gray-bg); color: var(--gray); border-color: var(--border); }

  /* Read-only pill mirror of .status-select — used on rows the current
     user can't write (S10 RLS: not the owner / not admin). */
  .status-pill { display: inline-block; padding: 5px 10px; border-radius: 20px; border: 2px solid transparent; font-size: 11px; font-weight: 600; cursor: default; text-align: center; min-width: 110px; }
  .status-pill.completed { background: var(--green-bg); color: var(--green); border-color: rgba(16,185,129,0.3); }
  .status-pill.in-process { background: var(--blue-bg); color: var(--blue-light); border-color: rgba(59,130,246,0.3); }
  .status-pill.not-started { background: var(--gray-bg); color: var(--gray); border-color: var(--border); }

  .dur-input { width: 48px; padding: 3px 4px; border: 1px solid transparent; border-radius: 4px; font-size: 12px; color: var(--text-light); background: transparent; text-align: center; cursor: pointer; font-family: inherit; transition: all var(--transition); }
  .dur-readonly { display: inline-block; width: 48px; padding: 3px 4px; font-size: 12px; color: var(--text-light); text-align: center; cursor: default; }
  .dur-input:hover { border-color: var(--border); background: var(--surface-hover); }
  .dur-input:focus { border-color: var(--blue-light); background: var(--surface); color: var(--text); outline: none; }

  .comment-btn { background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 8px; font-size: 10px; cursor: pointer; color: var(--text-muted); transition: all var(--transition); white-space: nowrap; }
  .comment-btn:hover { border-color: var(--blue-light); color: var(--blue-light); transform: scale(1.05); }
  .comment-btn.has-comment { border-color: var(--accent); color: var(--accent); background: rgba(245,158,11,0.08); }

  /* MODAL */
  .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center; }
  .modal-overlay.open { display: flex; animation: fadeIn 0.15s ease; }
  .modal { background: var(--surface); border-radius: var(--radius-lg); width: 580px; max-width: 95vw; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); border: 1px solid var(--border); animation: modalIn 0.2s ease; }
  .modal-header { padding: 20px 24px 16px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; }
  .modal-title { font-size: 15px; font-weight: 700; color: var(--text); max-width: 440px; line-height: 1.4; }
  .modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); line-height: 1; transition: color var(--transition); }
  .modal-close:hover { color: var(--text); }
  .modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
  .modal-field { display: flex; flex-direction: column; gap: 5px; }
  .modal-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
  .modal-value { font-size: 13px; color: var(--text); }
  .modal-textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; resize: vertical; min-height: 70px; outline: none; background: var(--surface); color: var(--text); transition: border var(--transition); }
  .modal-textarea:focus { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
  .modal-footer { padding: 14px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
  .modal-dur-input { width: 80px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; outline: none; text-align: center; background: var(--surface); color: var(--text); }
  .modal-dur-input:focus { border-color: var(--blue-light); }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  @keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }

  /* PERIOD MODAL */
  .period-modal { width: 420px; }
  .period-input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; outline: none; background: var(--surface); color: var(--text); transition: border var(--transition); }
  .period-input:focus { border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
  .period-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
  .roll-section { background: var(--surface-alt); border-radius: var(--radius); padding: 14px; margin-top: 8px; }
  .roll-btn { width: 100%; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; transition: all var(--transition); color: var(--text); }
  .roll-btn:hover { border-color: var(--blue-light); color: var(--blue-light); background: var(--blue-bg); transform: translateY(-1px); }

  /* OWNER VIEW */
  .owner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
  .owner-card { background: var(--surface); backdrop-filter: blur(8px); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow); transition: all var(--transition); }
  .owner-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
  .owner-card-header { padding: 14px 18px; display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #1a1a1a, #333333); color: white; border-left: 3px solid var(--tnt-gold); }
  .owner-card-name { font-weight: 700; font-size: 14px; }
  .owner-card-stats { font-size: 11px; color: rgba(255,255,255,0.5); }
  .owner-task-list { padding: 8px 0; }
  .owner-task-item { padding: 7px 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); font-size: 12px; transition: background var(--transition); }
  .owner-task-item:last-child { border-bottom: none; }
  .owner-task-item:hover { background: var(--surface-hover); }
  .owner-task-name { color: var(--text); flex: 1; padding-right: 8px; }
  .owner-task-day { color: var(--text-muted); font-size: 10px; white-space: nowrap; }
  .owner-prog-wrap { padding: 12px 18px 14px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
  .owner-prog-bar { flex: 1; height: 4px; background: var(--border); border-radius: 4px; overflow: hidden; }
  .owner-prog-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--green), #34d399); transition: width 0.4s; }
  .owner-prog-label { font-size: 10px; color: var(--text-muted); white-space: nowrap; font-weight: 600; }

  /* BATCH SELECT */
  /* Batch bar sits inside .sticky-bundle (after .controls) and
     inherits the bundle's sticky behavior — its own position:sticky
     was fighting the bundle's z-index and rendering behind the
     controls. Margins match .controls' horizontal padding (28px) so
     it visually aligns with the rest of the bundle. */
  .batch-bar { background:#1a1a1a;color:#fff;padding:8px 16px;display:flex;align-items:center;justify-content:space-between;border-radius:var(--radius);margin:0 28px 10px;animation:dropIn 0.2s ease; }
  .batch-bar button { background:rgba(255,255,255,0.15);color:#fff;border:none;padding:5px 12px;border-radius:var(--radius-sm);cursor:pointer;font-size:11px;font-weight:600;transition:background 0.15s; }
  .batch-bar button:hover { background:rgba(255,255,255,0.25); }
  .batch-check { width:14px;height:14px;cursor:pointer;accent-color:var(--blue); }

  /* METRICS PANEL */
  .metrics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
  .metric-card { background: var(--surface); backdrop-filter: blur(8px); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 20px 16px; text-align: center; box-shadow: var(--shadow); transition: all var(--transition); position: relative; overflow: hidden; }
  .metric-card::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background:linear-gradient(90deg, #e8a600, #f0b000, #c98f00); opacity:0; transition:opacity var(--transition); }
  .metric-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
  .metric-card:hover::before { opacity:1; }
  .metric-num { font-size: 28px; font-weight: 800; letter-spacing: -1px; }
  .metric-icon { font-size: 20px; margin-bottom: 4px; }
  .donut-wrap { display:flex; align-items:center; justify-content:center; gap:20px; margin-bottom:18px; padding:20px; background:var(--surface); backdrop-filter:blur(8px); border-radius:var(--radius-lg); border:1px solid var(--border); box-shadow:var(--shadow); }
  .donut-chart { position:relative; width:140px; height:140px; flex-shrink:0; }
  .donut-chart svg { transform:rotate(-90deg); }
  .donut-center { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; }
  .donut-center-num { font-size:24px; font-weight:800; color:var(--text); letter-spacing:-1px; }
  .donut-center-label { font-size:9px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px; font-weight:600; }
  .donut-legend { display:flex; flex-direction:column; gap:10px; }
  .donut-legend-item { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:500; }
  .donut-legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
  .metric-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-top: 4px; font-weight: 600; }

  /* ACTIVITY LOG */
  .log-panel { position: fixed; right: -420px; top: 58px; width: 400px; height: calc(100vh - 58px); background: var(--surface); border-left: 1px solid var(--border); box-shadow: -8px 0 30px rgba(0,0,0,0.12); z-index: 150; transition: right 0.3s cubic-bezier(0.4,0,0.2,1); overflow-y: auto; }
  .log-panel.open { right: 0; }
  .log-header { padding: 18px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); z-index: 1; }
  .log-header h3 { font-size: 15px; font-weight: 700; }
  .log-entry { padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 12px; transition: background var(--transition); }
  .log-entry:hover { background: var(--surface-hover); }
  .log-ts { font-size: 10px; color: var(--text-muted); }
  .log-action { margin-top: 3px; color: var(--text); }
  .log-empty { text-align: center; padding: 40px; color: var(--text-muted); font-size: 13px; }

  .empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
  .empty-state .icon { font-size: 48px; margin-bottom: 14px; opacity: 0.6; line-height: 1; }
  .empty-state .title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
  .empty-state .sub { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
  .empty-state .empty-action { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; cursor: pointer; background: var(--tnt-gold); color: var(--tnt-black); border: none; transition: all var(--transition); }
  .empty-state .empty-action:hover { background: #f0b000; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(232,166,0,0.3); }
  .empty-state.celebrate .icon { animation: bounce 0.8s cubic-bezier(0.34,1.56,0.64,1); }
  @keyframes bounce { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }

  .undo-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: white; padding: 14px 22px; border-radius: var(--radius); font-size: 13px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-lg); z-index: 300; opacity: 0; transition: all 0.3s cubic-bezier(0.4,0,0.2,1); pointer-events: none; border: 1px solid rgba(255,255,255,0.1); }
  .undo-toast.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
  .undo-toast .undo-btn { background: var(--blue-light); color: white; border: none; padding: 6px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; transition: all var(--transition); }
  .undo-toast .undo-btn:hover { background: #2563eb; transform: scale(1.05); }
  .undo-toast .undo-dismiss { background: none; border: none; color: rgba(255,255,255,0.4); cursor: pointer; font-size: 16px; padding: 0 4px; transition: color var(--transition); }
  .undo-toast .undo-dismiss:hover { color: white; }

  /* KEYBOARD SHORTCUT HINTS */
  .kbd { display: inline-block; font-size: 10px; font-family: monospace; padding: 1px 5px; border-radius: 3px; background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-muted); margin-left: 6px; }

  /* COMPLETED TASK STRIKETHROUGH */
  .task-table tbody tr.task-done .task-name { text-decoration: line-through; text-decoration-color: var(--text-muted); opacity: 0.6; }
  .task-table tbody tr.task-done td { opacity: 0.7; }

  /* ANIMATED COUNTERS */
  @keyframes countUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
  .stat-num.animated { animation: countUp 0.4s ease-out; }

  /* CONFETTI */
  .confetti-container { position:fixed; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:9999; overflow:hidden; }
  .confetti-piece { position:absolute; width:8px; height:8px; top:-10px; opacity:0; animation:confettiFall 2.5s ease-out forwards; }
  @keyframes confettiFall { 0% { opacity:1; transform:translateY(0) rotate(0deg) scale(1); } 80% { opacity:1; } 100% { opacity:0; transform:translateY(100vh) rotate(720deg) scale(0.3); } }

  /* FLOATING ACTION BUTTON */
  .fab { position:fixed; bottom:28px; right:28px; width:52px; height:52px; border-radius:50%; background:linear-gradient(135deg, #e8a600, #c98f00); color:white; border:none; font-size:24px; font-weight:300; cursor:pointer; box-shadow:0 4px 16px rgba(232,166,0,0.4); z-index:150; display:flex; align-items:center; justify-content:center; transition:all 0.25s cubic-bezier(0.4,0,0.2,1); }
  .fab:hover { transform:scale(1.1) rotate(90deg); box-shadow:0 6px 24px rgba(59,130,246,0.5); }
  .fab:active { transform:scale(0.95); }

  /* LOGIN SCREEN */
  .login-screen { display:flex; align-items:center; justify-content:center; min-height:100vh; position:relative; overflow:hidden; background:#0a0a0a; }
  .login-slideshow { position:absolute; inset:0; z-index:0; }
  .login-slide { position:absolute; inset:0; background-size:cover; background-position:center center; opacity:0; transition:opacity 1.5s ease-in-out; }
  .login-slide.active { opacity:1; }
  .login-slide::after { content:''; position:absolute; inset:0; background:linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.7) 100%); }
  .login-card { background:rgba(255,255,255,0.95); backdrop-filter:blur(20px); border-radius:var(--radius-lg); padding:40px 36px; width:380px; max-width:90vw; box-shadow:0 20px 60px rgba(0,0,0,0.5); border:1px solid rgba(255,255,255,0.2); text-align:center; animation:modalIn 0.3s ease; position:relative; z-index:1; }
  [data-theme="dark"] .login-card { background:rgba(30,30,30,0.92); border-color:rgba(255,255,255,0.08); }
  .login-logo { width:64px; height:48px; background:linear-gradient(135deg, #e8a600, #c98f00); border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; font-weight:900; color:white; margin:0 auto 16px; letter-spacing:1px; }
  .login-title { font-size:20px; font-weight:800; color:var(--text); margin-bottom:4px; }
  .login-subtitle { font-size:13px; color:var(--text-muted); margin-bottom:24px; }
  .login-input { width:100%; padding:12px 14px; border:1px solid var(--border); border-radius:var(--radius-sm); font-size:14px; font-family:inherit; outline:none; background:var(--surface); color:var(--text); margin-bottom:10px; transition:border var(--transition); box-sizing:border-box; }
  .login-input:focus { border-color:#e8a600; box-shadow:0 0 0 3px rgba(232,166,0,0.1); }
  .login-btn { width:100%; padding:12px; border:none; border-radius:var(--radius-sm); font-size:14px; font-weight:700; cursor:pointer; transition:all var(--transition); margin-top:6px; }
  .login-btn-primary { background:linear-gradient(135deg, #e8a600, #c98f00); color:white; box-shadow:0 2px 10px rgba(232,166,0,0.3); }
  .login-btn-primary:hover { transform:translateY(-1px); box-shadow:0 4px 16px rgba(232,166,0,0.4); }
  .login-toggle { font-size:13px; color:var(--text-muted); margin-top:16px; }
  .login-toggle a, .login-toggle .link-btn { color:#e8a600; cursor:pointer; font-weight:600; text-decoration:none; background:none; border:0; padding:0; font:inherit; font-size:inherit; }
  .login-toggle a:hover, .login-toggle .link-btn:hover { text-decoration:underline; }
  .login-toggle .link-btn:focus-visible { outline:2px solid var(--tnt-gold); outline-offset:2px; border-radius:2px; }
  .login-error { background:var(--red-bg); color:var(--red); font-size:12px; padding:8px 12px; border-radius:var(--radius-sm); margin-top:10px; display:none; }
  .login-success { background:rgba(16,185,129,0.1); color:#10b981; font-size:12px; padding:8px 12px; border-radius:var(--radius-sm); margin-top:10px; }
  .login-user-bar { display:flex; align-items:center; gap:8px; }
  .login-user-name { font-size:11px; color:rgba(255,255,255,0.7); max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .signout-btn { background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.15); color:rgba(255,255,255,0.7); padding:4px 10px; border-radius:var(--radius-sm); font-size:10px; cursor:pointer; font-weight:600; transition:all var(--transition); }
  .signout-btn:hover { background:rgba(255,255,255,0.12); color:white; }

  /* Inline-edit inputs (master tasks, owner email, user display name).
     Previously toggled via onfocus/onblur inline JS — now pure CSS so
     we can drop unsafe-inline from CSP. */
  .inline-edit { border: 1px solid transparent; background: transparent; transition: background var(--transition), border-color var(--transition); }
  .inline-edit:focus { background: var(--surface); border-color: var(--border); outline: none; }

  /* Per-row delete button — was onmouseover="opacity=1" onmouseout="opacity=0.35" inline. */
  .row-delete-btn { opacity: 0.35; transition: opacity 0.15s; }
  .row-delete-btn:hover { opacity: 1; }

  /* ─── style-src refactor utilities ───
     Replace common repeated inline style="..." attributes with named
     classes so the markup can be CSP-clean. */
  .is-hidden { display: none !important; }
  .btn-skin-neutral { background: var(--gray-bg); color: var(--text); }
  .btn-chip-template { font-size: 10px; padding: 3px 8px; background: var(--surface-alt); }
  .form-control-block { width: 100%; padding: 8px 12px; }
  .admin-badge-pill { font-size: 10px; background: var(--tnt-gold); color: var(--tnt-black); padding: 2px 8px; border-radius: 10px; font-weight: 700; margin-left: 6px; }
  .modal-hint { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
  .modal-w-420 { width: 420px; max-width: 96vw; }
  .modal-w-460 { width: 460px; }
  .modal-w-480 { width: 480px; }
  .modal-w-500 { width: 500px; }
  .modal-w-520 { width: 520px; }
  .modal-w-620 { width: 620px; max-width: 96vw; }
  .modal-w-880 { width: 880px; max-width: 96vw; }
  .flex-1 { flex: 1; }
  .ml-auto { margin-left: auto; }
  .gap-8 { display: flex; gap: 8px; }
  .grid-2col-14 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .tnt-gold-text { color: var(--tnt-gold); }

  @media print { .controls, .header .btn, .comment-btn, .day-chevron, .log-panel, .undo-toast, .theme-toggle, .fab, .login-screen { display: none !important; } .day-section { break-inside: avoid; } body { background: white; } }
  @media (max-width: 768px) { .controls { flex-direction: column; align-items: stretch; } .controls > * { width: 100%; } .header { padding: 0 14px; } .main { padding: 14px; } th.hide-mobile, td.hide-mobile { display: none; } .search-shortcut { display: none; } .fab { bottom:16px; right:16px; width:46px; height:46px; font-size:20px; } .stats-bar { position: relative; top: auto; } .header-right .btn .label-text { display: none; } }

  /* ─── BS RECON MODULE (additive — close-tracker styles untouched) ─── */
  .module-tabs { display: flex; gap: 0; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .module-tab { padding: 10px 18px; font-size: 12px; font-weight: 700; border: none; background: none; color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; letter-spacing: 0.2px; transition: all var(--transition); }
  .module-tab:hover { color: var(--text); }
  .module-tab.active { color: var(--text); border-bottom-color: var(--tnt-gold); }
  /* Prepared = the recon-only intermediate state between In Progress and Reviewed */
  .status-select.prepared, .status-pill.prepared { background: rgba(99,102,241,0.12); color: #6366f1; border-color: rgba(99,102,241,0.3); }
  [data-theme="dark"] .status-select.prepared, [data-theme="dark"] .status-pill.prepared { color: #818cf8; }
  .recon-pri { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 10px; letter-spacing: 0.3px; }
  .recon-pri.p1 { background: var(--red-bg); color: var(--red); }
  .recon-pri.p2 { background: var(--orange-bg); color: var(--orange); }
  .recon-pri.p3 { background: var(--gray-bg); color: var(--gray); }
  /* While the BS Recons tab is active (body.module-recon, toggled by
     switchModule), the close-calendar header badges are hidden —
     "Close complete" / "TODAY: Day X" describe the close-task
     calendar and are misleading next to open recs. !important defeats
     the tracker's own re-shows (updateTodayBadge sets inline display).
     #reconDueBadge takes their place; hidden on mobile like its peer. */
  body.module-recon #countdownBadge, body.module-recon #todayBadge { display: none !important; }
  @media (max-width: 768px) { #reconDueBadge { display: none !important; } }
  /* Recon KPI cards mirror the tracker's [data-chip] behaviors, scoped
     to [data-recon-chip] so the tracker's updateStats() global
     querySelectorAll('.stat-card[data-chip]') never touches them. */
  .stat-card[data-recon-chip] { cursor: pointer; }
  .stat-card[data-recon-chip]:active { transform: translateY(0); }
  .stat-card[data-recon-chip].active { box-shadow: 0 0 0 2px var(--tnt-gold), var(--shadow-md); transform: translateY(-2px); }
  .stat-card.stat-overdue[data-recon-chip].active { box-shadow: 0 0 0 2px #ef4444, var(--shadow-md); }
  .stat-card.stat-completed[data-recon-chip].active { box-shadow: 0 0 0 2px #10b981, var(--shadow-md); }
  .stat-card.stat-inprocess[data-recon-chip].active { box-shadow: 0 0 0 2px var(--tnt-gold), var(--shadow-md); }
  .stat-card.stat-total[data-recon-chip].active { box-shadow: 0 0 0 2px #64748b, var(--shadow-md); }
  /* Full variant styling for the three recon-only KPI cards so they
     match the cloned ones (colored top bar, tinted card, icon chip).
     Prepared = indigo (the hrsleft palette), Not Started = neutral
     gray, Exceptions = orange. */
  .stat-card[data-recon-chip="Prepared"]::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
  .stat-card[data-recon-chip="Prepared"] { background: linear-gradient(135deg, rgba(99,102,241,0.07), rgba(99,102,241,0.02)); }
  .stat-card[data-recon-chip="Prepared"] .stat-card-icon { background: rgba(99,102,241,0.12); }
  .stat-card[data-recon-chip="Prepared"] .stat-card-icon svg { color: #6366f1; stroke: #6366f1; }
  .stat-card[data-recon-chip="Prepared"].active { box-shadow: 0 0 0 2px #6366f1, var(--shadow-md); }
  .stat-card[data-recon-chip="Not Started"]::before { background: linear-gradient(90deg, #6b7280, #9ca3af); }
  .stat-card[data-recon-chip="Not Started"] { background: linear-gradient(135deg, rgba(107,114,128,0.06), rgba(107,114,128,0.02)); }
  .stat-card[data-recon-chip="Not Started"] .stat-card-icon { background: rgba(107,114,128,0.12); }
  .stat-card[data-recon-chip="Not Started"] .stat-card-icon svg { color: var(--gray); stroke: var(--gray); }
  .stat-card[data-recon-chip="Not Started"].active { box-shadow: 0 0 0 2px #6b7280, var(--shadow-md); }
  .stat-card[data-recon-chip="exception"]::before { background: linear-gradient(90deg, #f97316, #fb923c); }
  .stat-card[data-recon-chip="exception"] { background: linear-gradient(135deg, rgba(249,115,22,0.07), rgba(249,115,22,0.02)); }
  .stat-card[data-recon-chip="exception"] .stat-card-icon { background: rgba(249,115,22,0.12); }
  .stat-card[data-recon-chip="exception"] .stat-card-icon svg { color: var(--orange); stroke: var(--orange); }
  .stat-card[data-recon-chip="exception"].active { box-shadow: 0 0 0 2px #f97316, var(--shadow-md); }
  [data-theme="dark"] .stat-card[data-recon-chip="Prepared"] { background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(99,102,241,0.04)); }
  [data-theme="dark"] .stat-card[data-recon-chip="Not Started"] { background: linear-gradient(135deg, rgba(107,114,128,0.1), rgba(107,114,128,0.04)); }
  [data-theme="dark"] .stat-card[data-recon-chip="exception"] { background: linear-gradient(135deg, rgba(249,115,22,0.1), rgba(249,115,22,0.04)); }
  /* Horizontal scroller so the full table (incl. sign-off evidence)
     stays reachable on phones — .day-section is overflow:hidden and
     would otherwise clip the columns. */
  .recon-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Exception flag: orange sibling of .overdue-tag, plus a subtle
     pulse on the KPI card while any flags are open. */
  .exception-tag { display: inline-block; background: var(--orange); color: white; font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; letter-spacing: 0.3px; }
  .stat-card#reconStatExceptionCard.has-exceptions { border-color: rgba(249,115,22,0.35); background: linear-gradient(135deg, rgba(249,115,22,0.12), rgba(249,115,22,0.05)); }
  .recon-signoff { font-size: 10px; color: var(--text-light); line-height: 1.5; white-space: nowrap; }
  .recon-link-ico { color: var(--tnt-gold); margin-left: 6px; font-size: 11px; text-decoration: none; }
  @media (max-width: 768px) { .module-tabs { padding: 0 14px; } }
