/* =====================================================================
   RK Global CRM — Design System v2
   Palette: #0091B9 (primary) · #004E9B (deep) · #BAE4F0 (sky)
            #FF6500 (orange accent) · #FFD500 (yellow highlight)
   ===================================================================== */

/* ---------------------------- tokens ---------------------------- */
:root {
  --brand: #0091B9; --brand-600: #007DA0; --brand-700: #006A88;
  --deep: #004E9B; --deep-700: #003A75; --deep-900: #002A55;
  --sky: #BAE4F0; --orange: #FF6500; --orange-600: #E55B00; --yellow: #FFD500;

  --bg: #F3F7FA; --surface: #FFFFFF; --surface-2: #F6F9FB; --surface-3: #EDF3F7;
  --text: #0B1F33; --text-2: #3A4D61; --muted-fg: #64778A;
  --border: #E2EAF0; --border-strong: #CBD8E2; --input: #D6E1E9;
  --ring: rgba(0, 145, 185, .28);

  --primary: var(--brand); --primary-hover: var(--brand-600); --primary-fg: #fff;
  --success: #16A34A; --danger: #DC2626; --warning: var(--orange); --info: var(--brand);
  --yellow-text: #8A6D00;

  --sidebar-bg: linear-gradient(180deg, #003A75 0%, #004E9B 55%, #00609F 100%);
  --sidebar-fg: rgba(255,255,255,.86); --sidebar-muted: rgba(186,228,240,.62);
  --sidebar-hover: rgba(255,255,255,.08); --sidebar-active: rgba(255,255,255,.14);

  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 22px;
  --shadow-xs: 0 1px 2px rgba(11,31,51,.05);
  --shadow-sm: 0 1px 3px rgba(11,31,51,.06), 0 1px 2px rgba(11,31,51,.04);
  --shadow-md: 0 8px 24px -6px rgba(11,31,51,.12), 0 2px 6px rgba(11,31,51,.05);
  --shadow-lg: 0 24px 48px -12px rgba(11,31,51,.25);
  --topbar-h: 64px; --sidebar-w: 268px; --bottom-nav-h: 64px;
  --font: 'Inter', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color-scheme: light;
}
html.dark {
  --brand: #1BA8D2; --brand-600: #38B6DC; --brand-700: #5CC4E4;
  --deep: #4A92E0;
  --bg: #061321; --surface: #0C1D2E; --surface-2: #10243A; --surface-3: #163049;
  --text: #E7F1F8; --text-2: #B8CAD8; --muted-fg: #8AA2B6;
  --border: rgba(186,228,240,.10); --border-strong: rgba(186,228,240,.18); --input: rgba(186,228,240,.16);
  --ring: rgba(27,168,210,.35);
  --primary-fg: #04121F;
  --success: #22C55E; --danger: #F87171; --orange: #FF7A1F; --yellow-text: #FFD500;
  --sidebar-bg: linear-gradient(180deg, #04182C 0%, #062441 100%);
  --sidebar-hover: rgba(186,228,240,.07); --sidebar-active: rgba(27,168,210,.18);
  --shadow-xs: 0 1px 2px rgba(0,0,0,.3); --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow-md: 0 10px 28px -8px rgba(0,0,0,.55); --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.7);
  color-scheme: dark;
}

/* tones: any element with .t-* gets --c (strong) and --c-soft (tint) */
.t-primary { --c: var(--brand); --c-soft: rgba(0,145,185,.12); }
.t-deep    { --c: var(--deep); --c-soft: rgba(0,78,155,.11); }
.t-sky     { --c: #0A6E8C; --c-soft: rgba(186,228,240,.55); }
.t-orange  { --c: var(--orange); --c-soft: rgba(255,101,0,.12); }
.t-yellow  { --c: var(--yellow-text); --c-soft: rgba(255,213,0,.22); }
.t-green   { --c: var(--success); --c-soft: rgba(22,163,74,.12); }
.t-red     { --c: var(--danger); --c-soft: rgba(220,38,38,.11); }
.t-muted   { --c: var(--muted-fg); --c-soft: var(--surface-3); }
html.dark .t-sky { --c: #8FD3E8; --c-soft: rgba(186,228,240,.12); }
html.dark .t-deep { --c-soft: rgba(74,146,224,.16); }
html.dark .t-yellow { --c-soft: rgba(255,213,0,.13); }
.tc { color: var(--c) !important; }

/* ---------------------------- base ---------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
svg.ic { flex-shrink: 0; display: inline-block; vertical-align: middle; }
code { background: var(--surface-3); padding: .125rem .4rem; border-radius: 6px; font-size: .8125rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
hr { border: 0; height: 1px; background: var(--border); margin: 1.75rem 0; }
::selection { background: rgba(0,145,185,.22); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------- layout ---------------------------- */
.dashboard-layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.page-content { padding: 1.75rem 2rem 2.5rem; flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; }

/* sidebar */
.sidebar { width: var(--sidebar-w); position: fixed; inset: 0 auto 0 0; background: var(--sidebar-bg); color: var(--sidebar-fg); z-index: 100; display: flex; flex-direction: column; transition: transform .28s cubic-bezier(.4,0,.2,1); }
.sidebar::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.06); }
.sidebar-header { padding: 1.1rem 1.25rem; display: flex; align-items: center; gap: .5rem; }
.sidebar-logo { display: flex; align-items: center; gap: .75rem; min-width: 0; color: #fff; }
.sidebar-logo-icon { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--orange), var(--yellow)); color: #3B1A00; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 6px 16px -4px rgba(255,101,0,.55); }
.sidebar-logo img { height: 38px; max-width: 150px; object-fit: contain; border-radius: 8px; background: rgba(255,255,255,.95); padding: 3px; }
.sidebar-logo-text { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logo-text small { display: block; font-size: .6875rem; font-weight: 500; color: var(--sidebar-muted); letter-spacing: .04em; text-transform: uppercase; }
.sidebar-close { display: none; margin-left: auto; background: rgba(255,255,255,.08); border: 0; color: #fff; width: 34px; height: 34px; border-radius: 9px; align-items: center; justify-content: center; cursor: pointer; }
.sidebar-scroll { flex: 1; overflow-y: auto; padding: .25rem .75rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.sidebar-section { margin-bottom: .9rem; }
.sidebar-section-title { font-size: .6875rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; color: var(--sidebar-muted); padding: .75rem .75rem .4rem; }
.sidebar-link { position: relative; display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 10px; font-size: .9rem; font-weight: 500; color: var(--sidebar-fg); transition: background .15s, color .15s; margin-bottom: 2px; }
.sidebar-link svg { opacity: .8; }
.sidebar-link:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-link.active { background: var(--sidebar-active); color: #fff; font-weight: 600; }
.sidebar-link.active svg { opacity: 1; color: var(--yellow); }
.sidebar-link.active::before { content: ''; position: absolute; left: -.75rem; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--orange); }
.sidebar-badge { margin-left: auto; background: var(--orange); color: #fff; font-size: .6875rem; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-submenu { margin: .15rem 0 .5rem 1.35rem; border-left: 1px solid rgba(255,255,255,.12); padding-left: .5rem; }
.sidebar-sublink { display: flex; align-items: center; gap: .55rem; padding: .42rem .6rem; border-radius: 8px; font-size: .84rem; color: var(--sidebar-muted); transition: background .15s, color .15s; }
.sidebar-sublink:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-sublink.active { background: var(--sidebar-hover); color: #fff; font-weight: 600; }
.sidebar-sublink .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--c-soft); flex-shrink: 0; }
.sub-badge { margin-left: auto; padding: .05rem .5rem; border-radius: 99px; font-size: .72rem; font-weight: 700; background: rgba(255,255,255,.1); color: #fff; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.08); margin: .5rem .75rem; }
.sidebar-footer { padding: .85rem 1rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .7rem; }
.sidebar-footer .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
.sidebar-footer .meta { min-width: 0; flex: 1; line-height: 1.25; }
.sidebar-footer .meta strong { display: block; font-size: .85rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .meta span { font-size: .72rem; color: var(--sidebar-muted); }
.sidebar-footer .version { font-size: .68rem; color: var(--sidebar-muted); background: rgba(255,255,255,.07); padding: .15rem .45rem; border-radius: 6px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(2,12,24,.55); backdrop-filter: blur(2px); z-index: 90; opacity: 0; transition: opacity .25s; }
.sidebar-overlay.active { display: block; opacity: 1; }

/* topbar */
.topbar { height: var(--topbar-h); position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--border); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar-left { display: flex; align-items: center; gap: .75rem; min-width: 0; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: .5rem; }
.menu-toggle { display: none; }
.topbar-title { display: none; font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted-fg); flex-wrap: nowrap; min-width: 0; overflow: hidden; white-space: nowrap; }
.breadcrumb a { display: inline-flex; align-items: center; gap: .35rem; transition: color .15s; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .current { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb-separator { display: inline-flex; opacity: .5; }
.quick-search { position: relative; width: 300px; max-width: 34vw; }
.quick-search input { width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); padding: 0 .9rem 0 2.4rem; font-size: .875rem; transition: border .15s, box-shadow .15s; }
.quick-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.quick-search > svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted-fg); pointer-events: none; }
.quick-search kbd { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); font-family: inherit; font-size: .7rem; color: var(--muted-fg); border: 1px solid var(--border); border-radius: 6px; padding: 0 .35rem; background: var(--surface-2); }
.icon-button { width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .15s; position: relative; flex-shrink: 0; }
.icon-button:hover { color: var(--brand); border-color: var(--border-strong); background: var(--surface-2); }
.theme-toggle .sun-icon, html.dark .theme-toggle .moon-icon { display: none; }
html.dark .theme-toggle .sun-icon { display: inline-flex; }
.theme-toggle .moon-icon { display: inline-flex; }
.user-dropdown, .dd { position: relative; }
.user-btn { display: flex; align-items: center; gap: .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .25rem .6rem .25rem .25rem; cursor: pointer; transition: border .15s, background .15s; height: 40px; }
.user-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.user-info { text-align: left; line-height: 1.15; }
.user-name { font-size: .85rem; font-weight: 600; display: block; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .72rem; color: var(--muted-fg); }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .4rem; z-index: 60; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right; transition: all .16s ease; }
.dropdown-menu.open { opacity: 1; visibility: visible; transform: none; }
.dropdown-head { padding: .6rem .7rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .35rem; }
.dropdown-head strong { display: block; font-size: .9rem; }
.dropdown-head span { font-size: .78rem; color: var(--muted-fg); word-break: break-all; }
.dropdown-item { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border-radius: 9px; font-size: .875rem; background: none; border: 0; cursor: pointer; color: var(--text); text-align: left; transition: background .12s; }
.dropdown-item:hover { background: var(--surface-3); }
.dropdown-item.active { color: var(--brand); font-weight: 600; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: rgba(220,38,38,.08); }
.dropdown-divider { height: 1px; background: var(--border); margin: .35rem 0; }
.dropdown-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-fg); padding: .35rem .7rem .2rem; font-weight: 600; }

