@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   OTP Software — Enterprise Light SaaS Design System
   Primary #3B91F5 · bg #F5F7FA · border #E5E7EB · text #1F2937
   ============================================================ */
:root {
  --bg: #F5F7FA;            /* application background */
  --panel: #FFFFFF;         /* content / card surface */
  --panel2: #F8FAFC;        /* secondary surface */
  --border: #E5E7EB;
  --border-soft: #EEF1F5;
  --text: #1F2937;
  --muted: #64748B;
  --muted2: #94A3B8;
  --accent: #3B91F5;        /* primary */
  --accent-hover: #2F80ED;
  --accent-bg: #EAF3FF;     /* primary light background */
  --green: #52BF35;
  --green-bg: rgba(82, 191, 53, .12);
  --amber: #F5B84B;
  --amber-bg: rgba(245, 184, 75, .16);
  --red: #EF4444;
  --red-bg: rgba(239, 68, 68, .10);
  --accent2: #3B91F5;       /* legacy alias (no gradients) */
  --radius: 12px;           /* cards */
  --radius-sm: 8px;         /* buttons / inputs */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-md: 0 2px 8px rgba(16, 24, 40, .06);
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { font-weight: 600; line-height: 1.3; }
b, strong { font-weight: 600; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- topbar (application header) ---------- */
.topbar {
  display: flex; align-items: center; height: 58px; flex-shrink: 0;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 0 20px; gap: 14px;
  margin: -22px -24px 20px;
}
.tb-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; min-width: 34px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 500;
  cursor: pointer; font-family: inherit; transition: .15s;
}
.tb-btn:hover { background: var(--panel2); color: var(--text); border-color: var(--border); }
.tb-sep { width: 1px; height: 22px; background: var(--border); }
.tb-equity { flex: 1; }

.tb-tabs { display: flex; align-items: flex-end; gap: 2px; overflow-x: auto; min-width: 0; }
.tb-tabs::-webkit-scrollbar { height: 4px; }
.tb-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  border: 1px solid transparent; border-bottom: none;
  white-space: nowrap; cursor: pointer; transition: .15s;
}
.tb-tab:hover { color: var(--text); background: var(--panel2); }
.tb-tab.active { color: var(--accent); font-weight: 600; background: var(--accent-bg); }
.tb-tab .t-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 4px; font-size: 12px; line-height: 1;
}
.tb-tab .t-x:hover { background: rgba(59, 145, 245, .18); }

.tb-right { display: flex; align-items: center; gap: 6px; }
.tb-user { display: flex; align-items: center; gap: 9px; padding: 3px 8px 3px 3px; border-radius: 8px; cursor: default; }
.tb-user .tu-name { font-size: 13px; font-weight: 600; line-height: 1.1; }
.tb-user .tu-role { font-size: 11px; color: var(--muted2); line-height: 1.1; }

/* ---------- sidebar ---------- */
.admin-layout { display: flex; flex: 1; min-height: 100vh; width: 100%; }
.admin-side {
  width: 250px; min-width: 250px;
  background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-x: hidden; overflow-y: auto;
  padding: 16px 12px;
  transition: width .2s ease, min-width .2s ease;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.side-brand .logo { display: flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; color: var(--text); }
.side-brand .logo .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); flex-shrink: 0; }
.side-brand .logo span b { color: var(--accent); font-weight: 700; }
.side-brand-sub { font-size: 11px; color: var(--muted); font-weight: 500; line-height: 1.15; }

.side-group { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.side-label { font-size: 11px; font-weight: 600; color: var(--muted2); letter-spacing: .3px; padding: 8px 12px 6px; text-transform: uppercase; }
.admin-side a {
  display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 12px;
  border-radius: var(--radius-sm);
  color: #334155; font-size: 13.5px; font-weight: 500;
  transition: background .15s, color .15s; white-space: nowrap;
}
.side-ico { width: 20px; min-width: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted2); transition: color .15s; }
.admin-side a:hover { background: #F1F5F9; color: var(--text); }
.admin-side a:hover .side-ico { color: var(--muted); }
.admin-side a.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.admin-side a.active .side-ico { color: var(--accent); }
.side-bottom { margin-top: auto; border-top: 1px solid var(--border); padding-top: 10px; }

.side-bal { margin: 12px 0 4px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); }
.side-bal .sbl { font-size: 10.5px; color: var(--muted2); text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.side-bal .sbn { display: block; font-size: 20px; font-weight: 600; color: var(--text); margin: 2px 0 6px; }
.side-bal .sbt { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--accent); }

