@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Roboto+Mono:wght@400;500;600&display=swap');

/* ============================================================
   ElhassanSolutions Design System — PAB Edition
   Tokens imported from PAB (NOVAPOS #1560BD, rounded-none)
   ============================================================ */

:root {
  --background: #FFFFFF;
  --foreground: #010B13;
  --surface: #F0F6FF;
  --card: #FFFFFF;
  --card-foreground: #010B13;
  --popover: #FFFFFF;
  --primary: #1560BD;
  --primary-hover: #0F4A94;
  --primary-foreground: #FFFFFF;
  --primary-muted: #E5EEF9;
  --secondary: #010B13;
  --secondary-hover: #000000;
  --secondary-foreground: #FFFFFF;
  --muted: #F0F6FF;
  --muted-foreground: #010B13;
  --accent: #1560BD;
  --destructive: #010B13;
  --destructive-hover: #000000;
  --border: #B8C9E8;
  --input: #B8C9E8;
  --ring: #1560BD;
  --success: #1560BD;
  --success-foreground: #FFFFFF;
  --warning: #010B13;
  --info: #1560BD;
  --radius: 0px;
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --font-sans: "IBM Plex Sans", "IBM Plex Sans Arabic", sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, monospace;
  --sidebar-width: 288px;
  --sidebar-collapsed-width: 80px;
}

.dark {
  --background: #000000;
  --foreground: #FFFFFF;
  --surface: #0A1929;
  --card: #0A1929;
  --card-foreground: #FFFFFF;
  --primary-muted: #0A2F5C;
  --secondary: #010B13;
  --secondary-foreground: #FFFFFF;
  --muted: #0A1929;
  --muted-foreground: #B8C9E8;
  --border: #1A3A5A;
  --input: #1A3A5A;
  --ring: #4A90E2;
}

* {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  margin: 0;
  padding: 0;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
  text-rendering: optimizeLegibility;
}

/* Scrollbars — PAB muted */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 0; }

@media (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
}

