:root,
html[data-theme="light"] {
    --bg: #0b1220;
    --bg-soft: #111a2e;
    --page: #f4f7fb;
    --panel: #ffffff;
    --panel-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --label: #334155;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --table-line: #f1f5f9;
    --input-bg: #ffffff;
    --header-bg: #0f172a;
    --header-text: #ffffff;
    --header-muted: #e2e8f0;
    --header-border: rgba(255, 255, 255, 0.08);
    --header-hover: rgba(255, 255, 255, 0.08);
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #dbeafe;
    --success: #059669;
    --success-soft: #d1fae5;
    --danger: #dc2626;
    --danger-soft: #fee2e2;
    --info-soft: #e0f2fe;
    --warn-soft: #fff7ed;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    --card-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
    --radius: 16px;
    --font: "Segoe UI", system-ui, -apple-system, sans-serif;
    color-scheme: light;
}

html[data-theme="dark"] {
    --bg: #020617;
    --bg-soft: #0b1220;
    --page: #0b1220;
    --panel: #111a2e;
    --panel-soft: #0f172a;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --label: #cbd5e1;
    --border: #1e293b;
    --border-strong: #334155;
    --table-line: #1e293b;
    --input-bg: #0b1220;
    --header-bg: #020617;
    --header-text: #f8fafc;
    --header-muted: #cbd5e1;
    --header-border: rgba(255, 255, 255, 0.08);
    --header-hover: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-soft: #1e3a8a;
    --success-soft: #064e3b;
    --danger-soft: #7f1d1d;
    --info-soft: #0c4a6e;
    --warn-soft: #3b2a14;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font);
    color: var(--text);
    background: var(--page);
    overflow-x: hidden;
    max-width: 100vw;
}
a {
    color: var(--primary);
    text-decoration: none;
}

main {
    min-height: calc(100vh - 120px);
    max-width: 100%;
    overflow-x: hidden;
}

/* Header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    color: var(--header-text);
    border-bottom: 1px solid var(--header-border);
}

.header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
    box-sizing: border-box;
    position: relative;
    z-index: 110;
}
.header-nav { margin-left: auto; }

/* Language switcher */
.lang-switch {
    position: relative;
    flex-shrink: 0;
    margin-left: 8px;
    z-index: 120;
}
.lang-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
}
.lang-switch-btn:hover,
.lang-switch.is-open .lang-switch-btn {
    background: rgba(255,255,255,0.16);
}
.lang-flag {
    width: 22px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
    display: block;
}
.lang-switch-btn .lang-name { display: none; }
.lang-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    padding: 6px;
    background: var(--header-bg);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.38);
}
.lang-switch.is-open .lang-menu { display: block; }
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
}
.lang-option:hover,
.lang-option.is-active { background: rgba(37,99,235,0.35); }
.lang-option .lang-native { font-weight: 650; }
.lang-option .lang-english {
    margin-left: auto;
    color: rgba(255,255,255,0.55);
    font-size: 0.78rem;
}
.lang-switch-float {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 200;
}
.login-page .lang-switch-float .lang-switch-btn {
    background: var(--header-bg);
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: 4px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
}
.theme-icon-light { display: none; }
html[data-theme="dark"] .theme-icon-dark { display: none; }
html[data-theme="dark"] .theme-icon-light { display: inline; }
.theme-toggle-float {
    position: fixed;
    top: 14px;
    right: 78px;
    z-index: 200;
    margin-left: 0;
    background: #0f172a;
    color: #fff;
}
html[data-theme="dark"] .theme-toggle-float {
    background: #1e293b;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 700;
    min-width: 0;
    flex-shrink: 1;
    text-decoration: none;
}

.brand-logo {
    height: 36px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.brand-mark.large {
    width: 48px;
    height: 48px;
    font-size: 1rem;
    margin-bottom: 12px;
}

.nav-toggle {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.nav-toggle-bars {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s ease, top 0.2s ease;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.app-header.nav-open .nav-toggle-bars { background: transparent; }
.app-header.nav-open .nav-toggle-bars::before {
    top: 0;
    transform: rotate(45deg);
}
.app-header.nav-open .nav-toggle-bars::after {
    top: 0;
    transform: rotate(-45deg);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
}

.nav-overlay {
    display: none;
}

.user-chip {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inline-form {
    display: inline;
    margin: 0;
}
.staff-reset-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}
.staff-reset-form .form-control {
    width: 168px;
    min-width: 120px;
    padding: 8px 10px;
}
#staff-password-reset .mono {
    font-weight: 700;
    margin: 0 6px;
}
.extend-form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}
.extend-form select.form-control {
    width: auto;
    min-width: 108px;
    padding: 4px 8px;
    font-size: 0.85rem;
}
.extend-form .btn-sm {
    padding: 4px 10px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Phone only: hamburger. Laptop/desktop keep a normal top tab bar. */
@media (max-width: 768px) {
    .header-nav { margin-left: 0; }
    .brand { order: 1; }
    .header-nav { order: 10; }
    .theme-toggle { order: 5; margin-left: auto; }
    .lang-switch { margin-left: 0; order: 6; }
    .nav-toggle {
        display: inline-flex !important;
        margin-left: 8px;
        order: 7;
    }

    .brand-text {
        font-size: 0.85rem;
        max-width: 42vw;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 90;
    }

    .app-header.nav-open .nav-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .header-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;
        gap: 4px;
        max-height: min(70vh, calc(100dvh - 72px));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        background: var(--header-bg);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
        padding: 10px 12px 16px;
        z-index: 110;
    }

    .app-header.nav-open .header-nav {
        display: flex;
    }

    .header-nav .nav-link {
        display: block;
        width: 100%;
        padding: 14px 12px;
        border-radius: 10px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .header-nav .user-chip {
        display: block;
        width: 100%;
        max-width: none;
        text-align: center;
        margin: 8px 0 4px;
        box-sizing: border-box;
    }

    .header-nav .inline-form {
        display: block;
        width: 100%;
        margin-top: 6px;
    }

    .header-nav .inline-form .btn {
        width: 100%;
        justify-content: center;
    }

    body.nav-open {
        overflow: hidden;
    }
}

/* Laptop / desktop: always a normal top tab bar, never hamburger */
@media (min-width: 769px) {
    .nav-toggle { display: none !important; }
    .nav-overlay { display: none !important; }
    .header-inner {
        flex-wrap: wrap;
        row-gap: 8px;
    }
    .header-nav {
        display: flex !important;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
        margin-left: auto;
        max-height: none;
        overflow: visible;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
    .header-nav .nav-link {
        display: inline-flex;
        width: auto;
        white-space: nowrap;
        padding: 8px 12px;
        border-bottom: 0;
        border-radius: 8px;
    }
    .header-nav .user-chip {
        display: inline-block;
        width: auto;
        margin: 0;
    }
    .header-nav .inline-form {
        display: inline;
        width: auto;
        margin: 0;
    }
    .header-nav .inline-form .btn {
        width: auto;
    }
    body.nav-open { overflow: auto; }
}

.app-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    padding: 24px 16px 32px;
}

/* Buttons */
.btn {
    appearance: none;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
a.btn {
    color: #0f172a;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
}
a.btn-primary,
a.btn-primary:hover {
    color: #fff;
    background: var(--primary);
    text-decoration: none;
}
.pay-pos-actions {
    margin: 12px 0 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.pay-open-btn {
    min-width: 148px;
    font-weight: 700;
}
.pay-apk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
    margin: 0 0 18px;
}
.pay-apk-ico {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #0f172a;
    padding: 8px 4px;
}
.pay-apk-ico .tile {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15,23,42,.08);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pay-apk-ico .tile svg { width: 56px; height: 56px; }
.pay-apk-ico .tile img { width: 96px; height: 96px; border-radius: 28px; display: block; object-fit: cover; }
.pay-apk-ico em {
    font-style: normal;
    font-size: 16px;
    font-weight: 750;
    text-align: center;
}
.pay-apk-ico.is-in em { color: #15803d; }
.pay-wd-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0 16px;
    align-items: center;
}
.pay-auto-now {
    font-weight: 700;
    color: #16324f;
}
.pay-rek-dl {
    margin: 0 0 14px;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px 12px;
    align-items: baseline;
}
.pay-rek-dl dt {
    margin: 0;
    color: #64748b;
    font-weight: 650;
}
.pay-rek-dl dd {
    margin: 0;
    font-weight: 700;
    word-break: break-word;
}
.pay-auto-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
}
.pay-auto-choices label {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
}
.pay-tip {
    position: relative;
}
.pay-tip[data-tip]:hover::after,
.pay-tip[data-tip]:focus::after {
    content: attr(data-tip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    z-index: 8;
    width: max-content;
    max-width: 280px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
    pointer-events: none;
}
.pay-branch-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.pay-branch-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.pay-branch-name { min-width: 108px; }
.pay-branch-sales {
    margin-left: auto;
    text-align: right;
    min-width: 120px;
    line-height: 1.15;
}
.pay-branch-sales small {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
}
.pay-branch-sales b { font-size: 1.05rem; color: #16324f; }
.admin-pay-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 16px 14px;
}
.admin-pay-tab {
    appearance: none;
    border: 1px solid var(--border);
    background: var(--panel-soft);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
}
.admin-pay-tab.is-on {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.admin-pay-pane { padding: 0 16px 16px; }
.admin-pay-fold .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kyc-admin-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(220px, 360px);
    gap: 16px;
    align-items: start;
}
.kyc-admin-meta p { margin: 6px 0; }
.kyc-photo-stack { display: flex; flex-direction: column; gap: 16px; }
.kyc-photo-stack > div > p:first-child { margin: 0 0 6px; font-weight: 700; }
.kyc-admin-img {
    max-width: 360px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}
@media (max-width: 720px) {
    .kyc-admin-grid { grid-template-columns: 1fr; }
}
.chat-data-open {
    min-width: 88px;
    background: #1d4ed8 !important;
    color: #fff !important;
    text-decoration: none !important;
}
.chat-data-name { color: inherit; text-decoration: none; font-weight: 700; }
.chat-data-name:hover { text-decoration: underline; color: #1d4ed8; }
.chat-file-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.chat-file-card {
    display: flex; flex-direction: column; gap: 6px; width: 160px;
    text-decoration: none; color: inherit;
}
.chat-file-card img {
    width: 160px; height: 120px; object-fit: cover; border-radius: 10px;
    border: 1px solid #e5e7eb; background: #f8fafc;
}
.chat-file-doc {
    display: flex; align-items: center; justify-content: center;
    width: 160px; height: 80px; border-radius: 10px; border: 1px solid #e5e7eb;
    background: #f1f5f9; font-weight: 700; padding: 8px; text-align: center;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn:disabled,
.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-block {
    width: 100%;
}

/* Login page */
.login-page {
    background: var(--bg);
}

.login-page main {
    min-height: 100vh;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
}

.login-hero {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.35), transparent 40%),
        radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.28), transparent 35%),
        linear-gradient(160deg, #0b1220 0%, #111a2e 55%, #0f172a 100%);
    color: #e2e8f0;
    display: flex;
    align-items: center;
    padding: 48px;
}

.hero-content {
    max-width: 460px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(147, 197, 253, 0.25);
    color: #bfdbfe;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 18px;
}

.login-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 3vw, 2.7rem);
    line-height: 1.15;
    color: #fff;
}

