/* ==========================================================================
   Bootsempire CRM — Design System  (v2, written from scratch)
   --------------------------------------------------------------------------
   STYLE GUIDE
   Colour   Brand green (toned) for actions + success. Mint = neutral tint.
            Pink (Instagram) = Instagram data, "below target", soft alerts.
            WhatsApp green = WhatsApp data + chat buttons only.
            Ink (near-black) = primary buttons and the active nav pill.
   Type     Outfit. Scale: 12 / 13 / 14 / 15(base) / 17 / 20 / 24 / 30 / 40.
            Weights 400 / 500 / 600 only. Headings tight (-0.02em).
   Space    4-pt scale: 4 8 12 16 20 24 32 40. Cards pad 24, grids gap 20.
   Radius   chip 999 · control 14 · tile 20 · card 28 · modal 32.
   Elevation Flat surfaces on tinted panel; only overlays get a shadow.
   Motion   160ms ease for hover/focus, 240ms for overlays, 8px fade-up on
            page change. Everything disabled under prefers-reduced-motion.
   States   hover = tint shift, focus = 3px brand ring, active = scale .98.
   Layout   Floating rounded app panel; pill sidebar; ≤800px = drawer + cards.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600&display=swap');

/* 1 — TOKENS ---------------------------------------------------------------*/
:root, :root[data-theme="dark"] {
  --page:#0a0f0c; --panel:#101612; --surface:#171e19; --surface-2:#1f2822; --surface-3:#28332c;
  --ink:#eef3ef; --ink-2:#a2b1a7; --ink-3:#6c7c72; --on-ink:#0e1511;
  --line:rgba(255,255,255,.07); --line-2:rgba(255,255,255,.14);
  --brand:#3fa874; --brand-600:#34936a; --brand-50:rgba(63,168,116,.16); --brand-100:rgba(63,168,116,.26); --on-brand:#06140c;
  --wa:#25d366; --wa-50:rgba(37,211,102,.15); --wa-ink:#4be08a;
  --ig:#e0568c; --ig-50:rgba(224,86,140,.16); --ig-ink:#ff8fb6;
  --warn:#e5a93d; --warn-50:rgba(229,169,61,.16);
  --danger:#ef6b6b; --danger-50:rgba(239,107,107,.15);
  --sand-50:rgba(255,255,255,.05);
  --shadow:0 24px 60px rgba(0,0,0,.55); --scrim:rgba(4,10,6,.66);
  --logo-filter:brightness(0) invert(1);
  --ring:0 0 0 3px rgba(63,168,116,.32);
}
:root[data-theme="light"] {
  --page:#e3ece8; --panel:#f4f6f5; --surface:#ffffff; --surface-2:#eff3f1; --surface-3:#e2e9e5;
  --ink:#111a15; --ink-2:#55655b; --ink-3:#8a978f; --on-ink:#ffffff;
  --line:rgba(17,26,21,.07); --line-2:rgba(17,26,21,.15);
  --brand:#2b925e; --brand-600:#237a4e; --brand-50:#dff1e7; --brand-100:#c9e7d6; --on-brand:#ffffff;
  --wa:#25d366; --wa-50:#d9f5e3; --wa-ink:#12803f;
  --ig:#d6487f; --ig-50:#fbe1ec; --ig-ink:#b0306a;
  --warn:#a56a0c; --warn-50:#fdefd0;
  --danger:#cf3f3f; --danger-50:#fde3e3;
  --sand-50:#f7ecdc;
  --shadow:0 28px 60px rgba(25,55,40,.14); --scrim:rgba(16,28,21,.45);
  --logo-filter:none;
  --ring:0 0 0 3px rgba(43,146,94,.25);
}
:root {
  --font:'Google Sans Flex','Google Sans','Outfit',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --r-chip:999px; --r-ctl:14px; --r-tile:20px; --r-card:28px; --r-modal:32px;
  --ease:cubic-bezier(.2,.7,.2,1); --t:160ms var(--ease); --t-slow:260ms var(--ease);
  --sidebar-w:288px; --header-h:88px; --header-total-h:88px; --imp-bar-h:0px;
}


/* Aliases: variable names referenced by JS-generated markup */
:root, :root[data-theme="dark"], :root[data-theme="light"] {
  --text-main:var(--ink); --text-muted:var(--ink-2); --text-faint:var(--ink-3); --muted:var(--ink-2); --text:var(--ink);
  --accent:var(--brand); --primary:var(--brand); --border:var(--line); --surface-subtle:var(--surface-2);
  --warning:var(--warn); --red-500:var(--danger); --sr-muted:var(--ink-2); --radius-sm:var(--r-ctl);
  --font-mono:ui-monospace,'SF Mono',Menlo,Consolas,monospace; --card-bg:var(--surface);
}

/* 2 — BASE -----------------------------------------------------------------*/
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:16px; -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body { font-family:var(--font); font-size:.9375rem; line-height:1.5; color:var(--ink); background:var(--page);
  -webkit-font-smoothing:antialiased; min-height:100vh; letter-spacing:-.003em;
  background-image:url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><path d="M0 120 Q 260 40 520 210 T 1040 150" fill="none" stroke="%2389a9a0" stroke-width="2" opacity=".22"/><path d="M-100 380 Q 160 520 420 360 T 940 520" fill="none" stroke="%2389a9a0" stroke-width="2" opacity=".22"/></svg>');
  background-size:cover; background-attachment:fixed; }
h1,h2,h3,h4 { font-weight:600; letter-spacing:-.02em; line-height:1.2; }
h1 { font-size:1.875rem; } h2 { font-size:1.375rem; } h3 { font-size:1.0625rem; }
a { color:var(--brand); text-decoration:none; }
img,svg,video { max-width:100%; display:inline-block; vertical-align:middle; }
img { display:block; }
button { font-family:inherit; font-size:inherit; color:inherit; cursor:pointer; background:none; border:0; }
input,select,textarea { font-family:inherit; font-size:inherit; color:inherit; }
::selection { background:var(--brand-100); }
:focus-visible { outline:none; box-shadow:var(--ring); }
* { scrollbar-width:thin; scrollbar-color:var(--line-2) transparent; }
::-webkit-scrollbar { width:10px; height:10px; } ::-webkit-scrollbar-thumb { background:var(--line-2); border-radius:99px; border:3px solid transparent; background-clip:content-box; }

/* Utilities (names used by the app) */
.text-muted{color:var(--ink-2)} .text-accent{color:var(--brand)} .text-danger{color:var(--danger)}
.text-xs{font-size:.75rem} .text-sm{font-size:.8125rem} .text-base{font-size:.9375rem}
.font-bold{font-weight:600} .font-medium{font-weight:500}
.flex{display:flex} .flex-wrap{flex-wrap:wrap} .items-center{align-items:center} .justify-between{justify-content:space-between} .justify-end{justify-content:flex-end}
.gap-2{gap:8px} .gap-3{gap:12px} .ml-auto{margin-left:auto} .cursor-pointer{cursor:pointer} .rounded{border-radius:var(--r-ctl)}
.mt-1{margin-top:4px}.mt-2{margin-top:8px}.mt-3{margin-top:12px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:4px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-4{margin-bottom:16px}
.p-2{padding:8px}.p-4{padding:16px}.pt-3{padding-top:12px}.pb-3{padding-bottom:12px}.py-4{padding-block:16px}
.amount{white-space:nowrap;font-weight:600;font-variant-numeric:tabular-nums}
.chk{width:18px;height:18px;accent-color:var(--brand);cursor:pointer}
input[type="checkbox"],input[type="radio"]{accent-color:var(--brand)}

/* Logo */
.app-logo{height:30px;width:auto;aspect-ratio:152/40;object-fit:contain;display:block;filter:var(--logo-filter)}
.login-logo{height:42px;margin:0 auto}

/* 3 — BUTTONS ---------------------------------------------------------------*/
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:0 20px;
  border-radius:var(--r-chip); border:1px solid transparent; font-weight:500; font-size:.875rem; line-height:1; white-space:nowrap;
  text-decoration:none; user-select:none; transition:background var(--t),color var(--t),border-color var(--t),transform var(--t),box-shadow var(--t); }
