/* ============================================================
   OneAura ERP — Admin Portal Stylesheet
   assets/css/app.css
   ============================================================ */

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

/* ── RESET & ROOT ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #07090f;
  --bg2:      #0d1018;
  --bg3:      #131825;
  --bg4:      #1a2035;
  --bg5:      #202840;
  --bdr:      #1e2540;
  --bdr2:     #252e50;
  --bdr3:     #2e3a60;

  --gold:     #e8a020;
  --gold-l:   #f5c050;
  --gold-d:   #1e1808;
  --gold-b:   #7a5010;
  --gold-t:   rgba(232,160,32,.12);

  --v:        #7c6af5;
  --vl:       #a898ff;
  --vd:       #16133a;
  --vb:       #3d2fa8;
  --v-t:      rgba(124,106,245,.12);

  --teal:     #18c8a8;
  --teal-d:   #081a18;
  --teal-b:   #0a6858;
  --teal-t:   rgba(24,200,168,.12);

  --red:      #e84545;
  --red-d:    #1e0808;
  --red-b:    #802020;
  --red-t:    rgba(232,69,69,.12);

  --green:    #3dd68c;
  --green-d:  #081a10;
  --green-b:  #156040;
  --green-t:  rgba(61,214,140,.12);

  --blue:     #3daaf0;
  --blue-d:   #081828;
  --blue-b:   #104880;

  --orange:   #f07830;
  --orange-d: #1a0e08;
  --orange-b: #804010;

  --tx:       #e2e8f8;
  --tx2:      #8896b8;
  --tx3:      #404e70;
  --tx4:      #272f48;

  --font:     'Outfit', sans-serif;
  --mono:     'JetBrains Mono', monospace;
  --rad:      10px;
  --rad-lg:   14px;
  --rad-sm:   7px;

  --shadow:   0 4px 24px rgba(0,0,0,.4);
  --shadow-lg:0 12px 48px rgba(0,0,0,.6);
}

html, body { height: 100%; font-family: var(--font); font-size: 13px; background: var(--bg); color: var(--tx); }
body { overflow: hidden; }
input, select, textarea, button { font-family: var(--font); }
a { color: var(--vl); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bdr2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--bdr3); }

/* ── APP SHELL ─────────────────────────────────────────────── */
#app { height: 100vh; display: flex; flex-direction: column; }
.app-body { display: flex; flex: 1; overflow: hidden; }