.login-hero p {
    margin: 0 0 22px;
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.6;
}

.hero-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.hero-points li {
    position: relative;
    padding-left: 28px;
    color: #cbd5e1;
}

.hero-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 5px var(--primary);
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px 32px;
    background:
        linear-gradient(180deg, var(--panel-soft) 0%, var(--page) 100%);
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--panel);
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    padding: 32px 28px 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.login-card-header {
    text-align: center;
    margin-bottom: 22px;
}

.login-card-header h2 {
    margin: 0 0 6px;
    font-size: 1.55rem;
}

.login-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.login-form {
    display: grid;
    gap: 14px;
}

.form-group {
    display: grid;
    gap: 6px;
}
.form-group[hidden] {
    display: none !important;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--label);
}

.form-control {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.98rem;
    outline: none;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 68px;
}

.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 8px;
}

.form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 4px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--label);
    cursor: pointer;
}

.help-link {
    font-size: 0.82rem;
    color: var(--muted);
}

.field-error {
    color: var(--danger);
    font-size: 0.82rem;
}

.alert {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.alert-error,
.validation-summary-errors {
    background: var(--danger-soft);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-error ul,
.validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

.alert-success {
    background: var(--success-soft);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-info {
    background: var(--info-soft);
    color: #075985;
    border: 1px solid #bae6fd;
}

.demo-box {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    font-size: 0.84rem;
    color: #475569;
}

.demo-box strong {
    display: block;
    margin-bottom: 8px;
    color: #334155;
}

.demo-box table {
    width: 100%;
    border-collapse: collapse;
}

.demo-box th,
.demo-box td {
    text-align: left;
    padding: 6px 4px;
    border-bottom: 1px solid #f1f5f9;
}

.demo-box th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Dashboard */
.dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Owner/Admin manage users — use full browser width, no forced right overflow */
.dashboard-admin {
    max-width: 100%;
    width: 100%;
    padding: 20px 16px 40px;
    overflow-x: hidden;
}
.admin-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
}
.admin-add-panel {
    width: 100%;
    max-width: 100%;
}
.admin-form-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 16px;
    align-items: end;
}
.admin-form-wide .form-group {
    min-width: 0;
}
/* Full-width fields (company name / address need room to type) */
.admin-form-wide .form-group-full {
    grid-column: 1 / -1;
    min-width: 0;
}
.admin-form-wide .form-group-full .form-control {
    width: 100%;
    font-size: 1.05rem;
    padding: 14px 16px;
}
.admin-form-wide .form-control-company-name {
    min-height: 48px;
}
.admin-form-wide .form-control-company-address {
    min-height: 140px;
    resize: vertical;
    line-height: 1.45;
}
.admin-form-wide .form-row-2 {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 16px;
}
.admin-form-wide .btn-primary {
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 180px;
    width: auto;
    max-width: 100%;
}
.admin-list-panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}
.admin-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table-admin {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}
.data-table-admin th,
.data-table-admin td {
    padding: 8px 6px;
    font-size: 0.88rem;
    vertical-align: top;
    word-break: break-word;
}
.data-table-admin .login-edit-form {
    max-width: 100%;
    min-width: 0;
    display: grid;
    gap: 6px;
}
.data-table-admin .balance-form,
.data-table-admin .expiry-form,
.data-table-admin .reset-form {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
}
.data-table-admin .balance-input,
.data-table-admin .expiry-input,
.data-table-admin .reset-input {
    width: 100%;
    max-width: 140px;
    min-width: 0;
}
.data-table-admin .action-stack {
    max-width: 160px;
}
.account-badges-mobile {
    display: none;
}

/* Account list — mobile card layout (Owner / Admin) */
@media (max-width: 900px) {
    .dashboard-admin {
        padding: 14px 12px 32px;
    }

    .dashboard-admin .dashboard-header h1 {
        font-size: 1.4rem;
    }

    .dashboard-admin .dashboard-header .muted {
        font-size: 0.9rem;
    }

    .admin-form-wide {
        grid-template-columns: 1fr;
    }

    .admin-form-wide .form-row-2 {
        grid-template-columns: 1fr;
    }

    .admin-form-wide .btn-primary {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }

    .admin-list-panel {
        overflow: visible;
        padding: 14px 12px 16px;
    }

    .admin-list-panel .panel-header {
        margin-bottom: 10px;
    }

    .admin-table-wrap {
        overflow: visible;
    }

    .account-list-table,
    .account-list-table tbody,
    .account-list-table tr,
    .account-list-table td {
        display: block;
        width: 100%;
    }

    .account-list-table thead {
        display: none;
    }

    .account-list-table tbody {
        display: grid;
        gap: 12px;
    }

    .account-list-table tr.account-row {
        background: #f8fafc;
        border: 1px solid var(--border);
        border-radius: 14px;
        padding: 12px 12px 10px;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
        box-sizing: border-box;
    }

    .account-list-table td {
        border-bottom: 1px solid #eef2f7;
        padding: 10px 0;
        font-size: 0.92rem;
    }

    .account-list-table td:last-child {
        border-bottom: none;
        padding-bottom: 2px;
    }

    .account-list-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--muted);
        margin-bottom: 6px;
    }

    .account-list-table td[data-label="Login"]::before {
        display: none;
    }

    .account-card-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }

    .account-id-block {
        min-width: 0;
        flex: 1;
    }

    .account-id-link code {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--primary-dark);
    }

    .account-email {
        word-break: break-all;
    }

    .account-badges-mobile {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
        flex-shrink: 0;
    }

    .account-list-table .account-cell-role,
    .account-list-table .desktop-only-email {
        display: none;
    }

    .account-list-table .account-cell-status .badge:first-child {
        display: none;
    }

    .data-table-admin .balance-form,
    .data-table-admin .expiry-form,
    .data-table-admin .reset-form {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        width: 100%;
    }

    .data-table-admin .balance-input,
    .data-table-admin .expiry-input,
    .data-table-admin .reset-input {
        flex: 1 1 140px;
        max-width: none;
        min-width: 0;
    }

    .data-table-admin .action-stack {
        max-width: none;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    .data-table-admin .action-stack .btn,
    .data-table-admin .action-stack .inline-form,
    .data-table-admin .action-stack .inline-form .btn {
        flex: 1 1 auto;
        min-width: 0;
    }

    .data-table-admin .action-stack .inline-form {
        display: flex;
    }

    .data-table-admin .action-stack .inline-form .btn {
        width: 100%;
    }

    .status-switch {
        margin-top: 8px;
    }

    .status-switch .btn,
    .balance-block .btn-paid-sm,
    .login-edit-form .btn {
        width: 100%;
        justify-content: center;
    }

    .login-edit-form .reset-input {
        max-width: none !important;
        width: 100%;
    }

    .balance-block {
        display: grid;
        gap: 8px;
        width: 100%;
    }
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dashboard-header h1 {
    margin: 0 0 6px;
    font-size: 1.8rem;
}

.muted {
    color: var(--muted);
    margin: 0;
}

.status-pill {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--success-soft);
    color: #047857;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}
.product-use-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    padding: 0 16px 16px;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--card-shadow);
}

.stat-card.highlight {
    background: linear-gradient(145deg, #eff6ff, #fff);
    border-color: #bfdbfe;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.stat-card strong {
    font-size: 1.2rem;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
}

.panel h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.panel-header {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.panel-header h2 {
    margin: 0;
}
.panel-toggle {
    margin-left: auto;
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
    background: var(--panel-soft);
    color: var(--text);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 650;
    font-size: 0.88rem;
    cursor: pointer;
}
.panel-toggle:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}
html.dash-collapse .dashboard > .panel:not(.is-open):not(.dash-pin) > :not(.panel-header) {
    display: none !important;
}
html.dash-collapse .dashboard > .panel:not(.is-open):not(.dash-pin) .panel-header {
    margin-bottom: 0;
}
html.dash-collapse .dashboard > .panel > .panel-header {
    cursor: pointer;
}
.apk-pin {
    border: 1px solid #93c5fd;
    background: #eff6ff;
}
.apk-pin .apk-pin-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.pay-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(120deg, #0f172a, #1e3a8a);
    color: #fff;
    border: none;
}

.pay-panel .muted {
    color: #cbd5e1;
}

.pay-panel .btn-primary {
    background: #fff;
    color: #1d4ed8;
}

.pay-panel .btn-primary:hover:not(:disabled) {
    background: #e2e8f0;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--table-line);
    font-size: 0.94rem;
}

.data-table th {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--success-soft);
    color: #047857;
    font-size: 0.8rem;
    font-weight: 700;
}

@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-hero {
        padding: 36px 24px 20px;
        min-height: auto;
    }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pay-panel {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header {
        flex-direction: column;
    }

    .login-card {
        padding: 24px 18px;
    }
}

