:root {
  --portal-ink: #14213d;
  --portal-muted: #60708a;
  --portal-line: #d8e4ef;
  --portal-surface: #ffffff;
  --portal-surface-soft: #f5f9fc;
  --portal-navy: #123b63;
  --portal-blue: #087ea4;
  --portal-teal: #0b9f8a;
  --portal-success: #087a5b;
  --portal-warning: #a56212;
  --portal-danger: #b53a4b;
  --portal-shadow: 0 14px 34px rgba(21, 48, 77, .10);
}

html { background: #eaf1f6; }
body {
  color: var(--portal-ink) !important;
  background-color: #eaf1f6 !important;
  background-image: linear-gradient(135deg, rgba(18, 59, 99, .055) 25%, transparent 25%), linear-gradient(225deg, rgba(8, 158, 138, .045) 25%, transparent 25%) !important;
  background-size: 28px 28px !important;
  font-family: "Noto Sans", "Segoe UI", sans-serif !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(8, 126, 164, .32); outline-offset: 2px; }

/* Dashboard */
.sidebar { background: linear-gradient(180deg, #123b63, #0d2d4d) !important; border-right: 0 !important; box-shadow: 8px 0 28px rgba(9, 35, 59, .16) !important; }
.brand { border-bottom-color: rgba(255, 255, 255, .14) !important; }
.brand h1, .nav-btn, .logout { color: #f8fcff !important; }
.brand p, .version { color: #aec5d7 !important; }
.logo { background: transparent !important; color: #123b63 !important; box-shadow: none !important; }
.logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.nav-btn:hover, .nav-btn.active { background: rgba(255, 255, 255, .13) !important; border-color: rgba(255, 255, 255, .14) !important; color: #ffffff !important; box-shadow: inset 3px 0 0 #f7b84b !important; }
.nav-icon { background: rgba(255, 255, 255, .12) !important; box-shadow: none !important; }
.nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sidebar .brand h1, .sidebar .nav-btn, .sidebar .nav-sub-btn, .sidebar .logout { font-family: "Segoe UI", "Noto Sans", sans-serif !important; }
.sidebar .brand h1 { font-weight: 700 !important; }
.nav-btn { min-height: 42px !important; color: #d9e7f1 !important; font-size: 13px !important; font-weight: 600 !important; letter-spacing: .01em; }
.nav-btn.active, .nav-btn:hover { color: #fff !important; font-weight: 650 !important; }
.nav-icon { width: 27px !important; height: 27px !important; border-radius: 8px !important; }
.nav-group-trigger { position: relative; }
.nav-group-caret { display: grid; width: 18px; height: 18px; margin-left: auto; place-items: center; color: #b9ccda; transition: transform .16s ease; }
.nav-group-caret svg, .profile-menu-caret svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nav-group.open .nav-group-caret { transform: rotate(180deg); }
.nav-group.active .nav-group-trigger { background: rgba(255, 255, 255, .09) !important; border-color: transparent !important; box-shadow: none !important; }
.nav-submenu { display: grid; gap: 3px; margin: 3px 0 5px 38px; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .22); }
.nav-submenu[hidden] { display: none; }
.nav-sub-btn { position: relative; display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 6px 8px; border: 0; border-radius: 7px; background: transparent; color: #bfd2df; font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .01em; text-align: left; cursor: pointer; }
.nav-sub-btn:hover, .nav-sub-btn.active { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.nav-sub-btn.active::before { position: absolute; left: -16px; width: 8px; height: 8px; border: 2px solid #123b63; border-radius: 50%; background: #f7b84b; box-shadow: 0 0 0 2px #f7b84b; content: ""; }
.nav-sub-icon { display: grid; width: 17px; height: 17px; place-items: center; color: #f7b84b; }
.nav-sub-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.logout { background: rgba(255, 255, 255, .10) !important; border-color: rgba(255, 255, 255, .16) !important; font-size: 13px !important; font-weight: 600 !important; }
@media (min-width: 981px) {
  .sidebar-collapsed .app-shell { transition: grid-template-columns .18s ease; }
  .sidebar-collapsed .app-shell:has(.sidebar:hover),
  .sidebar-collapsed .app-shell:has(.sidebar:focus-within) { grid-template-columns: var(--sidebar) minmax(0, 1fr) !important; }
  .sidebar-collapsed .sidebar { overflow: visible; }
  .sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand { justify-content: center; }
  .sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .brand > div:last-child,
  .sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-label,
  .sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group-caret,
  .sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-submenu,
  .sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .logout { display: none !important; }
  .sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-btn { justify-content: center; padding-left: 0 !important; padding-right: 0 !important; }
  .sidebar-collapsed .sidebar:not(:hover):not(:focus-within) .nav-group { width: 100%; }
  .sidebar-collapsed .sidebar:hover,
  .sidebar-collapsed .sidebar:focus-within { padding-inline: 14px !important; }
  .sidebar-collapsed .sidebar:hover .brand > div:last-child,
  .sidebar-collapsed .sidebar:focus-within .brand > div:last-child,
  .sidebar-collapsed .sidebar:hover .nav-label,
  .sidebar-collapsed .sidebar:focus-within .nav-label,
  .sidebar-collapsed .sidebar:hover .nav-group-caret,
  .sidebar-collapsed .sidebar:focus-within .nav-group-caret,
  .sidebar-collapsed .sidebar:hover .sidebar-foot,
  .sidebar-collapsed .sidebar:focus-within .sidebar-foot { display: block !important; }
  .sidebar-collapsed .sidebar:hover .nav-btn,
  .sidebar-collapsed .sidebar:focus-within .nav-btn { justify-content: flex-start !important; padding-left: 12px !important; padding-right: 12px !important; }
  .sidebar-collapsed .sidebar:hover .nav-submenu:not([hidden]),
  .sidebar-collapsed .sidebar:focus-within .nav-submenu:not([hidden]) { display: grid !important; }
}
.workspace { max-width: 1580px; width: 100%; margin: 0 auto; }
.topbar { background: rgba(255, 255, 255, .72) !important; border-radius: 0 0 14px 14px; padding: 14px 16px !important; backdrop-filter: blur(10px); }
.topbar h2 { font-size: 19px !important; letter-spacing: 0 !important; color: var(--portal-navy); }
.topbar p, .card-subtitle, .muted { font-size: 12px !important; }
.sidebar-toggle { border-radius: 9px !important; color: var(--portal-navy) !important; }
.user-chip { border-color: var(--portal-line) !important; background: #fff !important; }
.avatar { background: var(--portal-teal) !important; }
.profile-menu { position: relative; }
.profile-menu-toggle { cursor: pointer; }
.profile-menu-caret { display: grid; width: 18px; height: 18px; place-items: center; color: var(--portal-muted); transition: transform .16s ease; }
.profile-menu-toggle[aria-expanded="true"] .profile-menu-caret { transform: rotate(180deg); }
.profile-menu-list { position: absolute; z-index: 80; top: calc(100% + 8px); right: 0; width: 250px; padding: 6px; border: 1px solid var(--portal-line); border-radius: 10px; background: #fff; box-shadow: 0 18px 38px rgba(21, 48, 77, .18); }
.profile-menu-list[hidden] { display: none; }
.profile-menu-item { display: grid; gap: 1px; width: 100%; padding: 10px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--portal-ink); text-align: left; text-decoration: none; cursor: pointer; }
.profile-menu-item:hover, .profile-menu-item:focus-visible { background: #edf7f8; outline: 0; }
.profile-menu-item span { font-weight: 800; }
.profile-menu-item small { color: var(--portal-muted); font-size: 12px; }
.profile-menu-item.danger { margin-top: 4px; border-top: 1px solid #e8edf1; border-radius: 0 0 7px 7px; color: var(--portal-danger); }
.profile-menu-item.danger:hover { background: #fff2f3; }
.card, .stat, .info-box, .tabs, .ticket-inbox { border-radius: 10px !important; border-color: var(--portal-line) !important; box-shadow: var(--portal-shadow) !important; background: var(--portal-surface) !important; }
.card { border-top: 3px solid rgba(8, 126, 164, .62) !important; }
.card-title, .invoice-no, .pane-title h3 { color: var(--portal-navy) !important; letter-spacing: 0 !important; }
.card-title { font-size: 11px !important; }
.invoice-no { font-size: 23px !important; }
.pane-title h3 { font-size: 17px !important; }
.big-total { color: var(--portal-navy) !important; font-size: 34px !important; letter-spacing: 0 !important; }
.stat { border-top: 3px solid rgba(11, 159, 138, .54) !important; }
.notice { border-radius: 10px !important; border-color: #b9e6de !important; background: #edfaf7 !important; }
.notice-icon { background: var(--portal-teal) !important; }
.notice-billing-active { border: 1px solid #f3bb4f !important; border-left: 5px solid #e58b10 !important; background: linear-gradient(90deg, #fff2d3, #fffaf0) !important; box-shadow: 0 8px 18px rgba(194, 112, 9, .13); }
.notice-billing-active .notice-icon { background: #e58b10 !important; color: #fff !important; box-shadow: 0 0 0 4px rgba(229, 139, 16, .16); }
.notice-billing-active b { color: #8a4308 !important; }
.notice-billing-active span { color: #74440d !important; }
.account-list .row { display: grid !important; grid-template-columns: minmax(112px, 34%) minmax(0, 1fr); align-items: start; border-bottom-color: #e7eef4 !important; }
.account-list .row span { min-width: 0; }
.account-list .row strong { min-width: 0; overflow-wrap: anywhere; text-align: right !important; }
.btn { border-radius: 8px !important; font-weight: 800 !important; }
.btn { min-height: 36px !important; padding: 8px 11px !important; font-size: 12px !important; }
.btn.primary, .btn:not(.soft):not(.good) { background: var(--portal-blue) !important; border-color: var(--portal-blue) !important; }
.btn.good { background: var(--portal-success) !important; border-color: var(--portal-success) !important; }
.btn.soft { background: #f3f8fb !important; border-color: #cfdee9 !important; color: var(--portal-navy) !important; }
.pill.good { background: #e6f7f1 !important; color: var(--portal-success) !important; }
.pill.warn { background: #fff5df !important; color: var(--portal-warning) !important; }
.pill.bad { background: #fff0f2 !important; color: var(--portal-danger) !important; }
.portal-table th { background: #eaf4f8 !important; color: var(--portal-navy) !important; }
.portal-table tr:hover td { background: #f3fafb !important; }
.tab-btn.active { color: var(--portal-blue) !important; border-bottom-color: var(--portal-blue) !important; }
.field input, .field select, .field textarea, .pay-field select { border-color: #c8d8e5 !important; border-radius: 8px !important; background: #fbfdff !important; }
.field input:focus, .field select:focus, .field textarea:focus, .pay-field select:focus { border-color: var(--portal-blue) !important; box-shadow: 0 0 0 3px rgba(8, 126, 164, .12) !important; }
.account-password-hint { margin-top: -3px; }
.modal { border-radius: 12px !important; border-top: 4px solid var(--portal-teal); }
.modal-head { background: #f3f9fb !important; }

/* Login */
.auth-shell { padding: 28px 18px !important; }
.intro, .panel { border-radius: 12px !important; border-color: var(--portal-line) !important; box-shadow: var(--portal-shadow) !important; }
.intro { background: linear-gradient(150deg, #123b63, #0d5373) !important; color: #fff !important; }
.intro .brand h1, .intro h2 { color: #fff !important; letter-spacing: 0 !important; }
.intro .brand p, .intro-copy, .feature small { color: #d6e6f0 !important; }
.intro .logo { background: #f7b84b !important; color: var(--portal-navy) !important; }
.feature { border-radius: 9px !important; border-color: rgba(255, 255, 255, .17) !important; background: rgba(255, 255, 255, .09) !important; box-shadow: none !important; }
.feature span:first-child { background: #f7b84b !important; color: var(--portal-navy) !important; }
.panel { background: #fff !important; }
.panel h2 { color: var(--portal-navy); letter-spacing: 0 !important; }
.panel h2 { font-size: 20px !important; }
.intro h2 { font-size: 28px !important; }
.intro-copy, .feature small, .help, .field label { font-size: 12px !important; }
.password-toggle { border-radius: 6px !important; color: var(--portal-blue) !important; }
.help { border-radius: 8px !important; border-color: #cfe0ea !important; background: #f2f8fa !important; }

/* Browser invoice views only. Print keeps the established A4 document intact. */
.toolbar { border-radius: 10px; background: rgba(255, 255, 255, .78); padding: 8px !important; box-shadow: 0 8px 20px rgba(21, 48, 77, .07); }
.sheet { border-radius: 10px !important; border-color: #d6e3eb !important; box-shadow: var(--portal-shadow) !important; }
.party-grid > div, .totals, .pay-instructions { border-radius: 8px !important; }
.invoice-table th { background: #eaf4f8 !important; color: var(--portal-navy) !important; }
@media print {
  body { background: #fff !important; }
  .toolbar { display: none !important; }
  .sheet { box-shadow: none !important; border: 0 !important; border-radius: 0 !important; }
}
@media (max-width: 980px) {
  .workspace { padding: 10px 12px 24px !important; }
  .topbar { border-radius: 10px; }
}
@media (max-width: 640px) {
  .auth-shell { padding: 12px !important; }
  .intro, .panel { border-radius: 10px !important; }
  .topbar { align-items: flex-start !important; }
  .user-chip { max-width: 48px; overflow: hidden; padding: 4px !important; }
  .chip-copy { display: none !important; }
  .profile-menu-list { position: fixed; top: 68px; right: 12px; width: min(280px, calc(100vw - 24px)); }
  .card, .stat, .info-box, .tabs, .ticket-inbox { border-radius: 8px !important; }
  .account-list .row { grid-template-columns: 1fr !important; gap: 3px; }
  .account-list .row strong { text-align: left !important; }
  .toolbar { width: calc(100% - 16px) !important; gap: 5px !important; }
}
/* ==========================================================================
   Desain portal v2: latar bersih, sidebar gradasi, kartu lembut, tombol gradasi, panel Wi-Fi & perangkat.
   Hanya mengubah tampilan; struktur dan perilaku halaman tidak berubah.
   ========================================================================== */
:root {
  --rk-ink: #0f1f3d; --rk-muted: #5b6b86; --rk-line: #e3eaf3; --rk-bg: #f3f6fb; --rk-card: #ffffff;
  --rk-a: #2563eb; --rk-b: #06b6d4; --rk-c: #7c3aed; --rk-ok: #059669; --rk-warn: #d97706; --rk-err: #dc2626;
  --rk-grad: linear-gradient(135deg, #2563eb 0%, #0891b2 100%);
  --rk-shadow-sm: 0 1px 2px rgba(15, 31, 61, .05), 0 4px 14px rgba(15, 31, 61, .05);
  --rk-shadow-md: 0 2px 4px rgba(15, 31, 61, .05), 0 14px 36px rgba(15, 31, 61, .09);
  --rk-radius: 18px;
}
html { background: var(--rk-bg) !important; scroll-behavior: smooth; }
body {
  background-color: var(--rk-bg) !important;
  background-image: radial-gradient(900px 420px at 100% -8%, rgba(37, 99, 235, .10), transparent 60%), radial-gradient(700px 380px at -6% 108%, rgba(6, 182, 212, .09), transparent 60%) !important;
  background-size: auto !important; background-attachment: fixed !important;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif !important;
  font-size: 14px !important; color: var(--rk-ink) !important; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .card-title { letter-spacing: -.01em; }

/* Sidebar */
.sidebar { background: linear-gradient(185deg, #0b1d3f 0%, #0f2f63 55%, #0b3a5c 100%) !important; box-shadow: 10px 0 40px rgba(11, 29, 63, .18) !important; }
.sidebar .brand { padding-bottom: 18px !important; border-bottom: 1px solid rgba(255, 255, 255, .10) !important; }
.logo { width: 42px !important; height: 42px !important; border-radius: 13px !important; background: linear-gradient(135deg, #38bdf8, #6366f1) !important; color: #fff !important; font-weight: 800 !important; box-shadow: 0 8px 20px rgba(56, 189, 248, .35) !important; overflow: hidden; display: grid; place-items: center; }
.brand h1 { font-size: 15px !important; font-weight: 800 !important; letter-spacing: -.01em !important; }
.brand p { font-size: 11px !important; letter-spacing: .04em; text-transform: uppercase; color: #8fb0d6 !important; }
.nav-btn { border-radius: 13px !important; color: #c8d9f0 !important; font-weight: 600 !important; transition: background .15s, transform .15s, color .15s !important; border: 1px solid transparent !important; }
.nav-btn:hover { background: rgba(255, 255, 255, .08) !important; color: #fff !important; box-shadow: none !important; transform: translateX(2px); }
.nav-btn.active { background: linear-gradient(135deg, rgba(56, 189, 248, .28), rgba(99, 102, 241, .28)) !important; color: #fff !important; border-color: rgba(255, 255, 255, .16) !important; box-shadow: 0 8px 22px rgba(8, 20, 48, .35) !important; }
.nav-icon { border-radius: 10px !important; background: rgba(255, 255, 255, .08) !important; }
.nav-btn.active .nav-icon { background: rgba(255, 255, 255, .20) !important; }
.logout { border-radius: 13px !important; background: rgba(255, 255, 255, .07) !important; border: 1px solid rgba(255, 255, 255, .14) !important; color: #e8f1ff !important; font-weight: 700 !important; transition: background .15s !important; }
.logout:hover { background: rgba(244, 63, 94, .22) !important; }

/* Topbar */
.topbar { background: rgba(255, 255, 255, .82) !important; backdrop-filter: blur(14px); border: 1px solid var(--rk-line) !important; border-radius: var(--rk-radius) !important; box-shadow: var(--rk-shadow-sm) !important; position: sticky; top: 10px; z-index: 20; }
.topbar h2 { font-size: 20px !important; font-weight: 800 !important; color: var(--rk-ink) !important; }
.topbar p { color: var(--rk-muted) !important; }
.sidebar-toggle { border-radius: 12px !important; border: 1px solid var(--rk-line) !important; background: #fff !important; }
.user-chip { border-radius: 14px !important; border: 1px solid var(--rk-line) !important; background: #fff !important; box-shadow: var(--rk-shadow-sm) !important; }
.avatar { background: var(--rk-grad) !important; color: #fff !important; border-radius: 12px !important; font-weight: 800 !important; }
.profile-menu-list { border-radius: 14px !important; border: 1px solid var(--rk-line) !important; box-shadow: var(--rk-shadow-md) !important; }

/* Kartu, tombol, form */
.card { background: var(--rk-card) !important; border: 1px solid var(--rk-line) !important; border-radius: var(--rk-radius) !important; box-shadow: var(--rk-shadow-sm) !important; border-top: 1px solid var(--rk-line) !important; padding: 20px !important; overflow: hidden; }
.card-header { border-bottom: 1px solid var(--rk-line) !important; background: transparent !important; padding-bottom: 12px !important; margin-bottom: 14px !important; }
.card-title { font-weight: 800 !important; color: var(--rk-ink) !important; }
.card-subtitle, .muted, .hint { color: var(--rk-muted) !important; }
.btn { border-radius: 12px !important; font-weight: 700 !important; border: 1px solid var(--rk-line) !important; background: #fff !important; color: var(--rk-ink) !important; box-shadow: var(--rk-shadow-sm) !important; transition: transform .12s, box-shadow .12s, filter .12s !important; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--rk-shadow-md) !important; }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--rk-grad) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 10px 22px rgba(37, 99, 235, .28) !important; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.good { background: linear-gradient(135deg, #059669, #10b981) !important; color: #fff !important; border-color: transparent !important; box-shadow: 0 10px 22px rgba(5, 150, 105, .26) !important; }
.btn.soft { background: #eef4ff !important; color: var(--rk-a) !important; border-color: #dbe7ff !important; box-shadow: none !important; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.field label { font-weight: 700 !important; color: #33415c !important; letter-spacing: .01em; }
.field input, .field select, .field textarea, .pay-field select { border: 1.5px solid #d5dfee !important; border-radius: 12px !important; background: #fff !important; min-height: 44px; transition: border-color .15s, box-shadow .15s !important; }
.field input:focus, .field select:focus, .field textarea:focus, .pay-field select:focus { border-color: var(--rk-a) !important; box-shadow: 0 0 0 4px rgba(37, 99, 235, .14) !important; outline: none !important; }
.alert { border-radius: 14px !important; font-weight: 600; }
.alert.ok { background: #ecfdf5 !important; border: 1px solid #a7f3d0 !important; color: #065f46 !important; }
.alert.err { background: #fef2f2 !important; border: 1px solid #fecaca !important; color: #991b1b !important; }
.pill, .ticket-stat-pill { border-radius: 999px !important; font-weight: 700 !important; }

/* Notifikasi tagihan, ringkasan, KPI */
.notice { border-radius: 16px !important; border: 1px solid #fde7b3 !important; background: linear-gradient(135deg, #fff9ea, #fff3d6) !important; box-shadow: var(--rk-shadow-sm) !important; }
.notice-icon { background: linear-gradient(135deg, #f59e0b, #f97316) !important; color: #fff !important; border-radius: 12px !important; box-shadow: 0 8px 18px rgba(245, 158, 11, .35) !important; }
.grid-hero > .card:first-child { background: radial-gradient(520px 220px at 100% 0%, rgba(6, 182, 212, .13), transparent 62%), linear-gradient(180deg, #ffffff, #f8fbff) !important; position: relative; }
.grid-hero > .card:first-child::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--rk-grad); }
.big-total { font-weight: 900 !important; letter-spacing: -.03em !important; background: var(--rk-grad); -webkit-background-clip: text; background-clip: text; color: transparent !important; font-size: 40px !important; }
.invoice-no { font-weight: 800 !important; }
.stats .stat { background: var(--rk-card) !important; border: 1px solid var(--rk-line) !important; border-radius: 16px !important; box-shadow: var(--rk-shadow-sm) !important; position: relative; overflow: hidden; padding-left: 20px !important; }
.stats .stat::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--rk-grad); }
.stats .stat:nth-child(2)::before { background: linear-gradient(180deg, #f59e0b, #f97316); }
.stats .stat:nth-child(3)::before { background: linear-gradient(180deg, #10b981, #059669); }
.stats .stat:nth-child(4)::before { background: linear-gradient(180deg, #8b5cf6, #7c3aed); }
.stat strong, .stat b { font-weight: 900 !important; letter-spacing: -.02em; }
.row { border-color: var(--rk-line) !important; }
.row strong { color: var(--rk-ink) !important; }
.table-wrap { border: 1px solid var(--rk-line) !important; border-radius: 14px !important; overflow: auto; }
table th { background: #f4f7fd !important; color: #475569 !important; font-size: 11.5px !important; text-transform: uppercase; letter-spacing: .05em; }

/* Panel Wi-Fi & perangkat */
.wifi-hero { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 20px 22px; margin-bottom: 14px; border-radius: 20px; color: #fff; background: radial-gradient(600px 240px at 100% 0%, rgba(125, 211, 252, .35), transparent 60%), linear-gradient(135deg, #1d4ed8 0%, #0e7490 100%); box-shadow: 0 18px 40px rgba(29, 78, 216, .28); }
.wifi-hero[hidden] { display: none; }
.wifi-hero-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28); }
.wifi-hero-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.wifi-hero-main { display: grid; gap: 2px; min-width: 0; }
.wifi-hero-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; font-weight: 700; }
.wifi-hero-main strong { font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.wifi-hero-main small { opacity: .9; font-size: 12px; }
.wifi-hero-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.wifi-hero-stats > div { min-width: 108px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); display: grid; gap: 2px; }
.wifi-hero-stats span { font-size: 11px; opacity: .88; font-weight: 600; }
.wifi-hero-stats strong { font-size: 24px; font-weight: 900; line-height: 1; }
.wifi-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(360px, 1.2fr); gap: 14px; align-items: start; }
.wifi-list { display: grid; gap: 14px; }
.wifi-list:empty { display: none; }
#wifiCard > .hint, #devicesCard > .hint { margin: 6px 0 4px; }
#wifiCard > .alert { margin: 12px 0 0; }
.wifi-form { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--rk-line); border-radius: 16px; background: linear-gradient(180deg, #fbfdff, #f5f9ff); }
.wifi-form-head { display: flex; align-items: center; gap: 10px; }
.wifi-band { padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--rk-grad); letter-spacing: .02em; }
.wifi-form-title { font-weight: 700; color: var(--rk-muted); font-size: 12.5px; }
.wifi-fields { display: grid; gap: 12px; }
.wifi-form .actions { display: flex; justify-content: flex-end; }
.wifi-refresh { margin-left: auto; }
#devicesCard .card-header { display: flex; align-items: center; gap: 12px; }
.device-tabs { display: flex; gap: 8px; padding: 0 0 12px; }
.device-tab { border: 1px solid var(--rk-line); background: #fff; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 12.5px; color: var(--rk-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: all .15s; }
.device-tab b { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #eef2f8; color: #475569; font-size: 11.5px; text-align: center; }
.device-tab.active { background: var(--rk-grad); color: #fff; border-color: transparent; box-shadow: 0 8px 18px rgba(37, 99, 235, .25); }
.device-tab.active b { background: rgba(255, 255, 255, .25); color: #fff; }
.device-grid { display: grid; gap: 10px; }
.device-grid:empty { display: none; }
.device-card { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px; border: 1px solid var(--rk-line); border-radius: 16px; background: #fff; transition: box-shadow .15s, transform .15s, border-color .15s; }
.device-card:hover { box-shadow: var(--rk-shadow-md); transform: translateY(-1px); border-color: #cddcf3; }
.device-card.is-online { border-color: #cfe8dd; background: linear-gradient(180deg, #ffffff, #f6fcf9); }
.device-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #eef4ff; color: var(--rk-a); }
.device-card.is-online .device-icon { background: #e3f8ef; color: var(--rk-ok); }
.device-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.device-body { display: grid; gap: 7px; min-width: 0; }
.device-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.device-name { font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.device-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; }
.device-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.device-status.on { background: #dcfce7; color: #047857; }
.device-status.on::before { animation: rkPulse 1.8s ease-out infinite; }
.device-status.off { background: #f1f5f9; color: #64748b; }
@keyframes rkPulse { 0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); } 100% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); } }
.device-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 8px; background: #f1f5fb; color: #334155; font-size: 11.5px; font-weight: 700; }
.chip.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.chip.warn { background: #fff4dc; color: #92580a; }
.device-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--rk-muted); }
.device-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 12px; background: #f4f7fd; color: var(--rk-muted); font-size: 12px; line-height: 1.5; }
.device-note[hidden] { display: none; }
@media (max-width: 1100px) { .wifi-grid { grid-template-columns: 1fr; } .wifi-hero { grid-template-columns: auto 1fr; } .wifi-hero-stats { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 560px) { .device-card { grid-template-columns: 1fr; } .wifi-hero-stats > div { flex: 1; min-width: 92px; } }

/* Login */
.auth-shell { background: transparent !important; }
.auth-card { border-radius: 26px !important; overflow: hidden !important; box-shadow: 0 30px 80px rgba(15, 31, 61, .20) !important; border: 1px solid rgba(255, 255, 255, .6) !important; }
.auth-card .intro { background: radial-gradient(520px 320px at 100% 0%, rgba(56, 189, 248, .30), transparent 62%), radial-gradient(420px 300px at 0% 100%, rgba(139, 92, 246, .32), transparent 62%), linear-gradient(160deg, #0b1d3f 0%, #123f7a 100%) !important; }
.auth-card .intro .logo { background: linear-gradient(135deg, #38bdf8, #6366f1) !important; color: #fff !important; }
.auth-card .intro h2 { font-weight: 900 !important; letter-spacing: -.03em !important; font-size: 30px !important; line-height: 1.15 !important; }
.auth-card .feature { border-radius: 16px !important; background: rgba(255, 255, 255, .08) !important; border: 1px solid rgba(255, 255, 255, .14) !important; backdrop-filter: blur(6px); }
.auth-card .feature > span { background: linear-gradient(135deg, #38bdf8, #6366f1) !important; color: #fff !important; border-radius: 11px !important; }
.auth-card .panel { background: #fff !important; }
.auth-card .panel h2 { font-weight: 900 !important; color: var(--rk-ink) !important; letter-spacing: -.02em; }
.auth-card .btn, .panel .btn { background: var(--rk-grad) !important; color: #fff !important; border: 0 !important; border-radius: 13px !important; min-height: 48px; font-weight: 800 !important; box-shadow: 0 14px 28px rgba(37, 99, 235, .30) !important; }
.msg { border-radius: 12px !important; }
.password-toggle { border-radius: 9px !important; color: var(--rk-a) !important; font-weight: 700; }
.help { border-radius: 12px !important; background: #f4f7fd !important; border: 1px solid var(--rk-line) !important; color: var(--rk-muted) !important; }

/* Jenis koneksi perangkat */
.device-summary { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; }
.chip.conn { font-weight: 800; }
.chip.conn-wifi24 { background: #e0f2fe; color: #075985; }
.chip.conn-wifi5 { background: #ede9fe; color: #5b21b6; }
.chip.conn-wifi { background: #e0f2fe; color: #075985; }
.chip.conn-ethernet { background: #ecfccb; color: #3f6212; }

/* Daftar tiket: baris tidak lagi meregang mengisi tinggi daftar */
.ticket-inbox-list { align-content: start !important; }
.ticket-thread { border-radius: 0 !important; transition: background .15s !important; }
.ticket-thread:hover { background: #f6f9ff !important; }
.ticket-inbox { border-radius: 18px !important; border-color: var(--rk-line) !important; }
.tab-btn.active { color: var(--rk-a) !important; }

/* Spesifisitas lebih tinggi agar mengalahkan aturan tombol lama */
body .btn { min-height: 42px !important; padding: 9px 16px !important; font-size: 13px !important; border-radius: 12px !important; }
body .btn.primary, body .btn:not(.soft):not(.good) { background: var(--rk-grad) !important; border-color: transparent !important; color: #fff !important; box-shadow: 0 10px 22px rgba(37, 99, 235, .28) !important; }
body .btn.good { background: linear-gradient(135deg, #059669, #10b981) !important; border-color: transparent !important; color: #fff !important; }
body .btn.soft { background: #eef4ff !important; border-color: #dbe7ff !important; color: var(--rk-a) !important; box-shadow: none !important; }
.auth-card { gap: 0 !important; background: #fff !important; }
.auth-card .intro, .auth-card .panel { border-radius: 0 !important; }
.auth-card .panel .btn[data-login-submit] { width: 100%; }

@media (prefers-reduced-motion: reduce) { .device-status.on::before { animation: none; } .btn, .nav-btn, .device-card { transition: none !important; } }

/* Ponsel: tabel riwayat pembayaran tampil sebagai kartu per invoice (tanpa gulir samping) */
@media (max-width: 640px) {
  #tab-payment .table-wrap { border: 0 !important; overflow: visible !important; }
  #tab-payment .portal-table, #tab-payment .portal-table tbody { display: block; width: 100% !important; min-width: 0 !important; }
  #tab-payment .portal-table thead { display: none; }
  #tab-payment .portal-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--rk-line); border-radius: 16px; background: #fff; box-shadow: var(--rk-shadow-sm); }
  #tab-payment .portal-table td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; overflow-wrap: anywhere; }
  #tab-payment .portal-table td::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--rk-muted); margin-bottom: 2px; }
  #tab-payment .portal-table td:nth-child(1) { grid-column: 1 / -1; }
  #tab-payment .portal-table td:nth-child(5) { align-self: end; }
  #tab-payment .portal-table td:nth-child(6) { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
  #tab-payment .portal-table td:nth-child(6)::before { display: none; }
  #tab-payment .portal-table td:nth-child(6) .btn { flex: 1 1 120px; text-align: center; justify-content: center; }
}