.btn svg { width:16px; height:16px; flex:0 0 16px; }
.btn:active:not(:disabled) { transform:scale(.97); }
.btn:disabled,.btn[disabled] { opacity:.5; cursor:not-allowed; }
.btn-primary { background:var(--ink); color:var(--on-ink); }
.btn-primary:hover:not(:disabled) { background:var(--brand); color:var(--on-brand); }
.btn-outline { background:var(--surface); color:var(--ink); border-color:var(--line-2); }
.btn-outline:hover:not(:disabled) { background:var(--brand-50); border-color:var(--brand); color:var(--brand-600); }
.btn-ghost { background:transparent; color:var(--ink-2); border-color:var(--line-2); }
.btn-ghost:hover:not(:disabled) { background:var(--brand-50); border-color:var(--brand); color:var(--brand-600); }
.btn-danger { background:transparent; color:var(--danger); border-color:transparent; }
.btn-danger:hover:not(:disabled) { background:var(--danger-50); }
.btn-sm { min-height:34px; padding:0 14px; font-size:.8125rem; gap:6px; }
.btn-sm svg { width:15px; height:15px; flex-basis:15px; }
.btn-block { width:100%; }
.btn-whatsapp-chat {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:0 18px;
  border-radius:var(--r-chip); background:var(--wa); color:#042e14; font-weight:600; font-size:.875rem; line-height:1;
  text-decoration:none; border:1px solid transparent; box-shadow:0 2px 8px rgba(37,211,102,.2); cursor:pointer;
  white-space:nowrap; user-select:none; transition:background var(--t),color var(--t),transform var(--t),box-shadow var(--t);
}
.btn-whatsapp-chat:hover { background:#1fbd5b; color:#042e14; transform:translateY(-1px); box-shadow:0 4px 14px rgba(37,211,102,.3); }
.btn-whatsapp-chat:active { transform:scale(.98); }
.btn-whatsapp-chat svg { width:17px; height:17px; flex:0 0 17px; }

.btn-delete-issue-detail {
  display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; padding:0 16px;
  border-radius:var(--r-chip); background:var(--danger-50); color:var(--danger); border:1px solid transparent;
  font-weight:600; font-size:.875rem; line-height:1; cursor:pointer; white-space:nowrap; user-select:none;
  transition:background var(--t),color var(--t),transform var(--t);
}
.btn-delete-issue-detail:hover:not(:disabled) { background:var(--danger); color:#fff; transform:translateY(-1px); }
.btn-delete-issue-detail:active:not(:disabled) { transform:scale(.98); }
.btn-delete-issue-detail svg { width:15px; height:15px; flex:0 0 15px; }

.btn-solve-issue {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:0 22px;
  border-radius:var(--r-chip); background:var(--brand); color:var(--on-brand); font-weight:600; font-size:.875rem;
  border:1px solid transparent; cursor:pointer; white-space:nowrap; user-select:none;
  transition:background var(--t),color var(--t),transform var(--t);
}
.btn-solve-issue:hover:not(:disabled) { background:var(--brand-600); transform:translateY(-1px); }
.btn-solve-issue:disabled { opacity:.5; cursor:not-allowed; }

.btn-reopen-issue {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:36px; padding:0 16px;
  border-radius:var(--r-chip); background:var(--surface); color:var(--ink); border:1px solid var(--line-2);
  font-weight:500; font-size:.8125rem; cursor:pointer; white-space:nowrap; user-select:none;
  transition:background var(--t),border-color var(--t);
}
.btn-reopen-issue:hover { background:var(--brand-50); border-color:var(--brand); }

.btn-del-issue,.btn-del-comment,.btn-del-task,.btn-del-entry,.btn-del-user,.sr-btn-del,.sr-btn-del-reason,.btn-delete-punch {
  color:var(--danger); background:transparent; border:none; cursor:pointer; padding:4px 6px; border-radius:6px;
  display:inline-flex; align-items:center; opacity:.75; transition:opacity var(--t),background var(--t);
}
.btn-del-issue:hover,.btn-del-comment:hover,.btn-del-task:hover,.btn-del-entry:hover,.btn-del-user:hover,.sr-btn-del:hover {
  background:var(--danger-50); opacity:1;
}
.btn-close-detail-mobile { display:none; }
.sr-btn-primary,.sr-btn-outline { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:0 20px; border-radius:var(--r-chip); font-weight:500; font-size:.875rem; border:1px solid transparent; transition:background var(--t),color var(--t),border-color var(--t),transform var(--t); }
.sr-btn-primary { background:var(--ink); color:var(--on-ink); } .sr-btn-primary:hover { background:var(--brand); color:var(--on-brand); }
.sr-btn-outline { background:var(--surface); border-color:var(--line-2); } .sr-btn-outline:hover { background:var(--brand-50); border-color:var(--brand); color:var(--brand-600); }
.exp-btn-primary,.exp-btn-outline { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:42px; padding:0 20px; border-radius:var(--r-chip); font-weight:500; font-size:.875rem; border:1px solid transparent; transition:background var(--t),color var(--t),border-color var(--t),transform var(--t); }
.exp-btn-primary { background:var(--ink); color:var(--on-ink); } .exp-btn-primary:hover { background:var(--brand); color:var(--on-brand); }
.exp-btn-outline { background:var(--surface); border-color:var(--line-2); } .exp-btn-outline:hover { background:var(--brand-50); border-color:var(--brand); color:var(--brand-600); }
.arrow-btn { width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--surface);transition:var(--t) }
.card-export-group { display:inline-flex; gap:8px; flex-wrap:wrap; }
.card-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* 4 — FORMS -----------------------------------------------------------------*/
.form-group { display:flex; flex-direction:column; gap:8px; margin-bottom:16px; }
.form-label,.exp-label,.sr-filter-label,.tile-label { font-size:.8125rem; font-weight:500; color:var(--ink-2); }
.form-control,.exp-input,.exp-textarea,select,input[type="date"],input[type="time"],input[type="number"],input[type="text"],input[type="password"],textarea {
  width:100%; min-height:44px; padding:10px 16px; border-radius:var(--r-ctl); border:1px solid transparent; background:var(--surface-2); color:var(--ink);
  outline:none; transition:border-color var(--t),background var(--t),box-shadow var(--t); }
.form-control::placeholder,.exp-input::placeholder,input::placeholder,textarea::placeholder { color:var(--ink-3); }
.form-control:hover,.exp-input:hover,select:hover { border-color:var(--line-2); }
.form-control:focus,.exp-input:focus,.exp-textarea:focus,select:focus,input:focus,textarea:focus { border-color:var(--brand); background:var(--surface); box-shadow:var(--ring); }
textarea,.exp-textarea { min-height:96px; resize:vertical; line-height:1.5; }
select,select.form-control { appearance:none; -webkit-appearance:none; padding-right:42px; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2388968d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 16px center; background-size:16px; }
.form-control-sm { min-height:36px; padding:6px 12px; font-size:.8125rem; }
input[type="checkbox"],input[type="radio"] { width:18px; height:18px; min-height:0; padding:0; box-shadow:none; cursor:pointer; }
.input-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr)); gap:16px; }
.pw-wrapper { position:relative; } .pw-wrapper .form-control { padding-right:48px; }
.pw-toggle { position:absolute; right:6px; top:50%; transform:translateY(-50%); width:36px; height:36px; border-radius:50%; display:grid; place-items:center; color:var(--ink-3); transition:var(--t); }
.pw-toggle:hover { background:var(--surface-3); color:var(--ink); }
/* Search fields: wrapper owns the focus ring so nothing doubles up */
.issues-search-bar,.exp-search-wrap,.su-search-wrap,.search-bar { position:relative; display:flex; align-items:center; gap:10px; min-height:44px; padding:0 16px; border-radius:var(--r-chip); background:var(--surface-2); border:1px solid transparent; transition:var(--t); }
.issues-search-bar:focus-within,.exp-search-wrap:focus-within,.su-search-wrap:focus-within { border-color:var(--brand); background:var(--surface); box-shadow:var(--ring); }
.issues-search-bar svg,.exp-search-icon,.su-search-icon { width:16px; height:16px; color:var(--ink-3); flex:0 0 16px; position:static; }
.issues-search-input,.exp-search-input,.su-search-input { flex:1; min-width:0; min-height:42px; padding:0; border:0 !important; background:transparent !important; box-shadow:none !important; border-radius:0; }
.exp-search-wrap { width:min(280px,100%); }
.input-file-zone { position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; padding:28px 20px; text-align:center; border:2px dashed var(--line-2); border-radius:var(--r-tile); background:var(--surface-2); color:var(--ink-2); cursor:pointer; transition:var(--t); }
.input-file-zone:hover,.input-file-zone.dragover { border-color:var(--brand); background:var(--brand-50); color:var(--brand-600); }
.input-file-zone input[type="file"] { position:absolute; inset:0; opacity:0; cursor:pointer; min-height:0; }
.input-file-zone svg { width:28px; height:28px; }
.file-list { display:flex; flex-direction:column; gap:8px; margin-top:12px; }
.file-chip { display:flex; align-items:center; gap:12px; padding:10px 14px; border-radius:var(--r-ctl); background:var(--surface-2); }
.file-chip-icon,.file-modal-icon { width:34px; height:34px; flex:0 0 34px; border-radius:50%; display:grid; place-items:center; background:var(--brand-50); color:var(--brand); }
.file-chip-icon svg,.file-modal-icon svg { width:16px; height:16px; }
.file-chip-info { flex:1; min-width:0; display:flex; flex-direction:column; }
.file-chip-name,.file-modal-name { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-chip-size,.file-modal-type { font-size:.75rem; color:var(--ink-3); }
.file-chip-remove { width:30px; height:30px; border-radius:50%; display:grid; place-items:center; color:var(--ink-3); transition:var(--t); }
.file-chip-remove:hover { background:var(--danger-50); color:var(--danger); }
.checkbox-item { display:flex; align-items:center; gap:10px; padding:8px 4px; font-weight:500; cursor:pointer; }
.dept-checkbox-group { display:flex; flex-direction:column; gap:4px; padding:8px 14px; border-radius:var(--r-ctl); background:var(--surface-2); }

/* 5 — SHELL: login, header, sidebar ---------------------------------------*/
#page-login { min-height:100vh; min-height:100dvh; display:flex; align-items:center; justify-content:center; padding:20px; }
.login-card { width:100%; max-width:440px; padding:44px 40px; background:var(--surface); border-radius:36px; box-shadow:var(--shadow); animation:rise var(--t-slow) both; }
.login-logo-header { display:flex; justify-content:center; margin-bottom:24px; }
.login-title { text-align:center; font-size:1.625rem; margin-bottom:28px; }
.login-error { min-height:20px; margin-bottom:12px; font-size:.8125rem; font-weight:500; color:var(--danger); }

#page-app { max-width:1560px; margin:20px auto; min-height:calc(100vh - 40px); background:var(--panel); border-radius:36px; overflow:clip; box-shadow:var(--shadow); border:1px solid var(--line); }
.app-header { height:var(--header-h); padding:0 40px; display:flex; align-items:center; justify-content:space-between; position:sticky; top:0; z-index:100; background:var(--panel); }
.header-brand { display:flex; align-items:center; gap:14px; }
.header-right { display:flex; align-items:center; gap:12px; }
.menu-toggle { display:none; width:46px; height:46px; border-radius:50%; background:var(--surface); place-items:center; }
.menu-toggle svg { width:22px; height:22px; }
.theme-toggle { width:46px; height:46px; border-radius:50%; background:var(--surface); display:grid; place-items:center; color:var(--ink); transition:var(--t); }
.theme-toggle:hover,.menu-toggle:hover { background:var(--brand-50); color:var(--brand-600); }
.theme-toggle svg { width:20px; height:20px; }
.profile-dropdown-wrap { position:relative; }
.profile-btn { height:46px; padding:0 16px 0 8px; border-radius:var(--r-chip); background:var(--surface); display:flex; align-items:center; gap:10px; font-weight:500; transition:var(--t); }
.profile-btn:hover { background:var(--brand-50); }
.profile-avatar-icon { width:30px; height:30px; padding:6px; border-radius:50%; background:var(--brand-50); color:var(--brand); }
.profile-chevron { width:14px; height:14px; color:var(--ink-3); transition:transform var(--t); }
.profile-btn[aria-expanded="true"] .profile-chevron { transform:rotate(180deg); }
.profile-dropdown-menu { position:absolute; right:0; top:calc(100% + 10px); min-width:240px; padding:8px; border-radius:24px; background:var(--surface); box-shadow:var(--shadow); border:1px solid var(--line);
  opacity:0; visibility:hidden; transform:translateY(-6px) scale(.98); transform-origin:top right; transition:opacity var(--t),transform var(--t),visibility var(--t); z-index:120; }
.profile-dropdown-menu.open { opacity:1; visibility:visible; transform:none; }
.profile-menu-header { padding:12px 14px; } .profile-menu-name { font-weight:600; } .profile-menu-dept { font-size:.8125rem; color:var(--ink-2); }
.profile-menu-divider { height:1px; background:var(--line); margin:6px 8px; }
.profile-menu-item { display:flex; align-items:center; gap:12px; width:100%; padding:11px 14px; border-radius:16px; font-weight:500; text-align:left; transition:var(--t); }
.profile-menu-item svg { width:17px; height:17px; color:var(--ink-2); }
.profile-menu-item:hover { background:var(--surface-2); }
.profile-menu-item.danger,.profile-menu-item.danger svg { color:var(--danger); } .profile-menu-item.danger:hover { background:var(--danger-50); }

.app-body { display:flex; align-items:flex-start; }
.sidebar { width:var(--sidebar-w); flex:0 0 var(--sidebar-w); margin:0 0 28px 24px; padding:18px 14px; border-radius:28px; background:var(--surface); display:flex; flex-direction:column; gap:4px;
  position:sticky; top:calc(var(--header-total-h, var(--header-h)) + 4px); max-height:calc(100vh - var(--header-total-h, var(--header-h)) - 48px); overflow-y:auto; }
.sidebar-section-label { padding:18px 16px 6px; font-size:.6875rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--ink-3); }
.sidebar-section-label:first-child { padding-top:6px; }
.nav-btn,.nav-parent-btn { display:flex; align-items:center; gap:14px; width:100%; min-height:46px; padding:0 16px; border-radius:var(--r-chip); font-weight:500; color:var(--ink-2); text-align:left; white-space:nowrap; transition:background var(--t),color var(--t); }
.nav-btn > svg,.nav-parent-btn > svg:first-child { width:20px; height:20px; flex:0 0 20px; }
.nav-btn:hover,.nav-parent-btn:hover { background:var(--surface-2); color:var(--ink); }
.nav-btn.active { background:var(--ink); color:var(--on-ink); font-weight:600; } .nav-btn.active svg { color:var(--wa); }
.nav-parent-btn.active { background:var(--brand-50); color:var(--ink); font-weight:600; }
.nav-parent-label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.nav-chevron { width:14px; height:14px; flex:0 0 14px; margin-left:auto; color:var(--ink-3); transition:transform var(--t); }
.nav-group.expanded .nav-chevron { transform:rotate(180deg); }
.nav-submenu { display:none; flex-direction:column; gap:2px; margin-left:30px; padding:4px 0 8px 10px; border-left:2px solid var(--brand-100); }
.nav-group.expanded .nav-submenu { display:flex; animation:rise var(--t-slow) both; }
.nav-sub-btn { display:flex; align-items:center; gap:10px; width:100%; min-height:40px; padding:0 14px; border-radius:var(--r-chip); font-size:.875rem; font-weight:500; color:var(--ink-2); text-align:left; transition:var(--t); }
.nav-sub-btn svg { width:16px; height:16px; flex:0 0 16px; }
.nav-sub-btn:hover { background:var(--surface-2); color:var(--ink); }
.nav-sub-btn.active { background:var(--ink); color:var(--on-ink); } .nav-sub-btn.active svg { color:var(--wa); }
.sidebar-overlay { display:none; }

