/* MIZA Activation Center — shared design system
   Plain CSS, no build step required (safe for shared hosting). */

:root{
  --bg:#eef1f8;
  --surface:#ffffff;
  --surface-2:#f5f7fb;
  --border:#e6eaf3;
  --text:#16213a;
  --text-muted:#76809a;
  --primary:#0b63ce;
  --primary-dark:#063f8c;
  --primary-light:#e8f2ff;
  --accent:#16a34a;
  --accent-light:#e7f8ee;
  --danger:#dc2626;
  --danger-light:#fdeaea;
  --warning:#d97706;
  --warning-light:#fdf1dd;
  --purple:#7c3aed;
  --purple-light:#f1eafe;
  --radius-lg:20px;
  --radius-md:14px;
  --radius-sm:11px;
  --shadow-sm:0 2px 10px rgba(20,35,70,.05);
  --shadow-md:0 12px 32px rgba(20,35,70,.09);
  --sidebar-w:270px;
  --navy-1:#0b1533;
  --navy-2:#132a63;
  color-scheme:light;
}
:root[data-theme="dark"]{
  --bg:#0a1120;
  --surface:#121b2e;
  --surface-2:#16213a;
  --border:#243359;
  --text:#e8edf7;
  --text-muted:#8d9ab8;
  --primary:#4c8dff;
  --primary-dark:#2f66d0;
  --primary-light:#132544;
  --accent:#34d17c;
  --accent-light:#0f2a1c;
  --danger:#f87171;
  --danger-light:#3a1a1a;
  --warning:#fbbf24;
  --warning-light:#3a2c0f;
  --purple:#a78bfa;
  --purple-light:#241a3f;
  --shadow-sm:0 2px 10px rgba(0,0,0,.35);
  --shadow-md:0 14px 34px rgba(0,0,0,.5);
  --navy-1:#070c1c;
  --navy-2:#0d1a3d;
  color-scheme:dark;
}