/* bottom nav (phones) */
.bottom-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px -10px rgba(11,31,51,.15); }
.bottom-nav-inner { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: var(--bottom-nav-h); max-width: 560px; margin: 0 auto; }
.bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .68rem; font-weight: 600; color: var(--muted-fg); background: none; border: 0; cursor: pointer; position: relative; }
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a.active::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
.bottom-nav .fab { width: 50px; height: 50px; border-radius: 16px; margin-top: -22px; background: linear-gradient(135deg, var(--orange), #FF8A33); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 22px -6px rgba(255,101,0,.6); }
.bottom-nav .nb { position: absolute; top: 8px; right: calc(50% - 20px); background: var(--orange); color: #fff; font-size: .6rem; min-width: 16px; height: 16px; border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ---------------------------- page header ---------------------------- */
.page-header { margin-bottom: 1.5rem; }
.page-header-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.6rem; font-weight: 750; letter-spacing: -.025em; line-height: 1.25; display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.page-title .title-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-soft, rgba(0,145,185,.12)); color: var(--c, var(--brand)); }
.page-title .sub { font-size: .9rem; font-weight: 400; color: var(--muted-fg); letter-spacing: 0; }
.page-description { font-size: .92rem; color: var(--muted-fg); margin-top: .3rem; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* hero / welcome banner */
.hero { position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: 1.75rem 2rem; margin-bottom: 1.5rem; color: #fff; background: radial-gradient(120% 140% at 100% 0%, rgba(255,213,0,.22) 0%, transparent 45%), linear-gradient(120deg, #003A75 0%, #004E9B 40%, #0091B9 100%); box-shadow: 0 18px 40px -18px rgba(0,78,155,.6); }
.hero::after { content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 38px solid rgba(186,228,240,.12); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: 1.5rem; font-weight: 750; letter-spacing: -.02em; }
.hero p { color: rgba(255,255,255,.82); margin-top: .25rem; }
.hero .quote { display: inline-flex; align-items: flex-start; gap: .5rem; margin-top: .9rem; padding: .55rem .85rem; border-radius: 12px; background: rgba(255,255,255,.12); backdrop-filter: blur(4px); font-size: .9rem; color: #fff; max-width: 720px; }
.hero .quote svg { color: var(--yellow); margin-top: 2px; }
.hero-row { display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.hero .btn-light { background: #fff; color: var(--deep); }
.hero .btn-light:hover { background: var(--sky); }
.hero-stats { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-stat { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: .65rem 1rem; min-width: 110px; }
.hero-stat b { display: block; font-size: 1.35rem; line-height: 1.2; }
.hero-stat span { font-size: .75rem; color: rgba(255,255,255,.78); }

/* ---------------------------- cards ---------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); transition: box-shadow .2s, border-color .2s; min-width: 0; }
a.card:hover, .card.hoverable:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-header { padding: 1.05rem 1.35rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.card-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .55rem; letter-spacing: -.01em; }
.card-title > svg { color: var(--c, var(--brand)); }
.card-subtitle { font-size: .8rem; color: var(--muted-fg); margin-top: .1rem; }
.card-body { padding: 1.35rem; }
.card-footer { padding: 1rem 1.35rem; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.card-accent { border-top: 3px solid var(--c, var(--brand)); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stats-grid.cols-5 { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.stat { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; overflow: hidden; }
.stat::after { content: ''; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--c-soft, transparent); opacity: .55; }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--c-soft, rgba(0,145,185,.12)); color: var(--c, var(--brand)); }
.stat-icon.sm { width: 40px; height: 40px; border-radius: 12px; }
.stat-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted-fg); }
.stat-value { font-size: 1.6rem; font-weight: 750; margin-top: .15rem; line-height: 1.15; letter-spacing: -.02em; }
.stat-value.colored { color: var(--c); }
.stat-value.sm { font-size: 1.05rem; }
.stat-sub { font-size: .78rem; color: var(--muted-fg); margin-top: .1rem; }
.stat-border { padding: 1.1rem 1.25rem; border-left: 4px solid var(--c, var(--brand)); }
.stat-border .num { font-size: 1.65rem; font-weight: 750; color: var(--c); line-height: 1.2; letter-spacing: -.02em; }
a.stat-border:hover, a.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
a.stat-border, a.stat { transition: transform .15s, box-shadow .15s; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.grid-main-side { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.stack-gap > * + * { margin-top: 1.25rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 1.5rem; } .mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 1.5rem; } .mb-0 { margin-bottom: 0 !important; }
.muted { color: var(--muted-fg); }
.text-sm { font-size: .875rem; } .text-xs { font-size: .75rem; } .text-lg { font-size: 1.125rem; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
.flex { display: flex; } .items-center { align-items: center; } .items-start { align-items: flex-start; } .gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .justify-end { justify-content: flex-end; } .grow { flex: 1; min-width: 0; }
.right { text-align: right; } .center { text-align: center; } .nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.hide-sm { } .show-sm { display: none !important; }

/* ---------------------------- buttons ---------------------------- */
.btn { --bh: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--bh); padding: .5rem 1rem; font-size: .9rem; font-weight: 600; border-radius: 11px; border: 1px solid transparent; cursor: pointer; transition: background .15s, box-shadow .15s, transform .1s, border-color .15s, color .15s; white-space: nowrap; line-height: 1.2; text-decoration: none; user-select: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { --bh: 34px; padding: .35rem .8rem; font-size: .84rem; border-radius: 9px; }
.btn-xs { --bh: 28px; padding: .2rem .6rem; font-size: .78rem; border-radius: 8px; gap: .3rem; }
.btn-lg { --bh: 46px; padding: .65rem 1.4rem; font-size: .95rem; border-radius: 12px; }
.btn-block { width: 100%; }
.sort-btn { display: inline-flex; width: 20px; height: 20px; border-radius: 6px; align-items: center; justify-content: center; color: var(--muted-fg); opacity: .55; }
.sort-btn:hover { opacity: 1; background: var(--surface-3); }
.sort-btn.active { opacity: 1; color: #fff; background: var(--brand); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8em; background: var(--surface-3); color: var(--deep); padding: .12rem .45rem; border-radius: 6px; }
html.dark code { color: var(--sky); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -8px rgba(0,145,185,.8); }
html.dark .btn-primary { color: #04121F; }
.btn-primary:hover { background: var(--brand-600); }
.btn-deep { background: var(--deep); color: #fff; } .btn-deep:hover { background: var(--deep-700); }
.btn-accent { background: var(--orange); color: #fff; box-shadow: 0 6px 16px -8px rgba(255,101,0,.85); } .btn-accent:hover { background: var(--orange-600); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-outline { background: transparent; color: var(--brand); border-color: currentColor; }
.btn-outline:hover { background: rgba(0,145,185,.08); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-success { background: var(--success); color: #fff; } .btn-success:hover { filter: brightness(.94); }
.btn-warning { background: var(--orange); color: #fff; } .btn-warning:hover { background: var(--orange-600); }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { filter: brightness(.93); }
.btn-info { background: var(--brand); color: #fff; } .btn-info:hover { background: var(--brand-600); }
.btn-purple { background: var(--deep); color: #fff; }
.btn-yellow { background: var(--yellow); color: #3B2F00; }
html.dark .btn-success, html.dark .btn-danger { color: #fff; }
.btn-soft { background: var(--c-soft); color: var(--c); }
.btn-soft:hover { filter: brightness(.96); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; border: 0; cursor: pointer; transition: transform .12s, filter .12s; background: var(--c-soft); color: var(--c); }
.icon-btn:hover { transform: translateY(-1px); filter: brightness(.95); }
.icon-btn.sm { width: 26px; height: 26px; border-radius: 7px; }
.icon-btn.link { --c: var(--brand); --c-soft: rgba(0,145,185,.12); }
.icon-btn.shot { --c: var(--deep); --c-soft: rgba(0,78,155,.11); }
html.dark .icon-btn.shot { --c-soft: rgba(74,146,224,.16); }
.icon-btn.edit { --c: #B07A00; --c-soft: rgba(255,213,0,.22); }
html.dark .icon-btn.edit { --c: var(--yellow); --c-soft: rgba(255,213,0,.13); }
.icon-btn.del { --c: var(--danger); --c-soft: rgba(220,38,38,.1); }
.action-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; color: var(--muted-fg); background: none; border: 0; cursor: pointer; transition: background .12s, color .12s; }
.action-btn:hover { background: var(--surface-3); color: var(--brand); }
.action-btn.danger:hover { background: rgba(220,38,38,.1); color: var(--danger); }
form.inline { display: inline; }
.btn-group { display: inline-flex; gap: .35rem; flex-wrap: wrap; }

/* ---------------------------- tables ---------------------------- */
.table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th { padding: .7rem 1.1rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted-fg); background: var(--surface-2); text-align: left; white-space: nowrap; border-bottom: 1px solid var(--border); }
.table th:first-child { border-top-left-radius: 0; }
.table td { padding: .85rem 1.1rem; font-size: .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }
.table.compact th, .table.compact td { padding: .6rem .8rem; }
.table tr.row-orange td:first-child { box-shadow: inset 3px 0 0 var(--orange); }
.table tr.row-green td:first-child { box-shadow: inset 3px 0 0 var(--success); }
.table tr.row-red td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.table tr.row-me { background: rgba(0,145,185,.06); }
.sn-circle { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; }
.copyable { cursor: pointer; border-radius: 6px; transition: background .2s, color .2s; padding: 1px 3px; margin: -1px -3px; }
.copyable:hover { color: var(--brand); background: rgba(0,145,185,.07); }
.copied { background: rgba(22,163,74,.16) !important; color: var(--success) !important; }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--muted-fg); }
.empty-state > svg, .empty-state .empty-icon { margin: 0 auto .85rem; display: block; color: var(--brand); opacity: .55; }
.empty-state .empty-icon { width: 72px; height: 72px; border-radius: 20px; background: rgba(0,145,185,.08); display: flex; align-items: center; justify-content: center; opacity: 1; }
.empty-state h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .25rem; }
.empty-state p { font-size: .85rem; margin-bottom: 1rem; }

/* stacked (card) tables on phones — add class "stack" + data-label on cells */
@media (max-width: 767px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { border: 1px solid var(--border); border-radius: 14px; margin: 0 0 .75rem; padding: .35rem .2rem; background: var(--surface); box-shadow: var(--shadow-xs); }
  .table.stack tbody tr:hover { background: var(--surface); }
  .table.stack td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem .85rem !important; border: 0; text-align: right; min-height: 38px; white-space: normal !important; max-width: none !important; }
  .table.stack td::before { content: attr(data-label); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--muted-fg); text-align: left; flex-shrink: 0; }
  .table.stack td[data-label=""]::before, .table.stack td:not([data-label])::before { content: none; }
  .table.stack td.cell-head { justify-content: flex-start; text-align: left; border-bottom: 1px dashed var(--border); padding-bottom: .65rem !important; margin-bottom: .25rem; }
  .table.stack td.cell-actions { justify-content: flex-end; border-top: 1px dashed var(--border); margin-top: .25rem; padding-top: .65rem !important; flex-wrap: wrap; }
  .table.stack td.cell-actions::before { content: none; }
  .table.stack td.desktop-only-cell { display: none; }
  .table.stack tr.empty-row, .table.stack tr.empty-row td { border: 0; box-shadow: none; display: block; text-align: center; }
  .table.stack tr.empty-row td::before { content: none; }
  .table.stack tr[class*="row-"] td:first-child { box-shadow: none; }
  .table.stack tr.row-orange { border-left: 4px solid var(--orange); }
  .table.stack tr.row-green { border-left: 4px solid var(--success); }
  .table.stack tr.row-red { border-left: 4px solid var(--danger); }
  .card > .table-container > .table.stack, .tab-content > .table-container > .table.stack { padding: .75rem; }
}

/* ---------------------------- badges / pills ---------------------------- */
.badge, .pill { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; font-size: .75rem; font-weight: 600; border-radius: 99px; white-space: nowrap; line-height: 1.35; background: var(--c-soft, var(--surface-3)); color: var(--c, var(--text-2)); }
.badge-primary { --c: var(--brand); --c-soft: rgba(0,145,185,.12); }
.badge-secondary { --c: var(--muted-fg); --c-soft: var(--surface-3); }
.badge-success, .pill-green { --c: var(--success); --c-soft: rgba(22,163,74,.12); }
.badge-warning, .pill-amber { --c: var(--orange); --c-soft: rgba(255,101,0,.12); }
.badge-danger, .pill-red { --c: var(--danger); --c-soft: rgba(220,38,38,.11); }
.badge-info, .pill-blue { --c: var(--brand); --c-soft: rgba(0,145,185,.12); }
.badge-deep { --c: var(--deep); --c-soft: rgba(0,78,155,.11); }
.badge-yellow { --c: var(--yellow-text); --c-soft: rgba(255,213,0,.22); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-btn { border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--c-soft); color: var(--c); transition: filter .12s, transform .12s; white-space: nowrap; }
.pill-btn:hover { filter: brightness(.95); transform: translateY(-1px); }
.phone-duplicate-badge { display: none; padding: .1rem .4rem; border-radius: 99px; font-size: .68rem; font-weight: 700; margin-left: .35rem; background: rgba(220,38,38,.12); color: var(--danger); }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 99px; font-size: .8rem; background: var(--surface-3); color: var(--text-2); font-weight: 600; }

/* ---------------------------- forms ---------------------------- */
.form-group { margin-bottom: 1.15rem; }
.form-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .45rem; color: var(--text); }
.form-label-optional { color: var(--muted-fg); font-weight: 400; }
.form-input, .form-select, .form-textarea { width: 100%; min-height: 42px; padding: .55rem .85rem; font-size: .92rem; border: 1px solid var(--input); border-radius: 11px; background: var(--surface); color: var(--text); transition: border .15s, box-shadow .15s, background .15s; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--muted-fg); opacity: .75; }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: var(--border-strong); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.form-input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.form-input[readonly] { background: var(--surface-2); color: var(--muted-fg); }
.form-input[type=file] { padding: .4rem; cursor: pointer; }
.form-input[type=file]::file-selector-button { border: 0; background: rgba(0,145,185,.12); color: var(--brand); font-weight: 600; padding: .4rem .8rem; border-radius: 8px; margin-right: .75rem; cursor: pointer; }
.form-textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.form-select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364778A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2.2rem; cursor: pointer; }
html.dark .form-select option { background: var(--surface); }
html.dark input[type=date]::-webkit-calendar-picker-indicator, html.dark input[type=time]::-webkit-calendar-picker-indicator { filter: invert(.8); }
.form-hint { font-size: .8rem; color: var(--muted-fg); margin-top: .35rem; }
.form-error { font-size: .8rem; color: var(--danger); margin-top: .35rem; font-weight: 500; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.span-all { grid-column: 1 / -1; }
.input-with-icon { position: relative; }
.input-with-icon .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-fg); pointer-events: none; display: flex; transition: color .15s; }
.input-with-icon.textarea .input-icon { top: 21px; }
.input-with-icon .form-input, .input-with-icon .form-textarea { padding-left: 40px; }
.input-with-icon:focus-within .input-icon { color: var(--brand); }
.input-with-icon .input-suffix { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; }
.pw-toggle { background: none; border: 0; color: var(--muted-fg); cursor: pointer; width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.pw-toggle:hover { color: var(--brand); background: var(--surface-3); }
.form-section { padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); margin-bottom: 1.25rem; }
.form-section-title { display: flex; align-items: center; gap: .55rem; font-size: .95rem; font-weight: 700; margin: 0 0 1rem; }
.form-section-title .si { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-soft); color: var(--c); }
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: .25rem; }
.checkbox-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.checkbox-item { display: flex; align-items: flex-start; gap: .6rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: .7rem .8rem; cursor: pointer; transition: border .15s, background .15s; }
.checkbox-item:hover { border-color: var(--border-strong); }
.checkbox-item:has(input:checked) { border-color: var(--brand); background: rgba(0,145,185,.06); }
.checkbox-item input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand); flex-shrink: 0; }
.checkbox-title { font-size: .85rem; font-weight: 600; }
.checkbox-desc { font-size: .72rem; color: var(--muted-fg); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px; margin-bottom: .75rem; background: var(--surface); }
.switch-row strong { font-size: .92rem; }
.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider { position: absolute; inset: 0; background: var(--border-strong); border-radius: 26px; cursor: pointer; transition: .2s; }
.switch .slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 4px var(--ring); }
.upload-preview { width: 112px; height: 112px; border: 2px dashed var(--border-strong); border-radius: 18px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface); flex-shrink: 0; color: var(--muted-fg); text-align: center; font-size: .78rem; }
.upload-preview img { width: 100%; height: 100%; object-fit: contain; }
.upload-preview.round { border-radius: 50%; }
.upload-preview.round img { object-fit: cover; }

/* ---------------------------- filters / toolbar ---------------------------- */
.filter-card { padding: .9rem 1.1rem; margin-bottom: 1.25rem; }
.filter-form { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; }
.filter-form .form-select, .filter-form .form-input { width: auto; min-width: 150px; }
.filter-label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; font-size: .85rem; color: var(--text-2); }
.filter-label svg { color: var(--brand); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem 1rem; align-items: end; }
.filter-grid .form-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); margin-bottom: .3rem; }
.search-box { position: relative; min-width: 220px; flex: 1; max-width: 360px; }
.search-box svg { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--muted-fg); pointer-events: none; }
.search-box .form-input { padding-left: 2.35rem; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); }

