/* ============================================================
   OneAura ERP — Full UI Redesign matching target mockup
   Navy sidebar · White content · Blue module tab topbar
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS — Light default (matches screenshot)
   ═══════════════════════════════════════════════════════════ */
:root {
  --primary:      #1e4db7;
  --primary-l:    #2563eb;
  --primary-ll:   #3b82f6;
  --primary-d:    #dbeafe;
  --primary-b:    #93c5fd;
  --primary-t:    rgba(30,77,183,.08);
  --primary-h:    rgba(30,77,183,.05);

  --bg:           #f0f2f7;
  --bg2:          #ffffff;
  --bg3:          #f4f6fb;
  --bg4:          #e8edf5;
  --bg5:          #dde3ef;
  --bg-card:      #ffffff;
  --bg-hover:     #f5f7fc;

  --bdr:          #e2e8f0;
  --bdr2:         #cbd5e1;
  --bdr-card:     #e8edf5;

  --tx:           #0f172a;
  --tx2:          #334155;
  --tx3:          #64748b;
  --tx4:          #94a3b8;

  --sidebar-bg:         #1e2d6b;
  --sidebar-bg2:        #243480;
  --sidebar-bdr:        #2d3f8f;
  --sidebar-tx:         rgba(255,255,255,.75);
  --sidebar-tx2:        rgba(255,255,255,.45);
  --sidebar-active-bg:  rgba(255,255,255,.14);
  --sidebar-hover-bg:   rgba(255,255,255,.08);
  --sidebar-section:    rgba(255,255,255,.32);

  --topbar-bg:    #ffffff;
  --topbar-bdr:   #e2e8f0;
  --topbar-h:     58px;

  --green:        #16a34a;
  --green-d:      #f0fdf4;
  --green-b:      #86efac;
  --red:          #dc2626;
  --red-d:        #fef2f2;
  --red-b:        #fca5a5;
  --yellow:       #d97706;
  --yellow-d:     #fffbeb;
  --yellow-b:     #fcd34d;
  --blue:         #2563eb;
  --blue-d:       #eff6ff;
  --blue-b:       #93c5fd;
  --teal:         #0d9488;
  --orange:       #ea580c;
  --orange-d:     #fff7ed;
  --orange-b:     #fed7aa;
  --purple:       #7c3aed;
  --purple-d:     #f5f3ff;
  --purple-b:     #c4b5fd;

  --sidebar-w:    260px;
  --font:         'Plus Jakarta Sans', sans-serif;
  --mono:         'JetBrains Mono', monospace;
  --rad:          8px;
  --rad-lg:       12px;
  --rad-sm:       5px;
  --rad-full:     9999px;

  --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:       0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:    0 12px 32px rgba(0,0,0,.14);
  --shadow-card:  0 1px 4px rgba(0,0,0,.06);
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --primary:      #3b82f6;
  --primary-l:    #60a5fa;
  --primary-d:    #1e3a5f;
  --primary-b:    #2563eb;
  --primary-t:    rgba(59,130,246,.12);
  --primary-h:    rgba(59,130,246,.06);

  --bg:           #0d1117;
  --bg2:          #131929;
  --bg3:          #1a2236;
  --bg4:          #1e2a42;
  --bg5:          #243352;
  --bg-card:      #131929;
  --bg-hover:     #1a2236;

  --bdr:          #1e2e4a;
  --bdr2:         #253660;
  --bdr-card:     #1e2e4a;

  --tx:           #e2eaf8;
  --tx2:          #8da4c8;
  --tx3:          #4d6285;
  --tx4:          #243050;

  --topbar-bg:    #131929;
  --topbar-bdr:   #1e2e4a;

  --green-d:      #032010;
  --red-d:        #200808;
  --yellow-d:     #1a1200;
  --blue-d:       #071830;
  --orange-d:     #1a0a00;
  --purple-d:     #1a0a30;

  --shadow-card:  0 2px 8px rgba(0,0,0,.3);
  --shadow:       0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.6);
}

/* ═══════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════ */
html, body { height: 100%; font-family: var(--font); font-size: 13px; background: var(--bg); color: var(--tx); line-height: 1.5; -webkit-font-smoothing: antialiased; }
#app { display: flex; flex-direction: column; height: 100vh; }

/* ═══════════════════════════════════════════════════════════
   TOPBAR — white bar, logo left, module pill tabs, user right
   ═══════════════════════════════════════════════════════════ */
.topbar, .ws-topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-bdr);
  flex-shrink: 0;
  z-index: 50;
  position: relative;
  padding: 0;
}

/* Logo block */
.topbar-logo, .ws-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 0 20px;
  height: 100%;
  flex-shrink: 0;
  border-right: 1px solid var(--topbar-bdr);
  min-width: var(--sidebar-w);
}
.topbar-gem {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.topbar-name, .ws-brand-name {
  font-size: 16px; font-weight: 800; color: var(--tx); letter-spacing: -.4px;
}
.topbar-name span { color: var(--primary); }

/* Module tabs — horizontal nav */
.topbar-modules {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
}
.topbar-modules::-webkit-scrollbar { display: none; }

.topbar-mod {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--tx3);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  border: none;
  background: transparent;
  font-family: var(--font);
  position: relative;
}
.topbar-mod:hover { background: var(--bg3); color: var(--tx); }
.topbar-mod.active { background: var(--primary); color: #fff; }
.topbar-mod-divider { width: 1px; height: 18px; background: var(--bdr); flex-shrink: 0; margin: 0 4px; }

/* Right side actions */
.topbar-right, .ws-right {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
  flex-shrink: 0;
}

/* Search */
.topbar-search, .ws-search-wrap { position: relative; margin-right: 4px; }
.topbar-search input, .ws-search-wrap input {
  width: 180px; height: 32px;
  background: var(--bg3);
  border: 1px solid var(--bdr);
  border-radius: var(--rad-full);
  padding: 0 12px 0 32px;
  font-size: 12px; color: var(--tx); font-family: var(--font);
  outline: none; transition: all .2s;
}
.topbar-search input:focus, .ws-search-wrap input:focus { width: 220px; border-color: var(--primary); background: var(--bg2); }
.topbar-search input::placeholder, .ws-search-wrap input::placeholder { color: var(--tx4); }
.topbar-search-ico, .ws-search-ico {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 12px; color: var(--tx3); pointer-events: none;
}
.topbar-search-hint {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: var(--tx4);
  background: var(--bg4); border: 1px solid var(--bdr2);
  border-radius: 3px; padding: 1px 5px;
}
.topbar-spacer { flex: 1; }

/* Icon buttons */
.topbar-icon-btn, .ws-icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--rad);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--tx3); font-size: 15px;
  position: relative; transition: background .12s, color .12s;
  border: none; background: transparent;
}
.topbar-icon-btn:hover, .ws-icon-btn:hover { background: var(--bg3); color: var(--tx); }
.notif-badge, .ws-notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--red); border-radius: 50%;
  border: 2px solid var(--topbar-bg);
}

/* User button */
.topbar-user, .ws-user-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: var(--rad);
  cursor: pointer; border: none; background: transparent;
  font-family: var(--font); transition: background .12s;
}
.topbar-user:hover, .ws-user-btn:hover { background: var(--bg3); }
.topbar-user-name, .ws-user-name { font-size: 12.5px; font-weight: 600; color: var(--tx); }
.topbar-user-role, .ws-user-role { font-size: 10.5px; color: var(--tx3); }
.topbar-user-info { line-height: 1.2; }

