/* ============================================================
   DURRANI HOMES — HR & ADMIN ERP
   Enterprise design system — luxury gold/black theme
   ============================================================ */

:root {
  /* Brand */
  --gold-50:  #FBF7EC;
  --gold-100: #F4EAC8;
  --gold-200: #E9D69A;
  --gold-300: #DEC06A;
  --gold-400: #D4AF37;
  --gold-500: #C9A961;
  --gold-600: #B8924C;
  --gold-700: #8E7038;
  --gold-800: #614C26;
  --gold-900: #3C2F18;

  --black-900: #0A0A0A;
  --black-800: #141414;
  --black-700: #1E1E1E;
  --black-600: #2A2A2A;

  /* Light theme */
  --bg:           #F7F5EF;
  --bg-elev:     #FFFFFF;
  --bg-soft:     #FBF9F3;
  --surface:     #FFFFFF;
  --surface-2:   #F4F1E8;
  --border:      #E8E2D0;
  --border-strong: #D5CBAF;
  --text:        #111111;
  --text-soft:   #4A4A4A;
  --text-muted:  #8A8278;
  --primary:     var(--gold-600);
  --primary-soft: var(--gold-100);
  --accent:      var(--gold-400);
  --danger:      #C0392B;
  --warning:     #D97706;
  --success:     #2E7D5A;
  --info:        #2F6FB0;
  --sidebar-bg:  #0A0A0A;
  --sidebar-text: #E4DCC2;
  --sidebar-active: var(--gold-400);
  --topbar-bg:   #FFFFFF;
  --chart-1: #C9A961;
  --chart-2: #2E7D5A;
  --chart-3: #2F6FB0;
  --chart-4: #C0392B;
  --chart-5: #8E44AD;
  --chart-6: #D97706;
  --chart-7: #16A085;
  --shadow-sm: 0 1px 2px rgba(20,15,5,.06);
  --shadow:    0 4px 14px rgba(20,15,5,.08);
  --shadow-lg: 0 12px 32px rgba(20,15,5,.14);
  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
}

[data-theme="dark"] {
  --bg:          #0B0E13;
  --bg-elev:     #121620;
  --bg-soft:     #161A24;
  --surface:     #121620;
  --surface-2:   #1A1F2B;
  --border:      #232838;
  --border-strong: #2E3447;
  --text:        #ECEAE2;
  --text-soft:   #B7B3A4;
  --text-muted:  #7F7A6A;
  --primary:     var(--gold-400);
  --primary-soft: rgba(212,175,55,.12);
  --accent:      var(--gold-300);
  --sidebar-bg:  #060709;
  --topbar-bg:   #0F131C;
  --chart-1: #D4AF37;
  --chart-2: #4FBF8F;
  --chart-3: #4D8AC9;
  --chart-4: #E55B4B;
  --chart-5: #B673DC;
  --chart-6: #F0A33F;
  --chart-7: #2BD0AE;
  --shadow:    0 4px 18px rgba(0,0,0,.5);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.55);
}

/* RTL */
[dir="rtl"] body { font-family: 'Cairo', 'IBM Plex Sans Arabic', var(--font); }
[dir="rtl"] .sidebar { border-right: none; border-left: 1px solid var(--black-700); }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============ LAYOUT ============ */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
.app.collapsed { grid-template-columns: 76px 1fr; }

.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #1f1f1f;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