/* ---------------------------- alerts ---------------------------- */
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: 13px; border: 1px solid; margin-bottom: 1.15rem; font-size: .9rem; transition: opacity .3s, transform .3s; background: var(--c-soft); border-color: color-mix(in srgb, var(--c) 30%, transparent); color: var(--text); }
.alert > svg { color: var(--c); margin-top: 1px; }
.alert strong { color: var(--c); }
.alert-success { --c: var(--success); --c-soft: rgba(22,163,74,.09); }
.alert-error, .alert-danger { --c: var(--danger); --c-soft: rgba(220,38,38,.08); }
.alert-warning { --c: var(--orange); --c-soft: rgba(255,101,0,.09); }
.alert-info { --c: var(--brand); --c-soft: rgba(0,145,185,.08); }
.alert ul { margin: .3rem 0 0 1.1rem; font-size: .86rem; }
.alert .alert-close { margin-left: auto; background: none; border: 0; color: var(--muted-fg); cursor: pointer; padding: 2px; border-radius: 6px; display: inline-flex; }
.callout { border-radius: 12px; padding: .9rem 1rem; background: var(--c-soft); border: 1px solid color-mix(in srgb, var(--c) 25%, transparent); border-left: 4px solid var(--c); }

/* ---------------------------- progress / charts ---------------------------- */
.progress { height: 10px; background: var(--surface-3); border-radius: 99px; overflow: hidden; display: flex; }
.progress > div { height: 100%; transition: width .6s cubic-bezier(.4,0,.2,1); }
.progress.lg { height: 14px; }
.progress .bg-green { background: var(--success); } .progress .bg-orange { background: var(--orange); } .progress .bg-primary { background: var(--brand); } .progress .bg-red { background: var(--danger); } .progress .bg-deep { background: var(--deep); } .progress .bg-yellow { background: var(--yellow); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--muted-fg); margin-top: .75rem; }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--c); }
.meter { display: flex; flex-direction: column; gap: 1.1rem; }
.meter-row .meter-top { display: flex; justify-content: space-between; margin-bottom: .45rem; font-size: .88rem; }
.meter-row .meter-top b { font-weight: 600; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: .5rem; }
.bar-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; position: relative; }
.bar-chart .bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; width: 100%; justify-content: center; }
.bar-chart .bar { width: 100%; max-width: 16px; border-radius: 6px 6px 3px 3px; background: var(--brand); min-height: 3px; transition: height .6s cubic-bezier(.4,0,.2,1), filter .15s; }
.bar-chart .bar.b2 { background: var(--orange); }
.bar-chart .col:hover .bar { filter: brightness(1.12); }
.bar-chart .lbl { font-size: .68rem; color: var(--muted-fg); white-space: nowrap; }
.bar-chart .col .tip { position: absolute; bottom: calc(100% - 10px); left: 50%; transform: translate(-50%, 4px); background: var(--text); color: var(--surface); font-size: .72rem; padding: .3rem .5rem; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: all .15s; z-index: 5; }
.bar-chart .col:hover .tip { opacity: 1; transform: translate(-50%, 0); }
.ring { --p: 0; --c: var(--success); width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; flex-shrink: 0; }
.ring::before { content: attr(data-label); width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: var(--text); }