/* collapsed state */
.admin-layout .admin-side.collapsed { width: 64px; min-width: 64px; }
.admin-layout.side-collapsed .side-label,
.admin-layout.side-collapsed .side-brand-sub,
.admin-layout.side-collapsed .admin-side a .side-label-text,
.admin-layout.side-collapsed .side-bal .sbl,
.admin-layout.side-collapsed .side-bal .sbn,
.admin-layout.side-collapsed .side-bal .sbt { display: none; }
.admin-layout.side-collapsed .admin-side a { justify-content: center; padding: 0; }
.admin-layout.side-collapsed .side-brand { justify-content: center; padding: 2px 0 16px; }
.admin-layout.side-collapsed .side-brand .logo span:not(.dot) { display: none; }
.admin-layout.side-collapsed .side-bal { display: flex; justify-content: center; padding: 8px; }
.admin-layout.side-collapsed .side-bal .sbn { display: inline-flex; margin: 0; }
.admin-layout.side-collapsed .side-group { align-items: center; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 22px 24px 40px; }

.main-scroll { width: 100%; min-width: 0; }

/* ---------- page head ---------- */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 600; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; }

/* ---------- welcome banner ---------- */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--accent-bg); border: 1px solid #D6E7FF; border-radius: 14px;
  padding: 20px 24px; margin-bottom: 20px;
}
.banner .b-title { font-size: 19px; font-weight: 600; color: var(--text); }
.banner .b-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.banner .b-illu {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px;
  background: #fff; border: 1px solid #D6E7FF; color: var(--accent); flex-shrink: 0;
}

/* ---------- KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.kpi-card .k-ic {
  width: 42px; height: 42px; min-width: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--accent);
}
.kpi-card .k-body { min-width: 0; flex: 1; }
.kpi-card .k-lbl { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi-card .k-val { font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -.3px; }
.kpi-card .k-cta { align-self: flex-end; }

/* ---------- misc utilities ---------- */
.b-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #D6E7FF; border-radius: 20px;
  padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.dot-static { width: 8px; height: 8px; border-radius: 50%; background: var(--muted2); flex-shrink: 0; }