*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Cairo','Tahoma',Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  transition:background .2s ease,color .2s ease;
}
a{color:inherit}
button{font-family:inherit}
::selection{background:var(--primary);color:#fff}
svg{display:block}

/* ---------- App shell ---------- */
.shell{display:flex;min-height:100vh}

.side{
  width:var(--sidebar-w);
  flex-shrink:0;
  background:
    radial-gradient(420px 320px at 85% 100%, rgba(255,255,255,.05), transparent 60%),
    linear-gradient(175deg,var(--navy-2),var(--navy-1) 75%);
  color:#fff;
  padding:22px 18px 26px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  z-index:20;
}
.side .brand{
  display:flex;
  align-items:center;
  gap:12px;
  background:#fff;
  color:var(--navy-1);
  border-radius:var(--radius-md);
  padding:12px 14px;
  box-shadow:var(--shadow-sm);
}
.side .brand img{width:40px;height:40px;border-radius:9px;object-fit:contain;display:block;flex-shrink:0}
.side .brand .name{font-size:15px;font-weight:900;line-height:1.3}
.side .brand .name b{color:var(--primary)}
.side .brand .name small{display:block;font-size:10.5px;font-weight:700;color:#76809a;margin-top:1px}

.nav{display:flex;flex-direction:column;gap:6px;margin-top:22px}
.nav a{
  display:flex;align-items:center;gap:12px;
  color:#c4cde6;text-decoration:none;
  padding:13px 16px;border-radius:13px;
  font-size:14.5px;font-weight:700;
  transition:background .15s ease,color .15s ease;
}
.nav a svg{flex-shrink:0;width:19px;height:19px}
.nav a:hover{background:rgba(255,255,255,.08);color:#fff}
.nav a.active{background:linear-gradient(135deg,var(--primary),#2b7bdb);color:#fff;box-shadow:0 8px 20px rgba(11,99,206,.35)}

.side .deco{
  flex:1;min-height:40px;position:relative;
  display:flex;align-items:center;justify-content:center;
  opacity:.08;margin:6px 0;
}
.side .deco svg{width:180px;height:180px}

.side .foot{text-align:center;color:#8b96b8;position:relative;z-index:1}
.side .foot .tag{font-size:12px;font-weight:700;color:#c4cde6;margin-bottom:12px}
.side .foot .rule{width:46px;height:3px;background:var(--primary);border-radius:99px;margin:0 auto 12px}
.side .foot .app{font-size:13px;font-weight:900;color:#fff}
.side .foot .ver{font-size:11px;color:#8b96b8;margin:2px 0 10px}
.side .foot .copy{font-size:10.5px;color:#69759a;border-top:1px solid rgba(255,255,255,.08);padding-top:10px}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.content{padding:22px 26px 30px;max-width:1400px;width:100%;margin:0 auto}

/* ---------- Topbar ---------- */
.menu-btn{display:none}
.topbar-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:18px 26px 0}
.topbar-row + .topbar-row{padding-top:16px}

.profile-chip{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:99px;padding:6px 8px 6px 14px;box-shadow:var(--shadow-sm)}
.profile-chip .avatar{width:38px;height:38px;border-radius:50%;background:var(--primary-light);color:var(--primary);display:grid;place-items:center;flex-shrink:0}
.profile-chip .avatar svg{width:19px;height:19px}
.profile-chip .who b{display:block;font-size:13.5px;font-weight:800;line-height:1.25}
.profile-chip .who span{display:block;font-size:11px;color:var(--text-muted);font-weight:600}
.profile-chip svg.chev{width:14px;height:14px;color:var(--text-muted);margin-inline-start:2px}

.icon-btn{
  width:42px;height:42px;border-radius:12px;border:1px solid var(--border);
  background:var(--surface);display:grid;place-items:center;cursor:pointer;color:var(--text);
  position:relative;box-shadow:var(--shadow-sm);flex-shrink:0;
}
.icon-btn svg{width:18px;height:18px}
.icon-btn .dot{position:absolute;top:8px;left:9px;width:8px;height:8px;border-radius:50%;background:var(--danger);border:2px solid var(--surface)}
.utility-group{display:flex;align-items:center;gap:10px}

.datetime{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:99px;padding:9px 16px;box-shadow:var(--shadow-sm);font-size:13px;font-weight:700;color:var(--text-muted)}
.datetime svg{width:16px;height:16px;color:var(--primary)}
.datetime b{color:var(--text);font-weight:800}

.theme-toggle{width:42px;height:42px;border-radius:12px;border:1px solid var(--border);background:var(--surface);display:grid;place-items:center;cursor:pointer;color:var(--text);box-shadow:var(--shadow-sm)}
.theme-toggle svg{width:18px;height:18px}
.theme-toggle .sun{display:none}
:root[data-theme="dark"] .theme-toggle .moon{display:none}
:root[data-theme="dark"] .theme-toggle .sun{display:block}

.page-head{display:flex;align-items:flex-start}
.page-head .wave{font-size:14px;font-weight:700;color:var(--text-muted);display:flex;align-items:center;gap:6px;margin-bottom:2px}
.page-head .heading{font-size:22px;font-weight:900}
.page-head .sub{font-size:13px;color:var(--text-muted);margin-top:4px;font-weight:600}

.breadcrumb{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--text-muted);font-weight:700;margin-bottom:4px}
.breadcrumb svg{width:14px;height:14px}
.breadcrumb .sep{opacity:.5}
.breadcrumb .current{color:var(--primary)}

/* ---------- Buttons ---------- */
.btn{
  border:1px solid transparent;border-radius:var(--radius-sm);
  padding:11px 18px;cursor:pointer;font-weight:700;font-size:14px;
  font-family:inherit;display:inline-flex;align-items:center;gap:8px;
  background:var(--surface-2);color:var(--text);
  transition:filter .15s ease,transform .05s ease;
  white-space:nowrap;
}
.btn:hover{filter:brightness(.97)}
.btn:active{transform:translateY(1px)}
.btn svg{width:16px;height:16px;flex-shrink:0}
.btn-primary{background:linear-gradient(135deg,var(--primary),#2b7bdb);border-color:transparent;color:#fff;box-shadow:0 8px 18px rgba(11,99,206,.28)}
.btn-primary:hover{filter:brightness(1.06)}
.btn-danger{background:var(--danger-light);color:var(--danger)}
.btn-ghost{background:transparent;border-color:var(--border)}
.btn-outline{background:var(--surface);border-color:var(--border)}
.btn-icon{padding:10px;border-radius:11px}
.btn-sm{padding:8px 12px;font-size:13px;border-radius:9px}
.btn-block{width:100%;justify-content:center}

/* ---------- Cards ---------- */
.card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius-lg);padding:22px;box-shadow:var(--shadow-sm);
}
.card + .card{margin-top:18px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.card-head h3{margin:0;font-size:16px;font-weight:800;display:flex;align-items:center;gap:9px}
.card-head h3 svg{width:19px;height:19px;color:var(--primary)}
.card p.hint{margin:-8px 0 16px;color:var(--text-muted);font-size:13px}

.alert{
  display:flex;align-items:center;gap:10px;
  border-radius:var(--radius-md);padding:14px 16px;margin-bottom:18px;font-weight:600;font-size:14px;
}
.alert svg{width:18px;height:18px;flex-shrink:0}
.alert-success{background:var(--accent-light);color:var(--accent)}
.alert-error{background:var(--danger-light);color:var(--danger)}

/* ---------- Banner / hero ---------- */
.hero{
  display:flex;align-items:center;gap:20px;
  background:linear-gradient(120deg,var(--primary-light),transparent 65%);
  border:1px solid var(--border);border-radius:var(--radius-lg);
  padding:20px 22px;margin-bottom:18px;
}
.hero .art{width:76px;height:76px;flex-shrink:0;border-radius:20px;background:var(--surface);display:grid;place-items:center;box-shadow:var(--shadow-sm);color:var(--primary)}
.hero .art svg{width:38px;height:38px}
.hero h3{margin:0 0 4px;font-size:17px;font-weight:900;display:flex;align-items:center;gap:8px}
.hero p{margin:0;color:var(--text-muted);font-size:13.5px;font-weight:600}

/* ---------- Stat cards ---------- */
.grid-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.stat{display:flex;flex-direction:column;gap:6px}
.stat .top{display:flex;align-items:center;justify-content:space-between}
.stat .icon{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;flex-shrink:0}
.stat .icon svg{width:23px;height:23px}
.stat b{font-size:30px;font-weight:900;line-height:1;margin-top:2px}
.stat .label{color:var(--text-muted);font-size:13.5px;font-weight:700}
.stat .more{display:flex;align-items:center;gap:4px;font-size:12.5px;font-weight:700;color:var(--primary);text-decoration:none;margin-top:8px;padding-top:10px;border-top:1px dashed var(--border)}
.stat .more svg{width:13px;height:13px}
.stat.c-blue .icon{background:var(--primary-light);color:var(--primary)}
.stat.c-green .icon{background:var(--accent-light);color:var(--accent)}
.stat.c-red .icon{background:var(--danger-light);color:var(--danger)}
.stat.c-amber .icon{background:var(--warning-light);color:var(--warning)}
.stat.c-purple .icon{background:var(--purple-light);color:var(--purple)}

/* ---------- Forms ---------- */
label{font-size:13px;font-weight:700;display:block;margin-bottom:6px;color:var(--text)}
.field-icon{position:relative}
.field-icon svg{position:absolute;top:50%;transform:translateY(-50%);inset-inline-start:14px;width:17px;height:17px;color:var(--text-muted);pointer-events:none}
.field-icon .field{padding-inline-start:40px}
.field,input.field,select.field{
  width:100%;padding:12px 13px;border:1.5px solid var(--border);border-radius:var(--radius-sm);
  background:var(--surface);color:var(--text);font-family:inherit;font-size:14.5px;
  outline:none;transition:border-color .15s ease,box-shadow .15s ease;
}
.field:focus{border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-light)}
.field::placeholder{color:var(--text-muted)}
.form-row{margin-bottom:2px}
.formgrid{display:grid;grid-template-columns:1.6fr 1.6fr 1fr 1.2fr auto;gap:14px;align-items:end}

/* ---------- Toolbar ---------- */
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.toolbar .search{position:relative;flex:1;min-width:200px}
.toolbar .search svg{position:absolute;top:50%;transform:translateY(-50%);inset-inline-start:14px;width:17px;height:17px;color:var(--text-muted)}
.toolbar .search input{padding-inline-start:40px}

/* ---------- Table ---------- */
.table-wrap{overflow-x:auto;border-radius:var(--radius-md)}
.table{width:100%;border-collapse:collapse;min-width:680px}
.table th{
  text-align:right;font-size:12.5px;
  color:var(--text-muted);font-weight:700;padding:12px 14px;border-bottom:2px solid var(--border);
  white-space:nowrap;
}
.table th .th-in{display:inline-flex;align-items:center;gap:6px}
.table th svg{width:14px;height:14px;opacity:.7}
.table td{padding:14px;border-bottom:1px solid var(--border);font-size:14px;vertical-align:middle}
.table tr:last-child td{border-bottom:none}
.table tr:hover td{background:var(--surface-2)}
.mono{direction:ltr;text-align:right;font-family:'Cairo',ui-monospace,Consolas,monospace;font-weight:700;letter-spacing:.02em}
.muted{color:var(--text-muted)}

.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;border-radius:99px;font-size:12.5px;font-weight:700;
}
.badge svg{width:12px;height:12px}
.badge-on{background:var(--accent-light);color:var(--accent)}
.badge-off{background:var(--danger-light);color:var(--danger)}
.badge-info{background:var(--primary-light);color:var(--primary)}

.row-actions{display:flex;gap:8px;flex-wrap:wrap}
.pagination-wrap{margin-top:18px;display:flex;justify-content:center}
.pagination-wrap nav{width:100%}

/* ---------- Empty state ---------- */
.empty-state{display:flex;flex-direction:column;align-items:center;text-align:center;padding:40px 20px 34px}
.empty-state svg{width:150px;height:auto;margin-bottom:14px}
.empty-state h4{margin:0 0 6px;font-size:15.5px;font-weight:800}
.empty-state p{margin:0 0 18px;color:var(--text-muted);font-size:13.5px;font-weight:600}

/* ---------- Responsive ---------- */
@media(max-width:980px){
  .grid-stats{grid-template-columns:1fr 1fr}
  .formgrid{grid-template-columns:1fr 1fr}
  .formgrid .btn{grid-column:1/-1}
}
@media(max-width:760px){
  .side{
    position:fixed;right:0;top:0;transform:translateX(100%);
    box-shadow:var(--shadow-md);transition:transform .2s ease;height:100vh;
  }
  .side.open{transform:translateX(0)}
  .menu-btn{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;border:1px solid var(--border);background:var(--surface);cursor:pointer;color:var(--text);box-shadow:var(--shadow-sm)}
  .menu-btn svg{width:20px;height:20px}
  .content{padding:16px}
  .topbar-row{padding:14px 14px 0}
  .grid-stats{grid-template-columns:1fr}
  .formgrid{grid-template-columns:1fr}
  .hero{flex-direction:column;text-align:center}
  .datetime{display:none}
  .backdrop{position:fixed;inset:0;background:rgba(10,15,30,.45);z-index:15;opacity:0;pointer-events:none;transition:opacity .2s ease}
  .backdrop.show{opacity:1;pointer-events:auto}
}
@media(min-width:761px){.backdrop{display:none}}

/* PATCH 2026-09-17 — final MIZA 3-screen visual pass */
body{background:linear-gradient(135deg,#f8fbff 0%,var(--bg) 55%,#eef6ff 100%)}
.side{background:linear-gradient(180deg,#0758b9 0%,#063d83 58%,#052f67 100%);box-shadow:-10px 0 35px rgba(4,48,105,.12)}
.side .brand{background:transparent;color:#fff;box-shadow:none;justify-content:center;flex-direction:column;text-align:center;padding:4px 8px 18px;border-bottom:1px solid rgba(255,255,255,.14);border-radius:0}
.side .brand img{width:88px;height:72px;border-radius:0;background:transparent;padding:0;object-fit:contain}
.side .brand .name{font-size:20px;color:#fff}.side .brand .name b{color:#27b7ff}.side .brand .name small{color:#fff;font-size:12px}
.nav a{padding:14px 16px}.nav a.active{background:linear-gradient(135deg,#158df3,#0871df);box-shadow:0 10px 24px rgba(0,0,0,.18)}
.content{max-width:none;padding:22px 30px 34px}.topbar-row{padding-inline:30px}
.card{border-color:#e1ebf7;box-shadow:0 10px 30px rgba(31,82,143,.07)}
.grid-stats .card{min-height:154px}.stat .icon{width:54px;height:54px;border-radius:50%}.stat b{font-size:32px}
.hero{background:linear-gradient(100deg,#edf7ff,#fff);box-shadow:0 8px 26px rgba(31,82,143,.06)}
.table-wrap{border-radius:16px;overflow:hidden}.data-table thead th{background:#f4f8fd}
.empty-state{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center}
@media(max-width:900px){.content{padding:16px}.topbar-row{padding-inline:16px}}