.main-content { flex:1; min-width:0; padding:8px 40px 48px; }
.main-content > * { animation:rise var(--t-slow) both; }
@keyframes rise { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.page-header { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:28px; }
.page-title { font-size:2.125rem; letter-spacing:-.03em; }
.page-desc { margin-top:6px; color:var(--ink-2); }

.impersonation-bar { position:sticky; top:0; z-index:110; padding:10px 40px; background:var(--ink); color:var(--on-ink); border-radius:0 0 24px 24px; }
.impersonation-content { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.imp-info { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.imp-badge { font-size:.6875rem; font-weight:600; letter-spacing:.08em; padding:4px 10px; border-radius:var(--r-chip); background:var(--brand); color:var(--on-brand); }
.imp-name-wrap { display:flex; gap:8px; align-items:baseline; } .imp-dept { opacity:.7; font-size:.8125rem; }
.imp-pulse-dot,.live-dot { width:9px; height:9px; border-radius:50%; background:var(--wa); display:inline-block; animation:pulse 2s infinite; flex:0 0 9px; }
@keyframes pulse { 0% { box-shadow:0 0 0 0 rgba(37,211,102,.55); } 70% { box-shadow:0 0 0 9px rgba(37,211,102,0); } 100% { box-shadow:0 0 0 0 rgba(37,211,102,0); } }
.impersonation-actions { display:flex; gap:8px; }
.imp-btn { display:inline-flex; align-items:center; gap:8px; min-height:34px; padding:0 14px; border-radius:var(--r-chip); font-size:.8125rem; font-weight:500; background:rgba(255,255,255,.12); color:inherit; transition:var(--t); }
.imp-btn:hover { background:rgba(255,255,255,.22); }
.imp-btn-return { background:var(--brand); color:var(--on-brand); } .imp-btn-return:hover { background:var(--brand-600); }
#page-app.has-impersonation { --imp-bar-h:54px; --header-total-h:calc(var(--header-h) + var(--imp-bar-h)); }
#page-app.has-impersonation .app-header { top:var(--imp-bar-h); }

/* 6 — CARDS, STATS, BADGES -------------------------------------------------*/
.card,.perf-card,.sr-card,.exp-card,.ov-card,.new-task-card,.punch-board-card,.task-schedule-card,.perf-calendar-card,.issues-list-pane,.issues-detail-pane { background:var(--surface); border-radius:var(--r-card); min-width:0; }
.card { overflow:hidden; } .card + .card { margin-top:24px; }
.card-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:24px 28px 12px; }
.card-title { font-size:1.125rem; }
.card-body { padding:12px 28px 28px; }
.stats-grid,.tasks-kpi-grid,.sr-summary-grid,.exp-stats-grid,.emp-summary-grid { display:grid; gap:20px; margin-bottom:28px; }
.stats-grid { grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr)); }
.tasks-kpi-grid { grid-template-columns:repeat(4,1fr); } .sr-summary-grid { grid-template-columns:repeat(5,1fr); } .exp-stats-grid { grid-template-columns:repeat(3,1fr); } .emp-summary-grid { grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr)); }
.stat-card,.tasks-kpi-card,.sr-stat-card,.exp-stat-card,.emp-summary-card { display:flex; flex-direction:column; gap:6px; padding:24px; border-radius:var(--r-card); background:var(--brand-50); transition:background var(--t); }
:is(.stats-grid,.tasks-kpi-grid,.sr-summary-grid,.exp-stats-grid,.emp-summary-grid) > :nth-child(3n+2) { background:var(--ig-50); }
:is(.stats-grid,.tasks-kpi-grid,.sr-summary-grid,.exp-stats-grid,.emp-summary-grid) > :nth-child(3n) { background:var(--sand-50); }
.stat-value,.kpi-num,.sr-stat-val,.exp-stat-value,.emp-summary-num { font-size:2.25rem; font-weight:600; line-height:1.1; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.stat-label,.kpi-label,.sr-stat-lbl,.exp-stat-label,.emp-summary-label { font-size:.875rem; font-weight:500; color:var(--ink-2); }
.kpi-content,.exp-stat-info,.emp-summary-text { display:flex; flex-direction:column; gap:4px; } .exp-stat-sub { font-size:.75rem; color:var(--ink-3); }
.exp-stat-card { flex-direction:row; align-items:center; gap:16px; }
.exp-stat-icon,.exp-badge-icon,.exp-header-icon { display:grid; place-items:center; border-radius:50%; background:var(--surface); color:var(--brand); flex:0 0 auto; }
.exp-stat-icon { width:52px; height:52px; } .exp-badge-icon { width:30px; height:30px; background:var(--brand-50); } .exp-header-icon { width:56px; height:56px; background:var(--brand-50); }
.exp-stat-icon svg,.exp-header-icon svg { width:24px; height:24px; } .exp-badge-icon svg { width:15px; height:15px; }
.sr-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:8px; background:var(--ink-3); }
.sr-dot-green { background:var(--wa); } .sr-dot-orange { background:var(--warn); } .sr-dot-red { background:var(--ig); } .sr-dot-gray { background:var(--ink-3); }

.badge,.sr-badge,.schedule-badge,.perf-badge,.issue-category-tag,.comment-author-badge,.su-dept-badge,.active-badge,.su-count-badge,.tab-count-pill,.media-badge-pill,.ov-summary-pill {
  display:inline-flex; align-items:center; gap:6px; padding:4px 12px; border-radius:var(--r-chip); font-size:.75rem; font-weight:500; line-height:1.4; background:var(--surface-2); color:var(--ink-2); white-space:nowrap; }
.badge-sm { padding:2px 9px; font-size:.6875rem; }
.badge-success,.badge-wa,.perf-badge.on-target,.perf-badge.on_time,.tag-size,.sr-badge-1st,.schedule-badge.active-badge,.su-active-badge { background:var(--wa-50); color:var(--wa-ink); }
.badge-ig,.badge-red,.tag-quality,.perf-badge.below-target,.perf-badge.issue,.perf-badge.issue-badge,.sr-badge-3rd { background:var(--ig-50); color:var(--ig-ink); }
.badge-warning,.perf-badge.late,.perf-badge.delayed,.perf-badge.upcoming,.sr-badge-2nd,.sr-badge-delayed { background:var(--warn-50); color:var(--warn); }
.perf-badge.overdue,.perf-badge.overdue-badge { background:var(--danger-50); color:var(--danger); }
.perf-badge.no-target { background:var(--surface-2); color:var(--ink-3); }
.badge-accent { background:var(--ink); color:var(--on-ink); }
.su-active-badge { display:inline-flex; align-items:center; gap:6px; padding:4px 12px; border-radius:var(--r-chip); font-size:.75rem; font-weight:500; }

/* 7 — TABLES ----------------------------------------------------------------*/
.table-responsive,.table-wrapper,.sr-table-container,.exp-table-responsive { width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
table,.table,.sr-table,.exp-table,.ov-table { width:100%; border-collapse:separate; border-spacing:0; font-size:.875rem; text-align:left; }
th { padding:12px 20px; font-size:.8125rem; font-weight:500; color:var(--ink-3); white-space:nowrap; border-bottom:1px solid var(--line); background:transparent; text-transform:none; }
td { padding:16px 20px; border-bottom:1px solid var(--line); vertical-align:middle; white-space:nowrap; transition:background var(--t); }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover td { background:var(--brand-50); }
tbody tr:hover td:first-child { border-radius:16px 0 0 16px; } tbody tr:hover td:last-child { border-radius:0 16px 16px 0; }
th.sortable { cursor:pointer; user-select:none; transition:color var(--t); } th.sortable:hover,th.sort-active { color:var(--ink); }
.sort-indicator { margin-left:4px; font-size:.7rem; opacity:.6; }
td.primary { font-weight:500; }
.sr-track-link { display:inline-flex; align-items:center; gap:6px; color:var(--brand); font-weight:500; } .sr-track-link:hover { text-decoration:underline; }
.exp-action-btn { width:34px; height:34px; border-radius:50%; display:inline-grid; place-items:center; color:var(--ink-2); transition:var(--t); }
.exp-btn-edit:hover { background:var(--brand-50); color:var(--brand); } .exp-btn-del:hover { background:var(--danger-50); color:var(--danger); }
.pagination,.sr-table-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:16px 24px; }
.page-info { font-size:.8125rem; color:var(--ink-2); }
.empty-state,.sr-empty-state,.exp-empty-state { display:flex; flex-direction:column; align-items:center; gap:8px; padding:48px 24px; text-align:center; color:var(--ink-2); border-radius:var(--r-card); background:var(--brand-50); }
.empty-state svg { width:40px; height:40px; color:var(--brand); margin-bottom:4px; } .empty-state h3 { color:var(--ink); }
td > .empty-state { background:transparent; }
.loading-block { display:flex; align-items:center; justify-content:center; gap:12px; padding:48px; color:var(--ink-2); }
.spinner { width:20px; height:20px; border-radius:50%; border:2.5px solid var(--brand-100); border-top-color:var(--brand); animation:spin .7s linear infinite; display:inline-block; }
@keyframes spin { to { transform:rotate(360deg); } }

/* 8 — TABS & PILL FILTERS ----------------------------------------------------*/
.tabs,.issues-status-tabs,.rm-subpage-switcher,.perf-date-pills,.tasks-emp-pills,.pill-group,.issues-filter-chips,.assignee-pills-row { display:flex; flex-wrap:wrap; gap:8px; }
.tabs { margin-bottom:20px; }
.rm-subpage-switcher { margin-bottom:24px; padding:6px; border-radius:var(--r-chip); background:var(--surface); width:fit-content; max-width:100%; }
.tab-btn,.issues-status-tab,.rm-subpage-btn,.perf-pill,.emp-pill,.pill-btn,.issue-chip,.assignee-pill,.punch-filter-pill { display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:0 18px; border-radius:var(--r-chip); font-size:.875rem; font-weight:500; color:var(--ink-2); background:var(--surface); border:1px solid var(--line); white-space:nowrap; transition:var(--t); }
.rm-subpage-btn { background:transparent; border-color:transparent; }
.tab-btn:hover,.issues-status-tab:hover,.rm-subpage-btn:hover,.perf-pill:hover,.emp-pill:hover,.pill-btn:hover,.issue-chip:hover,.assignee-pill:hover,.punch-filter-pill:hover { background:var(--brand-50); color:var(--ink); }
.tab-btn.active,.issues-status-tab.active,.rm-subpage-btn.active,.perf-pill.active,.emp-pill.active,.pill-btn.active,.issue-chip.active,.assignee-pill.selected,.punch-filter-pill.active { background:var(--ink); color:var(--on-ink); border-color:var(--ink); }
.issues-status-tab.active .tab-count-pill { background:rgba(255,255,255,.2); color:inherit; }
.tab-count-pill { padding:1px 9px; }