.dot-ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.dot-warn { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.dot-off { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.ml-auto { margin-left: auto; }
.ra-lbl { flex-shrink: 0; }
.ph-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.text-min { font-size: 12px; color: var(--muted2); }
.fw600 { font-weight: 600; }

/* ---------- notice list (platform notice card) ---------- */
.notice-list { list-style: none; margin-top: 4px; }
.notice-list li { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); align-items: flex-start; }
.notice-list li:last-child { border-bottom: 0; }
.notice-list .n-ic {
  width: 30px; min-width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-bg); color: var(--accent);
}
.notice-list b { font-size: 13px; font-weight: 600; color: var(--text); }
.notice-list p { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.ic-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.ic-link { font-size: 12.5px; font-weight: 600; color: var(--accent); }
.ic-link:hover { color: var(--accent-hover); }

/* ---------- info two-column ---------- */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.info-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-sm);
}
.info-card .ic-head {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 18px; border-bottom: 1px solid var(--border); background: var(--panel2);
  font-size: 14px; font-weight: 600;
}
.info-card .ic-head .i-ic { color: var(--accent); display: inline-flex; }
.info-card .ic-body { padding: 14px 18px; }
.notice-item { padding: 4px 0 12px; border-bottom: 1px dashed var(--border-soft); margin-bottom: 10px; }
.notice-item:last-child { border-bottom: none; margin-bottom: 0; }
.notice-item .n-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.notice-item .n-time { font-size: 11.5px; color: var(--muted2); margin-bottom: 6px; }
.notice-item .n-body { font-size: 13px; color: #475569; line-height: 1.55; }

.msg-list { display: flex; flex-direction: column; }
.msg-row { display: flex; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--border-soft); transition: background .15s; }
.msg-row:hover { background: var(--panel2); }
.msg-row:last-child { border-bottom: none; }
.msg-row .m-ic { width: 30px; height: 30px; min-width: 30px; border-radius: 8px; background: var(--accent-bg); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.msg-row .m-title { font-size: 13px; font-weight: 600; }
.msg-row .m-desc { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.msg-row .m-time { font-size: 11.5px; color: var(--muted2); margin-left: auto; white-space: nowrap; }

/* ---------- cards ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.card h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.section-title { font-size: 16px; font-weight: 600; margin: 24px 0 12px; display: flex; align-items: center; gap: 8px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px;
  background: #fff; color: #374151; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-weight: 500; font-size: 13.5px;
  cursor: pointer; transition: .15s; font-family: inherit; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: #FDFEFF; }
.btn.solid, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.solid:hover, .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.success { background: var(--green); border-color: var(--green); color: #fff; }
.btn.success:hover { filter: brightness(1.05); color: #fff; border-color: var(--green); }
.btn.danger { background: #fff; border-color: #FECACA; color: var(--red); }
.btn.danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn.ghost { background: transparent; }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.icon-only { width: 38px; min-width: 38px; padding: 0; }

/* ---------- badges / pills ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge.green { background: var(--green-bg); color: #3FA025; }
.badge.red { background: var(--red-bg); color: #DC2626; }
.badge.amber { background: var(--amber-bg); color: #B45309; }
.badge.grey { background: #F1F5F9; color: var(--muted); }
.badge.blue { background: var(--accent-bg); color: var(--accent); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--green-bg); border: 1px solid transparent; color: #3FA025; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 20px; }
.status-pill.off { background: var(--red-bg); color: #DC2626; }
.status-pill .dotp { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.status-pill.off .dotp { background: var(--red); }

/* ---------- inputs ---------- */
.input {
  height: 40px; width: 100%;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 0 12px; font-size: 14px; font-family: inherit; transition: .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 145, 245, .14); }
.input::placeholder { color: var(--muted2); }
textarea.input { resize: vertical; min-height: 120px; padding: 10px 12px; font-family: inherit; line-height: 1.5; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.search-box { position: relative; }
.search-box > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted2); pointer-events: none; }
.search-box .input { padding-left: 36px; }

select.input { cursor: pointer; }
select.input option { color: var(--text); }

/* ---------- tabs (underline) ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: transparent; border: none; color: var(--muted); padding: 10px 16px; font-weight: 500; font-size: 14px; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; white-space: nowrap; transition: .15s; }
.tabs button.active { color: var(--accent); font-weight: 600; border-color: var(--accent); }

/* ---------- segmented control ---------- */
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 3px; gap: 2px; }
.seg button {
  border: none; background: transparent; color: var(--muted);
  height: 32px; padding: 0 16px; border-radius: 6px;
  font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; transition: .15s;
}
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--accent); color: #fff; font-weight: 600; }