.hidden { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Layout */
.app { min-height: 100vh; background: var(--background); padding-bottom: 64px; }
@media (min-width: 768px) { .app { padding-bottom: 0; } }

.sidebar-backdrop { position: fixed; inset: 0; background: rgba(1,11,19,0.5); z-index: 40; display: none; }
.sidebar-backdrop.show { display: block; }

.sidebar { position: fixed; top: 0; left: 0; z-index: 50; height: 100vh; background: #010B13; border-inline-end: 1px solid var(--border); width: var(--sidebar-width); transition: transform 0.3s ease, width 0.3s ease; transform: translateX(-100%); }
@media (min-width: 1024px) { .sidebar { transform: translateX(0); } .sidebar.collapsed { width: var(--sidebar-collapsed-width); } }

.sidebar-inner { display: flex; flex-direction: column; height: 100%; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px; border-bottom: 1px solid #323232; background: #010B13; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 32px; height: 32px; background: var(--primary); border-radius: 0; display: flex; align-items: center; justify-content: center; color: #fff; border: 1px solid var(--border); }
.brand-logo svg { width: 18px; height: 18px; }
.brand-name { font-size: 0.95rem; font-weight: 700; color: #fff; margin: 0; letter-spacing: -0.02em; font-family: var(--font-sans); }
.sidebar.collapsed .brand-name { display: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 8px; background: #010B13; }
.nav-section { margin-bottom: 16px; }
.nav-section-title { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: #B8C9E8; margin: 0 8px 8px; }
.sidebar.collapsed .nav-section-title { display: none; }
.nav-section-links { display: flex; flex-direction: column; gap: 2px; }

.nav-link { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 36px; border-radius: 0; border: 1px solid transparent; font-size: 0.8125rem; font-weight: 500; color: #B8C9E8; text-decoration: none; transition: all 0.15s; cursor: pointer; background: transparent; width: 100%; text-align: left; font-family: var(--font-sans); }
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar.collapsed .nav-link span { display: none; }
.sidebar.collapsed .nav-link { justify-content: center; }
.nav-link:hover { background: #1B1B1B; color: #FFFFFF; border-color: #323232; }
.nav-link.active { background: var(--primary); color: var(--primary-foreground); border-color: #0F4A94; }

.sidebar-footer { padding: 12px; border-top: 1px solid #323232; background: #010B13; }
.user-chip { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid transparent; border-radius: 0; cursor: pointer; transition: background 0.15s; }
.user-chip:hover { background: #1B1B1B; border-color: #323232; }
.sidebar.collapsed .user-chip-info { display: none; }
.user-chip-info p { margin: 0; }
.user-chip-info p:first-child { font-size: 0.8125rem; font-weight: 600; color: #fff; }
.user-chip-info p:last-child { font-size: 0.68rem; color: #B8C9E8; text-transform: uppercase; letter-spacing: 0.05em; }

.main-wrap { transition: padding-left 0.3s ease; }
@media (min-width: 1024px) { .main-wrap { padding-left: var(--sidebar-width); } .sidebar.collapsed ~ .main-wrap, .main-wrap.collapsed { padding-left: var(--sidebar-collapsed-width); } }

.topbar { position: sticky; top: 0; z-index: 30; height: 56px; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 16px; }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title { display: none; }
.page-title h2 { font-size: 0.95rem; font-weight: 700; color: var(--foreground); margin: 0; }
.page-title p { font-size: 0.68rem; color: var(--muted-foreground); margin: 0; text-transform: uppercase; letter-spacing: 0.08em; }
@media (max-width: 1023px) { .page-title { display: block; min-width: 0; } .page-title h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.topbar-search { display: none; position: relative; max-width: 400px; flex: 1; }
.topbar-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-foreground); }
.topbar-search input { width: 100%; height: 32px; padding: 0 12px 0 36px; border: 1px solid var(--border); border-radius: 0; font-size: 0.8125rem; color: var(--foreground); background: var(--background); outline: none; transition: all 0.15s; font-family: var(--font-sans); }
.topbar-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
@media (min-width: 768px) { .topbar-search { display: block; } }
.topbar-right { display: flex; align-items: center; gap: 4px; }

.icon-btn { position: relative; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--background); border-radius: 0; color: var(--foreground); cursor: pointer; transition: background 0.15s; }
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 0; }
.dot-red { background: var(--destructive); }
.dot-blue { background: var(--primary); }

.avatar-btn { width: 32px; height: 32px; border-radius: 0; border: 1px solid var(--border); background: var(--primary); color: #fff; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 0.75rem; }
.avatar { width: 32px; height: 32px; border-radius: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 0.75rem; flex-shrink: 0; border: 1px solid var(--border); }
.avatar-blue { background: var(--primary); }
.avatar-green { background: #010B13; }
.avatar-yellow { background: #FFFFFF; color: #010B13 !important; border: 1px solid #010B13; }
.avatar-purple { background: #0A2F5C; }
.avatar-red { background: #010B13; }
.avatar-cyan { background: var(--primary); }

.page-content { padding: 16px; max-width: 1600px; margin: 0 auto; }
@media (min-width: 640px) { .page-content { padding: 16px; } }
@media (min-width: 1024px) { .page-content { padding: 16px; } }

.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--border); display: flex; }
.bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 0; font-size: 10px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; cursor: pointer; border: none; background: transparent; font-family: var(--font-sans); }
.bottom-nav-item svg { width: 18px; height: 18px; margin-bottom: 2px; }
.bottom-nav-item.active { color: var(--primary); background: var(--primary-muted); }
@media (min-width: 768px) { .bottom-nav { display: none; } }

.lg-hidden { display: flex; }
.md-hidden { display: flex; }
.sm-hidden { display: flex; }
@media (min-width: 1024px) { .lg-hidden { display: none !important; } }
@media (min-width: 768px) { .md-hidden { display: none !important; } }
@media (min-width: 640px) { .sm-hidden { display: none !important; } }

/* Cards, Grid, Buttons — PAB style: border 1px, rounded-none, h-8 */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 0; box-shadow: none; transition: background 0.15s; }
.card-hover:hover { background: var(--surface); }
.card-header { padding: 16px 16px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h3 { font-size: 0.95rem; font-weight: 700; margin: 0; color: var(--card-foreground); }
.card-body { padding: 16px; }

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.stat-card { padding: 16px; }
.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.stat-icon { width: 32px; height: 32px; border-radius: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border); }
.stat-icon svg { width: 16px; height: 16px; }
.stat-value { font-size: 1.25rem; font-weight: 700; color: var(--foreground); font-family: var(--font-mono); }
.stat-label { font-size: 0.68rem; color: var(--muted-foreground); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.trend { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 500; font-family: var(--font-mono); }
.trend-up { color: var(--success); }
.trend-down { color: var(--destructive); }
.trend svg { width: 14px; height: 14px; }
.progress { margin-top: 12px; }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.68rem; color: var(--muted-foreground); margin-bottom: 4px; font-family: var(--font-mono); }
.progress-track { height: 6px; background: var(--muted); border-radius: 0; overflow: hidden; border: 1px solid var(--border); }
.progress-bar { height: 100%; border-radius: 0; transition: width 0.5s; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 0; font-size: 0.8125rem; font-weight: 500; cursor: pointer; transition: all 0.15s; text-decoration: none; font-family: var(--font-sans); }
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: #010B13; color: #FFFFFF; border-color: #010B13; }
.btn-secondary:hover:not(:disabled) { background: #1B1B1B; }
.btn-outline { background: var(--background); color: var(--foreground); border: 1px solid var(--border); }
.btn-outline:hover:not(:disabled) { background: var(--surface); }
.btn-danger { background: var(--destructive); color: #fff; border-color: var(--destructive); }
.btn-danger:hover:not(:disabled) { background: var(--destructive-hover); }
.btn-ghost { background: transparent; color: var(--foreground); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface); border-color: var(--border); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 0.75rem; }
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 0; background: var(--background); color: var(--muted-foreground); cursor: pointer; transition: background 0.15s; }
.btn-icon:hover { background: var(--surface); color: var(--foreground); }
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon-danger:hover { background: var(--destructive); color: #fff; border-color: var(--destructive); }

.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: 0.68rem; font-weight: 600; color: var(--foreground); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.form-control { width: 100%; height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: 0; font-size: 0.8125rem; color: var(--foreground); background: var(--background); outline: none; transition: all 0.15s; font-family: var(--font-sans); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
select.form-control { cursor: pointer; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-grid-2 { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; }
.table thead th { text-align: left; padding: 10px 12px; font-size: 0.68rem; font-weight: 600; color: var(--muted-foreground); border-bottom: 1px solid var(--border); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.06em; background: var(--surface); }
.table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.8125rem; color: var(--foreground); vertical-align: middle; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--surface); }
.table tbody tr.empty-row td { text-align: center; padding: 32px; color: var(--muted-foreground); }

@media (max-width: 767px) {
  .responsive-table thead { display: none; }
  .responsive-table tbody { display: block; }
  .responsive-table tbody tr { display: block; border: 1px solid var(--border); border-radius: 0; padding: 12px; margin-bottom: 8px; background: var(--card); }
  .responsive-table tbody td { display: block; padding: 4px 0; border: none; }
  .responsive-table tbody td::before { content: attr(data-label); display: block; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); margin-bottom: 2px; }
  .responsive-table tbody td[data-label=""]::before { content: none; }
}

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border: 1px solid var(--border); border-radius: 0; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-family: var(--font-mono); }
.badge-success { background: var(--primary); color: #FFFFFF; border-color: var(--primary); }
.badge-warning { background: #FFFFFF; color: #010B13; border-color: #010B13; }
.badge-danger { background: #010B13; color: #FFFFFF; border-color: #010B13; }
.badge-info { background: var(--primary-muted); color: var(--primary); border-color: var(--primary); }
.badge-neutral { background: #FFFFFF; color: #010B13; border-color: var(--border); }
.badge-purple { background: #010B13; color: #FFFFFF; border-color: #010B13; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.page-head h1 { font-size: 1.125rem; font-weight: 700; color: var(--foreground); margin: 0; }
.page-head p { color: var(--muted-foreground); margin: 4px 0 0; font-size: 0.8125rem; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.search-box { position: relative; }
.search-box svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted-foreground); }
.search-box input { height: 32px; padding: 0 12px 0 32px; border: 1px solid var(--border); border-radius: 0; font-size: 0.8125rem; outline: none; transition: all 0.15s; width: 100%; background: var(--background); font-family: var(--font-sans); }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

.modal-overlay { position: fixed; inset: 0; background: rgba(1,11,19,0.5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--card); border: 1px solid var(--border); border-radius: 0; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 24px rgba(1,11,19,0.15); }
.modal.modal-lg { max-width: 720px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-header h3 { font-size: 0.95rem; font-weight: 700; margin: 0; }
.modal-body { padding: 16px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); position: sticky; bottom: 0; background: var(--surface); }

.toast-container { position: fixed; top: 12px; right: 12px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast { display: flex; align-items: flex-start; gap: 10px; background: #010B13; color: #FFFFFF; padding: 12px; border: 1px solid #323232; border-radius: 0; animation: slideIn 0.2s ease; max-width: 360px; font-family: var(--font-sans); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-success svg { color: var(--success); }
.toast-error svg { color: var(--destructive); }
.toast-info svg { color: var(--primary); }
.toast-title { font-weight: 600; font-size: 0.8125rem; }
.toast-desc { font-size: 0.75rem; color: #B8C9E8; margin-top: 2px; }
.toast-close { margin-left: 8px; background: none; border: none; color: #B8C9E8; cursor: pointer; font-size: 1rem; }
.toast.hide { animation: slideOut 0.3s ease forwards; }

.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; background: var(--background); padding: 24px 16px; }
.login-box { width: 100%; max-width: 448px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 24px; }
.login-brand .brand-logo { width: 40px; height: 40px; border-radius: 0; }
.login-brand .brand-logo svg { width: 20px; height: 20px; }
.login-brand h1 { font-size: 1.25rem; font-weight: 700; color: var(--foreground); margin: 0; }
.login-card { background: var(--card); border: 1px solid var(--border); border-radius: 0; padding: 24px; }
@media (min-width: 640px) { .login-card { padding: 24px; } }
.login-card h2 { font-size: 1.125rem; font-weight: 700; margin: 0 0 4px; color: var(--foreground); }
.login-card .login-sub { color: var(--muted-foreground); margin: 0 0 16px; font-size: 0.8125rem; }
.login-error {
  background: #FFFFFF;
  color: #010B13;
  padding: 12px;
  border-radius: 0;
  margin-bottom: 16px;
  font-size: 0.8125rem;
  border: 1px solid #010B13;
}
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-foreground); }
.input-with-icon .form-control { padding-left: 36px; height: 32px; font-size: 0.8125rem; }
.password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted-foreground); cursor: pointer; padding: 4px; }
.password-toggle svg { width: 16px; height: 16px; }
.login-demo-hint { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.75rem; color: var(--muted-foreground); }
.login-demo-hint svg { width: 14px; height: 14px; color: var(--success); }
.login-footer { text-align: center; font-size: 0.68rem; color: var(--muted-foreground); margin-top: 16px; font-family: var(--font-mono); }

.demo-accounts { margin-top: 16px; }
.demo-accounts-title { font-size: 0.68rem; font-weight: 600; color: var(--muted-foreground); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.demo-account-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-account { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 0; background: var(--surface); cursor: pointer; font-size: 0.75rem; font-weight: 500; color: var(--foreground); transition: all 0.15s; text-align: left; height: 32px; }
.demo-account:hover { border-color: var(--primary); background: var(--primary-muted); }
.demo-account .role-dot { width: 6px; height: 6px; border-radius: 0; flex-shrink: 0; }

.chart-card { min-height: 280px; }
.chart-wrap { width: 100%; height: 260px; }
.chart-wrap svg { width: 100%; height: 100%; }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding: 16px 8px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.bar-track { width: 100%; display: flex; align-items: flex-end; height: 180px; }
.bar-fill { width: 100%; border-radius: 0; min-height: 4px; transition: height 0.5s; position: relative; border: 1px solid var(--border); border-bottom: none; }
.bar-fill:hover { opacity: 0.9; }
.bar-label { font-size: 0.68rem; color: var(--muted-foreground); font-family: var(--font-mono); }
.bar-value { font-size: 0.68rem; font-weight: 600; color: var(--foreground); font-family: var(--font-mono); }

.pie-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pie-chart { position: relative; width: 180px; height: 180px; }
.pie-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; }
.pie-center .val { font-size: 1.25rem; font-weight: 700; font-family: var(--font-mono); }
.pie-center .lbl { font-size: 0.68rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.06em; }
.pie-legend { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 150px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--muted-foreground); }
.legend-dot { width: 8px; height: 8px; border-radius: 0; border: 1px solid var(--border); }
.legend-item .legend-val { margin-left: auto; font-weight: 600; font-family: var(--font-mono); color: var(--foreground); }

.loading-state { display: flex; align-items: center; justify-content: center; padding: 32px; color: var(--primary); flex-direction: column; gap: 8px; }
.loading-state .spinner { width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 0; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 32px; color: var(--muted-foreground); }
.empty-state svg { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--border); }

.quick-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 768px) { .quick-actions-grid { grid-template-columns: repeat(4, 1fr); } }
.quick-action { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 0; cursor: pointer; transition: background 0.15s; text-decoration: none; color: inherit; background: var(--card); height: 56px; }
.quick-action:hover { background: var(--surface); }
.quick-action-icon { width: 32px; height: 32px; border-radius: 0; display: flex; align-items: center; justify-content: center; color: #fff; border: 1px solid var(--border); }
.quick-action-icon svg { width: 16px; height: 16px; }
.quick-action-info { flex: 1; }
.quick-action-info .qa-title { font-weight: 600; color: var(--foreground); font-size: 0.8125rem; }
.quick-action-info .qa-sub { font-size: 0.68rem; color: var(--muted-foreground); }
.quick-action .chevron { color: var(--muted-foreground); }

.activity-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid transparent; border-radius: 0; transition: background 0.15s; }
.activity-item:hover { background: var(--surface); border-color: var(--border); }
.activity-item .activity-dot { width: 6px; height: 6px; border-radius: 0; background: var(--success); flex-shrink: 0; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 12px; flex-wrap: wrap; }
.pagination button { min-width: 32px; height: 32px; border: 1px solid var(--border); background: var(--background); border-radius: 0; cursor: pointer; font-size: 0.75rem; color: var(--foreground); transition: all 0.15s; font-family: var(--font-mono); }
.pagination button:hover:not(:disabled) { background: var(--surface); }
.pagination button.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination .page-info { font-size: 0.75rem; color: var(--muted-foreground); font-family: var(--font-mono); }

.filter-select { min-width: 140px; }

.dropdown { position: relative; display: inline-block; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--border); border-radius: 0; box-shadow: 0 4px 12px rgba(1,11,19,0.1); min-width: 180px; z-index: 60; padding: 4px; }
.dropdown-menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 12px; border: none; background: transparent; font-size: 0.8125rem; color: var(--foreground); cursor: pointer; border-radius: 0; font-family: var(--font-sans); }
.dropdown-menu button:hover { background: var(--surface); border: 1px solid var(--border); }
.dropdown-menu button svg { width: 14px; height: 14px; }
.dropdown-menu button.text-danger { color: #010B13; }
.dropdown-menu button.text-danger:hover { background: #F0F6FF; border-color: #010B13; }

.animate-fade-in { animation: fadeIn 0.3s ease; }
.animate-slide-up { animation: slideUp 0.4s ease-out; }
.animate-scale-in { animation: scaleIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(8px); } }

.stat-mini { text-align: center; padding: 16px; border: 1px solid var(--border); background: var(--card); }
.stat-mini .val { font-size: 1.25rem; font-weight: 700; font-family: var(--font-mono); }
.stat-mini .lbl { font-size: 0.68rem; color: var(--muted-foreground); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.06em; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tab { height: 32px; padding: 0 12px; border: 1px solid transparent; border-bottom: none; background: transparent; font-size: 0.8125rem; font-weight: 500; color: var(--muted-foreground); cursor: pointer; white-space: nowrap; font-family: var(--font-sans); border-radius: 0; }
.tab.active { color: var(--primary); background: var(--primary-muted); border-color: var(--border); border-bottom: 1px solid var(--card); margin-bottom: -1px; }

.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 0; transition: 0.2s; border: 1px solid var(--border); }
.switch .slider::before { content: ""; position: absolute; height: 14px; width: 14px; left: 2px; bottom: 2px; background: #fff; border-radius: 0; transition: 0.2s; border: 1px solid var(--border); }
.switch input:checked + .slider { background: var(--primary); border-color: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(16px); border-color: #fff; }

.permission-chip { display: inline-block; padding: 2px 6px; border-radius: 0; font-size: 0.68rem; background: var(--primary-muted); color: var(--primary); margin: 2px; border: 1px solid var(--primary); font-family: var(--font-mono); }

.stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 768px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }

.lang-switch-btn { width: auto; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 0; border: 1px solid var(--border); background: var(--background); font-weight: 600; font-size: 0.75rem; color: var(--primary); font-family: var(--font-mono); }
.lang-switch-btn:hover { background: var(--primary-muted); border-color: var(--primary); }
.lang-switch-btn .lang-label { font-size: 0.75rem; font-weight: 600; }

body.rtl { direction: rtl; font-family: var(--font-sans); }
body.rtl .sidebar { left: auto; right: 0; transform: translateX(100%); }
@media (min-width: 1024px) { body.rtl .sidebar { transform: translateX(0); } }
@media (min-width: 1024px) { body.rtl .main-wrap { padding-left: 0; padding-right: var(--sidebar-width); } body.rtl .sidebar.collapsed ~ .main-wrap, body.rtl .main-wrap.collapsed { padding-right: var(--sidebar-collapsed-width); } }
body.rtl .topbar-search svg { left: auto; right: 12px; }
body.rtl .topbar-search input { padding-left: 12px; padding-right: 36px; }
body.rtl .search-box svg { left: auto; right: 12px; }
body.rtl .search-box input { padding-left: 12px; padding-right: 36px; }
body.rtl .input-with-icon svg { left: auto; right: 12px; }
body.rtl .input-with-icon .form-control { padding-left: 12px; padding-right: 36px; }
body.rtl .password-toggle { right: auto; left: 8px; }
body.rtl .table thead th, body.rtl .table tbody td { text-align: right; }
body.rtl .page-head, body.rtl .card-header, body.rtl .toolbar, body.rtl .page-head-actions { text-align: right; }
body.rtl .modal-footer { text-align: left; }
body.rtl .toast-container { right: auto; left: 12px; }
body.rtl .chevronLeft, body.rtl .chevronRight { transform: rotate(180deg); }
body.rtl .toolbar-left, body.rtl .toolbar-right { flex-direction: row-reverse; }
body.rtl .nav-link { text-align: right; }