/* 9 — MODALS, TOAST, LIGHTBOX ------------------------------------------------*/
.modal-backdrop { position:fixed; inset:0; z-index:200; display:grid; place-items:center; padding:20px; background:var(--scrim); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  opacity:0; visibility:hidden; transition:opacity var(--t-slow),visibility var(--t-slow); }
.modal-backdrop.open { opacity:1; visibility:visible; }
.modal { width:100%; max-width:480px; max-height:calc(100dvh - 40px); display:flex; flex-direction:column; background:var(--surface); border-radius:var(--r-modal); box-shadow:var(--shadow); overflow:hidden;
  transform:translateY(14px) scale(.98); transition:transform var(--t-slow); }
.modal-backdrop.open .modal { transform:none; }
.modal-sm { max-width:460px; } .modal-switch-user { max-width:580px; }
.modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:28px 28px 8px; }
.modal-title { font-size:1.25rem; }
.modal-body { padding:12px 28px 20px; overflow-y:auto; flex:1; }
.modal-footer { display:flex; justify-content:flex-end; gap:10px; padding:12px 28px 28px; }
.modal-divider { height:1px; background:var(--line); margin:16px 0; }
.modal-close { width:38px; height:38px; flex:0 0 38px; border-radius:50%; display:grid; place-items:center; background:var(--surface-2); color:var(--ink-2); font-size:1.4rem; line-height:1; transition:var(--t); }
.modal-close:hover { background:var(--danger-50); color:var(--danger); transform:rotate(90deg); }
.file-modal-scroll { display:flex; flex-direction:column; gap:10px; max-height:55vh; overflow-y:auto; }
.file-modal-item { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 14px; border-radius:var(--r-tile); background:var(--surface-2); transition:var(--t); }
.file-modal-item:hover { background:var(--brand-50); }
.file-modal-info { display:flex; align-items:center; gap:12px; min-width:0; } .file-modal-details { display:flex; flex-direction:column; min-width:0; } .file-modal-actions { display:flex; gap:8px; }
.toast { position:fixed; left:50%; bottom:28px; z-index:900; max-width:calc(100vw - 32px); padding:13px 22px; border-radius:var(--r-chip); background:var(--ink); color:var(--on-ink); font-weight:500; box-shadow:var(--shadow);
  transform:translate(-50%,20px); opacity:0; pointer-events:none; transition:transform var(--t-slow),opacity var(--t-slow); display:flex; align-items:center; gap:10px; }
.toast::before { content:""; width:8px; height:8px; border-radius:50%; background:var(--ink-3); flex:0 0 8px; }
.toast.show { transform:translate(-50%,0); opacity:1; }
.toast-success::before { background:var(--wa); } .toast-error::before { background:var(--ig); }

.lightbox-modal {
  position:fixed; inset:0; z-index:800; display:grid; place-items:center; padding:20px;
  background:rgba(5,10,7,.88); opacity:0; visibility:hidden;
  backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  transition:opacity var(--t-slow), visibility var(--t-slow);
}
.lightbox-modal.open { opacity:1; visibility:visible; }
.lightbox-content {
  width:100%; max-width:920px; max-height:92dvh; display:flex; flex-direction:column;
  border-radius:24px; background:#0c120e; color:#fff; overflow:hidden;
  box-shadow:0 30px 80px rgba(0,0,0,.8); border:1px solid rgba(255,255,255,.14);
  transform:scale(.96); transition:transform var(--t-slow);
}
.lightbox-modal.open .lightbox-content { transform:scale(1); }
.lightbox-header {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:16px 22px; border-bottom:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.03);
}
.lightbox-title { font-size:1.0625rem; font-weight:600; color:#fff; }
.lightbox-close-btn {
  width:36px; height:36px; flex:0 0 36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.16);
  font-size:1.35rem; line-height:1; cursor:pointer;
  transition:background var(--t), border-color var(--t), color var(--t);
  transform:none !important;
}
.lightbox-close-btn:hover {
  background:rgba(255,255,255,.24); color:#fff; border-color:rgba(255,255,255,.32);
  transform:none !important;
}
.lightbox-close-btn:active {
  transform:scale(.92) !important;
}
.lightbox-content .modal-close {
  background:rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.16);
  width:36px; height:36px; flex:0 0 36px; border-radius:50%; display:flex; align-items:center; justify-content:center;
  cursor:pointer; font-size:1.35rem; line-height:1;
  transition:background var(--t), border-color var(--t), color var(--t);
  transform:none !important;
}
.lightbox-content .modal-close:hover {
  background:rgba(255,255,255,.24); color:#fff; border-color:rgba(255,255,255,.32);
  transform:none !important;
}
.lightbox-content .modal-close:active {
  transform:scale(.92) !important;
}
.lightbox-btn-download {
  display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:0 14px;
  border-radius:var(--r-chip); background:rgba(255,255,255,.1); color:#fff;
  font-size:.8125rem; font-weight:500; border:1px solid rgba(255,255,255,.15);
  text-decoration:none; transition:background var(--t);
}
.lightbox-btn-download:hover { background:rgba(255,255,255,.2); color:#fff; }
.lightbox-body { flex:1; min-height:0; display:grid; place-items:center; padding:20px; background:#000; overflow:hidden; }
.lightbox-body img,.lightbox-body video { max-height:74dvh; max-width:100%; width:auto; border-radius:14px; outline:none; }

/* 9.5 — ISSUE DETAIL BOTTOM SHEET MODAL -----------------------------------*/
.issue-modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  display: flex; justify-content: center; align-items: flex-end;
  background: rgba(5, 10, 7, 0.76);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-slow), visibility var(--t-slow);
}
.issue-modal-backdrop.open { opacity: 1; visibility: visible; }
.issue-modal-sheet {
  width: 100%; max-width: 900px; max-height: 92vh; max-height: 92dvh;
  background: var(--surface); border-radius: 28px 28px 0 0;
  box-shadow: 0 -12px 60px rgba(0, 0, 0, 0.65);
  border: 1px solid var(--line-2); border-bottom: none;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 24px 28px 40px;
  transform: translateY(100%);
  transition: transform var(--t-slow);
}
.issue-modal-backdrop.open .issue-modal-sheet { transform: translateY(0); }
.issue-sheet-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: sticky; top: -24px; z-index: 10; margin: -24px -28px 20px; padding: 14px 24px;
  background: var(--surface); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.btn-close-issue-sheet {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 16px;
  border-radius: var(--r-chip); background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--line-2); font-weight: 500; font-size: .8125rem; cursor: pointer;
  transition: background var(--t), border-color var(--t);
}
.btn-close-issue-sheet:hover { background: var(--brand-50); border-color: var(--brand); }
.issue-sheet-ref-badge {
  font-family: var(--font-mono); font-weight: 700; font-size: .8125rem; padding: 5px 14px;
  border-radius: var(--r-chip); background: var(--surface-2); color: var(--ink-2); letter-spacing: .02em;
}
.issue-sheet-close-btn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2);
  font-size: 1.25rem; cursor: pointer; transition: background var(--t), color var(--t);
}
.issue-sheet-close-btn:hover { background: var(--danger-50); color: var(--danger); }

/* 10 — SWITCH USER ---------------------------------------------------------*/
.switch-user-icon-box { width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:var(--brand-50); color:var(--brand); flex:0 0 44px; }
.su-section-title { display:flex; justify-content:space-between; align-items:center; margin:20px 0 10px; font-size:.75rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-3); }
.su-list { display:flex; flex-direction:column; gap:10px; max-height:46vh; overflow-y:auto; padding-right:4px; }
.su-emp-card,.su-owner-card { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; border-radius:var(--r-tile); background:var(--surface-2); cursor:pointer; border:1px solid transparent; transition:background var(--t),border-color var(--t),transform var(--t); }
.su-emp-card:hover,.su-owner-card:hover { background:var(--brand-50); border-color:var(--brand-100); }
.su-emp-card:active,.su-owner-card:active { transform:scale(.99); }
.su-emp-card.active { background:var(--brand-50); border-color:var(--brand); cursor:default; }
.su-emp-left,.su-owner-left { display:flex; align-items:center; gap:14px; min-width:0; } .su-emp-info { display:flex; flex-direction:column; gap:6px; min-width:0; }
.su-avatar,.su-owner-avatar { width:42px; height:42px; flex:0 0 42px; border-radius:50%; display:grid; place-items:center; font-weight:600; font-size:.875rem; background:var(--ink); color:var(--on-ink); }
.su-owner-avatar { background:var(--brand); color:var(--on-brand); }
.su-emp-name-row { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; } .su-emp-name { font-weight:600; } .su-emp-username { font-size:.8125rem; color:var(--ink-3); }
.su-emp-depts { display:flex; gap:6px; flex-wrap:wrap; }
.su-view-btn { display:inline-flex; align-items:center; gap:4px; font-size:.8125rem; font-weight:500; color:var(--ink-2); transition:var(--t); }
.su-emp-card:hover .su-view-btn { color:var(--brand-600); transform:translateX(2px); }
.su-owner-title { font-weight:600; } .su-owner-desc { font-size:.8125rem; color:var(--ink-2); }
.su-return-btn { font-size:.8125rem; font-weight:500; color:var(--brand-600); }

/* 11 — OVERVIEW -----------------------------------------------------------*/
.brand-ico { display:inline-grid; place-items:center; width:38px; height:38px; border-radius:50%; flex:0 0 38px; }
.brand-ico svg { width:19px; height:19px; } .brand-wa { background:var(--wa-50); color:var(--wa-ink); } .brand-ig { background:var(--ig-50); color:var(--ig-ink); }
.ov-section-header { margin:36px 0 18px; } .ov-section-header:first-child { margin-top:0; }
.ov-section-title { display:flex; align-items:center; gap:12px; font-size:1.25rem; font-weight:600; letter-spacing:-.02em; }
.ov-section-title > svg { width:40px; height:40px; padding:10px; border-radius:50%; background:var(--brand-50); color:var(--brand); flex:0 0 40px; }
.ov-section-subtitle { margin:4px 0 0 52px; font-size:.875rem; color:var(--ink-2); }
.ov-grid-2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr)); gap:20px; margin-bottom:20px; }
.ov-card { display:flex; flex-direction:column; overflow:hidden; }
.ov-card-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:24px 28px 8px; flex-wrap:wrap; }
.ov-card-body { flex:1; padding:12px 28px 24px; }
.ov-card-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 28px; border-top:1px solid var(--line); font-size:.8125rem; color:var(--ink-2); flex-wrap:wrap; }
.ov-kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(120px,100%),1fr)); gap:12px; align-items:stretch; }
.ov-kpi-tile { display:flex; flex-direction:column; justify-content:space-between; gap:6px; padding:18px 16px; border-radius:var(--r-tile); background:var(--brand-50); transition:transform var(--t); }
.ov-kpi-tile:hover { transform:translateY(-2px); }
.ov-kpi-grid > :nth-child(2n) { background:var(--ig-50); }
.ov-kpi-val { font-size:1.875rem; font-weight:600; line-height:1; letter-spacing:-.03em; color:var(--ink); font-variant-numeric:tabular-nums; }
.ov-kpi-lbl { font-size:.8125rem; font-weight:500; color:var(--ink-2); }
.ov-pills-summary { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; } .ov-summary-pill strong { color:var(--ink); font-weight:600; }
.ov-chart-bars { display:grid; grid-template-columns:repeat(7,1fr); gap:10px; align-items:end; height:190px; margin-bottom:20px; padding:8px 4px 0; border-bottom:1px solid var(--line);
  background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),var(--line) calc(25% - 1px),var(--line) 25%); }
