/* Design tokens follow the original portal: navy #0b1d3a, blue #1e3a8a / #2563eb, slate greys,
   pill inputs, very round cards. No CDN: the portal must work inside the hotspot walled garden. */
:root {
  --navy: #0b1d3a; --brand: #1e3a8a; --brand-dark: #172554; --accent: #2563eb;
  --ink: #0f172a; --text: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e9edf2; --line-2: #e2e8f0; --bg: #f1f5f9; --soft: #f8fafc; --white: #fff;
  --green: #10b981; --green-bg: #d1fae5; --green-ink: #065f46;
  --red: #ef4444; --red-bg: #fecaca; --red-ink: #991b1b;
  --amber: #f59e0b; --amber-bg: #fef9c3; --amber-ink: #854d0e;
  --blue-bg: #dbeafe; --purple: #8b5cf6;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.center { text-align: center; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: .8rem; } .xs { font-size: .72rem; }
.row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.nowrap { white-space: nowrap; }

/* ---------- icons (Lucide, inline sprite) ---------- */
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
  stroke-linejoin: round; flex-shrink: 0; vertical-align: -.14em; }
.ic-sm { width: .85em; height: .85em; } .ic-lg { width: 1.35em; height: 1.35em; } .ic-xl { width: 2em; height: 2em; }
.spin { animation: spin .9s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toasts / alerts ---------- */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; max-width: calc(100% - 32px); }
.toast { display: flex; align-items: center; gap: .55rem; padding: .75rem 1.1rem; border-radius: 1rem; color: #fff; font-weight: 500;
  font-size: .9rem; box-shadow: 0 10px 30px rgba(0,0,0,.14); animation: slideIn .3s ease; }