/* Admin + nav extras */
.nav-link {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
    position: relative;
}
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link-note { padding-right: 16px; }
.nav-badge {
    position: absolute;
    top: -5px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px #0f172a;
}
.nav-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #e2e8f0;
    flex-shrink: 0;
}
.nav-bell:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-bell.has-note { color: #fde68a; }
.nav-bell .nav-badge { top: 0; right: 0; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn-ghost-dark {
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost-dark:hover { background: var(--panel-soft); }
.admin-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 16px;
    align-items: start;
}
.admin-form { display: grid; gap: 12px; }
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.btn-danger-sm, .btn-success-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
.btn-danger-sm { background: #fee2e2; color: #b91c1c; }
.btn-danger-sm:hover { background: #fecaca; }
.btn-success-sm { background: #d1fae5; color: #047857; }
.btn-success-sm:hover { background: #a7f3d0; }
.badge-ok { background: var(--success-soft); color: #047857; }
.badge-trial { background: #e0e7ff; color: #3730a3; }
.badge-off { background: #f1f5f9; color: #64748b; }
.trial-option {
    padding: 10px 12px;
    border: 1px solid #c7d2fe;
    border-radius: 10px;
    background: #eef2ff;
}
.storage-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-top: 10px;
    align-items: stretch;
}
.storage-plan-grid .storage-card {
    min-height: 0;
    min-width: 0;
}
.storage-plan-grid form.storage-card {
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
}
.storage-plan-grid form.storage-card > div {
    min-width: 0;
}
.storage-plan-grid form.storage-card strong,
.storage-plan-grid form.storage-card p {
    overflow-wrap: break-word;
    word-break: normal;
    min-width: 0;
}
.storage-plan-grid form.storage-card strong {
    white-space: nowrap;
    font-size: 1.2rem;
    letter-spacing: 0;
    margin-bottom: 4px;
}
.storage-plan-grid form.storage-card p {
    margin: 0;
    line-height: 1.45;
}
.storage-plan-grid form.storage-card .btn,
.storage-plan-grid form.storage-card button {
    width: 100%;
    flex: none;
    white-space: nowrap;
    justify-content: center;
}
.storage-plan-grid label.storage-card strong,
.storage-plan-grid label.storage-card p {
    overflow-wrap: break-word;
    word-break: normal;
}
.platform-card[title] {
    cursor: help;
}
.xcsm-track-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px 12px;
    margin-top: 8px;
}
.xcsm-track-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.92rem;
}
.xcsm-track-item:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.xcsm-track-item input {
    width: auto;
    margin: 0;
}
.apps-other-block {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.apps-other-title {
    margin: 0 0 4px;
    font-weight: 700;
    font-size: 1rem;
}
.apps-custom-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}
.apps-custom-row .apps-custom-name {
    flex: 1;
    min-width: 0;
}
.apps-custom-remove {
    flex: none;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 8px 12px;
}
.apps-add-page {
    margin-top: 10px;
    background: #fff;
    border: 1px dashed #93c5fd;
    color: #1d4ed8;
}
.muted.small, .small { font-size: 0.8rem; }
@media (max-width: 960px) {
    .admin-grid { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
}

.password-panel { max-width: 480px; }
.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* Xdata branding */
.login-logo {
    display: block;
    width: auto;
    max-width: 200px;
    height: 48px;
    object-fit: contain;
    margin: 0 auto 14px;
}
.brand-logo {
    height: 28px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    display: block;
}
.brand {
    gap: 10px;
}

.balance-form {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 150px;
}
.balance-input {
    width: 100px;
    padding: 6px 8px;
    font-size: 0.9rem;
}
.action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.btn-delete-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: #7f1d1d;
    color: #fff;
}
.btn-delete-sm:hover { background: #991b1b; }

.balance-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}
.reset-form {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 170px;
}
.reset-input {
    width: 110px;
    padding: 6px 8px;
    font-size: 0.85rem;
}
.btn-paid-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: #1d4ed8;
    color: #fff;
}
.btn-paid-sm:hover { background: #1e40af; }
.btn-again-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: #c2410c;
    color: #fff;
}
.btn-again-sm:hover { background: #9a3412; }
.btn-reset-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}
.btn-reset-sm:hover { background: #fde68a; }

.bank-panel {
    border: 1px solid #bfdbfe;
    background: linear-gradient(145deg, #eff6ff, #fff);
}
.bank-details {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}
.bank-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
}
.bank-label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}
.account-number {
    letter-spacing: 0.04em;
    font-size: 1.05rem;
    color: #1d4ed8;
}
.kasera-panel {
    border: 1px solid #bbf7d0;
    background: linear-gradient(145deg, #ecfdf5, #fff);
}
.xcsm-setup-card > .kasera-panel {
    margin: 18px 0 6px;
}
.kasera-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}
.kasera-methods span {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #d1fae5;
    color: #065f46;
    font-size: 0.82rem;
    font-weight: 600;
}
.kasera-amount {
    margin: 8px 0 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #047857;
}
.pay-method-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
}
@media (max-width: 720px) {
    .pay-method-grid { grid-template-columns: 1fr 1fr; }
}
.pay-method-btn {
    border: 1px solid #86efac;
    background: #fff;
    color: #065f46;
    border-radius: 12px;
    padding: 12px 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}
.pay-method-btn:hover:not(:disabled) { background: #d1fae5; }
.pay-method-btn.is-on {
    background: #059669;
    border-color: #047857;
    color: #fff;
}
.pay-method-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.pay-method-btn[hidden] { display: none !important; }
/* Payment gateway on /Payment: must stay visible so voucher + QRIS/VA/card/manual amount show (was hidden after Doku UI rebuild). */
#payGwMount > .kasera-panel { display: block; }
#payGwMount > #servicePayPanel:not(:has(#payInvoiceSel)) { display: none !important; }
#servicePayOverlay {
    position: fixed;
    inset: 0;
    z-index: 940;
    background: rgba(15, 23, 42, .55);
    display: grid;
    place-items: center;
    padding: 18px;
}
#servicePayOverlay[hidden] { display: none !important; }
.service-pay-pop {
    width: min(920px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .35);
}
.service-pay-bar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 10px 0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}
.service-pay-x {
    border: 0;
    background: #0f172a;
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
}
#servicePayOverlay .kasera-panel {
    margin: 0;
    border: 0;
    border-radius: 0 0 16px 16px;
    box-shadow: none;
}
.pay-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.45);
    display: grid;
    place-items: center;
    padding: 20px;
}
.pay-modal[hidden] { display: none !important; }
.pay-modal-card {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 22px 22px 18px;
    box-shadow: var(--shadow);
}
.pay-modal-wide {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow: auto;
}
.pay-modal-card h3 { margin: 0 0 10px; }
.pay-modal-card p { margin: 0 0 10px; color: #334155; line-height: 1.45; }
.kp-shell { width: min(920px, 96vw); background: #1e88e5; color: #fff; border-radius: 20px; padding: 18px 16px; display: grid; gap: 14px; justify-items: center; max-height: 92vh; overflow: auto; }
.kp-pay-brand { color: #fff; }
.kp-pay-board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; align-items: stretch; }
.kp-qris-col { background: #1e88e5; border-radius: 16px; padding: 8px; display: grid; place-items: center; }
.kp-detail-col { background: #fff; color: #16324f; border-radius: 16px; padding: 16px; display: grid; align-content: start; gap: 10px; }
.kp-shell .qris-pill { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #c45c12; font-weight: 800; padding: 10px 18px; border-radius: 999px; box-shadow: 0 4px 16px rgba(196,92,18,.12); font-size: .95rem; }
.kp-shell .qris-dot { width: 10px; height: 10px; border-radius: 50%; background: #e67e22; }
.kp-shell .qris-card { width: 100%; background: transparent; border-radius: 22px; padding: 10px 8px; box-shadow: none; display: grid; justify-items: center; gap: 12px; color: #fff; }
.kp-shell .qris-brand { display: flex; align-items: center; justify-content: center; width: auto; max-width: 100%; background: #fff; border-radius: 12px; padding: 10px 14px; }
.kp-shell .qris-logo,
.kp-shell .qris-brand img { height: 44px; width: auto; max-width: 100%; object-fit: contain; }
.kp-shell .qris-merchant { margin: 6px 0 0; font-size: 1.05rem; font-weight: 800; letter-spacing: .06em; text-align: center; text-transform: uppercase; color: #fff; }
.kp-shell .qris-satu { margin: 4px 0 0; font-weight: 900; letter-spacing: .08em; font-size: 1.02rem; text-align: center; color: #fff; }
.kp-shell .qris-cek { margin: 0; color: rgba(255,255,255,.88); font-size: .82rem; text-align: center; }
.kp-shell .qris-code { background: #fff; padding: 12px; border-radius: 12px; }
.kp-shell .qris-detail { width: 100%; background: transparent; border-radius: 0; padding: 0; color: #16324f; }
#kycRejectModal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 900 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px !important;
    background: rgba(15, 23, 42, 0.58) !important;
    box-sizing: border-box;
}
#kycRejectModal[hidden] { display: none !important; }
#kycRejectModal .pay-modal-card {
    width: min(420px, 92vw) !important;
    max-height: min(80dvh, 520px);
    overflow: auto;
    margin: 0 auto !important;
    align-self: center !important;
    justify-self: center !important;
    border-radius: 18px;
    padding: 22px 20px 18px;
    background: var(--panel) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
}
#kycRejectModal h3 { margin: 0 0 10px; font-size: 1.15rem; color: var(--text) !important; }
#kycRejectModal p { margin: 0 0 16px; color: var(--text) !important; line-height: 1.5; font-size: 1rem; }
#kycRejectModal .btn { min-width: 44%; }

@media (max-width: 720px) {
    .pay-modal { padding: 0; align-items: stretch; }
    #kycRejectModal {
        padding: 24px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .kp-shell {
        width: 100%;
        max-width: none;
        max-height: none;
        min-height: 100dvh;
        border-radius: 0;
        padding: 12px 14px 24px;
        gap: 12px;
    }
    .kp-pay-board { grid-template-columns: 1fr; gap: 12px; }
    .kp-qris-col { order: 2; padding: 0; }
    .kp-detail-col { order: 1; padding: 16px 16px 14px; }
    .kp-shell .qris-code {
        width: min(92vw, 420px);
        padding: 14px;
    }
    .kp-shell .qris-code img,
    .kp-shell .qris-code canvas,
    .kp-shell .qris-code table {
        width: 100% !important;
        height: auto !important;
        max-width: 100%;
    }
    .kp-shell .qris-merchant { font-size: 1.25rem; }
    .kp-shell .qris-satu { font-size: 1.1rem; }
    .kp-shell .qris-detail h2 { font-size: 1.2rem; }
    .kp-shell .qris-detail td { font-size: 1.05rem; padding: 10px 0; }
    .kp-shell .qris-detail .tot { font-size: 1.45rem; }
    .kp-va-code { font-size: 1.8rem; }
}
.kp-shell .qris-detail h2 { margin: 0 0 8px; font-size: 1.05rem; }
.kp-shell .qris-detail table { width: 100%; border-collapse: collapse; }
.kp-shell .qris-detail td { padding: 8px 0; border-bottom: 1px solid #eef; }
.kp-shell .qris-detail .tot { font-weight: 800; font-size: 1.15rem; }
.kp-pay-brand {
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    font-size: 1.02rem;
}
.kp-pay-brand-sm { font-size: .92rem; margin: 0 0 6px; color: #0f172a; }
.va-bank-grid { margin: 8px 0 4px; }
.kp-va { width: 100%; background: #fff; border-radius: 16px; padding: 18px; text-align: center; color: #0f172a; }
.qris-card[hidden], .kp-va[hidden], .kp-card-frame[hidden] { display: none !important; }
.kp-va-label { margin: 8px 0 0; font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.kp-va-amount { margin: 4px 0 8px; font-size: 1.35rem; font-weight: 800; color: #0f172a; }
.kp-va-code { font-size: 1.8rem; font-weight: 800; letter-spacing: .12em; margin: 8px 0 12px; word-break: break-all; user-select: all; color: #0f172a !important; }
.kp-va ol { text-align: left; margin: 8px 0 0; padding-left: 18px; }
.kp-card-frame { width: 100%; min-height: 620px; height: min(78dvh, 760px); max-height: none; border: 0; border-radius: 16px; background: #fff; overflow: visible; }
@media (max-width: 720px) {
    .kp-card-frame { min-height: max(620px, 70dvh); height: auto; max-height: none; }
}
.kp-wait { margin: 0; color: #c45c12; font-weight: 700; text-align: center; }
.proof-upload-form {
    display: grid;
    gap: 12px;
    max-width: 720px;
    position: relative;
}
.proof-upload-form.is-busy {
    pointer-events: none;
}
.proof-upload-form.is-busy .btn-primary {
    opacity: 0.75;
}
.proof-wait {
    margin: 4px 0 0;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #eff6ff;
}
.proof-wait.is-checking {
    display: block;
}
.proof-wait-anim {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
}
.proof-wait-host {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}
.proof-wait.is-checking .mail-dns-wire {
    background: #dbeafe;
}
.proof-wait.is-checking .mail-dns-wire i {
    width: 40%;
    background: linear-gradient(90deg, #2563eb, #93c5fd, #2563eb);
    background-size: 200% 100%;
    animation: mail-dns-slide 0.9s linear infinite;
}
.proof-wait-title {
    margin: 0 0 4px;
    font-weight: 700;
    color: #1e3a8a;
}
.proof-hint {
    margin: 0 0 4px;
    padding: 12px 14px;
    border: 1px solid var(--primary-soft, #dbeafe);
    background: var(--info-soft, #e0f2fe);
    border-radius: 12px;
    color: var(--text, #0f172a);
    font-size: 0.92rem;
    line-height: 1.45;
}
.proof-hint p { margin: 0 0 8px; }
.proof-hint ul { margin: 0; padding-left: 18px; }
.proof-hint li { margin: 0 0 6px; }
.badge-pending {
    background: #fef3c7;
    color: #92400e;
}
.badge-reject {
    background: var(--danger-soft);
    color: #b91c1c;
}
@media (max-width: 640px) {
    .bank-row { grid-template-columns: 1fr; }
}

.badge-suspend {
    background: #ffedd5;
    color: #c2410c;
}
.status-switch {
    margin-top: 6px;
}
.btn-suspend-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: #ffedd5;
    color: #c2410c;
}
.btn-suspend-sm:hover { background: #fed7aa; }

.alert { position: relative; }
.alert-x {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
}
.alert-x:hover { opacity: 1; }
.alert-suspend {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fdba74;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
}
.alert-suspend p { margin: 8px 0; line-height: 1.5; }
.alert-suspend ul { margin: 8px 0 0 18px; padding: 0; }
.alert-suspend li { margin: 4px 0; }
.status-pill.status-suspended {
    background: #ffedd5;
    color: #c2410c;
}

.register-footer {
    text-align: center;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}
.register-footer a {
    font-weight: 600;
}

.expiry-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 150px;
}
.expiry-input {
    width: 140px;
    padding: 6px 8px;
    font-size: 0.85rem;
}
.expiry-form-wide {
    max-width: 360px;
    flex-direction: column;
    align-items: stretch;
}
.expiry-form-wide .form-group { width: 100%; }

.resend-box {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}
.resend-form {
    display: grid;
    gap: 8px;
}

.add-service-box {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}
.add-service-box h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}
.add-service-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    max-width: 640px;
}
.add-service-form .form-control {
    flex: 1 1 260px;
}

.admin-add-service {
    margin: 0 0 18px;
    padding: 14px 0 16px;
    border-top: none;
    border-bottom: 1px dashed var(--border);
}
.service-edit-row {
    vertical-align: top;
    background: #fafbfc;
}
.service-edit-form {
    margin-bottom: 8px;
}
.service-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px 12px;
    align-items: end;
    margin-bottom: 6px;
}
.service-remarks-field {
    grid-column: span 2;
    min-width: 200px;
}
@media (max-width: 700px) {
    .service-remarks-field {
        grid-column: span 1;
    }
}
.service-edit-grid label {
    display: block;
    margin-bottom: 4px;
}
.reminder-field {
    grid-column: span 2;
    min-width: 220px;
}
.reminder-days {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    padding: 6px 0 2px;
}
.reminder-chk {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
    cursor: pointer;
}
@media (max-width: 700px) {
    .reminder-field {
        grid-column: span 1;
    }
}
.service-edit-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 2px;
}
.service-delete-form {
    margin-top: 4px;
}

/* Support tickets */
.ticket-create-form,
.ticket-reply-form {
    display: grid;
    gap: 12px;
    max-width: 640px;
}
.ticket-create-form .form-row,
.ticket-reply-form label {
    display: grid;
    gap: 6px;
}
.ticket-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
}
.ticket-filters .form-control {
    min-width: 160px;
}
.ticket-thread {
    display: grid;
    gap: 12px;
}
.ticket-msg {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border, #e5e7eb);
    background: var(--panel);
}
.ticket-msg-admin {
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.ticket-msg-user {
    background: #f8fafc;
}
.ticket-msg-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.ticket-msg-body {
    white-space: pre-wrap;
    line-height: 1.5;
    word-break: break-word;
}
.ticket-admin-bar {
    padding: 12px 16px;
}
.status-switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.badge-tech {
    background: #dbeafe;
    color: #1d4ed8;
}
.badge-billing {
    background: #fef3c7;
    color: #b45309;
}
.header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.shared-upload-form {
    display: grid;
    gap: 12px;
    max-width: 720px;
    margin-bottom: 8px;
}
/* XCSM / Cloud dashboard actions */
.xcsm-actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}
.xcsm-actions-cell .btn-primary {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: 8px;
}

/* Cloud Server setup — plan cards */
.cloud-plan-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 12px 0 8px;
}
.cloud-plan-card {
    position: relative;
    display: block;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 16px 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.cloud-plan-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}
.cloud-plan-card.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #2563eb;
}
.cloud-plan-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cloud-plan-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}
.cloud-plan-price {
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}
.cloud-plan-specs {
    margin: 0;
    padding-left: 18px;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.45;
}
.cloud-plan-specs li {
    margin: 2px 0;
}

/* Cloud Server dashboard (view-only) */
.cloud-view-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px 18px;
    margin-top: 12px;
    background: #fafbfc;
}
.cloud-view-card + .cloud-view-card {
    margin-top: 16px;
}
.cloud-view-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.cloud-view-header strong {
    margin-right: 8px;
}
.cloud-view-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.cloud-view-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
}
.cloud-view-block h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #0f172a;
}
.cloud-dl {
    margin: 0;
}
.cloud-dl > div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 6px 10px;
    padding: 4px 0;
    border-bottom: 1px dashed #f1f5f9;
    font-size: 0.9rem;
}
.cloud-dl > div:last-child {
    border-bottom: none;
}
.cloud-dl dt {
    margin: 0;
    color: #64748b;
    font-weight: 500;
}
.cloud-dl dd {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
}
.cloud-dl dd.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 500;
}
/* Mail System setup + administrator */
.mail-feature-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    max-width: 480px;
}
.mail-unit-price {
    margin: 8px 0 0;
    font-size: 1.02rem;
}
.mail-hover-hint {
    margin-top: 6px;
}
.xcsm-setup-card [hidden] {
    display: none !important;
}
.mail-domain-result {
    margin: 10px 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: #0f172a;
}
.mail-dns-guide {
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 18px;
    margin: 12px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}
.mail-dns-guide p {
    margin: 0 0 10px;
    color: #0f172a;
}
.mail-dns-guide .data-table {
    background: #fff;
    color: #0f172a;
    font-size: 0.95rem;
}
.mail-dns-guide .data-table td,
.mail-dns-guide .data-table th {
    color: #0f172a;
    font-family: inherit;
}
.mail-mig-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 10px 0;
}
.mail-mgmt-card {
    position: relative;
}
.mail-mgmt-card[title]:hover::after {
    content: attr(title);
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: calc(100% + 8px);
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.8rem;
    line-height: 1.35;
    padding: 8px 10px;
    border-radius: 8px;
    z-index: 5;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .25);
    pointer-events: none;
}
.mail-summary-row {
    margin-bottom: 12px;
}
.mail-logo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.mail-webmail-logo {
    max-height: 56px;
    max-width: 180px;
    object-fit: contain;
    background: #fff;
}
.mail-logo-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
/* Hide leftover compiled "Client apps use mail… Do not type awsmail.id" until 5080 recycle picks up the view delete. */
.mail-dns-guide > p.muted.small,
#dnsClientHostNote {
    display: none !important;
}
.mail-dns-box {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.mail-dns-anim {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 10px;
}
.mail-dns-host {
    font-weight: 700;
    color: #0f172a;
    word-break: break-all;
}
.mail-dns-wire {
    flex: 1;
    height: 8px;
    min-width: 64px;
    border-radius: 99px;
    background: #e2e8f0;
    overflow: hidden;
}
.mail-dns-wire i {
    display: block;
    height: 100%;
    width: 36%;
    border-radius: 99px;
    background: #94a3b8;
}
.mail-dns-box.is-checking .mail-dns-wire i {
    width: 40%;
    background: linear-gradient(90deg, #2563eb, #93c5fd, #2563eb);
    background-size: 200% 100%;
    animation: mail-dns-slide 0.9s linear infinite;
}
.mail-dns-box.is-ok .mail-dns-wire { background: #bbf7d0; }
.mail-dns-box.is-ok .mail-dns-wire i {
    width: 100%;
    background: #059669;
    animation: none;
}
.mail-dns-box.is-bad .mail-dns-wire { background: #fecaca; }
.mail-dns-box.is-bad .mail-dns-wire i {
    width: 100%;
    background: #dc2626;
    animation: none;
}
@keyframes mail-dns-slide {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(280%); }
}
.mail-dns-result { margin: 0 0 4px; }
.mail-dns-detail { margin: 0; }
.mail-accounts-table {
    width: 100%;
    table-layout: auto;
    white-space: nowrap;
}
.mail-accounts-table th,
.mail-accounts-table td {
    vertical-align: middle;
    padding: 6px 8px;
    white-space: nowrap;
}
.mail-accounts-table input.form-control {
    min-width: 0;
    width: 150px;
    font-size: 0.85rem;
    padding: 6px 8px;
    height: 34px;
}
.mail-accounts-table .mail-name-input { width: 120px; }
.mail-accounts-table .mail-email-input { width: 200px; }
.mail-acc-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 8px 0 12px;
}
.mail-acc-toolbar .mail-retry-all { margin: 0; }
.mail-bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: flex-end;
    justify-content: space-between;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--border, #dbe3ee);
    border-radius: 12px;
    background: #f1f5f9;
    color: #0f172a;
}
.mail-bulk-bar strong,
.mail-bulk-bar p,
.mail-bulk-bar .muted,
.mail-bulk-bar .muted.small {
    color: #334155 !important;
}
.mail-bulk-bar a.btn,
.mail-bulk-dl {
    background: #0f172a !important;
    color: #fff !important;
    border: 0;
    font-weight: 800;
}
.mail-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.mail-bulk-upload {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}
.mail-acc-search {
    flex: 1 1 220px;
    min-width: 180px;
    max-width: 360px;
    height: 40px;
    border-radius: 999px;
    padding: 8px 16px;
}
.mail-acc-plain {
    display: block;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-all;
}
.mail-acc-plain.mail-acc-email { font-weight: 500; }
.mail-accounts-table .mail-id-fixed {
    display: inline-block;
    padding: 6px 2px;
    font-size: 0.9rem;
    color: var(--text);
}
.mail-acc-pw,
.mail-acc-reset,
.mail-acc-status {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}
.mail-accounts-table tr.is-disabled td,
.data-table tr.is-disabled td {
    color: #94a3b8;
    background: #f8fafc;
}
.mail-accounts-table tr.is-disabled .mail-acc-plain,
.mail-accounts-table tr.is-disabled .mail-acc-email {
    color: #94a3b8;
}
.mail-accounts-table tr.is-disabled .badge-off {
    background: #e2e8f0;
    color: #64748b;
}
.mail-accounts-table .mail-acc-activate {
    background: #e2e8f0;
    color: #334155;
}
.mail-accounts-table .mail-acc-activate:hover {
    background: #d1fae5;
    color: #047857;
}
.mail-acc-reset { margin: 0; }
.mail-pw-now { width: 120px !important; }
.mail-pw-new { width: 132px !important; }
.mail-accounts-table .btn,
.mail-accounts-table .btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
    height: 34px;
    white-space: nowrap;
    flex-shrink: 0;
}
.mail-acc-usage {
    min-width: 140px;
    max-width: 220px;
}
.mail-acc-quota {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.mail-acc-quota .mail-quota-gb {
    width: 72px !important;
    min-width: 72px !important;
}
.mail-acc-quota .mail-quota-gb.is-off {
    opacity: 0.45;
}
.mail-quota-unlim {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-size: 0.8rem;
    color: #475569;
    white-space: nowrap;
}
.mail-quota {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.mail-quota-head {
    font-size: 0.8rem;
    font-weight: 650;
    margin: 0;
    flex-shrink: 0;
}
.mail-reg-date {
    margin-left: 6px;
    font-weight: 650;
    color: var(--text);
}
.mail-quota .mail-mig-bar {
    flex: 1;
    min-width: 64px;
    height: 8px;
    margin: 0;
}
.mail-mig-inline {
    min-width: 140px;
}
.mail-mig-inline .mail-mig-job-head,
.mail-mig-inline .mail-mig-msg { margin: 0; font-size: 0.75rem; }
.table-wrap:has(.mail-accounts-table) {
    overflow-x: auto;
}
.mail-outlook-row td {
    white-space: normal;
    background: #f8fafc;
    border-top: 0;
    padding: 0 8px 12px;
}
.mail-outlook-imap {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    max-width: 640px;
}
.mail-outlook-imap-kicker {
    margin: 0 0 4px;
    font-weight: 750;
    font-size: 0.92rem;
    color: #0f172a;
}
.mail-outlook-imap-warn {
    margin: 0 0 8px;
    font-size: 0.82rem;
    color: #9a3412;
    font-weight: 650;
}
.mail-outlook-imap-dl {
    margin: 0;
    display: grid;
    gap: 4px 12px;
}
.mail-outlook-imap-dl > div {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    gap: 6px 10px;
    align-items: baseline;
}
.mail-outlook-imap-dl dt {
    margin: 0;
    color: #64748b;
    font-weight: 650;
    font-size: 0.8rem;
}
.mail-outlook-imap-dl dd {
    margin: 0;
    font-size: 0.88rem;
    color: #0f172a;
}
.mail-outlook-imap-dl code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86rem;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
}
.mail-outlook-imap .muted {
    margin: 8px 0 0;
}
@media (max-width: 640px) {
    .mail-outlook-imap-dl > div {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
.mail-request-bar {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.mail-request-bar h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: #0f172a;
}
.mail-request-bar p {
    margin: 0 0 10px;
}
.mail-request-bar textarea.form-control {
    width: 100%;
    min-height: 96px;
    resize: vertical;
}
.mail-request-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.row-pending-mail {
    background: #fffbeb;
}
.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88rem;
}

/* Colocation billing period cards */
.billing-period-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 12px 0 8px;
}
.billing-period-grid.mail-exist-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.billing-period-grid.mail-exist-grid:has(#xcsmDomainCard[hidden]) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.billing-period-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.billing-period-card p,
.billing-period-card strong {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.billing-period-card:hover {
    border-color: #93c5fd;
}
.billing-period-card.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 1px #2563eb;
}
.billing-period-card.is-trial-lock {
    opacity: 0.45;
    pointer-events: none;
}
.billing-period-radio {
    margin-top: 4px;
}
.billing-period-card strong {
    display: block;
    margin-bottom: 2px;
}
.billing-period-card.mail-kind-card,
.billing-period-card.mail-reg-card,
.billing-period-card.mail-mig-card {
    flex-direction: column;
    gap: 6px;
}
.billing-period-card.mail-kind-card p,
.billing-period-card.mail-reg-card p,
.billing-period-card.mail-mig-card p {
    margin: 0;
}
.billing-total {
    margin: 8px 0 0;
    font-size: 0.98rem;
}
.mail-mig-box {
    margin: 12px 0 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}
.mail-mig-box h3,
.mail-mig-box > p strong {
    margin: 0 0 8px;
    font-size: 1.05rem;
}
.mail-mig-summary { margin: 0 0 12px; }
.mail-mig-job {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.mail-mig-job:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.mail-mig-job-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 6px;
}
.mail-mig-email { font-weight: 600; word-break: break-all; }
.mail-mig-label { font-size: 0.88rem; color: #64748b; white-space: nowrap; }
.mail-mig-job.is-done .mail-mig-label { color: #059669; font-weight: 700; }
.mail-mig-job.is-error .mail-mig-label { color: #dc2626; font-weight: 700; }
.mail-mig-bar {
    height: 10px;
    border-radius: 99px;
    background: #e2e8f0;
    overflow: hidden;
}
.mail-mig-bar i {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #2563eb, #60a5fa, #2563eb);
    background-size: 200% 100%;
    width: 0;
    transition: width .4s ease;
}
.mail-mig-job.is-running .mail-mig-bar i {
    animation: mail-mig-slide 1.2s linear infinite;
}
.mail-mig-job.is-done .mail-mig-bar i {
    background: #059669;
    animation: none;
}
.mail-mig-job.is-error .mail-mig-bar i {
    background: #dc2626;
    animation: none;
}
@keyframes mail-mig-slide {
    0% { background-position: 0 0; }
    100% { background-position: -200% 0; }
}
.mail-mig-msg { margin-top: 6px; font-size: 0.85rem; color: #64748b; }
.mail-mig-empty { margin: 0; color: #64748b; }
.mail-acc-live { margin: 8px 0 4px; }
.mail-mig-inline { margin: 0; padding: 0; border: 0; }
.mail-quota-bar i {
    background: #059669;
    animation: none;
}
.mail-quota-bar.is-hot i { background: #d97706; }
.xdc-drive-meter {
    margin: 12px 0 4px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}
.xdc-drive-meter-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.xdc-drive-meter-head strong { font-size: 0.95rem; }
.xdc-drive-meter-label { font-size: 0.9rem; color: #334155; font-variant-numeric: tabular-nums; }
.xdc-drive-meter-bar {
    height: 16px;
    border-radius: 99px;
    background: #e2e8f0;
    overflow: hidden;
}
.xdc-drive-meter-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #0b57d0, #60a5fa, #0b57d0);
    background-size: 200% 100%;
    transition: width 1.15s cubic-bezier(.22, .9, .28, 1);
    animation: xdc-drive-shine 1.3s linear infinite;
}
.xdc-drive-meter.is-ready .xdc-drive-meter-bar i {
    animation: none;
    background: #059669;
}
.xdc-drive-meter.is-hot .xdc-drive-meter-bar i {
    animation: none;
    background: #d97706;
}
.xdc-drive-meter.is-full .xdc-drive-meter-bar i {
    animation: none;
    background: #dc2626;
}
.xdc-drive-meter.is-sub {
    margin: 0;
    padding: 8px 10px;
    min-width: 170px;
}
.xdc-drive-meter.is-sub .xdc-drive-meter-head { margin-bottom: 6px; }
.xdc-drive-meter.is-sub .xdc-drive-meter-label { font-size: 0.8rem; }
.xdc-drive-meter.is-sub .xdc-drive-meter-bar { height: 10px; }
.xdc-drive-meter.is-stack .xdc-drive-meter-bar {
    display: flex;
    height: 28px;
    background: #e2e8f0;
}
.xdc-drive-stack b {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 0;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-overflow: ellipsis;
    box-sizing: border-box;
    transition: width 0.95s cubic-bezier(.22, .9, .28, 1);
}
.xdc-drive-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 10px;
}
.xdc-drive-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #334155;
}
.xdc-drive-legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: #e2e8f0;
    flex: 0 0 auto;
}
.xdc-drive-legend span.is-empty { color: #64748b; }
@keyframes xdc-drive-shine {
    0% { background-position: 0 0; }
    100% { background-position: -200% 0; }
}

.mail-storage-total {
    margin: 10px 0 4px;
    padding: 10px 12px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #065f46;
}

.mail-admin-extras {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.mail-x-block {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px 18px;
    border: 1px solid #1e293b;
}
.mail-x-block h3,
.mail-x-block h4 {
    margin: 0 0 4px;
    color: #f8fafc;
}
.mail-x-block .muted,
.mail-x-block .muted.small {
    color: #94a3b8;
}
.mail-x-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.mail-mon-ranges {
    display: flex;
    gap: 6px;
    background: #1e293b;
    border-radius: 999px;
    padding: 3px;
}
.mail-range {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: 600;
}
.mail-range.is-on {
    background: #334155;
    color: #fff;
}
.mail-mon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.mail-mon-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px 14px 10px;
    min-height: 180px;
}
.mail-mon-card h4 {
    font-size: 0.95rem;
    font-weight: 650;
}
.mail-mon-total {
    font-size: 1.35rem;
    font-weight: 700;
    color: #f8fafc;
    margin: 4px 0 6px;
}
.mail-mon-chart { min-height: 90px; }
.mail-mon-legend {
    font-size: 0.78rem;
    color: #38bdf8;
    margin-top: 4px;
}
.mail-mon-empty {
    border: 1px dashed #475569;
    border-radius: 10px;
    color: #94a3b8;
    padding: 18px 12px;
    text-align: center;
    font-size: 0.88rem;
    margin-top: 18px;
}
.mail-spark { width: 100%; height: 104px; display: block; }
.mail-spark-t { fill: #64748b; font-size: 10px; }
.pos-bars { display: grid; gap: 8px; margin-top: 10px; }
.pos-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(72px, 2fr) auto; gap: 8px; align-items: center; }
.pos-bar-name { font-size: 0.78rem; color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-bar-track { height: 8px; background: #334155; border-radius: 99px; overflow: hidden; }
.pos-bar-fill { height: 8px; background: #38bdf8; border-radius: 99px; }
.pos-bar-val { font-size: 0.72rem; color: #94a3b8; white-space: nowrap; }
.mail-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
    color: #e2e8f0;
    cursor: pointer;
    user-select: none;
}
.mail-switch input {
    appearance: none;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #475569;
    position: relative;
    cursor: pointer;
    border: 0;
}
.mail-switch input:checked { background: #2563eb; }
.mail-switch input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: left .15s;
}
.mail-switch input:checked::after { left: 21px; }
.mail-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.mail-filter-add {
    display: flex;
    gap: 8px;
    margin: 8px 0 10px;
}
.mail-filter-add .form-control { flex: 1; }
.mail-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mail-filter-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #334155;
}
.mail-filter-list code { color: #e2e8f0; }
.mail-ret-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 14px 16px;
}
.mail-ret-row {
    display: grid;
    grid-template-columns: 140px minmax(160px, 1fr) auto 90px auto;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
}
.mail-ret-row label { font-weight: 650; color: #f8fafc; }
.mail-ret-days { max-width: 90px; text-align: center; }
.mail-x-block .form-control,
.mail-x-block select.form-control,
.mail-x-block textarea.form-control {
    background: #0f172a;
    color: #f8fafc;
    border-color: #475569;
}
.mail-group-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.mail-g-email-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.mail-g-suffix { color: #94a3b8; white-space: nowrap; }
.mail-g-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.mail-g-mem { color: #e2e8f0; }
.mail-g-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.mail-group-send {
    margin-top: 14px;
    background: #1e293b;
    border-radius: 12px;
    padding: 12px 14px;
}
.mail-group-send textarea { margin-top: 8px; }
.mail-group-table { background: #1e293b; color: #e2e8f0; }
.mail-group-table th,
.mail-group-table td { color: #e2e8f0; }
@media (max-width: 900px) {
    .mail-mon-grid,
    .mail-filter-grid,
    .mail-group-fields { grid-template-columns: 1fr; }
    .mail-ret-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}
.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}
.colo-plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 1100px) {
    .colo-plan-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 900px) {
    .cloud-plan-grid {
        grid-template-columns: 1fr;
    }
    .cloud-view-grid {
        grid-template-columns: 1fr;
    }
    .billing-period-grid {
        grid-template-columns: 1fr;
    }
}

/* XCSM setup / customize — full usable width on laptop browsers */
body.xcsm-page {
    background: var(--page);
    overflow-x: hidden;
}
.xcsm-page-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    width: 100%;
    box-sizing: border-box;
}
.xcsm-setup-card {
    width: 100%;
    max-width: none;
    padding: 28px 32px 36px;
    overflow: visible;
}
.xcsm-form {
    display: grid;
    gap: 8px;
    width: 100%;
    max-width: none;
}
.xcsm-section {
    margin: 8px 0 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.xcsm-section:last-of-type {
    border-bottom: none;
}
.xcsm-section-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}
.xcsm-subsection-title {
    margin: 16px 0 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}
.xcsm-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 14px;
}
.xcsm-whatsapp-box {
    background: #ecfdf5;
    border-color: #a7f3d0;
}
.xcsm-beta-box {
    background: #fff7ed;
    border-color: #fdba74;
}
.xcsm-price-list {
    margin: 10px 0 0;
    padding-left: 18px;
    color: #334155;
    font-size: 0.92rem;
}
.xcsm-price-list li { margin-bottom: 4px; }
.xcsm-price-summary {
    background: #f8fafc;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 16px;
    display: grid;
    gap: 8px;
}
.xcsm-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #334155;
}
.xcsm-price-total {
    border-top: 1px dashed #cbd5e1;
    padding-top: 10px;
    margin-top: 2px;
    font-size: 1.02rem;
}
.xcsm-price-total strong {
    color: #1d4ed8;
    font-size: 1.08rem;
}
.xcsm-final-summary {
    margin-top: 8px;
    border: 2px solid #bfdbfe;
    background: #f8fbff;
}
#xcsmEmailSettings {
    margin-top: 4px;
}
.xcsm-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}
.mail-local-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.mail-local-wrap .mig-local {
    flex: 1;
    min-width: 0;
}
.mail-local-suffix {
    flex: 0 0 auto;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.xcsm-extra-owner {
    margin: 10px 0;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.xcsm-input {
    min-height: 48px;
    font-size: 1rem !important;
    padding: 12px 14px !important;
    width: 100% !important;
    max-width: 100% !important;
}
.xcsm-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.45;
}
.xcsm-form select.xcsm-input {
    cursor: pointer;
    appearance: auto;
}
.xcsm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
}
.xcsm-actions .xcsm-submit {
    min-width: 220px;
    min-height: 48px;
    font-size: 1.02rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.xcsm-submit {
    min-width: 220px;
    min-height: 48px;
    font-size: 1.02rem;
    font-weight: 700;
}
.xcsm-cancel {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
}
@media (max-width: 800px) {
    .xcsm-grid-2 {
        grid-template-columns: 1fr;
    }
    .xcsm-setup-card {
        padding: 16px 12px 24px;
        overflow-x: hidden;
    }
    .xcsm-page-wrap,
    body.xcsm-page .dashboard {
        padding: 12px 10px 36px;
        overflow-x: hidden;
        max-width: 100%;
    }
    .xcsm-submit,
    .xcsm-cancel {
        width: 100%;
        min-width: 0;
        justify-content: center;
    }
    .billing-period-grid {
        grid-template-columns: 1fr !important;
    }
    .billing-period-card {
        flex-direction: column;
        gap: 6px;
    }
    .billing-period-card strong {
        display: block;
        margin-bottom: 4px;
    }
    .billing-total {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .mail-dns-guide {
        padding: 12px;
        overflow-x: hidden;
    }
    .mail-dns-guide .table-wrap {
        overflow: visible;
    }
    .mail-dns-guide .data-table thead {
        display: none;
    }
    .mail-dns-guide .data-table,
    .mail-dns-guide .data-table tbody,
    .mail-dns-guide .data-table tr,
    .mail-dns-guide .data-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .mail-dns-guide .data-table tr {
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 10px 12px;
        margin-bottom: 10px;
    }
    .mail-dns-guide .data-table td {
        border-bottom: 0;
        padding: 4px 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .mail-dns-guide .data-table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
        margin-bottom: 2px;
    }
    .xcsm-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .xcsm-actions .btn {
        width: 100%;
        min-width: 0;
    }
}
.file-row-actions {
    flex-direction: column;
    align-items: flex-start;
}
.file-manage {
    width: 100%;
    max-width: 280px;
}
.file-manage > summary {
    cursor: pointer;
    list-style: none;
    display: inline-block;
}
.file-manage > summary::-webkit-details-marker { display: none; }
.file-manage-panel {
    margin-top: 8px;
    padding: 10px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background: #fff;
    display: grid;
    gap: 8px;
}
.reactivate-form,
.replace-form {
    display: grid;
    gap: 6px;
}
.file-manage-hr {
    border: none;
    border-top: 1px dashed var(--border, #e5e7eb);
    margin: 4px 0;
}
.login-edit-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
    max-width: 220px;
}
.login-edit-form .form-control,
.login-edit-form .reset-input {
    width: 100%;
    min-width: 0;
}



.coupon-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
}
.coupon-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.history-inv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.pay-coupon {
    margin: 4px 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background: #f8fafc;
}
.pay-coupon label { display: block; font-weight: 600; margin-bottom: 6px; }
.pay-coupon .apply-coupon-row { margin-top: 6px; }
.apply-coupon-form {
    max-width: 520px;
}
.apply-coupon-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.apply-coupon-row .form-control {
    flex: 1 1 220px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.coupon-generate-form {
    display: grid;
    gap: 14px;
}
.coupon-kinds {
    display: grid;
    gap: 8px;
}
.coupon-kind-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    cursor: pointer;
    background: #fff;
}
.coupon-kind-card:has(input:checked) {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.12);
    background: #f8faff;
}
.coupon-kind-card strong {
    display: block;
    margin-bottom: 2px;
}
.coupon-kind-card input[type="radio"] {
    margin-top: 4px;
}
.coupon-kind-value {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.88rem;
    color: #334155;
}
.coupon-kind-value .coupon-value-input {
    width: 96px;
    height: 34px;
    padding: 4px 8px;
}
.coupon-new-code {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: #ecfdf3;
    border: 1px solid #86efac;
}
.coupon-code-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.06em;
    font-size: 1.05rem;
}
.coupon-row-used {
    opacity: 0.72;
}
.btn-copy-code {
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 0.78rem;
}
.coupon-field {
    flex: 1 1 100%;
    width: 100%;
    margin-top: 4px;
}
.coupon-field .form-control {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    max-width: 280px;
}
@media (max-width: 980px) {
    .coupon-layout,
    .coupon-row {
        grid-template-columns: 1fr;
    }
}

.pc-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 80;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.pc-fab-dot {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 8px 18px rgba(37, 211, 102, 0.4);
}
.pc-pop {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 16px;
    box-sizing: border-box;
}
.pc-pop.is-open { display: flex; }
.pc-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.4);
    cursor: pointer;
}
.pc-panel {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    max-height: min(92vh, 560px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}
.pc-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #075e54;
    color: #fff;
}
.pc-head h3 { margin: 0; font-size: 1.05rem; color: #fff; }
.pc-head p { margin: 2px 0 0; font-size: 0.8rem; color: rgba(255,255,255,0.75); }
.pc-head-ico {
    width: 38px; height: 38px; border-radius: 50%;
    background: #25d366;
    display: grid; place-items: center; flex: 0 0 auto;
}
.pc-x {
    margin-left: auto;
    border: 0;
    background: rgba(255,255,255,0.12);
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 999px;
    font-size: 1.2rem;
    cursor: pointer;
}
.pc-body {
    flex: 1;
    background: #ece5dd;
    padding: 12px;
    overflow-y: auto;
    min-height: 220px;
}
.pc-msg {
    max-width: 82%;
    padding: 8px 10px;
    margin-bottom: 8px;
    font-size: 0.92rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.pc-msg-bot {
    background: #fff;
    border-radius: 0 10px 10px 10px;
    color: #111;
}
.pc-msg-user {
    background: #dcf8c6;
    border-radius: 10px 0 10px 10px;
    margin-left: auto;
    color: #111;
}
.pc-msg.pending { opacity: 1; min-width: 54px; }
.pc-dots {
    display: inline-flex;
    gap: 5px;
    height: 14px;
    align-items: center;
    padding: 2px 6px 2px 2px;
}
.pc-dots i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #54656f;
    animation: pc-dot 1.05s infinite ease-in-out both;
}
.pc-dots i:nth-child(2) { animation-delay: .16s; }
.pc-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes pc-dot {
    0%, 80%, 100% { opacity: .22; transform: translateY(0) scale(.8); }
    40% { opacity: 1; transform: translateY(-5px) scale(1); }
}
.pc-msg.err { color: #b91c1c; }
.pc-compose {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    background: #f0f0f0;
}
.pc-compose input {
    flex: 1;
    margin: 0;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font: inherit;
}
.pc-send {
    width: 42px; height: 42px;
    border: 0; border-radius: 50%;
    background: #25d366; color: #fff;
    display: grid; place-items: center;
    cursor: pointer; flex: 0 0 auto;
}
body.pc-open { overflow: hidden; overscroll-behavior: none; }

.pc-pop { padding: 0; align-items: stretch; justify-content: stretch; }
.pc-panel {
    width: min(420px, 100%);
    max-height: min(96dvh, 760px);
    height: min(96dvh, 760px);
    margin: auto 16px 16px auto;
    border-radius: 20px;
    overflow: hidden;
}
.pc-head {
    background: #fff;
    color: #0f172a;
    border-bottom: 1px solid #eef2f7;
}
.pc-head h3 { color: #0f172a; }
.pc-head p { color: #64748b; }
.pc-head-ico { background: #0f766e; }
.pc-x { color: #0f172a; background: transparent; }
.pc-body { background: #fff; min-height: 0; }
.pc-msg-bot { background: #f3f4f6; border-radius: 16px; padding: 12px 14px; max-width: 88%; }
.pc-msg-user { background: #ecfdf5; border-radius: 16px; }
.pc-compose {
    flex-direction: column;
    align-items: stretch;
    margin: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.pc-compose-row { display: flex; align-items: center; gap: 8px; }
.pc-compose input, .pc-compose textarea {
    flex: 1; border: 0; border-radius: 0; padding: 8px 4px; min-height: 44px;
    background: transparent; font: inherit; font-size: 1rem;
}
.pc-clip {
    width: 36px; height: 36px; border: 0; border-radius: 50%;
    background: transparent; color: #64748b; display: grid; place-items: center; cursor: pointer;
}
.pc-send { background: #e5e7eb; color: #111; width: 36px; height: 36px; }
.pc-send.is-on { background: #0f766e; color: #fff; }
.pc-hint { text-align: center; color: #94a3b8; font-size: 0.88rem; margin: 14px 16px 8px; }
.pc-thumb { display: block; max-width: 180px; max-height: 140px; border-radius: 12px; margin-bottom: 6px; }
.pc-attach-preview { display: none; align-items: center; gap: 8px; font-size: 0.82rem; color: #64748b; }
.pc-attach-preview.is-on { display: flex; }
.pc-attach-preview img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.pc-view { display: none; flex: 1; min-height: 0; flex-direction: column; }
.pc-view.is-on { display: flex; }
.pc-home {
    background: linear-gradient(180deg, #0f766e 0%, #115e59 42%, #0f4c5c 100%);
}
.pc-home-hero { padding: 12px 22px 28px; }
.pc-home-hero h2 { margin: 0; font-size: 1.85rem; line-height: 1.2; font-weight: 800; color: #0b1220; }
.pc-cta, .pc-card {
    margin: 0 16px 12px; background: #fff; border-radius: 16px; padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12); border: 0; width: auto; text-align: left;
    font: inherit; cursor: pointer; color: #111; font-weight: 700;
}
.pc-tabs {
    margin-top: auto; background: #fff; display: grid; grid-template-columns: 1fr 1fr;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eef2f7;
}
.pc-tabs button { border: 0; background: transparent; padding: 10px; font: inherit; color: #94a3b8; font-weight: 700; cursor: pointer; }
.pc-tabs button.is-on { color: #0f172a; }
@media (max-width: 700px) {
    .pc-pop { padding: 0; }
    .pc-backdrop { display: none; }
    .pc-panel {
        width: 100%;
        height: 100%;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
}

.stats-row { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 18px; }
.stat-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 16px; min-width: 120px;
}
.stat-card b { display: block; font-size: 1.4rem; color: var(--primary); }
.stat-card span { color: var(--muted); font-size: 0.8rem; }
.range-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.range-tabs a {
    color: var(--muted); text-decoration: none; border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; background: var(--panel);
}
.range-tabs a.on { color: var(--primary); border-color: var(--primary); }
.sec-manual {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    padding: 12px 14px; margin-bottom: 18px;
}
.sec-manual label { color: var(--muted); font-size: 0.8rem; }
.sec-manual input {
    display: block; margin-top: 4px; padding: 8px 10px;
    border: 1px solid var(--border); border-radius: 8px; min-width: 160px;
}
.badge-crawler { background: #fef3c7; color: #92400e; }
.badge-watch { background: #fef3c7; color: #92400e; }
.badge-blocked { background: var(--danger-soft); color: #991b1b; }
.badge-visitor { background: var(--info-soft); color: #075985; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; word-break: break-all; }
.btn-danger { background: #dc2626; color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; cursor: pointer; }

.totp-input {
    letter-spacing: 0.28em;
    font-size: 1.35rem;
    text-align: center;
    font-family: ui-monospace, Consolas, monospace;
}
.qrbox {
    width: 220px; height: 220px;
    margin: 8px auto 14px;
    background: #fff;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
}
.qrbox svg { display: block; width: 100%; height: 100%; }
.totp-secret { letter-spacing: 0.12em; }
.backup-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.backup-list code { font-size: 0.95rem; }

.totp-nudge {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(15, 23, 42, 0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.totp-nudge[hidden] { display: none !important; }
.totp-nudge-card {
    width: min(440px, 100%);
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 22px 20px;
}
.totp-nudge-card h2 { margin: 0 0 8px; font-size: 1.2rem; }
.totp-nudge-card p { margin: 0 0 16px; color: var(--muted); }
.totp-nudge-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .pc-fab-dot { width: 54px; height: 54px; }
}

.xdc-hub-bar {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    background: #111; color: #fff; padding: 12px 16px; border-radius: 10px; margin-bottom: 18px;
}
.xdc-hub-brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.xdc-hub-brand img { width: 28px; height: 28px; }
.xdc-hub-links { display: flex; gap: 16px; align-items: center; }
.xdc-hub-links a { color: #e5e7eb; text-decoration: none; font-weight: 600; }
.xdc-hub-links a.on, .xdc-hub-links a:hover { color: #fff; }
.xdc-create-wrap { display: flex; gap: 10px; justify-content: center; margin: 18px 0 24px; flex-wrap: wrap; }
.xdc-create {
    background: var(--primary); color: #fff; border: 0; font-weight: 800; padding: 12px 22px;
    border-radius: 8px; cursor: pointer; font-size: 1.05rem;
}
.xdc-create:hover { background: var(--primary-dark); color: #fff; }
.xdc-del-modal {
    position: fixed; inset: 0; z-index: 80;
    background: rgba(15, 23, 42, 0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.xdc-del-modal[hidden] { display: none !important; }
.xdc-del-box {
    background: #fff; border-radius: 12px; padding: 20px 22px;
    max-width: 420px; width: 100%; box-shadow: 0 12px 40px rgba(15,23,42,.2);
}
.xdc-del-box p { margin: 0 0 16px; font-size: 1.02rem; color: #0f172a; }
.xdc-del-actions { display: flex; gap: 8px; justify-content: flex-end; }
.xdc-hours { margin: 10px 0 14px; padding: 10px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.xdc-map-card {
    margin: 12px 0;
    padding: 14px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    color: #065f46;
}
.xdc-map-card .btn { margin-left: 6px; }
.xdc-net-isolated { background: #ecfdf5; }
.xdc-hub-split { display: grid; grid-template-columns: 240px 1fr; gap: 24px; }
@media (max-width: 800px) { .xdc-hub-split { grid-template-columns: 1fr; } }
.xdc-node-pill {
    display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center;
    border-radius: 50%; background: #2563eb; color: #fff; font-weight: 700; font-size: 0.85rem;
}
.xdc-net-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.xdc-net-head h1 { margin: 0 0 6px; }
.xdc-nwid { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.xdc-nwid span { font-size: 0.8rem; color: var(--muted); }
.xdc-nwid input { width: 220px; }
.xdc-dl { max-width: 980px; margin: 24px auto; padding: 0 16px 40px; }
.xdc-dl h1 { text-align: center; font-size: 2.6rem; margin: 10px 0 6px; }
.xdc-dl-ver { text-align: center; color: var(--muted); margin-bottom: 28px; }
.xdc-dl-grid { display: grid; grid-template-columns: 200px 1fr; gap: 18px; }
@media (max-width: 720px) { .xdc-dl-grid { grid-template-columns: 1fr; } }
.xdc-dl-nav { display: flex; flex-direction: column; gap: 4px; }
.xdc-dl-nav a {
    padding: 10px 14px; border-radius: 10px 0 0 10px; text-decoration: none; color: #334155; font-weight: 650;
}
.xdc-dl-nav a.on { background: #ddd6fe; color: #1e1b4b; }
.xdc-dl-pane {
    background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
}
.xdc-dl-btn {
    display: inline-block; margin-top: 12px; background: #334155; color: #fff; text-decoration: none;
    padding: 12px 18px; border-radius: 8px; font-weight: 700;
}
.xdc-dl-btn:hover { background: #1e293b; color: #fff; }
.xdc-pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: 8px; overflow: auto; }
.xdc-steps { margin: 0; padding-left: 1.2rem; }
.xdc-steps li { margin: 0 0 10px; }
.xdc-dl-pane .mono { font-family: ui-monospace, Consolas, monospace; }
.xdc-wait-row { background: #fff7ed; }
.xdc-wait-badge { background: #ffedd5; color: #9a3412; }
.xdc-member-actions { white-space: nowrap; }
.xdc-member-actions .btn-primary { font-weight: 800; min-width: 110px; }
@media (max-width: 800px) {
    .xdc-member-actions { white-space: normal; display: flex; flex-direction: column; gap: 6px; }
    .xdc-member-actions .btn,
    .xdc-member-actions .btn-primary { width: 100%; }
}
.qrbox { width: 200px; height: 200px; margin: 12px auto; }
.totp-input { letter-spacing: .2em; font-size: 1.15rem; text-align: center; }
.totp-secret { word-break: break-all; }
.backup-list { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.backup-list code { display: block; background: #f1f5f9; padding: 8px; border-radius: 8px; text-align: center; }
.xdc-act-table { min-width: 760px; }
.xdc-act-table .xdc-act-time,
.xdc-act-table .xdc-act-user,
.xdc-act-table .xdc-act-ip { white-space: nowrap; }

.nc-checkout { display: grid; gap: 16px; max-width: 860px; }
.nc-step h2 { margin: 0; font-size: 1.1rem; }
.nc-domain-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 1.25rem; }
.nc-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 12px; margin: 8px 0; cursor: pointer; }
.nc-choice input { margin-top: 4px; }
.nc-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nc-phone { display: flex; gap: 8px; }
.nc-dial { max-width: 120px; }
.nc-checkout-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: nowrap; align-items: center; }
.nc-checkout-actions .btn,
.nc-checkout-actions a.btn,
.nc-checkout-actions .btn-primary {
    white-space: nowrap;
    background: #2563eb !important;
    color: #fff !important;
    border: 0;
    font-weight: 800;
}
@media (max-width: 700px) {
    .nc-checkout-actions { flex-wrap: wrap; justify-content: stretch; }
    .nc-checkout-actions .btn,
    .nc-checkout-actions .btn-primary { flex: 1 1 auto; }
}
.nc-wrap { max-width: 1100px; }
.nc-title { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.nc-title h1 { margin: 0; font-size: 1.6rem; }
.nc-home-ico { width: 42px; height: 42px; border-radius: 12px; background: #5b9ea6; }
.nc-tabs { display: grid; grid-template-columns: repeat(3, 1fr); background: #f1f5f9; border: 1px solid var(--border); border-radius: 8px 8px 0 0; overflow: hidden; margin-bottom: 0; }
.nc-tabs a { text-align: center; padding: 16px 8px; color: #334155; font-weight: 600; border-bottom: 3px solid transparent; }
.nc-tabs a.is-on { background: #7fb3b8; color: #fff; }
.nc-label { display: inline-block; background: #94a3b8; color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 2px; margin-right: 12px; }
.nc-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nc-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nc-inline .form-control { min-width: 220px; }
.nc-empty-box { border: 1px dashed #cbd5e1; padding: 24px; text-align: center; border-radius: 8px; background: #f8fafc; }
.nc-contacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.nc-contact h3 { margin: 0 0 8px; font-size: 0.95rem; }
.nc-whois { white-space: pre-wrap; font-family: var(--font); font-size: 0.88rem; margin: 0 0 8px; }
.nc-edit-contact { display: grid; gap: 6px; margin-top: 8px; }
.checkbox-label { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
@media (max-width: 900px) {
    .nc-form-grid, .nc-contacts { grid-template-columns: 1fr; }
    .nc-tabs { grid-template-columns: 1fr; }
}

html[data-theme="dark"] .login-page {
    background: var(--bg);
}
html[data-theme="dark"] .login-card {
    border-color: var(--border);
}
html[data-theme="dark"] .stat-card.highlight {
    background: linear-gradient(145deg, #1e3a8a, var(--panel));
    border-color: #1e40af;
}
html[data-theme="dark"] .alert-error,
html[data-theme="dark"] .validation-summary-errors {
    color: #fecaca;
    border-color: #7f1d1d;
}
html[data-theme="dark"] .alert-success {
    color: #a7f3d0;
    border-color: #065f46;
}
html[data-theme="dark"] .alert-info {
    color: #bae6fd;
    border-color: #075985;
}
html[data-theme="dark"] .status-pill {
    color: #6ee7b7;
}
html[data-theme="dark"] .ticket-msg-admin {
    background: #052e16;
    border-color: #14532d;
}
html[data-theme="dark"] .ticket-msg-user {
    background: var(--panel-soft);
}
html[data-theme="dark"] .apps-other-block,
html[data-theme="dark"] .mail-mig-box,
html[data-theme="dark"] .mail-dns-box,
html[data-theme="dark"] .mail-dns-guide,
html[data-theme="dark"] .mail-dns-guide .data-table,
html[data-theme="dark"] .mail-logo-row,
html[data-theme="dark"] .mail-outlook-imap,
html[data-theme="dark"] .nc-empty-box,
html[data-theme="dark"] .xdc-del-box,
html[data-theme="dark"] .xdc-dl-pane,
html[data-theme="dark"] .xdc-hours,
html[data-theme="dark"] .apps-custom-remove,
html[data-theme="dark"] .apps-add-page,
html[data-theme="dark"] .bank-row,
html[data-theme="dark"] .pay-method-btn,
html[data-theme="dark"] .pay-modal-card,
html[data-theme="dark"] .cloud-plan-card,
html[data-theme="dark"] .cloud-view-block,
html[data-theme="dark"] .billing-period-card,
html[data-theme="dark"] .coupon-kind-card,
html[data-theme="dark"] .file-manage-panel,
html[data-theme="dark"] .range-tabs a,
html[data-theme="dark"] .sec-manual {
    background: var(--panel);
    color: var(--text);
    border-color: var(--border);
}
html[data-theme="dark"] .pay-method-btn {
    color: #6ee7b7;
    border-color: #047857;
}
html[data-theme="dark"] .pay-method-btn:hover:not(:disabled) {
    background: #064e3b;
}
html[data-theme="dark"] .cloud-view-block h4,
html[data-theme="dark"] .mail-dns-guide p,
html[data-theme="dark"] .mail-domain-result,
html[data-theme="dark"] .xdc-dl-nav a {
    color: var(--text);
}
html[data-theme="dark"] .xdc-map-card,
html[data-theme="dark"] .xdc-net-isolated {
    background: #052e16;
    border-color: #14532d;
    color: #bbf7d0;
}
html[data-theme="dark"] .xdc-dl-nav a.on {
    background: #312e81;
    color: #e0e7ff;
}
html[data-theme="dark"] .coupon-kind-card:has(input:checked) {
    background: #1e3a8a;
}
html[data-theme="dark"] .qrbox {
    background: #fff;
}
html[data-theme="dark"] .badge-blocked {
    color: #fecaca;
}
html[data-theme="dark"] .badge-visitor {
    color: #bae6fd;
}
html[data-theme="dark"] .sec-manual input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background: var(--input-bg);
    color: var(--text);
    border-color: var(--border);
}
html[data-theme="dark"] .mail-outlook-row td {
    background: var(--panel-soft);
}
html[data-theme="dark"] .mail-outlook-imap-kicker,
html[data-theme="dark"] .mail-outlook-imap-dl dd,
html[data-theme="dark"] .mail-dns-guide .data-table td,
html[data-theme="dark"] .mail-dns-guide .data-table th,
html[data-theme="dark"] .xdc-del-box p {
    color: var(--text);
}
html[data-theme="dark"] .mail-outlook-imap-dl dt,
html[data-theme="dark"] .mail-mig-label,
html[data-theme="dark"] .mail-mig-msg,
html[data-theme="dark"] .mail-mig-empty {
    color: var(--muted);
}
html[data-theme="dark"] .xdc-wait-row {
    background: var(--warn-soft);
}
html[data-theme="dark"] .nc-tabs {
    background: var(--panel-soft);
}
html[data-theme="dark"] .nc-tabs a {
    color: var(--text);
}
html[data-theme="dark"] .demo-box,
html[data-theme="dark"] .demo-box strong {
    color: var(--label);
}
html[data-theme="dark"] .demo-box th,
html[data-theme="dark"] .demo-box td {
    border-bottom-color: var(--table-line);
}
html[data-theme="dark"] .badge-off {
    background: #1e293b;
    color: #94a3b8;
}
html[data-theme="dark"] .panel-toggle:hover {
    border-color: #60a5fa;
    background: #1e3a8a;
    color: #bfdbfe;
}
html[data-theme="dark"] .login-webmail-logo,
html[data-theme="dark"] .mail-webmail-logo {
    background: #fff;
}
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
    box-shadow: 0 0 0 1000px var(--input-bg) inset;
    transition: background-color 9999s ease-out;
}

.r53-layout { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 16px; align-items: start; }
.r53-table .mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; word-break: break-all; }
.r53-table tr.is-on td { background: var(--primary-soft); }
.r53-header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.r53-btn-create {
    background: #f59e0b;
    color: #111827;
    font-weight: 800;
    border: 0;
}
.r53-btn-create:hover:not(:disabled) { background: #d97706; color: #111827; }
.r53-public {
    display: inline-block;
    background: #1d4ed8;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    margin-right: 6px;
    vertical-align: middle;
}
.r53-toolbar { margin: 0 0 12px; }
.r53-filter { max-width: 420px; }
.r53-details summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.r53-dl { display: grid; gap: 10px; margin: 12px 0 0; }
.r53-dl > div { display: grid; grid-template-columns: 160px 1fr; gap: 8px; }
.r53-dl dt { color: var(--muted); font-weight: 600; }
.r53-dl dd { margin: 0; }
.r53-rec-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.r53-rec-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.r53-name-row { display: flex; gap: 8px; align-items: center; }
.r53-name-row .form-control { flex: 1; }
.r53-ttl-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.r53-ttl-row .form-control { max-width: 160px; }
.r53-create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.r53-table tr.r53-rec-row { cursor: pointer; }
.r53-hidden { display: none !important; }
@media (max-width: 960px) {
    .r53-layout { grid-template-columns: 1fr; }
    .r53-create-grid, .r53-dl > div { grid-template-columns: 1fr; }
}

.dom-prov { margin: 12px 0 16px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-soft); }
.dom-prov-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; }
.dom-prov-pct { font-size: 1.4rem; font-variant-numeric: tabular-nums; color: var(--primary); min-width: 3.2rem; }
.dom-prov-label { color: var(--label); }
.dom-prov-bar { height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; }
.dom-prov-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2563eb, #22c55e); transition: width .7s ease; }
.dom-prov-steps { display: flex; flex-wrap: wrap; gap: 8px 14px; list-style: none; margin: 10px 0 0; padding: 0; font-size: .85rem; }
.dom-prov-steps li.is-ok { color: var(--success); }
.dom-prov-steps li.is-ok::before { content: "✓ "; }
.dom-prov-steps li.is-wait { color: var(--muted); }
.dom-prov-steps li.is-wait::before { content: "… "; }
.dom-prov.is-done { border-color: #a7f3d0; background: var(--success-soft); }