/* ── TOPBAR ─────────────────────────────────────────────────── */
.topbar {
  height: 54px; flex-shrink: 0;
  background: var(--bg2); border-bottom: 1px solid var(--bdr);
  display: flex; align-items: center; padding: 0 20px; gap: 14px;
  position: relative; z-index: 100;
}
.topbar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar-gem {
  width: 34px; height: 34px; border-radius: 9px; background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: var(--bg); flex-shrink: 0;
  box-shadow: 0 0 20px rgba(232,160,32,.3);
}
.topbar-name { font-size: 16px; font-weight: 800; letter-spacing: -.3px; color: var(--tx); }
.topbar-name span { color: var(--gold); }
.topbar-divider { width: 1px; height: 20px; background: var(--bdr); }
.topbar-company {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px;
  background: var(--bg3); border: 1px solid var(--bdr2); border-radius: 8px;
  cursor: pointer; transition: all .12s;
}
.topbar-company:hover { border-color: var(--gold-b); }
.topbar-co-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.topbar-co-name { font-size: 12px; font-weight: 600; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-co-plan { font-size: 9px; color: var(--tx3); font-family: var(--mono); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-icon-btn {
  width: 34px; height: 34px; border-radius: var(--rad-sm);
  border: 1px solid var(--bdr2); background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 15px; transition: all .12s; position: relative;
  color: var(--tx2);
}
.topbar-icon-btn:hover { border-color: var(--gold-b); color: var(--gold); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); border: 1.5px solid var(--bg2);
}
.topbar-user { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background .12s; }
.topbar-user:hover { background: var(--bg3); }
.topbar-user-info { text-align: right; }
.topbar-user-name { font-size: 12px; font-weight: 600; }
.topbar-user-role { font-size: 9px; color: var(--tx3); font-family: var(--mono); }

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  width: 228px; flex-shrink: 0;
  background: var(--bg2); border-right: 1px solid var(--bdr);
  display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar-portal-tag {
  margin: 12px 12px 8px;
  padding: 6px 10px; border-radius: 7px;
  font-size: 9px; font-family: var(--mono); letter-spacing: 1.5px;
  text-transform: uppercase; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.sidebar-portal-tag.super { background: var(--gold-d); color: var(--gold); border: 1px solid var(--gold-b); }
.sidebar-portal-tag.admin { background: var(--v-t); color: var(--vl); border: 1px solid var(--vb); }
.sidebar-portal-dot { width: 6px; height: 6px; border-radius: 50%; }
.nav-group { padding: 4px 0 8px; }
.nav-group-label {
  font-size: 9px; font-family: var(--mono); letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--tx3); font-weight: 500;
  padding: 8px 16px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; cursor: pointer; font-size: 12px;
  color: var(--tx2); transition: all .1s;
  border-left: 2px solid transparent; font-weight: 500;
  user-select: none; position: relative;
}
.nav-item:hover { color: var(--tx); background: rgba(232,160,32,.05); }
.nav-item.active { color: var(--gold); background: var(--gold-d); border-left-color: var(--gold); }
.nav-item-ico { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item-label { flex: 1; }
.nav-item-badge {
  font-size: 9px; padding: 1px 6px; border-radius: 10px;
  background: var(--red-d); color: var(--red); border: 1px solid var(--red-b);
  font-family: var(--mono); font-weight: 500;
}
.nav-item-badge.info { background: var(--v-t); color: var(--vl); border-color: var(--vb); }
.sidebar-footer { margin-top: auto; padding: 12px; border-top: 1px solid var(--bdr); }
.sidebar-user-row {
  display: flex; align-items: center; gap: 9px;
  padding: 8px; border-radius: 8px; cursor: pointer; transition: background .12s;
}
.sidebar-user-row:hover { background: var(--bg3); }
.sidebar-user-name { font-size: 11px; font-weight: 600; }
.sidebar-user-role { font-size: 9px; color: var(--tx3); font-family: var(--mono); margin-top: 1px; }
.btn-logout {
  margin-top: 8px; width: 100%; padding: 7px; border-radius: 7px;
  background: transparent; border: 1px solid var(--bdr2); color: var(--tx3);
  font-size: 11px; font-weight: 500; cursor: pointer; transition: all .12s;
}
.btn-logout:hover { border-color: var(--red-b); color: var(--red); background: var(--red-d); }

/* ── CONTENT ─────────────────────────────────────────────────── */
.page { flex: 1; overflow-y: auto; padding: 24px; background: var(--bg); }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; gap: 12px; flex-wrap: wrap;
}
.page-title-block { display: flex; flex-direction: column; gap: 3px; }
.page-title { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.page-subtitle { font-size: 11px; color: var(--tx3); font-family: var(--mono); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── LOGIN PAGE ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 20px;
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(232,160,32,.08) 0%, transparent 70%);
}
.login-card {
  width: 100%; max-width: 420px;
  background: var(--bg2); border: 1px solid var(--bdr);
  border-radius: 20px; padding: 40px;
  box-shadow: var(--shadow-lg);
}
.login-logo-wrap { text-align: center; margin-bottom: 32px; }
.login-gem {
  width: 60px; height: 60px; background: var(--gold);
  border-radius: 16px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: var(--bg);
  box-shadow: 0 0 40px rgba(232,160,32,.35);
}
.login-brand { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.login-brand span { color: var(--gold); }
.login-tagline { font-size: 11px; color: var(--tx3); font-family: var(--mono); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 5px; }
.login-company-badge {
  text-align: center; margin-bottom: 20px;
  padding: 8px 14px; background: var(--bg3); border: 1px solid var(--bdr2);
  border-radius: 8px; font-size: 12px; color: var(--tx2);
}
.login-company-badge strong { color: var(--gold); }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-error {
  padding: 10px 14px; background: var(--red-d); border: 1px solid var(--red-b);
  border-radius: 8px; color: var(--red); font-size: 12px; display: none;
}
.login-error.show { display: block; }
.login-btn {
  background: var(--gold); color: var(--bg); border: none;
  padding: 13px; border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .15s; width: 100%; margin-top: 4px;
}
.login-btn:hover { background: var(--gold-l); transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-portal-hint {
  text-align: center; font-size: 11px; color: var(--tx3);
  font-family: var(--mono); margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--bdr);
}

/* ── FORM ELEMENTS ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 10px; font-weight: 600; color: var(--tx2); text-transform: uppercase; letter-spacing: .8px; }
.form-label .req { color: var(--red); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  background: var(--bg3); border: 1px solid var(--bdr2);
  border-radius: var(--rad-sm); padding: 9px 12px;
  color: var(--tx); font-size: 12px; outline: none;
  transition: border .12s; width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--gold); }
.form-input::placeholder { color: var(--tx3); }
.form-textarea { resize: vertical; min-height: 80px; font-family: var(--font); }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23404e70' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.form-row { display: grid; gap: 14px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-help { font-size: 10px; color: var(--tx3); margin-top: 3px; }
.form-error { font-size: 10px; color: var(--red); margin-top: 3px; display: none; }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--rad-sm);
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; transition: all .12s;
  white-space: nowrap; line-height: 1;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-l); }
.btn-primary { background: var(--v); color: #fff; }
.btn-primary:hover { background: var(--vb); }
.btn-ghost { background: transparent; color: var(--tx2); border: 1px solid var(--bdr2); }
.btn-ghost:hover { border-color: var(--gold-b); color: var(--gold); }
.btn-danger { background: var(--red-d); color: var(--red); border: 1px solid var(--red-b); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-teal { background: var(--teal-d); color: var(--teal); border: 1px solid var(--teal-b); }
.btn-teal:hover { background: var(--teal); color: var(--bg); }
.btn-sm { padding: 5px 11px; font-size: 11px; }
.btn-xs { padding: 3px 8px; font-size: 10px; }
.btn-icon { padding: 7px 9px; }
.btn-full { width: 100%; justify-content: center; }

/* ── STAT CARDS ─────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--bdr);
  border-radius: var(--rad); padding: 16px; position: relative;
  overflow: hidden; transition: border-color .15s;
}
.stat-card:hover { border-color: var(--bdr2); }
.stat-card-accent { position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.stat-label { font-size: 9px; color: var(--tx3); font-family: var(--mono); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.stat-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.stat-sub { font-size: 10px; color: var(--tx2); }
.stat-trend { font-size: 10px; font-family: var(--mono); }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.trend-flat { color: var(--tx3); }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--bg2); border: 1px solid var(--bdr);
  border-radius: var(--rad); overflow: hidden;
}
.card + .card, .card + .grid-card-area { margin-top: 16px; }
.card-header {
  padding: 13px 18px; border-bottom: 1px solid var(--bdr);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.card-title { font-size: 13px; font-weight: 700; }
.card-title-group { display: flex; align-items: center; gap: 10px; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 18px; }
.card-body-sm { padding: 14px; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--bdr); display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

/* ── TABLES ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--bg3); }
th {
  padding: 9px 18px; text-align: left; white-space: nowrap;
  font-family: var(--mono); font-size: 9px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--tx3); font-weight: 500;
  border-bottom: 1px solid var(--bdr);
}
td {
  padding: 10px 18px; border-bottom: 1px solid var(--bdr);
  font-size: 12px; color: var(--tx2); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .1s; }
tbody tr:hover td { background: rgba(232,160,32,.03); color: var(--tx); }
.td-bold { font-weight: 600; color: var(--tx); }
.td-mono { font-family: var(--mono); font-size: 11px; }
.td-dim { color: var(--tx3); font-size: 11px; }
.td-gold { color: var(--gold); font-family: var(--mono); font-weight: 600; }
.td-green { color: var(--green); }
.td-red { color: var(--red); }

/* ── BADGES ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 9px; font-family: var(--mono); font-weight: 600;
  letter-spacing: .3px; white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.badge-green  { background: var(--green-d); color: var(--green); border: 1px solid var(--green-b); } .badge-green::before { background: var(--green); }
.badge-gold   { background: var(--gold-d);  color: var(--gold);  border: 1px solid var(--gold-b);  } .badge-gold::before  { background: var(--gold);  }
.badge-red    { background: var(--red-d);   color: var(--red);   border: 1px solid var(--red-b);   } .badge-red::before   { background: var(--red);   }
.badge-teal   { background: var(--teal-d);  color: var(--teal);  border: 1px solid var(--teal-b);  } .badge-teal::before  { background: var(--teal);  }
.badge-blue   { background: var(--blue-d);  color: var(--blue);  border: 1px solid var(--blue-b);  } .badge-blue::before  { background: var(--blue);  }
.badge-purple { background: var(--vd);      color: var(--vl);    border: 1px solid var(--vb);       } .badge-purple::before{ background: var(--v);     }
.badge-orange { background: var(--orange-d);color: var(--orange);border: 1px solid var(--orange-b); } .badge-orange::before{ background: var(--orange); }
.badge-gray   { background: var(--bg3);     color: var(--tx3);   border: 1px solid var(--bdr2);    } .badge-gray::before  { background: var(--tx3);   }

/* ── CHIP / TAG ──────────────────────────────────────────────── */
.chip {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 10px; font-family: var(--mono);
  background: var(--bg4); color: var(--tx2); border: 1px solid var(--bdr2);
}

/* ── GRIDS ───────────────────────────────────────────────────── */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ── FLEX HELPERS ────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.ml-auto { margin-left: auto; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }

/* ── SPACING ─────────────────────────────────────────────────── */
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }

/* ── TEXT HELPERS ────────────────────────────────────────────── */
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.text-teal   { color: var(--teal); }
.text-blue   { color: var(--blue); }
.text-purple { color: var(--vl); }
.text-dim    { color: var(--tx2); }
.text-dimmer { color: var(--tx3); }
.text-mono   { font-family: var(--mono); }
.text-sm     { font-size: 11px; }
.text-xs     { font-size: 10px; }
.text-xxs    { font-size: 9px; }
.font-bold   { font-weight: 700; }
.font-600    { font-weight: 600; }

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.progress { height: 4px; background: var(--bdr); border-radius: 2px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 2px; transition: width .4s ease; }
.progress-lg { height: 6px; }
.progress-sm { height: 3px; }

/* ── AVATAR ──────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0; font-size: 11px; line-height: 1;
}
.avatar-sq { border-radius: 8px !important; }
.avatar-sm  { width: 28px; height: 28px; font-size: 10px; }
.avatar-md  { width: 36px; height: 36px; font-size: 13px; }
.avatar-lg  { width: 48px; height: 48px; font-size: 18px; }
.avatar-xl  { width: 64px; height: 64px; font-size: 24px; }

/* ── MODAL ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(7,9,15,.85);
  backdrop-filter: blur(4px); z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg2); border: 1px solid var(--bdr);
  border-radius: 16px; width: 100%; max-width: 580px;
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: modal-in .2s ease;
}
.modal-lg { max-width: 780px; }
.modal-sm { max-width: 420px; }
@keyframes modal-in { from { opacity:0; transform: scale(.97) translateY(10px); } to { opacity:1; transform: none; } }
.modal-header {
  padding: 20px 24px 16px; border-bottom: 1px solid var(--bdr);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid var(--bdr2); background: var(--bg3); color: var(--tx2);
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.modal-close:hover { border-color: var(--red-b); color: var(--red); background: var(--red-d); }
.modal-body { padding: 22px 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 24px; border-top: 1px solid var(--bdr);
  display: flex; justify-content: flex-end; gap: 10px;
  flex-shrink: 0;
}

/* ── KANBAN ──────────────────────────────────────────────────── */
.kanban-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col {
  min-width: 210px; flex-shrink: 0;
  background: var(--bg2); border: 1px solid var(--bdr);
  border-radius: var(--rad); overflow: hidden;
}
.kanban-col-header {
  padding: 11px 13px; border-bottom: 1px solid var(--bdr);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700;
}
.kanban-col-count {
  background: var(--bg4); padding: 1px 7px; border-radius: 10px;
  font-size: 9px; font-family: var(--mono); color: var(--tx3);
}
.kanban-col-body { padding: 9px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.kanban-card {
  background: var(--bg3); border: 1px solid var(--bdr2);
  border-radius: 8px; padding: 11px 12px; cursor: pointer;
  transition: border-color .12s, transform .1s;
}
.kanban-card:hover { border-color: var(--gold-b); transform: translateY(-1px); }
.kanban-card-title { font-size: 11px; font-weight: 600; color: var(--tx); margin-bottom: 5px; }
.kanban-card-sub   { font-size: 10px; color: var(--tx2); margin-bottom: 6px; }
.kanban-card-footer{ display: flex; align-items: center; justify-content: space-between; }

/* ── TIMELINE ────────────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; 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%; margin-top: 4px; flex-shrink: 0; }
.tl-title { font-size: 11px; font-weight: 600; color: var(--tx); }
.tl-meta  { font-size: 10px; color: var(--tx3); font-family: var(--mono); margin-top: 2px; }

/* ── SEARCH BAR ──────────────────────────────────────────────── */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--bdr2);
  border-radius: var(--rad-sm); padding: 8px 12px;
  transition: border .12s;
}
.search-bar:focus-within { border-color: var(--gold); }
.search-bar-icon { color: var(--tx3); font-size: 14px; }
.search-bar input {
  background: transparent; border: none; outline: none;
  color: var(--tx); font-size: 12px; width: 200px;
}
.search-bar input::placeholder { color: var(--tx3); }

