:root {
    --ink: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --blue: #155eef;
    --cyan: #06aed4;
    --dark: #07111f;
    --panel: #ffffff;
    --bg: #f4f7fb;
}

* {
    letter-spacing: 0;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--dark);
    color: #fff;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1040;
}

.sidebar-backdrop {
    display: none;
}

.brand, .login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-weight: 800;
}

.brand span, .topbar p, .userbox span, .login-brand p, .login-note {
    color: var(--muted);
    margin: 0;
}

.sidebar .brand span {
    color: #9fb0c7;
    display: block;
    font-size: 13px;
}

.sidebar .nav-link {
    color: #c9d6e8;
    border-radius: 8px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    transition: transform .18s ease, background .18s ease, color .18s ease;
}

.sidebar .nav-link::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--blue), var(--cyan));
    transform: scaleY(0);
    transform-origin: center;
    transition: transform .18s ease;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    transform: translateX(4px);
}

.sidebar .nav-link:hover::before,
.sidebar .nav-link.active::before {
    transform: scaleY(1);
}

.sidebar .nav-link i,
.sidebar .nav-link span {
    position: relative;
    z-index: 1;
}

.main {
    padding: 24px;
}

.topbar {
    background: linear-gradient(135deg, #07111f, #123a66);
    color: #fff;
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.menu-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 8px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    display: none;
    place-items: center;
    flex: 0 0 auto;
}

.menu-toggle i {
    font-size: 26px;
    line-height: 1;
}

.topbar h1 {
    font-size: 26px;
    margin: 0 0 4px;
}

.topbar p, .userbox span {
    color: #b8c9df;
}

.userbox {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card, .panel, .login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 35px rgba(16, 24, 40, .06);
}

.stat-card {
    padding: 18px;
}

.stat-card span {
    color: var(--muted);
    font-size: 14px;
}

.stat-card strong {
    display: block;
    font-size: 28px;
    margin-top: 8px;
    overflow-wrap: anywhere;
}

.stat-card[class*="stat-card--"] {
    border: 0;
    color: #fff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 16px 34px rgba(16, 24, 40, .12);
}

.stat-card[class*="stat-card--"]::after {
    content: "";
    position: absolute;
    width: 96px;
    height: 96px;
    right: -32px;
    top: -34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
}

.stat-card[class*="stat-card--"] span,
.stat-card[class*="stat-card--"] strong {
    color: inherit;
    position: relative;
    z-index: 1;
}

.stat-card[class*="stat-card--"] span {
    display: block;
    min-height: 40px;
    color: rgba(255, 255, 255, .82);
    font-weight: 700;
    line-height: 1.35;
}

.stat-card[class*="stat-card--"] strong {
    line-height: 1.1;
}

.stat-card--revenue {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.stat-card--customer {
    background: linear-gradient(135deg, #1d4ed8, #38bdf8);
}

.stat-card--safe {
    background: linear-gradient(135deg, #15803d, #84cc16);
}

.stat-card--warning {
    background: linear-gradient(135deg, #b45309, #f59e0b);
}

.stat-card--partner {
    background: linear-gradient(135deg, #7c3aed, #c084fc);
}

.stat-card--income {
    background: linear-gradient(135deg, #be123c, #fb7185);
}

.stat-card--active {
    background: linear-gradient(135deg, #047857, #22c55e);
}

.stat-card--vpn {
    background: linear-gradient(135deg, #0369a1, #06b6d4);
}

.stat-card--pppoe {
    background: linear-gradient(135deg, #4338ca, #818cf8);
}

.stat-card--approval {
    background: linear-gradient(135deg, #c2410c, #fb923c);
}

.stat-card--reward {
    background: linear-gradient(135deg, #a16207, #eab308);
}

.stat-card--dashboard {
    background: linear-gradient(135deg, #334155, #64748b);
}

.panel {
    padding: 20px;
    margin-top: 18px;
}

.admin-dashboard-hero {
    min-height: 250px;
    border-radius: 8px;
    color: #fff;
    padding: 28px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(7, 17, 31, .82), rgba(21, 94, 239, .38)),
        url("https://images.unsplash.com/photo-1544197150-b99a580bb7a8?auto=format&fit=crop&w=1800&q=80") center/cover;
    box-shadow: 0 20px 48px rgba(16, 24, 40, .18);
}

.admin-dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(90deg, #000, transparent 78%);
    opacity: .45;
    animation: heroGridMove 12s linear infinite;
}

.admin-dashboard-hero::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -180px;
    top: -180px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
}

.admin-dashboard-hero__content,
.admin-dashboard-hero__status {
    position: relative;
    z-index: 1;
}

.admin-dashboard-hero h2 {
    font-size: 34px;
    font-weight: 800;
    margin: 10px 0 10px;
}

.admin-dashboard-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255, 255, 255, .86);
    line-height: 1.65;
}

.admin-dashboard-hero__status {
    display: grid;
    gap: 10px;
    min-width: 220px;
}

.admin-dashboard-hero__status span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .12);
    border-radius: 8px;
    padding: 11px 13px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

@keyframes heroGridMove {
    from { background-position: 0 0; }
    to { background-position: 46px 46px; }
}

.network-hero {
    border-radius: 8px;
    overflow: hidden;
    min-height: 210px;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    color: #fff;
    box-shadow: 0 16px 38px rgba(16, 24, 40, .18);
    background-size: cover;
    background-position: center;
}

.network-hero__content {
    max-width: 760px;
}

.network-hero h2 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
}

.network-hero p {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, .9);
}

.network-hero--mitra {
    background-image:
        linear-gradient(145deg, rgba(7, 17, 31, .62), rgba(21, 94, 239, .28)),
        url("https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1600&q=80");
}

.network-hero--pppoe {
    background-image:
        linear-gradient(145deg, rgba(7, 17, 31, .64), rgba(6, 174, 212, .26)),
        url("https://images.unsplash.com/photo-1544197150-b99a580bb7a8?auto=format&fit=crop&w=1600&q=80");
}

.ops-hero {
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a, #155eef 62%, #06aed4);
    color: #fff;
    padding: 26px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    box-shadow: 0 18px 42px rgba(16, 24, 40, .16);
}

.ops-hero h2 {
    margin: 5px 0 7px;
    font-size: 28px;
    font-weight: 800;
}

.ops-hero p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    max-width: 720px;
}

.ops-eyebrow {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .9);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ops-hero-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 800;
    color: #0f172a;
}

.ops-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.ops-metric {
    border-radius: 8px;
    color: #fff;
    padding: 18px;
    display: grid;
    gap: 8px;
    min-height: 126px;
    box-shadow: 0 14px 32px rgba(16, 24, 40, .12);
}

.ops-metric i {
    font-size: 25px;
    opacity: .9;
}

.ops-metric span {
    color: rgba(255, 255, 255, .82);
    font-weight: 700;
}

.ops-metric strong {
    color: #fff;
    font-size: 22px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.ops-metric--backup {
    background: linear-gradient(135deg, #1d4ed8, #38bdf8);
}

.ops-metric--latest {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.ops-metric--maintenance {
    background: linear-gradient(135deg, #7c2d12, #f97316);
}

.ops-metric--log {
    background: linear-gradient(135deg, #4338ca, #a78bfa);
}

.ops-grid {
    display: grid;
    grid-template-columns: minmax(320px, .85fr) minmax(0, 1.15fr);
    gap: 18px;
    align-items: start;
}

.ops-column {
    display: grid;
    gap: 18px;
    align-content: start;
    min-width: 0;
}

.ops-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 35px rgba(16, 24, 40, .06);
    padding: 20px;
    min-width: 0;
}

.ops-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 17px;
}

.ops-panel-head > div {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.ops-panel-head i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef4ff;
    color: var(--blue);
    font-size: 20px;
    flex: 0 0 auto;
}

.ops-panel-head h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.ops-pill, .ops-action-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.ops-pill--success {
    background: #dcfce7;
    color: #166534;
}

.ops-pill--danger {
    background: #fee2e2;
    color: #991b1b;
}

.ops-form, .ops-import {
    display: grid;
    gap: 14px;
}

.ops-form label, .ops-code-label {
    display: grid;
    gap: 7px;
}

.ops-form label span, .ops-code-label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.ops-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ops-maintenance-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.ops-maintenance-box strong,
.ops-maintenance-box small {
    display: block;
}

.ops-maintenance-box small {
    color: var(--muted);
    margin-top: 2px;
}

.ops-full-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    font-weight: 800;
}

.ops-table-wrap {
    overflow-x: auto;
}

.ops-table {
    margin-bottom: 0;
}

.ops-table thead th {
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}

.ops-table tbody td {
    vertical-align: middle;
}

.ops-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #1f2937;
}

.ops-file i {
    color: #0f766e;
    font-size: 20px;
}

.ops-empty {
    text-align: center;
    color: var(--muted);
    padding: 26px !important;
}

.ops-note {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 14px;
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-weight: 700;
}

.ops-upload {
    border: 1px dashed #93c5fd;
    background: #f8fbff;
    border-radius: 8px;
    padding: 22px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 7px;
    cursor: pointer;
}

.ops-upload i {
    color: var(--blue);
    font-size: 34px;
}

.ops-upload span {
    color: var(--muted);
    font-size: 13px;
}

.ops-upload input {
    max-width: 260px;
    margin-top: 7px;
}

.ops-code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    background: #0f172a;
    color: #dbeafe;
    border-color: #1e293b;
}

.ops-log-wrap {
    max-height: 460px;
    overflow-y: auto;
}

.table {
    vertical-align: middle;
}

.professional-table {
    border-collapse: separate;
    border-spacing: 0;
}

.professional-table thead th {
    background: #f8fafc;
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.professional-table tbody tr:not(.table-group-row) {
    transition: background .16s ease, transform .16s ease;
}

.professional-table tbody tr:not(.table-group-row):hover {
    background: #f8fbff;
}

.table-group-row td {
    background: #eef4ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    border-top: 1px solid #dbe7ff;
    border-bottom: 1px solid #dbe7ff;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.btn-icon {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 8px;
}

.btn-icon i {
    font-size: 15px;
    line-height: 1;
}

.pppoe-customer-table {
    table-layout: fixed;
    min-width: 820px;
}

.pppoe-customer-table th:nth-child(1),
.pppoe-customer-table td:nth-child(1) {
    width: 110px;
}

.pppoe-customer-table th:nth-child(2),
.pppoe-customer-table td:nth-child(2) {
    width: 180px;
}

.pppoe-customer-table th:nth-child(3),
.pppoe-customer-table td:nth-child(3) {
    width: 150px;
}

.pppoe-customer-table th:nth-child(4),
.pppoe-customer-table td:nth-child(4),
.pppoe-customer-table th:nth-child(5),
.pppoe-customer-table td:nth-child(5) {
    width: 110px;
}

.pppoe-customer-table th:nth-child(6),
.pppoe-customer-table td:nth-child(6) {
    width: 190px;
}

.pppoe-customer-table th:nth-child(7),
.pppoe-customer-table td:nth-child(7) {
    width: 150px;
}

.pppoe-customer-table td {
    overflow-wrap: anywhere;
}

.invoice-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.invoice-summary-card {
    min-height: 116px;
}

.invoice-list-table {
    min-width: 0;
    width: 100%;
    table-layout: fixed;
}

.invoice-list-table th,
.invoice-list-table td {
    font-size: 13px;
    padding: 12px 8px;
    overflow-wrap: anywhere;
}

.invoice-list-table th:nth-child(1),
.invoice-list-table td:nth-child(1) {
    width: 118px;
}

.invoice-list-table th:nth-child(2),
.invoice-list-table td:nth-child(2) {
    width: 130px;
}

.invoice-list-table th:nth-child(3),
.invoice-list-table td:nth-child(3) {
    width: 120px;
}

.invoice-list-table th:nth-child(4),
.invoice-list-table td:nth-child(4) {
    width: 96px;
}

.invoice-list-table th:nth-child(5),
.invoice-list-table td:nth-child(5) {
    width: 74px;
    text-align: center;
}

.invoice-list-table th:nth-child(6),
.invoice-list-table td:nth-child(6) {
    width: 118px;
}

.invoice-list-table th:nth-child(7),
.invoice-list-table td:nth-child(7) {
    width: 92px;
}

.invoice-list-table th:nth-child(8),
.invoice-list-table td:nth-child(8) {
    width: 112px;
}

.invoice-list-table th:nth-child(9),
.invoice-list-table td:nth-child(9) {
    width: 174px;
}

.invoice-action-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.invoice-action-group .btn {
    white-space: nowrap;
}

@media (min-width: 992px) {
    .pppoe-customer-table {
        min-width: 0;
        width: 100%;
    }

    .pppoe-customer-table th,
    .pppoe-customer-table td {
        font-size: 13px;
        padding: 11px 8px;
    }

    .pppoe-customer-table th:nth-child(1),
    .pppoe-customer-table td:nth-child(1) {
        width: 104px;
    }

    .pppoe-customer-table th:nth-child(2),
    .pppoe-customer-table td:nth-child(2) {
        width: 178px;
    }

    .pppoe-customer-table th:nth-child(3),
    .pppoe-customer-table td:nth-child(3) {
        width: 150px;
    }

    .pppoe-customer-table th:nth-child(4),
    .pppoe-customer-table td:nth-child(4) {
        width: 104px;
    }

    .pppoe-customer-table th:nth-child(5),
    .pppoe-customer-table td:nth-child(5) {
        width: 92px;
    }

    .pppoe-customer-table th:nth-child(6),
    .pppoe-customer-table td:nth-child(6) {
        width: 178px;
    }

    .pppoe-customer-table th:nth-child(7),
    .pppoe-customer-table td:nth-child(7) {
        width: 132px;
    }

    .pppoe-customer-table .table-actions {
        display: grid;
        grid-template-columns: repeat(4, 32px);
        gap: 6px;
        justify-content: end;
    }

    .pppoe-customer-table .btn-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
}

@media (max-width: 767.98px) {
    .invoice-summary-grid {
        grid-template-columns: 1fr;
    }

    .invoice-list-table {
        min-width: 760px;
    }
}

.badge-soft {
    border-radius: 999px;
    padding: 6px 10px;
    background: #e9f8fb;
    color: #087990;
}

.theme-preview {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 3px 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
}

.theme-preview span {
    grid-row: span 2;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--preview-accent), color-mix(in srgb, var(--preview-accent) 58%, #06aed4));
}

.theme-preview strong {
    line-height: 1.2;
}

.theme-preview small {
    color: var(--muted);
}

.theme-dark {
    --ink: #eef4ff;
    --muted: #a9b7ca;
    --line: #243348;
    --dark: #050b14;
    --panel: #111c2b;
    --bg: #07111f;
}

.theme-dark .topbar {
    background: linear-gradient(135deg, #050b14, var(--blue));
}

.theme-dark .sidebar {
    background: #050b14;
}

.theme-dark .panel,
.theme-dark .stat-card,
.theme-dark .ops-panel,
.theme-dark .payment-info,
.theme-dark .payment-upload,
.theme-dark .payment-qris,
.theme-dark .modal-content {
    background: var(--panel);
    color: var(--ink);
}

.theme-dark .form-control,
.theme-dark .form-select,
.theme-dark .input-group-text {
    background-color: #0b1524;
    border-color: var(--line);
    color: var(--ink);
}

.theme-dark .form-control:disabled {
    background-color: #172235;
    color: var(--muted);
}

.theme-dark .table {
    --bs-table-bg: var(--panel);
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--line);
    --bs-table-striped-bg: #0b1524;
    --bs-table-striped-color: var(--ink);
}

.theme-dark .table thead th,
.theme-dark .ops-table thead th {
    background: #0b1524;
    color: #c6d3e6;
}

.theme-dark .modal-header,
.theme-dark .modal-footer {
    border-color: var(--line);
    background: var(--panel);
}

.theme-dark .btn-close {
    filter: invert(1) grayscale(100%);
}

.login-page {
    display: grid;
    place-items: center;
    padding: 20px;
    background:
        radial-gradient(circle at 15% 18%, rgba(6, 174, 212, .24), transparent 28%),
        linear-gradient(135deg, #eef6ff 0%, #f8fbff 45%, #e8f5f1 100%);
}

.login-wrap {
    width: min(980px, 100%);
    min-height: min(640px, calc(100vh - 40px));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(16, 24, 40, .16);
}

.login-visual {
    display: flex;
    align-items: flex-end;
    padding: 40px;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(7, 17, 31, .55), rgba(21, 94, 239, .12)),
        url("https://images.unsplash.com/photo-1544197150-b99a580bb7a8?auto=format&fit=crop&w=1400&q=80") center/cover;
}

.login-visual-content {
    max-width: 390px;
}

.login-visual .brand-mark {
    margin-bottom: 18px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .34);
}

.login-visual h1 {
    margin: 0 0 12px;
    font-size: 36px;
    font-weight: 800;
}

.login-visual p {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 16px;
    line-height: 1.7;
}

.login-card {
    width: 100%;
    padding: 48px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    align-self: center;
}

.login-card .form-control {
    border-radius: 8px;
    border-color: #d0d5dd;
    padding: 13px 14px;
}

.login-card .form-control:focus {
    border-color: #155eef;
    box-shadow: 0 0 0 4px rgba(21, 94, 239, .12);
}

.login-card .btn-primary {
    border-radius: 8px;
    padding: 13px 16px;
    background: #155eef;
    border-color: #155eef;
    box-shadow: 0 12px 24px rgba(21, 94, 239, .22);
}

.login-brand {
    margin-bottom: 34px;
}

.login-brand h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 2px;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 88px;
}

.password-toggle {
    width: 78px;
    height: 42px;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    grid-template-columns: 18px 1fr;
    align-items: center;
    justify-items: center;
    gap: 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #667085;
}

.password-toggle:hover,
.password-toggle:focus {
    color: #155eef;
    background: #eef4ff;
    outline: none;
}

.password-toggle i {
    font-size: 18px;
    line-height: 1;
}

.password-toggle span {
    font-size: 12px;
    font-weight: 700;
}

.invoice-paper {
    background: #fff;
    color: #101828;
}

.invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid var(--line);
    padding-bottom: 18px;
}

.invoice-head h2 {
    margin: 0 0 4px;
    font-size: 28px;
}

.invoice-head p, .invoice-head span {
    color: var(--muted);
    margin: 0;
}

.invoice-head strong {
    display: block;
    font-size: 24px;
}

.invoice-section-title {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.payment-qris {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.payment-qris img {
    display: block;
    width: 100%;
    height: auto;
}

.payment-info {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    height: 100%;
}

.payment-upload {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    background: #fff;
}

.payment-info h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.payment-list {
    display: grid;
    gap: 10px;
}

.payment-list div {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
}

.payment-list span {
    color: var(--ink);
}

.vpn-link-cell {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.vpn-link-cell a:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.vpn-link-cell .btn {
    white-space: nowrap;
}

.modal-dialog-scrollable form.modal-content {
    max-height: 100%;
}

.modal-dialog-scrollable form.modal-content .modal-body {
    overflow-y: auto;
}

.modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 2;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(86vw, 310px);
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 24px 0 60px rgba(7, 17, 31, .22);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(7, 17, 31, .48);
        z-index: 1030;
    }

    body.sidebar-open .sidebar-backdrop {
        display: block;
    }

    .menu-toggle {
        display: grid;
    }

    .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ops-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ops-grid {
        grid-template-columns: 1fr;
    }

    .ops-column {
        gap: 14px;
    }

    .admin-dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
        min-height: 220px;
    }

    .admin-dashboard-hero__status {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main {
        min-width: 0;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 1000;
        border-radius: 0 0 8px 8px;
        margin: -24px -24px 22px;
    }

    .login-wrap {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-visual {
        min-height: 260px;
        padding: 28px;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 12px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        margin: -12px -12px 18px;
        padding: 14px;
    }

    .topbar-title {
        width: 100%;
        align-items: flex-start;
    }

    .topbar h1 {
        font-size: 20px;
        line-height: 1.2;
    }

    .stat-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card strong {
        font-size: 24px;
    }

    .ops-hero {
        padding: 18px;
        flex-direction: column;
        align-items: stretch;
    }

    .ops-hero h2 {
        font-size: 23px;
    }

    .ops-hero-action {
        width: 100%;
        justify-content: center;
    }

    .ops-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ops-metric {
        min-height: 110px;
        padding: 15px;
    }

    .ops-panel {
        padding: 15px;
    }

    .admin-dashboard-hero {
        padding: 20px;
    }

    .admin-dashboard-hero h2 {
        font-size: 25px;
    }

    .admin-dashboard-hero__status {
        grid-template-columns: 1fr;
    }

    .ops-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .ops-form-row {
        grid-template-columns: 1fr;
    }

    .ops-maintenance-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel {
        padding: 14px;
        margin-top: 14px;
    }

    .userbox {
        width: 100%;
        justify-content: space-between;
    }

    .table-responsive {
        margin-inline: -4px;
    }

    .vpn-link-cell {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .payment-list div {
        grid-template-columns: 1fr;
    }

    .login-page {
        padding: 12px;
    }

    .login-wrap {
        width: 100%;
    }

    .login-visual {
        min-height: 190px;
        padding: 22px;
    }

    .login-visual h1 {
        font-size: 28px;
    }

    .login-visual p {
        font-size: 14px;
        line-height: 1.5;
    }

    .login-card {
        padding: 26px 20px 24px;
    }

    .login-brand {
        margin-bottom: 24px;
    }

    .login-brand h1 {
        font-size: 24px;
    }
}

@media print {
    body {
        background: #fff;
    }

    .sidebar,
    .topbar,
    .no-print,
    .alert {
        display: none !important;
    }

    .app-shell,
    .main {
        display: block;
        padding: 0;
        min-height: 0;
    }

    .panel {
        border: 0;
        box-shadow: none;
        margin: 0;
        padding: 0;
    }

    .invoice-paper {
        padding: 0;
    }
}

.qr-print-card {
    max-width: 760px;
}

.qr-ticket {
    display: grid;
    place-items: center;
    gap: 10px;
    max-width: 420px;
    margin: 0 auto;
    padding: 28px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(21, 94, 239, .08), rgba(6, 182, 212, .12)),
        #fff;
    text-align: center;
}

.qr-ticket img {
    width: min(260px, 78vw);
    height: auto;
}

.qr-ticket h2,
.qr-ticket h3,
.qr-ticket p {
    margin: 0;
}

.qr-ticket h2 {
    font-size: 22px;
}

.qr-ticket h3 {
    font-size: 18px;
    color: #155eef;
}

.qr-detail {
    width: 100%;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, .1);
    text-align: left;
}

.qr-detail p {
    margin-bottom: 6px;
}

.table .btn-group .btn,
.table .btn {
    white-space: nowrap;
}

@media (max-width: 575px) {
    .btn-group {
        flex-wrap: wrap;
    }

    .admin-dashboard-hero {
        border-radius: 8px;
        background-position: center;
    }

    .panel .d-flex.justify-content-between {
        align-items: stretch !important;
        flex-direction: column;
    }

    .panel .btn-group,
    .panel .d-flex.gap-2 {
        width: 100%;
    }

    .panel .btn-group .btn,
    .panel .d-flex.gap-2 .btn {
        flex: 1 1 auto;
    }

    .qr-ticket {
        padding: 18px;
    }
}

@media print {
    .qr-print-card {
        max-width: none;
    }

    .qr-ticket {
        border: 0;
        box-shadow: none;
        max-width: 100%;
        padding: 0;
    }
}

/* TunnelID-inspired UI refresh: visual layer only, no data behavior changes. */
:root {
    --app-bg: #f5f7fb;
    --app-surface: #ffffff;
    --app-sidebar: #ffffff;
    --app-soft: #eef4ff;
    --app-soft-2: #f8fafc;
    --app-border: #d9e2ef;
    --app-text: #172033;
    --app-muted: #64748b;
    --app-primary: #2677ff;
    --app-primary-dark: #0b56df;
    --app-success: #00c853;
    --app-shadow: 0 10px 28px rgba(15, 23, 42, .08);
    --app-shadow-soft: 0 7px 18px rgba(15, 23, 42, .06);
}

html {
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar,
.sidebar * {
    box-sizing: border-box;
    max-width: 100%;
}

body:not(.login-page) {
    background:
        radial-gradient(circle at top right, rgba(38, 119, 255, .08), transparent 32rem),
        var(--app-bg);
    color: var(--app-text);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    overflow-x: hidden;
}

.app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--app-sidebar);
    color: var(--app-text);
    border-right: 1px solid var(--app-border);
    padding: 18px 14px;
    box-shadow: 10px 0 30px rgba(15, 23, 42, .04);
    overflow-x: hidden;
}

.sidebar .brand {
    min-height: 58px;
    margin-bottom: 12px;
    padding: 4px 2px 12px;
    border-bottom: 1px solid #eef2f7;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--app-primary), #04c77b);
    box-shadow: 0 10px 24px rgba(38, 119, 255, .26);
}

.sidebar .brand strong {
    color: #1f2937;
    font-size: 17px;
    letter-spacing: 0;
}

.sidebar .brand span {
    color: var(--app-muted);
    font-size: 13px;
}

.sidebar .nav {
    display: block !important;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    width: 100%;
}

.nav-group {
    display: block !important;
    width: 100%;
    margin: 6px 0 12px;
    min-width: 0;
    clear: both;
}

.nav-group-title {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 10px 6px;
    color: #7a8798;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.nav-group-title i {
    color: var(--app-primary);
    font-size: 14px;
}

.nav-group-items {
    display: grid;
    gap: 1px;
    min-width: 0;
    width: 100%;
}

.sidebar .nav-link {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    color: #4b5563;
    border-radius: 0 10px 10px 0;
    padding: 10px 12px;
    margin: 2px 0;
    font-weight: 600;
    gap: 12px;
    box-sizing: border-box;
    flex: none !important;
    transition: background .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.sidebar .nav-link i {
    flex: 0 0 21px;
    width: 21px;
    color: #5f6f86;
    font-size: 17px;
    text-align: center;
    transition: color .16s ease, transform .16s ease;
}

.sidebar .nav-link span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.25;
}

.sidebar .nav-link::before {
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--app-primary);
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--app-primary-dark);
    background: #eaf1ff;
    transform: translateX(2px);
    box-shadow: inset -1px 0 0 rgba(38, 119, 255, .08);
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
    color: var(--app-primary);
    transform: translateY(-1px);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 12px;
}