/* ---------- operator chips ---------- */
.op-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.op-chips::-webkit-scrollbar { height: 5px; }
.op-chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-weight: 500; color: #374151; cursor: pointer;
  transition: .15s; white-space: nowrap; font-family: inherit;
}
.op-chip:hover { border-color: var(--accent); background: #FDFEFF; color: var(--accent); }
.op-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ---------- info / tips panel ---------- */
.tips {
  display: flex; gap: 12px;
  background: var(--accent-bg); border: 1px solid #D6E7FF; border-radius: 12px;
  padding: 14px 18px; margin-bottom: 16px;
}
.tips .tips-ic { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.tips .tips-title { font-size: 13.5px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.tips ol { margin-left: 18px; font-size: 13px; color: #475569; line-height: 1.6; }
.tips li { margin-bottom: 2px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 12px; }
.toolbar .input { width: auto; }
.toolbar .spacer { flex: 1; }

/* ---------- data table ---------- */
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-size: 13px; font-weight: 600; background: var(--panel2); }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #F8FAFC; }
tbody tr.selected td { background: var(--accent-bg); }
tr.svc-disabled td { opacity: .55; }
td:first-child, th:first-child { padding-left: 16px; }
td:last-child, th:last-child { padding-right: 16px; }

.row-check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: -2px; }

.proj-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.proj-cell .proj-ic {
  width: 40px; height: 40px; min-width: 40px; border-radius: 10px;
  background: var(--panel2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: #475569;
}
.proj-cell .proj-name { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.proj-cell .proj-sub { font-size: 12px; color: var(--muted2); }

.qty-cell { font-size: 13.5px; font-weight: 600; }
.price-cell { font-size: 13.5px; font-weight: 600; color: #475569; }
.qty-cell.low { color: var(--red); }

/* ---------- bulk action bar ---------- */
.bulk-bar {
  display: flex; align-items: center; gap: 12px;
  position: sticky; bottom: 14px; margin-top: 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; box-shadow: var(--shadow-md);
}
.bulk-bar .bb-info { font-size: 13px; color: var(--muted); flex: 1; }
.bulk-bar .bb-info b { color: var(--text); }

/* ---------- empty state ---------- */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 40px 20px; color: var(--muted2); }
.empty .e-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted2); }
.empty .e-title { font-size: 14px; font-weight: 600; color: var(--muted); }
.empty .e-sub { font-size: 12.5px; }

/* ---------- skeleton ---------- */
.skel { position: relative; overflow: hidden; background: #EEF2F7; border-radius: 6px; }
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skel-line { height: 12px; }
.skel-num { height: 24px; width: 60%; }
.skel-card { height: 86px; border-radius: var(--radius); }
.skel-row { height: 44px; margin-bottom: 8px; border-radius: 8px; }

/* ---------- navbar / landing / auth ---------- */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 62px;
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; color: var(--text); }
.logo .dot { width: 11px; height: 11px; border-radius: 3px; background: var(--accent); }
.logo span b { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { color: var(--muted); padding: 8px 13px; border-radius: 8px; font-weight: 500; font-size: 14px; transition: .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: var(--accent-bg); }
.balance-pill { background: var(--green-bg); border: 1px solid transparent; color: #3FA025; font-weight: 600; border-radius: 20px; padding: 7px 14px; font-size: 13.5px; margin-right: 8px; }

.hero { text-align: center; padding: 64px 20px 40px; background: var(--bg); }
.hero h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 600; line-height: 1.18; max-width: 780px; margin: 0 auto; }
.hero h1 b { color: var(--accent); font-weight: 600; }
.hero p { color: var(--muted); font-size: 16px; max-width: 600px; margin: 14px auto 26px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; max-width: 920px; margin: 30px auto 0; padding: 0 20px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat-card .num { font-size: 26px; font-weight: 600; color: var(--accent); letter-spacing: -.3px; }
.stat-card .lbl { color: var(--muted); font-size: 13px; margin-top: 3px; }

.section { max-width: 1140px; margin: 0 auto; padding: 40px 20px; }
.section h2 { font-size: 24px; font-weight: 600; margin-bottom: 6px; }
.section .sub { color: var(--muted); margin-bottom: 20px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.service-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; cursor: pointer; transition: .15s; box-shadow: var(--shadow-sm); }
.service-card:hover { border-color: var(--accent); background: #FDFEFF; }
.brand-logo { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--panel2); border: 1px solid var(--border); color: #475569; margin-bottom: 10px; }
.brand-logo svg { display: block; }
.brand-logo.tbl { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; margin-bottom: 0; vertical-align: -6px; margin-right: 6px; }
.mini-logo { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: var(--panel2); border: 1px solid var(--border); border-radius: 6px; vertical-align: -5px; margin-right: 5px; color: #475569; }
.service-card .icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--panel2); margin-bottom: 10px; }
.price { font-size: 18px; font-weight: 600; color: #3FA025; }
.price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.count { color: var(--muted); font-size: 13px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.step { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.step .n { color: var(--accent); font-weight: 600; font-size: 13px; }
footer { text-align: center; color: var(--muted); padding: 26px; border-top: 1px solid var(--border); font-size: 13px; }

/* ---------- auth ---------- */
.auth-wrap { display: flex; align-items: center; justify-content: center; flex: 1; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 30px; box-shadow: var(--shadow-sm); }
.auth-card h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 20px; }
.form-foot { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* ---------- page generic ---------- */
.page { max-width: 1160px; margin: 0 auto; padding: 26px 20px; width: 100%; }
.page h1 { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.page .sub { color: var(--muted); margin-bottom: 22px; }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filter-row .input { width: auto; min-width: 190px; }
.buy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

/* ---------- orders ---------- */
.order { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow-sm); }
.order-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.order-info { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.order-info .kv b { display: block; font-size: 14px; font-weight: 600; }
.order-info .kv span { color: var(--muted); font-size: 12px; }
.number-chip { font-family: 'Consolas', monospace; font-size: 17px; font-weight: 600; background: var(--panel2); border: 1px dashed var(--border); padding: 8px 14px; border-radius: 8px; color: var(--text); }
.otp-box { display: flex; align-items: center; justify-content: center; gap: 14px; background: var(--green-bg); border: 1px solid transparent; border-radius: 10px; padding: 14px; margin: 4px 0; }
.otp-code { font-size: 30px; font-weight: 700; letter-spacing: 7px; color: #3FA025; font-family: Consolas, monospace; }
.otp-msg { color: var(--muted); font-size: 13px; }
.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.order-foot { border-top: 1px dashed var(--border); padding-top: 9px; display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }

/* ---------- misc tables / chips ---------- */
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mono { font-family: Consolas, monospace; }
.svc-name { display: flex; align-items: center; gap: 11px; }
.svc-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--panel2); border: 1px solid var(--border); color: #475569; flex-shrink: 0; }
.svc-icon svg { display: block; }
.svc-name b { color: var(--text); font-weight: 600; }
.flag { font-size: 17px; margin-right: 7px; vertical-align: -2px; }
.flag-badge { display: inline-flex; width: 22px; height: 22px; border-radius: 6px; align-items: center; justify-content: center; background: var(--accent-bg); color: var(--accent); font-size: 10px; font-weight: 700; margin-right: 8px; vertical-align: -4px; }
.cty { font-weight: 500; }
.bar { width: 74px; height: 5px; background: #EEF2F7; border-radius: 6px; margin-top: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: #fff; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; transition: .15s; }
.icon-btn:hover { border-color: var(--accent); background: var(--accent-bg); }
.icon-btn.danger:hover { border-color: var(--red); background: var(--red-bg); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn .ico-label { font-size: 12px; font-weight: 500; color: var(--muted); }

.switch { position: relative; width: 40px; height: 22px; display: inline-block; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: #CBD5E1; border-radius: 22px; transition: .2s; cursor: pointer; }
.slider:before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(18px); }

.api-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.api-dot.ok { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.api-dot.part { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.api-dot.off { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }

.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.btn.icon-only { width: 30px; height: 30px; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.btn.icon-only:hover { color: var(--accent); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 500; }
.chip small { color: var(--muted); font-weight: 500; }
.chip .x { cursor: pointer; color: var(--muted); font-weight: 600; }
.chip .x:hover { color: var(--red); }

.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 600; color: #fff; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; flex-shrink: 0; }

/* ---------- toast ---------- */
#toastWrap { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.toast { padding: 12px 16px; border-radius: 10px; font-weight: 500; font-size: 14px; border: 1px solid var(--border); background: #fff; color: var(--text); box-shadow: var(--shadow-md); animation: slideIn .25s ease; }
.toast.ok { border-color: var(--green); color: #3FA025; }
.toast.err { border-color: var(--red); color: #DC2626; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 24px; max-width: 420px; width: 100%; box-shadow: var(--shadow-md); }
.modal h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.modal .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.modal .actions { justify-content: flex-end; margin-top: 18px; }

.small { font-size: 12px; color: var(--muted); }
.center { text-align: center; }
.mt { margin-top: 16px; }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.warn { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ---------- responsive ---------- */
@media (min-width: 901px) and (max-width: 1240px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .info-grid { grid-template-columns: 1fr; }
  .admin-side {
    position: fixed; z-index: 90; left: 0; top: 0;
    transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 30px rgba(16,24,40,.12);
  }
  .admin-side.mobile-open { transform: translateX(0); }
  .side-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 80; }
  .main-scroll { padding: 16px; }
  .topbar { padding: 0 12px; }
  .tb-tabs { max-width: 40vw; }
  .tb-user { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .banner { flex-direction: row; }
  .navbar { padding: 0 14px; }
  .breadcrumb-hide { display: none; }
}