.brand {
  padding: 22px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #1a1a1a;
}
.brand-mark {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-700));
  border-radius: 10px;
  display: grid; place-items: center;
  color: #0A0A0A;
  font-weight: 800;
  position: relative;
  box-shadow: 0 4px 14px rgba(212,175,55,.35);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: .14em;
  color: var(--gold-300);
  font-weight: 600;
}
.brand-sub { font-size: 10px; color: #7d7461; letter-spacing: .25em; margin-top: 4px; }
.app.collapsed .brand-text { display: none; }

.sidebar-section { padding: 16px 14px 6px; }
.sidebar-label {
  font-size: 10px; letter-spacing: .22em; color: #6a624f;
  text-transform: uppercase; padding: 8px 12px 6px;
  font-weight: 700;
}
.app.collapsed .sidebar-label { text-align: center; padding: 8px 0; font-size: 8px; }
.app.collapsed .sidebar-label span { display: none; }

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: all .18s ease;
  text-decoration: none;
  position: relative;
}
.nav-item:hover {
  background: rgba(212,175,55,.08);
  color: var(--gold-300);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(212,175,55,.22), rgba(212,175,55,.04));
  color: var(--gold-300);
}
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 3px; background: var(--gold-400); border-radius: 0 4px 4px 0;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--gold-400); color: #000;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 8px;
  min-width: 18px; text-align: center;
}
.nav-badge.danger { background: #C0392B; color: #fff; }
.nav-badge.warn { background: #D97706; color: #fff; }
.app.collapsed .nav-item span:not(.nav-badge) { display: none; }
.app.collapsed .nav-badge { display: none; }
.app.collapsed .nav-item { justify-content: center; padding: 12px 0; }

.subnav { padding-left: 30px; margin-bottom: 4px; }
.subnav .nav-item { padding: 6px 12px; font-size: 12px; color: #aea48a; }

.main {
  display: grid;
  grid-template-rows: 64px 1fr;
  min-height: 100vh;
}

.topbar {
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
}
.topbar .search {
  flex: 1; max-width: 480px;
  position: relative;
}
.topbar .search input {
  width: 100%;
  height: 40px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px 0 40px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}
.topbar .search svg { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--text-muted); }
.topbar .search kbd {
  position: absolute; right: 10px; top: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 6px; font-size: 11px;
  color: var(--text-muted);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-soft);
  position: relative;
  transition: all .15s ease;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.icon-btn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-400); border: 2px solid var(--topbar-bg);
}
.icon-btn .dot.red { background: #C0392B; }

.profile {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
}
.avatar {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-700));
  display: grid; place-items: center;
  color: #000; font-weight: 700; font-size: 12px;
  flex-shrink: 0;
}
.profile .who { font-size: 12px; line-height: 1.2; }
.profile .who b { display: block; color: var(--text); font-weight: 600; }
.profile .who span { color: var(--text-muted); font-size: 11px; }

/* ============ CONTENT ============ */
.content { padding: 26px 28px 64px; max-width: 100%; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.page-title { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: .01em; margin: 0; line-height: 1.1; }
.page-sub { color: var(--text-muted); font-size: 13px; margin-top: 6px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb span { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
  transition: all .15s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: #0A0A0A;
  box-shadow: 0 6px 18px rgba(184,146,76,.28);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(184,146,76,.36); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-dark {
  background: var(--black-900); color: var(--gold-300);
  border-color: var(--black-700);
}
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; }

/* ============ CARDS ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-title { font-weight: 700; font-size: 14px; }
.card-sub { color: var(--text-muted); font-size: 12px; }

/* KPI CARDS */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1280px) { .grid-5, .grid-6 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: all .18s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi .label { color: var(--text-muted); font-size: 12px; font-weight: 500; }
.kpi .value { font-size: 28px; font-weight: 700; margin: 8px 0 6px; font-family: var(--font-display); }
.kpi .delta { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; font-weight: 600; }
.kpi .delta.up { background: rgba(46,125,90,.12); color: var(--success); }
.kpi .delta.down { background: rgba(192,57,43,.12); color: var(--danger); }
.kpi .delta.flat { background: var(--surface-2); color: var(--text-muted); }
.kpi .ico {
  position: absolute; right: 14px; top: 14px;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
}
.kpi .ico svg { width: 18px; height: 18px; }
.kpi.dark {
  background: linear-gradient(135deg, #0A0A0A, #1a1a1a);
  border-color: #2a2a2a;
  color: #fff;
}
.kpi.dark .label { color: #c4b58c; }
.kpi.dark .value { color: var(--gold-300); }
.kpi.gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-700));
  border-color: var(--gold-700);
  color: #0A0A0A;
}
.kpi.gold .label, .kpi.gold .delta { color: rgba(0,0,0,.7); }
.kpi.gold .value { color: #0A0A0A; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; padding: 12px 14px;
  background: var(--surface-2); color: var(--text-soft);
  font-weight: 600; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
}
table.data td {
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--bg-soft); }
.cell-person { display: flex; align-items: center; gap: 10px; }
.cell-person .avatar { width: 30px; height: 30px; font-size: 11px; }
.cell-person small { display: block; color: var(--text-muted); font-size: 11px; }

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--surface-2);
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.pill.green { background: rgba(46,125,90,.12); color: var(--success); border-color: rgba(46,125,90,.3); }
.pill.red   { background: rgba(192,57,43,.12); color: var(--danger);  border-color: rgba(192,57,43,.3); }
.pill.amber { background: rgba(217,119,6,.12); color: var(--warning); border-color: rgba(217,119,6,.3); }
.pill.blue  { background: rgba(47,111,176,.12);color: var(--info);    border-color: rgba(47,111,176,.3); }
.pill.gold  { background: var(--primary-soft); color: var(--gold-700);border-color: var(--gold-300); }
.pill.gray  { background: var(--surface-2); color: var(--text-muted); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Filters */
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
  align-items: center;
}
.filter {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; font-size: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-soft); cursor: pointer;
}
.filter:hover { border-color: var(--primary); }
.filter.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.filter svg { width: 14px; height: 14px; }

