:root {
  --bg: #F1F4F9;
  --surface: #fff;
  --surface-2: #F5F7FB;
  --border: #E3E8F0;
  --text: #1B2440;
  --muted: #77839A;
  --brand: #5A6CFF;
  --brand-2: #8E7BFF;
  --pink: #FF4E80;
  --green: #12B886;
  --amber: #F59F00;
  --red: #E8384F;
  --shadow: 0 4px 16px rgba(27,36,64,.07);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", "Noto Sans Devanagari", Roboto, system-ui, sans-serif;
  font-size: 15px;
}
a { color: var(--brand); text-decoration: none; }

/* ---------------- Auth pages ---------------- */
.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #5A6CFF 0%, #8E7BFF 45%, #FF6B9D 100%);
  padding: 24px;
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border-radius: 20px; padding: 30px 26px; box-shadow: 0 18px 50px rgba(20,28,60,.28);
  text-align: center;
}
.auth-logo {
  width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 19px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 25px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.auth-card h1 { font-size: 20px; margin: 0 0 4px; }
.auth-sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.auth-note { color: var(--muted); font-size: 12px; margin-top: 18px; line-height: 1.6; }
.auth-card form { text-align: left; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], input[type=date], select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 13px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; font-family: inherit; color: var(--text);
  background: var(--surface); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
textarea { min-height: 120px; resize: vertical; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px; border: none; border-radius: 11px; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 700;
  font-family: inherit;
}
.btn:hover { filter: brightness(.95); }
.btn.block { width: 100%; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn.danger { background: var(--red); }
.btn.green { background: var(--green); }

.alert { border-radius: 11px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 16px; line-height: 1.6; text-align: left; }
.alert.ok { background: rgba(18,184,134,.12); color: #0c7a5c; }
.alert.err { background: rgba(232,56,79,.10); color: #b3253a; }

/* ---------------- Shell ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 11px 16px;
}
.brand { font-weight: 800; display: flex; align-items: center; gap: 9px; }
.brand-badge {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }
.menu-btn { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text); }

.shell { display: flex; align-items: flex-start; }
.side {
  width: 210px; flex: 0 0 auto; background: var(--surface);
  border-right: 1px solid var(--border); min-height: calc(100vh - 53px);
  padding: 14px 10px; position: sticky; top: 53px;
  display: flex; flex-direction: column;
}
.side nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.side nav a {
  padding: 11px 13px; border-radius: 10px; color: var(--text);
  font-size: 14.5px; font-weight: 600;
}
.side nav a:hover { background: var(--surface-2); }
.side nav a.on { background: rgba(90,108,255,.11); color: var(--brand); }
.side-foot { border-top: 1px solid var(--border); padding: 12px 13px 2px; font-size: 12.5px; }

.main { flex: 1; min-width: 0; padding: 20px 22px 44px; }
.page-h1 { font-size: 21px; margin: 0 0 18px; }

/* ---------------- Cards / tables ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2 { font-size: 15px; margin: 0 0 14px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 16px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.stat.b .n { color: var(--brand); }
.stat.g .n { color: var(--green); }
.stat.a .n { color: var(--amber); }
.stat.p .n { color: var(--pink); }

.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: var(--surface-2); font-size: 12.5px; color: var(--muted); text-transform: none; font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td.actions { white-space: nowrap; }
td .u { color: var(--muted); font-size: 12px; word-break: break-all; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.pill.fast { background: rgba(18,184,134,.13); color: #0c7a5c; }
.pill.slow { background: rgba(245,159,0,.15); color: #9a6500; }
.pill.down { background: rgba(232,56,79,.11); color: #b3253a; }
.pill.on { background: rgba(18,184,134,.13); color: #0c7a5c; }
.pill.off { background: rgba(119,131,154,.15); color: var(--muted); }

.inline { display: inline; }
.muted { color: var(--muted); font-size: 12.5px; }
.mb0 { margin-bottom: 0; }
.mt16 { margin-top: 16px; }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin: 10px 0 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 16px; font-size: 14px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a {
  padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.tabs a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.chk { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); font-weight: 600; }
.chk input { width: auto; margin: 0; }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .side {
    position: fixed; left: 0; top: 53px; bottom: 0; z-index: 25;
    transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.18);
  }
  .side.open { transform: none; }
  .main { padding: 16px 14px 40px; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .who { display: none; }
}

/* ============================================================
   v6.48 — ADMIN UI MODERNIZATION (additive; purane rules waise hi)
   ============================================================ */

/* sidebar: icon + label, bade touch target */
.side nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; border-radius: 12px; }
.side nav a .nav-ico { font-style: normal; width: 22px; text-align: center; opacity: .9; flex: 0 0 auto; }
.side nav a span { flex: 1; min-width: 0; }

/* KPI cards — colorful accent + hover */
.stats .stat { position: relative; overflow: hidden; border-radius: 16px; transition: transform .16s ease, box-shadow .16s ease; }
.stats .stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: currentColor; opacity: .85; }
.stats .stat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(27,36,64,.12); }
.stats .stat .n { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stats .stat .l { font-size: 12.5px; opacity: .85; margin-top: 3px; }

/* cards + tables */
.card { border-radius: 16px; }
.card h2 { font-size: 16px; font-weight: 800; }
.tbl-wrap { border-radius: 14px; overflow: auto; }
table th { font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
table tr:hover td { background: rgba(90,108,255,.05); }
table td, table th { vertical-align: middle; }

/* status pills (fast/slow/down + on/off) */
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.pill.fast { background: rgba(18,184,134,.14); color: #0E7C5A; }
.pill.slow { background: rgba(245,159,0,.16); color: #B26B00; }
.pill.down { background: rgba(232,56,79,.13); color: #C2263A; }
.pill.on   { background: rgba(18,184,134,.14); color: #0E7C5A; }
.pill.off  { background: rgba(138,148,166,.16); color: #6B7B8C; }

/* buttons — bade, modern */
.btn { min-height: 42px; border-radius: 12px; font-weight: 700; }
.btn.small { min-height: 34px; border-radius: 10px; }

/* form inputs */
label > input, label > select, label > textarea { min-height: 42px; border-radius: 11px; }

/* section header with action (Services & Links) */
.sec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.sec-head h2 { margin: 0; flex: 1; min-width: 0; }
.sec-head .cnt { font-size: 12px; font-weight: 800; color: #6B7B8C; background: #F1F4F9; border: 1px solid #E6EBF3; padding: 3px 10px; border-radius: 999px; }

/* category tabs — pill style */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tabs a { min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap; }

/* icon/color preview swatch in table */
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; margin-right: 6px; border: 1px solid rgba(0,0,0,.08); }

/* mobile: no horizontal overflow */
@media (max-width: 620px) {
  .stats { grid-template-columns: 1fr 1fr !important; }
  .row2, .row3 { grid-template-columns: 1fr !important; }
  table { font-size: 13px; }
}

/* ---- krram badalne ke ↑ ↓ button (v6.50) ---- */
.ordcell { white-space: nowrap; }
.ordcell b { display: inline-block; min-width: 22px; font-size: 13px; color: #6B7B8C; }
.ordbtns { display: inline-flex; flex-direction: column; gap: 3px; margin-left: 6px; vertical-align: middle; }
.ordbtn {
  width: 26px; height: 20px; line-height: 1; cursor: pointer; padding: 0;
  border: 1px solid #E6EBF3; background: #F7F9FC; color: #5A6CFF;
  border-radius: 6px; font-size: 10px; font-weight: 800;
}
.ordbtn:hover { background: #5A6CFF; color: #fff; border-color: #5A6CFF; }
.ordbtn:active { transform: scale(.92); }

/* ==================================================================
   Phase 6 — Notification Manager ka live "phone" preview
   (bilkul waise jaise Android ke notification panel me dikhta hai)
   ================================================================== */
.np-phone {
  background: linear-gradient(160deg, #2B3557, #1B2440);
  border-radius: 18px;
  padding: 16px 14px 22px;
  box-shadow: 0 8px 24px rgba(27, 36, 64, .18);
}
.np-card {
  background: #fff;
  border-radius: 14px;
  padding: 11px 13px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.np-top {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 6px;
}
.np-app-ico { font-size: 15px; line-height: 1; }
.np-app {
  font-size: 11.5px; font-weight: 700; color: #5D6B84;
  letter-spacing: .2px;
}
.np-time { margin-left: auto; font-size: 11px; color: #98A2B3; }
.np-title {
  font-size: 13.5px; font-weight: 800; color: #1A2233;
  line-height: 1.4; overflow-wrap: anywhere;
}
.np-body {
  font-size: 12.5px; color: #47536B; line-height: 1.5;
  margin-top: 3px; overflow-wrap: anywhere;
}
.np-cta {
  margin-top: 9px; text-align: right;
  font-size: 12px; font-weight: 700; color: #3D5AF1;
}

/* सूची me category/status ke chhote pill — inline color style se aate hain */
.tbl-wrap table td .pill { font-size: 11px; }

@media (max-width: 720px) {
  .np-phone { margin-top: 10px; }
}

/* ==================================================================
   Lekhpal Admin v7.59 Modern Aesthetics & Responsive Design System
   ================================================================== */
:root {
  --primary-gradient: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  --hero-gradient: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  --emerald-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

body {
  font-family: 'Plus Jakarta Sans', "Segoe UI", "Noto Sans Devanagari", Roboto, system-ui, sans-serif;
  letter-spacing: -0.01em;
}

/* Topbar enhancements */
.topbar {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand {
  text-decoration: none;
  color: var(--text);
  gap: 10px;
}
.brand-text {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ver-badge {
  background: var(--primary-gradient);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}

.top-status-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
}
.top-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}
.top-pill.live {
  background: rgba(16,185,129,0.1);
  border-color: rgba(16,185,129,0.25);
  color: #059669;
}
.top-pill:hover {
  filter: brightness(0.96);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.7);
  animation: pulseGreen 1.8s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}
.user-avatar { font-size: 14px; }
.logout-btn { margin-left: 8px; }

/* Sidebar Navigation Sections */
.side {
  width: 230px;
  padding: 16px 12px;
}
.side-brand-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.ver-tag {
  background: rgba(37,99,235,0.1);
  color: #2563EB;
  padding: 2px 6px;
  border-radius: 4px;
}
.nav-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #94A3B8;
  letter-spacing: 0.06em;
  padding: 10px 10px 4px;
}
.side nav a {
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.15s ease;
}
.side nav a:hover {
  background: #EEF2F6;
}
.side nav a.on {
  background: rgba(37,99,235,0.12);
  color: #2563EB;
  font-weight: 700;
}
.nav-label { flex: 1; }
.nav-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}
.badge-blue {
  background: #2563EB;
  color: #fff;
}
.badge-red {
  background: #EF4444;
  color: #fff;
}

.side-foot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.side-api-link {
  font-size: 12px;
  font-weight: 700;
  color: #2563EB;
  text-decoration: none;
}

/* Page Header */
.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.page-h1 { margin: 0; font-size: 23px; font-weight: 800; }
.page-time-chip {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Hero Banner */
.hero-banner {
  background: var(--hero-gradient);
  color: #fff;
  border-radius: 20px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.18);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,0.3) 0%, rgba(37,99,235,0) 70%);
  pointer-events: none;
}
.hero-content {
  flex: 1 1 500px;
  min-width: 0;
}
.hero-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.hero-badge-pill {
  background: rgba(255,255,255,0.15);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.hero-badge-status {
  font-size: 11.5px;
  color: #34D399;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
}
.hero-desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: #94A3B8;
  line-height: 1.6;
  max-width: 650px;
}

.hero-api-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 14px;
  border-radius: 12px;
  flex-wrap: wrap;
}
.hero-api-label {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 700;
}
.hero-api-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  color: #60A5FA;
  word-break: break-all;
}
.btn-copy {
  background: #2563EB;
  color: #fff;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-copy:hover {
  background: #1D4ED8;
}
.hero-api-test {
  color: #34D399;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
}

.hero-stats-preview {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-stat-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
  min-width: 120px;
}
.h-stat-num {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.h-stat-lbl {
  font-size: 11.5px;
  color: #94A3B8;
  margin-top: 4px;
  font-weight: 600;
}

/* Quick Actions Grid */
.sec-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 20px 0 12px;
}
.sec-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.sec-sub {
  font-size: 12.5px;
  color: var(--muted);
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.quick-btn-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.18s ease;
}
.quick-btn-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27,36,64,0.1);
  border-color: #2563EB;
}
.q-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}
.q-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.q-info b {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
}
.q-info span {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Modernized Stat Cards */
.stats-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card-m {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-card-m::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}
.stat-card-m.b-blue::before { background: #2563EB; }
.stat-card-m.b-red::before { background: #EF4444; }
.stat-card-m.b-purple::before { background: #8B5CF6; }
.stat-card-m.b-green::before { background: #10B981; }

.card-m-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.card-m-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
}
.card-m-ico {
  font-size: 18px;
}
.m-big-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.m-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.m-sub-text {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 6px;
}
.card-m-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.card-link {
  font-size: 12px;
  font-weight: 700;
  color: #2563EB;
  text-decoration: none;
}

/* Controller card */
.status-controller-card {
  padding: 20px;
}
.controller-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.ctrl-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ctrl-icon {
  font-size: 26px;
}
.controller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  background: var(--surface-2);
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.ctrl-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ctrl-lbl {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.ctrl-val {
  font-size: 14px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}
.badge.emerald {
  background: rgba(16,185,129,0.12);
  color: #059669;
}
.badge.blue {
  background: rgba(37,99,235,0.12);
  color: #2563EB;
}
.badge.gray {
  background: rgba(100,116,139,0.12);
  color: #475569;
}
.badge.red {
  background: rgba(239,68,68,0.12);
  color: #DC2626;
}
.badge.amber {
  background: rgba(245,158,11,0.12);
  color: #D97706;
}

/* Copy Toast */
.copy-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10B981;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16,185,129,0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s ease;
  pointer-events: none;
  z-index: 1000;
}
.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .top-status-pills { display: none; }
  .hero-banner { padding: 18px; }
  .hero-title { font-size: 18px; }
  .h-stat-num { font-size: 22px; }
}