/* ── BAR CHART ───────────────────────────────────────────────── */
.bar-chart { display: flex; align-items: flex-end; gap: 4px; }
.bar-chart-col {
  flex: 1; border-radius: 3px 3px 0 0; background: var(--bg4);
  min-width: 8px; cursor: pointer; transition: background .15s; position: relative;
}
.bar-chart-col:hover { background: var(--gold); }
.bar-chart-col.active { background: var(--gold); }
.bar-chart-labels { display: flex; gap: 4px; margin-top: 6px; }
.bar-chart-label { flex: 1; font-size: 8px; color: var(--tx3); font-family: var(--mono); text-align: center; }

/* ── PIPELINE FUNNEL ─────────────────────────────────────────── */
.pipeline { display: flex; border: 1px solid var(--bdr); border-radius: var(--rad); overflow: hidden; }
.pipeline-step { flex: 1; padding: 12px 8px; text-align: center; border-right: 1px solid var(--bdr); cursor: pointer; transition: background .15s; }
.pipeline-step:last-child { border-right: none; }
.pipeline-step:hover, .pipeline-step.has-data { background: var(--gold-d); }
.pipeline-step-num { font-size: 22px; font-weight: 800; color: var(--tx); }
.pipeline-step.has-data .pipeline-step-num { color: var(--gold); }
.pipeline-step-label { font-size: 9px; color: var(--tx3); font-family: var(--mono); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ── TOGGLE SWITCH ───────────────────────────────────────────── */
.toggle {
  width: 38px; height: 21px; border-radius: 11px;
  background: var(--bdr2); cursor: pointer; position: relative;
  transition: background .2s; flex-shrink: 0;
}
.toggle.on { background: var(--gold); }
.toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px; border-radius: 50%; background: #fff;
  transition: left .2s;
}
.toggle.on::after { left: 19px; }