.ov-bar-col { display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; min-width:0; }
.ov-bar-val { margin-bottom:6px; font-size:.8125rem; font-weight:500; color:var(--ink-3); } .ov-bar-val.is-on { color:var(--ink); font-weight:600; }
.ov-bar-track { width:100%; max-width:36px; height:118px; display:flex; align-items:flex-end; border-radius:var(--r-chip); background:var(--surface-2); overflow:hidden; }
.ov-bar-fill { width:100%; min-height:6px; border-radius:var(--r-chip); transition:height .5s var(--ease); }
.ov-bar-fill.wa.is-on { background:linear-gradient(180deg,var(--wa),var(--brand)); } .ov-bar-fill.ig.is-on { background:linear-gradient(180deg,#f08ab0,var(--ig)); }
.ov-bar-fill.wa.is-low { background:var(--wa-50); } .ov-bar-fill.ig.is-low { background:var(--ig-50); } .ov-bar-fill.is-empty { background:transparent; }
.ov-bar-lbl { margin-top:8px; font-size:.75rem; color:var(--ink-3); text-align:center; white-space:nowrap; } .ov-bar-lbl.is-today { color:var(--ink); font-weight:600; }
.ov-bar-col:hover .ov-bar-track { background:var(--surface-3); }
.ov-exp-day { border-radius:var(--r-tile); background:var(--surface-2); margin-bottom:12px; overflow:hidden; }
.ov-exp-day-header { display:flex; justify-content:space-between; align-items:center; padding:14px 20px; font-weight:600; }
.ov-exp-day-body { padding:0 20px 14px; } .ov-exp-item-row { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-top:1px solid var(--line); }

/* 12 — PERFORMANCE ---------------------------------------------------------*/
.perf-header { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
.perf-header-left { display:flex; flex-direction:column; gap:4px; } .perf-title { font-size:2.125rem; letter-spacing:-.03em; } .perf-subtitle { color:var(--ink-2); }
.perf-header-right { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.perf-date-pills { padding:5px; border-radius:var(--r-chip); background:var(--surface); } .perf-date-pills .perf-pill { border-color:transparent; background:transparent; min-height:34px; }
.perf-date-pills .perf-pill.active { background:var(--ink); }
.perf-custom-range { display:flex; align-items:center; gap:8px; flex-wrap:wrap; } .perf-custom-range input[type="date"] { width:auto; min-height:38px; }
.perf-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(340px,100%),1fr)); gap:20px; margin-bottom:24px; }
.perf-card { display:flex; flex-direction:column; gap:8px; padding:26px; }
.perf-card-header { display:flex; align-items:center; justify-content:space-between; gap:12px; } .perf-card-title { font-weight:600; font-size:1rem; }
.perf-big-num { font-size:2.75rem; font-weight:600; line-height:1; letter-spacing:-.035em; margin-top:6px; font-variant-numeric:tabular-nums; } .perf-num-sub { font-size:.8125rem; color:var(--ink-3); }
.perf-target-row { display:flex; justify-content:space-between; margin-top:14px; font-size:.8125rem; color:var(--ink-2); } .perf-target-pct { font-weight:600; color:var(--ink); }
.perf-progress-track { height:8px; border-radius:var(--r-chip); background:var(--surface-2); overflow:hidden; }
.perf-progress-bar { height:100%; border-radius:var(--r-chip); background:var(--brand); transition:width .6s var(--ease); }
.perf-chart-wrap { margin-top:16px; padding:12px 10px 0; border-radius:var(--r-tile); background:var(--surface-2); }
.perf-chart-svg { width:100%; height:auto; overflow:visible; display:block; }
.perf-bar { transition:opacity var(--t); } .perf-bar:hover { opacity:.78; }
.chart-legend { display:flex; flex-wrap:wrap; gap:14px; padding:8px 8px 12px; font-size:.75rem; color:var(--ink-2); } .chart-legend span { display:inline-flex; align-items:center; gap:6px; }
.lg-dot { width:9px; height:9px; border-radius:50%; display:inline-block; } .lg-line { width:16px; border-top:2px dashed var(--ink-3); display:inline-block; }
.perf-card-footer { display:flex; justify-content:space-between; gap:8px; margin-top:14px; font-size:.8125rem; color:var(--ink-2); }
.perf-footer-right.positive { color:var(--wa-ink); font-weight:500; } .perf-footer-right.negative { color:var(--ig-ink); font-weight:500; } .perf-footer-right.neutral { color:var(--ink-3); }
.perf-calendar-card { padding:28px; }
.perf-cal-header { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.perf-cal-title { font-size:1.25rem; font-weight:600; } .perf-cal-controls { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.perf-cal-legend { display:flex; gap:14px; font-size:.8125rem; color:var(--ink-2); } .perf-cal-legend > * { display:inline-flex; align-items:center; gap:6px; }
.perf-legend-dot,.perf-day-dot { width:8px; height:8px; border-radius:50%; display:inline-block; } .perf-legend-dot.met,.perf-day-dot.met { background:var(--wa); } .perf-legend-dot.below,.perf-day-dot.below { background:var(--ig); }
.perf-cal-nav { display:flex; align-items:center; gap:6px; } .perf-cal-month-label { min-width:130px; text-align:center; font-weight:600; }
.perf-cal-nav button { width:36px; height:36px; border-radius:50%; display:grid; place-items:center; background:var(--surface-2); transition:var(--t); } .perf-cal-nav button:hover { background:var(--brand-50); color:var(--brand); }
.perf-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.perf-cal-weekday { padding:6px 0; text-align:center; font-size:.75rem; font-weight:500; color:var(--ink-3); }
.perf-cal-day { min-height:68px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; border-radius:var(--r-tile); background:var(--surface-2); transition:background var(--t),transform var(--t); }
.perf-cal-day:hover:not(.empty):not(.future) { background:var(--brand-50); transform:translateY(-1px); }
.perf-cal-day.empty { background:transparent; } .perf-cal-day.future { opacity:.45; }
.perf-cal-day.today { background:var(--ink); color:var(--on-ink); }
.perf-day-num { font-weight:600; } .perf-day-status { font-size:.6875rem; color:var(--ink-3); }

/* 13 — TASKS --------------------------------------------------------------*/
.tasks-header,.emp-tasks-header { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
.tasks-header-left { display:flex; flex-direction:column; gap:4px; }
.tasks-filter-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:24px; } .tasks-filter-label { font-weight:500; color:var(--ink-2); } .tasks-view-note { font-size:.8125rem; color:var(--ink-3); }
.tasks-layout-grid { display:grid; grid-template-columns:1.35fr 1fr; gap:24px; align-items:start; } .tasks-left-col,.tasks-right-col { display:flex; flex-direction:column; gap:24px; min-width:0; }
.punch-board-card,.task-schedule-card,.new-task-card { padding:26px; }
.punch-list { display:flex; flex-direction:column; gap:12px; margin-top:16px; }
.punch-item,.schedule-item,.emp-task-card { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px 20px; border-radius:var(--r-tile); background:var(--brand-50); transition:background var(--t),transform var(--t); }
.punch-item:nth-child(even),.schedule-item:nth-child(even),.emp-task-card:nth-child(even) { background:var(--ig-50); }
.punch-item:hover,.schedule-item:hover { transform:translateX(3px); }
.punch-item-left,.schedule-item-main { display:flex; flex-direction:column; gap:4px; min-width:0; } .punch-item-right { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.punch-task-title,.schedule-title,.emp-task-title { font-weight:600; } .punch-subtext,.schedule-assignee,.emp-task-meta,.emp-task-helper,.punch-note { font-size:.8125rem; color:var(--ink-2); } .punch-time-val { font-weight:600; font-variant-numeric:tabular-nums; }
.schedule-badges { display:flex; gap:6px; flex-wrap:wrap; }
.emp-tasks-list { display:flex; flex-direction:column; gap:14px; }
.emp-task-card { display:grid; grid-template-columns:140px 1fr auto; align-items:center; gap:20px; padding:22px 24px; }
.emp-task-card.is-punched { background:var(--wa-50); }
.emp-task-col-deadline,.emp-task-col-body { display:flex; flex-direction:column; gap:4px; min-width:0; } .emp-task-col-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.deadline-label,.punched-label { font-size:.75rem; color:var(--ink-3); } .deadline-time,.punched-time { font-size:1.375rem; font-weight:600; letter-spacing:-.02em; }
.btn-toggle-proof,.btn-punch-action { display:inline-flex; align-items:center; gap:8px; min-height:36px; padding:0 16px; border-radius:var(--r-chip); background:var(--surface); border:1px solid var(--line-2); font-size:.8125rem; font-weight:500; transition:var(--t); }
.btn-toggle-proof:hover,.btn-punch-action:hover { background:var(--brand-50); border-color:var(--brand); color:var(--brand-600); }
.emp-proof-expand { margin-top:12px; padding:14px; border-radius:var(--r-ctl); background:var(--surface); }
.emp-progress-track { height:8px; border-radius:var(--r-chip); background:var(--surface-2); overflow:hidden; } .emp-progress-fill { height:100%; background:var(--brand); border-radius:inherit; }
.live-clock-card { padding:8px 16px; border-radius:var(--r-chip); background:var(--surface); font-weight:500; font-variant-numeric:tabular-nums; }
.report-filter-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr)); gap:14px; align-items:end; }
.assign-dept-header { display:flex; justify-content:space-between; align-items:center; margin:12px 0 8px; font-weight:600; } .btn-select-all-dept { font-size:.8125rem; font-weight:500; color:var(--brand-600); }
.assignee-pill { min-height:34px; padding:0 14px; font-size:.8125rem; } .pill-btn { min-height:36px; }
.custom-days-select { display:flex; flex-wrap:wrap; gap:8px; } .day-check { display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:var(--r-chip); background:var(--surface-2); font-size:.8125rem; cursor:pointer; transition:var(--t); } .day-check:hover { background:var(--brand-50); }
.task-info-callout { display:flex; gap:12px; padding:14px 16px; border-radius:var(--r-ctl); background:var(--brand-50); color:var(--ink-2); font-size:.8125rem; } .task-info-callout svg { width:18px; height:18px; flex:0 0 18px; color:var(--brand); margin-top:2px; }

/* 14 — SHIPROCKET ---------------------------------------------------------*/
.shiprocket-page,.expenses-page { display:flex; flex-direction:column; gap:24px; }
.sr-breadcrumb { font-size:.8125rem; color:var(--ink-3); } .sr-breadcrumb span { color:var(--ink); font-weight:500; }
.sr-title,.exp-title { font-size:2.125rem; letter-spacing:-.03em; } .sr-subtitle,.exp-subtitle { margin-top:6px; color:var(--ink-2); max-width:64ch; }
.sr-card,.exp-card { padding:28px; } .sr-card-title,.exp-card-title { font-size:1.125rem; font-weight:600; margin-bottom:18px; }
.sr-form-grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; } .sr-form-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.sr-attempt-group { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.sr-attempt-btn { min-height:44px; border-radius:var(--r-ctl); background:var(--surface-2); font-weight:500; transition:var(--t); } .sr-attempt-btn:hover { background:var(--brand-50); } .sr-attempt-btn.active { background:var(--ink); color:var(--on-ink); }
.sr-filters-bar { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-end; margin-bottom:20px; } .sr-filter-item { display:flex; flex-direction:column; gap:6px; }

/* 15 — EXPENSES -----------------------------------------------------------*/
.exp-header { display:flex; align-items:center; gap:18px; }
.exp-grid-2 { display:grid; grid-template-columns:1.15fr .85fr; gap:24px; align-items:start; }
.exp-card-header { display:flex; align-items:center; gap:12px; margin-bottom:18px; } .exp-card-header .exp-card-title { margin:0; }
.exp-form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; } .exp-form-group { display:flex; flex-direction:column; gap:8px; margin-bottom:16px; }
.exp-input-currency-wrap { position:relative; } .exp-currency-symbol { position:absolute; left:16px; top:50%; transform:translateY(-50%); color:var(--ink-2); font-weight:500; } .exp-input-currency-wrap .exp-input { padding-left:34px; }
.exp-readonly { color:var(--ink-2); cursor:not-allowed; }
.exp-form-actions,.exp-download-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.exp-table-header-wrap { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:16px; }