.sidebar-user-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid #dbe5f4;
    border-radius: 10px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    padding: 10px;
}

.sidebar-logout {
    margin: 0;
}

.sidebar-logout .btn {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 10px;
}

.sidebar-user-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
}

.sidebar-user-meta {
    min-width: 0;
}

.sidebar-user-meta strong,
.sidebar-user-meta span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-meta strong {
    font-size: 13px;
    color: #1f2937;
}

.sidebar-user-meta span {
    color: var(--app-muted);
    font-size: 12px;
}

.main {
    min-width: 0;
    padding: 24px 28px;
    overflow-x: hidden;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 990;
    min-height: 64px;
    margin: -24px -28px 22px;
    padding: 12px 28px;
    color: var(--app-text);
    background: rgba(255, 255, 255, .92);
    border-radius: 0;
    border-bottom: 1px solid #e6edf6;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
    backdrop-filter: blur(12px);
}

.topbar h1 {
    color: #0b56df;
    font-size: 22px;
    font-weight: 700;
}

.topbar p,
.topbar .userbox span {
    color: var(--app-muted);
}

.topbar .userbox strong {
    color: #1f2937;
}

.menu-toggle {
    color: var(--app-primary);
    background: #edf4ff;
    border: 1px solid #d7e6ff;
    border-radius: 10px;
}

