/* Farnoud Control — macOS / Liquid Glass vNext */
:root{
 --bg0:#080a0f;--bg1:#10131a;--glass:rgba(255,255,255,.055);--glass2:rgba(255,255,255,.09);
 --border:rgba(255,255,255,.12);--border2:rgba(255,255,255,.07);--text:#f5f7fb;
 --muted:#9aa3b5;--dim:#687184;--primary:#5b8cff;--primary-hover:#79a2ff;
 --primary-soft:rgba(91,140,255,.15);--success:#43d39e;--danger:#ff6f7d;--warning:#f6c85f;
 --radius:20px;--small:12px;--blur:28px;--sidebar-w:272px;
 --shadow:0 22px 70px rgba(0,0,0,.32),inset 0 1px 0 rgba(255,255,255,.04);
 --font:"SF Pro Display","Vazirmatn","Segoe UI",system-ui,-apple-system,sans-serif;
}
[data-theme=light]{--bg0:#edf1f7;--bg1:#f7f9fc;--glass:rgba(255,255,255,.62);--glass2:rgba(255,255,255,.8);--border:rgba(20,30,55,.11);--border2:rgba(20,30,55,.06);--text:#171b24;--muted:#626c7e;--dim:#8992a3;--shadow:0 18px 55px rgba(30,45,80,.11)}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scrollbar-gutter:stable}
body{font-family:var(--font);background:radial-gradient(900px 500px at 10% -10%,rgba(91,140,255,.22),transparent 65%),radial-gradient(800px 500px at 100% 0,rgba(177,111,255,.15),transparent 60%),linear-gradient(145deg,var(--bg0),var(--bg1));background-attachment:fixed;color:var(--text);min-height:100vh;line-height:1.65}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:linear-gradient(120deg,transparent 35%,rgba(255,255,255,.025),transparent 65%);opacity:.8}
a{color:inherit;text-decoration:none}button,input,textarea,select{font:inherit}button{cursor:pointer}
::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:rgba(150,160,180,.22);border:2px solid transparent;background-clip:padding-box;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:rgba(150,160,180,.38);background-clip:padding-box}
*{scrollbar-width:thin;scrollbar-color:rgba(150,160,180,.25) transparent}
.dashboard{display:flex;min-height:100vh}
.main{flex:1;margin-right:var(--sidebar-w);min-width:0}
.content{padding:28px;max-width:1600px;margin:auto}
.sidebar{position:fixed;right:14px;top:14px;bottom:14px;width:var(--sidebar-w);z-index:100;background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.035));backdrop-filter:blur(34px) saturate(150%);-webkit-backdrop-filter:blur(34px) saturate(150%);border:1px solid var(--border);border-radius:26px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden}
.sidebar:before,.card:before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(125deg,rgba(255,255,255,.08),transparent 28%,transparent 72%,rgba(255,255,255,.025))}
.sidebar-brand{padding:22px 20px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--border2)}
.sidebar-brand img{width:42px;height:42px;border-radius:13px;object-fit:cover;box-shadow:0 8px 24px rgba(0,0,0,.25)}
.brand-text{font-weight:750;font-size:1.08rem;letter-spacing:-.02em}
.nav{flex:1;overflow:auto;padding:13px 8px}
.nav-item{position:relative;display:flex;align-items:center;min-height:42px;padding:9px 14px;margin:3px 0;border-radius:13px;color:var(--muted);font-size:.9rem;transition:.18s ease}
.nav-item:hover{background:var(--glass);color:var(--text);transform:translateX(-2px)}
.nav-item.active{background:linear-gradient(90deg,var(--primary-soft),rgba(255,255,255,.025));color:var(--primary-hover);box-shadow:inset 0 0 0 1px rgba(91,140,255,.11)}
.nav-group{margin:4px 0}.nav-group-btn{width:100%;display:flex;justify-content:space-between;align-items:center;background:transparent;border:0;color:var(--muted);padding:10px 14px;border-radius:13px;font-size:.9rem}.nav-group-btn:hover{background:var(--glass);color:var(--text)}
.nav-group-body{display:none;padding-right:8px}.nav-group.open .nav-group-body{display:block}.chevron{opacity:.5;font-size:.65rem;transition:.2s}.nav-group.open .chevron{transform:rotate(180deg)}
.sidebar-footer{padding:13px;border-top:1px solid var(--border2)}.user-chip{display:flex;align-items:center;gap:10px;padding:9px}.avatar{width:34px;height:34px;border-radius:11px;background:var(--primary-soft);color:var(--primary-hover);display:grid;place-items:center;font-weight:700}.user-meta{display:flex;flex-direction:column;font-size:.8rem}.user-meta .role{color:var(--dim);font-size:.7rem}.btn-logout{display:block;text-align:center;margin-top:7px;padding:8px;border-radius:11px;background:rgba(255,111,125,.08);color:var(--danger);font-size:.8rem}
.topbar{height:76px;padding:0 28px;border-bottom:1px solid var(--border2);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:50;background:rgba(10,12,18,.35);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
[data-theme=light] .topbar{background:rgba(245,247,251,.55)}.topbar h2{font-size:1.15rem;letter-spacing:-.02em}.topbar-actions{display:flex;gap:9px;align-items:center}
.card{position:relative;background:linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.035));backdrop-filter:blur(var(--blur)) saturate(145%);-webkit-backdrop-filter:blur(var(--blur)) saturate(145%);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:22px;margin-bottom:16px;overflow:hidden}
.card>*{position:relative;z-index:1}.card-title{font-size:1rem;font-weight:700;margin-bottom:6px}.card-desc,.muted{color:var(--muted);font-size:.84rem}.empty{text-align:center;padding:55px 20px;color:var(--muted)}
.btn-primary,.btn-danger,.btn-ghost,.theme-toggle{border:1px solid var(--border);border-radius:12px;padding:9px 14px;background:var(--glass2);color:var(--text);transition:.18s;display:inline-flex;align-items:center;justify-content:center;gap:7px}.btn-primary{background:linear-gradient(135deg,var(--primary),#456fdc);border-color:rgba(255,255,255,.12);color:#fff;box-shadow:0 8px 24px rgba(70,110,230,.25)}.btn-primary:hover{transform:translateY(-1px);background:linear-gradient(135deg,var(--primary-hover),var(--primary))}.btn-danger{color:var(--danger);background:rgba(255,111,125,.08)}.btn-ghost{background:transparent}.inline{display:inline-flex}.theme-toggle{width:40px;height:40px;padding:0}
.form-group{margin:0 0 16px}.form-group label{display:block;color:var(--muted);font-size:.82rem;margin-bottom:7px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid .card-actions{grid-column:1/-1}
input,textarea,select{width:100%;border:1px solid var(--border);outline:0;background:rgba(0,0,0,.16);color:var(--text);border-radius:12px;padding:11px 13px;transition:.18s}textarea{min-height:150px;resize:vertical}select{appearance:auto}input:focus,textarea:focus,select:focus{border-color:rgba(91,140,255,.6);box-shadow:0 0 0 4px rgba(91,140,255,.1)}input[type=checkbox],input[type=radio]{width:18px;height:18px;accent-color:var(--primary);vertical-align:middle}
.inline-form{display:flex;gap:10px;align-items:center;max-width:440px}.inline-form input{max-width:220px}
.data-table{width:100%;border-collapse:separate;border-spacing:0;font-size:.84rem}.data-table th{color:var(--dim);font-weight:600;background:rgba(255,255,255,.025);position:sticky;top:0;z-index:2}.data-table th,.data-table td{padding:13px 12px;border-bottom:1px solid var(--border2);text-align:right;white-space:nowrap}.data-table tbody tr{transition:.15s}.data-table tbody tr:hover{background:rgba(255,255,255,.035)}
.panel-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.panel-card{display:block;min-height:220px;transition:.2s}.panel-card:hover{transform:translateY(-4px);border-color:rgba(91,140,255,.35)}.panel-card-top,.panel-meta,.panel-stats-mini{display:flex;justify-content:space-between;gap:10px;align-items:center}.panel-type-badge,.badge{font-size:.7rem;padding:4px 8px;border-radius:999px;background:var(--glass2);color:var(--muted)}.status-pill{font-size:.72rem;display:flex;align-items:center;gap:6px}.status-dot{width:7px;height:7px;border-radius:50%;background:var(--dim)}.status-pill.online .status-dot{background:var(--success);box-shadow:0 0 12px rgba(67,211,158,.6)}.panel-name{font-size:1.05rem;margin:25px 0 5px}.panel-url,.panel-meta{font-size:.75rem;color:var(--dim)}.panel-stats-mini{margin:24px 0;padding-top:13px;border-top:1px solid var(--border2);font-size:.78rem;color:var(--muted)}
.flash-container{position:fixed;top:18px;left:18px;z-index:1000;display:grid;gap:8px}.flash-message{padding:11px 16px;border-radius:13px;background:var(--glass2);backdrop-filter:blur(20px);border:1px solid var(--border);box-shadow:var(--shadow);font-size:.82rem}.flash-message.success{border-color:rgba(67,211,158,.35)}.flash-message.error{border-color:rgba(255,111,125,.35)}
.premium-list{display:grid;gap:8px}.premium-row{display:grid;grid-template-columns:1fr 1fr 1.5fr auto;gap:10px;align-items:center;padding:11px 12px;border:1px solid var(--border2);border-radius:12px;background:rgba(255,255,255,.025)}
.sortable-ghost{opacity:.35}.sortable-drag{transform:scale(1.01);box-shadow:0 20px 50px rgba(0,0,0,.25)}[draggable=true]{cursor:grab}[draggable=true]:active{cursor:grabbing}
@media(max-width:1000px){:root{--sidebar-w:0px}.sidebar{right:10px;left:10px;bottom:auto;height:auto;width:auto;position:relative;border-radius:18px}.sidebar .nav{max-height:300px}.dashboard{display:block}.main{margin:0}.topbar{position:relative}.sidebar-footer{display:none}.content{padding:18px}.form-grid{grid-template-columns:1fr}}
@media(max-width:620px){.topbar{padding:0 16px}.topbar h2{font-size:1rem}.content{padding:12px}.card{padding:16px;border-radius:16px}.form-grid{grid-template-columns:1fr}.premium-row{grid-template-columns:1fr}.inline-form{flex-direction:column;align-items:stretch}.inline-form input{max-width:none}}


/* ==========================================================================
   Farnoud Premium SaaS UI — frontend-only design layer
   ========================================================================== */
:root{
  --bg:#0b0f14; --surface:#0f141b; --card:#121821; --elevated:#161e28;
  --line:rgba(255,255,255,.075); --line-strong:rgba(255,255,255,.12);
  --text:#f3f4f6; --text-secondary:#8b95a5; --text-tertiary:#5f6b7b;
  --primary:#3b82f6; --primary-hover:#2563eb; --accent:#38bdf8;
  --success:#22c55e; --warning:#f59e0b; --danger:#ef4444; --info:#38bdf8;
  --radius:16px; --radius-sm:11px; --sidebar-width:272px; --sidebar-mini:82px;
  --shadow:0 18px 55px rgba(0,0,0,.25);
  --font-fa:"Vazirmatn",Tahoma,sans-serif; --font-en:"Inter",var(--font-fa);
}
html,body{background:var(--bg);color:var(--text);font-family:var(--font-fa);font-size:14px}
body{overflow-x:hidden}
*{box-sizing:border-box}
button,input,select,textarea{font-family:inherit}
a{color:inherit}
.dashboard{min-height:100vh;display:flex;background:
 radial-gradient(900px 500px at 85% -10%,rgba(59,130,246,.07),transparent 60%),var(--bg)}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);direction:rtl;
 background:rgba(15,20,27,.94);border-right:1px solid var(--line);backdrop-filter:blur(18px);
 z-index:100;display:flex;flex-direction:column;padding:18px 13px;transition:width .22s ease,transform .22s ease}
[dir="rtl"] .sidebar{right:0;left:auto;border-right:0;border-left:1px solid var(--line)}
.sidebar-brand{height:58px;display:flex;align-items:center;gap:11px;padding:4px 8px 16px;margin-bottom:8px;border-bottom:1px solid var(--line)}
.logo-mini{width:38px;height:38px;flex:0 0 38px;border-radius:12px;overflow:hidden;border:1px solid var(--line-strong);box-shadow:0 8px 25px rgba(0,0,0,.25)}
.logo-mini img{width:100%;height:100%;object-fit:cover}
.brand-copy{display:flex;flex-direction:column;min-width:0}
.brand-text{font-family:var(--font-en);font-weight:800;letter-spacing:-.3px;font-size:16px}
.brand-subtitle{font-family:var(--font-en);font-size:10px;color:var(--text-tertiary);letter-spacing:.7px;margin-top:2px}
.sidebar-collapse{margin-right:auto;width:30px;height:30px;border:1px solid var(--line);background:transparent;color:var(--text-secondary);border-radius:9px;display:grid;place-items:center;cursor:pointer}
.sidebar-collapse svg{width:15px;height:15px}
.nav{flex:1;overflow:auto;padding:5px 0;scrollbar-width:none}
.nav::-webkit-scrollbar{display:none}
.nav-section-label{font:600 9px var(--font-en);color:#566171;text-transform:uppercase;letter-spacing:1.1px;padding:16px 12px 7px}
.nav-item,.nav-group-btn{min-height:42px;border-radius:11px;margin:2px 0;display:flex;align-items:center;gap:11px;padding:0 12px;color:var(--text-secondary);text-decoration:none;transition:.16s ease;border:0;background:transparent;width:100%;font-size:12.5px;cursor:pointer;text-align:right}
.nav-item svg,.nav-group-btn>svg{width:17px;height:17px;stroke-width:1.8;flex:none}
.nav-item:hover,.nav-group-btn:hover{color:var(--text);background:rgba(255,255,255,.045)}
.nav-item.active{color:#fff;background:linear-gradient(90deg,rgba(59,130,246,.18),rgba(59,130,246,.07));box-shadow:inset -2px 0 0 var(--primary)}
.nav-item.active svg{color:var(--accent)}
.nav-group-btn .chevron{width:14px;height:14px;margin-right:auto;transition:transform .2s}
.nav-group.open .chevron{transform:rotate(180deg)}
.nav-group-body{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows .2s}
.nav-group.open .nav-group-body{grid-template-rows:1fr}
.nav-group-body>*{min-height:0}
.nav-group-body .nav-item{padding-right:42px;font-size:12px;min-height:38px}
.sidebar-footer{padding-top:12px;border-top:1px solid var(--line)}
.user-chip{display:flex;align-items:center;gap:9px;padding:8px;border-radius:12px;background:rgba(255,255,255,.025);margin-bottom:8px}
.avatar{width:34px;height:34px;border-radius:10px;background:linear-gradient(145deg,var(--primary),#1d4ed8);display:grid;place-items:center;font-weight:800;color:white}
.user-meta{display:flex;flex-direction:column;min-width:0}.user-meta .name{font-size:11.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis}.user-meta .role{font:9px var(--font-en);color:var(--text-tertiary);margin-top:2px}
.btn-logout{height:38px;border-radius:10px;display:flex;align-items:center;gap:9px;padding:0 12px;color:#9aa5b5;text-decoration:none;font-size:11px;transition:.16s}.btn-logout:hover{color:#fff;background:rgba(239,68,68,.08)}.btn-logout svg{width:16px}

.main{width:calc(100% - var(--sidebar-width));margin-right:var(--sidebar-width);min-width:0}
.topbar{min-height:76px;padding:17px clamp(18px,3vw,34px);display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--line);background:rgba(11,15,20,.72);backdrop-filter:blur(16px);position:sticky;top:0;z-index:50}
.topbar h2{font-size:19px;letter-spacing:-.4px;margin:0;font-weight:800;color:var(--text)}
.topbar h2:after{content:"";display:block;width:28px;height:2px;background:var(--primary);margin-top:6px;border-radius:3px}
.topbar-actions{margin-right:auto;display:flex;align-items:center;gap:8px}
.content{padding:clamp(18px,3vw,32px);max-width:1600px;margin:auto}
.card{background:linear-gradient(180deg,rgba(22,30,40,.72),rgba(18,24,33,.92));border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 10px 35px rgba(0,0,0,.12);padding:20px}
.card:hover{border-color:rgba(255,255,255,.10)}
.card-title{font-weight:800;font-size:14px;color:var(--text);margin-bottom:7px}
.card-desc,.muted{color:var(--text-secondary);font-size:11.5px;line-height:1.8}
.dashboard-grid,.stats-grid,.kpi-grid{gap:14px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:18px}
.stat-card,.kpi-card{position:relative;overflow:hidden;background:linear-gradient(145deg,#141c26,#10161e);border:1px solid var(--line);border-radius:16px;padding:18px}
.stat-card:before,.kpi-card:before{content:"";position:absolute;width:90px;height:90px;border-radius:50%;background:var(--primary);opacity:.06;left:-28px;top:-30px;filter:blur(2px)}
.stat-label{color:var(--text-secondary);font-size:11px}.stat-value{font:700 23px var(--font-en);margin-top:9px;letter-spacing:-.7px}.stat-change{font-size:10px;margin-top:7px}
.data-table{width:100%;border-collapse:separate;border-spacing:0;font-size:11.5px;direction:rtl}
.data-table th{position:sticky;top:0;z-index:2;background:#151d27;color:#758196;font-size:10px;font-weight:700;padding:13px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
.data-table td{padding:13px 12px;border-bottom:1px solid rgba(255,255,255,.045);color:#d5dae2;vertical-align:middle}
.data-table tbody tr{transition:background .14s}.data-table tbody tr:hover{background:rgba(59,130,246,.035)}
.data-table code,code{font-family:var(--font-en),monospace;direction:ltr;unicode-bidi:plaintext;color:#b9c7da}
.card:has(.data-table){padding:0;overflow:hidden}
.btn-primary,.btn-success,.btn-danger,.btn-secondary,.btn-ghost,.greeting,.theme-toggle{border:1px solid var(--line);border-radius:10px;min-height:38px;padding:0 13px;display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none;cursor:pointer;font-size:11px;font-weight:700;transition:.16s}
.btn-primary{background:linear-gradient(135deg,var(--primary),var(--primary-hover));border-color:transparent;color:#fff;box-shadow:0 8px 22px var(--primary-glow)}
.btn-primary:hover{transform:translateY(-1px);filter:brightness(1.06)}
.btn-success{background:rgba(34,197,94,.11);color:#5ee58a;border-color:rgba(34,197,94,.2)}
.btn-danger{background:rgba(239,68,68,.09);color:#ff7777;border-color:rgba(239,68,68,.18)}
.btn-secondary,.greeting,.theme-toggle{background:rgba(255,255,255,.035);color:#b9c2cf}
.btn-ghost{background:transparent;color:var(--text-secondary)}
.btn-secondary:hover,.greeting:hover,.theme-toggle:hover,.btn-ghost:hover{background:rgba(255,255,255,.07);color:#fff}
.form-group{margin-bottom:15px}.form-group label,.check-item{display:block;color:#aeb8c6;font-size:11px;font-weight:600;margin-bottom:7px}
input,select,textarea,.form-control,.form-select{width:100%;min-height:42px;background:#0d131a!important;color:#e8ebef!important;border:1px solid var(--line)!important;border-radius:10px!important;padding:9px 12px!important;outline:none;transition:.15s;font-size:12px}
textarea{min-height:110px;resize:vertical}
input:focus,select:focus,textarea:focus,.form-control:focus,.form-select:focus{border-color:rgba(59,130,246,.65)!important;box-shadow:0 0 0 3px rgba(59,130,246,.09)}
select{cursor:pointer}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid .form-group{margin:0}.form-grid .card-actions{grid-column:1/-1}
.badge,.status-badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 9px;font-size:9.5px;font-weight:700;background:rgba(148,163,184,.1);color:#aeb8c6;border:1px solid rgba(148,163,184,.12)}
.badge:before,.status-badge:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}
.badge.success,.status-badge.success,.online{color:#4ade80;background:rgba(34,197,94,.08);border-color:rgba(34,197,94,.14)}
.badge.warning,.status-badge.warning{color:#fbbf24;background:rgba(245,158,11,.08)}
.badge.danger,.status-badge.danger,.offline{color:#fb7185;background:rgba(239,68,68,.08)}
.badge.info,.status-badge.info{color:#60a5fa;background:rgba(59,130,246,.08)}
.empty{padding:52px 24px;text-align:center;border:1px dashed var(--line-strong);border-radius:14px;color:var(--text-secondary);background:rgba(255,255,255,.015)}
.empty h3{color:#d8dde5;margin:0 0 5px}
.flash-container{position:fixed;top:18px;left:18px;z-index:1000;display:flex;flex-direction:column;gap:8px}.flash-message{min-width:280px;padding:12px 15px;border-radius:12px;background:#151d27;border:1px solid var(--line-strong);box-shadow:var(--shadow);font-size:11px}
.theme-toggle svg{width:16px;height:16px}
.quick-actions,.card-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.topbar .greeting{margin-right:auto}
.panel-card,.ticket-card{background:var(--card)!important;border:1px solid var(--line)!important;border-radius:16px!important;box-shadow:none!important}
table{direction:rtl}
input[type=checkbox]{width:17px!important;min-height:17px!important;accent-color:var(--primary)}
.check-item{display:flex;align-items:center;gap:8px;padding:11px 12px;background:rgba(255,255,255,.025);border:1px solid var(--line);border-radius:10px}
.check-item input{flex:0 0 17px}
.sidebar-collapsed .sidebar{width:var(--sidebar-mini)}
.sidebar-collapsed .main{width:calc(100% - var(--sidebar-mini));margin-right:var(--sidebar-mini)}
.sidebar-collapsed .brand-copy,.sidebar-collapsed .nav-section-label,.sidebar-collapsed .nav-item span,.sidebar-collapsed .nav-group-btn span,.sidebar-collapsed .nav-group-btn .chevron,.sidebar-collapsed .nav-group-body,.sidebar-collapsed .user-meta,.sidebar-collapsed .btn-logout span{display:none}
.sidebar-collapsed .sidebar-brand{justify-content:center}.sidebar-collapsed .sidebar-collapse{margin:0}.sidebar-collapsed .nav-item,.sidebar-collapsed .nav-group-btn,.sidebar-collapsed .btn-logout{justify-content:center;padding:0}.sidebar-collapsed .nav-group-btn>svg:first-child{margin:0}.sidebar-collapsed .user-chip{justify-content:center;background:transparent}
.mobile-menu{display:none}
@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sidebar{width:var(--sidebar-mini)}.main{width:calc(100% - var(--sidebar-mini));margin-right:var(--sidebar-mini)}.brand-copy,.nav-section-label,.nav-item span,.nav-group-btn span,.nav-group-btn .chevron,.nav-group-body,.user-meta,.btn-logout span{display:none}.sidebar-brand{justify-content:center}.sidebar-collapse{margin:0}.nav-item,.nav-group-btn,.btn-logout{justify-content:center;padding:0}.user-chip{justify-content:center;background:transparent}}
@media(max-width:760px){.sidebar{width:min(290px,88vw);transform:translateX(110%);box-shadow:-30px 0 70px rgba(0,0,0,.4)}[dir=rtl] .sidebar{transform:translateX(110%)}.mobile-sidebar-open .sidebar{transform:translateX(0)}.main,.sidebar-collapsed .main{width:100%;margin-right:0}.mobile-menu{display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.035);color:var(--text);cursor:pointer}.mobile-menu svg{width:18px}.topbar{min-height:68px;padding:12px 15px}.topbar h2{font-size:15px}.content{padding:15px}.stats-grid{grid-template-columns:1fr 1fr;gap:9px}.stat-card,.kpi-card{padding:14px}.stat-value{font-size:18px}.form-grid{grid-template-columns:1fr}.data-table{min-width:760px}.card:has(.data-table){overflow-x:auto}.topbar-actions .greeting{display:none}.flash-container{left:10px;right:10px}.flash-message{min-width:0;width:100%}}
@media(max-width:430px){.stats-grid{grid-template-columns:1fr}.content{padding:12px}.card{padding:15px}.topbar h2{max-width:55vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
/* Keep technical values readable regardless of RTL */
code,.ltr,.ip,.uuid,.username,.technical{font-family:var(--font-en),monospace;direction:ltr;unicode-bidi:plaintext;letter-spacing:.05px}

/* Dashboard-specific components */
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}
.stat{position:relative;overflow:hidden;padding:18px;border-radius:16px;background:linear-gradient(145deg,#141c26,#10161e);border:1px solid var(--line)}
.stat:after{content:"";position:absolute;width:70px;height:70px;border-radius:50%;background:var(--primary);opacity:.055;left:-20px;bottom:-25px}
.stat-label{color:var(--text-secondary);font-size:10.5px}.stat-value{font:800 23px var(--font-en);margin-top:8px;letter-spacing:-.6px}
.chart-card{margin-top:4px}.chart-wrap{height:330px;margin-top:18px}.chart-filters{display:flex;gap:5px;margin-top:14px}.chart-filters button{border:1px solid var(--line);background:rgba(255,255,255,.025);color:var(--text-secondary);border-radius:8px;padding:6px 10px;font:600 10px var(--font-fa);cursor:pointer}.chart-filters button.active{color:#fff;background:var(--primary);border-color:var(--primary)}
@media(max-width:1100px){.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.stats{grid-template-columns:1fr 1fr;gap:9px}.stat{padding:14px}.stat-value{font-size:18px}.chart-wrap{height:250px}}
@media(max-width:430px){.stats{grid-template-columns:1fr}}


/* Login logo — fixed box, any upload size fits */
.login-wrapper .logo-wrap{
  width:72px;height:72px;margin:0 auto 12px;
  border-radius:18px;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:var(--primary-soft,rgba(99,102,241,.12));
  border:1px solid var(--border,rgba(255,255,255,.08));
}
.login-wrapper .logo-wrap img{
  width:100%;height:100%;
  object-fit:contain;
  object-position:center;
  display:block;
  max-width:72px;max-height:72px;
}
.login-header h1{margin-top:4px}
.sidebar .logo-mini,.logo-mini{
  width:38px;height:38px;flex:0 0 38px;
  border-radius:12px;overflow:hidden;
}
.logo-mini img{width:100%;height:100%;object-fit:contain;display:block}

/* ========== Login page (beautified) ========== */
.login-page{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  padding:24px;position:relative;overflow:hidden;
}
.login-bg{
  position:fixed;inset:0;z-index:0;pointer-events:none;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(99,102,241,.22), transparent 55%),
    radial-gradient(700px 420px at 90% 85%, rgba(14,165,233,.16), transparent 50%),
    radial-gradient(600px 400px at 50% 50%, rgba(139,92,246,.08), transparent 60%);
}
.login-card{
  position:relative;z-index:1;width:100%;max-width:400px;
  padding:36px 32px 28px;border-radius:24px;
  background:rgba(18,22,32,.72);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 24px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
}
.login-header{text-align:center;margin-bottom:28px}
.login-header h1{
  margin:10px 0 4px;font-size:1.55rem;font-weight:700;letter-spacing:-.02em;
  background:linear-gradient(135deg,#fff 30%,#a5b4fc);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.login-header p{margin:0;color:var(--dim,#9aa5b5);font-size:.9rem}
.login-page .logo-wrap{
  width:76px;height:76px;margin:0 auto;
  border-radius:20px;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(145deg,rgba(99,102,241,.18),rgba(14,165,233,.1));
  border:1px solid rgba(255,255,255,.1);
  box-shadow:0 12px 32px rgba(99,102,241,.2);
}
.login-page .logo-wrap img{
  width:100%;height:100%;object-fit:contain;object-position:center;display:block;
  max-width:76px;max-height:76px;
}
.login-form .form-group{margin-bottom:16px}
.login-form label{
  display:block;margin-bottom:7px;font-size:.82rem;font-weight:600;
  color:var(--dim,#9aa5b5);
}
.login-form .input-icon{position:relative}
.login-form .input-icon .ico{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);
  color:#7b8499;display:flex;pointer-events:none;
}
.login-form .input-icon input{
  width:100%;height:46px;padding:0 42px 0 14px;
  border-radius:14px;border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);color:var(--text,#e8ecf4);
  font-size:.95rem;outline:none;transition:.18s;
}
.login-form .input-icon input:focus{
  border-color:rgba(99,102,241,.55);
  background:rgba(99,102,241,.08);
  box-shadow:0 0 0 3px rgba(99,102,241,.15);
}
.login-form .input-icon input::placeholder{color:#6b7285}
.btn-login{
  width:100%;height:48px;margin-top:8px;border:0;border-radius:14px;
  font-size:.95rem;font-weight:700;cursor:pointer;color:#fff;
  background:linear-gradient(135deg,#6366f1,#456fdc 55%,#0ea5e9);
  box-shadow:0 12px 28px rgba(99,102,241,.35);
  transition:.18s;
}
.btn-login:hover{transform:translateY(-1px);filter:brightness(1.06)}
.btn-login:active{transform:translateY(0)}
.login-foot{
  text-align:center;margin:18px 0 0;font-size:.72rem;
  color:#5b6475;letter-spacing:.04em;
}
.login-alerts{margin-bottom:14px}
.login-alert{
  padding:10px 12px;border-radius:12px;font-size:.85rem;margin-bottom:8px;
}
.login-alert-error{background:rgba(239,68,68,.12);color:#fca5a5;border:1px solid rgba(239,68,68,.25)}
.login-alert-success{background:rgba(34,197,94,.12);color:#86efac;border:1px solid rgba(34,197,94,.25)}

/* ========== Logout button (beautified) ========== */
.btn-logout{
  height:40px !important;border-radius:12px !important;
  display:flex !important;align-items:center !important;justify-content:center;
  gap:8px !important;padding:0 14px !important;
  text-decoration:none !important;font-size:12px !important;font-weight:600;
  color:#f87171 !important;
  background:rgba(239,68,68,.08) !important;
  border:1px solid rgba(239,68,68,.18) !important;
  transition:.18s !important;margin-top:8px;
}
.btn-logout:hover{
  color:#fff !important;
  background:linear-gradient(135deg,rgba(239,68,68,.35),rgba(220,38,38,.45)) !important;
  border-color:rgba(239,68,68,.4) !important;
  box-shadow:0 8px 20px rgba(239,68,68,.2);
  transform:translateY(-1px);
}
.btn-logout svg,.btn-logout i{width:16px;height:16px;flex-shrink:0}
.sidebar-collapsed .btn-logout,
@media(max-width:1100px){
  /* keep icon-only mode readable */
}
.sidebar-footer .btn-logout{width:100%}