/* 16 — ISSUES -------------------------------------------------------------*/
.issues-topbar { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:16px; } .issues-links-group,.issues-controls-right { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.issues-filter-bar { display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.issues-date-filter { display:flex; align-items:center; gap:8px; } .issues-date-filter input[type="date"] { width:150px; min-height:38px; } .issues-sort-wrap select { min-height:38px; width:auto; }
.issues-layout { display:block; width:100%; }
.issues-list-pane { width:100%; display:flex; flex-direction:column; padding:20px; gap:16px; max-height:none; } .issues-list-cards { display:grid; grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:12px; overflow-y:visible; padding-right:0; }
.issue-card { padding:16px 18px; border-radius:var(--r-tile); background:var(--surface-2); cursor:pointer; border:1px solid transparent; transition:background var(--t),border-color var(--t),transform var(--t); }
.issue-card:hover { background:var(--brand-50); transform:translateX(2px); } .issue-card.active { background:var(--brand-50); border-color:var(--brand); }
.issue-card-header,.issue-card-footer { display:flex; justify-content:space-between; align-items:center; gap:10px; } .issue-card-name { margin-top:8px; font-weight:600; } .issue-card-ref,.issue-time-sub,.card-stat-item { font-size:.75rem; color:var(--ink-3); } .issue-card-summary { margin:6px 0 10px; font-size:.8125rem; color:var(--ink-2); display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.issues-detail-pane { display:none; }
.mobile-detail-nav { display:none; }
.detail-header-wrap { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.detail-header-main { min-width:0; }
.detail-header-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.detail-customer-title { font-size:1.5rem; margin-top:6px; }
.detail-meta-row { display:flex; gap:14px; flex-wrap:wrap; align-items:center; margin-top:8px; color:var(--ink-2); font-size:.8125rem; }
.detail-ref-badge { font-family:var(--font-mono); font-weight:700; color:var(--ink-2); font-size:.85rem; }
.detail-section-title { font-size:.8125rem; font-weight:600; color:var(--ink-2); margin-bottom:8px; text-transform:uppercase; letter-spacing:.04em; }
.detail-tile-ref { font-family:var(--font-mono); color:var(--brand); font-weight:700; }
.issue-solved-banner { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding:14px 18px; margin-bottom:20px; border-radius:var(--r-tile); background:var(--wa-50); color:var(--wa-ink); } .solved-banner-text { font-weight:500; display:flex; align-items:center; gap:10px; }
.detail-info-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr)); gap:12px; margin-bottom:20px; }
.detail-info-tile { display:flex; flex-direction:column; gap:4px; padding:16px; border-radius:var(--r-tile); background:var(--brand-50); min-width:0; } .detail-info-tile:nth-child(2n) { background:var(--ig-50); } .tile-value { font-weight:600; }
.detail-comment-box { padding:16px 18px; border-radius:var(--r-tile); background:var(--surface-2); margin-bottom:20px; line-height:1.5; color:var(--ink); }
.detail-media-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(150px,100%),1fr)); gap:12px; margin-bottom:20px; }
.detail-media-card { display:flex; flex-direction:column; border-radius:var(--r-tile); background:var(--surface-2); overflow:hidden; cursor:pointer; transition:transform var(--t); } .detail-media-card:hover { transform:translateY(-3px); }
.media-thumb-wrap { position:relative; aspect-ratio:4/3; overflow:hidden; background:var(--surface-3); } .media-thumb-wrap img,.media-thumb-wrap video { width:100%; height:100%; object-fit:cover; }
.media-badge-pill { position:absolute; top:8px; left:8px; background:rgba(0,0,0,.6); color:#fff; backdrop-filter:blur(4px); }
.media-play-overlay { position:absolute; inset:0; display:grid; place-items:center; background:rgba(0,0,0,.25); } .media-play-btn { width:44px; height:44px; border-radius:50%; display:grid; place-items:center; background:#fff; color:#111; }
.media-label-text { padding:10px 12px; font-size:.8125rem; font-weight:500; }
.comments-timeline { display:flex; flex-direction:column; gap:12px; margin-bottom:16px; }
.team-comment-item { padding:14px 18px; border-radius:var(--r-tile); background:var(--surface-2); } .comment-meta-row { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:6px; } .comment-time-text { font-size:.75rem; color:var(--ink-3); } .comment-body-text { color:var(--ink); }
.add-comment-wrap { display:flex; flex-direction:column; gap:10px; }
.detail-actions-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }

/* 17 — RESPONSIVE ---------------------------------------------------------*/
@media (max-width:1200px) {
  .tasks-kpi-grid { grid-template-columns:repeat(2,1fr); } .sr-summary-grid { grid-template-columns:repeat(3,1fr); }
  .tasks-layout-grid,.exp-grid-2 { grid-template-columns:1fr; } .issues-layout { grid-template-columns:320px 1fr; }
}
@media (max-width:900px) {
  .issues-list-cards { grid-template-columns: 1fr; }
  .issue-modal-sheet {
    max-width: 100%; max-height: 94dvh; padding: 16px 16px 40px; border-radius: 24px 24px 0 0;
  }
  .issue-sheet-topbar {
    top: -16px; margin: -16px -16px 18px; padding: 12px 16px;
  }
  .detail-header-wrap { flex-direction: column; align-items: stretch; gap: 14px; }
  .detail-header-actions { width: 100%; justify-content: flex-start; }
  .btn-whatsapp-chat { flex: 1; justify-content: center; }
  .sr-form-grid-3 { grid-template-columns:1fr 1fr; } .emp-task-card { grid-template-columns:1fr; gap:12px; } .emp-task-col-actions { justify-content:flex-start; }
}
@media (max-width:800px) {
  body { background-attachment:scroll; }
  :root { --header-h:68px; --header-total-h:68px; --imp-bar-h:0px; }
  #page-app.has-impersonation { --imp-bar-h:88px; --header-total-h:calc(var(--header-h) + var(--imp-bar-h)); }
  #page-app.has-impersonation .app-header { top:var(--imp-bar-h); }
  #page-app { margin:0; border-radius:0; border:0; min-height:100vh; min-height:100dvh; }
  .app-header { padding:0 14px; backdrop-filter:blur(12px); position:sticky; top:var(--imp-bar-h, 0px); } .app-logo { height:26px; }
  .menu-toggle { display:grid; } .profile-username { display:none; } .profile-btn { padding:0 10px; }
  .app-body { display:block; }
  .sidebar { position:fixed; top:var(--header-total-h, var(--header-h)); bottom:0; left:0; z-index:95; width:300px; max-width:86vw; max-height:none; margin:0; border-radius:0 28px 28px 0; box-shadow:var(--shadow); transform:translateX(-102%); transition:transform var(--t-slow); overflow-y:auto; -webkit-overflow-scrolling:touch; }
  .sidebar.open { transform:none; }
  .sidebar-overlay { display:block; position:fixed; inset:var(--header-total-h, var(--header-h)) 0 0 0; z-index:90; background:var(--scrim); opacity:0; visibility:hidden; transition:var(--t-slow); } .sidebar-overlay.open { opacity:1; visibility:visible; }
  .main-content { padding:4px 14px 32px; }
  .page-header,.perf-header,.tasks-header,.emp-tasks-header { margin-bottom:18px; } .page-title,.perf-title,.sr-title,.exp-title { font-size:1.625rem; }
  .card-header { padding:20px 20px 8px; } .card-body { padding:8px 20px 20px; }
  .ov-card-header,.ov-card-body,.ov-card-footer { padding-left:20px; padding-right:20px; } .ov-section-subtitle { margin-left:0; }
  .perf-card,.sr-card,.exp-card,.punch-board-card,.task-schedule-card,.new-task-card,.perf-calendar-card { padding:20px; }
  .stats-grid,.tasks-kpi-grid,.sr-summary-grid,.exp-stats-grid { grid-template-columns:1fr 1fr; gap:12px; }
  .stat-card,.tasks-kpi-card,.sr-stat-card,.exp-stat-card,.emp-summary-card { padding:18px; border-radius:24px; } .stat-value,.kpi-num,.sr-stat-val,.exp-stat-value { font-size:1.75rem; }
  .exp-stat-card { grid-column:1 / -1; }
  .exp-form-row,.sr-form-grid-2,.sr-form-grid-3 { grid-template-columns:1fr; }
  .btn,.sr-btn-primary,.sr-btn-outline,.exp-btn-primary,.exp-btn-outline { min-height:46px; } .btn-sm { min-height:38px; }
  input,select,textarea,.form-control,.exp-input { font-size:16px; }
  .modal-backdrop { align-items:end; padding:0; } .modal { max-width:100% !important; border-radius:28px 28px 0 0; max-height:92dvh; transform:translateY(40px); }
  .modal-header { padding:22px 20px 6px; } .modal-body { padding:10px 20px 16px; } .modal-footer { padding:10px 20px 22px; }
  .tabs,.issues-status-tabs,.rm-subpage-switcher,.perf-date-pills,.tasks-emp-pills { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; } .rm-subpage-switcher { border-radius:24px; }
  .tab-btn,.issues-status-tab,.rm-subpage-btn,.perf-pill,.emp-pill { flex:0 0 auto; }
  .perf-header-right,.exp-header,.issues-filter-bar { flex-direction:column; align-items:stretch; }
  .perf-cal-grid { gap:4px; } .perf-cal-day { min-height:52px; border-radius:14px; } .perf-day-status { display:none; }
  .ov-chart-bars { gap:5px; height:160px; } .ov-bar-lbl { font-size:.625rem; } .ov-bar-track { height:96px; }
  .impersonation-bar { padding:10px 14px; }
  .toast { bottom:20px; }
  /* data tables become cards */
  table:has(td[data-label]) thead { display:none; }
  table:has(td[data-label]),table:has(td[data-label]) tbody,table:has(td[data-label]) tr,table:has(td[data-label]) td { display:block; width:100%; }
  table:has(td[data-label]) tr { margin-bottom:12px; padding:8px 18px; border-radius:var(--r-tile); background:var(--brand-50); }
  table:has(td[data-label]) tr:nth-child(even) { background:var(--ig-50); }
  table:has(td[data-label]) td { display:flex; justify-content:space-between; gap:16px; padding:9px 0; border:0; white-space:normal; text-align:right; }
  table:has(td[data-label]) td::before { content:attr(data-label); flex:0 0 auto; color:var(--ink-2); font-size:.8125rem; text-align:left; }
  table:has(td[data-label]) td[data-label=""]::before { display:none; } table:has(td[data-label]) td[data-label=""] { justify-content:flex-end; }
  tbody tr:hover td,table:has(td[data-label]) tbody tr:hover td { background:transparent; border-radius:0; }
}
@media (max-width:420px) {
  .stats-grid,.tasks-kpi-grid,.sr-summary-grid,.exp-stats-grid { grid-template-columns:1fr; }
  .login-card { padding:34px 22px; border-radius:30px; } .perf-big-num { font-size:2.25rem; } .sr-attempt-group { grid-template-columns:1fr 1fr; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.001ms !important; transition-duration:.001ms !important; scroll-behavior:auto !important; } }

/* extras */
.header-logo { height:30px; width:auto; filter:var(--logo-filter); }
.exp-icon-green { color:var(--brand); } .exp-icon-blue { color:var(--wa-ink); } .exp-icon-purple { color:var(--ig-ink); }
.perf-footer-left { color:var(--ink-2); } .perf-target-label { color:var(--ink-2); }
.sr-btn-edit,.sr-btn-del { width:34px; height:34px; border-radius:50%; display:inline-grid; place-items:center; color:var(--ink-2); transition:var(--t); }
.sr-btn-edit:hover { background:var(--brand-50); color:var(--brand); } .sr-btn-del:hover { background:var(--danger-50); color:var(--danger); }
.sr-btn-del-reason { min-height:30px; padding:0 12px; border-radius:var(--r-chip); font-size:.8125rem; } .sr-btn-del-reason:hover { background:var(--danger-50); }
.add-comment-textarea { min-height:84px; }

/* render-review fixes */
#ownerPunchBoardList,#ownerScheduleList,.punch-list { display:flex; flex-direction:column; gap:12px; }
.ov-kpi-grid:has(> :nth-child(4)) { grid-template-columns:repeat(2,1fr); }
.ov-kpi-grid:has(> :nth-child(4)) > :nth-child(2) { background:var(--ig-50); } .ov-kpi-grid:has(> :nth-child(4)) > :nth-child(3) { background:var(--ig-50); } .ov-kpi-grid:has(> :nth-child(4)) > :nth-child(4) { background:var(--brand-50); }
.ov-card-body { overflow-x:auto; }
.ov-table th,.ov-table td { padding:12px 10px; } .ov-table th:first-child,.ov-table td:first-child { padding-left:4px; }
.ov-table { min-width:420px; }
.schedule-item .flex { flex:0 0 auto; }
.btn-edit-task,.btn-del-task,.btn-delete-punch { width:36px; padding:0; }
.punch-board-card .card-title + p,.punch-board-card .text-xs { margin-bottom:12px; }
.punch-time-val,.ov-exp-day-header > span,.ov-exp-item-row > span:last-child { white-space:nowrap; }
.ov-exp-day-header { flex-wrap:wrap; gap:6px 12px; } .ov-exp-item-row { align-items:center; }
@media (max-width:800px){ .punch-item,.schedule-item { padding:16px; } .punch-item-right { align-items:flex-end; flex:0 0 auto; } }

/* Tasks: punch buttons + proof upload */
.btn-done { background:var(--surface); color:var(--brand-600); border-color:var(--brand); }
.btn-done:hover:not(:disabled) { background:var(--brand); color:var(--on-brand); }
.btn-issue { background:var(--surface); color:var(--danger); border-color:var(--danger); }
.btn-issue:hover:not(:disabled) { background:var(--danger-50); }
.btn-delay { background:var(--surface); color:var(--warn); border-color:var(--warn); }
.btn-delay:hover:not(:disabled) { background:var(--warn-50); }
.proof-zone { padding:20px 16px; gap:4px; background:var(--surface-2); }
.proof-zone svg { width:26px; height:26px; margin-bottom:2px; }
.proof-title { font-weight:600; color:var(--ink); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.proof-zone.has-file { border-style:solid; border-color:var(--brand); background:var(--brand-50); }
.proof-zone.has-file svg { color:var(--brand); }
.spinner { margin-right:10px; vertical-align:-4px; } .loading-block .spinner { margin-right:0; }

/* ==========================================================================
   GA4 WEB ANALYTICS MODULE STYLES (Refined & Fully Uniform)
   ========================================================================== */
.ga4-container { width: 100%; max-width: 1320px; margin: 0 auto; }
.ga4-container .card + .card,
.ga4-container .ga4-card + .ga4-card,
.ga4-container .ga4-kpi-card + .ga4-kpi-card,
.ga4-container .ga4-breakdown-card + .ga4-breakdown-card {
  margin-top: 0 !important;
}

.ga4-live-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: var(--r-chip); font-size: .6875rem; font-weight: 600;
  background: var(--brand-50); color: var(--brand); letter-spacing: .02em;
}
.ga4-domain-tabs {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile);
  padding: 6px; display: inline-flex; width: fit-content; gap: 6px;
}
.ga4-domain-tab {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px;
  border-radius: var(--r-ctl); font-size: .875rem; font-weight: 500;
  color: var(--ink-2); background: transparent; cursor: pointer;
  transition: all var(--t); border: 1px solid transparent;
}
.ga4-domain-tab:hover { color: var(--ink); background: var(--surface-2); }
.ga4-domain-tab.active {
  background: var(--surface-2); color: var(--ink); font-weight: 600;
  border-color: var(--line-2); box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.ga4-domain-dot { width: 10px; height: 10px; border-radius: 50%; }
.wa-dot { background: var(--wa); box-shadow: 0 0 8px rgba(37,211,102,.4); }
.ig-dot { background: var(--ig); box-shadow: 0 0 8px rgba(224,86,140,.4); }
.ga4-domain-host { font-size: .75rem; color: var(--ink-3); font-weight: 400; font-family: var(--font-mono); }

.ga4-filter-bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-tile);
  padding: 12px 18px;
}
.ga4-range-pill {
  padding: 6px 14px; border-radius: var(--r-chip); font-size: .8125rem; font-weight: 500;
  color: var(--ink-2); background: var(--surface-2); border: 1px solid transparent;
  cursor: pointer; transition: all var(--t);
}
.ga4-range-pill:hover { color: var(--ink); border-color: var(--line-2); }
.ga4-range-pill.active {
  background: var(--brand-50); color: var(--brand); border-color: var(--brand); font-weight: 600;
}