/* Charts */
.chart-box { position: relative; height: 280px; }
.chart-tall { height: 380px; }
.chart-sm { height: 180px; }
canvas { max-width: 100%; }

/* Activity feed */
.feed-item {
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.feed-item:last-child { border-bottom: none; }
.feed-ico {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; flex-shrink: 0;
}
.feed-ico svg { width: 14px; height: 14px; }
.feed-body { flex: 1; font-size: 13px; }
.feed-body b { color: var(--text); }
.feed-time { color: var(--text-muted); font-size: 11px; margin-top: 4px; }

/* Alert/Reminder list */
.alert-item {
  display: flex; gap: 12px; padding: 12px;
  background: var(--surface-2);
  border-radius: 10px; margin-bottom: 8px;
  border-left: 3px solid var(--warning);
}
.alert-item.danger { border-left-color: var(--danger); background: rgba(192,57,43,.06); }
.alert-item.info { border-left-color: var(--info); background: rgba(47,111,176,.06); }
.alert-item.success { border-left-color: var(--success); background: rgba(46,125,90,.06); }
.alert-item .body { flex: 1; font-size: 13px; }
.alert-item .body b { color: var(--text); }
.alert-item .body small { display: block; color: var(--text-muted); margin-top: 2px; font-size: 11px; }
.alert-item .due { font-size: 11px; font-weight: 700; color: var(--warning); }

/* Workflow step */
.workflow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.workflow-step {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; position: relative;
}
.workflow-step.done { background: rgba(46,125,90,.1); border-color: rgba(46,125,90,.35); color: var(--success); }
.workflow-step.active { background: var(--primary-soft); border-color: var(--gold-400); color: var(--gold-700); font-weight: 600; }
.workflow-step.pending { opacity: .6; }
.workflow-step .step-num {
  width: 18px; height: 18px; border-radius: 50%;
  background: currentColor; color: white;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
}
.workflow-step.pending .step-num { background: var(--text-muted); }
.workflow-arrow { color: var(--text-muted); font-size: 16px; }

/* Switch */
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { display: none; }
.slider {
  position: absolute; inset: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px; cursor: pointer; transition: .2s;
}
.slider::before {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; background: var(--text-muted);
  border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); background: #0A0A0A; }

/* Heatmap */
.heatmap { display: grid; gap: 2px; grid-template-columns: repeat(24, 1fr); }
.heatmap .cell { aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); }
.heatmap .cell.l1 { background: rgba(212,175,55,.15); }
.heatmap .cell.l2 { background: rgba(212,175,55,.35); }
.heatmap .cell.l3 { background: rgba(212,175,55,.55); }
.heatmap .cell.l4 { background: rgba(212,175,55,.75); }
.heatmap .cell.l5 { background: var(--gold-500); }

/* Progress bar */
.progress { background: var(--surface-2); border-radius: 999px; height: 6px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-400), var(--gold-700)); border-radius: 999px; }
.progress.danger > span { background: var(--danger); }
.progress.success > span { background: var(--success); }

/* Tabs */
.tabs {
  display: flex; gap: 4px; border-bottom: 1px solid var(--border);
  margin-bottom: 18px; overflow-x: auto;
}
.tab {
  padding: 10px 16px; font-size: 13px; cursor: pointer;
  color: var(--text-muted); border-bottom: 2px solid transparent;
  white-space: nowrap; font-weight: 500;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab:hover { color: var(--text); }

/* Form */
.form-grid { display: grid; gap: 14px; }
.form-grid.col-2 { grid-template-columns: 1fr 1fr; }
.form-grid.col-3 { grid-template-columns: repeat(3,1fr); }
@media(max-width:760px){.form-grid.col-2,.form-grid.col-3{grid-template-columns:1fr;}}
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-family: inherit; font-size: 13px; color: var(--text);
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold-400); border-color: var(--gold-400); }

/* View toggling */
.view { display: none; animation: fadeIn .25s ease; }
.view.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 260px; z-index: 100;
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .search { display: none; }
  .content { padding: 18px 14px 60px; }
  .page-title { font-size: 24px; }
}