.topbar .btn-outline-light {
    --bs-btn-color: var(--app-primary);
    --bs-btn-border-color: #cbdcf8;
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
    --bs-btn-hover-color: #fff;
}

.panel,
.stat-card,
.login-card,
.ops-panel {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    background: var(--app-surface);
    box-shadow: var(--app-shadow-soft);
}

.panel {
    padding: 22px;
}

.stat-grid {
    gap: 16px;
}

.stat-card {
    min-height: 112px;
    padding: 20px;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.stat-card:hover {
    border-color: #bfd4f5;
    box-shadow: var(--app-shadow);
    transform: translateY(-2px);
}

.stat-card:not([class*="stat-card--"]) {
    background:
        radial-gradient(circle at right top, rgba(38, 119, 255, .09), transparent 9rem),
        #fff;
}

.stat-card:not([class*="stat-card--"]) span {
    color: #475569;
    font-weight: 700;
}

.stat-card:not([class*="stat-card--"]) strong {
    color: #0f172a;
}

.stat-card[class*="stat-card--"] {
    background: #fff;
    border: 1px solid var(--app-border);
    color: var(--app-text);
    box-shadow: var(--app-shadow-soft);
}

.stat-card[class*="stat-card--"]::after {
    right: 18px;
    top: 18px;
    width: 58px;
    height: 58px;
    background: rgba(38, 119, 255, .08);
}

.stat-card[class*="stat-card--"] span,
.stat-card[class*="stat-card--"] strong {
    color: inherit;
}

.stat-card[class*="stat-card--"] span {
    color: #475569;
}

.stat-card[class*="stat-card--"] strong {
    color: #0f172a;
}

.admin-dashboard-hero,
.network-hero {
    border-radius: 14px;
    box-shadow: var(--app-shadow);
}

.admin-dashboard-hero {
    background:
        linear-gradient(135deg, rgba(14, 42, 84, .78), rgba(38, 119, 255, .34)),
        url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.admin-dashboard-hero h2,
.network-hero h2 {
    letter-spacing: 0;
}

.btn {
    border-radius: 8px;
    font-weight: 700;
    letter-spacing: 0;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary-dark);
    --bs-btn-hover-border-color: var(--app-primary-dark);
    box-shadow: 0 8px 18px rgba(38, 119, 255, .2);
}

.btn-success {
    --bs-btn-bg: #14b86a;
    --bs-btn-border-color: #14b86a;
    --bs-btn-hover-bg: #0f9f59;
    --bs-btn-hover-border-color: #0f9f59;
}

.btn-outline-primary {
    --bs-btn-color: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
}

.btn-icon {
    border-radius: 9px;
}

.form-control,
.form-select {
    border-color: #d9e2ef;
    border-radius: 8px;
    min-height: 38px;
}

.form-control:focus,
.form-select:focus {
    border-color: #92b9ff;
    box-shadow: 0 0 0 .2rem rgba(38, 119, 255, .15);
}

.table,
.professional-table,
.ops-table {
    color: #172033;
}

.table thead th,
.professional-table thead th,
.ops-table thead th {
    background: #f8fafc;
    color: #344054;
    border-bottom: 1px solid #dfe7f2;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.table tbody td,
.professional-table tbody td,
.ops-table tbody td {
    border-color: #e5ebf3;
}

.table tbody tr,
.professional-table tbody tr,
.ops-table tbody tr {
    transition: background .16s ease;
}

.table tbody tr:hover,
.professional-table tbody tr:hover,
.ops-table tbody tr:hover {
    background: #f8fbff;
}

.badge,
.badge-soft {
    border-radius: 999px;
    font-weight: 800;
}

.ops-log-wrap,
.activity-log,
.log-activity,
.panel:has(.ops-log-wrap) {
    border-radius: 12px;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: min(84vw, 286px);
        transform: translateX(-105%);
        box-shadow: 22px 0 58px rgba(15, 23, 42, .18);
        padding-bottom: 16px;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main {
        padding: 18px;
    }

    .topbar {
        margin: -18px -18px 18px;
        padding: 12px 18px;
    }

    .topbar-title {
        flex: 1 1 auto;
    }

    .topbar .userbox {
        flex: 0 0 auto;
    }

    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
        transform: none;
    }
}

@media (max-width: 640px) {
    .main {
        padding: 12px;
    }

    .topbar {
        margin: -12px -12px 14px;
        padding: 10px 12px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .topbar-title {
        align-items: center;
    }

    .topbar h1 {
        font-size: 18px;
        margin-bottom: 1px;
        max-width: 58vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar p {
        font-size: 12px;
    }

    .topbar .userbox {
        display: none;
    }

    .panel {
        padding: 16px;
        border-radius: 12px;
    }

    .panel .d-flex,
    .receipt-actions,
    .ops-panel-head,
    .ops-maintenance-box {
        min-width: 0;
    }

    .panel .d-flex.justify-content-between,
    .receipt-actions {
        align-items: stretch !important;
        flex-direction: column;
    }

    .panel .d-flex.gap-2,
    .receipt-actions .d-flex,
    .table-actions,
    .btn-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .panel .d-flex.gap-2 .btn,
    .receipt-actions .btn,
    .table-actions .btn,
    .btn-group .btn {
        flex: 1 1 auto;
        min-width: 42px;
    }

    .stat-card {
        min-height: 96px;
        padding: 16px;
    }

    .table-responsive {
        border: 1px solid #e5ebf3;
        border-radius: 12px;
    }
}

/* Final FASTLINK dark sidebar + vivid dashboard cards. */
body:not(.login-page) {
    background:
        radial-gradient(circle at top right, rgba(0, 211, 255, .12), transparent 34rem),
        linear-gradient(180deg, #f4f8ff 0%, #eef3fb 100%);
}

.sidebar {
    background:
        linear-gradient(180deg, #07111f 0%, #0b1728 48%, #08101d 100%);
    color: #eaf2ff;
    border-right: 1px solid rgba(126, 169, 255, .16);
    box-shadow: 16px 0 38px rgba(7, 17, 31, .18);
}

.sidebar .brand {
    border-bottom-color: rgba(255, 255, 255, .09);
}

.sidebar .brand strong {
    color: #ffffff;
}

.sidebar .brand span,
.nav-group-title,
.sidebar-user-meta span {
    color: #90a4c2;
}

.nav-group-title i {
    color: #47d8ff;
}

.sidebar .nav-link {
    color: #c6d5ee;
}

.sidebar .nav-link i {
    color: #8ea5c7;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(37, 99, 235, .36), rgba(6, 182, 212, .12));
    box-shadow: inset 0 0 0 1px rgba(104, 183, 255, .12);
}

.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
    color: #5be7ff;
}

.sidebar-user-card {
    border-color: rgba(130, 166, 221, .25);
    background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .04));
}

.sidebar-user-meta strong {
    color: #ffffff;
}

.sidebar-logout .btn {
    --bs-btn-color: #9edbff;
    --bs-btn-border-color: rgba(158, 219, 255, .45);
    --bs-btn-hover-bg: #2563eb;
    --bs-btn-hover-border-color: #2563eb;
    --bs-btn-hover-color: #fff;
}

.stat-card {
    overflow: hidden;
    position: relative;
}

.stat-card .stat-icon {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .95);
    font-size: 25px;
    z-index: 2;
}

.stat-card[class*="stat-card--"] {
    border: 0;
    color: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .16);
}

