  :root {
    --aps-navy: #1b2160;
    --aps-navy-dark: #0c102f;
    --aps-navy-light: #4338ca;
    --accent: #4f46e5;
    --accent-2: #7c3aed;
    --accent-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --bg-primary: #eef1fb;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #e9edfb;
    --border: #dfe4f5;
    --text-primary: #14183c;
    --text-secondary: #4a5478;
    --text-muted: #8590b0;
    --green: #0da678;
    --green-dark: #087f5b;
    --green-bg: rgba(13,166,120,0.12);
    --red: #e5484d;
    --red-bg: rgba(229,72,77,0.1);
    --yellow: #c76a04;
    --yellow-bg: rgba(199,106,4,0.12);
    --blue: #3557f0;
    --blue-bg: rgba(53,87,240,0.08);
    --purple: #8b5cf6;
    --orange: #ea580c;
    --gold: #d4900a;
    --shadow-sm: 0 1px 2px rgba(20,24,60,0.06);
    --shadow: 0 2px 8px rgba(20,24,60,0.07), 0 1px 2px rgba(20,24,60,0.05);
    --shadow-md: 0 16px 40px rgba(43,52,153,0.18);
    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  }
  [data-theme="dark"] {
    --bg-primary: #0a0e26;
    --bg-secondary: #121838;
    --bg-card: #121838;
    --bg-hover: #1a2148;
    --border: #272f5e;
    --text-primary: #eef1fd;
    --text-secondary: #9aa4d4;
    --text-muted: #6d77a8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
    --shadow: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 18px 44px rgba(0,0,0,0.55);
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-body); min-height: 100vh; -webkit-font-smoothing: antialiased; }
  a { color: var(--blue); }
  a:hover { color: var(--accent-2); }

  /* Scrollbars */
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(79,70,229,0.28); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
  ::-webkit-scrollbar-thumb:hover { background: rgba(79,70,229,0.5); border: 2px solid transparent; background-clip: padding-box; }

  /* APS LOGO SVG */
  .aps-logo-svg { display: flex; align-items: center; gap: 10px; }
  .aps-logo-text { line-height: 1; }
  .aps-logo-text .aps-main { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.5px; color: var(--aps-navy); }
  .aps-logo-text .aps-main .arrow { color: var(--accent); }
  .aps-logo-text .aps-sub { font-size: 9px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); margin-top: 1px; }
  .aps-logo-white .aps-main { color: #fff; }
  .aps-logo-white .aps-main .arrow { color: #a5b4fc; }
  .aps-logo-white .aps-sub { color: rgba(255,255,255,0.6); }

  /* LOGIN */
  #login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(-45deg, #0c102f, #1b2160, #4338ca, #7c3aed); background-size: 320% 320%; animation: gradShift 16s ease infinite; }
  @keyframes gradShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
  .login-card { background: #fff; border-radius: 22px; padding: 48px 40px; width: 380px; box-shadow: 0 34px 80px rgba(8,10,40,0.55); animation: cardIn .5s cubic-bezier(.2,.8,.2,1); }
  @keyframes cardIn { from { opacity:0; transform: translateY(16px) scale(.97); } to { opacity:1; transform: translateY(0) scale(1); } }
  .login-logo { text-align: center; margin-bottom: 32px; }
  .login-logo .aps-main { font-size: 32px; }
  .login-logo .aps-sub { font-size: 10px; }
  .login-logo p { color: var(--text-muted); font-size: 13px; margin-top: 12px; }
  .login-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
  .login-divider hr { flex: 1; border: none; border-top: 1px solid var(--border); }
  .login-divider span { font-size: 12px; color: var(--text-muted); }
  .form-group { margin-bottom: 16px; }
  .form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
  .form-group input, .form-group select { width: 100%; background: var(--bg-primary); border: 1.5px solid var(--border); border-radius: 11px; padding: 11px 14px; color: var(--text-primary); font-size: 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
  .form-group input:focus, .form-group select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.18); }
  .btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 11px; border: none; cursor: pointer; font-size: 14px; font-weight: 600; transition: transform .15s, box-shadow .15s, background .15s, filter .15s; }
  .btn:active { transform: translateY(1px); }
  .btn-primary { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: #fff; }
  .btn-primary:hover { filter: brightness(1.12); box-shadow: 0 8px 22px rgba(79,70,229,0.45); transform: translateY(-1px); }
  .btn-danger { background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }
  .btn-danger:hover { background: var(--red); color: #fff; }
  .btn-secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border); }
  .btn-secondary:hover { background: var(--border); }
  .btn-warning { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow); }
  .btn-warning:hover { background: var(--yellow); color: #fff; }
  .btn-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue); }
  .btn-sm { padding: 6px 12px; font-size: 12px; }
  .btn-full { width: 100%; justify-content: center; }
  .error-msg { color: var(--red); font-size: 13px; margin-top: 8px; display: none; }

  /* APP */
  :root { --top-inset: env(safe-area-inset-top, 0px); --topbar-h: calc(60px + env(safe-area-inset-top, 0px)); }
  #app { display: none; min-height: 100vh; }
  .topbar { background: linear-gradient(90deg, #0c102f 0%, #1b2160 55%, #372a7d 100%); padding: env(safe-area-inset-top, 0px) calc(24px + env(safe-area-inset-right, 0px)) 0 calc(24px + env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 14px rgba(8,10,40,0.4); }
  .topbar-left { display: flex; align-items: center; gap: 16px; }
  .topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,0.8); }
  .avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); border: none; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; font-family: var(--font-display); box-shadow: 0 2px 8px rgba(79,70,229,0.35); }
  .main { display: flex; min-height: calc(100vh - var(--topbar-h)); }
  .sidebar { width: 216px; background: linear-gradient(180deg, #0c102f 0%, #141a45 100%); padding: 20px 12px; flex-shrink: 0; overflow-y: auto; }
  .sidebar-section { padding: 0 10px 8px; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(255,255,255,0.32); margin-top: 18px; }
  .nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; color: rgba(255,255,255,0.62); font-size: 14px; font-weight: 500; transition: all .15s; border-radius: 11px; margin: 2px 0; }
  .nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; transform: translateX(3px); }
  .nav-item.active { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: #fff; font-weight: 700; box-shadow: 0 6px 18px rgba(79,70,229,0.5); }
  .nav-icon { font-size: 16px; }
  .content { flex: 1; padding: 28px; overflow-y: auto; background: radial-gradient(900px 480px at 100% -10%, rgba(124,58,237,0.08), transparent 55%), radial-gradient(800px 520px at -10% 110%, rgba(79,70,229,0.07), transparent 55%), var(--bg-primary); }

  /* TABS */
  .tabs { display: flex; gap: 5px; border-bottom: none; background: rgba(79,70,229,0.08); padding: 5px; border-radius: 14px; margin-bottom: 24px; width: max-content; max-width: 100%; flex-wrap: wrap; }
  [data-theme="dark"] .tabs { background: rgba(124,58,237,0.14); }
  .tab { padding: 8px 16px; cursor: pointer; color: var(--text-secondary); font-size: 14px; font-weight: 600; border-bottom: none; transition: all .15s; margin-bottom: 0; border-radius: 10px; }
  .tab:hover { color: var(--text-primary); background: var(--bg-card); }
  .tab.active { color: #fff; border-bottom-color: transparent; font-weight: 700; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); box-shadow: 0 4px 12px rgba(79,70,229,0.4); }
  .tab-content { display: none; }
  .tab-content.active { display: block; }

  /* CARDS */
  .card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
  .card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); font-family: var(--font-display); }
  .section-title { font-size: 25px; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); font-family: var(--font-display); letter-spacing: -0.5px; }

  /* STATS */
  .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
  .stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; position: relative; overflow: hidden; }
  .stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #4f46e5, #7c3aed, #8b5cf6); }
  .stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
  .stat-label { font-size: 11.5px; color: var(--text-muted); margin-bottom: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; }
  .stat-value { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.1; }
  .stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
  .stat-green { color: var(--green); }
  .stat-red { color: var(--red); }
  .stat-blue { color: var(--blue); }
  .stat-yellow { color: var(--yellow); }

  /* FORM */
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  textarea { width: 100%; background: var(--bg-primary); border: 1.5px solid var(--border); border-radius: 11px; padding: 10px 12px; color: var(--text-primary); font-size: 14px; outline: none; resize: vertical; font-family: inherit; transition: border-color .2s; }
  textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.15); }

  /* MEETING LIST */
  .meeting-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); transition: box-shadow .2s, transform .15s, border-color .2s; }
  .meeting-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: rgba(79,70,229,0.35); }
  .meeting-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
  .meeting-time { font-family: var(--font-display); font-size: 21px; font-weight: 700; color: var(--accent); min-width: 60px; font-variant-numeric: tabular-nums; }
  .meeting-name { font-size: 15px; font-weight: 700; flex: 1; color: var(--text-primary); }
  .meeting-body { margin-top: 10px; display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .meeting-remark { font-size: 13px; color: var(--text-secondary); flex: 1; min-width: 200px; }
  .meeting-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .status-select { background: var(--bg-primary); border: 1.5px solid var(--border); border-radius: 10px; padding: 6px 10px; color: var(--text-primary); font-size: 13px; font-weight: 600; outline: none; cursor: pointer; }
  .status-select:focus { border-color: var(--accent); }
  .badge { padding: 3px 11px; border-radius: 20px; font-size: 12px; font-weight: 700; }
  .badge-scheduled { background: var(--blue-bg); color: var(--blue); border: 1px solid rgba(53,87,240,0.25); }
  .badge-confirmed { background: var(--yellow-bg); color: var(--yellow); border: 1px solid rgba(199,106,4,0.25); }
  .badge-present { background: rgba(139,92,246,0.12); color: var(--purple); border: 1px solid rgba(139,92,246,0.3); }
  .badge-noshow { background: var(--red-bg); color: var(--red); border: 1px solid rgba(229,72,77,0.25); }
  .badge-postponed { background: rgba(74,84,120,0.1); color: var(--text-secondary); border: 1px solid var(--border); }
  .badge-closed { background: var(--green-bg); color: var(--green); border: 1px solid rgba(13,166,120,0.35); animation: closedGlow 2.4s ease-in-out infinite; }
  @keyframes closedGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(13,166,120,0.4); } 50% { box-shadow: 0 0 0 6px rgba(13,166,120,0); } }

  /* PAUSE */
  .pause-card { background: rgba(229,72,77,0.05); border: 1px solid rgba(229,72,77,0.25); border-radius: 16px; padding: 14px 16px; margin-top: 10px; }
  .pause-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
  .pause-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
  @keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
  .pause-timer { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; }
  .pause-type { font-size: 13px; color: var(--text-secondary); }
  .pause-type-select { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
  .pause-type-btn { padding: 6px 13px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--bg-primary); color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
  .pause-type-btn:hover, .pause-type-btn.selected { border-color: var(--red); color: var(--red); background: var(--red-bg); }

  /* MANAGER CLOSER VIEW */
  .closers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
  @media (max-width: 900px) { .closers-grid { grid-template-columns: 1fr; } }
  .closer-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
  .closer-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .closer-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--text-primary); }
  .online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px; animation: onlinePulse 2s ease-in-out infinite; }
  @keyframes onlinePulse { 0%,100% { box-shadow: 0 0 0 3px rgba(13,166,120,0.2); } 50% { box-shadow: 0 0 0 6px rgba(13,166,120,0.05); } }
  .pause-indicator { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--red-bg); border: 1px solid rgba(229,72,77,0.3); border-radius: 20px; font-size: 12px; color: var(--red); font-weight: 600; }

  /* CHARTS */
  .charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
  @media (max-width: 900px) { .charts-grid { grid-template-columns: 1fr; } }
  .chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
  .chart-title { font-size: 13px; font-weight: 700; margin-bottom: 16px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.7px; }
  canvas { max-height: 260px; }

  /* HISTORY */
  .date-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
  .date-nav input[type=date] { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 11px; padding: 8px 12px; color: var(--text-primary); font-size: 14px; outline: none; box-shadow: var(--shadow-sm); }
  .date-nav input[type=date]:focus { border-color: var(--accent); }

  /* REMARK EDIT */
  .remark-edit { margin-top: 8px; }
  .remark-edit textarea { min-height: 60px; }

  /* EMPTY STATE */
  .empty { text-align: center; padding: 48px; color: var(--text-muted); font-size: 14px; }
  .empty-icon { font-size: 36px; margin-bottom: 10px; }

  /* UTILS */
  .flex { display: flex; align-items: center; gap: 8px; }
  .mt-12 { margin-top: 12px; }
  .divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
  .text-sm { font-size: 13px; }
  .text-muted { color: var(--text-muted); }
  .success-toast { position: fixed; bottom: 24px; right: 24px; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: #fff; padding: 12px 22px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 999; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; pointer-events: none; box-shadow: 0 12px 32px rgba(79,70,229,0.45); }
  .success-toast.show { opacity: 1; transform: translateY(0); }
  .delete-btn { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 16px; padding: 4px; border-radius: 4px; transition: color .2s; }
  .delete-btn:hover { color: var(--red); }
  .meeting-remark-edit input { width: 100%; background: var(--bg-primary); border: 1.5px solid var(--border); border-radius: 10px; padding: 6px 10px; color: var(--text-primary); font-size: 13px; outline: none; }
  .meeting-remark-edit input:focus { border-color: var(--accent); }
  select option { background: #fff; color: var(--text-primary); }
  [data-theme="dark"] select option { background: #121838; }
  .week-selector { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
  .week-selector input[type=week] { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 11px; padding: 8px 12px; color: var(--text-primary); font-size: 14px; outline: none; box-shadow: var(--shadow-sm); }

  /* ── RECORDINGS ── */
  .rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
  .rec-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: transform .15s, box-shadow .2s; }
  .rec-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
  .rec-thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #141a45 0%, #2d2a6e 60%, #45278b 100%); display: flex; align-items: center; justify-content: center; cursor: pointer; }
  .rec-play { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 19px; padding-left: 4px; box-shadow: 0 8px 22px rgba(79,70,229,0.55); transition: transform .15s; }
  .rec-thumb:hover .rec-play { transform: scale(1.14); }
  .rec-room { position: absolute; bottom: 8px; left: 12px; font-size: 11px; color: rgba(255,255,255,0.72); font-family: var(--font-display); letter-spacing: 0.3px; }
  .rec-size-badge { position: absolute; top: 8px; right: 8px; background: rgba(8,10,40,0.55); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 12px; backdrop-filter: blur(3px); }
  .rec-body { padding: 12px 14px; }
  .rec-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .rec-time { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
  .rec-closer { font-size: 14px; font-weight: 700; color: var(--text-primary); }
  .rec-date-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
  .rec-actions { display: flex; gap: 6px; margin-top: 10px; }
  .rec-day-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; }
  .rec-day-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); text-transform: capitalize; }
  .rec-day-count { font-size: 11px; font-weight: 700; color: var(--accent); background: rgba(79,70,229,0.1); border-radius: 12px; padding: 2px 9px; }
  .rec-day-line { flex: 1; height: 1px; background: var(--border); }
  .rec-chip { padding: 5px 13px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--bg-primary); color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; }
  .rec-chip:hover { border-color: var(--accent); color: var(--accent); }
  .rec-chip.active { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: #fff; border-color: transparent; box-shadow: 0 3px 10px rgba(79,70,229,0.35); }
  .rec-layout { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
  @media (max-width: 900px) { .rec-layout { grid-template-columns: 1fr; } }
  .rec-cal { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); position: sticky; top: 76px; }
  @media (max-width: 900px) { .rec-cal { position: static; } }
  .rec-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .rec-cal-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text-primary); text-transform: capitalize; }
  .rec-cal-nav { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-secondary); font-size: 13px; cursor: pointer; transition: all .15s; }
  .rec-cal-nav:hover { border-color: var(--accent); color: var(--accent); }
  .rec-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .rec-cal-dow { text-align: center; font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; padding: 4px 0; }
  .rec-cal-day { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
  .rec-cal-day.has { background: rgba(79,70,229,0.1); color: var(--accent); font-weight: 700; cursor: pointer; transition: all .15s; }
  .rec-cal-day.has:hover { background: rgba(79,70,229,0.22); transform: scale(1.07); }
  .rec-cal-day.selected { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,0.45); }
  .rec-cal-day.today { outline: 1.5px solid var(--accent); outline-offset: 1px; }
  .rec-cal-count { position: absolute; top: 2px; right: 3px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--accent-2); color: #fff; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 3px; }
  .rec-cal-day.selected .rec-cal-count { background: rgba(255,255,255,0.32); }
  .rec-cal-legend { display: flex; gap: 12px; margin-top: 12px; font-size: 11px; color: var(--text-muted); }
  .rec-modal-overlay { position: fixed; inset: 0; background: rgba(8,10,40,0.78); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .15s; backdrop-filter: blur(4px); }
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
  .rec-modal { background: var(--bg-card); border-radius: 18px; max-width: 880px; width: 100%; overflow: hidden; box-shadow: 0 40px 90px rgba(0,0,0,0.55); animation: cardIn .25s cubic-bezier(.2,.8,.2,1); }
  .rec-modal video { width: 100%; max-height: 70vh; background: #000; display: block; }
  .rec-modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }

  /* ── HAMBURGER ── */
  .hamburger-btn { display: flex; align-items: center; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; padding: 4px 8px; line-height: 1; flex-shrink: 0; }
  /* Desktop: collapsible sidebar (hamburger toggles it) */
  @media (min-width: 769px) {
    .sidebar { transition: margin-left 0.22s ease; }
    .sidebar.collapsed { margin-left: -216px; }
  }
  #sidebar-overlay { display: none; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(8,10,40,0.55); z-index: 199; }
  #sidebar-overlay.open { display: block; }

  /* ── MANAGER DASHBOARD (Accueil) ── */
  .dash-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
  .dash-head h1 { font-size: 24px; font-weight: 800; font-family: 'Space Grotesk', sans-serif; }
  .dash-sub { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
  .dash-date { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
  .dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
  .dash-kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: flex; gap: 12px; align-items: center; }
  .dash-kpi-ico { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
  .dash-kpi-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }
  .dash-kpi-val { font-size: 22px; font-weight: 800; line-height: 1.2; }
  .dash-kpi-sub { font-size: 11px; color: var(--text-muted); }
  .dash-cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-bottom: 16px; }
  .dash-cols-b { grid-template-columns: 1fr 1.55fr; }
  @media (max-width: 900px) { .dash-cols, .dash-cols-b { grid-template-columns: 1fr; } }
  .dash-card { padding: 16px 18px; }
  .dash-card-title { font-size: 14px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .dash-live { font-size: 11px; color: #16a34a; font-weight: 700; }
  .dash-crow { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 10px; }
  .dash-crow:hover { background: var(--bg-hover); }
  .dash-avatar { position: relative; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
  .dash-dot { position: absolute; bottom: -1px; right: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bg-card); }
  .dash-bar { flex: 1; height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; min-width: 60px; }
  .dash-bar > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4f46e5, #7c3aed); }
  .dash-num { font-size: 14px; font-weight: 700; min-width: 26px; text-align: center; }
  .dash-pill { font-size: 12px; font-weight: 800; border-radius: 20px; padding: 4px 10px; min-width: 44px; text-align: center; }
  .dash-more { margin-top: 10px; text-align: center; font-size: 13px; font-weight: 700; color: #4f46e5; border: 1px solid var(--border); border-radius: 10px; padding: 9px; cursor: pointer; }
  .dash-more:hover { background: var(--bg-hover); }
  .dash-feed-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; }
  .dash-feed-ico { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }

  /* ── TEMPS RÉEL : grille de cartes clients ── */
  .rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 14px; align-items: start; margin-bottom: 18px; }
  .rt-card { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 14px; padding: 16px; cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
  .rt-card:hover { box-shadow: 0 6px 22px rgba(20, 24, 60, 0.09); transform: translateY(-1px); }
  .rt-card.open { border: 2px solid #4f46e5; box-shadow: 0 8px 28px rgba(79, 70, 229, 0.18); }

  /* ── CONFETTI (additive, see confetti-effect.js) ── */
  .confetti-piece { position: fixed; top: -12px; width: 8px; height: 14px; z-index: 9998; pointer-events: none; border-radius: 2px; animation: confettiFall linear forwards; }
  @keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(105vh) rotate(540deg); opacity: 0.9; }
  }

  /* ── MOBILE ── */
  @media (max-width: 768px) {
    .hamburger-btn { display: flex; align-items: center; }

    /* Sidebar becomes a slide-in drawer */
    .sidebar {
      position: fixed; top: var(--topbar-h); left: 0; height: calc(100vh - var(--topbar-h));
      z-index: 200; transform: translateX(-100%); transition: transform 0.25s ease;
      overflow-y: auto; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    }
    .sidebar.open { transform: translateX(0); }

    /* Content fills full width, clears the home indicator */
    .content { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }

    /* Topbar: tighter */
    .topbar { padding: 0 10px; gap: 6px; }
    #top-session-timer { display: none !important; }

    /* Grids: single column on mobile */
    .closers-grid { grid-template-columns: 1fr !important; }
    .charts-grid { grid-template-columns: 1fr !important; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Meeting cards */
    .meeting-header { flex-wrap: wrap; gap: 4px; }
    .meeting-item { padding: 12px; }
    .meeting-body { flex-direction: column; }

    /* Status select + remark stack vertically */
    .meeting-body > div > div:first-child { flex-wrap: wrap; }

    /* Section titles */
    .section-title { font-size: 18px; margin-bottom: 14px; }

    /* Cards: less padding */
    .card { padding: 14px; }
    .closer-card { padding: 14px; }

    /* Tabs: smaller text */
    .tab { font-size: 12px; padding: 8px 10px; }

    /* Forms: full width inputs */
    input[type=text], input[type=tel], input[type=time], input[type=date], select, textarea {
      font-size: 16px !important; /* prevents iOS zoom */
    }

    /* Pause menu: wider */
    #top-pause-menu { min-width: 180px; right: -10px; }

    /* History table: scrollable */
    #history-content table { font-size: 11px; }
    #history-content table th, #history-content table td { padding: 6px 8px; }

    /* Stat cards: smaller values */
    .stat-value { font-size: 22px !important; }
    .stat-card { padding: 12px; }

    /* Charts: smaller */
    canvas { max-height: 200px; }

    /* Topbar user info: hide username text, keep avatar */
    #top-username { display: none; }

    /* Buttons: easier to tap */
    .btn { min-height: 40px; }

    /* Week/month nav: wrap */
    .week-selector { flex-wrap: wrap; }
  }

  /* ============ PROSPECTION ============ */
  .pros-hero { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
  .pros-hero h1 { font-size: 24px; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.4px; }
  .pros-hero p { font-size: 13px; color: var(--text-muted); margin-top: 3px; max-width: 60ch; line-height: 1.5; }
  .pros-hero-badges { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
  .pros-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
    border-radius: 20px; padding: 6px 12px; border: 1px solid var(--border); background: var(--bg-card); }
  .pros-badge.ok { border-color: var(--green); color: var(--green-dark); background: var(--green-bg); }
  .pros-badge.warn { border-color: var(--orange); color: var(--orange); background: var(--yellow-bg); }
  .pros-badge.err { border-color: var(--red); color: var(--red); background: var(--red-bg); }

  .pros-layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 16px; align-items: start; }
  @media (max-width: 1080px) { .pros-layout { grid-template-columns: minmax(0, 1fr); } }

  .pros-step { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px;
    padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
  .pros-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
  .pros-num { width: 25px; height: 25px; border-radius: 50%; background: var(--accent-grad); color: #fff;
    font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .pros-step-title { font-size: 15px; font-weight: 800; font-family: var(--font-display); }
  .pros-step-hint { margin-left: auto; font-size: 12px; color: var(--text-muted); }

  .pros-input { width: 100%; border: 1.5px solid var(--border); border-radius: 10px; padding: 11px 13px;
    font-size: 14px; background: var(--bg-primary); color: var(--text-primary); outline: none;
    box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
  .pros-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
  .pros-select { border: 1.5px solid var(--border); border-radius: 9px; padding: 8px 10px; font-size: 13px;
    background: var(--bg-primary); color: var(--text-primary); outline: none; }
  .pros-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }

  .pros-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 250px; overflow-y: auto; padding: 3px 2px; }
  .pros-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--border);
    background: var(--bg-primary); color: var(--text-primary); border-radius: 20px; padding: 6px 12px;
    font-size: 12px; font-weight: 600; cursor: pointer; transition: border-color .12s, transform .12s; }
  .pros-chip:hover { border-color: var(--accent); transform: translateY(-1px); }
  .pros-chip .cp { opacity: .6; font-size: 11px; font-weight: 700; }
  .pros-chip.done { border-color: var(--green); background: var(--green-bg); color: var(--green-dark); }
  .pros-chip.part { border-color: var(--yellow); color: var(--yellow); background: var(--yellow-bg); }
  .pros-chip.on { background: var(--accent-grad); border-color: transparent; color: #fff;
    box-shadow: 0 3px 10px rgba(79,70,229,.3); }
  .pros-chip.on .cp { opacity: .85; }
  .pros-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 11px;
    font-size: 11.5px; color: var(--text-muted); }
  .pros-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px;
    vertical-align: -1px; border: 1.5px solid; }

  .pros-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 14px; }
  @media (max-width: 1080px) { .pros-side { position: static; } }
  .pros-sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed var(--border); }
  .pros-sum-row:last-child { border-bottom: none; }
  .pros-sum-k { font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); }
  .pros-sum-v { font-size: 15px; font-weight: 800; text-align: right; }
  .pros-cta { width: 100%; margin-top: 13px; padding: 13px; border-radius: 12px; border: none;
    background: var(--accent-grad); color: #fff; font-size: 14px; font-weight: 800; cursor: pointer;
    box-shadow: 0 6px 18px rgba(79,70,229,.32); transition: transform .12s, box-shadow .12s; }
  .pros-cta:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(79,70,229,.4); }
  .pros-cta:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

  .pros-note { border-radius: 11px; padding: 10px 13px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
  .pros-note b { color: var(--text-primary); }
  .pros-note.err { background: var(--red-bg); border: 1.5px solid var(--red); }
  .pros-note.warn { background: var(--yellow-bg); border: 1px solid var(--orange); }
  .pros-note.info { background: var(--blue-bg); border: 1px solid var(--blue); }

  .pros-job { border: 1px solid var(--border); border-radius: 14px; padding: 15px 16px; margin-bottom: 11px;
    background: var(--bg-card); transition: box-shadow .15s; }
  .pros-job:hover { box-shadow: 0 5px 18px rgba(20,24,60,.08); }
  .pros-job-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
  .pros-job-name { font-weight: 800; font-size: 14.5px; text-transform: capitalize; font-family: var(--font-display); }
  .pros-pill { font-size: 11px; font-weight: 800; border-radius: 20px; padding: 3px 10px; border: 1px solid; white-space: nowrap; }
  .pros-job-meta { font-size: 12px; color: var(--text-muted); }
  .pros-job-count { font-size: 15px; font-weight: 800; color: var(--accent); }
  .pros-progress { height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: 11px; }
  .pros-progress > div { height: 100%; border-radius: 99px; background: var(--accent-grad); transition: width .4s; }
  .pros-stats { font-size: 11.5px; color: var(--text-muted); margin-top: 9px; display: flex; gap: 18px; flex-wrap: wrap; }
  .pros-log { margin-top: 9px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: 10px;
    padding: 11px; font-size: 11.5px; max-height: 210px; overflow: auto; white-space: pre-wrap;
    font-family: ui-monospace, Menlo, Consolas, monospace; }
  .pros-link { font-size: 12px; color: var(--blue); cursor: pointer; text-decoration: underline; }
  .pros-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

  /* Les teintes "foncees" (--green-dark, --yellow) sont illisibles sur les fonds
     sombres : on eclaircit uniquement les pastilles concernees. */
  [data-theme="dark"] .pros-chip.done,
  [data-theme="dark"] .pros-badge.ok { color: #4ade80; }
  [data-theme="dark"] .pros-chip.part { color: #fbbf24; }
  [data-theme="dark"] .pros-badge.warn { color: #fbbf24; }
  [data-theme="dark"] .pros-badge.err { color: #fca5a5; }