.toast-success { background: var(--green); } .toast-error { background: var(--red); } .toast-info { background: #3b82f6; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.notice { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 1.2rem; font-size: .85rem; border: 1px solid; }
.notice .ic { margin-top: .15rem; }
.notice.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.notice.error { background: #fef2f2; border-color: #fecaca; color: var(--red-ink); }
.notice.info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.notice.warn { background: #fffbeb; border-color: #fde68a; color: var(--amber-ink); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border: 0; cursor: pointer; text-decoration: none;
  background: var(--brand); color: #fff; padding: .8rem 1.5rem; border-radius: 2rem; font-weight: 600; font-size: .95rem; transition: all .2s; }
.btn:hover { background: var(--brand-dark); text-decoration: none; transform: scale(1.01); box-shadow: 0 8px 24px -8px rgba(30,58,138,.35); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: var(--soft); border-color: #cbd5e1; box-shadow: none; }
.btn.green { background: var(--green); } .btn.green:hover { background: #059669; }
.btn.red { background: #dc2626; } .btn.red:hover { background: #b91c1c; }
.btn.sm { padding: .45rem .95rem; font-size: .8rem; }
.btn.xs { padding: .3rem .7rem; font-size: .72rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: .6rem; border: 0;
  background: transparent; color: var(--accent); cursor: pointer; }
.icon-btn:hover { background: #eff6ff; } .icon-btn.danger { color: #dc2626; } .icon-btn.danger:hover { background: #fef2f2; }

/* ---------- forms ---------- */
label, .label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.label .ic { color: var(--brand); margin-right: .35rem; }
.input { width: 100%; background: var(--soft); border: 1.5px solid var(--line); border-radius: 2rem; padding: .75rem 1.2rem; outline: none;
  color: var(--ink); font-size: .95rem; transition: .25s; }
.input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px rgba(30,58,138,.08); }
.input::placeholder { color: var(--faint); }
select.input { appearance: none; padding-right: 2.4rem; 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='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.input.sq { border-radius: .75rem; padding: .65rem .9rem; font-size: .9rem; background: #fff; border-color: var(--line-2); }
.input.sq:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.field { margin-bottom: 1rem; }
.hint { font-size: .72rem; color: var(--faint); margin-top: .3rem; }
.input-group { position: relative; }
.input-group > .ic { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-group .input { padding-left: 2.9rem; }
.input-group .toggle { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--faint); cursor: pointer; padding: .5rem; }
.phone-wrap { display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 2rem; overflow: hidden; transition: .2s; }
.phone-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(30,58,138,.06); }
.phone-wrap.error { border-color: var(--red); } .phone-wrap.valid { border-color: var(--green); }
.phone-wrap .prefix { background: var(--soft); padding: .7rem 1rem .7rem 1.2rem; font-size: .9rem; font-weight: 500; color: #1e293b; border-right: 1px solid var(--line); }
.phone-wrap input { flex: 1; min-width: 0; border: 0; outline: none; padding: .7rem 1.2rem; font-size: .95rem; background: transparent; }
.net-tag { display: none; margin-top: .4rem; font-size: .75rem; font-weight: 500; padding: .25rem .8rem; border-radius: 1rem; }
.net-tag.show { display: inline-block; }

/* ---------- customer portal ---------- */
.portal-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.glass { background: rgba(255,255,255,.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 2.5rem;
  padding: 2rem 1.5rem; width: 100%; max-width: 500px; border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.15), 0 0 0 1px rgba(255,255,255,.8) inset; animation: fadeUp .6s ease-out; }
@keyframes fadeUp { 0% { opacity: 0; transform: translateY(30px) scale(.96); } 100% { opacity: 1; transform: none; } }
.card-shell { background: #fff; border-radius: 2.5rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,.15), 0 0 0 1px rgba(0,0,0,.02); width: 100%; max-width: 480px; overflow: hidden; animation: fadeUp .5s ease-out; }
.card-head { background: var(--navy); padding: 2.9rem 1.8rem 1.2rem; position: relative; text-align: center; color: #fff; }
.card-head h2 { font-size: 1.4rem; line-height: 1.3; font-weight: 600; margin-bottom: .2rem; display: flex; align-items: center; justify-content: center; gap: .5rem; }
.card-head h2 .ic { opacity: .7; } .card-head p { font-size: .9rem; color: rgba(255,255,255,.6); }
.card-body { padding: 1.8rem; }
.lang-switch { position: absolute; top: 1rem; right: 1.2rem; display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 2rem; overflow: hidden; z-index: 3; }
.lang-switch a { padding: .25rem .7rem; font-size: .72rem; font-weight: 700; color: var(--faint); text-decoration: none; }
.lang-switch a.on { background: var(--navy); color: #fff; }
.card-head .lang-switch { border-color: rgba(255,255,255,.25); background: transparent; }
.card-head .lang-switch a { color: rgba(255,255,255,.6); } .card-head .lang-switch a.on { background: #fff; color: var(--navy); }
.rel { position: relative; }
.brand-icon { display: inline-flex; align-items: center; justify-content: center; width: 4.5rem; height: 4.5rem; border-radius: 50%; background: var(--navy); color: #fff;
  font-size: 2.2rem; margin-bottom: .75rem; box-shadow: 0 8px 24px -6px rgba(11,29,58,.25); }
.brand-title { font-size: 2rem; font-weight: 700; color: var(--navy); letter-spacing: -.5px; line-height: 1.15; }
.brand-sub { color: var(--muted); font-size: .95rem; }
.tabs { display: flex; justify-content: center; border-bottom: 1px solid var(--line-2); margin-bottom: 1.25rem; }
.tab-btn { background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--faint); padding: .6rem 1.2rem; font-weight: 600; font-size: .9rem; cursor: pointer; transition: .3s; display: inline-flex; align-items: center; gap: .5rem; }
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; animation: fadeIn .3s ease; } .tab-panel.active { display: block; }
@keyframes fadeIn { 0% { opacity: 0; transform: translateY(8px); } 100% { opacity: 1; transform: none; } }
.section-title { font-size: .85rem; font-weight: 600; color: #334155; margin-bottom: .75rem; }
.pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.pkg { display: block; background: var(--soft); border: 1.5px solid var(--line); border-radius: 1.2rem; padding: 1rem .8rem; text-align: center; color: var(--ink); text-decoration: none; transition: .25s; }
.pkg:hover { background: #f1f5f9; transform: translateY(-4px); border-color: var(--brand); box-shadow: 0 8px 20px -8px rgba(30,58,138,.12); text-decoration: none; }
.pkg .pkg-ic { font-size: 2rem; color: var(--brand); display: block; margin: 0 auto .2rem; }
.pkg .price { font-size: 1.4rem; font-weight: 700; color: var(--brand); white-space: nowrap; } .pkg .price small { font-size: .8rem; font-weight: 600; }
.pkg .name { font-weight: 600; font-size: 1rem; } .pkg .tag { font-size: .7rem; color: var(--faint); }
.pkg .badge { display: inline-block; background: var(--blue-bg); color: var(--brand); font-size: .6rem; padding: .1rem .6rem; border-radius: 1rem; margin-top: .2rem; font-weight: 600; }
.notice-card { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 1.2rem; padding: 1rem; margin-bottom: 1rem; }
.notice-card .head { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: #166534; }
.notice-card p { font-size: .85rem; color: #166534; margin: .25rem 0 .75rem; }
.notice-card.blue { background: #f0f7ff; border-color: #dbeafe; } .notice-card.blue .head, .notice-card.blue p { color: #1e3a8a; }
.support-box { background: var(--soft); border-radius: 1.2rem; padding: 1rem; border-left: 4px solid var(--brand); color: var(--muted); font-size: .8rem; }
.support-box strong { color: var(--ink); } .support-box .phone { color: var(--brand); font-weight: 600; }
.foot { text-align: center; color: #cbd5e1; font-size: .72rem; margin-top: 1rem; }
.order-summary { background: var(--soft); border-radius: 1.5rem; padding: 1.2rem; margin-bottom: 1.5rem; text-align: center; border: 1px solid #f0f2f5; }
.order-summary .ic-xl { color: var(--brand); margin-bottom: .3rem; }
.order-summary .pn { font-weight: 700; font-size: 1.2rem; color: var(--navy); } .order-summary .pt { font-size: .8rem; color: var(--muted); }
.order-summary .pm { font-size: .8rem; color: var(--faint); margin-top: .2rem; display: flex; gap: .9rem; justify-content: center; }
.order-summary .pm span { display: inline-flex; align-items: center; gap: .3rem; }
.order-summary .pp { font-size: 1.8rem; font-weight: 700; color: var(--brand); margin-top: .3rem; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1.5rem; }
.method { background: #fff; border: 1.5px solid var(--line); border-radius: 1.2rem; padding: 1rem .5rem; text-align: center; cursor: pointer; transition: .2s; margin: 0; }
.method:hover { border-color: #b9c7e0; transform: translateY(-2px); }
.method.selected { border-color: var(--brand); background: #f5f8ff; box-shadow: 0 8px 20px -8px rgba(30,58,138,.12); }
.method.suggested { border-color: #86efac; background: #f0fdf4; }
.method input { display: none; } .method .ic { font-size: 1.9rem; display: block; margin: 0 auto .25rem; }
.method .mn { font-size: .8rem; font-weight: 500; color: var(--ink); display: block; }
.method[data-method="mpesa"] .ic { color: #10b981; } .method[data-method="airtel"] .ic { color: #ef4444; }
.method[data-method="mixx"] .ic { color: #3b82f6; } .method[data-method="halopesa"] .ic { color: #f59e0b; }
.method[data-method="others"] { grid-column: span 2; } .method[data-method="others"] .ic { color: #8b5cf6; }
.voucher-box { background: var(--navy); color: #fff; border-radius: 1.5rem; padding: 1.3rem; text-align: center; }
.voucher-box .cap { font-size: .75rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .08em; }
.voucher-code { font-size: clamp(1.15rem, 6vw, 1.75rem); font-weight: 700; letter-spacing: .06em; white-space: nowrap; margin: .35rem 0 .7rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; background: #dcfce7; color: #166534; font-weight: 700; padding: .3rem .9rem; border-radius: 2rem; font-size: .85rem; }
.chip.blue { background: var(--blue-bg); color: var(--brand); }
.steps { margin: .5rem 0 0; padding-left: 1.2rem; font-size: .85rem; color: var(--text); } .steps li { margin: .35rem 0; }
.countdown { font-size: 2.1rem; font-weight: 700; color: var(--navy); }
.big-spinner { width: 46px; height: 46px; border: 4px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; margin: .5rem auto 1rem; animation: spin 1s linear infinite; }
.back-link { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.5rem; font-size: .85rem; color: var(--faint); }
.back-link:hover { color: var(--brand); text-decoration: none; }
.stack > * + * { margin-top: 1rem; }

/* ---------- admin ---------- */
.admin-body { padding: 1.5rem; }
.wrap { max-width: 80rem; margin: 0 auto; }
.wrap > * + * { margin-top: 1.5rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.page-head h1 { font-size: 1.85rem; font-weight: 700; color: #1f2937; display: flex; align-items: center; gap: .6rem; line-height: 1.2; }
.page-head h1 .ic { color: #1d4ed8; }
.page-head p { color: #6b7280; font-size: .85rem; }
.pill-chip { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 2rem; padding: .5rem 1rem; font-size: .85rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); color: #374151; font-weight: 500; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.nav-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.nav-pills a { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem 1rem; border-radius: 2rem; font-size: .85rem; font-weight: 600; color: #4b5563; background: #fff; border: 1px solid #e5e7eb; text-decoration: none; }
.nav-pills a:hover { background: #f9fafb; } .nav-pills a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lang-mini { display: inline-flex; background: #fff; border: 1px solid #e5e7eb; border-radius: 2rem; overflow: hidden; }
.lang-mini a { padding: .4rem .75rem; font-size: .72rem; font-weight: 700; color: #6b7280; text-decoration: none; } .lang-mini a.on { background: var(--navy); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 1024px) { .stat-grid { grid-template-columns: repeat(5, 1fr); } .stat-grid.six { grid-template-columns: repeat(6, 1fr); } .stat-grid.four { grid-template-columns: repeat(4, 1fr); } }
.stat-card, .panel { background: #fff; border-radius: 1.25rem; padding: 1.25rem; border: 1px solid var(--line); box-shadow: 0 4px 6px -2px rgba(0,0,0,.04); }
.span-2-sm { grid-column: span 2; } @media (min-width: 1024px) { .span-2-sm { grid-column: auto; } }
.stat-card { transition: transform .2s, box-shadow .2s; } .stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(0,0,0,.12); }
.stat-card .l { color: #6b7280; font-size: .8rem; } .stat-card .v { font-size: 1.45rem; font-weight: 700; color: #1f2937; line-height: 1.3; }
.stat-card .v small { font-size: .8rem; font-weight: 400; color: #9ca3af; } .stat-card .s { font-size: .72rem; color: #9ca3af; }
.panel-title { font-size: .95rem; font-weight: 700; color: #1f2937; display: flex; align-items: center; gap: .5rem; }
.panel-title .ic { color: var(--accent); } .panel-title small { font-weight: 400; font-size: .72rem; color: #9ca3af; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; } @media (min-width: 1024px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-md-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; } @media (min-width: 768px) { .grid-md-2 { grid-template-columns: 1fr 1fr; } }
.progress { height: 6px; border-radius: 10px; background: #e5e7eb; overflow: hidden; } .progress i { display: block; height: 100%; border-radius: 10px; background: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; padding: .15rem .6rem; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.badge .ic { font-size: .5rem; }
.b-green { background: var(--green-bg); color: var(--green-ink); } .b-yellow { background: var(--amber-bg); color: var(--amber-ink); }
.b-red { background: var(--red-bg); color: var(--red-ink); } .b-blue { background: var(--blue-bg); color: var(--brand); } .b-gray { background: #f3f4f6; color: #4b5563; }
.table-wrap { max-height: 380px; overflow: auto; margin-top: 1rem; }
.table-wrap.tall { max-height: none; }
.table-wrap::-webkit-scrollbar { width: 5px; height: 5px; } .table-wrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
thead th { position: sticky; top: 0; background: #f9fafb; text-align: left; color: #6b7280; font-weight: 600; padding: .6rem .6rem; border-bottom: 1px solid #e5e7eb; white-space: nowrap; font-size: .8rem; }
tbody td { padding: .6rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; } tbody tr:hover { background: #f9fafb; }
td.num, th.num { text-align: right; } tfoot td { font-weight: 700; padding: .6rem; border-top: 2px solid #e5e7eb; background: #f9fafb; }
.empty { padding: 2rem 1rem; text-align: center; color: #9ca3af; font-size: .85rem; }
.search-box { position: relative; display: flex; align-items: center; }
.search-box .ic { position: absolute; left: .9rem; color: #94a3b8; }
.search-box input { border: 1px solid var(--line-2); border-radius: 2rem; padding: .45rem 1rem .45rem 2.4rem; outline: none; font-size: .85rem; background: #fff; min-width: 15rem; }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.site-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; } @media (min-width: 1024px) { .site-grid { grid-template-columns: 1fr 1fr; } }
.site-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 1rem; padding: 1rem; }
.site-card.offline { border-left-color: var(--red); } .site-card.unknown { border-left-color: #9ca3af; }
.site-card .name { font-weight: 700; color: #1f2937; } .site-card .name:hover { color: var(--accent); text-decoration: none; }
.mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; text-align: center; margin: .6rem 0; }
.mini { background: #f9fafb; border-radius: .6rem; padding: .5rem .25rem; min-width: 0; } .mini .k { font-size: 9px; color: #9ca3af; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mini .n { font-weight: 700; color: #1f2937; font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.site-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; font-size: .75rem; color: #6b7280; padding-top: .6rem; border-top: 1px solid #f3f4f6; }
.tagline { background: #f9fafb; padding: .2rem .55rem; border-radius: .4rem; display: inline-flex; align-items: center; gap: .3rem; }
.ap-chip { display: inline-flex; align-items: center; gap: .25rem; background: #f3f4f6; padding: .15rem .3rem .15rem .6rem; border-radius: 999px; margin: .4rem .3rem 0 0; font-size: .75rem; color: #4b5563; }
.ap-chip .icon-btn { width: 1.4rem; height: 1.4rem; border-radius: 50%; }
.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: .75rem; } @media (min-width: 640px) { .quick { grid-template-columns: repeat(5, 1fr); } }
.quick a, .quick button { background: #f9fafb; border: 0; border-radius: 1rem; padding: .8rem; text-align: center; color: #374151; font-size: .75rem; font-weight: 500; cursor: pointer; text-decoration: none; display: block; }
.quick a:hover, .quick button:hover { background: #f3f4f6; text-decoration: none; } .quick .ic { display: block; margin: 0 auto .3rem; font-size: 1.25rem; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.filters > div { flex: 1 1 10rem; } .filters .label { font-size: .75rem; color: #6b7280; }
.dl { display: grid; grid-template-columns: 9.5rem 1fr; gap: .55rem 1rem; margin: .75rem 0 0; font-size: .875rem; } .dl dt { color: #6b7280; } .dl dd { margin: 0; color: #1f2937; word-break: break-word; }
.timeline { list-style: none; margin: .75rem 0 0; padding: 0; font-size: .85rem; } .timeline li { padding: .35rem 0 .35rem 1rem; border-left: 3px solid #e5e7eb; margin-left: .3rem; }
.pager { display: flex; gap: .6rem; align-items: center; justify-content: center; margin-top: 1rem; }
.codes { columns: 3 13rem; font-size: 1.05rem; margin-top: 1rem; } .codes div { padding: .3rem 0; break-inside: avoid; }
.chip-check { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .9rem; border: 1.5px solid var(--line-2); border-radius: 2rem; font-size: .8rem; font-weight: 600; color: #475569; cursor: pointer; background: #fff; margin: 0; }
.chip-check input { width: auto; margin: 0; accent-color: var(--accent); }
.chart { overflow-x: auto; } .chart > svg { width: 100%; min-width: 560px; height: auto; display: block; } .chart text { font-size: 10px; fill: #94a3b8; font-family: var(--font); }
.chart .grid { stroke: #eef2f7; stroke-width: 1; } .chart .area { fill: url(#areaGrad); } .chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: #fff; stroke: var(--accent); stroke-width: 2; } .chart .bar { fill: var(--accent); } .chart .bar:hover { fill: #1d4ed8; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .75rem; color: #6b7280; }
.legend i { display: inline-block; width: .7rem; height: .7rem; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.check-row { display: flex; align-items: center; gap: .6rem; font-size: .85rem; padding: .35rem 0; } .check-row .ic { color: var(--green); } .check-row .ic.bad { color: var(--red); }

/* modals */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); backdrop-filter: blur(4px); z-index: 1000; justify-content: center; align-items: center; padding: 1rem; }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border-radius: 1.25rem; max-width: 28rem; width: 100%; max-height: 90vh; overflow-y: auto; padding: 1.5rem; position: relative; box-shadow: 0 20px 25px -5px rgba(0,0,0,.1); animation: modalSlide .3s ease; }
@keyframes modalSlide { from { transform: translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close { position: absolute; top: .9rem; right: 1rem; background: none; border: 0; color: #94a3b8; cursor: pointer; font-size: 1.2rem; padding: .3rem; } .modal-close:hover { color: #1e293b; }
.modal-box h2 { font-size: 1.25rem; font-weight: 700; color: #1f2937; display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; } .modal-box h2 .ic { color: var(--accent); }
.modal-box .label { font-size: .85rem; color: #334155; }

@media (max-width: 480px) { .glass { padding: 1.5rem 1rem; border-radius: 2rem; } .card-shell { border-radius: 1.8rem; } .card-body { padding: 1.2rem; }
  .brand-icon { width: 3.5rem; height: 3.5rem; font-size: 1.6rem; } .brand-title { font-size: 1.6rem; } .method-grid { gap: .5rem; } .admin-body { padding: 1rem; } .page-head h1 { font-size: 1.5rem; } .dl { grid-template-columns: 1fr; gap: .1rem; } .dl dd { margin-bottom: .5rem; } }
@media print { .no-print, .nav-pills, .lang-mini, #toasts { display: none !important; } body { background: #fff; } .admin-body { padding: 0; } .panel, .stat-card { box-shadow: none; } .table-wrap { max-height: none; overflow: visible; } }

/* ---------- devices & manuals ---------- */
.dev-svg { width: 100%; height: auto; display: block; } .dev-img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: .6rem; }
.dev-mini { display: inline-block; width: 2.2rem; vertical-align: middle; margin-right: .35rem; }
.dev-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; } @media (min-width: 720px) { .dev-grid { grid-template-columns: 1fr 1fr; } } @media (min-width: 1100px) { .dev-grid { grid-template-columns: repeat(3, 1fr); } }
.dev-card { background: #fff; border: 1px solid var(--line); border-radius: 1.25rem; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; box-shadow: 0 4px 6px -2px rgba(0,0,0,.04); border-top: 4px solid #2563eb; }
.dev-card.offline { border-top-color: var(--red); } .dev-card.unknown { border-top-color: #9ca3af; } .dev-card.problem { border-top-color: var(--amber); }
.dev-top { display: flex; gap: .9rem; align-items: center; } .dev-pic { flex: 0 0 5.5rem; height: 4.2rem; background: #f8fafc; border-radius: .9rem; padding: .35rem; }
.dev-name { font-weight: 700; color: #1f2937; line-height: 1.25; } .dev-sub { font-size: .78rem; color: #6b7280; }
.dev-meta { display: grid; grid-template-columns: 5.2rem 1fr; gap: .2rem .6rem; font-size: .78rem; } .dev-meta dt { color: #9ca3af; } .dev-meta dd { margin: 0; color: #374151; word-break: break-all; }
.problem-box { background: #fffbeb; border: 1px solid #fde68a; color: #854d0e; border-radius: .8rem; padding: .55rem .7rem; font-size: .78rem; } .problem-box strong { display: block; }
.sdot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #9ca3af; margin-right: .3rem; } .sdot.online { background: var(--green); } .sdot.offline { background: var(--red); }
.md { max-width: 52rem; } .md-h { color: #1f2937; margin: 1.4rem 0 .5rem; line-height: 1.3; } h2.md-h { font-size: 1.5rem; margin-top: 0; } h3.md-h { font-size: 1.15rem; } h4.md-h { font-size: 1rem; }
.md p { margin: .55rem 0; color: #374151; } .md code { background: #f1f5f9; padding: .1rem .35rem; border-radius: .35rem; font-size: .85em; }
.md-code { background: #0b1d3a; color: #e2e8f0; border-radius: .9rem; padding: 1rem; overflow-x: auto; font-size: .82rem; line-height: 1.5; } .md-code code { background: none; padding: 0; color: inherit; }
.md-list { padding-left: 1.3rem; color: #374151; } .md-list li { margin: .3rem 0; } .md-quote { border-left: 4px solid #f59e0b; background: #fffbeb; margin: .8rem 0; padding: .6rem .9rem; border-radius: 0 .7rem .7rem 0; color: #854d0e; }
.manual-card { display: flex; gap: .8rem; align-items: center; justify-content: space-between; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
@media print { .dev-card { break-inside: avoid; } .md-code { background: #f1f5f9; color: #111; } }
.problem-box .ic { float: left; margin: .12rem .45rem 0 0; }