/* ---------------------------- tabs ---------------------------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); overflow-x: auto; padding: 0 .75rem; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { padding: .95rem 1rem; background: none; border: 0; border-bottom: 2px solid transparent; font-weight: 600; color: var(--muted-fg); cursor: pointer; display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; font-size: .88rem; transition: color .15s, border-color .15s; margin-bottom: -1px; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--c, var(--brand)); border-bottom-color: var(--c, var(--brand)); }
.tab-btn .count { background: var(--c-soft, var(--surface-3)); color: var(--c, var(--text-2)); border-radius: 99px; padding: .05rem .5rem; font-size: .74rem; }
.tab-content { display: none; } .tab-content.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.tab-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .9rem 1.1rem; }
.note-item { padding: .45rem .7rem; background: var(--c-soft, var(--surface-3)); border-radius: 8px; font-size: .8rem; margin-bottom: .3rem; }
.note-time { font-size: .7rem; color: var(--muted-fg); }

/* ---------------------------- modals ---------------------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(2,12,24,.55); backdrop-filter: blur(3px); z-index: 9999; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.active { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); max-height: 88vh; display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal.lg { max-width: 600px; }
@keyframes pop { from { transform: translateY(8px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.modal-title { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: .55rem; }
.modal-title .mi { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-soft); color: var(--c); }
.modal-close { background: var(--surface-3); border: 0; width: 34px; height: 34px; border-radius: 10px; color: var(--muted-fg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.35rem; overflow-y: auto; }
.modal-footer { padding: .95rem 1.35rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.modal-property { font-size: .85rem; color: var(--muted-fg); margin-bottom: 1rem; padding: .6rem .8rem; background: var(--surface-2); border-radius: 10px; }
.modal-property strong { color: var(--text); }
.note-card { position: relative; padding: .85rem 1rem .85rem 1.25rem; border-left: 3px solid var(--c); border-radius: 0 12px 12px 0; margin: 0 0 .85rem .5rem; background: var(--c-soft); }
.note-card::before { content: ''; position: absolute; left: -8px; top: 1rem; width: 13px; height: 13px; border-radius: 50%; border: 3px solid var(--surface); background: var(--c); }
.note-card .meta { font-size: .74rem; color: var(--muted-fg); display: flex; align-items: center; gap: .4rem; margin-bottom: .3rem; flex-wrap: wrap; }
.note-card .content { color: var(--text); line-height: 1.55; white-space: pre-wrap; word-break: break-word; font-size: .9rem; }
.note-card.warning { --c: var(--orange); --c-soft: rgba(255,101,0,.07); }
.note-card.success { --c: var(--success); --c-soft: rgba(22,163,74,.07); }
.note-card.danger { --c: var(--danger); --c-soft: rgba(220,38,38,.07); }
.resolved-block { margin-top: .7rem; padding-top: .6rem; border-top: 1px dashed rgba(22,163,74,.45); font-size: .8rem; font-weight: 600; color: var(--success); }

/* ---------------------------- toast ---------------------------- */
#copy-toast { position: fixed; bottom: 1.75rem; left: 50%; transform: translateX(-50%) translateY(140px); background: var(--text); color: var(--surface); padding: .7rem 1.25rem; border-radius: 99px; font-weight: 600; font-size: .88rem; display: flex; align-items: center; gap: .5rem; z-index: 10000; transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: var(--shadow-lg); }
#copy-toast svg { color: var(--success); }
#copy-toast.error svg { color: #F87171; }
#copy-toast.show { transform: translateX(-50%) translateY(0); }