/* ── SECTION TITLE ───────────────────────────────────────────── */
.section-title {
  font-size: 10px; font-weight: 700; color: var(--tx2);
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 14px; display: flex; align-items: center; gap: 10px;
}
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--bdr); }

/* ── STEP TRACKER ────────────────────────────────────────────── */
.step-tracker { display: flex; }
.step-item { flex: 1; text-align: center; position: relative; }
.step-item::before { content: ''; position: absolute; top: 12px; left: 50%; right: -50%; height: 2px; background: var(--bdr); z-index: 0; }
.step-item:last-child::before { display: none; }
.step-circle {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--bdr2);
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
  font-size: 10px; margin: 0 auto 6px; position: relative; z-index: 1; transition: all .2s;
}
.step-item.done .step-circle { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 700; }
.step-item.current .step-circle { background: var(--gold-d); border-color: var(--gold); color: var(--gold); }
.step-label { font-size: 9px; color: var(--tx3); font-family: var(--mono); }
.step-item.done .step-label, .step-item.current .step-label { color: var(--tx2); }

/* ── ALERTS ──────────────────────────────────────────────────── */
.alert-toast {
  position: fixed; top: 18px; right: 18px; z-index: 9999;
  padding: 12px 18px; border-radius: 10px; font-size: 12px; font-weight: 600;
  max-width: 320px; transform: translateX(120%); opacity: 0;
  transition: all .3s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.alert-toast.show { transform: translateX(0); opacity: 1; pointer-events: all; }
.alert-toast.success { background: var(--green-d); border: 1px solid var(--green-b); color: var(--green); }
.alert-toast.error   { background: var(--red-d);   border: 1px solid var(--red-b);   color: var(--red);   }
.alert-toast.info    { background: var(--vd);       border: 1px solid var(--vb);      color: var(--vl);    }
.alert-toast.warning { background: var(--gold-d);   border: 1px solid var(--gold-b);  color: var(--gold);  }

/* ── NOTIFICATION PANEL ──────────────────────────────────────── */
.notif-panel {
  position: absolute; top: 54px; right: 18px; width: 320px;
  background: var(--bg2); border: 1px solid var(--bdr);
  border-radius: 12px; z-index: 500; box-shadow: var(--shadow-lg);
  display: none;
}
.notif-panel.open { display: block; }
.notif-panel-header { padding: 13px 16px; border-bottom: 1px solid var(--bdr); display: flex; align-items: center; justify-content: space-between; }
.notif-item { padding: 11px 16px; border-bottom: 1px solid var(--bdr); display: flex; gap: 10px; cursor: pointer; transition: background .1s; }
.notif-item:hover { background: var(--bg3); }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.notif-text { font-size: 11px; font-weight: 600; }
.notif-time { font-size: 9px; color: var(--tx3); font-family: var(--mono); margin-top: 2px; }

/* ── PERMISSION MATRIX ───────────────────────────────────────── */
.perm-matrix th, .perm-matrix td { padding: 8px 12px; font-size: 11px; text-align: center; }
.perm-matrix td:first-child { text-align: left; font-family: var(--mono); }
.perm-yes { color: var(--green); font-size: 15px; }
.perm-no  { color: var(--bdr2); }
.perm-partial { color: var(--gold); }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state { padding: 48px; text-align: center; }
.empty-state-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state-title { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.empty-state-sub { font-size: 12px; color: var(--tx2); margin-bottom: 20px; }

/* ── SKELETON LOADER ─────────────────────────────────────────── */
.skeleton { background: var(--bg3); border-radius: 4px; animation: shimmer 1.5s ease infinite; }
@keyframes shimmer { 0%,100%{ opacity:.4; } 50%{ opacity:.8; } }

/* ── LOADING SPINNER ─────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--bdr);
  border-top-color: var(--gold); border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PLAN CARDS ──────────────────────────────────────────────── */
.plan-card {
  background: var(--bg2); border: 1px solid var(--bdr);
  border-radius: 14px; padding: 24px; position: relative; overflow: hidden;
}
.plan-card.featured { border-color: rgba(232,160,32,.4); }
.plan-badge {
  position: absolute; top: 14px; right: 14px;
  background: var(--gold); color: var(--bg);
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; padding: 2px 8px; border-radius: 20px;
}
.plan-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--tx3); margin-bottom: 8px; }
.plan-price { font-size: 32px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 4px; }
.plan-price span { font-size: 14px; color: var(--tx3); font-weight: 400; }
.plan-desc { font-size: 12px; color: var(--tx2); margin-bottom: 18px; }
.plan-feature { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.04); font-size: 12px; }
.plan-feature:last-child { border-bottom: none; }
.plan-feature-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── COMPANY TENANT CARD ─────────────────────────────────────── */
.tenant-card {
  background: var(--bg2); border: 1px solid var(--bdr);
  border-radius: var(--rad-lg); padding: 20px;
  transition: all .15s; cursor: pointer;
}
.tenant-card:hover { border-color: var(--bdr2); transform: translateY(-2px); }
.tenant-card.selected { border-color: var(--gold-b); background: var(--gold-d); }

/* ── PAYSLIP CARD ────────────────────────────────────────────── */
.payslip-header {
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border-bottom: 1px solid var(--bdr); padding: 20px;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.payslip-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--bdr); font-size: 12px; }
.payslip-row:last-child { border-bottom: none; }
.payslip-total { display: flex; justify-content: space-between; padding: 12px 0; font-size: 15px; font-weight: 700; color: var(--gold); }

/* ── RESPONSIVE OVERRIDES ────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .sidebar { display: none; }
  .grid-2, .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .page { padding: 16px; }
}