/* 4 KPI Grid */
.ga4-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.ga4-kpi-card {
  padding: 22px 24px; border-radius: var(--r-card); background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.03);
  transition: transform var(--t), box-shadow var(--t); min-width: 0;
}
.ga4-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.ga4-kpi-header { margin-bottom: 14px; }
.ga4-kpi-label { font-size: .8125rem; font-weight: 500; color: var(--ink-2); }
.ga4-kpi-icon {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2);
}
.ga4-kpi-icon.brand-icon { background: var(--brand-50); color: var(--brand); }
.ga4-kpi-icon.wa-icon { background: var(--wa-50); color: var(--wa); }
.ga4-kpi-icon.ig-icon { background: var(--ig-50); color: var(--ig); }
.ga4-kpi-icon.warn-icon { background: var(--warn-50); color: var(--warn); }
.ga4-kpi-value { font-size: 2rem; font-weight: 700; line-height: 1.1; margin-bottom: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ga4-kpi-sub { font-size: .75rem; color: var(--ink-3); line-height: 1.3; }

/* 24-Hour Bar Chart */
.ga4-card {
  padding: 24px 28px; border-radius: var(--r-card); background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.03); margin-bottom: 24px;
}
.ga4-hourly-chart-container {
  width: 100%; padding-top: 20px; padding-bottom: 4px; overflow: visible;
}
.ga4-hourly-chart {
  display: grid; grid-template-columns: repeat(24, 1fr); gap: 6px; height: 160px;
  align-items: flex-end; width: 100%; position: relative; padding-bottom: 28px;
}
.ga4-hour-col {
  height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; position: relative; cursor: pointer; min-width: 0;
}
.ga4-bar-track {
  width: 100%; max-width: 22px; height: 120px; background: var(--surface-2);
  border-radius: 6px 6px 0 0; display: flex; align-items: flex-end; overflow: hidden;
}
.ga4-bar-fill {
  width: 100%; background: var(--brand); border-radius: 6px 6px 0 0;
  transition: height 260ms var(--ease), background var(--t);
}
.ga4-bar-fill.zero { background: var(--line-2); height: 3px !important; border-radius: 2px; }
.ga4-hour-col:hover .ga4-bar-fill:not(.zero) { background: var(--brand-600); }
.ga4-hour-label {
  font-size: .6875rem; color: var(--ink-3); margin-top: 8px; font-family: var(--font-mono);
  font-weight: 500; white-space: nowrap;
}
.ga4-bar-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--on-ink); padding: 6px 12px; border-radius: 10px;
  font-size: .75rem; white-space: nowrap; pointer-events: none; opacity: 0;
  visibility: hidden; transition: opacity var(--t), visibility var(--t); z-index: 40;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.ga4-bar-tooltip strong { color: var(--brand); }
.ga4-hour-col:hover .ga4-bar-tooltip { opacity: 1; visibility: visible; }

/* 2x2 Grid for Breakdowns (Devices, OS, Cities, Countries) */
.ga4-splits-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 24px;
}
.ga4-breakdown-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px 28px; box-shadow: 0 2px 10px rgba(0,0,0,.03); min-width: 0;
  display: flex; flex-direction: column;
}
.ga4-breakdown-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.ga4-breakdown-title {
  font-size: 1rem; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px;
}
.ga4-breakdown-meta {
  font-size: .75rem; color: var(--ink-2); font-weight: 500; font-family: var(--font-mono);
}
.ga4-breakdown-list {
  display: flex; flex-direction: column; gap: 14px; flex: 1;
}
.ga4-breakdown-row {
  display: flex; flex-direction: column; gap: 6px;
}
.ga4-row-info {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .8125rem;
}
.ga4-row-label {
  font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ga4-row-stats {
  display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.ga4-row-count { font-weight: 600; color: var(--ink); }
.ga4-row-pct {
  font-size: .6875rem; font-weight: 600; padding: 2px 7px; border-radius: var(--r-chip);
  background: var(--surface-2); color: var(--ink-2);
}
.ga4-row-track {
  width: 100%; height: 7px; background: var(--surface-2); border-radius: 999px; overflow: hidden;
}
.ga4-row-fill {
  height: 100%; border-radius: 999px; transition: width 400ms var(--ease);
}
.ga4-row-fill.brand { background: var(--brand); }
.ga4-row-fill.ig { background: var(--ig); }
.ga4-row-fill.wa { background: var(--wa); }
.ga4-row-fill.accent { background: #3b82f6; }

/* Rank Badge */
.ga4-rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; font-size: .6875rem; font-weight: 700;
  background: var(--surface-2); color: var(--ink-2); flex-shrink: 0;
}
.ga4-rank-badge.top-1 { background: var(--brand-50); color: var(--brand); }

/* Table Enhancements */
.ga4-table-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.03); margin-bottom: 24px;
}
.ga4-table-header {
  padding: 20px 28px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.ga4-table-card table {
  width: 100%; border-collapse: collapse; text-align: left;
}
.ga4-table-card th {
  padding: 14px 20px; font-size: .8125rem; font-weight: 600; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2); background: var(--surface-2);
  letter-spacing: .02em;
}
.ga4-table-card td {
  padding: 14px 20px; font-size: .875rem; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.ga4-table-card tbody tr:hover td { background: var(--surface-2); }
.ga4-table-card tfoot td {
  padding: 16px 20px; font-size: .875rem; font-weight: 600;
  background: var(--surface-2); border-top: 1px solid var(--line-2);
}

@keyframes spin { 100% { transform: rotate(360deg); } }
.spinning { animation: spin 0.8s linear infinite; }

@media (max-width: 1080px) {
  .ga4-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .ga4-splits-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ga4-kpi-grid { grid-template-columns: 1fr; }
  .ga4-domain-tabs { width: 100%; }
  .ga4-domain-tab { flex: 1; justify-content: center; }
  .ga4-hourly-chart { gap: 3px; }
  .ga4-hourly-chart-container { overflow-x: auto; }
  .ga4-hourly-chart { min-width: 520px; }
}

/* ════════════════════════════════════════════════════════════
   SALES COMPARISON MODULE (WhatsApp vs Instagram)
   ════════════════════════════════════════════════════════════ */
.comp-container { max-width: 100%; margin: 0 auto; }
.comp-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.comp-header-left h1 {
  font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; margin: 0;
}
.comp-header-left p {
  color: var(--ink-2); font-size: 0.875rem; margin-top: 4px;
}
.comp-filter-bar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 12px 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.02);
}
.comp-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comp-pill {
  padding: 6px 14px; border-radius: var(--r-chip); font-size: 0.8125rem; font-weight: 500;
  cursor: pointer; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2);
  transition: all var(--t);
}
.comp-pill:hover { background: var(--surface-3); color: var(--ink); }
.comp-pill.active {
  background: var(--brand-50); color: var(--brand); font-weight: 600; border-color: var(--brand);
}
.comp-custom-date {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.comp-custom-date input[type="date"] {
  min-height: 34px; padding: 4px 10px; font-size: 0.8125rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
}

/* KPI Summary Cards */
.comp-kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px;
}
.comp-kpi-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,.02);
}
.comp-kpi-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.comp-kpi-title {
  font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-2);
}
.comp-kpi-badge {
  font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
.comp-kpi-badge.wa { background: var(--wa-50); color: var(--wa-ink); }
.comp-kpi-badge.ig { background: var(--ig-50); color: var(--ig-ink); }
.comp-kpi-badge.tie { background: var(--surface-2); color: var(--ink-3); }

.comp-team-compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
.comp-team-box {
  padding: 10px 12px; border-radius: var(--r-tile); background: var(--surface-2);
}
.comp-team-box.wa { border-left: 3px solid var(--wa); }
.comp-team-box.ig { border-left: 3px solid var(--ig); }
.comp-team-name {
  font-size: 0.75rem; font-weight: 500; color: var(--ink-3); margin-bottom: 2px; display: flex; align-items: center; gap: 4px;
}
.comp-team-val {
  font-size: 1.25rem; font-weight: 600; color: var(--ink);
}
.comp-kpi-footer {
  font-size: 0.75rem; color: var(--ink-3); padding-top: 8px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}

/* Side-by-Side Comparison Table (Matches exact user image) */
.comp-table-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.03); margin-bottom: 24px;
}
.comp-table-header {
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.comp-table-title {
  font-size: 1.125rem; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px;
}
.comp-table-card table {
  width: 100%; border-collapse: collapse; text-align: left;
}
.comp-table-card th {
  background: #111827; /* Dark charcoal header strictly as shown in user mock */
  color: #ffffff; padding: 14px 22px; font-size: 0.875rem; font-weight: 600;
  letter-spacing: 0.02em; border-right: 1px solid rgba(255,255,255,0.08);
}
.comp-table-card th:last-child { border-right: none; }
.comp-th-content { display: flex; align-items: center; gap: 8px; }
.comp-table-card td {
  padding: 16px 22px; font-size: 0.875rem; border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line); vertical-align: middle;
}
.comp-table-card td:last-child { border-right: none; }
.comp-table-card tbody tr:hover td { background: var(--surface-2); }
.comp-table-card tfoot td {
  padding: 16px 22px; font-size: 0.875rem; font-weight: 600;
  background: var(--surface-2); border-top: 1px solid var(--line-2);
}