/* ---------------------------- pagination ---------------------------- */
.pagination { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-top: 1px solid var(--border); }
.pagination .pages { display: flex; gap: .3rem; flex-wrap: wrap; }
.pagination a, .pagination span.pg { min-width: 36px; height: 36px; padding: 0 .55rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 10px; font-size: .85rem; font-weight: 600; background: var(--surface); transition: all .12s; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 6px 14px -6px rgba(0,145,185,.7); }
.pagination .disabled { opacity: .4; }

/* ---------------------------- accordion list (phones) ---------------------------- */
.mobile-only { display: none; }
details.acc { border: 1px solid var(--border); border-radius: 14px; margin-bottom: .7rem; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-xs); }
details.acc[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
details.acc summary { list-style: none; display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem; cursor: pointer; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary > svg:last-child { color: var(--muted-fg); transition: transform .2s; }
details.acc[open] summary > svg:last-child { transform: rotate(180deg); }
details.acc .acc-body { background: var(--surface-2); padding: .9rem; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: .1rem .9rem; }
.acc-field { margin-bottom: .65rem; min-width: 0; word-break: break-word; font-size: .88rem; }
.acc-field.full { grid-column: 1 / -1; }
.acc-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); font-weight: 700; margin-bottom: .1rem; }
.acc-actions { grid-column: 1 / -1; display: flex; gap: .5rem; margin-top: .4rem; flex-wrap: wrap; }
.acc-actions > * { flex: 1; min-width: 70px; }
.acc-actions .btn, .acc-actions form .btn { width: 100%; }