.stat-card[class*="stat-card--"]::after {
    right: -22px;
    top: -28px;
    width: 110px;
    height: 110px;
    background: rgba(255, 255, 255, .14);
}

.stat-card[class*="stat-card--"] span,
.stat-card[class*="stat-card--"] strong,
.stat-card[class*="stat-card--"] small {
    color: #ffffff;
}

.stat-card[class*="stat-card--"] span {
    max-width: calc(100% - 74px);
    color: rgba(255, 255, 255, .84);
}

.stat-card[class*="stat-card--"] small {
    color: rgba(255, 255, 255, .78);
}

.stat-card--revenue {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%) !important;
}

.stat-card--customer,
.stat-card--pppoe {
    background: linear-gradient(135deg, #1d4ed8 0%, #38bdf8 100%) !important;
}

.stat-card--safe,
.stat-card--active {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%) !important;
}

.stat-card--warning,
.stat-card--approval {
    background: linear-gradient(135deg, #b45309 0%, #f97316 100%) !important;
}

.stat-card--partner {
    background: linear-gradient(135deg, #4338ca 0%, #8b5cf6 100%) !important;
}

.stat-card--income {
    background: linear-gradient(135deg, #be123c 0%, #fb7185 100%) !important;
}

.stat-card--vpn {
    background: linear-gradient(135deg, #0369a1 0%, #06b6d4 100%) !important;
}

.stat-card--reward {
    background: linear-gradient(135deg, #a16207 0%, #eab308 100%) !important;
}

.stat-card--dashboard {
    background: linear-gradient(135deg, #334155 0%, #64748b 100%) !important;
}

@media (max-width: 640px) {
    .stat-card .stat-icon {
        width: 46px;
        height: 46px;
        border-radius: 15px;
        font-size: 21px;
    }
}

/* Desktop: keep the sidebar locked while dashboard content scrolls. */
@media (min-width: 981px) {
    body:not(.login-page) .app-shell {
        display: block;
        min-height: 100vh;
    }

    body:not(.login-page) .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 280px;
        height: 100vh;
        max-height: 100vh;
    }

    body:not(.login-page) .main {
        width: calc(100% - 280px);
        min-height: 100vh;
        margin-left: 280px;
    }
}

/* Theme customization overrides from Pengaturan. */
body:not(.login-page) {
    color: var(--app-text, #0f172a);
    background:
        radial-gradient(circle at top right, rgba(21, 94, 239, calc(var(--gloss-opacity, .55) * .14)), transparent 32rem),
        var(--page-bg, #eef4fb);
}

body:not(.login-page) .sidebar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .055), transparent 18rem),
        var(--sidebar-bg, #071426);
    color: #dbeafe;
}

body:not(.login-page) .sidebar .nav-link,
body:not(.login-page) .nav-group-title,
body:not(.login-page) .brand span,
body:not(.login-page) .sidebar-user-meta span {
    color: rgba(226, 232, 240, .84);
}

body:not(.login-page) .sidebar .nav-link:hover,
body:not(.login-page) .sidebar .nav-link.active {
    color: #fff;
}

.admin-dashboard-hero {
    background-image:
        linear-gradient(90deg, rgba(7, 20, 38, .94), rgba(21, 94, 239, .62)),
        var(--dashboard-header-image),
        url("https://images.unsplash.com/photo-1558494949-ef010cbdcc31?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center;
}

.stat-grid {
    gap: 16px;
    margin-bottom: 18px;
}

.stat-card,
a.stat-card {
    text-decoration: none;
    color: inherit;
    animation: cardRise .36s ease both;
}

a.stat-card:hover {
    color: #fff;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, .16);
}

@keyframes cardRise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-page {
    font-family: var(--login-font-family, Inter, system-ui, sans-serif);
}

.login-visual {
    background-image:
        linear-gradient(180deg, rgba(4, 13, 27, .2), rgba(4, 13, 27, .78)),
        var(--login-visual-image);
    background-size: cover;
    background-position: center;
}

.login-card {
    background: var(--login-form-bg, #fff);
}

.login-page .btn-primary {
    background: var(--login-button, #155eef);
    border-color: var(--login-button, #155eef);
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.tutorial-card {
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
}

.tutorial-card__icon {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue, #155eef), var(--cyan, #06b6d4));
    font-size: 24px;
}

.tutorial-card h3 {
    margin: 10px 0 6px;
    font-size: 1rem;
    font-weight: 800;
}

.tutorial-card p {
    color: #64748b;
    min-height: 44px;
}

/* Scoped compact tables: Invoice and PPPoE admin */
.invoice-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.invoice-list-table,
.pppoe-customer-table {
    width: 100%;
    table-layout: fixed;
}

.invoice-list-table th,
.invoice-list-table td,
.pppoe-customer-table th,
.pppoe-customer-table td {
    overflow-wrap: anywhere;
}

.invoice-list-table th,
.invoice-list-table td {
    font-size: 13px;
    padding: 12px 8px;
}

.invoice-action-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

@media (min-width: 992px) {
    .invoice-list-table {
        min-width: 0;
    }

    .invoice-list-table th:nth-child(1),
    .invoice-list-table td:nth-child(1) { width: 118px; }
    .invoice-list-table th:nth-child(2),
    .invoice-list-table td:nth-child(2) { width: 130px; }
    .invoice-list-table th:nth-child(3),
    .invoice-list-table td:nth-child(3) { width: 120px; }
    .invoice-list-table th:nth-child(4),
    .invoice-list-table td:nth-child(4) { width: 96px; }
    .invoice-list-table th:nth-child(5),
    .invoice-list-table td:nth-child(5) { width: 74px; text-align: center; }
    .invoice-list-table th:nth-child(6),
    .invoice-list-table td:nth-child(6) { width: 118px; }
    .invoice-list-table th:nth-child(7),
    .invoice-list-table td:nth-child(7) { width: 92px; }
    .invoice-list-table th:nth-child(8),
    .invoice-list-table td:nth-child(8) { width: 112px; }
    .invoice-list-table th:nth-child(9),
    .invoice-list-table td:nth-child(9) { width: 174px; }

    .pppoe-customer-table {
        min-width: 0;
    }

    .pppoe-customer-table th,
    .pppoe-customer-table td {
        font-size: 13px;
        padding: 11px 8px;
    }

    .pppoe-customer-table th:nth-child(1),
    .pppoe-customer-table td:nth-child(1) { width: 104px; }
    .pppoe-customer-table th:nth-child(2),
    .pppoe-customer-table td:nth-child(2) { width: 178px; }
    .pppoe-customer-table th:nth-child(3),
    .pppoe-customer-table td:nth-child(3) { width: 150px; }
    .pppoe-customer-table th:nth-child(4),
    .pppoe-customer-table td:nth-child(4) { width: 104px; }
    .pppoe-customer-table th:nth-child(5),
    .pppoe-customer-table td:nth-child(5) { width: 92px; }
    .pppoe-customer-table th:nth-child(6),
    .pppoe-customer-table td:nth-child(6) { width: 178px; }
    .pppoe-customer-table th:nth-child(7),
    .pppoe-customer-table td:nth-child(7) { width: 132px; }

    .pppoe-customer-table .table-actions {
        display: grid;
        grid-template-columns: repeat(4, 32px);
        gap: 6px;
        justify-content: end;
    }

    .pppoe-customer-table .btn-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 767.98px) {
    .invoice-summary-grid {
        grid-template-columns: 1fr;
    }

    .invoice-list-table {
        min-width: 760px;
    }
}
