*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#020617;
  --surface:#0b1120;
  --surface2:#111827;
  --border:#1e293b;
  --border2:#263147;
  --blue:#3b82f6;
  --blue-dim:#1d4ed8;
  --blue-glow:rgba(59,130,246,0.18);
  --green:#22c55e;
  --green-dim:rgba(34,197,94,0.12);
  --yellow:#f59e0b;
  --yellow-dim:rgba(245,158,11,0.12);
  --red:#ef4444;
  --red-dim:rgba(239,68,68,0.12);
  --text:#f0f6ff;
  --text2:#cbd5e1;
  --muted:#64748b;
  --sidebar-w:240px;
  --topbar-h:60px;
  --radius:12px;
  --radius-sm:8px;
}

html{scroll-behavior:smooth}
body{background:var(--bg);color:var(--text);font-family:'Segoe UI',system-ui,-apple-system,sans-serif;min-height:100vh;line-height:1.5;-webkit-font-smoothing:antialiased}
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden}
.icon{width:1em;height:1em;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;flex-shrink:0}

/* ── SCROLLBAR ── */
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:var(--border2);border-radius:3px}

/* ──────────────────────────────────────
   LOGIN
────────────────────────────────────── */
#screen-login{
  display:flex;align-items:center;justify-content:center;
  min-height:100vh;padding:20px;
  background:radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.12) 0%, transparent 70%);
}
.login-wrap{width:100%;max-width:400px}
.login-card{
  background:var(--surface);border:1px solid var(--border2);border-radius:16px;
  padding:40px 36px;
  box-shadow:0 0 0 1px rgba(59,130,246,0.06), 0 24px 48px rgba(0,0,0,0.5);
}
.login-logo{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.login-logo-icon{
  width:38px;height:38px;border-radius:10px;
  background:linear-gradient(135deg,#1d4ed8,#3b82f6);
  display:flex;align-items:center;justify-content:center;font-size:1.1rem;
  box-shadow:0 4px 12px rgba(59,130,246,0.4);
}
.login-logo-icon .icon{width:18px;height:18px}
.login-logo-name{font-size:1.2rem;font-weight:800;color:var(--text);letter-spacing:-0.02em}
.login-logo-name span{color:var(--blue)}
.login-sub{font-size:0.82rem;color:var(--muted);margin-bottom:30px;padding-left:48px}
.login-divider{height:1px;background:var(--border);margin:0 -36px 28px}

/* ── FORM ELEMENTS ── */
.fg{margin-bottom:18px}
.fg label{display:block;font-size:0.75rem;font-weight:600;color:var(--muted);margin-bottom:7px;text-transform:uppercase;letter-spacing:.05em}
.fg input,.fg select,.fg textarea{
  width:100%;background:var(--bg);border:1px solid var(--border2);border-radius:var(--radius-sm);
  color:var(--text);padding:11px 14px;font-size:0.9rem;outline:none;
  transition:border-color .2s,box-shadow .2s;font-family:inherit;
}
.fg input:focus,.fg select:focus,.fg textarea:focus{
  border-color:var(--blue);box-shadow:0 0 0 3px rgba(59,130,246,0.15);
}
.fg select{cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}
.fg textarea{resize:vertical;min-height:90px;line-height:1.5}
.fg-hint{font-size:0.74rem;color:var(--muted);margin-top:5px}
.fg-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.input-with-action{position:relative}
.input-with-action input{padding-right:46px}
.password-toggle{
  position:absolute;top:50%;right:8px;transform:translateY(-50%);
  width:32px;height:32px;border:none;border-radius:8px;background:transparent;color:var(--muted);
  display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .18s,color .18s;
}
.password-toggle:hover{background:rgba(255,255,255,0.05);color:var(--text)}
.password-toggle:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
.password-toggle .icon{width:16px;height:16px}

/* ── BUTTONS ── */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  padding:10px 20px;border-radius:var(--radius-sm);border:none;cursor:pointer;
  font-size:0.875rem;font-weight:600;transition:all .18s;line-height:1;white-space:nowrap;
  font-family:inherit;
}
.btn:active{transform:scale(0.98)}
.btn .icon{width:15px;height:15px}
.btn-primary{background:var(--blue);color:#fff;box-shadow:0 2px 8px rgba(59,130,246,0.35)}
.btn-primary:hover{background:var(--blue-dim);box-shadow:0 4px 14px rgba(59,130,246,0.45)}
.btn-success{background:var(--green);color:#fff;box-shadow:0 2px 8px rgba(34,197,94,0.25)}
.btn-success:hover{filter:brightness(1.1)}
.btn-warning{background:var(--yellow);color:#000;box-shadow:0 2px 8px rgba(245,158,11,0.25)}
.btn-warning:hover{filter:brightness(1.08)}
.btn-danger{background:var(--red);color:#fff}
.btn-danger:hover{filter:brightness(1.1)}
.btn-ghost{background:var(--surface2);color:var(--text2);border:1px solid var(--border2)}
.btn-ghost:hover{background:var(--border2);color:var(--text)}
.btn-outline{background:transparent;color:var(--blue);border:1px solid var(--blue)}
.btn-outline:hover{background:var(--blue-glow)}
.btn-sm{padding:7px 14px;font-size:0.8rem}
.btn-xs{padding:5px 10px;font-size:0.75rem}
.btn-full{width:100%}
.btn-icon{width:36px;height:36px;padding:0;border-radius:8px}

/* ──────────────────────────────────────
   APP LAYOUT
────────────────────────────────────── */
#screen-app{display:none;min-height:100vh}

/* ── SIDEBAR ── */
.sidebar{
  position:fixed;top:0;left:0;width:var(--sidebar-w);height:100vh;
  background:var(--surface);border-right:1px solid var(--border);
  display:flex;flex-direction:column;z-index:200;
  transition:transform .28s cubic-bezier(.4,0,.2,1);
}
.sidebar-brand{
  padding:18px 20px 16px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:10px;
}
.brand-icon{
  width:34px;height:34px;border-radius:9px;
  background:linear-gradient(135deg,#1d4ed8,#3b82f6);
  display:flex;align-items:center;justify-content:center;font-size:1rem;
  box-shadow:0 3px 10px rgba(59,130,246,0.35);flex-shrink:0;
}
.brand-icon .icon{width:16px;height:16px}
.brand-text{}
.brand-name{font-size:0.95rem;font-weight:800;letter-spacing:-0.02em;color:var(--text)}
.brand-tag{font-size:0.67rem;color:var(--muted);margin-top:1px}

.sidebar-nav{flex:1;padding:14px 0;overflow-y:auto}
.nav-section{
  padding:10px 20px 4px;font-size:0.65rem;color:var(--muted);
  text-transform:uppercase;letter-spacing:.1em;font-weight:700;
}
.nav-item{
  display:flex;align-items:center;gap:10px;padding:9px 20px;
  color:var(--muted);font-size:0.855rem;cursor:pointer;
  border-left:2px solid transparent;
  transition:color .15s,border-color .15s,background .15s;
  margin:1px 0;
}
.nav-item:hover{color:var(--text2);background:rgba(255,255,255,0.04)}
.nav-item.active{
  color:var(--blue);border-left-color:var(--blue);
  background:linear-gradient(90deg,rgba(59,130,246,0.1),transparent);
  font-weight:600;
}
.nav-icon{font-size:0.95rem;width:20px;text-align:center;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.nav-icon .icon{width:15px;height:15px}
.nav-label{}

.sidebar-footer{
  padding:16px 20px;border-top:1px solid var(--border);
}
.sidebar-user{display:flex;align-items:center;gap:10px}
.user-avatar{
  width:32px;height:32px;border-radius:8px;
  background:linear-gradient(135deg,#1e3a5f,#2563eb);
  display:flex;align-items:center;justify-content:center;
  font-size:0.8rem;font-weight:700;color:#fff;flex-shrink:0;
}
.user-info{}
.user-name{font-size:0.8rem;font-weight:600;color:var(--text2)}
.user-role{font-size:0.7rem;color:var(--muted)}

/* ── TOPBAR ── */
.topbar{
  position:fixed;top:0;left:var(--sidebar-w);right:0;height:var(--topbar-h);
  background:var(--surface);border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 24px;z-index:100;gap:12px;
  transition:left .28s cubic-bezier(.4,0,.2,1);
}
.topbar-left{display:flex;align-items:center;gap:12px}
.hamburger{
  display:none;background:none;border:none;cursor:pointer;
  padding:6px;border-radius:8px;color:var(--muted);
  flex-direction:column;gap:4px;align-items:center;justify-content:center;
  transition:color .15s;
}
.hamburger:hover{color:var(--text)}
.hamburger span{display:block;width:20px;height:2px;background:currentColor;border-radius:2px;transition:all .2s}
.page-title{font-size:1rem;font-weight:700;color:var(--text)}
.topbar-right{display:flex;align-items:center;gap:8px;flex-shrink:0}
.credit-pill{
  display:flex;align-items:center;gap:6px;
  background:rgba(59,130,246,0.1);border:1px solid rgba(59,130,246,0.25);
  border-radius:20px;padding:5px 12px;
  font-size:0.78rem;font-weight:700;color:var(--blue);
}
.credit-dot{width:6px;height:6px;border-radius:50%;background:var(--blue)}
.role-switcher{
  display:flex;background:var(--bg);border:1px solid var(--border2);
  border-radius:8px;padding:3px;gap:2px;
}
.role-btn{
  padding:5px 12px;border-radius:6px;border:none;
  background:transparent;color:var(--muted);font-size:0.78rem;cursor:pointer;
  font-weight:600;transition:all .15s;font-family:inherit;
}
.role-btn.active{background:var(--blue);color:#fff;box-shadow:0 2px 6px rgba(59,130,246,0.35)}

/* ── MAIN CONTENT ── */
.main-content{
  margin-left:var(--sidebar-w);margin-top:var(--topbar-h);
  padding:28px 28px;
  transition:margin-left .28s cubic-bezier(.4,0,.2,1);
}

/* ── OVERLAY ── */
.sidebar-overlay{
  display:none;position:fixed;inset:0;background:rgba(0,0,0,0.6);z-index:150;
  backdrop-filter:blur(2px);
}
.sidebar-overlay.active{display:block}
.modal-overlay{
  position:fixed;inset:0;z-index:260;background:rgba(2,6,23,0.72);
  display:flex;align-items:center;justify-content:center;padding:24px;
  backdrop-filter:blur(4px);
}
.modal-panel{width:min(720px,100%);max-height:calc(100vh - 48px);overflow:auto}

/* ──────────────────────────────────────
   VIEWS
────────────────────────────────────── */
.view{display:none;animation:fadeIn .2s ease}
.view.active{display:block}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ── SECTION HEADER ── */
.sec-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:24px;gap:12px;flex-wrap:wrap}
.sec-title{font-size:1.25rem;font-weight:800;letter-spacing:-0.02em;color:var(--text)}
.sec-sub{font-size:0.8rem;color:var(--muted);margin-top:3px}

/* ──────────────────────────────────────
   STAT CARDS
────────────────────────────────────── */
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:28px}
.stat-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);
  padding:20px 22px;position:relative;overflow:hidden;
}
.stat-card::before{
  content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:var(--card-accent, var(--blue));
}
.stat-card.green::before{background:var(--green)}
.stat-card.yellow::before{background:var(--yellow)}
.stat-card.red::before{background:var(--red)}
.stat-glow{
  position:absolute;top:-20px;right:-20px;width:80px;height:80px;border-radius:50%;
  background:var(--card-accent,rgba(59,130,246,0.08));filter:blur(20px);
}
.stat-card.green .stat-glow{background:rgba(34,197,94,0.08)}
.stat-card.yellow .stat-glow{background:rgba(245,158,11,0.08)}
.stat-icon{
  width:36px;height:36px;border-radius:9px;display:flex;align-items:center;justify-content:center;
  font-size:1rem;margin-bottom:14px;
  background:rgba(59,130,246,0.12);
}
.stat-icon .icon{width:18px;height:18px}
.stat-card.green .stat-icon{background:rgba(34,197,94,0.12)}
.stat-card.yellow .stat-icon{background:rgba(245,158,11,0.12)}
.stat-label{font-size:0.72rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:600;margin-bottom:6px}
.stat-value{font-size:2.1rem;font-weight:800;letter-spacing:-0.03em;color:var(--text);line-height:1}
.stat-sub{font-size:0.75rem;color:var(--muted);margin-top:6px}

/* ──────────────────────────────────────
   TABLE
────────────────────────────────────── */
.table-card{
  background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;
}
.table-card-header{
  padding:16px 20px;border-bottom:1px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
.table-card-header-wrap{flex-wrap:wrap}
.table-card-title{font-size:0.9rem;font-weight:700;color:var(--text)}
.toolbar-inline{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.toolbar-select{
  min-width:210px;background:var(--bg);border:1px solid var(--border2);border-radius:8px;
  color:var(--text);padding:8px 12px;font-size:0.82rem;outline:none;font-family:inherit;
}
.toolbar-select:focus{border-color:var(--blue);box-shadow:0 0 0 3px rgba(59,130,246,0.15)}
.table-scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;min-width:500px}
thead th{
  background:rgba(255,255,255,0.02);padding:10px 18px;
  text-align:left;font-size:0.7rem;color:var(--muted);
  text-transform:uppercase;letter-spacing:.08em;font-weight:700;
  border-bottom:1px solid var(--border);white-space:nowrap;
}
tbody td{padding:13px 18px;font-size:0.855rem;border-bottom:1px solid rgba(30,41,59,0.4);vertical-align:middle}
tbody tr:last-child td{border-bottom:none}
tbody tr:hover td{background:rgba(255,255,255,0.02)}
.empty-row td{text-align:center;color:var(--muted);padding:36px;font-size:0.85rem}

/* ──────────────────────────────────────
   BADGES
────────────────────────────────────── */
.badge{
  display:inline-flex;align-items:center;gap:5px;
  padding:3px 10px;border-radius:20px;font-size:0.72rem;font-weight:700;
  white-space:nowrap;
}
.badge::before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor}
.badge-green{background:var(--green-dim);color:var(--green)}
.badge-yellow{background:var(--yellow-dim);color:var(--yellow)}
.badge-red{background:var(--red-dim);color:var(--red)}
.badge-blue{background:var(--blue-glow);color:var(--blue)}
.badge-muted{background:rgba(100,116,139,0.12);color:var(--muted)}

/* ──────────────────────────────────────
   ALERTS
────────────────────────────────────── */
.alert{
  border-radius:var(--radius-sm);padding:13px 16px;font-size:0.855rem;
  margin-bottom:18px;display:flex;align-items:flex-start;gap:10px;line-height:1.5;
}
.alert-icon{flex-shrink:0;font-size:1rem;margin-top:1px;display:flex;align-items:center;justify-content:center}
.alert-icon .icon{width:16px;height:16px}
.alert-warning{background:var(--yellow-dim);border:1px solid rgba(245,158,11,0.25);color:#fbbf24}
.alert-success{background:var(--green-dim);border:1px solid rgba(34,197,94,0.25);color:#4ade80}
.alert-info{background:var(--blue-glow);border:1px solid rgba(59,130,246,0.25);color:#93c5fd}
.alert-error{background:var(--red-dim);border:1px solid rgba(239,68,68,0.25);color:#f87171}

/* ──────────────────────────────────────
   PANELS / FORM CARDS
────────────────────────────────────── */
.panel{
  background:var(--surface);border:1px solid var(--border);
  border-radius:var(--radius);padding:24px;margin-bottom:20px;
}
.panel-title{
  font-size:0.9rem;font-weight:700;color:var(--text);
  margin-bottom:20px;display:flex;align-items:center;gap:8px;
}
.panel-title-icon{
  width:28px;height:28px;border-radius:7px;background:var(--blue-glow);
  display:flex;align-items:center;justify-content:center;font-size:0.8rem;
}
.panel-title-icon .icon{width:14px;height:14px}

/* ──────────────────────────────────────
   CREDIT RULE BOX
────────────────────────────────────── */
.rule-box{
  background:linear-gradient(135deg,rgba(59,130,246,0.06),rgba(59,130,246,0.02));
  border:1px solid rgba(59,130,246,0.2);border-radius:var(--radius);
  padding:18px 20px;margin-bottom:22px;font-size:0.845rem;color:#93c5fd;line-height:1.6;
}
.rule-box strong{color:var(--blue)}
.rule-box .icon{width:15px;height:15px;margin-right:4px}

/* ──────────────────────────────────────
   XCLOUD STATUS BAR
────────────────────────────────────── */
.xcloud-bar{
  display:flex;align-items:center;gap:10px;
  background:var(--bg);border:1px solid var(--border2);border-radius:var(--radius-sm);
  padding:12px 16px;margin-top:16px;
}
.xdot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.xdot.connected{background:var(--green);box-shadow:0 0 8px var(--green)}
.xdot.not-tested{background:var(--yellow)}
.xdot.not-configured{background:var(--muted)}
.xbar-label{font-size:0.8rem;font-weight:700}
.xbar-date{font-size:0.75rem;color:var(--muted);margin-left:auto}

/* ──────────────────────────────────────
   DEVICE KEY
────────────────────────────────────── */
.key-preview{
  background:var(--bg);border:1px solid var(--border2);border-radius:var(--radius-sm);
  padding:10px 14px;font-family:'Courier New',monospace;font-size:1.2rem;
  letter-spacing:.18em;color:var(--blue);margin-top:8px;min-height:42px;
  font-weight:700;
}

/* ──────────────────────────────────────
   PROGRESS STEPS
────────────────────────────────────── */
.steps-wrap{margin-top:4px}
.step-row{
  display:flex;align-items:center;gap:12px;padding:11px 0;
  border-bottom:1px solid rgba(30,41,59,0.4);
}
.step-row:last-child{border-bottom:none}
.step-ring{
  width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  font-size:0.65rem;font-weight:700;flex-shrink:0;border:2px solid;
}
.step-ring.pending{border-color:var(--border2);color:var(--muted)}
.step-ring.running{border-color:var(--yellow);color:var(--yellow);animation:spin-ring 2s linear infinite}
.step-ring.done{border-color:var(--green);background:var(--green-dim);color:var(--green)}
.step-ring .icon{width:12px;height:12px}
.step-text{font-size:0.845rem;color:var(--text2)}
.step-text.running{color:var(--yellow)}
.step-text.done{color:var(--text2)}
@keyframes spin-ring{0%,100%{opacity:1}50%{opacity:.5}}
@keyframes pulse-dot{0%,100%{transform:scale(1)}50%{transform:scale(1.4)}}

/* ──────────────────────────────────────
   BLOCKED PANEL
────────────────────────────────────── */
.blocked-wrap{
  text-align:center;padding:56px 24px;
}
.blocked-ring{
  width:80px;height:80px;border-radius:50%;
  background:rgba(245,158,11,0.1);border:2px solid rgba(245,158,11,0.3);
  display:flex;align-items:center;justify-content:center;font-size:2rem;
  margin:0 auto 20px;
}
.blocked-ring .icon{width:30px;height:30px}
.blocked-title{font-size:1.1rem;font-weight:800;color:var(--yellow);margin-bottom:8px}
.blocked-desc{font-size:0.855rem;color:var(--muted);margin-bottom:28px;max-width:360px;margin-left:auto;margin-right:auto;line-height:1.6}

/* ──────────────────────────────────────
   ACCOUNT CARD
────────────────────────────────────── */
.account-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-bottom:24px}
.account-item .acc-label{font-size:0.7rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:700;margin-bottom:6px}
.account-item .acc-val{font-size:1rem;font-weight:600;color:var(--text)}
.account-validity{color:var(--green);font-size:1.05rem}

/* ──────────────────────────────────────
   FRANCHISES
────────────────────────────────────── */
.franchise-stats-grid{grid-template-columns:repeat(4,1fr)}
.franchise-preview-box{display:flex;align-items:center;gap:8px}
.table-subline{font-size:0.74rem;color:var(--muted);margin-top:4px}
.manage-franchise-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.manage-franchise-title{font-size:1rem;font-weight:800;color:var(--text)}
.manage-franchise-sub{font-size:0.78rem;color:var(--muted);margin-top:3px}
.segmented-control{
  display:flex;gap:6px;flex-wrap:wrap;background:var(--bg);border:1px solid var(--border2);
  border-radius:10px;padding:4px;margin-bottom:20px
}
.segmented-btn{
  border:none;background:transparent;color:var(--muted);padding:8px 14px;border-radius:8px;
  font-size:0.82rem;font-weight:700;cursor:pointer;font-family:inherit
}
.segmented-btn.active{background:var(--blue);color:#fff;box-shadow:0 2px 8px rgba(59,130,246,0.35)}
.franchise-tab{display:none}
.franchise-tab.active{display:block}
.dns-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}
.mini-stat{
  background:var(--bg);border:1px solid var(--border2);border-radius:10px;padding:14px 16px;
  display:flex;flex-direction:column;gap:6px
}
.mini-stat span{font-size:0.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700}
.mini-stat strong{font-size:1.2rem;color:var(--text)}
.panel-nested{margin-bottom:18px;background:rgba(2,6,23,0.45)}
.table-card-nested{background:rgba(2,6,23,0.45)}

/* ──────────────────────────────────────
   PUBLIC FRANCHISE
────────────────────────────────────── */
.public-body{
  min-height:100vh;
  background:radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.12) 0%, transparent 70%),var(--bg)
}
.public-wrap{
  min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px
}
.public-card{
  width:min(100%,760px);background:var(--surface);border:1px solid var(--border2);border-radius:16px;
  padding:28px;box-shadow:0 24px 48px rgba(0,0,0,0.45)
}
.public-brand{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.public-header{margin-bottom:16px}
.panel-public{background:rgba(2,6,23,0.5)}
.public-validation-list{display:grid;gap:8px;font-size:0.84rem;color:var(--text2)}

/* ──────────────────────────────────────
   MISC
────────────────────────────────────── */
.divider{border:none;border-top:1px solid var(--border);margin:22px 0}
.hidden{display:none!important}
.text-muted{color:var(--muted)}
.text-sm{font-size:0.8rem}
.monospace{font-family:'Courier New',monospace;letter-spacing:.06em}
.login-hint{font-size:0.74rem;color:var(--muted);text-align:center;margin-top:16px}
.flex-1{flex:1}
.field-compact{max-width:300px}
.field-password{max-width:280px}
.stats-grid-compact{max-width:500px}
.stat-value-date{font-size:1.3rem}
.input-uppercase{text-transform:uppercase}
.cell-truncate{max-width:180px;overflow:hidden;text-overflow:ellipsis}
.transaction-qty{font-weight:800}
.transaction-qty-positive{color:var(--green)}
.transaction-qty-negative{color:var(--red)}
.device-key-cell{font-weight:700;color:var(--blue)}
.alert-action{margin-left:10px}
.gap-8{gap:8px}
.flex-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ml-auto{margin-left:auto}
.mt-4{margin-top:4px}
.mt-8{margin-top:8px}
.mt-14{margin-top:14px}
.mb-0{margin-bottom:0}
.mb-24{margin-bottom:24px}

/* ──────────────────────────────────────
   TOAST
────────────────────────────────────── */
.toast-container{position:fixed;bottom:24px;right:24px;z-index:9999;display:flex;flex-direction:column;gap:8px}
.toast{
  background:var(--surface2);border:1px solid var(--border2);border-radius:10px;
  padding:13px 18px;font-size:0.845rem;color:var(--text);
  box-shadow:0 8px 24px rgba(0,0,0,0.4);display:flex;align-items:center;gap:10px;
  animation:toastIn .25s ease;min-width:260px;max-width:360px;
}
.toast .icon{width:16px;height:16px}
@keyframes toastIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.toast.success{border-color:rgba(34,197,94,0.3);background:rgba(34,197,94,0.08)}
.toast.error{border-color:rgba(239,68,68,0.3);background:rgba(239,68,68,0.08)}
.toast.info{border-color:rgba(59,130,246,0.3);background:rgba(59,130,246,0.08)}

/* ──────────────────────────────────────
   MOBILE RESPONSIVE
────────────────────────────────────── */
@media(max-width:900px){
  :root{--sidebar-w:240px}
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}
  .topbar{left:0}
  .main-content{margin-left:0}
  .hamburger{display:flex}
  .stats-grid{grid-template-columns:1fr 1fr}
  .franchise-stats-grid{grid-template-columns:1fr 1fr}
  .fg-row{grid-template-columns:1fr}
  .account-grid{grid-template-columns:1fr 1fr}
  .dns-summary-grid{grid-template-columns:1fr}
}
@media(max-width:600px){
  .stats-grid{grid-template-columns:1fr}
  .main-content{padding:20px 16px}
  .topbar{padding:0 16px}
  .panel{padding:18px 16px}
  .table-card-header{padding:14px 16px}
  thead th{padding:10px 14px}
  tbody td{padding:11px 14px}
  .login-card{padding:30px 22px}
  .login-divider{margin:0 -22px 22px}
  .role-btn{padding:5px 8px;font-size:0.72rem}
  .credit-pill{padding:4px 9px;font-size:0.72rem}
  .account-grid{grid-template-columns:1fr}
  .btn-full-mobile{width:100%}
  .sec-header{flex-direction:column;align-items:flex-start}
  .public-card{padding:22px 18px}
}
@media(max-width:420px){
  .stats-grid{grid-template-columns:1fr}
  .page-title{font-size:0.9rem}
}