/* Theme toggle */
.theme-toggle {
  width: 34px; height: 34px; border-radius: var(--rad); border: none;
  background: transparent; color: var(--tx3); cursor: pointer;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.theme-toggle:hover { background: var(--bg3); color: var(--tx); }

/* Breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--tx3); }
.breadcrumb-sep { color: var(--bdr2); font-size: 10px; }
.breadcrumb-item { cursor: pointer; transition: color .12s; }
.breadcrumb-item:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--tx); font-weight: 600; }

/* WS switcher */
.ws-left { display: flex; align-items: center; flex-shrink: 0; height: 100%; }
.ws-center { flex: 1; display: flex; align-items: center; padding: 0 16px; overflow-x: auto; }
.ws-current-name { font-size: 13px; font-weight: 700; color: var(--tx); display: flex; align-items: center; gap: 8px; }
.ws-current-ico { font-size: 16px; }

.ws-switcher { position: relative; height: 100%; }
.ws-switcher-btn {
  display: flex; align-items: center; gap: 6px;
  height: 100%; padding: 0 14px;
  background: none; border: none; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--tx2);
  font-family: var(--font); transition: background .15s; white-space: nowrap;
}
.ws-switcher-btn:hover { background: var(--bg3); }
.ws-sw-ico { font-size: 14px; }
.ws-sw-chevron { margin-left: auto; font-size: 10px; color: var(--tx4); }

.ws-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  width: 280px; background: var(--bg2); border: 1px solid var(--bdr2);
  border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 1000; overflow: hidden; margin-top: 4px;
}
.ws-dropdown.open { display: block; }
.ws-dd-search { padding: 10px 12px; border-bottom: 1px solid var(--bdr); }
.ws-dd-search input { width: 100%; background: var(--bg3); border: 1px solid var(--bdr); border-radius: 6px; padding: 6px 10px; font-size: 12px; color: var(--tx); font-family: var(--font); outline: none; }
.ws-dd-items { max-height: 340px; overflow-y: auto; padding: 6px; }
.ws-dd-section { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--tx3); padding: 8px 10px 4px; }
.ws-dd-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; transition: background .1s; }
.ws-dd-item:hover, .ws-dd-item.active { background: var(--primary-t); }
.ws-dd-item.active .ws-dd-label { color: var(--primary); font-weight: 700; }
.ws-dd-ico { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.ws-dd-label { font-size: 12px; font-weight: 600; color: var(--tx); }
.ws-dd-sub   { font-size: 10px; color: var(--tx3); margin-top: 1px; }
.ws-dd-soon  { margin-left: auto; font-size: 8px; font-weight: 800; color: var(--yellow); background: var(--yellow-d); border: 1px solid var(--yellow-b); border-radius: 3px; padding: 1px 5px; }

/* User dropdown */
.ws-user-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  width: 220px; background: var(--bg2); border: 1px solid var(--bdr2);
  border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 1000; overflow: hidden;
}
.ws-user-dropdown.open { display: block; }
.ws-ud-header { padding: 14px 16px; border-bottom: 1px solid var(--bdr); display: flex; align-items: center; gap: 10px; }
.ws-ud-name  { font-size: 13px; font-weight: 700; color: var(--tx); }
.ws-ud-email { font-size: 11px; color: var(--tx3); margin-top: 2px; }
.ws-ud-item  { display: flex; align-items: center; gap: 10px; padding: 10px 16px; cursor: pointer; font-size: 13px; color: var(--tx2); transition: background .1s; }
.ws-ud-item:hover { background: var(--bg3); color: var(--tx); }
.ws-ud-item.danger { color: var(--red); }
.ws-ud-item.danger:hover { background: var(--red-d); }
.ws-ud-divider { height: 1px; background: var(--bdr); margin: 4px 0; }

/* Notif panel */
.ws-notif-panel, .notif-panel {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px; background: var(--bg2); border: 1px solid var(--bdr2);
  border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 1000; overflow: hidden;
}
.ws-notif-panel.open, .notif-panel.show { display: block; }
.ws-notif-header, .notif-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--bdr); }
.notif-item { padding: 11px 16px; border-bottom: 1px solid var(--bdr); cursor: pointer; display: flex; align-items: flex-start; gap: 10px; transition: background .1s; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--primary-t); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.notif-text { font-size: 12px; color: var(--tx2); line-height: 1.4; }
.notif-time { font-size: 10px; color: var(--tx4); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   APP BODY
   ═══════════════════════════════════════════════════════════ */
.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  height: calc(100vh - var(--topbar-h));
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR — dark navy, collapsible nav groups
   ═══════════════════════════════════════════════════════════ */
.sidebar, .ws-sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-bdr);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  height: 100%;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 2px; }
.ws-sidebar::-webkit-scrollbar { width: 3px; }
.ws-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); }