/* ---------------------------- misc components ---------------------------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--deep)); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; object-fit: cover; flex-shrink: 0; text-transform: uppercase; }
.avatar.xs { width: 26px; height: 26px; font-size: .68rem; }
.avatar.sm { width: 32px; height: 32px; font-size: .78rem; }
.avatar.md { width: 42px; height: 42px; font-size: .95rem; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar.xl { width: 88px; height: 88px; font-size: 2rem; }
.avatar.sq { border-radius: 12px; }
.user-cell { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.user-cell .uc-name { font-weight: 600; font-size: .9rem; display: block; }
.user-cell .uc-sub { font-size: .78rem; color: var(--muted-fg); display: block; word-break: break-all; }
.list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.35rem; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--surface-2); }
.rank { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; background: var(--surface-3); color: var(--text-2); flex-shrink: 0; }
.rank.r1 { background: linear-gradient(135deg, #FFD500, #FFB300); color: #4A3600; box-shadow: 0 6px 14px -6px rgba(255,180,0,.8); }
.rank.r2 { background: linear-gradient(135deg, #DDE6ED, #B7C6D2); color: #2C3E50; }
.rank.r3 { background: linear-gradient(135deg, #FFB37A, #FF6500); color: #fff; }
.theme-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.theme-choice { border: 2px solid var(--border); background: var(--surface); border-radius: 14px; padding: .85rem .5rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .45rem; font-weight: 600; font-size: .85rem; color: var(--text-2); transition: border-color .15s, background .15s, color .15s; }
.theme-choice .sw { width: 100%; max-width: 92px; height: 46px; border-radius: 9px; border: 1px solid var(--border); display: flex; overflow: hidden; }
.theme-choice .sw i { flex: 1; }
.theme-choice:hover { border-color: var(--border-strong); }
.theme-choice.active { border-color: var(--brand); color: var(--brand); background: rgba(0,145,185,.06); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.kv .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted-fg); margin-bottom: .2rem; }
.quote-card { border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem; display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; background: var(--surface); transition: opacity .2s; }
.quote-card + .quote-card { margin-top: .7rem; }
.quote-card.inactive { opacity: .6; }
.quote-card blockquote { font-style: italic; flex: 1; min-width: 220px; }
.steps { counter-reset: s; list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.steps li { counter-increment: s; display: flex; gap: .75rem; font-size: .88rem; align-items: flex-start; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 8px; background: rgba(0,145,185,.12); color: var(--brand); font-weight: 800; font-size: .75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.steps li b { display: block; font-size: .88rem; }
.steps li span { display: block; color: var(--muted-fg); font-size: .82rem; line-height: 1.5; }
.target-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.target-card summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .85rem; padding: .95rem 1.1rem; }
.target-card summary::-webkit-details-marker { display: none; }
.target-card[open] summary { border-bottom: 1px solid var(--border); }
.target-card .tc-body { padding: 1.1rem; }
.target-card + .target-card { margin-top: .75rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px var(--c-soft); display: inline-block; flex-shrink: 0; }
.dest-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.dest-card { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-xs); min-width: 0; opacity: .72; transition: opacity .15s; }
.dest-card.on { opacity: 1; border-color: color-mix(in srgb, var(--c) 35%, var(--border)); }
.dest-card .stat-icon { width: 40px; height: 40px; border-radius: 12px; }
.dest-card .status-dot { --c: var(--muted-fg); --c-soft: var(--surface-3); }
.dest-card .status-dot.on { --c: var(--success); --c-soft: rgba(22,163,74,.18); }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; text-align: center; padding: 1.5rem 1rem; border: 2px dashed var(--border-strong); border-radius: 16px; background: var(--surface-2); color: var(--muted-fg); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.dropzone svg { color: var(--brand); }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: rgba(0,145,185,.06); color: var(--text); }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (max-width: 1024px) { .dest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .dest-grid { grid-template-columns: 1fr; } }
.act-list { padding: .5rem 1.25rem 1rem; }
.act-day { position: sticky; top: calc(var(--topbar-h, 64px) + 4px); z-index: 2; display: inline-flex; align-items: center; gap: .4rem; margin: .9rem 0 .5rem; padding: .3rem .75rem; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font-size: .75rem; font-weight: 700; }
.act-item { display: flex; gap: .85rem; align-items: flex-start; padding: .7rem 0 .7rem; position: relative; }
.act-item + .act-item { border-top: 1px dashed var(--border); }
.act-icon { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--c-soft); color: var(--c); }
@media (max-width: 767px) { .act-list { padding: .25rem .85rem .75rem; } }
.timeline { list-style: none; position: relative; }
.timeline li { position: relative; padding: 0 0 1rem 1.6rem; }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: -6px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ''; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--brand)); box-shadow: 0 0 0 3px var(--surface); }

/* ---------------------------- auth pages ---------------------------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.auth-aside { position: relative; overflow: hidden; color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(90% 70% at 100% 0%, rgba(255,213,0,.25) 0%, transparent 55%), radial-gradient(70% 60% at 0% 100%, rgba(255,101,0,.28) 0%, transparent 60%), linear-gradient(140deg, #002A55 0%, #004E9B 45%, #0091B9 100%); }
.auth-aside::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(180deg, #000 30%, transparent 95%); }
.auth-aside > * { position: relative; }
.auth-brand { display: flex; align-items: center; gap: .8rem; font-weight: 800; font-size: 1.15rem; }
.auth-brand img { height: 46px; border-radius: 10px; background: #fff; padding: 4px; }
.auth-aside h1 { font-size: 2.3rem; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; max-width: 460px; }
.auth-aside h1 span { color: var(--yellow); }
.auth-aside p { color: rgba(255,255,255,.8); margin-top: .9rem; max-width: 440px; }
.auth-features { display: grid; gap: .75rem; margin-top: 2rem; max-width: 420px; }
.auth-feature { display: flex; gap: .75rem; align-items: center; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: .75rem .9rem; font-size: .9rem; backdrop-filter: blur(4px); }
.auth-feature .fi { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,213,0,.18); color: var(--yellow); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-aside .foot { font-size: .8rem; color: rgba(255,255,255,.6); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; position: relative; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo-sm { display: none; align-items: center; gap: .6rem; font-weight: 800; margin-bottom: 1.75rem; }
.auth-logo-sm img { height: 40px; }
.auth-card h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.auth-sub { color: var(--muted-fg); font-size: .93rem; margin: .35rem 0 1.75rem; }
.auth-row { display: flex; justify-content: space-between; align-items: center; font-size: .875rem; margin-bottom: 1.25rem; }
.auth-row label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.auth-footer { text-align: center; font-size: .88rem; color: var(--muted-fg); margin-top: 1.5rem; }
.auth-footer a { color: var(--brand); font-weight: 600; }
.theme-fixed { position: absolute; top: 1.25rem; right: 1.25rem; }
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: radial-gradient(60% 50% at 50% 0%, rgba(0,145,185,.12), transparent 70%), var(--bg); }
.center-card { max-width: 480px; width: 100%; text-align: center; padding: 2.5rem 2rem; }
.center-card .big-icon { width: 84px; height: 84px; border-radius: 26px; margin: 0 auto 1.25rem; display: flex; align-items: center; justify-content: center; background: var(--c-soft); color: var(--c); }
.center-card .code { font-size: 3.5rem; font-weight: 900; letter-spacing: -.04em; background: linear-gradient(135deg, var(--deep), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.center-card h1 { font-size: 1.4rem; font-weight: 800; margin: .5rem 0; }
.center-card p { color: var(--muted-fg); }

/* ---------------------------- install banner ---------------------------- */
.install-banner { position: fixed; left: 1rem; right: 1rem; bottom: calc(var(--bottom-nav-h) + 1rem + env(safe-area-inset-bottom)); z-index: 85; max-width: 440px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: .85rem 1rem; display: none; align-items: center; gap: .8rem; animation: pop .2s ease-out; }
.install-banner.show { display: flex; }
.install-banner .ib-icon { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--deep), var(--brand)); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ---------------------------- responsive ---------------------------- */
@media (max-width: 1200px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-search { width: 220px; }
}
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.active { transform: none; }
  .sidebar-close { display: inline-flex; }
  .main-content { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 1.25rem; }
  .page-content { padding: 1.5rem 1.25rem 2rem; }
  .grid-main-side { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-logo-sm { display: flex; }
}
@media (max-width: 860px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .quick-search { display: none; }
  .breadcrumb { display: none; }
  .topbar-title { display: block; }
}
@media (max-width: 767px) {
  body { font-size: 14.5px; }
  .bottom-nav { display: block; }
  .page-content { padding: 1rem .9rem calc(var(--bottom-nav-h) + 1.5rem + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 .9rem; --topbar-h: 58px; height: 58px; }
  .user-info, .user-btn > svg:last-child { display: none; }
  .user-btn { padding: .2rem; border-radius: 50%; height: auto; border: 0; background: none; }
  .form-grid-3, .form-grid-2 { grid-template-columns: 1fr; }
  .page-header { margin-bottom: 1.1rem; }
  .page-title { font-size: 1.3rem; }
  .page-title .title-icon { width: 36px; height: 36px; border-radius: 10px; }
  .page-header-row { align-items: stretch; flex-direction: column; }
  .page-header-row > .btn, .page-header-row > form > .btn { width: 100%; }
  .page-actions { width: 100%; }
  .page-actions > .btn, .page-actions > form, .page-actions > a { flex: 1; }
  .page-actions > form .btn { width: 100%; }
  .hero { padding: 1.25rem; border-radius: 18px; }
  .hero h1 { font-size: 1.2rem; }
  .hero-stat { flex: 1; min-width: 90px; padding: .55rem .75rem; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin-bottom: 1rem; }
  .stats-grid.cols-1-sm { grid-template-columns: 1fr; }
  .stat { padding: .85rem; gap: .7rem; flex-direction: column; align-items: flex-start; }
  .stat-icon { width: 38px; height: 38px; border-radius: 11px; }
  .stat-icon svg { width: 20px; height: 20px; }
  .stat-value { font-size: 1.3rem; }
  .stat-label { font-size: .66rem; }
  .stat-border { padding: .8rem .9rem; }
  .stat-border .num { font-size: 1.35rem; }
  .card { border-radius: 14px; }
  .card-header, .card-body { padding: 1rem; }
  .card-footer { padding: .85rem 1rem; border-radius: 0 0 14px 14px; }
  .card-footer .btn { flex: 1; }
  .filter-form { gap: .5rem; }
  .filter-form .form-select, .filter-form .form-input, .filter-form .search-box { flex: 1 1 calc(50% - .5rem); min-width: 0; max-width: none; }
  .filter-form .btn { flex: 1 1 auto; }
  .filter-label { width: 100%; }
  .table td, .table th { padding: .6rem .7rem; }
  .pagination { justify-content: center; }
  .pagination > .text-sm { width: 100%; text-align: center; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal, .modal.lg { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; animation: sheet .25s cubic-bezier(.4,0,.2,1); padding-bottom: env(safe-area-inset-bottom); }
  @keyframes sheet { from { transform: translateY(100%); } to { transform: none; } }
  .modal-footer .btn { flex: 1; }
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }
  .hide-sm { display: none !important; }
  .show-sm { display: initial !important; }
  .tabs { padding: 0 .35rem; }
  .tab-btn { padding: .8rem .7rem; font-size: .82rem; }
  .auth-card h2 { font-size: 1.45rem; }
  .bar-chart { height: 150px; gap: 3px; }
  .bar-chart .lbl { font-size: .58rem; }
  .bar-chart .col:nth-child(odd) .lbl { visibility: hidden; }
  .switch-row { padding: .8rem; }
  .list-row { padding: .75rem 1rem; }
  #copy-toast { bottom: calc(var(--bottom-nav-h) + 1rem); }
}
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  details.acc .acc-body { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  .sidebar, .topbar, .bottom-nav, .filter-card, .btn, .pagination { display: none !important; }
  .main-content { margin: 0; } .page-content { padding: 0; } body { background: #fff; }
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; display: inline-flex; }

/* ================= v1.2: Super Admin, Login-as bar, Marketers ================= */
.fw-500 { font-weight: 500; }
.imp-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: .75rem; padding: .55rem 2rem; background: linear-gradient(90deg, #FF6500, #ff8a1f); color: #fff; font-size: .88rem; box-shadow: 0 6px 18px -8px rgba(255,101,0,.6); }
.imp-bar .imp-icon { display: inline-flex; width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.2); align-items: center; justify-content: center; flex-shrink: 0; }
.imp-bar .imp-text { flex: 1; min-width: 0; }
.imp-bar .imp-email { opacity: .85; }
.imp-bar form { margin: 0; }
.imp-btn { background: #fff; color: #c44d00; border: 0; font-weight: 700; white-space: nowrap; }
.imp-btn:hover { background: #FFD500; color: #003A75; }
.imp-bar + .topbar { top: 46px; }
.super-badge { display: flex; align-items: center; gap: .5rem; margin: .25rem .25rem .75rem; padding: .6rem .8rem; border-radius: 12px; font-weight: 700; font-size: .85rem; color: #003A75; background: linear-gradient(120deg, #FFD500, #ffe766); }
.sidebar-link.super-link { background: linear-gradient(120deg, rgba(255,213,0,.18), rgba(255,101,0,.14)); color: #fff; border: 1px solid rgba(255,213,0,.28); }
.sidebar-link.super-link svg { color: var(--yellow); opacity: 1; }
.super-hero { background: radial-gradient(120% 140% at 100% 0%, rgba(255,213,0,.3) 0%, transparent 45%), linear-gradient(120deg, #002a55 0%, #004E9B 45%, #0091B9 100%); }
.super-hero h1 { display: flex; align-items: center; gap: .6rem; }
.super-hero h1 svg { color: var(--yellow); }
.super-search { display: flex; align-items: center; gap: .6rem; margin-top: 1.1rem; max-width: 620px; padding: .35rem .4rem .35rem .9rem; border-radius: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); }
.super-search input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: .95rem; padding: .4rem 0; }
.super-search input::placeholder { color: rgba(255,255,255,.7); }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .75rem; padding: 1rem 1.35rem 1.35rem; }
.quick-tile { display: flex; flex-direction: column; gap: .2rem; padding: 1rem; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); transition: transform .15s, border-color .15s, box-shadow .15s; }
.quick-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--c) 45%, transparent); box-shadow: 0 10px 24px -16px var(--c); }
.quick-tile .qi { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-soft); color: var(--c); margin-bottom: .45rem; }
.quick-tile b { font-size: .92rem; color: var(--text); }
.quick-tile span:last-child { font-size: .76rem; color: var(--muted-fg); }
.info-rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--border); font-size: .86rem; }
.info-rows > div:last-child { border-bottom: 0; }
.info-rows span { color: var(--muted-fg); }
.info-rows b { font-weight: 600; text-align: right; word-break: break-word; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-right: .4rem; box-shadow: 0 0 0 3px rgba(22,163,74,.18); vertical-align: middle; }
.level-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem; }
.level-choice { position: relative; display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border: 2px solid var(--border); border-radius: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.level-choice input { position: absolute; opacity: 0; pointer-events: none; }
.level-choice .lc-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--c-soft); color: var(--c); flex-shrink: 0; }
.level-choice b { display: block; }
.level-choice small { display: block; color: var(--muted-fg); font-size: .78rem; margin-top: .15rem; }
.level-choice:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c-soft) 60%, transparent); }
.level-choice:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.tabs a.tab-btn { text-decoration: none; }
@media (max-width: 767px) {
  .imp-bar { padding: .5rem .85rem; flex-wrap: wrap; font-size: .82rem; }
  .imp-bar .imp-email { display: none; }
  .imp-bar + .topbar { top: 0; }
  .imp-bar { position: relative; }
  .quick-grid { grid-template-columns: 1fr 1fr; padding: .85rem; gap: .6rem; }
  .super-search { margin-top: .9rem; }
}
.stats-grid.cols-7 { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); }
.stats-grid.cols-7 .stat { padding: 1rem; gap: .75rem; }
.stats-grid.cols-7 .stat-icon { width: 42px; height: 42px; border-radius: 12px; }
@media (max-width: 767px) { .imp-bar { flex-wrap: nowrap; gap: .5rem; } .imp-bar .imp-icon { display: none; } .imp-bar .imp-text { font-size: .78rem; line-height: 1.3; } .imp-btn { padding: .4rem .6rem; font-size: .76rem; } }