.mobile-toggle { display: none; }
@media (max-width: 980px) { .mobile-toggle { display: grid; } }

/* Gantt */
.gantt { display: grid; gap: 4px; }
.gantt-row { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 8px; }
.gantt-name { font-size: 12px; color: var(--text-soft); }
.gantt-track { background: var(--surface-2); height: 22px; border-radius: 6px; position: relative; }
.gantt-bar { position: absolute; top: 3px; bottom: 3px; border-radius: 4px; display: flex; align-items: center; padding: 0 8px; font-size: 10px; font-weight: 600; color: #0a0a0a; }

/* Empty state spacing */
.section + .section { margin-top: 22px; }

/* Donut */
.donut-wrap { position: relative; display: grid; place-items: center; }
.donut-center {
  position: absolute; inset: 0; display: grid; place-items: center;
  pointer-events: none;
}
.donut-center b { display: block; font-family: var(--font-display); font-size: 28px; }
.donut-center span { font-size: 11px; color: var(--text-muted); }

/* Approval chain */
.approval-chain { display: flex; gap: 0; align-items: center; }
.approver {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px;
  font-size: 12px; min-width: 140px;
  display: flex; align-items: center; gap: 8px;
}
.approver .avatar { width: 26px; height: 26px; font-size: 10px; }
.approver.approved { border-color: var(--success); background: rgba(46,125,90,.08); }
.approver.pending  { border-color: var(--warning); background: rgba(217,119,6,.08); }
.approver-arrow { width: 30px; height: 2px; background: var(--border); position: relative; }
.approver-arrow::after { content: '▶'; position: absolute; right: -4px; top: -8px; color: var(--text-muted); font-size: 9px; }

/* Notification dropdown style */
.notif-popover {
  position: absolute; right: 16px; top: 56px;
  width: 360px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 200; display: none;
  max-height: 540px; overflow: hidden;
}
.notif-popover.open { display: block; }
.notif-popover header {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.notif-popover .list { max-height: 420px; overflow-y: auto; padding: 6px; }
.notif-popover .item {
  padding: 10px; border-radius: 10px; display: flex; gap: 10px; cursor: pointer;
}
.notif-popover .item:hover { background: var(--surface-2); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #0A0A0A; color: var(--gold-300);
  padding: 12px 18px; border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 500; font-size: 13px;
  border: 1px solid var(--gold-700);
  display: none;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Scrollbar */
.content::-webkit-scrollbar { width: 8px; height: 8px; }
.content::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* Map placeholder */
.map-canvas {
  height: 280px; border-radius: var(--radius);
  background:
    radial-gradient(circle at 30% 40%, rgba(212,175,55,.15), transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(46,125,90,.12), transparent 40%),
    linear-gradient(135deg, #1a1d28 0%, #0f1219 100%);
  position: relative; overflow: hidden;
  border: 1px solid var(--border);
}
.map-pin {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold-400); border: 2px solid #0a0a0a;
  box-shadow: 0 0 0 4px rgba(212,175,55,.2);
  cursor: pointer;
}
.map-pin::after {
  content: ''; position: absolute; inset: -8px;
  border: 1px solid rgba(212,175,55,.3); border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%{transform:scale(1);opacity:.7;} 100%{transform:scale(2.4);opacity:0;}}

/* RBAC matrix */
.matrix { width: 100%; border-collapse: collapse; font-size: 12px; }
.matrix th, .matrix td { padding: 8px 10px; border: 1px solid var(--border); text-align: center; }
.matrix th { background: var(--surface-2); position: sticky; top: 0; }
.matrix th:first-child, .matrix td:first-child { text-align: left; font-weight: 600; }
.matrix .yes { color: var(--success); font-weight: 700; }
.matrix .no  { color: var(--text-muted); }
.matrix .ro  { color: var(--info); font-weight: 600; }

/* Cards grid (asset, properties) */
.asset-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  transition: all .2s;
}
.asset-card:hover { box-shadow: var(--shadow); border-color: var(--gold-400); }
.asset-card h4 { margin: 8px 0 4px; font-size: 14px; }
.asset-card .meta { font-size: 11px; color: var(--text-muted); }

/* Org chart */
.org-tree { font-size: 12px; }
.org-node {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 8px 14px; border-radius: 10px; display: inline-block;
  margin: 4px; min-width: 160px; text-align: center;
}
.org-node b { display: block; }
.org-children {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border);
}
