/* SCMS - Laravel (Breeze/Jetstream) style theme. Load LAST, after modern-fixes.css.
   Change the accent in ONE place: --lv-accent (default Laravel red; brand gold = #D4A800). */
:root{
  --lv-accent:#F9322C;       /* Laravel red */
  --lv-accent-600:#D9241F;
  --lv-accent-soft:#FEECEB;
  --lv-accent-ink:#fff;      /* text on accent */
  --lv-btn:#1F2937;          /* Breeze primary button (gray-800) */
  --lv-btn-hover:#374151;
  --lv-btn-ink:#fff;

  --bg:#F9FAFB; --surface:#FFFFFF; --surface-2:#F9FAFB;
  --text:#111827; --muted:#6B7280; --border:#E5E7EB;
  --shadow:0 1px 2px rgba(17,24,39,.05);
  --shadow-hover:0 4px 12px rgba(17,24,39,.08);
  --radius:12px; --radius-sm:8px;

  /* retarget the older gold variables */
  --gold:var(--lv-accent); --gold-600:var(--lv-accent-600); --gold-100:var(--lv-accent-soft);
  --charcoal:#111827; --charcoal-2:#1F2937;
  --side-bg:#fff; --side-text:#4B5563; --side-hover:#F3F4F6;
  --acc:var(--lv-accent); --acc2:var(--lv-accent-600);

  --c1:#F9322C; --c2:#4F46E5; --c3:#0EA5A4; --c4:#F59E0B; --c5:#6B7280; --c6:#8B5CF6; --c7:#10B981; --c8:#0EA5E9;
}
html[data-theme="dark"]{
  --lv-accent:#FF5A52; --lv-accent-600:#FF7B74; --lv-accent-soft:rgba(255,90,82,.14);
  --lv-btn:#F3F4F6; --lv-btn-hover:#fff; --lv-btn-ink:#111827;
  --bg:#0B0F19; --surface:#111827; --surface-2:#1F2937;
  --text:#F3F4F6; --muted:#9CA3AF; --border:#2A3441;
  --shadow:0 1px 2px rgba(0,0,0,.4); --shadow-hover:0 4px 14px rgba(0,0,0,.45);
  --side-bg:#0F1522; --side-text:#9CA3AF; --side-hover:#1A2230;
  --c1:#FF5A52; --c2:#818CF8; --c3:#2DD4BF; --c4:#FBBF24; --c5:#9CA3AF; --c6:#A78BFA; --c7:#34D399; --c8:#38BDF8;
}