/* Sidebar module header */
.sidebar-header, .ws-sidebar-header {
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-module-title {
  font-size: 13px; font-weight: 800; color: rgba(255,255,255,.9);
  letter-spacing: -.2px; display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.sidebar-module-title .mod-icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}

/* Primary CTA button in sidebar */
.sidebar-cta {
  width: 100%; padding: 9px 14px;
  background: var(--primary-l); color: #fff;
  border: none; border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: var(--font); transition: background .15s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.sidebar-cta:hover { background: var(--primary); }

.sidebar-body, .ws-sidebar-body {
  flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0;
}

/* Group labels */
.nav-group { padding: 0 0 4px; }
.nav-group-label, .ws-nav-section {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px 5px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--sidebar-section);
  cursor: pointer; user-select: none;
}
.nav-group-label .grp-chevron { font-size: 9px; opacity: .6; transition: transform .2s; }
.nav-group-label.collapsed .grp-chevron { transform: rotate(-90deg); }

/* Nav items */
.nav-item, .ws-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px; cursor: pointer;
  color: var(--sidebar-tx);
  font-size: 12.5px; font-weight: 500;
  transition: background .1s, color .1s;
  position: relative; margin: 0 8px; border-radius: 8px;
}
.nav-item:hover, .ws-nav-item:hover { background: var(--sidebar-hover-bg); color: rgba(255,255,255,.95); }
.nav-item.active, .ws-nav-item.active { background: var(--sidebar-active-bg); color: #fff; font-weight: 600; }
.nav-item.active::before, .ws-nav-item.active::before {
  content: ''; position: absolute;
  left: -8px; top: 6px; bottom: 6px;
  width: 3px; background: #60a5fa; border-radius: 0 3px 3px 0;
}
.nav-item-ico, .ws-nav-ico { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; opacity: .8; }
.nav-item.active .nav-item-ico, .ws-nav-item.active .ws-nav-ico { opacity: 1; }
.nav-item-label, .ws-nav-label { flex: 1; }
.nav-item-badge, .ws-nav-badge {
  min-width: 18px; height: 18px; background: var(--red); border-radius: 9px;
  font-size: 9px; font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.nav-item-soon { opacity: .55; cursor: default !important; }
.nav-item-soon:hover { background: transparent !important; }
.ws-nav-soon { font-size: 8px; font-weight: 800; color: var(--yellow); background: rgba(217,119,6,.15); border: 1px solid rgba(217,119,6,.25); border-radius: 3px; padding: 1px 5px; }
.nav-soon-badge { margin-left: auto; font-size: 8px; font-weight: 800; text-transform: uppercase; color: var(--yellow); background: var(--yellow-d); border: 1px solid var(--yellow-b); border-radius: 4px; padding: 1px 5px; flex-shrink: 0; }

/* Sidebar footer */
.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.sidebar-user-row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 8px; margin-bottom: 8px; }
.sidebar-user-name { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.9); }
.sidebar-user-role { font-size: 10px; color: rgba(255,255,255,.45); }
.btn-logout {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12); background: transparent;
  color: rgba(255,255,255,.5); font-size: 11.5px; cursor: pointer;
  transition: all .12s; font-family: var(--font);
}
.btn-logout:hover { background: rgba(220,38,38,.18); color: #fca5a5; border-color: rgba(220,38,38,.3); }

.sidebar-portal-tag {
  margin: 10px; padding: 7px 12px; border-radius: 8px;
  background: rgba(37,99,235,.2); border: 1px solid rgba(96,165,250,.25);
  font-size: 10px; font-weight: 700; color: #93c5fd;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: .8px;
}
.sidebar-portal-dot { width: 6px; height: 6px; border-radius: 50%; background: #60a5fa; }

/* WS sidebar tabs */
.ws-sidebar-tabs { display: flex; gap: 0; background: rgba(0,0,0,.2); border-radius: 7px; padding: 2px; margin-top: 10px; }
.ws-sidebar-tab { flex: 1; padding: 5px 8px; border-radius: 5px; font-size: 10px; font-weight: 700; text-align: center; cursor: pointer; color: rgba(255,255,255,.4); transition: all .15s; text-transform: uppercase; letter-spacing: .3px; }
.ws-sidebar-tab.active { background: rgba(255,255,255,.15); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.ws-sidebar-title { font-size: 13px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.ws-fav-empty { font-size: 11px; color: rgba(255,255,255,.35); padding: 10px 14px; font-style: italic; }
.ws-fav-btn { display: flex; align-items: center; gap: 8px; padding: 5px 14px; cursor: pointer; font-size: 12px; color: rgba(255,255,255,.6); transition: background .1s; border-radius: 7px; margin: 0 6px; }
.ws-fav-btn:hover { background: rgba(255,255,255,.08); }
.ws-fav-btn.active { color: var(--yellow); }

/* Mobile sidebar overlay */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 499; }
.sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════════════════════════
   PAGE — white content area
   ═══════════════════════════════════════════════════════════ */
.page { flex: 1; overflow-y: auto; background: var(--bg); padding: 24px 28px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.page-title-block { min-width: 0; }
.page-title { font-size: 21px; font-weight: 800; color: var(--tx); letter-spacing: -.4px; }
.page-subtitle { font-size: 12.5px; color: var(--tx3); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-inner { flex: 1; }

/* ═══════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════ */
.card { background: var(--bg-card); border: 1px solid var(--bdr-card); border-radius: var(--rad-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--bdr); min-height: 50px; gap: 8px; flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 700; color: var(--tx); letter-spacing: -.2px; }
.card-body { padding: 18px 20px; }
.card-body-sm { padding: 10px 16px; }

/* ═══════════════════════════════════════════════════════════
   STAT CARDS — icon box + label + big number (screenshot style)
   ═══════════════════════════════════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--bdr-card);
  border-radius: var(--rad-lg); padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
}
.stat-card::before { display: none; } /* remove old top bar */
.stat-card-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--tx2); }
.stat-icon-box {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.stat-icon-box.blue   { background: #dbeafe; color: #1d4ed8; }
.stat-icon-box.orange { background: #ffedd5; color: #c2410c; }
.stat-icon-box.green  { background: #dcfce7; color: #15803d; }
.stat-icon-box.purple { background: #ede9fe; color: #6d28d9; }
.stat-icon-box.teal   { background: #ccfbf1; color: #0f766e; }
.stat-icon-box.red    { background: #fee2e2; color: #b91c1c; }
.stat-icon-box.gold   { background: #fffbeb; color: #b45309; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--tx); letter-spacing: -1.5px; line-height: 1; }
.stat-sub   { font-size: 11.5px; color: var(--tx3); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════════════════════ */
.tab-bar { display: flex; border-bottom: 1px solid var(--bdr); margin-bottom: 16px; gap: 0; }
.tab-item { padding: 9px 18px; font-size: 12.5px; font-weight: 500; color: var(--tx3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s, border .12s; white-space: nowrap; }
.tab-item:hover { color: var(--tx); }
.tab-item.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 2px solid var(--bdr); }
th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--tx3); white-space: nowrap; background: var(--bg3); }
thead { position: sticky; top: 0; z-index: 1; }
td { padding: 11px 16px; font-size: 12.5px; color: var(--tx2); border-bottom: 1px solid var(--bdr); vertical-align: middle; }
tbody tr { transition: background .08s; }
tbody tr:hover td { background: var(--bg-hover); color: var(--tx); }
tbody tr:last-child td { border-bottom: none; }
.td-bold   { font-weight: 700; color: var(--tx); }
.td-mono   { font-family: var(--mono); font-size: 11px; }
.td-dim    { color: var(--tx3); }
.td-gold   { color: var(--primary); font-weight: 600; }
.td-green  { color: var(--green); }
.td-red    { color: var(--red); }
.td-purple { color: var(--primary); font-weight: 600; }
.text-purple { color: var(--primary); }
td:first-child, th:first-child { padding-left: 20px; }
.table-check { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }
.row-actions { opacity: 0; transition: opacity .1s; }
tbody tr:hover .row-actions { opacity: 1; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--rad); font-size: 12.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: all .12s;
  font-family: var(--font); white-space: nowrap; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary, .btn-gold { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 6px rgba(30,77,183,.2); }
.btn-primary:hover, .btn-gold:hover { background: var(--primary-l); border-color: var(--primary-l); }
.btn-ghost { background: transparent; color: var(--tx2); border-color: var(--bdr2); }
.btn-ghost:hover { background: var(--bg3); color: var(--tx); }
.btn-danger { background: transparent; color: var(--red); border-color: var(--red-b); }
.btn-danger:hover { background: var(--red-d); }
.btn-success { background: transparent; color: var(--green); border-color: var(--green-b); }
.btn-success:hover { background: var(--green-d); }
.btn-teal { background: var(--teal); color: #fff; border-color: transparent; }
.btn-teal:hover { filter: brightness(1.1); }
.btn-sm  { padding: 5px 11px !important; font-size: 11.5px !important; }
.btn-xs  { padding: 3px 8px !important; font-size: 10.5px !important; border-radius: var(--rad-sm) !important; }
.btn-lg  { padding: 11px 22px; font-size: 13.5px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; }

/* ═══════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--rad-full); font-size: 11px; font-weight: 600; letter-spacing: .2px; border: 1px solid transparent; }
.badge-active, .badge-paid, .badge-approved, .badge-completed, .badge-present, .badge-qualified { background: #dcfce7; color: #15803d; border-color: #86efac; }
.badge-inactive, .badge-cancelled, .badge-terminated { background: var(--bg3); color: var(--tx3); border-color: var(--bdr2); }
.badge-pending, .badge-draft, .badge-review { background: var(--yellow-d); color: var(--yellow); border-color: var(--yellow-b); }
.badge-rejected, .badge-overdue, .badge-absent, .badge-failed { background: var(--red-d); color: var(--red); border-color: var(--red-b); }
.badge-processing, .badge-in_progress, .badge-confirmed, .badge-sent { background: var(--blue-d); color: var(--blue); border-color: var(--blue-b); }
.badge-new { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.badge-purple, .badge-admin { background: var(--purple-d); color: var(--purple); border-color: var(--purple-b); }
.badge-gold { background: var(--yellow-d); color: var(--yellow); border-color: var(--yellow-b); }
.badge-teal { background: #ccfbf1; color: #0f766e; border-color: #5eead4; }
.badge-gray { background: var(--bg3); color: var(--tx3); border-color: var(--bdr2); }
.badge-blue { background: var(--blue-d); color: var(--blue); border-color: var(--blue-b); }
.badge-orange { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.chip { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--rad-sm); font-size: 11px; font-weight: 600; background: var(--bg3); color: var(--tx2); border: 1px solid var(--bdr2); }

/* ═══════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--tx2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.req { color: var(--red); }
.form-input, .form-select, .form-textarea, input, select, textarea {
  width: 100%; background: var(--bg2); border: 1.5px solid var(--bdr2);
  border-radius: var(--rad); padding: 9px 12px;
  color: var(--tx); font-size: 13px; font-family: var(--font);
  outline: none; transition: border .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus, .form-input:focus, .form-select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,77,183,.1);
}
input::placeholder, textarea::placeholder { color: var(--tx4); }
select { cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }
.form-help { font-size: 11px; color: var(--tx3); margin-top: 4px; }
.form-row, .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* ═══════════════════════════════════════════════════════════
   GRID HELPERS
   ═══════════════════════════════════════════════════════════ */
.grid-2   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3   { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }

/* ═══════════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════════ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 20px; backdrop-filter: blur(4px); }
.modal-box { background: var(--bg2); border: 1px solid var(--bdr); border-radius: var(--rad-lg); width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-box.modal-lg { max-width: 760px; }
.modal-box.modal-sm { max-width: 400px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--bdr); }
.modal-title { font-size: 15px; font-weight: 700; color: var(--tx); }
.modal-close { width: 30px; height: 30px; border-radius: var(--rad-sm); border: none; background: transparent; color: var(--tx3); cursor: pointer; font-size: 17px; display: flex; align-items: center; justify-content: center; transition: background .1s; }
.modal-close:hover { background: var(--bg3); color: var(--tx); }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px; border-top: 1px solid var(--bdr); background: var(--bg3); border-radius: 0 0 var(--rad-lg) var(--rad-lg); }

/* ═══════════════════════════════════════════════════════════
   AVATAR / EMPTY STATE / TOAST / SPINNER / PROGRESS / TOGGLE
   ═══════════════════════════════════════════════════════════ */
.avatar { border-radius: var(--rad-sm); background: var(--primary-t); border: 1px solid var(--primary-b); color: var(--primary); font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 11px; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 24px; text-align: center; }
.empty-state-icon  { font-size: 40px; margin-bottom: 14px; opacity: .5; }
.empty-state-title { font-size: 15px; font-weight: 700; color: var(--tx); margin-bottom: 6px; }
.empty-state-sub   { font-size: 13px; color: var(--tx3); }

#toast-container { position: fixed; bottom: 22px; right: 22px; z-index: 99999; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--rad-lg); font-size: 12.5px; font-weight: 500; background: var(--bg2); border: 1.5px solid var(--bdr); box-shadow: var(--shadow); max-width: 360px; animation: slideIn .2s ease; transition: opacity .3s, transform .3s; }
.alert-toast { position: fixed; bottom: 20px; right: 20px; padding: 10px 18px; border-radius: var(--rad-lg); background: var(--bg2); border: 1px solid var(--bdr); font-size: 12px; z-index: 99999; box-shadow: var(--shadow); }
.toast.success { border-color: var(--green-b); }
.toast.error   { border-color: var(--red-b); }
.toast.info    { border-color: var(--blue-b); }
.toast.warning { border-color: var(--yellow-b); }
.toast-ico     { font-size: 14px; flex-shrink: 0; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.spinner { width: 22px; height: 22px; border: 2.5px solid var(--bdr); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.progress { height: 7px; background: var(--bg3); border-radius: var(--rad-full); overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: var(--rad-full); transition: width .3s; }
.progress-lg { height: 10px; }

.toggle { width: 38px; height: 21px; background: var(--bdr2); border-radius: var(--rad-full); cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle.on { background: var(--primary); }
.toggle.on::after { transform: translateX(17px); }

/* ═══════════════════════════════════════════════════════════
   KANBAN BOARD
   ═══════════════════════════════════════════════════════════ */
.kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { min-width: 250px; width: 250px; background: var(--bg2); border: 1px solid var(--bdr); border-radius: var(--rad-lg); flex-shrink: 0; box-shadow: var(--shadow-card); }
.kanban-col-header { padding: 12px 14px; border-bottom: 1px solid var(--bdr); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.kanban-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.kanban-card { background: var(--bg3); border: 1px solid var(--bdr); border-radius: var(--rad); padding: 12px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.kanban-card:hover { border-color: var(--primary-b); box-shadow: 0 2px 10px rgba(30,77,183,.1); }
.kanban-card-title { font-size: 12.5px; font-weight: 600; color: var(--tx); margin-bottom: 6px; }

/* ═══════════════════════════════════════════════════════════
   PIPELINE — chevron stages matching screenshot
   ═══════════════════════════════════════════════════════════ */
.pipeline-stages { display: flex; align-items: stretch; margin-bottom: 16px; overflow-x: auto; gap: 0; }
.pipeline-stage {
  flex: 1; min-width: 100px;
  padding: 10px 18px 10px 28px;
  color: #fff; font-size: 12px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; gap: 6px;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 16px 50%);
  transition: filter .15s;
}
.pipeline-stage:first-child { clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%); }
.pipeline-stage:last-child  { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 16px 50%); }
.pipeline-stage:hover { filter: brightness(1.1); }
.pipeline-stage-count { background: rgba(255,255,255,.25); border-radius: 10px; padding: 1px 7px; font-size: 11px; margin-left: auto; }
.pipeline-stage:nth-child(1) { background: #2563eb; }
.pipeline-stage:nth-child(2) { background: #0891b2; }
.pipeline-stage:nth-child(3) { background: #ea580c; }
.pipeline-stage:nth-child(4) { background: #059669; }
.pipeline-stage:nth-child(5) { background: #1e3a6e; }

/* Legacy pipeline */
.pipeline { display: flex; align-items: center; gap: 0; margin-bottom: 20px; }
.pipeline-step { flex: 1; text-align: center; font-size: 11px; color: var(--tx3); padding: 6px; border-bottom: 2px solid var(--bdr); }
.pipeline-step.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.pipeline-step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--bdr); font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 4px; }
.pipeline-step.active .pipeline-step-num { color: var(--primary); border-color: var(--primary); background: var(--primary-d); }

/* ═══════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════ */
.section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--tx3); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--bdr); }
.divider { height: 1px; background: var(--bdr); margin: 14px 0; }
.flex { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; }
.gap-4{gap:4px} .gap-6{gap:6px} .gap-8{gap:8px} .gap-10{gap:10px} .gap-12{gap:12px} .gap-14{gap:14px} .gap-16{gap:16px} .gap-20{gap:20px}
.flex-1 { flex: 1; min-width: 0; } .flex-wrap { flex-wrap: wrap; } .min-w-0 { min-width: 0; } .ml-auto { margin-left: auto; }
.mt-4{margin-top:4px} .mt-6{margin-top:6px} .mt-8{margin-top:8px} .mt-10{margin-top:10px} .mt-12{margin-top:12px} .mt-16{margin-top:16px} .mt-20{margin-top:20px}
.mb-4{margin-bottom:4px} .mb-6{margin-bottom:6px} .mb-8{margin-bottom:8px} .mb-10{margin-bottom:10px} .mb-12{margin-bottom:12px} .mb-16{margin-bottom:16px} .mb-20{margin-bottom:20px}
.text-xs{font-size:10.5px} .text-sm{font-size:11.5px} .text-base{font-size:12.5px}
.font-500{font-weight:500} .font-600{font-weight:600} .font-700{font-weight:700} .font-800{font-weight:800}
.text-dim{color:var(--tx2)} .text-dimmer{color:var(--tx3)} .text-gold{color:var(--primary)} .text-green{color:var(--green)} .text-red{color:var(--red)} .text-blue{color:var(--blue)}
.text-mono{font-family:var(--mono)} .text-center{text-align:center} .text-right{text-align:right}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ── PAGINATION ── */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--bdr); font-size: 12px; color: var(--tx3); }
.pagination-btns { display: flex; align-items: center; gap: 4px; }
.page-btn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--bdr2); background: var(--bg2); color: var(--tx2); font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font); transition: all .1s; }
.page-btn:hover { background: var(--bg3); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── SEARCH BAR ── */
.search-bar { position: relative; display: flex; align-items: center; }
.search-bar-icon { position: absolute; left: 10px; color: var(--tx3); font-size: 13px; pointer-events: none; z-index: 1; }
.search-bar input { height: 34px; background: var(--bg2); border: 1.5px solid var(--bdr2); border-radius: var(--rad-full); padding: 0 12px 0 32px; font-size: 12.5px; color: var(--tx); font-family: var(--font); outline: none; width: 210px; transition: border .15s, width .2s; }
.search-bar input:focus { border-color: var(--primary); width: 270px; box-shadow: 0 0 0 3px rgba(30,77,183,.08); }
.search-bar input::placeholder { color: var(--tx4); }

/* ── TIMELINE ── */
.tl-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bdr); }
.tl-item:last-child { border-bottom: none; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.tl-title { font-size: 12.5px; font-weight: 600; color: var(--tx); }
.tl-meta { font-size: 11px; color: var(--tx3); margin-top: 2px; }

/* ── PAYSLIP ── */
.payslip-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--bdr); }
.payslip-row    { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 13px; border-bottom: 1px dashed var(--bdr); }
.payslip-total  { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 15px; font-weight: 800; color: var(--primary); border-top: 2px solid var(--primary); margin-top: 8px; }

/* ── MISC ── */
.metric-card { background: var(--bg-card); border: 1px solid var(--bdr-card); border-radius: var(--rad-lg); padding: 16px 18px; box-shadow: var(--shadow-card); }
.action-btn { padding: 4px 10px; border-radius: var(--rad-sm); font-size: 11px; font-weight: 600; border: 1px solid var(--bdr2); background: transparent; color: var(--tx2); cursor: pointer; font-family: var(--font); transition: all .1s; }
.action-btn:hover { background: var(--bg3); color: var(--tx); }
.map-frame { width: 100%; height: 320px; border-radius: var(--rad-lg); overflow: hidden; border: 1px solid var(--bdr); }
.clock-btn { height: 52px; background: var(--primary); color: #fff; border: none; border-radius: var(--rad-lg); font-size: 15px; font-weight: 700; cursor: pointer; width: 100%; font-family: var(--font); display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s; box-shadow: 0 4px 14px rgba(30,77,183,.25); }
.clock-btn:hover { background: var(--primary-l); }
.ptr-indicator { display: flex; justify-content: center; padding: 10px; color: var(--tx3); font-size: 12px; }
.topbar-company { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.topbar-co-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.topbar-co-name { font-size: 13px; font-weight: 600; color: var(--tx); white-space: nowrap; }

/* ── SKELETON ── */
.skeleton { background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-text  { height: 12px; margin: 6px 0; border-radius: 4px; }
.skeleton-title { height: 18px; width: 60%; margin-bottom: 10px; border-radius: 4px; }

/* ── BOTTOM SHEET ── */
.bottom-sheet { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg2); border-radius: 20px 20px 0 0; padding: 0 0 env(safe-area-inset-bottom); z-index: 600; transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: 0 -4px 32px rgba(0,0,0,.15); }
.bottom-sheet.open { transform: translateY(0); }
.bottom-sheet-handle { width: 36px; height: 4px; background: var(--bdr2); border-radius: 2px; margin: 10px auto 0; }

/* ── MOBILE NAV ── */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: calc(58px + env(safe-area-inset-bottom)); background: var(--bg2); border-top: 1px solid var(--bdr); padding: 0 8px env(safe-area-inset-bottom); z-index: 500; justify-content: space-around; align-items: center; }
.mobile-nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 10px; font-weight: 600; color: var(--tx3); transition: all .15s; flex: 1; text-align: center; }
.mobile-nav-item.active { color: var(--primary); }
.mobile-hamburger { width: 36px; height: 36px; border-radius: 8px; display: none; align-items: center; justify-content: center; cursor: pointer; color: var(--tx2); font-size: 18px; border: none; background: transparent; transition: background .12s; }
.mobile-hamburger:hover { background: var(--bg3); }

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════ */
.login-wrap { min-height: 100vh; display: flex; background: var(--bg); }
.login-left { flex: 1; background: linear-gradient(145deg, #0f1e3d 0%, #1a2f6a 50%, #0d1629 100%); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; position: relative; overflow: hidden; }
.login-left::before { content: ''; position: absolute; width: 450px; height: 450px; background: radial-gradient(circle, rgba(37,99,235,.2) 0%, transparent 70%); top: -120px; right: -100px; }
.login-left::after  { content: ''; position: absolute; width: 320px; height: 320px; background: radial-gradient(circle, rgba(59,130,246,.12) 0%, transparent 70%); bottom: -60px; left: -60px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; position: relative; z-index: 1; }
.login-brand-gem { width: 48px; height: 48px; background: var(--primary-l); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800; color: #fff; }
.login-brand-name { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.login-brand-name span { color: #93c5fd; }
.login-tagline { font-size: 30px; font-weight: 800; color: #fff; line-height: 1.25; text-align: center; margin-bottom: 32px; position: relative; z-index: 1; }
.login-features { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.login-feature { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: rgba(255,255,255,.82); }
.login-feature::before { content: '✓'; width: 20px; height: 20px; background: rgba(37,99,235,.35); border: 1px solid rgba(96,165,250,.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #93c5fd; flex-shrink: 0; }
.login-right { width: 440px; display: flex; align-items: center; justify-content: center; padding: 40px; background: var(--bg2); }
.login-form-wrap { width: 100%; max-width: 360px; }
.login-form-title { font-size: 24px; font-weight: 800; color: var(--tx); margin-bottom: 6px; letter-spacing: -.4px; }
.login-form-sub { font-size: 13.5px; color: var(--tx3); margin-bottom: 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 12px; font-weight: 600; color: var(--tx2); margin-bottom: 6px; }
.login-field input { width: 100%; height: 42px; background: var(--bg3); border: 1.5px solid var(--bdr2); border-radius: var(--rad); padding: 0 14px; font-size: 13.5px; color: var(--tx); font-family: var(--font); outline: none; transition: border .15s, box-shadow .15s; }
.login-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,77,183,.1); background: var(--bg2); }
.login-field input::placeholder { color: var(--tx4); }
.login-err { color: var(--red); font-size: 12px; margin: 6px 0; min-height: 18px; }
.btn-login { height: 44px; background: var(--primary); color: #fff; border: none; border-radius: var(--rad); font-size: 13.5px; font-weight: 700; cursor: pointer; width: 100%; margin-top: 8px; transition: background .15s; font-family: var(--font); display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 12px rgba(30,77,183,.3); }
.btn-login:hover { background: var(--primary-l); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .mobile-nav       { display: flex; }
  .mobile-hamburger { display: flex; }
  .sidebar, .ws-sidebar { position: fixed; top: var(--topbar-h); left: calc(-1 * var(--sidebar-w)); bottom: 0; z-index: 400; transition: left .25s cubic-bezier(.4,0,.2,1); box-shadow: 4px 0 24px rgba(0,0,0,.2); }
  .sidebar.sidebar-open, .ws-sidebar.open { left: 0; }
  .ws-left    { width: auto; }
  .ws-center  { display: none; }
  .ws-search-wrap { display: none; }
  .ws-brand-name  { display: none; }
  .ws-user-name, .ws-user-role { display: none; }
  .ws-switcher-btn span:not(.ws-sw-ico):not(.ws-sw-chevron) { display: none; }
  .ws-switcher-btn { padding: 0 8px; }
  .topbar-modules   { display: none; }
  .topbar-search    { display: none; }
  .topbar-user-info { display: none !important; }
  .hide-mobile      { display: none !important; }
  .page { padding: 14px 14px calc(68px + env(safe-area-inset-bottom)) !important; }
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; justify-content: center; }
  .page-title { font-size: 18px !important; }
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .stat-card  { padding: 14px !important; }
  .stat-value { font-size: 22px !important; }
  .grid-2, .grid-2-1, .grid-1-2, .grid-3 { grid-template-columns: 1fr !important; }
  .form-row, .form-row-2, .form-row-3 { grid-template-columns: 1fr !important; }
  .modal-overlay { padding: 0 !important; align-items: flex-end !important; }
  .modal-box     { border-radius: 20px 20px 0 0 !important; max-height: 92vh; width: 100% !important; }
  .modal-body    { max-height: 70vh; overflow-y: auto; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 480px; }
  td, th { padding: 8px 10px !important; font-size: 12px; }
  .login-left  { display: none; }
  .login-right { width: 100%; padding: 32px 24px; }
  .pipeline-stage { min-width: 80px; padding: 8px 10px 8px 20px; font-size: 11px; }
  .clock-btn { height: 60px; font-size: 18px !important; border-radius: 16px; }
  .clock-btn:active { transform: scale(.97); }
  .topbar, .ws-topbar { padding: 0 10px; }
  .topbar-logo, .ws-brand { min-width: auto; padding: 0 12px 0 10px; border-right: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr !important; }
}

/* ── Dark mode keeps sidebar navy ── */
[data-theme="dark"] .sidebar,
[data-theme="dark"] .ws-sidebar {
  background: var(--sidebar-bg);
  border-right-color: var(--sidebar-bdr);
}

/* ═══════════════════════════════════════════════════════════
   SERVICENOW-STYLE TOPBAR
   Slim bar · logo · nav tabs · workspace pill · search · user
   ═══════════════════════════════════════════════════════════ */

/* Override topbar height for ServiceNow slim style */
:root {
  --sn-topbar-h: 42px;
  --sn-sidebar-w: 46px;       /* collapsed icon-only sidebar */
  --accent: var(--primary);   /* user-configurable accent */
}

/* ── SN Topbar shell ── */
.sn-topbar {
  height: var(--sn-topbar-h);
  display: flex;
  align-items: center;
  background: var(--sn-bg, #1d2125);
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
  z-index: 200;
  position: relative;
  padding: 0;
  --topbar-h: var(--sn-topbar-h);
}

/* Logo */
.sn-logo {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 100%;
  flex-shrink: 0;
  text-decoration: none;
  gap: 8px;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sn-logo img { height: 22px; object-fit: contain; }
.sn-logo-text {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
  white-space: nowrap;
}
.sn-logo-text span { color: var(--accent); }

/* Nav tabs: All / Favorites / History / Workspaces */
.sn-nav-tabs {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 4px;
  gap: 0;
  flex-shrink: 0;
}
.sn-nav-tab {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font);
  transition: color .12s, background .12s;
  white-space: nowrap;
  position: relative;
}
.sn-nav-tab:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.06); }
.sn-nav-tab.active {
  color: #fff;
  font-weight: 700;
  background: rgba(255,255,255,.08);
}
.sn-nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

/* Workspace pill — center button showing current workspace */
.sn-workspace-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 28px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  font-family: var(--font);
  transition: background .15s;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
}
.sn-workspace-pill:hover { background: rgba(255,255,255,.16); }
.sn-workspace-pill .pill-star {
  color: var(--accent);
  font-size: 11px;
}
.sn-workspace-pill .pill-chevron {
  font-size: 9px;
  color: rgba(255,255,255,.5);
  margin-left: 2px;
}

/* Workspace dropdown */
.sn-ws-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  background: var(--sn-drop-bg, #2b2f36);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 9999;
  overflow: hidden;
}
.sn-ws-dropdown.open { display: block; }
.sn-ws-drop-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sn-ws-drop-filter .filter-ico { font-size: 12px; color: rgba(255,255,255,.4); flex-shrink: 0; }
.sn-ws-drop-filter input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 12.5px;
  color: #fff;
  font-family: var(--font);
  width: 100%;
}
.sn-ws-drop-filter input::placeholder { color: rgba(255,255,255,.35); }
.sn-ws-drop-filter .filter-settings {
  width: 24px; height: 24px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,.4);
  font-size: 12px;
  transition: background .1s;
}
.sn-ws-drop-filter .filter-settings:hover { background: rgba(255,255,255,.1); color: #fff; }
.sn-ws-drop-list { max-height: 280px; overflow-y: auto; padding: 6px 0; }
.sn-ws-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 12.5px;
  color: rgba(255,255,255,.75);
  transition: background .08s;
  font-weight: 500;
}
.sn-ws-drop-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.sn-ws-drop-item.active {
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 600;
}
.sn-ws-drop-item .item-ico {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: rgba(255,255,255,.06);
}

/* Center flex spacer */
.sn-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  position: relative;
}

/* Right side */
.sn-right {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 10px;
  flex-shrink: 0;
}

/* SN search bar */
.sn-search {
  position: relative;
  margin-right: 6px;
}
.sn-search input {
  width: 200px;
  height: 28px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 5px;
  padding: 0 10px 0 28px;
  font-size: 12px;
  color: #fff;
  font-family: var(--font);
  outline: none;
  transition: all .2s;
}
.sn-search input:focus {
  width: 260px;
  border-color: var(--accent);
  background: rgba(255,255,255,.15);
}
.sn-search input::placeholder { color: rgba(255,255,255,.4); }
.sn-search-ico {
  position: absolute; left: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px; color: rgba(255,255,255,.4);
  pointer-events: none;
}
/* Search dropdown arrow */
.sn-search-arr {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  font-size: 9px; color: rgba(255,255,255,.3);
  pointer-events: none;
}

/* SN icon buttons */
.sn-icon-btn {
  width: 30px; height: 30px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,.65);
  font-size: 14px; position: relative;
  transition: background .1s, color .1s;
  border: none; background: transparent;
}
.sn-icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.sn-icon-btn .badge-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--sn-bg, #1d2125);
  font-size: 0;
}
.sn-icon-btn .badge-count {
  position: absolute; top: 2px; right: 2px;
  min-width: 14px; height: 14px;
  background: var(--accent);
  border-radius: 7px;
  font-size: 8px; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--sn-bg, #1d2125);
}

/* SN user avatar button */
.sn-user-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 11px; font-weight: 700; color: #fff;
  border: none;
  transition: opacity .1s;
  background: var(--accent);
  flex-shrink: 0;
}
.sn-user-btn:hover { opacity: .85; }

/* ── SN Icon-only collapsed sidebar ── */
.sn-sidebar {
  width: var(--sn-sidebar-w);
  background: var(--sn-sidebar-bg, #16191d);
  border-right: 1px solid rgba(255,255,255,.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  gap: 2px;
}
.sn-sidebar::-webkit-scrollbar { width: 0; }
.sn-sidebar-icon {
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: rgba(255,255,255,.45);
  transition: background .1s, color .1s;
  position: relative;
  flex-shrink: 0;
}
.sn-sidebar-icon:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.sn-sidebar-icon.active {
  background: var(--accent);
  color: #fff;
}
.sn-sidebar-icon .sn-tooltip {
  display: none;
  position: absolute;
  left: calc(100% + 8px);
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.85);
  color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 500;
}
.sn-sidebar-icon:hover .sn-tooltip { display: block; }
.sn-sidebar-divider { width: 24px; height: 1px; background: rgba(255,255,255,.07); margin: 4px 0; flex-shrink: 0; }

/* ── Theme Color Picker Panel ── */
.sn-theme-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 280px;
  background: var(--sn-drop-bg, #2b2f36);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 9999;
  overflow: hidden;
  padding: 14px;
}
.sn-theme-panel.open { display: block; }
.sn-theme-panel-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255,255,255,.4);
  margin-bottom: 12px;
}
.sn-theme-swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.sn-swatch {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s;
  border: 2px solid transparent;
}
.sn-swatch:hover { transform: scale(1.12); }
.sn-swatch.active { border-color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.3); }
.sn-theme-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.sn-theme-custom label { font-size: 11.5px; color: rgba(255,255,255,.6); flex: 1; }
.sn-theme-custom input[type="color"] {
  width: 36px; height: 28px;
  border: none; background: none; cursor: pointer;
  padding: 0; border-radius: 5px;
}
.sn-theme-dark-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sn-theme-dark-toggle span { font-size: 12px; color: rgba(255,255,255,.7); }

/* ── SN app body layout ── */
.sn-app-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  height: calc(100vh - var(--sn-topbar-h));
}

/* Wide nav panel (slides out from sn-sidebar on hover/click) */
.sn-nav-panel {
  display: none;
  position: fixed;
  top: var(--sn-topbar-h);
  left: var(--sn-sidebar-w);
  width: 220px;
  height: calc(100vh - var(--sn-topbar-h));
  background: var(--sn-panel-bg, #1e2226);
  border-right: 1px solid rgba(255,255,255,.07);
  z-index: 300;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 4px 0 20px rgba(0,0,0,.3);
}
.sn-nav-panel.open { display: flex; }
.sn-nav-panel-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
}
.sn-nav-panel-title {
  font-size: 13px; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.sn-nav-panel-cta {
  width: 100%; padding: 8px 12px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 7px;
  font-size: 12.5px; font-weight: 700;
  cursor: pointer; font-family: var(--font);
  transition: opacity .15s;
}
.sn-nav-panel-cta:hover { opacity: .85; }
.sn-nav-panel-body { flex: 1; overflow-y: auto; padding: 6px 0; }
.sn-panel-section {
  font-size: 9.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,.3);
  padding: 10px 16px 4px;
}
.sn-panel-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 12.5px; color: rgba(255,255,255,.65);
  transition: background .08s;
  border-radius: 0;
  position: relative;
}
.sn-panel-item:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.95); }
.sn-panel-item.active {
  background: rgba(255,255,255,.1);
  color: #fff; font-weight: 600;
}
.sn-panel-item.active::before {
  content: '';
  position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 3px; background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.sn-panel-item-ico { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.sn-panel-item-badge { margin-left: auto; min-width: 18px; height: 18px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.sn-panel-item-soon { margin-left: auto; font-size: 8px; font-weight: 800; color: var(--yellow); background: rgba(217,119,6,.15); border: 1px solid rgba(217,119,6,.25); border-radius: 3px; padding: 1px 5px; }

/* Panel overlay (click to close) */
.sn-panel-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 299;
}
.sn-panel-overlay.open { display: block; }

/* ── Page content adjusts for sn-sidebar width ── */
.sn-page {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  padding: 22px 26px;
}

/* ── Accent-colored accents: apply --accent throughout ── */
.sn-app-body .tab-item.active { color: var(--accent); border-bottom-color: var(--accent); }
.sn-app-body .btn-primary, .sn-app-body .btn-gold { background: var(--accent); border-color: var(--accent); }
.sn-app-body .stat-icon-box.blue { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.sn-app-body .nav-item.active, .sn-app-body .sn-panel-item.active { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.sn-app-body .progress-fill { background: var(--accent); }
.sn-app-body .page-btn.active { background: var(--accent); border-color: var(--accent); }

/* ── Mobile: hide sn-sidebar, use bottom nav ── */
@media (max-width: 768px) {
  .sn-sidebar  { display: none; }
  .sn-nav-tabs { display: none; }
  .sn-search   { display: none; }
  .sn-workspace-pill span:not(.pill-star) { display: none; }
  .sn-app-body { height: calc(100vh - var(--sn-topbar-h)); }
}

/* ═══════════════════════════════════════════════════════════
   BASE ACCENT — OneAura #7c6af5 purple
   ═══════════════════════════════════════════════════════════ */
:root {
  --accent:   #7c6af5;
  --primary:  #7c6af5;
  --primary-l:#9b8aff;
  --primary-d:#ede9ff;
  --primary-b:rgba(124,106,245,.4);
  --primary-t:rgba(124,106,245,.1);
  --primary-h:rgba(124,106,245,.06);
  --sn-bg:        #1a1b23;
  --sn-sidebar-bg:#14151d;
  --sn-panel-bg:  #1e1f2a;
  --sn-drop-bg:   #252633;
}

/* ── SN sidebar workspace icon has accent bg ── */
.sn-sidebar-ws-ico {
  margin-bottom: 2px;
}

/* ── Fix sn-sidebar to use flex column properly ── */
.sn-sidebar {
  display: flex !important;
  flex-direction: column !important;
}

/* ═══════════════════════════════════════════════════════════
   ONEAURA LOGIN PAGE — Branded, distinct, memorable
   ═══════════════════════════════════════════════════════════ */
.oa-login-wrap {
  min-height: 100vh;
  display: flex;
  background: #f0f0fa;
}

/* LEFT — dark brand panel */
.oa-login-left {
  flex: 1;
  background: #0d0c18;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 56px;
  min-height: 100vh;
}

/* Animated mesh/gradient background */
.oa-login-mesh {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(124,106,245,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(99,72,219,.14) 0%, transparent 60%),
    linear-gradient(135deg, #0d0c18 0%, #12102a 50%, #0a0a1a 100%);
}
.oa-login-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .35;
  animation: glow-pulse 6s ease-in-out infinite alternate;
}
.oa-glow-1 { width: 400px; height: 400px; background: #7c6af5; top: -100px; left: -100px; animation-delay: 0s; }
.oa-glow-2 { width: 300px; height: 300px; background: #4f3dd4; bottom: -80px; right: -80px; animation-delay: 2s; }
.oa-glow-3 { width: 200px; height: 200px; background: #9b8aff; top: 40%; right: 10%; animation-delay: 4s; }
@keyframes glow-pulse { from { opacity: .25; transform: scale(1); } to { opacity: .45; transform: scale(1.15); } }

/* Content above mesh */
.oa-login-left-content {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: 100%;
}

/* Logo */
.oa-brand-lockup { margin-bottom: 44px; }
.oa-brand-logo {
  height: 44px;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: brightness(1.4);
}

/* Hero headline */
.oa-hero-headline {
  font-family: var(--font);
  font-size: 48px;
  font-weight: 900;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.oa-hero-accent {
  background: linear-gradient(135deg, #9b8aff 0%, #c4b5fd 50%, #7c6af5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.oa-hero-sub {
  font-size: 14px;
  color: rgba(255,255,255,.6);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 380px;
}

/* Feature pills */
.oa-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}
.oa-feature-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(124,106,245,.15);
  border: 1px solid rgba(124,106,245,.25);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  backdrop-filter: blur(8px);
  transition: background .15s;
}
.oa-feature-pill:hover { background: rgba(124,106,245,.25); }

/* Social proof stats */
.oa-social-proof { margin-bottom: 40px; }
.oa-stat-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 16px 24px;
  backdrop-filter: blur(8px);
}
.oa-stat {
  flex: 1;
  text-align: center;
}
.oa-stat-num {
  display: block;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -1px;
}
.oa-stat-lbl {
  display: block;
  font-size: 10.5px;
  color: rgba(255,255,255,.45);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}
.oa-stat-divider {
  width: 1px; height: 36px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}

.oa-login-footer-brand {
  font-size: 11px;
  color: rgba(255,255,255,.25);
  font-weight: 600;
  letter-spacing: .5px;
}

/* RIGHT — form panel */
.oa-login-right {
  width: 460px;
  min-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: #fff;
  position: relative;
}

[data-theme="dark"] .oa-login-right {
  background: #12111e;
}
[data-theme="dark"] .oa-login-wrap {
  background: #0d0c18;
}

.oa-login-form-card {
  width: 100%;
  max-width: 360px;
}

.oa-form-company-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg3, #f4f3ff);
  border: 1px solid var(--bdr, #e2e0f8);
  border-radius: 10px;
  margin-bottom: 28px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tx, #0f172a);
}

.oa-form-logo-sm {
  margin-bottom: 28px;
}

.oa-form-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--tx, #0f172a);
  letter-spacing: -1px;
  margin-bottom: 6px;
  font-family: var(--font);
}

.oa-form-sub {
  font-size: 13px;
  color: var(--tx3, #64748b);
  margin-bottom: 28px;
}

.oa-form-field {
  margin-bottom: 16px;
}
.oa-form-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--tx2, #334155);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.oa-form-input {
  width: 100%;
  height: 44px;
  background: var(--bg3, #f8f7ff) !important;
  border: 1.5px solid var(--bdr2, #e2ddf8) !important;
  border-radius: 10px !important;
  padding: 0 14px !important;
  font-size: 13.5px;
  color: var(--tx, #0f172a);
  font-family: var(--font);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.oa-form-input:focus {
  border-color: #7c6af5 !important;
  box-shadow: 0 0 0 3px rgba(124,106,245,.12) !important;
  background: #fff !important;
}
.oa-form-input::placeholder { color: var(--tx4, #94a3b8); }

.oa-form-err {
  color: var(--red, #dc2626);
  font-size: 12px;
  margin-bottom: 8px;
  min-height: 18px;
}

.oa-login-btn {
  width: 100%;
  height: 46px;
  background: linear-gradient(135deg, #7c6af5 0%, #5b48d4 100%);
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(124,106,245,.35);
  transition: opacity .15s, transform .1s, box-shadow .15s;
  margin-bottom: 20px;
  letter-spacing: -.2px;
}
.oa-login-btn:hover {
  opacity: .92;
  box-shadow: 0 8px 28px rgba(124,106,245,.45);
}
.oa-login-btn:active { transform: scale(.98); }
.oa-login-btn:disabled { opacity: .6; cursor: not-allowed; }
.oa-btn-arrow {
  font-size: 16px;
  transition: transform .15s;
}
.oa-login-btn:hover .oa-btn-arrow { transform: translateX(3px); }

.oa-form-footer {
  text-align: center;
  font-size: 12px;
  color: var(--tx3, #64748b);
  margin-bottom: 16px;
}
.oa-form-footer a {
  color: #7c6af5;
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
}
.oa-form-footer a:hover { text-decoration: underline; }

.oa-form-theme-toggle {
  text-align: center;
}
.oa-form-theme-toggle .theme-toggle {
  font-size: 11px;
  color: var(--tx4, #94a3b8);
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background .12s;
  font-family: var(--font);
}
.oa-form-theme-toggle .theme-toggle:hover { background: var(--bg3, #f4f3ff); }

.oa-login-tagline-sm {
  position: absolute;
  bottom: 20px;
  font-size: 11px;
  color: var(--tx4, #94a3b8);
  text-align: center;
}

/* Mobile login */
@media (max-width: 768px) {
  .oa-login-left  { display: none; }
  .oa-login-right { width: 100%; min-width: 0; padding: 40px 24px; background: var(--bg2, #fff); }
  .oa-login-wrap  { background: var(--bg2, #fff); }
}

/* ── Fix login-err show class ── */
.login-err { display: block; }
.login-err:empty { visibility: hidden; }

/* ═══════════════════════════════════════════════════════════
   FIXES: Topbar logo, soon icons, login object bug
   ═══════════════════════════════════════════════════════════ */

/* Logo — remove bg, make it prominent */
.sn-logo img {
  mix-blend-mode: screen;
  filter: brightness(1.6) drop-shadow(0 0 10px rgba(124,106,245,.5));
}

/* SA topbar - keep its own styling with purple base */
.ws-topbar .sn-logo img,
.ws-topbar img[alt="OneAura"] {
  mix-blend-mode: screen;
  filter: brightness(1.6) drop-shadow(0 0 10px rgba(124,106,245,.5));
}

/* Coming Soon greyed sidebar icons */
.sn-sidebar-soon {
  opacity: .5;
  cursor: pointer !important;
}
.sn-sidebar-soon:hover {
  opacity: .75;
  background: rgba(255,255,255,.04) !important;
}
.sn-sidebar-soon .sn-tooltip::after {
  content: ' · Soon';
  font-size: 9px;
  color: rgba(255,200,100,.8);
}

/* Fix topbar sn-logo when no nav tabs (just logo + spacer + center + right) */
.sn-topbar .sn-logo {
  flex-shrink: 0;
}

/* Hide sn-nav-tabs if empty */
.sn-nav-tabs:empty {
  display: none;
}

/* Fix the flex:1 spacer when no nav tabs */
.sn-topbar > div[style*="flex:1"]:first-of-type {
  display: none;
}

/* Quick Actions hover polish */
.quick-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background .1s;
  border: 1px solid transparent;
}
.quick-action-row:hover {
  background: var(--bg3);
  border-color: var(--bdr);
}

/* Login form — fix object issues */
.oa-form-company-badge span {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx, #0f172a);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* Favicon reference fix - ensure logo loads */
.sn-logo img[alt="OneAura"],
.oa-brand-logo {
  image-rendering: -webkit-optimize-contrast;
}

/* SA topbar height match */
.ws-topbar.sn-topbar { height: var(--sn-topbar-h, 42px); }

/* Fix topbar flex layout when nav tabs removed */
.sn-topbar { padding: 0; }
.sn-topbar .sn-center { flex: 1; }

/* Powered by link styling */
.oa-login-tagline-sm a {
  color: #7c6af5;
  text-decoration: none;
  font-weight: 700;
}
.oa-login-tagline-sm a:hover { text-decoration: underline; }