.comp-date-cell {
  font-weight: 500; color: var(--ink); white-space: nowrap;
}
.comp-date-cell .comp-day {
  font-size: 0.75rem; color: var(--ink-3); margin-left: 6px;
}

.comp-metric-stack {
  display: flex; flex-direction: column; gap: 4px; line-height: 1.45;
}
.comp-metric-row {
  display: flex; align-items: center; gap: 6px; font-size: 0.875rem;
}
.comp-metric-row strong {
  font-weight: 600; color: var(--ink);
}
.comp-metric-row .comp-num {
  font-weight: 500; color: var(--ink);
}
.comp-lead-tag {
  display: inline-block; font-size: 0.6875rem; padding: 1px 6px; border-radius: 4px;
  margin-left: 4px; font-weight: 600;
}
.comp-lead-tag.wa { background: var(--wa-50); color: var(--wa-ink); }
.comp-lead-tag.ig { background: var(--ig-50); color: var(--ig-ink); }

@media (max-width: 1080px) {
  .comp-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .comp-kpi-grid { grid-template-columns: 1fr; }
  .comp-table-card { overflow-x: auto; }
  .comp-table-card table { min-width: 580px; }
}

/* ════════════════════════════════════════════════════════════
   META ADS MODULE STYLES
   ════════════════════════════════════════════════════════════ */
.meta-stats-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.meta-stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: var(--r-card);
  background: var(--brand-50);
  transition: background var(--t);
}
.meta-stat-card:nth-child(2) { background: var(--ig-50); }
.meta-stat-card:nth-child(3) { background: var(--sand-50); }
.meta-stat-card:nth-child(4) { background: var(--brand-50); }
.meta-stat-card:nth-child(5) { background: var(--ig-50); }
.meta-stat-card:nth-child(6) { background: var(--sand-50); }

.meta-stat-value {
  font-size: 1.85rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.meta-stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
}
.meta-stat-sub {
  font-size: 0.75rem;
  color: var(--ink-3);
}

.meta-form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.meta-form-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.meta-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.meta-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

@media (max-width: 1200px) {
  .meta-stats-grid { grid-template-columns: repeat(3, 1fr); }
  .meta-form-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .meta-form-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .meta-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .meta-form-grid-4, .meta-form-grid-3, .meta-form-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .meta-stats-grid { grid-template-columns: 1fr; }
}

/* ── PWA & Web Push Notifications UI ─────────────────────── */
.pwa-fab-install {
  display: none;
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  right: calc(20px + env(safe-area-inset-right, 0px));
  z-index: 9990; /* below pwa-install-overlay (9999), above all normal page content */
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1.5px solid rgba(74, 222, 128, 0.45);
  background: #101c13;
  color: #22c55e;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), 0 0 16px rgba(34, 197, 94, 0.3);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.pwa-fab-install:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.6), 0 0 22px rgba(34, 197, 94, 0.45);
  border-color: #22c55e;
}
.pwa-fab-install:active {
  transform: scale(0.94);
}
.pwa-fab-install svg {
  display: block;
  pointer-events: none;
}
.pwa-fab-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--brand, #22c55e);
  color: #042e14;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

:root[data-theme="light"] .pwa-fab-install {
  background: #ffffff;
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16), 0 0 12px rgba(22, 163, 74, 0.2);
}
:root[data-theme="light"] .pwa-fab-badge {
  background: #16a34a;
  color: #ffffff;
}

/* FAB only visible on mobile screens if app is not standalone */
@media (min-width: 769px) {
  .pwa-fab-install {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .pwa-fab-install.visible {
    display: flex !important;
  }
}

/* ── Tasks Page Controls & Reminder Settings Button ───────── */
.tasks-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.tasks-emp-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-notif-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--r-chip, 999px);
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.task-notif-btn:hover {
  border-color: var(--brand, #3AA63A);
  color: var(--brand, #3AA63A);
}

@media (max-width: 640px) {
  .tasks-header-controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .task-notif-btn {
    width: 100%;
    justify-content: center;
    padding: 9px 16px;
  }
  .tasks-emp-filter-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .tasks-emp-filter-wrap select {
    flex: 1;
    min-width: 0 !important;
  }
}

/* ── Task Notification Settings Modal ─────────────────────── */
.notif-modal-card {
  max-width: 480px !important;
  width: 92% !important;
  border-radius: 20px !important;
}
.notif-modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand, #22c55e);
  flex-shrink: 0;
}
.notif-pill {
  border-radius: var(--r-chip, 999px) !important;
  padding: 6px 14px !important;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--line) !important;
  background: var(--surface-2, #141c16) !important;
  color: var(--ink) !important;
  transition: all var(--t);
}
.notif-pill:hover {
  border-color: var(--brand, #3AA63A) !important;
  color: var(--brand, #3AA63A) !important;
}
.notif-pill.active {
  background: var(--brand, #3AA63A) !important;
  color: #ffffff !important;
  border-color: var(--brand, #3AA63A) !important;
  font-weight: 600;
}
.notif-alert-box {
  background: var(--surface-2, #141c16);
  padding: 12px 16px;
  border-radius: var(--r-ctl, 12px);
  border: 1px solid var(--line);
  transition: border-color var(--t);
}
.notif-checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--brand, #22c55e);
  cursor: pointer;
}
.notif-stats-box {
  background: var(--surface-2, #141c16);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl, 12px);
  padding: 12px 16px;
}
.notif-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-stat-row .text-muted {
  color: var(--ink-2);
  font-size: 0.8125rem;
}
.notif-stat-row strong {
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ── Hard PWA Install Modal / Drawer ──────────────────────── */
.pwa-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: pwaFadeIn 0.25s ease-out;
}
@keyframes pwaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.pwa-install-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface, #111813);
  border: 1px solid var(--line-2, rgba(255, 255, 255, 0.14));
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(34, 197, 94, 0.25);
  position: relative;
  text-align: center;
  animation: pwaSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pwaSlideUp {
  from { transform: translateY(20px) scale(0.96); }
  to { transform: translateY(0) scale(1); }
}
.pwa-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--muted, #888);
  font-size: 24px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #fff);
}
.pwa-install-header {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  margin-bottom: 14px;
}
.pwa-app-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.25);
  flex-shrink: 0;
}
.pwa-app-title {
  margin: 0 0 4px 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text, #fff);
}
.pwa-app-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.15);
  color: var(--brand, #3AA63A);
}
.pwa-app-desc {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted, #9ca3af);
  margin-bottom: 16px;
  text-align: left;
}
.pwa-features-row {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.pwa-feature-pill {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  color: var(--text, #eee);
  font-weight: 500;
}
.pwa-action-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pwa-btn-install {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 14px;
  background: var(--brand, #3AA63A) !important;
  color: #fff !important;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}
.pwa-btn-install:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.pwa-btn-dismiss {
  width: 100%;
  font-size: 0.8rem;
  color: var(--muted, #888);
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.pwa-btn-dismiss:hover {
  color: var(--text, #fff);
}
.pwa-manual-guide {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  text-align: left;
}
@media (max-width: 480px) {
  .pwa-install-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .pwa-install-card {
    max-width: 100%;
    border-radius: 28px 28px 0 0;
    padding: 24px 20px 28px;
  }
}

/* ── Mandatory Notification Gate (Installed Standalone App Only) ── */
.pwa-notif-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000; /* highest priority overlay across the entire app */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 10, 7, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: pwaFadeIn 0.3s ease-out;
}
.pwa-notif-gate-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface, #111a14);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-radius: 26px;
  padding: 30px 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 24px rgba(239, 68, 68, 0.15);
  text-align: center;
  animation: pwaSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pwa-notif-gate-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: var(--danger, #ef4444);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}
.pwa-notif-gate-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.pwa-notif-gate-desc {
  font-size: 0.83rem;
  color: var(--ink-2);
  line-height: 1.5;
  margin: 0 0 18px;
}
.pwa-notif-state-box {
  background: var(--surface-2, #16241a);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  text-align: left;
}
.pwa-notif-denied-badge {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #f87171;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: center;
}
.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink);
}
.pwa-step-item strong {
  color: var(--ink);
  font-weight: 600;
}
.pwa-step-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand, #22c55e);
  color: #042e14;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pwa-gate-feedback {
  margin-top: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: center;
}
.pwa-gate-feedback.error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.pwa-gate-feedback.success {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

@media (max-width: 480px) {
  .pwa-notif-gate-overlay {
    padding: 12px;
  }
  .pwa-notif-gate-card {
    padding: 24px 18px;
    border-radius: 22px;
  }
}