html body,html,body{font-family:'Figtree','Cairo','Segoe UI',Tahoma,sans-serif!important;background:var(--bg)!important;color:var(--text)!important;font-size:14.5px}
a{color:var(--lv-accent-600)} html[data-theme=dark] a{color:var(--lv-accent)}
::selection{background:var(--lv-accent);color:#fff}
::-webkit-scrollbar-thumb:hover{background:var(--lv-accent)}

/* ---------- Sidebar: clean white (dark: deep navy) ---------- */
html body .side{background:var(--side-bg)!important;border:0!important;border-inline-end:1px solid var(--border)!important;box-shadow:none!important;padding:0!important}
html body .side a.brand,html body .side .brand{flex-direction:row!important;text-align:start!important;margin:0!important;padding:16px 18px!important;background:transparent!important;border:0!important;border-bottom:1px solid var(--border)!important;border-radius:0!important;box-shadow:none!important;gap:12px!important;color:var(--text)!important}
html body .side a.brand img{width:40px!important;height:40px!important;border-radius:10px!important;padding:3px!important;background:#fff!important;border:1px solid var(--border);box-shadow:none!important}
html body .side a.brand>span{align-items:flex-start!important;gap:1px!important;width:auto!important}
html body .side a.brand b{color:var(--text)!important;font-size:.9rem!important;text-align:start!important;-webkit-line-clamp:2}
html[dir=rtl] .side a.brand b,html[dir=rtl] .side a.brand small{text-align:right!important}
html body .side a.brand>span>small{color:var(--muted)!important;border:0!important;padding:0!important;text-align:start!important;font-size:.72rem!important;opacity:1!important}
html body .side nav{padding:12px 10px!important;gap:2px}
html body .side nav a{margin:0!important;padding:8px 12px!important;border-radius:8px!important;color:var(--side-text)!important;font-weight:500!important;font-size:.92rem;background:transparent!important;box-shadow:none!important;transform:none!important}
html body .side nav a .ic{width:20px!important;height:20px!important;padding:0!important;border-radius:0!important;background:transparent!important;color:#9CA3AF!important;transform:none!important}
html body .side nav a:hover{background:var(--side-hover)!important;color:var(--text)!important}
html body .side nav a:hover .ic{background:transparent!important;color:var(--text)!important;transform:none!important}
html body .side nav a.on{background:var(--lv-accent-soft)!important;color:var(--lv-accent-600)!important;font-weight:600!important;box-shadow:none!important;position:relative}
html[data-theme=dark] body .side nav a.on{color:var(--lv-accent)!important}
html body .side nav a.on .ic{background:transparent!important;color:var(--lv-accent)!important}
html body .side nav a.on::before{content:"";position:absolute;inset-block:8px;inset-inline-start:-10px;width:3px;border-radius:3px;background:var(--lv-accent)}
html body .nbadge,html body .side nav a.on .nbadge{background:var(--lv-accent)!important;color:#fff!important;border-radius:99px;font-size:.7rem;padding:1px 7px;margin-inline-start:auto}

/* ---------- Top bar ---------- */
html body .top{background:var(--surface)!important;border-bottom:1px solid var(--border)!important;backdrop-filter:none;padding:10px 24px}
html body .top-title{font-weight:600!important;font-size:1.05rem}
html body .top .pill,html body .pill{background:transparent!important;border:1px solid var(--border)!important;color:var(--muted)!important;border-radius:8px!important;padding:5px 12px!important;font-weight:500;font-size:.82rem}
html body .top .pill:hover,html body .pill:hover{background:var(--surface-2)!important;color:var(--text)!important;border-color:var(--border)!important;text-decoration:none}
html body .top .pill.out{color:#DC2626!important;border-color:var(--border)!important}
html body .top .pill.out:hover{background:rgba(220,38,38,.08)!important;color:#DC2626!important}
html body .usr .av{background:var(--surface-2)!important;color:var(--text)!important;border:1px solid var(--border)}
html body .top-r #theme-toggle,#theme-toggle{width:36px;height:36px;font-size:16px;border-radius:8px;box-shadow:none;background:transparent;border:1px solid var(--border);color:var(--muted)}
#theme-toggle:hover{transform:none;border-color:var(--border);background:var(--surface-2)}

/* ---------- Cards / KPI ---------- */
html body .card,html body .kpi,html body .panel,html body .box{background:var(--surface)!important;border:1px solid var(--border)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow)!important}
html body .card:hover,html body .kpi:hover{transform:none!important;box-shadow:var(--shadow)!important;border-color:var(--border)!important}
html body .kpi::before,html body .stat::before{display:none!important}
html body .kpi{padding:18px 20px!important}
html body .kpi small{font-size:.8rem;font-weight:500;color:var(--muted)!important}
html body .kpi b{font-size:1.9rem!important;font-weight:700!important;letter-spacing:-.02em}
html body .card h3,html body .card h2{font-weight:600!important;font-size:1rem}
h1,h2,h3,h4{font-weight:600!important}

/* ---------- Buttons (Breeze) ---------- */
html body .btn,html body a.btn,html body button.btn{background:var(--lv-btn)!important;color:var(--lv-btn-ink)!important;border:1px solid transparent!important;border-radius:8px!important;box-shadow:var(--shadow)!important;font-weight:600!important;font-size:.82rem;letter-spacing:.03em;padding:9px 16px;text-transform:none}
html body .btn:hover{background:var(--lv-btn-hover)!important;transform:none!important;text-decoration:none}
html body .btn.sm{padding:5px 11px;font-size:.78rem}
html body .btn.lg{font-size:.9rem;padding:11px 20px}
html body .btn.sec,html body a.btn.sec,html body button.btn.sec{background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--border)!important}
html body .btn.sec:hover{background:var(--surface-2)!important;border-color:var(--border)!important;color:var(--text)!important}
html body .btn.ok{background:#059669!important;color:#fff!important}
html body .btn.danger{background:#DC2626!important;color:#fff!important}
html body .btn.dark{background:#111827!important;color:#fff!important;border:1px solid transparent!important}
html[data-theme=dark] body .btn.dark{background:#374151!important}
html body .btn.dark:hover{background:#374151!important;color:#fff!important;border-color:transparent!important}
html[data-theme=dark] body .x-btn{background:var(--lv-btn)!important;color:var(--lv-btn-ink)!important;border:1px solid transparent!important}
html[data-theme=dark] body .btn.sec.x-btn,html[data-theme=dark] body .btn.sec{background:var(--surface-2)!important;color:var(--text)!important;border:1px solid var(--border)!important}
.x-gold,.x-gold *{color:inherit!important}

/* ---------- Forms ---------- */
html body input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),html body select,html body textarea{background-color:var(--surface)!important;border:1px solid #D1D5DB!important;border-radius:8px!important;box-shadow:var(--shadow);min-height:38px;padding:7px 12px!important;color:var(--text)!important}
html[data-theme=dark] body input:not([type=checkbox]):not([type=radio]):not([type=file]),html[data-theme=dark] body select,html[data-theme=dark] body textarea{background-color:var(--surface-2)!important;border-color:var(--border)!important}
html body input:focus,html body select:focus,html body textarea:focus{border-color:var(--lv-accent)!important;box-shadow:0 0 0 3px var(--lv-accent-soft)!important;outline:0!important}
html body input[type=checkbox],html body input[type=radio]{accent-color:var(--lv-accent)}
html body select{background-repeat:no-repeat!important;padding-inline-end:34px!important;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important}
input[type=file]::file-selector-button{background:var(--lv-btn);color:var(--lv-btn-ink);border-radius:6px}
html body .filters,html body form.filters{background:var(--surface)!important;border:1px solid var(--border)!important;box-shadow:var(--shadow)!important}
html body .filters label,html body .form label{color:#374151;font-weight:500}
html[data-theme=dark] body .filters label,html[data-theme=dark] body .form label{color:var(--muted)}

/* ---------- Tables: light header, subtle rows ---------- */
html body table{background:transparent!important;border-radius:0}
html body .tw{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
html body thead th,html body th{background:var(--surface-2)!important;color:var(--muted)!important;font-size:.74rem;font-weight:600!important;text-transform:uppercase;letter-spacing:.04em;border-bottom:1px solid var(--border)!important;padding:10px 12px}
html body td{border-bottom:1px solid var(--border)!important;padding:10px 12px}
html body tbody tr:hover td,html[data-theme=dark] body tbody tr:hover td{background:var(--surface-2)!important}
html[data-theme=dark] body tbody tr:nth-child(even) td{background:transparent!important}
html body tfoot td{background:var(--surface-2)!important}
html[data-theme=dark] body td a{color:var(--lv-accent)}
html body td a{color:var(--lv-accent-600)}

/* ---------- Tags, tabs, progress ---------- */
html body .badge,html body .chip,html body .tag{border-radius:99px!important;font-weight:600;font-size:.74rem;padding:2px 10px}
html body .tag{background:#F3F4F6!important;color:#374151!important}
html[data-theme=dark] body .tag{background:var(--surface-2)!important;color:var(--text)!important}
html body .tag.st-draft{background:#F3F4F6!important;color:#4B5563!important}
html body .tag.st-submitted{background:#FEF3C7!important;color:#92400E!important}
html body .tag.st-approved{background:#D1FAE5!important;color:#065F46!important}
html body .tag.st-returned{background:#FEE2E2!important;color:#991B1B!important}
html[data-theme=dark] body .tag.st-draft{background:#1F2937!important;color:#D1D5DB!important}
html[data-theme=dark] body .tag.st-submitted{background:rgba(245,158,11,.16)!important;color:#FCD34D!important}
html[data-theme=dark] body .tag.st-approved{background:rgba(16,185,129,.16)!important;color:#6EE7B7!important}
html[data-theme=dark] body .tag.st-returned{background:rgba(239,68,68,.16)!important;color:#FCA5A5!important}
html body .tabs a,html[data-theme=dark] body .tabs a{background:transparent!important;border:1px solid transparent!important;color:var(--muted)!important;border-radius:8px;font-weight:500;box-shadow:none}
html body .tabs a:hover,html[data-theme=dark] body .tabs a:hover{background:var(--surface-2)!important;color:var(--text)!important;border-color:transparent!important}
html body .tabs a.on,html[data-theme=dark] body .tabs a.on{background:var(--lv-accent-soft)!important;color:var(--lv-accent-600)!important;border-color:transparent!important;box-shadow:none!important;font-weight:600}
html[data-theme=dark] body .tabs a.on{color:var(--lv-accent)!important}
html body .prog{background:#E5E7EB!important;border-radius:99px}
html[data-theme=dark] body .prog{background:#1F2937!important}
html body .prog i{background:var(--lv-accent)!important;border-radius:99px}
html body .prog.mid i{background:#F59E0B!important}html body .prog.low i{background:#DC2626!important}
html body .alert{border-radius:10px;border:1px solid var(--border)}
html body .alert.a-ok{background:#ECFDF5!important;border-color:#A7F3D0!important;color:#065F46!important}
html body .alert.a-err{background:#FEF2F2!important;border-color:#FECACA!important;color:#991B1B!important}
html body .alert.a-warn{background:#FFFBEB!important;border-color:#FDE68A!important;color:#92400E!important}
html[data-theme=dark] body .alert{background:var(--surface-2)!important;color:var(--text)!important}
html body .bell b{background:var(--lv-accent)}
html body .toast{background:#111827;border-inline-start-color:var(--lv-accent)}
.ph{border-radius:var(--radius)}

/* ---------- Dashboard villa map ---------- */
html body .vtile{border-radius:8px}

/* ---------- Login (split card, Breeze-like) ---------- */
body.login-body,html body.login-body{background:var(--bg)!important}
html body .login{background:var(--surface)!important;border:1px solid var(--border)!important;border-radius:16px!important;box-shadow:0 10px 30px rgba(17,24,39,.08)!important;overflow:hidden}
html body .login-art{background:linear-gradient(160deg,#111827,#1F2937)!important}
html body .login-art .stripes{background:linear-gradient(90deg,var(--lv-accent),transparent)!important;height:4px;border-radius:4px}
html body .login-form h2{font-weight:700}
html body .lt-tabs button{border-radius:8px;border:1px solid var(--border);background:transparent;color:var(--muted)}
html body .lt-tabs button.on{background:var(--lv-accent-soft);color:var(--lv-accent-600);border-color:transparent;font-weight:600}
html body .forgot{color:var(--muted)}
html body .login-form .btn.lg{width:100%}

/* sidebar scroll on mobile / print */
@media (max-width:900px){html body.nav-open .side{box-shadow:0 10px 40px rgba(0,0,0,.2)!important}}
@media print{html body{background:#fff!important}}

html[dir=rtl] body select{background-position:left 12px center!important}html[dir=ltr] body select{background-position:right 12px center!important}
html body .pswitch select{background-color:var(--surface)!important}

/* ===== Modern sidebar v2: icon tiles, groups ===== */
html body .side nav{padding:8px 12px 24px!important;gap:2px}
.nav-grp{margin:16px 10px 6px;font-size:.68rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);opacity:.8}
.nav-grp:first-child{margin-top:6px}
html body .side nav a{gap:12px!important;padding:6px 8px!important;border-radius:12px!important;font-weight:500!important;line-height:1.3}
html body .side nav a .ic{box-sizing:border-box;width:34px!important;height:34px!important;padding:8px!important;border-radius:10px!important;background:var(--surface-2)!important;border:1px solid var(--border);color:#6B7280!important;transition:all .18s;flex:none}
html[data-theme=dark] body .side nav a .ic{background:rgba(255,255,255,.04)!important;color:#9CA3AF!important}
html body .side nav a:hover{background:var(--side-hover)!important}
html body .side nav a:hover .ic{background:var(--surface)!important;color:var(--lv-accent)!important;border-color:var(--lv-accent)!important;transform:none!important}
html body .side nav a.on{background:var(--lv-accent-soft)!important;color:var(--lv-accent-600)!important;font-weight:600!important}
html body .side nav a.on .ic{background:var(--lv-accent)!important;border-color:var(--lv-accent)!important;color:#fff!important;box-shadow:0 4px 10px -2px var(--lv-accent)}
html body .side nav a.on::before{display:none!important}
html body .side nav a span{min-width:0;overflow-wrap:anywhere}
html body .side{scrollbar-width:thin}
html body .side a.brand>span>small{font-size:.7rem!important}

/* dashboard module tiles + donut size */
.mods{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin-bottom:16px}
html body a.mod{display:flex;align-items:center;gap:14px;padding:14px 16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);color:var(--text)!important;text-decoration:none!important;transition:border-color .15s,transform .15s}
html body a.mod:hover{border-color:var(--lv-accent);transform:translateY(-2px)}
.mod-ic{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:var(--lv-accent-soft);color:var(--lv-accent-600);flex:none}
html[data-theme=dark] .mod-ic{color:var(--lv-accent)}
.mod-ic .ic{width:22px;height:22px}
.mod-t{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.mod-t small{color:var(--muted);font-size:.8rem;font-weight:500}
.mod-t b{font-size:1.5rem;font-weight:700;letter-spacing:-.02em}
.mod-t i{font-style:normal;color:var(--muted);font-size:.74rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chart .donut-svg{width:190px!important;height:190px!important;max-width:190px!important;flex:none}
@media(max-width:900px){.g3{grid-template-columns:1fr!important}}
