@import url("https://fonts.googleapis.com/css2?family=Alexandria:wght@400;600;700;800&family=Cairo:wght@400;600;700;800&display=swap");
:root{
  --bg:#f7f8fa;--surface:#fff;--surface-soft:#f1f3f6;--ink:#17191f;--muted:#767b86;
  --line:#e5e8ed;--sidebar:#17191f;--sidebar-soft:#252831;--accent:#efb23e;--accent-dark:#d79821;
  --good:#15835c;--danger:#c83b4b;--warn:#a56b0a;--shadow:0 12px 40px rgba(22,25,31,.07);
}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:"Cairo","Tahoma","Arial",sans-serif;color:var(--ink);background:var(--bg);line-height:1.65}a{text-decoration:none;color:inherit}button,input,textarea,select{font:inherit}button{border:0;cursor:pointer}.admin-body{min-height:100vh;overflow-x:hidden}.admin-shell{display:grid;grid-template-columns:270px minmax(0,1fr);min-height:100vh;direction:rtl}.sidebar{background:linear-gradient(180deg,#17191f 0%,#1d2027 100%);color:#fff;padding:22px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh;z-index:80;border-left:1px solid rgba(255,255,255,.05)}.sidebar-brand{display:flex;align-items:center;gap:12px;padding:4px 8px 22px;border-bottom:1px solid rgba(255,255,255,.08)}.brand-mark,.auth-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,#f7ca69,var(--accent-dark));color:#17191f;font-weight:900;box-shadow:0 10px 30px rgba(239,178,62,.22)}.sidebar-brand img{width:46px;height:46px;border-radius:14px;object-fit:cover}.sidebar-brand strong,.sidebar-brand small{display:block}.sidebar-brand strong{font-size:15px}.sidebar-brand small{font-size:11px;color:#949aa6;margin-top:2px}.sidebar-nav{display:grid;gap:7px;padding:22px 0;flex:1}.sidebar-nav a{display:flex;align-items:center;gap:12px;padding:12px 13px;border-radius:13px;color:#aeb3bd;font-weight:700;font-size:13px;transition:.2s ease}.sidebar-nav a:hover{background:rgba(255,255,255,.06);color:#fff;transform:translateX(-2px)}.sidebar-nav a.active{background:#fff;color:#17191f;box-shadow:0 12px 30px rgba(0,0,0,.18)}.nav-icon{width:31px;height:31px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.07);font-size:16px}.sidebar-nav a.active .nav-icon{background:#f4f5f7;color:#17191f}.sidebar-footer{border-top:1px solid rgba(255,255,255,.08);padding-top:16px}.user-mini{display:flex;align-items:center;gap:10px;padding:7px}.user-mini>span,.avatar{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#30343e;color:#fff;font-weight:900}.user-mini strong,.user-mini small{display:block;max-width:155px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.user-mini strong{font-size:12px}.user-mini small{font-size:10px;color:#8e95a2}.logout-link{display:block;text-align:center;color:#d8dbe1;font-size:12px;padding:9px;border-radius:10px;margin-top:8px;background:rgba(255,255,255,.05)}.admin-workspace{min-width:0;display:flex;flex-direction:column}.admin-topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:16px;padding:0 clamp(18px,3vw,38px);position:sticky;top:0;z-index:50}.sidebar-toggle{display:none;width:42px;height:42px;border-radius:12px;background:#f1f3f6;color:#17191f;font-size:20px}.topbar-title{display:grid}.topbar-title span{font-size:10px;color:var(--muted)}.topbar-title strong{font-size:16px}.topbar-user{margin-inline-start:auto;display:flex;align-items:center;gap:9px;padding:8px 12px;background:#f7f8fa;border:1px solid var(--line);border-radius:13px}.topbar-user strong,.topbar-user small{display:block}.topbar-user strong{font-size:12px}.topbar-user small{font-size:10px;color:var(--muted)}.status-pulse{width:9px;height:9px;border-radius:50%;background:#25b278;box-shadow:0 0 0 4px rgba(37,178,120,.12)}.admin-main{padding:30px clamp(18px,3.2vw,44px) 70px;min-width:0}.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:22px}.page-head span,.panel-kicker{font-size:11px;font-weight:800;color:#b67a0d}.page-head h1{font-size:30px;line-height:1.25;margin:4px 0}.page-head p{color:var(--muted);margin:0;font-size:13px}.dashboard-date{background:#fff;border:1px solid var(--line);padding:10px 15px;border-radius:12px;color:var(--muted);font-size:12px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:20px}.stat{background:#fff;border:1px solid var(--line);border-radius:17px;padding:19px;display:flex;align-items:center;gap:13px;box-shadow:0 7px 25px rgba(22,25,31,.035);transition:.2s}.stat:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.stat-icon{width:46px;height:46px;border-radius:14px;background:#f5f0e6;color:#a16a04;display:grid;place-items:center;font-size:20px}.stat strong,.stat span{display:block}.stat strong{font-size:26px;line-height:1}.stat div>span{color:var(--muted);font-size:11px;margin-top:5px}.dashboard-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.panel{background:#fff;border:1px solid var(--line);border-radius:18px;padding:22px;box-shadow:0 8px 28px rgba(22,25,31,.035);margin-bottom:18px;min-width:0}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px}.panel h2{margin:2px 0;font-size:20px}.count-pill{background:#f1f3f6;border:1px solid #e8eaee;border-radius:999px;padding:6px 10px;font-size:11px;color:var(--muted)}.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quick-actions a{display:flex;gap:11px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:14px;background:#fafbfc}.quick-actions a>span{width:37px;height:37px;border-radius:11px;background:#fff;border:1px solid var(--line);display:grid;place-items:center}.quick-actions strong,.quick-actions small{display:block}.quick-actions strong{font-size:12px}.quick-actions small{font-size:10px;color:var(--muted)}.two-col{display:grid;grid-template-columns:minmax(320px,.82fr) minmax(420px,1.18fr);gap:18px}.employee-layout{grid-template-columns:minmax(360px,.8fr) minmax(470px,1.2fr)}.contacts-layout{grid-template-columns:minmax(390px,.82fr) minmax(470px,1.18fr)}.campaign-layout{grid-template-columns:minmax(420px,.88fr) minmax(470px,1.12fr)}.settings-layout{grid-template-columns:minmax(360px,.9fr) minmax(420px,1.1fr)}.panel form{display:grid;gap:14px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}label{display:grid;gap:7px;font-size:11px;font-weight:800;color:#555b66}input,textarea,select{width:100%;border:1px solid #dfe2e7;background:#fff;border-radius:11px;padding:11px 13px;color:#17191f;outline:none;transition:.18s}input:focus,textarea:focus,select:focus{border-color:#dba337;box-shadow:0 0 0 3px rgba(239,178,62,.14)}textarea{resize:vertical;min-height:110px}.check{display:flex;align-items:center;gap:8px}.check input,.permission-option input,.toggle-row input{width:auto}.button,button{border-radius:11px;padding:11px 16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:7px}.primary{background:#17191f;color:#fff;box-shadow:0 9px 20px rgba(23,25,31,.13)}.primary:hover{background:#272a32}.secondary{background:#f1f3f6;color:#242832;border:1px solid #e2e5e9}.secondary:hover{background:#e9ebef}.danger{background:#fff0f1;color:var(--danger);border:1px solid #f5d5d9}.small{padding:7px 10px;font-size:10px}button:disabled{opacity:.45;cursor:not-allowed}.form-actions,.head-actions,.row-actions,.gateway-buttons,.inline-form,.campaign-top,.campaign-stats{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.head-actions{margin-inline-start:auto}.permission-box{border:1px solid var(--line);border-radius:15px;padding:14px;background:#fafbfc}.permission-title{margin-bottom:12px}.permission-title strong,.permission-title small{display:block}.permission-title small{font-size:10px;color:var(--muted);margin-top:3px}.permission-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.permission-option{display:flex;align-items:flex-start;gap:8px;padding:10px;border:1px solid #e5e8ed;border-radius:11px;background:#fff;font-size:10px}.permission-option input{margin-top:3px}.compact-permissions{margin-top:11px}.employee-list{display:grid;gap:10px}.employee-card{border:1px solid var(--line);border-radius:15px;background:#fafbfc;overflow:hidden}.employee-summary{display:flex;align-items:center;gap:11px;padding:13px}.employee-summary>div:nth-child(2){min-width:0;flex:1}.employee-summary strong,.employee-summary small{display:block}.employee-summary strong{font-size:13px}.employee-summary small{font-size:10px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.employee-permissions{border-top:1px solid var(--line)}.employee-permissions summary{cursor:pointer;padding:11px 14px;font-size:11px;font-weight:800;color:#555b66}.employee-permissions form{padding:0 14px 14px}.delete-employee-form{border-top:1px dashed var(--line);padding-top:12px!important;margin-top:3px}.toggle-label{align-content:start}.toggle-row{display:flex;align-items:center;gap:7px;padding:11px 0}.avatar.small-avatar,.small-avatar{width:34px;height:34px;border-radius:11px;background:#2c3038;color:#fff}.contact-main{display:flex;align-items:center;gap:10px;min-width:0}.table-list{display:grid}.list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.list-row:last-child{border-bottom:0}.list-row strong,.list-row small{display:block}.list-row strong{font-size:12px}.list-row small{font-size:10px;color:var(--muted)}.row-actions{justify-content:flex-end}.row-actions form{display:flex;gap:7px}.badge{background:#eff1f4;color:#5d636e;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}.badge.ok{background:#e2f5ed;color:var(--good)}.import-methods{display:grid;gap:10px}.import-card{display:flex;gap:12px;border:1px solid var(--line);border-radius:15px;padding:14px;background:#fafbfc}.import-card>div{flex:1}.import-card h3{font-size:13px;margin:0 0 4px}.import-card p{font-size:10px;color:var(--muted);margin:0 0 10px}.import-icon{width:35px;height:35px;border-radius:11px;background:#17191f;color:#fff;display:grid;place-items:center;font-weight:900;flex:none}.import-form{gap:9px!important}.target-box{background:#f7f8fa;border:1px solid var(--line);padding:14px;border-radius:14px}.campaign-summary{display:flex;gap:10px;flex-wrap:wrap;padding:11px 13px;background:#f1f3f6;border-radius:11px;color:var(--muted);font-size:10px}.campaign-item{padding:15px 0;border-bottom:1px solid var(--line)}.campaign-item:last-child{border-bottom:0}.campaign-top{justify-content:space-between;align-items:flex-start}.campaign-top strong,.campaign-top small{display:block}.campaign-top strong{font-size:12px}.campaign-top small{font-size:10px;color:var(--muted);margin-top:4px}.campaign-progress{margin:12px 0}.progress-track{height:7px;background:#eceef1;border-radius:999px;overflow:hidden}.progress-track i{display:block;height:100%;background:linear-gradient(90deg,var(--accent),#f7ce7e);border-radius:inherit;transition:width .3s}.campaign-stats{justify-content:space-between;color:var(--muted);font-size:10px;margin-top:7px}.status-list{display:grid;gap:11px}.status-list>div{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line);padding-bottom:10px;font-size:11px}.status-list>div:last-child{border-bottom:0}.good{color:var(--good)}.warn{color:var(--warn)}.empty,.notice{padding:16px;border-radius:13px;background:#f1f3f6;color:var(--muted);font-size:11px}.notice.compact{padding:11px}.flash{max-width:950px;margin:0 auto 16px;padding:12px 15px;border-radius:12px;font-size:12px;font-weight:700}.flash.success{background:#e1f5eb;color:#0c6543}.flash.error{background:#fee8ea;color:#9b2530}.gateway-grid{display:grid;grid-template-columns:minmax(390px,.9fr) minmax(430px,1.1fr);gap:18px}.qr-panel,.gateway-controls{margin:0}.qr-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.qr-stage{min-height:390px;display:grid;place-items:center;border:1px dashed #cfd3d9;border-radius:18px;background:linear-gradient(145deg,#fafbfc,#f0f2f5);margin:18px 0}.qr-stage img{width:min(340px,85%);height:auto;border-radius:14px;background:#fff;padding:12px;box-shadow:0 12px 38px rgba(17,20,28,.12)}.qr-placeholder{display:grid;place-items:center;gap:10px;color:var(--muted);text-align:center}.qr-placeholder strong{width:92px;height:92px;border-radius:24px;background:#17191f;color:#fff;display:grid;place-items:center;font-size:27px}.qr-help{text-align:center;color:var(--muted);font-size:10px}.gateway-buttons{margin-top:16px}.gateway-buttons form{display:inline-flex}.gateway-buttons button{min-width:120px}.gateway-log{margin-top:14px;border:1px solid var(--line);border-radius:12px;background:#f7f8fa;padding:10px}.gateway-log summary{cursor:pointer;font-weight:800;font-size:11px}.gateway-log pre{direction:ltr;text-align:left;white-space:pre-wrap;word-break:break-word;max-height:260px;overflow:auto;background:#17191f;color:#e8e8e8;padding:12px;border-radius:10px;font-size:10px}code{background:#eef0f3;padding:2px 6px;border-radius:6px;direction:ltr;display:inline-block}hr{border:0;border-top:1px solid var(--line);margin:14px 0}.auth-body{min-height:100vh;background:radial-gradient(circle at 10% 10%,rgba(239,178,62,.17),transparent 35%),linear-gradient(135deg,#17191f,#242833);display:grid;place-items:center;padding:24px}.auth-main{width:min(480px,100%)}.auth-brand{display:flex;align-items:center;justify-content:center;gap:12px;color:#fff;margin-bottom:18px}.auth-brand strong,.auth-brand small{display:block}.auth-brand small{color:#aeb3bd;font-size:10px}.auth-card{background:#fff;border:1px solid rgba(255,255,255,.4);border-radius:22px;padding:28px;box-shadow:0 30px 80px rgba(0,0,0,.25)}.auth-card-head{display:flex;gap:13px;align-items:flex-start;margin-bottom:22px}.auth-card-head span:not(.auth-icon){color:#a16a04;font-size:10px;font-weight:800}.auth-card-head h1{margin:2px 0;font-size:25px}.auth-card-head p{margin:4px 0 0;color:var(--muted);font-size:11px}.auth-card form{display:grid;gap:14px}.auth-card .primary{width:100%;margin-top:4px}.auth-security{margin-top:16px;padding:11px;border-radius:11px;background:#f4f5f7;color:var(--muted);text-align:center;font-size:10px}.sidebar-overlay{display:none}.footer{display:none}
@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid,.two-col,.employee-layout,.contacts-layout,.campaign-layout,.settings-layout,.gateway-grid{grid-template-columns:1fr}.sidebar{width:270px;position:fixed;right:0;transform:translateX(105%);transition:.25s ease}.admin-shell{grid-template-columns:1fr}.sidebar-toggle{display:grid;place-items:center}.admin-shell.nav-open .sidebar{transform:translateX(0)}.sidebar-overlay{display:block;position:fixed;inset:0;background:rgba(12,14,18,.45);z-index:70;opacity:0;pointer-events:none;transition:.25s}.admin-shell.nav-open .sidebar-overlay{opacity:1;pointer-events:auto}}
@media(max-width:680px){.admin-topbar{height:67px;padding:0 13px}.topbar-user div{display:none}.topbar-user{padding:8px}.admin-main{padding:20px 12px 50px}.page-head{align-items:flex-start;flex-direction:column}.page-head h1{font-size:25px}.dashboard-date{display:none}.stats-grid{grid-template-columns:1fr 1fr;gap:9px}.stat{padding:13px;gap:9px}.stat-icon{width:38px;height:38px}.stat strong{font-size:21px}.panel{padding:16px;border-radius:15px}.form-row,.permission-grid,.quick-actions{grid-template-columns:1fr}.list-row,.employee-summary{align-items:flex-start}.contact-row{flex-direction:column}.row-actions{justify-content:flex-start}.campaign-top{flex-direction:column}.gateway-buttons form,.gateway-buttons button{width:100%}.qr-stage{min-height:280px}.head-actions{width:100%;margin:0}.head-actions button{width:100%}.auth-card{padding:21px}.topbar-title strong{font-size:14px}.import-card{flex-direction:column}.sidebar{width:min(86vw,300px)}}


/* ==========================================================
   v5.5.0 — ProGarage-inspired admin refinement
   Keeps all application behavior unchanged.
   ========================================================== */
:root{
  --bg:#f4f5f7;
  --surface:#ffffff;
  --surface-soft:#f7f8fa;
  --line:#dfe3e8;
  --sidebar:#20242b;
  --sidebar-soft:#2b3038;
  --accent:#b8d400;
  --accent-dark:#98b300;
  --danger:#ff1767;
  --good:#66a900;
  --shadow:none;
}
.admin-shell{grid-template-columns:228px minmax(0,1fr);background:var(--bg)}
.sidebar{
  background:#20242b;
  padding:18px 13px;
  border-left:1px solid #15181d;
  box-shadow:none;
}
.sidebar-brand{
  gap:10px;
  padding:3px 7px 17px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.sidebar-brand .brand-mark,.sidebar-brand img{
  width:39px;height:39px;border-radius:10px;
  background:#343a44;color:#fff;box-shadow:none;
}
.sidebar-brand strong{font-size:13px}
.sidebar-brand small{font-size:9px;color:#9299a5}
.sidebar-nav{gap:4px;padding:16px 0}
.sidebar-nav a{
  min-height:43px;
  padding:10px 12px;
  border-radius:8px;
  color:#c2c7d0;
  font-size:12px;
  font-weight:700;
  border-right:3px solid transparent;
  transition:background .16s,color .16s,border-color .16s;
}
.sidebar-nav a:hover{
  background:#292e36;
  color:#fff;
  transform:none;
}
.sidebar-nav a.active{
  background:#303640;
  color:#fff;
  border-right-color:var(--accent);
  box-shadow:none;
}
.nav-icon{
  width:21px;height:21px;border-radius:0;
  background:transparent!important;
  color:inherit!important;
  font-size:13px;
}
.sidebar-footer{padding-top:13px}
.user-mini{padding:6px 7px}
.user-mini>span{width:33px;height:33px;border-radius:8px;background:#303640}
.logout-link{background:#292e36;border-radius:7px;font-size:10px;margin-top:6px}
.admin-topbar{
  height:61px;
  padding:0 24px;
  border-bottom:1px solid #dfe3e8;
  box-shadow:none;
}
.topbar-title span{font-size:9px}
.topbar-title strong{font-size:14px}
.topbar-user{padding:6px 10px;border-radius:8px;background:#f7f8fa}
.admin-main{padding:23px 25px 55px;background:#f4f5f7}
.page-head{margin-bottom:16px;align-items:center}
.page-head span{font-size:10px;color:#829600}
.page-head h1{font-size:25px;margin:2px 0;color:#252a32}
.page-head p{font-size:11px;color:#7b818b}
.panel,.stat,.gateway-card{
  border:1px solid #d9dee5;
  border-radius:7px;
  box-shadow:none;
  background:#fff;
}
.panel{padding:17px;margin-bottom:16px}
.panel h2{font-size:16px;margin:0}
.panel-heading{
  min-height:45px;
  margin:-17px -17px 16px;
  padding:11px 15px;
  border-radius:6px 6px 0 0;
  background:#303640;
  color:#fff;
  border-bottom:1px solid #23272e;
}
.panel-heading h2{color:#fff;font-size:14px}
.panel-heading .panel-kicker,.panel-heading small{color:#cbd0d7}
.count-pill{background:#424954;border-color:#505866;color:#fff;border-radius:5px}
.stat{padding:15px;border-radius:7px}
.stat-icon{border-radius:7px;background:#f0f2f4;color:#3a404a}
.dashboard-date{border-radius:6px}
input,textarea,select{
  border-radius:5px;
  padding:9px 11px;
  border-color:#d8dde4;
  background:#fff;
}
input:focus,textarea:focus,select:focus{
  border-color:#a7bf00;
  box-shadow:0 0 0 2px rgba(184,212,0,.16);
}
label{font-size:10px;color:#4f5661}
.button,button{border-radius:5px;padding:9px 14px;font-size:11px;box-shadow:none}
.primary{background:var(--accent);color:#20250b;box-shadow:none}
.primary:hover{background:var(--accent-dark);color:#fff}
.secondary{background:#eef1f4;border-color:#d9dee5;color:#333942}
.secondary:hover{background:#e3e7eb}
.danger{background:var(--danger);border-color:var(--danger);color:#fff}
.danger:hover{background:#dc0b55}
.badge{border-radius:4px}
.empty,.notice{border-radius:5px;background:#f1f3f5;border:1px solid #e1e5e9}
.target-box,.permission-box,.employee-card,.import-card,.gateway-log{border-radius:6px}
.table-list{border:1px solid #dfe3e8;border-radius:6px;overflow:hidden;background:#fff}
.list-row{padding:11px 13px;border-bottom:1px solid #e4e7eb}
.list-row:nth-child(even){background:#fafbfc}
.list-row:last-child{border-bottom:0}

/* Campaigns: one full-width administration workspace, similar to ProGarage tables */
.campaign-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr)!important;
  gap:16px;
}
.campaign-layout .form-panel,.campaign-layout .list-panel{width:100%;max-width:none;margin:0}
#campaign-form{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px 14px;
}
#campaign-form>.form-row,
#campaign-form>.target-box,
#campaign-form>.campaign-summary,
#campaign-form>button,
#campaign-form>label:nth-of-type(2),
#campaign-form>label:nth-of-type(4){grid-column:1/-1}
#campaign-form>button{justify-self:stretch;min-height:42px}
.campaign-summary{border-radius:5px;background:#f3f5f7;border:1px solid #e0e4e8}
.campaigns-list{border:1px solid #d9dee5;border-radius:6px;overflow:hidden}
.campaign-item{padding:13px 15px;background:#fff;border-bottom:1px solid #e0e4e8}
.campaign-item:nth-child(even){background:#fafbfc}
.campaign-item:last-child{border-bottom:0}
.campaign-top strong{font-size:12px;color:#252a32}
.progress-track{height:6px;background:#e5e8ec}
.progress-track i{background:var(--accent)}

/* Contacts and employees retain two-column usability but use compact table styling */
.contacts-layout,.employee-layout,.settings-layout{gap:16px}
.employee-card{background:#fff}
.employee-summary{padding:11px 12px}
.import-card{background:#fff}

@media(max-width:1100px){
  .admin-shell{grid-template-columns:1fr}
  .sidebar{width:248px}
  #campaign-form{grid-template-columns:1fr}
  #campaign-form>*{grid-column:1!important}
}
@media(max-width:680px){
  .admin-topbar{height:59px;padding:0 11px}
  .admin-main{padding:15px 10px 45px}
  .page-head h1{font-size:22px}
  .panel{padding:13px;border-radius:6px}
  .panel-heading{margin:-13px -13px 13px;padding:10px 12px}
  .sidebar{width:min(82vw,280px)}
}

/* ==========================================================
   v5.5.1 — restore the original compact sidebar
   Fixes stretched grid rows that created huge empty gaps.
   ========================================================== */
.admin-shell{grid-template-columns:230px minmax(0,1fr)}
.sidebar{
  background:#17191f;
  padding:25px 16px;
  border-left:0;
  box-shadow:none;
}
.sidebar-brand{
  gap:12px;
  padding:4px 8px 20px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.sidebar-brand .brand-mark,.sidebar-brand img{
  width:44px;height:44px;border-radius:13px;
  background:#2b2e36;color:#fff;box-shadow:none;
}
.sidebar-brand strong{font-size:15px}
.sidebar-brand small{font-size:11px;color:#949aa6}
.sidebar-nav{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  align-content:flex-start;
  flex:0 0 auto;
  gap:7px;
  padding:20px 0;
}
.sidebar-nav a{
  min-height:0;
  padding:12px 14px;
  border:0;
  border-radius:11px;
  color:#b9bdc6;
  font-size:13px;
  font-weight:700;
  transition:background .16s,color .16s;
}
.sidebar-nav a:hover,.sidebar-nav a.active{
  background:#2b2e36;
  color:#fff;
  border:0;
  box-shadow:none;
  transform:none;
}
.nav-icon{
  width:28px;height:28px;
  border-radius:8px;
  background:rgba(255,255,255,.07)!important;
  color:inherit!important;
  font-size:14px;
}
.sidebar-nav a.active .nav-icon{background:rgba(255,255,255,.10)!important;color:#fff!important}
.sidebar-footer{margin-top:auto;padding-top:16px}
.user-mini{padding:7px}
.user-mini>span{width:38px;height:38px;border-radius:12px;background:#30343e}
.logout-link{background:rgba(255,255,255,.05);border-radius:10px;font-size:12px;margin-top:8px}

@media(max-width:1100px){
  .admin-shell{grid-template-columns:1fr}
  .sidebar{width:270px}
}
@media(max-width:680px){
  .sidebar{width:min(86vw,300px)}
}
.sidebar{overflow-y:auto;overscroll-behavior:contain}

/* ==========================================================
   v5.5.2 — Arabic typography + legal wording + dashboard polish
   ========================================================== */

body,
button,
input,
textarea,
select,
label,
small,
.notice,
.badge,
.count-pill,
.sidebar-brand small,
.topbar-title span,
.auth-card-head p,
.page-head p,
.panel-kicker{
  font-family:"Cairo","Tahoma","Arial",sans-serif;
}

h1,h2,h3,h4,h5,h6,
.page-head h1,
.panel h2,
.sidebar-brand strong,
.topbar-title strong,
.auth-card-head h1,
.auth-brand strong,
.list-row strong,
.employee-summary strong,
.quick-actions strong,
.panel-heading h2,
.permission-title strong{
  font-family:"Alexandria","Cairo","Tahoma","Arial",sans-serif;
  letter-spacing:-.01em;
}

.auth-brand,
.auth-card-head,
.sidebar-brand{align-items:center}
.auth-brand strong,.sidebar-brand strong{font-size:16px}
.auth-brand small,.sidebar-brand small{font-size:11px}
.brand-mark,.auth-icon{
  font-size:20px;
  line-height:1;
}
.auth-icon{
  background:linear-gradient(145deg,#ffe68a,#efb23e);
  color:#1b1d22;
}
.auth-card-head span:not(.auth-icon){font-size:11px;color:#8f6b11}
.auth-card-head h1{font-size:28px}
.auth-card-head p{font-size:12px;line-height:1.9}
.auth-security{
  font-size:11px;
  line-height:1.9;
  color:#4f5661;
}

.topbar-title span{font-size:10px}
.topbar-title strong{font-size:17px}
.admin-topbar{justify-content:flex-start}

.page-head h1{font-size:29px}
.page-head p{font-size:13px;line-height:1.9;max-width:780px}
.page-head span,.panel-kicker{font-size:11px}

.stats-grid{gap:16px}
.stat{
  display:grid;
  justify-items:center;
  text-align:center;
  gap:12px;
  padding:18px 14px;
  min-height:146px;
}
.stat-icon{
  width:58px;
  height:58px;
  border-radius:16px;
  font-size:24px;
  display:grid;
  place-items:center;
}
.stat div{display:grid;justify-items:center;gap:4px}
.stat strong{font-size:30px}
.stat div>span{font-size:12px;line-height:1.8}
.stats-grid .stat:nth-child(1){background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);border-color:#d6e7ff}
.stats-grid .stat:nth-child(1) .stat-icon{background:#eaf4ff;color:#1f6fd5}
.stats-grid .stat:nth-child(2){background:linear-gradient(180deg,#ffffff 0%,#f6fcfb 100%);border-color:#d7efe7}
.stats-grid .stat:nth-child(2) .stat-icon{background:#e7f8f1;color:#13805f}
.stats-grid .stat:nth-child(3){background:linear-gradient(180deg,#ffffff 0%,#fffaf3 100%);border-color:#f1e0bf}
.stats-grid .stat:nth-child(3) .stat-icon{background:#fff1d9;color:#b47400}
.stats-grid .stat:nth-child(4){background:linear-gradient(180deg,#ffffff 0%,#f8f7ff 100%);border-color:#e2dbff}
.stats-grid .stat:nth-child(4) .stat-icon{background:#ece8ff;color:#6a45d1}

.quick-actions a span,
.nav-icon{font-size:15px}

.status-list b,
.quick-actions strong,
.count-pill,
.badge,
button,
.primary,
.secondary,
.danger,
.logout-link,
.sidebar-nav a{font-weight:800}

@media(max-width:680px){
  .page-head h1{font-size:24px}
  .auth-card-head h1{font-size:24px}
  .stat{min-height:128px;padding:14px 10px}
  .stat strong{font-size:24px}
  .stat div>span{font-size:11px}
}

/* ==========================================================
   v5.5.3 — icon alignment, action cards, login icon and sync note
   ========================================================== */
.brand-mark svg,
.auth-icon svg,
.stat-icon svg,
.quick-icon svg{
  width:1em;
  height:1em;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}

.auth-icon-login{
  background:linear-gradient(145deg,#222936,#343e4e)!important;
  color:#ffd45d!important;
  border:1px solid rgba(255,212,93,.5);
  box-shadow:0 12px 30px rgba(24,29,38,.2)!important;
}
.auth-icon-login svg{width:25px;height:25px;stroke-width:2.05}
.brand-mark-shopping{
  background:linear-gradient(145deg,#f8cf65,#e9a51f)!important;
  color:#20242c!important;
}
.brand-mark-shopping svg{width:23px;height:23px;stroke-width:2}
.auth-card-head>div{min-width:0}
.auth-card-head h1{margin-top:0}

.stat{
  align-content:center;
  justify-content:center;
}
.stat-icon{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  place-items:center!important;
  padding:0!important;
  line-height:0!important;
  flex:none;
}
.stat-icon svg{width:28px;height:28px}
.stat-employees{background:linear-gradient(180deg,#fff 0%,#f4f9ff 100%)!important;border-color:#cfe2ff!important}
.stat-employees .stat-icon{background:#e4f1ff!important;color:#216bd1!important}
.stat-contacts{background:linear-gradient(180deg,#fff 0%,#f2fbf7 100%)!important;border-color:#ceeadd!important}
.stat-contacts .stat-icon{background:#dff6eb!important;color:#087b58!important}
.stat-campaigns{background:linear-gradient(180deg,#fff 0%,#fff8ed 100%)!important;border-color:#f0dbb7!important}
.stat-campaigns .stat-icon{background:#ffedcf!important;color:#aa6800!important}
.stat-consent{background:linear-gradient(180deg,#fff 0%,#f7f4ff 100%)!important;border-color:#ded5ff!important}
.stat-consent .stat-icon{background:#ebe5ff!important;color:#6441c7!important}

.quick-actions{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.quick-actions a.quick-action{
  display:grid;
  grid-template-columns:56px minmax(0,1fr);
  align-items:center;
  gap:13px;
  min-height:88px;
  padding:14px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
}
.quick-actions a.quick-action:hover{transform:translateY(-1px);border-color:#cfd5dc}
.quick-icon{
  width:52px!important;
  height:52px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  place-items:center!important;
  border-radius:14px!important;
  border:0!important;
  line-height:0!important;
  padding:0!important;
}
.quick-icon svg{width:25px;height:25px}
.quick-action-import .quick-icon{background:#e6f3ff!important;color:#236fc9!important}
.quick-action-campaign .quick-icon{background:#fff0d7!important;color:#a96700!important}
.quick-action-whatsapp .quick-icon{background:#ddf6e9!important;color:#07845b!important}
.quick-action-employee .quick-icon{background:#eee8ff!important;color:#6742c7!important}
.quick-actions a>div{min-width:0}
.quick-actions strong{font-size:13px!important;line-height:1.6}
.quick-actions small{font-size:10px!important;line-height:1.8}

.sync-note{margin-top:10px;line-height:1.9}
.range-demo-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}
.range-demo-actions span{font-size:10px;color:var(--muted)}
.range-preview{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  padding:11px;
  margin-bottom:10px;
  border:1px dashed #ccd3dc;
  border-radius:8px;
  background:#fff;
  direction:ltr;
}
.range-preview span{
  display:block;
  padding:7px 9px;
  border-radius:6px;
  background:#f2f4f7;
  color:#313740;
  font:700 11px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;
  text-align:center;
}
.range-preview[hidden]{display:none!important}

@media(max-width:680px){
  .quick-actions{grid-template-columns:1fr}
  .quick-actions a.quick-action{grid-template-columns:52px minmax(0,1fr);min-height:80px}
  .quick-icon{width:48px!important;height:48px!important}
  .range-preview{grid-template-columns:1fr}
}

/* v5.6.0 — hierarchy, account, isolated WhatsApp and bulk contacts */
.nav-icon svg{width:17px;height:17px;display:block;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.sidebar-nav .nav-icon{display:flex!important;align-items:center!important;justify-content:center!important;background:#eee8ff!important;color:#7148d8!important;border:1px solid rgba(113,72,216,.18)}
.sidebar-nav a:hover .nav-icon,.sidebar-nav a.active .nav-icon{background:#eee8ff!important;color:#7148d8!important;box-shadow:0 0 0 3px rgba(113,72,216,.10)}
.user-mini{color:inherit;text-decoration:none}.user-mini:hover{background:rgba(255,255,255,.05);border-radius:11px}
.account-layout{grid-template-columns:repeat(2,minmax(0,1fr))}.account-summary{grid-column:1/-1}.permission-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.permission-tags span{padding:7px 10px;border-radius:999px;background:#f0ecff;color:#6540c5;border:1px solid #e0d7ff;font-size:10px;font-weight:800}
.account-filter-panel{padding:12px 16px;margin-bottom:14px}.account-filter-panel form{display:flex;align-items:center;gap:10px}.account-filter-panel label{min-width:min(100%,340px)}
.bulk-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:11px 12px;background:#f7f8fa;border:1px solid var(--line);border-radius:8px;margin-bottom:10px;position:sticky;top:72px;z-index:8}.bulk-select-all{display:flex;align-items:center;gap:7px;font-size:11px}.bulk-select-all input,.contact-select{width:17px;height:17px;accent-color:#7148d8}.bulk-toolbar>span{font-size:10px;color:var(--muted);font-weight:800}.bulk-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-inline-start:auto}.selectable-row{cursor:pointer;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center}.selectable-row.selected{background:#f4f0ff!important;box-shadow:inset -3px 0 #7148d8}.contact-select{margin:0 2px}
.campaign-details{margin-top:10px;border-top:1px dashed var(--line);padding-top:8px}.campaign-details summary{cursor:pointer;font-size:10px;font-weight:800;color:#5f6570}.campaign-details p{white-space:normal;font-size:11px;line-height:1.9;background:#f7f8fa;border:1px solid var(--line);padding:10px;border-radius:7px}.campaign-details small{color:var(--muted);font-size:9px}
.message-audit-panel{margin-top:18px}.message-log-list{display:grid;gap:8px;max-height:620px;overflow:auto}.message-log-row{border:1px solid var(--line);border-radius:9px;padding:11px 13px;background:#fff}.message-log-row.inbound{border-right:4px solid #1a9b72;background:#f6fcfa}.message-log-row.outbound{border-right:4px solid #7148d8;background:#faf8ff}.message-log-row strong,.message-log-row small{display:block}.message-log-row strong{font-size:11px}.message-log-row small{font-size:9px;color:var(--muted);direction:ltr;text-align:right}.message-log-row p{margin:8px 0 0;font-size:11px;line-height:1.8;white-space:normal}
@media(max-width:900px){.account-layout{grid-template-columns:1fr}.account-summary{grid-column:auto}}
@media(max-width:680px){.bulk-toolbar{top:65px;align-items:stretch}.bulk-actions{width:100%;margin:0}.bulk-actions button{flex:1}.selectable-row{grid-template-columns:auto minmax(0,1fr);gap:8px}.selectable-row>.badge{grid-column:2}}

/* v5.6.9 — message tracking references */
.tracking-notice{margin-top:2px;border-right:4px solid #7148d8;background:#faf8ff;color:#4a3b77}
.message-log-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}
.tracking-reference-badge{display:inline-flex;align-items:center;justify-content:center;padding:5px 9px;border:1px solid #dcd3fb;border-radius:999px;background:#f2efff;color:#5b3db3;font-family:"Cairo","Tahoma",sans-serif;font-size:9px;font-weight:800;direction:ltr;white-space:nowrap}
@media(max-width:680px){.message-log-head{display:grid}.tracking-reference-badge{justify-self:start}}

/* ==========================================================
   v5.7.0 — multi-supervisor hierarchy and audit refinements
   ========================================================== */
.supervisor-box{border:1px solid var(--line);border-radius:12px;padding:14px;background:#f8f9fb;display:grid;gap:11px}
.supervisor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.supervisor-option{display:flex;align-items:flex-start;gap:9px;padding:10px;border:1px solid #e2e6ec;border-radius:9px;background:#fff;cursor:pointer}
.supervisor-option input{width:auto;margin-top:4px}
.supervisor-option span,.supervisor-option b,.supervisor-option small{display:block}
.supervisor-option b{font-size:11px;color:#303640}
.supervisor-option small{font-size:9px;color:var(--muted);direction:ltr;text-align:right}
.compact-supervisors{margin-top:12px}
.supervisor-summary{margin-top:4px;color:#6d5db5!important;white-space:normal!important}
.campaign-stats{gap:12px}
.campaign-stats span{white-space:nowrap}
.message-audit-panel{grid-column:1/-1}
@media(max-width:680px){.supervisor-grid{grid-template-columns:1fr}.supervisor-option{padding:9px}}

/* v5.7.1 — WhatsApp full-history sync and phone normalisation controls */
.whatsapp-sync-actions{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.whatsapp-sync-actions form{display:inline-flex;margin:0}
.whatsapp-sync-actions button{min-height:40px}
label small{display:block;color:var(--muted);font-weight:600;line-height:1.75;margin-top:2px}
@media(max-width:680px){.whatsapp-sync-actions,.whatsapp-sync-actions form,.whatsapp-sync-actions button{width:100%}}