/* ================= v1.3: language switcher ================= */
.lang-btn { display: inline-flex; align-items: center; gap: .35rem; height: 40px; padding: 0 .7rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: .82rem; cursor: pointer; transition: border-color .15s, background .15s; }
.lang-btn:hover { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
.lang-btn svg { color: var(--brand); }
.lang-flag { display: inline-flex; width: 26px; height: 22px; border-radius: 6px; align-items: center; justify-content: center; font-size: .7rem; font-weight: 800; background: var(--sky, #BAE4F0); color: #004E9B; }
.dropdown-item.active { font-weight: 700; }
.auth-tools { position: absolute; top: 1.25rem; right: 1.25rem; display: flex; gap: .5rem; align-items: center; z-index: 5; }
.auth-tools .theme-fixed { position: static; }
.auth-tools .dropdown-menu { right: 0; left: auto; }
.page-tools { position: fixed; top: 1rem; right: 1rem; display: flex; gap: .5rem; z-index: 20; }
html[lang="bn"] body { font-family: 'Hind Siliguri', 'Inter', system-ui, sans-serif; }
@media (max-width: 767px) { .lang-btn { height: 36px; padding: 0 .5rem; } .lang-btn .lang-code { font-size: .75rem; } }

/* ===== v1.4: per-user permissions, notifications ===== */
.perm-list { display: grid; gap: .5rem; }
.perm-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); border-left: 3px solid var(--border-strong); }
.perm-row.eff-on { border-left-color: var(--success); }
.perm-info { min-width: 0; display: flex; flex-direction: column; }
.perm-info .checkbox-desc { font-size: .75rem; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .38rem .7rem; font-size: .78rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.seg label + label span { border-left: 1px solid var(--border); }
.seg input:checked + span { background: var(--surface-3); color: var(--text); }
.seg label.on input:checked + span { background: var(--success); color: #fff; }
.seg label.off input:checked + span { background: var(--danger); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: -2px; }
.role-state { font-weight: 600; }
.role-state.is-on { color: var(--success); }
.role-state.is-off { color: var(--muted-fg); }
@media (max-width: 640px) { .perm-row { flex-direction: column; align-items: stretch; } .seg { align-self: flex-start; } }

.notif-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--surface); }
.notif-menu { width: 340px; max-width: calc(100vw - 1.5rem); padding: 0; }
.notif-menu .notif-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .9rem; }
.notif-item { display: flex; gap: .65rem; padding: .7rem .9rem; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-item.unread { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.notif-item .ni { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: color-mix(in srgb, var(--c, var(--brand)) 14%, transparent); color: var(--c, var(--brand)); }
.notif-item .nt { font-size: .84rem; font-weight: 600; line-height: 1.3; }
.notif-item .nd { font-size: .78rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-item .nm { font-size: .72rem; color: var(--muted-fg); margin-top: .15rem; }
.notif-foot { display: block; text-align: center; padding: .6rem; font-size: .82rem; font-weight: 600; color: var(--brand); }
.notif-empty { padding: 1.5rem .9rem; text-align: center; color: var(--muted-fg); font-size: .85rem; }