html,
body {
    min-height: 100%;
    margin: 0;
}

.nav-link-badge,
.support-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    min-height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--red);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.nav-link-badge {
    margin-left: auto;
}

.support-entry-button,
.support-topbar-button,
.support-page-strip-button,
.support-launcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.support-entry-button svg,
.support-topbar-button svg,
.support-page-strip-button svg,
.support-launcher svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.support-topbar-button {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    background: #ffffff;
    color: var(--blue-strong);
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.07);
}

.support-topbar-button:hover {
    background: #f8fbff;
    color: var(--blue-strong);
}

.support-page-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.94) 0%, rgba(255, 255, 255, 0.98) 100%);
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.08);
}

.support-page-strip strong,
.support-page-strip span {
    display: block;
}

.support-page-strip strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.support-page-strip span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.support-page-strip-button {
    min-height: 46px;
    padding: 0 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.2);
    white-space: nowrap;
}

.support-page-strip-button:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);
    color: #ffffff;
}

.support-chat-root {
    position: relative;
    z-index: 140;
}

.support-launcher-wrap {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 135;
}

.support-launcher {
    min-height: 58px;
    padding: 0 20px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #4f46e5 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.28);
}

.support-launcher:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #4338ca 100%);
}

.support-widget {
    position: fixed;
    inset: 0;
    z-index: 145;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.support-widget.is-visible {
    display: flex;
}

.support-widget-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 34, 0.5);
    backdrop-filter: blur(10px);
}

.support-widget-panel {
    position: relative;
    width: min(100%, 720px);
    max-height: min(92vh, 860px);
    display: grid;
    gap: 20px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 246, 240, 0.99) 100%);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow: 0 32px 90px rgba(15, 23, 42, 0.24);
    overflow: hidden;
}

.support-widget-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(255, 255, 255, 0.94);
    color: var(--muted);
    box-shadow: none;
    font-size: 28px;
    line-height: 1;
}

.support-widget-close:hover {
    background: #ffffff;
    color: var(--text);
    transform: none;
}

.support-widget-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-right: 48px;
}

.support-widget-head h3 {
    margin: 4px 0 0;
    font-size: 30px;
    line-height: 1.08;
}

.support-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f5efe5;
    color: var(--muted);
    border: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.support-status-pill[data-state="open"] {
    background: var(--blue-soft);
    color: var(--blue-strong);
}

.support-status-pill[data-state="unread"] {
    background: var(--amber-soft);
    color: #b45309;
}

.support-status-pill[data-state="closed"] {
    background: var(--red-soft);
    color: var(--red);
}

.support-thread {
    min-height: 300px;
    max-height: min(48vh, 480px);
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(214, 205, 190, 0.86);
    background:
        radial-gradient(circle at top right, rgba(79, 70, 229, 0.05), transparent 26%),
        linear-gradient(180deg, #fffefc 0%, #f8f3ea 100%);
    overflow: auto;
}

.support-empty-state {
    display: grid;
    gap: 8px;
    min-height: 220px;
    place-content: center;
    text-align: center;
    color: var(--muted);
}

.support-empty-state h4 {
    margin: 0;
    color: var(--text);
    font-size: 22px;
}

.support-empty-state p {
    margin: 0;
    line-height: 1.7;
}

.support-message {
    display: flex;
    margin-bottom: 14px;
}

.support-message:last-child {
    margin-bottom: 0;
}

.support-message.is-mine {
    justify-content: flex-end;
}

.support-message.is-system {
    justify-content: center;
}

.support-message-bubble {
    max-width: min(100%, 78%);
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(214, 205, 190, 0.9);
    box-shadow: 0 12px 28px rgba(30, 27, 23, 0.05);
}

.support-message.is-mine .support-message-bubble {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-color: rgba(37, 99, 235, 0.22);
}

.support-message-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
}

.support-message-meta strong {
    font-size: 13px;
}

.support-message-meta small {
    color: inherit;
    opacity: 0.75;
}

.support-message-text {
    line-height: 1.7;
    word-break: break-word;
    white-space: normal;
}

.support-message-image-link {
    display: block;
}

.support-message-image {
    display: block;
    width: 100%;
    max-width: 280px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: #ffffff;
}

.support-system-note {
    max-width: min(100%, 560px);
    display: grid;
    gap: 6px;
    padding: 12px 16px;
    border-radius: 16px;
    background: #f5efe5;
    color: var(--muted);
    text-align: center;
    border: 1px solid rgba(214, 205, 190, 0.92);
}

.support-system-note strong {
    color: var(--text);
}

.support-system-note small {
    font-size: 12px;
}

.support-selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--amber-soft);
    color: #8a5a12;
    border: 1px solid rgba(204, 132, 40, 0.18);
}

.support-selected-file span,
.support-selected-file strong {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.support-file-clear {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(138, 92, 18, 0.18);
    background: rgba(255, 255, 255, 0.82);
    color: #8a5a12;
    box-shadow: none;
}

.support-file-clear:hover {
    background: #ffffff;
    color: #7c4b08;
}

.support-composer {
    display: grid;
    gap: 14px;
}

.support-composer-field {
    display: grid;
    gap: 8px;
}

.support-composer-field span {
    font-size: 13px;
    font-weight: 600;
}

.support-composer textarea,
.support-admin-composer textarea {
    width: 100%;
    min-height: 84px;
    max-height: 128px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: #fffdfa;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    box-sizing: border-box;
    resize: vertical;
}

.support-composer textarea:focus,
.support-admin-composer textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.support-composer-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.support-admin-grid {
    display: grid;
    grid-template-columns: minmax(280px, 320px) minmax(0, 1.35fr) minmax(260px, 320px);
    gap: 20px;
    min-height: calc(100vh - 285px);
}

.support-admin-grid.support-admin-grid-compact {
    grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
}

.support-admin-shell {
    display: grid;
    gap: 18px;
    min-height: calc(100vh - 190px);
    overflow: hidden;
}

.support-admin-main {
    min-width: 0;
    display: grid;
}

.support-case-list,
.support-thread-panel,
.support-control-panel {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(180deg, #fffefc 0%, #fbf7ef 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.support-case-list {
    display: grid;
    gap: 14px;
    align-content: start;
    min-height: 0;
    max-height: calc(100vh - 285px);
    overflow: auto;
}

.support-case-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(214, 205, 190, 0.86);
    background: #ffffff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.support-case-card:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 14px 28px rgba(30, 27, 23, 0.06);
}

.support-case-card.active {
    border-color: rgba(37, 99, 235, 0.28);
    background: #f8fbff;
    box-shadow: 0 18px 30px rgba(37, 99, 235, 0.1);
}

.support-case-head,
.support-case-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.support-case-head strong {
    font-size: 16px;
}

.support-case-preview {
    color: var(--muted);
    line-height: 1.6;
    min-height: 44px;
}

.support-thread-panel {
    display: grid;
    gap: 14px;
    min-height: 0;
    max-height: calc(100vh - 285px);
    grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
}

.support-thread-panel.support-thread-only {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.support-thread-panel.support-thread-only .support-user-summary {
    display: none;
}

.support-thread-toolbar.compact h2 {
    margin-bottom: 6px;
}

.support-thread-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.support-user-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.support-summary-card {
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(214, 205, 190, 0.88);
}

.support-summary-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.support-summary-card strong {
    display: block;
    margin-top: 10px;
    font-size: 20px;
    line-height: 1.4;
    word-break: break-word;
}

.support-control-panel {
    display: grid;
    gap: 18px;
    align-content: start;
    min-height: 0;
    max-height: calc(100vh - 285px);
    overflow: auto;
}

.support-control-panel h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.support-admin-composer {
    display: grid;
    gap: 14px;
    align-content: start;
}

.support-admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.support-manage-backdrop {
    position: fixed;
    inset: 0;
    z-index: 149;
    background: rgba(20, 24, 34, 0.52);
    backdrop-filter: blur(10px);
}

.support-manage-backdrop[hidden] {
    display: none;
}

.support-manage-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.support-control-panel#supportManagePanel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 150;
    width: min(92vw, 760px);
    max-height: min(90vh, 920px);
    padding: 26px;
    overflow: auto;
    transform: translate(-50%, -50%);
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.28);
}

.support-control-panel#supportManagePanel[hidden] {
    display: none;
}

.support-control-panel#supportManagePanel .admin-action-stack {
    display: grid;
    gap: 18px;
}

.support-control-panel#supportManagePanel .support-summary-card {
    background: #ffffff;
}

.support-control-panel#supportManagePanel .actions form {
    margin: 0;
}

.support-thread-panel .support-thread {
    min-height: 0;
    max-height: none;
    height: 100%;
}

.support-widget-panel {
    grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.support-widget-panel .support-thread {
    min-height: 0;
    max-height: none;
}

.support-modal-open {
    overflow: hidden;
}

.wallet-receiver-card {
    padding: 18px 18px 16px;
    border-radius: 20px;
    border: 1px solid rgba(111, 82, 207, 0.16);
    background: linear-gradient(180deg, #f7f4ff 0%, #f2eefc 100%);
}

.wallet-action-row {
    justify-content: center;
}

.topup-status-sheet {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(214, 205, 190, 0.88);
    background: rgba(255, 255, 255, 0.82);
}

.topup-status-callout {
    border-radius: 20px;
}

.bank-summary-card,
.wallet-summary-card {
    gap: 20px;
}

@media (max-width: 980px) {
    .support-admin-grid,
    .support-user-summary {
        grid-template-columns: 1fr;
    }

    .support-admin-grid {
        min-height: 0;
    }

    .support-case-list,
    .support-thread-panel,
    .support-control-panel {
        max-height: none;
    }

    .support-launcher-wrap {
        right: 16px;
        bottom: 16px;
    }
}

@media (max-width: 640px) {
    .support-page-strip {
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
    }

    .support-page-strip-button {
        width: 100%;
    }

    .support-widget {
        padding: 12px;
    }

    .support-widget-panel {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .support-widget-head {
        flex-direction: column;
        padding-right: 40px;
    }

    .support-thread {
        min-height: 240px;
    }

    .support-thread-panel {
        grid-template-rows: auto auto auto minmax(260px, 1fr) auto auto;
    }

    .support-message-bubble {
        max-width: 92%;
    }

    .support-composer-actions,
    .support-admin-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

:root {
    --bg: #f7f3eb;
    --bg-soft: #fcfaf6;
    --panel: #ffffff;
    --line: #e7dfd1;
    --line-strong: #d8cebd;
    --text: #1e1b17;
    --muted: #766f64;
    --blue: #2563eb;
    --blue-strong: #1d4ed8;
    --blue-soft: #f3f6ff;
    --green: #178447;
    --green-soft: #eef9f1;
    --amber: #cc8428;
    --amber-soft: #fff5e8;
    --violet: #6f52cf;
    --violet-soft: #f6f2ff;
    --red: #d94c61;
    --red-soft: #fff1f3;
    --code-bg: #202838;
    --shadow: 0 12px 30px rgba(31, 27, 23, 0.045);
    --radius: 16px;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4.5 6.75 9 11.25l4.5-4.5' stroke='%231d4ed8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

body {
    font-family: 'Kanit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    color: var(--text);
    font-weight: 400;
}

a {
    color: inherit;
}

.dashboard-body {
    background: var(--bg-soft);
}

.admin-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
    align-items: start;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px 20px;
    background: #ffffff;
    border-right: 1px solid var(--line);
    box-sizing: border-box;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 8px;
}

.sidebar-brand img {
    width: 36px;
    height: 36px;
}

.sidebar-brand strong {
    display: block;
    font-size: 20px;
    font-weight: 600;
}

.sidebar-brand span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.sidebar-section-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: var(--bg-soft);
    color: var(--text);
}

.nav-link.active {
    background: var(--blue-soft);
    color: var(--blue-strong);
}

.nav-link-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.nav-link-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 14px;
    padding-top: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 18%);
    position: sticky;
    bottom: 0;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #faf7f2;
}

.sidebar-user-avatar,
.topbar-user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blue);
    color: #ffffff;
    font-weight: 600;
}

.sidebar-user-avatar.has-image,
.topbar-user-badge.has-image {
    background: #f4efe6;
    color: transparent;
    overflow: hidden;
}

.sidebar-user-avatar img,
.topbar-user-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-user-card strong {
    display: block;
    font-weight: 500;
}

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

.sidebar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    color: var(--text);
    transition: background 0.15s ease;
}

.sidebar-logout:hover {
    background: var(--bg-soft);
}

.content-shell {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-content: start;
    min-height: 100vh;
}

.content-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 34px 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-topbar h1 {
    margin: 4px 0 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.page-kicker {
    margin: 0;
    color: var(--blue);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.page-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 760px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-main {
    display: grid;
    gap: 24px;
    padding: 24px 34px 40px;
}

.surface-card,
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.surface-card {
    padding: 24px;
}

.card {
    padding: 32px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-header h2 {
    margin: 4px 0 0;
    font-size: 20px;
    font-weight: 600;
}

.panel-kicker {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.panel-copy {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 14px;
    max-width: 72ch;
}

.panel-chip,
.live-sync-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: #faf8f3;
    border: 1px solid var(--line);
    color: var(--blue-strong);
    font-size: 13px;
    font-weight: 500;
}

.panel-chip.active,
.live-sync-pill[data-state="live"] {
    background: var(--green-soft);
    color: var(--green);
    border-color: rgba(23, 132, 71, 0.18);
}

.live-sync-pill[data-state="loading"] {
    background: var(--amber-soft);
    color: var(--amber);
}

.live-sync-pill[data-state="error"] {
    background: var(--red-soft);
    color: var(--red);
}

.shell-button,
.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: none;
    border-radius: 10px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.shell-button:hover,
.button:hover,
button:hover {
    transform: translateY(-1px);
    background: var(--blue-strong);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.shell-button:disabled,
.button:disabled,
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.shell-button.secondary,
.button.secondary {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--line-strong);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.shell-button.secondary:hover,
.button.secondary:hover {
    background: var(--bg-soft);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.shell-button.danger,
.button.danger,
button.danger {
    background: var(--red);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.15);
}

.shell-button.danger:hover,
.button.danger:hover,
button.danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

.shell-button.small,
.button.small,
button.small {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
    border-radius: 8px;
}

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

.stat-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.stat-card.tone-blue {
    background: #ffffff;
    border-top: 4px solid rgba(37, 99, 235, 0.88);
}

.stat-card.tone-violet {
    background: #ffffff;
    border-top: 4px solid rgba(111, 82, 207, 0.88);
}

.stat-card.tone-green {
    background: #ffffff;
    border-top: 4px solid rgba(23, 132, 71, 0.88);
}

.stat-card.tone-amber {
    background: #ffffff;
    border-top: 4px solid rgba(204, 132, 40, 0.88);
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.stat-value {
    display: block;
    margin-top: 12px;
    font-size: 32px;
    font-weight: 600;
    line-height: 1;
}

.stat-note {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.stat-meta {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.stat-mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 18px;
    line-height: 1.5;
    word-break: break-all;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--blue);
    font-size: 14px;
    font-weight: 700;
}

.tone-violet .stat-badge {
    background: rgba(138, 77, 255, 0.1);
    color: var(--violet);
}

.tone-green .stat-badge {
    background: rgba(23, 164, 75, 0.1);
    color: var(--green);
}

.tone-amber .stat-badge {
    background: rgba(255, 155, 63, 0.12);
    color: var(--amber);
}

.table-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 0 20px;
}

.search-box,
.select-box {
    display: grid;
    gap: 8px;
}

.search-box {
    min-width: min(100%, 400px);
    flex: 1;
}

.toolbar-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar-filters .select-box {
    min-width: 160px;
}

.search-box span,
.select-box span,
.copy-field label,
.field label {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

.search-box input,
.select-box select,
.field select,
.field input,
.copy-input input {
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: linear-gradient(180deg, #fffefc 0%, #f9f4ea 100%);
    color: var(--text);
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.search-box input:focus,
.select-box select:focus,
.field select:focus,
.field input:focus,
.copy-input input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 12px 24px rgba(37, 99, 235, 0.08);
}

.select-box select,
.field select,
.admin-inline-actions select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        radial-gradient(circle at calc(100% - 22px) 50%, rgba(37, 99, 235, 0.13) 0, rgba(37, 99, 235, 0.13) 17px, transparent 17.5px),
        var(--select-arrow),
        linear-gradient(180deg, #fffefc 0%, #f9f4ea 100%);
    background-position:
        calc(100% - 22px) 50%,
        calc(100% - 13px) 50%,
        0 0;
    background-size:
        34px 34px,
        18px 18px,
        100% 100%;
    background-repeat: no-repeat;
    padding-right: 52px;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 6px 16px rgba(31, 27, 23, 0.03);
}

.select-box select:hover,
.field select:hover,
.admin-inline-actions select:hover {
    border-color: rgba(37, 99, 235, 0.35);
    background-image:
        radial-gradient(circle at calc(100% - 22px) 50%, rgba(37, 99, 235, 0.18) 0, rgba(37, 99, 235, 0.18) 17px, transparent 17.5px),
        var(--select-arrow),
        linear-gradient(180deg, #ffffff 0%, #f4f7ff 100%);
}

.select-box select:focus,
.field select:focus,
.admin-inline-actions select:focus {
    background-image:
        radial-gradient(circle at calc(100% - 22px) 50%, rgba(37, 99, 235, 0.22) 0, rgba(37, 99, 235, 0.22) 17px, transparent 17.5px),
        var(--select-arrow),
        linear-gradient(180deg, #ffffff 0%, #f1f6ff 100%);
}

.select-box select option,
.field select option,
.admin-inline-actions select option {
    background: #fffdfa;
    color: var(--text);
}

.select-box.narrow {
    width: 120px;
}

.table-shell {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: auto;
    background: #ffffff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.transactions-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.transactions-table th,
.transactions-table td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

.transactions-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: #faf7f1;
}

.transactions-table th:last-child,
.transactions-table td:last-child {
    text-align: right;
}

.table-primary {
    font-weight: 500;
    color: var(--text);
}

.table-sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.admin-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.admin-users-table td:last-child,
.admin-users-table th:last-child {
    text-align: left;
}

.admin-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-strong) 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
    overflow: hidden;
    flex: 0 0 auto;
}

.admin-user-avatar.has-image {
    background: #f4efe6;
    color: transparent;
}

.admin-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.admin-user-meta .table-sub {
    word-break: break-word;
}

.login-method-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.login-method-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fffdf9;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.login-method-badge.tone-google {
    border-color: rgba(234, 88, 12, 0.16);
    background: #fff4eb;
    color: #c05621;
}

.login-method-badge.tone-discord {
    border-color: rgba(88, 101, 242, 0.16);
    background: #eef1ff;
    color: #4853cf;
}

.login-method-badge.tone-local {
    border-color: rgba(29, 78, 216, 0.16);
    background: #eef4ff;
    color: var(--blue-strong);
}

.login-method-badge.tone-role {
    border-color: rgba(111, 82, 207, 0.16);
    background: var(--violet-soft);
    color: var(--violet);
}

.login-method-badge.tone-active {
    border-color: rgba(23, 132, 71, 0.16);
    background: var(--green-soft);
    color: var(--green);
}

.login-method-badge.tone-inactive {
    border-color: rgba(217, 76, 97, 0.16);
    background: var(--red-soft);
    color: var(--red);
}

.amount-cell {
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge.pending {
    background: var(--amber-soft);
    color: #b45309;
}

.badge.success {
    background: var(--green-soft);
    color: var(--green);
}

.badge.expired {
    background: var(--bg-soft);
    color: var(--muted);
}

.badge.cancelled {
    background: var(--red-soft);
    color: var(--red);
}

.table-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 14px;
    color: var(--muted);
}

.pager {
    display: flex;
    gap: 10px;
}

.panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
    gap: 20px;
}

.latest-card {
    min-width: 0;
}

.stack-form,
.info-stack {
    display: grid;
    gap: 16px;
}

.stack-form.spaced {
    margin-top: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

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

.inline-hint,
.connection-help {
    color: var(--muted);
    font-size: 13px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.latest-layout {
    display: grid;
    gap: 18px;
}

.latest-qr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 24px;
    border-radius: 12px;
    background: #fbf8f2;
    border: 1px dashed var(--line-strong);
}

.latest-qr-wrap img {
    width: 100%;
    max-width: 260px;
    border-radius: 12px;
    background: #ffffff;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(31, 27, 23, 0.06);
}

.latest-qr-wrap .latest-brand-logo {
    max-width: 300px;
    padding: 0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.qr-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 180px;
    border-radius: 12px;
    background: #f5f1e9;
    color: var(--muted);
    font-weight: 500;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.latest-meta {
    display: grid;
    gap: 16px;
}

.meta-list {
    display: grid;
    gap: 12px;
}

.meta-list div {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.meta-list div:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.meta-list span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.meta-list strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
}

.latest-empty {
    padding: 14px 0 6px;
}

.latest-empty h3 {
    margin: 0 0 8px;
}

.copy-field {
    display: grid;
    gap: 8px;
}

.copy-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    position: relative;
}

.copy-input input {
    font-family: Consolas, "Courier New", monospace;
    grid-column: 1;
    grid-row: 1;
    padding-right: 112px;
}

.icon-button {
    min-width: 88px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-right: 8px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.icon-button:hover {
    background: var(--blue-strong);
    border-color: var(--blue-strong);
    transform: translateY(-1px);
}

.option-grid,
.mini-info-grid,
.response-grid {
    display: grid;
    gap: 16px;
}

.option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 20px;
}

.option-grid.single {
    grid-template-columns: 1fr;
}

.option-card,
.mini-info-card {
    display: grid;
    gap: 6px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.option-card.active {
    border-color: rgba(37, 99, 235, 0.24);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.05);
}

.option-card span,
.mini-info-card span {
    color: var(--muted);
    font-size: 13px;
}

.mini-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-info-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-top: 10px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-strong);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid rgba(37, 99, 235, 0.16);
    width: fit-content;
}

.mini-card-action:hover {
    background: #ffffff;
    border-color: rgba(37, 99, 235, 0.28);
}

.topup-hero {
    display: grid;
    gap: 20px;
}

.topup-channel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.topup-channel {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fffefc 0%, #fbf7ef 100%);
}

.topup-channel-wallet {
    background: linear-gradient(180deg, #fffefc 0%, #f7f5ff 100%);
}

.topup-channel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.topup-channel-head h3 {
    margin: 4px 0 0;
    font-size: 22px;
    line-height: 1.2;
}

.channel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-strong);
    border: 1px solid rgba(37, 99, 235, 0.16);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.channel-badge.soft {
    background: var(--violet-soft);
    color: var(--violet);
    border-color: rgba(111, 82, 207, 0.16);
}

.topup-qr-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 248px;
    padding: 18px;
    border: 1px dashed var(--line-strong);
    border-radius: 16px;
    background: #ffffff;
}

.topup-qr-wrap img {
    width: 100%;
    max-width: 240px;
    border-radius: 14px;
    background: #ffffff;
    padding: 12px;
    box-shadow: 0 12px 24px rgba(31, 27, 23, 0.06);
}

.topup-note-list {
    display: grid;
    gap: 12px;
}

.topup-note-list div {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.topup-note-list div:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.topup-note-list span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.topup-note-list strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 500;
}

.topup-flow-shell {
    display: grid;
    gap: 24px;
}

.topup-method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.topup-method-card {
    display: grid;
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 18px;
    width: 100%;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fffefb;
    box-shadow: none;
    color: var(--text);
    text-align: left;
}

.topup-method-card:hover {
    transform: none;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(31, 27, 23, 0.06);
}

.topup-method-card.active {
    border-color: rgba(37, 99, 235, 0.26);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    background: #ffffff;
}

.topup-method-card img {
    width: 100%;
    height: 100%;
    max-height: 116px;
    object-fit: cover;
    border-radius: 16px;
    background: #f7f3eb;
}

.topup-method-copy {
    display: grid;
    align-content: center;
    gap: 8px;
}

.topup-method-label {
    color: var(--blue-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.topup-method-copy strong {
    font-size: 20px;
    line-height: 1.3;
}

.topup-method-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.topup-workspace {
    display: grid;
}

.topup-panel {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #fdf9f2 100%);
}

.topup-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.topup-panel-head h3 {
    margin: 4px 0 0;
    font-size: 26px;
    line-height: 1.2;
}

.topup-input-row {
    align-items: stretch;
}

.topup-side-note {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fffefc;
    border: 1px solid var(--line);
}

.topup-side-note span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.topup-side-note strong {
    font-size: 22px;
    line-height: 1.2;
}

.topup-side-note p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.wallet-note {
    background: #fcfbff;
}

.topup-inline-state {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fffefc;
    color: var(--text);
}

.topup-inline-state.loading {
    background: var(--amber-soft);
    border-color: rgba(204, 132, 40, 0.2);
    color: #a35f12;
}

.topup-inline-state.success {
    background: var(--green-soft);
    border-color: rgba(23, 132, 71, 0.18);
    color: var(--green);
}

.topup-inline-state.error {
    background: var(--red-soft);
    border-color: rgba(217, 76, 97, 0.18);
    color: var(--red);
}

.topup-transaction-view {
    display: grid;
}

.topup-empty-state {
    display: grid;
    gap: 8px;
    padding: 24px;
    border-radius: 16px;
    border: 1px dashed var(--line-strong);
    background: #fffefc;
}

.topup-empty-state h3 {
    margin: 0;
    font-size: 22px;
}

.topup-empty-state p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.topup-result-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: #fffefc;
}

.topup-result-card.compact {
    padding: 20px;
}

.topup-result-main {
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.topup-result-main.is-success {
    display: flex;
    flex-direction: column;
}

.topup-result-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 18px;
    border-radius: 18px;
    border: 1px dashed var(--line-strong);
    background: #ffffff;
}

.topup-result-qr img {
    width: 100%;
    max-width: 260px;
    border-radius: 16px;
    background: #ffffff;
    padding: 14px;
    box-shadow: 0 12px 24px rgba(31, 27, 23, 0.06);
}

.topup-result-meta {
    display: grid;
    gap: 12px;
}

.topup-meta-row {
    display: grid;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.topup-meta-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.topup-meta-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.topup-meta-row strong {
    font-size: 15px;
    line-height: 1.65;
}

.compact-callout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.topup-launchpad {
    position: relative;
    display: grid;
    gap: 32px;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(111, 82, 207, 0.06), transparent 30%),
        radial-gradient(circle at left center, rgba(37, 99, 235, 0.05), transparent 34%),
        linear-gradient(180deg, #fffefc 0%, #f8f3ea 100%);
}

.topup-launchpad::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.55), transparent 46%),
        radial-gradient(circle at 86% 18%, rgba(255, 214, 102, 0.12), transparent 18%);
    pointer-events: none;
}

.topup-launchpad-copy,
.topup-choice-grid,
.payment-modal {
    position: relative;
    z-index: 1;
}

.topup-launchpad-copy {
    display: grid;
    gap: 12px;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.topup-launchpad-copy h2 {
    margin: 0;
    font-size: 40px;
    line-height: 1.04;
}

.topup-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.topup-choice-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    padding: 24px;
    border-radius: 30px;
    border: 1px solid rgba(214, 205, 190, 0.82);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(250, 246, 239, 0.96) 100%);
    box-shadow:
        0 24px 54px rgba(30, 27, 23, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    color: var(--text);
    text-align: left;
    transform: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.topup-choice-card:hover {
    transform: translateY(-4px);
    background: #ffffff;
    box-shadow:
        0 30px 64px rgba(30, 27, 23, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.topup-choice-card.bank {
    border-color: rgba(37, 99, 235, 0.18);
}

.topup-choice-card.wallet {
    border-color: rgba(111, 82, 207, 0.2);
}

.topup-choice-art {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 164px;
    padding: 18px;
    border-radius: 26px;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(250, 246, 239, 0.86));
    border: 1px solid rgba(230, 223, 210, 0.84);
}

.topup-choice-art img {
    width: 100%;
    height: 100%;
    max-height: 144px;
    object-fit: contain;
}

.topup-choice-body {
    display: grid;
    align-content: center;
    gap: 12px;
}

.topup-choice-kicker {
    color: var(--blue-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topup-choice-card.wallet .topup-choice-kicker {
    color: var(--violet);
}

.topup-choice-body strong {
    font-size: 30px;
    line-height: 1.1;
}

.topup-choice-body p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.topup-choice-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 4px;
}

.fee-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(23, 132, 71, 0.24);
    background: rgba(227, 247, 233, 0.84);
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.fee-badge.zero {
    border-color: rgba(23, 132, 71, 0.22);
    background: rgba(227, 247, 233, 0.88);
    color: var(--green);
}

.topup-bonus-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(14, 165, 233, 0.08));
}

.topup-bonus-banner.is-used {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.18), rgba(30, 41, 59, 0.12));
}

.topup-bonus-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.topup-bonus-banner.is-used .topup-bonus-pill {
    background: linear-gradient(135deg, #475569, #64748b);
    box-shadow: none;
}

.topup-bonus-copy {
    display: grid;
    gap: 4px;
}

.topup-bonus-copy strong {
    color: var(--text);
    font-size: 15px;
    font-weight: 800;
}

.topup-bonus-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.payment-modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.payment-modal.is-visible {
    display: flex;
}

.payment-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(33, 29, 24, 0.5);
    backdrop-filter: blur(9px);
}

.payment-modal-card {
    position: relative;
    width: min(100%, 760px);
    max-height: min(92vh, 920px);
    overflow: auto;
    padding: 30px 30px 28px;
    border-radius: 32px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 244, 238, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.86);
    box-shadow:
        0 42px 120px rgba(30, 27, 23, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.payment-modal.is-visible .payment-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.payment-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    margin-left: auto;
    width: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(255, 255, 255, 0.94);
    color: var(--muted);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
    font-size: 28px;
    line-height: 1;
    z-index: 2;
}

.payment-modal-close:hover {
    background: #ffffff;
    color: var(--text);
    transform: none;
}

.payment-modal-panel {
    display: none;
    gap: 24px;
}

.payment-modal-panel.is-active {
    display: grid;
}

.payment-modal-head {
    display: grid;
    gap: 14px;
    padding-right: 56px;
    text-align: center;
}

.payment-modal-head h3 {
    margin: 4px 0 0;
    font-size: 34px;
    line-height: 1.06;
}

.payment-modal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    align-items: start;
}

.wallet-layout {
    grid-template-columns: 1fr;
}

.payment-note-box {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: rgba(244, 248, 255, 0.88);
}

.payment-note-box.wallet {
    border-color: rgba(111, 82, 207, 0.12);
    background: rgba(248, 245, 255, 0.9);
}

.payment-note-box span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.payment-note-box strong {
    font-size: 24px;
    line-height: 1.15;
}

.payment-note-box p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.stack-form {
    display: grid;
    gap: 16px;
}

.payment-modal .field input {
    min-height: 54px;
    border-radius: 16px;
    background: #fffdfa;
    font-size: 16px;
}

.payment-modal .actions {
    justify-content: center;
}

.payment-modal .actions .shell-button {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
}

.payment-modal .actions .shell-button:first-child {
    min-width: 210px;
}

.topup-transaction-view {
    min-height: 180px;
}

.topup-result-card {
    padding: 22px;
    border-radius: 24px;
    border: 1px solid rgba(214, 205, 190, 0.86);
    background: linear-gradient(180deg, #fffefc 0%, #fbf7f0 100%);
    box-shadow: 0 18px 42px rgba(30, 27, 23, 0.05);
}

.topup-result-card.compact {
    padding: 22px;
}

.topup-result-main {
    grid-template-columns: 1fr;
    gap: 18px;
}

.topup-result-qr {
    min-height: 238px;
    border-radius: 22px;
    border: 1px dashed rgba(214, 205, 190, 0.92);
    background: linear-gradient(180deg, #ffffff 0%, #fdf8f1 100%);
}

.topup-result-qr img {
    max-width: 232px;
}

.bank-qr-card {
    display: grid;
    justify-items: center;
    gap: 18px;
}

.topup-qr-amount {
    display: grid;
    gap: 6px;
    text-align: center;
}

.topup-qr-amount span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.topup-qr-amount strong {
    color: var(--text);
    font-size: 30px;
    line-height: 1.1;
    font-weight: 800;
}

.topup-meta-row {
    padding-bottom: 14px;
}

.topup-meta-row strong {
    font-size: 16px;
}

.system-notice-backdrop {
    background: rgba(36, 31, 26, 0.46);
    backdrop-filter: blur(10px);
}

.system-notice-card {
    width: min(100%, 560px);
    padding: 38px 34px 30px;
    border-radius: 34px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.995) 0%, rgba(249, 245, 238, 0.98) 100%);
    box-shadow:
        0 42px 110px rgba(30, 27, 23, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    gap: 20px;
}

.system-notice-icon {
    width: 112px;
    height: 112px;
    border-width: 4px;
}

.system-notice-icon::before {
    font-size: 50px;
}

.system-notice-overlay.success .system-notice-icon::before {
    content: "\2713";
}

.system-notice-overlay.error .system-notice-icon::before {
    content: "!";
}

.system-notice-overlay.pending .system-notice-icon::before {
    content: "\2022\2022\2022";
    letter-spacing: 0.12em;
}

.system-notice-copy {
    gap: 10px;
}

.system-notice-copy h3 {
    font-size: 44px;
}

.system-notice-copy p {
    font-size: 19px;
}

#systemNoticeConfirm {
    min-width: 136px;
    min-height: 50px;
    border-radius: 16px;
}

.system-notice-overlay.success #systemNoticeConfirm {
    background: #7fd037;
    box-shadow: 0 10px 24px rgba(127, 208, 55, 0.24);
}

.system-notice-overlay.success #systemNoticeConfirm:hover {
    background: #70bf2e;
}

.system-notice-overlay.error #systemNoticeConfirm {
    background: var(--red);
    box-shadow: 0 10px 24px rgba(217, 76, 97, 0.22);
}

.system-notice-overlay.error #systemNoticeConfirm:hover {
    background: #c73f54;
}

.system-notice-overlay.pending #systemNoticeConfirm {
    background: var(--amber);
    box-shadow: 0 10px 24px rgba(204, 132, 40, 0.2);
}

.system-notice-overlay.pending #systemNoticeConfirm:hover {
    background: #b77421;
}

.docs-hero,
.docs-section {
    display: grid;
    gap: 18px;
}

.docs-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: stretch;
}

.docs-hero-card,
.docs-auth-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 210px;
}

.docs-hero-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffdf9;
}

.docs-hero-meta {
    display: grid;
    gap: 8px;
}

.docs-hero-meta h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.docs-hero-meta .panel-copy {
    margin-bottom: 0;
}

.docs-copy-field {
    margin-top: 18px;
}

.docs-copy-field .copy-input input {
    min-height: 60px;
    font-size: 15px;
    padding-right: 116px;
    border-radius: 14px;
}

.docs-copy-field .icon-button {
    min-height: 40px;
    margin-right: 10px;
}

.docs-copy-hint {
    display: inline-block;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.docs-keyline {
    margin-top: 18px;
    padding: 18px;
    border-radius: 14px;
    background: #f8f4ee;
    border: 1px solid var(--line);
}

.docs-keyline code {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
}

.docs-auth-box {
    padding: 24px;
    border-radius: 12px;
    background: #fffdf9;
    border: 1px solid var(--line);
}

.docs-auth-box strong {
    font-size: 16px;
    font-weight: 600;
}

.docs-auth-box p {
    margin: 8px 0 16px;
    color: var(--muted);
    font-size: 14px;
}

code {
    font-family: Consolas, "Courier New", monospace;
    background: #f5f1e9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--blue-strong);
}

.tab-group {
    display: grid;
    gap: 0;
}

.tab-row {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.tab-button {
    min-width: 100px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--line);
    background: #fffdf9;
    color: var(--muted);
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.15s ease;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(31, 27, 23, 0.03);
}

.tab-button:hover {
    color: var(--text);
    background: #ffffff;
    border-color: var(--line-strong);
}

.tab-button.active {
    color: var(--blue-strong);
    background: var(--blue-soft);
    border-color: rgba(37, 99, 235, 0.24);
}

.code-panel,
.docs-auth-box pre,
.response-box pre {
    margin: 0;
    padding: 20px;
    overflow: auto;
    border-radius: 12px;
    background: #fbfaf7;
    color: #2a2f3a;
    font: 14px/1.6 Consolas, "Courier New", monospace;
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.code-panel {
    display: none;
}

.code-panel.active {
    display: block;
}

.response-box {
    display: grid;
    gap: 12px;
}

.response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
}

.response-header strong {
    color: var(--text);
    font-weight: 600;
}

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

.docs-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--text);
}

.docs-steps li + li {
    margin-top: 10px;
}

.alert {
    padding: 16px;
    border-radius: 12px;
    font-weight: 500;
}

.alert.success {
    background: var(--green-soft);
    color: var(--green);
}

.alert.error {
    background: var(--red-soft);
    color: var(--red);
}

.system-notice-overlay {
    position: fixed;
    inset: 0;
    z-index: 160;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.system-notice-overlay.is-visible {
    display: flex;
}

.system-notice-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.42);
    backdrop-filter: blur(7px);
}

.system-notice-card {
    position: relative;
    width: min(100%, 520px);
    padding: 34px 30px 28px;
    border-radius: 30px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(249, 245, 238, 0.98) 100%);
    box-shadow:
        0 36px 90px rgba(15, 23, 42, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.86);
    display: grid;
    justify-items: center;
    gap: 18px;
    text-align: center;
    transform: translateY(26px) scale(0.96);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.system-notice-overlay.is-visible .system-notice-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.system-notice-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.9);
    color: var(--muted);
    box-shadow: none;
    font-size: 28px;
    line-height: 1;
}

.system-notice-close:hover {
    background: #ffffff;
    color: var(--text);
    transform: none;
}

.system-notice-icon {
    width: 106px;
    height: 106px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.84);
}

.system-notice-icon::before {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.system-notice-overlay.success .system-notice-icon {
    border-color: rgba(23, 132, 71, 0.2);
    background: rgba(227, 247, 233, 0.9);
    color: var(--green);
}

.system-notice-overlay.success .system-notice-icon::before {
    content: "✓";
}

.system-notice-overlay.error .system-notice-icon {
    border-color: rgba(217, 76, 97, 0.2);
    background: rgba(255, 236, 238, 0.92);
    color: var(--red);
}

.system-notice-overlay.error .system-notice-icon::before {
    content: "!";
}

.system-notice-overlay.pending .system-notice-icon {
    border-color: rgba(204, 132, 40, 0.2);
    background: rgba(255, 245, 224, 0.92);
    color: #b45309;
}

.system-notice-overlay.pending .system-notice-icon::before {
    content: "…";
    animation: noticePulse 1.15s ease-in-out infinite;
}

.system-notice-copy {
    display: grid;
    gap: 8px;
}

.system-notice-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    justify-self: center;
}

.system-notice-copy h3 {
    margin: 0;
    font-size: 42px;
    line-height: 1;
}

.system-notice-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 20px;
    line-height: 1.5;
}

.swal2-confirm.shell-button {
    min-height: 44px !important;
    padding: 0 24px !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
    font-family: 'Kanit', sans-serif !important;
    font-size: 16px !important;
    background: var(--blue) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2) !important;
    border: none !important;
}

.swal2-confirm.shell-button:hover {
    background: var(--blue-strong) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25) !important;
}

.credit-reward-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.credit-reward-overlay.is-visible {
    display: flex;
}

.credit-reward-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.68) 58%),
        rgba(15, 23, 42, 0.4);
    opacity: 0;
    transition: opacity 0.45s ease;
}

.credit-reward-overlay.is-visible .credit-reward-backdrop {
    opacity: 1;
}

.credit-reward-stage {
    position: relative;
    width: min(100%, 540px);
    padding: 32px 24px;
    display: grid;
    justify-items: center;
}

.credit-reward-beam {
    position: absolute;
    top: -10px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 255, 255, 0.72) 0%, rgba(37, 99, 235, 0.28) 34%, rgba(37, 99, 235, 0) 72%);
    filter: blur(2px);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.3s ease, transform 0.45s ease;
}

.credit-reward-overlay.is-opening .credit-reward-beam {
    opacity: 1;
    transform: scale(1.24);
}

.credit-drop-box {
    position: relative;
    width: 196px;
    height: 184px;
    filter: drop-shadow(0 24px 30px rgba(15, 23, 42, 0.28));
    transform: translateY(-220px) scale(0.76) rotate(-10deg);
    opacity: 0;
}

.credit-reward-overlay.is-visible .credit-drop-box {
    opacity: 1;
    animation: creditDropIn 0.72s cubic-bezier(0.18, 0.88, 0.25, 1) forwards;
}

.credit-drop-lid,
.credit-drop-body {
    position: absolute;
    left: 0;
    right: 0;
    border-radius: 26px;
    background:
        linear-gradient(180deg, #4178ff 0%, #2855d6 100%);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
}

.credit-drop-lid {
    top: 14px;
    height: 64px;
    transform-origin: 50% 100%;
    transition: transform 0.56s cubic-bezier(0.2, 0.9, 0.2, 1), filter 0.3s ease;
}

.credit-drop-body {
    top: 66px;
    height: 104px;
}

.credit-drop-core {
    position: absolute;
    inset: 84px 20px 18px;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 214, 102, 0.86) 100%);
    opacity: 0.16;
}

.credit-reward-overlay.is-opening .credit-drop-lid {
    transform: translateY(-34px) rotate(-18deg);
    filter: brightness(1.1);
}

.credit-spark {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: radial-gradient(circle, #fff7bf 0%, #ffd84f 58%, rgba(255, 216, 79, 0) 100%);
    opacity: 0;
    filter: blur(0.2px);
}

.spark-a {
    left: 24px;
    top: 74px;
}

.spark-b {
    right: 26px;
    top: 58px;
}

.spark-c {
    left: calc(50% - 7px);
    top: 34px;
}

.credit-reward-overlay.is-opening .spark-a {
    animation: creditSparkA 1.1s ease-out forwards;
}

.credit-reward-overlay.is-opening .spark-b {
    animation: creditSparkB 1.2s ease-out forwards;
}

.credit-reward-overlay.is-opening .spark-c {
    animation: creditSparkC 1s ease-out forwards;
}

.credit-reward-panel {
    margin-top: -6px;
    width: min(100%, 440px);
    padding: 22px 24px 24px;
    border-radius: 28px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 244, 238, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 28px 70px rgba(15, 23, 42, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    opacity: 0;
    transform: translateY(24px) scale(0.96);
}

.credit-reward-overlay.is-opening .credit-reward-panel {
    animation: creditPanelReveal 0.42s ease forwards;
    animation-delay: 0.24s;
}

.credit-reward-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-strong);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.credit-reward-amount {
    display: block;
    margin-top: 16px;
    font-size: clamp(34px, 7vw, 56px);
    line-height: 1;
    font-weight: 700;
    color: #173a8a;
    text-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
}

.credit-reward-text {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.credit-reward-overlay.is-closing .credit-reward-backdrop,
.credit-reward-overlay.is-closing .credit-reward-panel,
.credit-reward-overlay.is-closing .credit-drop-box,
.credit-reward-overlay.is-closing .credit-reward-beam {
    opacity: 0;
}

.credit-reward-overlay.is-closing .credit-reward-panel {
    transform: translateY(18px) scale(0.96);
}

.credit-reward-overlay.is-closing .credit-drop-box {
    transform: translateY(-36px) scale(0.9);
}

@keyframes creditDropIn {
    0% {
        transform: translateY(-220px) scale(0.76) rotate(-10deg);
    }
    64% {
        transform: translateY(12px) scale(1.02) rotate(1deg);
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes creditPanelReveal {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes noticePulse {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.68;
    }
    50% {
        transform: translateY(-2px);
        opacity: 1;
    }
}

@keyframes creditSparkA {
    0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(-24px, -74px) scale(1.2); }
}

@keyframes creditSparkB {
    0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(28px, -82px) scale(1.15); }
}

@keyframes creditSparkC {
    0% { opacity: 0; transform: translate(0, 0) scale(0.4); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate(0, -92px) scale(1.3); }
}

.inline-form {
    margin: 0;
}

.auth-shell,
.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 32px 20px;
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.05), transparent 28%),
        linear-gradient(180deg, #fffdfa 0%, #f8f4ed 100%);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.auth-card {
    width: min(100%, 470px);
    padding: 34px 32px 28px;
    border-radius: 22px;
    border: 1px solid var(--line);
    box-shadow: 0 20px 46px rgba(31, 27, 23, 0.08);
}

.auth-card h1 {
    margin: 8px 0 12px;
    font-size: 34px;
    line-height: 1.15;
}

.auth-card .muted {
    margin: 0 0 18px;
    font-size: 15px;
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 14px;
    margin-top: 8px;
}

.auth-socials {
    display: grid;
    gap: 12px;
    margin: 22px 0 18px;
}

.oauth-button {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    box-sizing: border-box;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.oauth-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(31, 27, 23, 0.08);
}

.oauth-button.oauth-google:hover {
    border-color: #d9c7aa;
    background: #fffdfa;
}

.oauth-button.oauth-discord:hover {
    border-color: rgba(88, 101, 242, 0.28);
    background: #f5f7ff;
}

.oauth-button.oauth-disabled {
    opacity: 0.68;
    cursor: default;
    pointer-events: none;
    box-shadow: none;
}

.oauth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f7f2ea;
    color: #5b5448;
    flex: 0 0 auto;
}

.oauth-google .oauth-icon {
    background: #fff2e9;
    color: #d94a2f;
}

.oauth-discord .oauth-icon {
    background: #eef1ff;
    color: #5865f2;
}

.oauth-icon svg {
    width: 18px;
    height: 18px;
}

.auth-divider {
    position: relative;
    margin: 4px 0 18px;
    text-align: center;
}

.auth-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--line);
}

.auth-divider span {
    position: relative;
    display: inline-block;
    padding: 0 12px;
    background: #ffffff;
    color: var(--muted);
    font-size: 13px;
}

.auth-submit {
    min-width: 132px;
    margin-top: 4px;
}

.auth-footnote {
    margin-top: 18px;
}

.auth-footnote a {
    color: var(--blue-strong);
    font-weight: 500;
}

.page .card[style] {
    background: #ffffff;
}

.brand-wordmark {
    display: block;
    height: 50px;
    max-width: 100%;
}

.brand-wordmark.auth {
    height: 48px;
    margin-bottom: 18px;
}

.balance-pill,
.sidebar-balance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--blue-strong);
    font-weight: 600;
    border: 1px solid rgba(37, 99, 235, 0.14);
}

.sidebar-balance {
    justify-content: flex-start;
    border-radius: 12px;
}

.panel-grid.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-inline-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 520px;
}

.admin-inline-actions .inline-form {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-inline-actions input,
.admin-inline-actions select {
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: linear-gradient(180deg, #fffefc 0%, #f9f4ea 100%);
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.admin-inline-actions select {
    min-width: 92px;
    padding-right: 42px;
}

.admin-balance-form input[type="text"] {
    min-width: 82px;
}

.admin-balance-form input[name="description"] {
    min-width: 150px;
}

.admin-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.admin-inline-row-primary {
    padding-bottom: 2px;
}

.admin-inline-row-balance {
    gap: 10px;
}

.admin-inline-compact {
    flex-wrap: nowrap;
}

.admin-inline-actions .shell-button.small {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 12px;
    white-space: nowrap;
}

.admin-users-table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.admin-user-stats .stat-card {
    min-height: 172px;
    flex-direction: column;
    justify-content: flex-start;
}

.admin-management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
    gap: 20px;
    margin-top: 24px;
}

.admin-management-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(180deg, #fffefb 0%, #fbf7ef 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.admin-management-card h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.admin-action-stack {
    display: grid;
    gap: 16px;
}

.admin-security-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.compact-shell {
    padding: 0;
}

.compact-table th,
.compact-table td {
    padding: 10px 12px;
    font-size: 13px;
}

.latest-empty h3 {
    margin: 0 0 10px;
}

.latest-empty p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.muted {
    color: var(--muted);
}

.mono {
    font-family: Consolas, "Courier New", monospace;
    word-break: break-all;
}

@media (max-width: 1100px) {
    .stats-grid,
    .panel-grid,
    .mini-info-grid,
    .response-grid,
    .docs-hero,
    .admin-management-grid,
    .topup-channel-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 980px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid var(--line);
        position: static;
        top: auto;
        height: auto;
        overflow: visible;
    }

    .sidebar-footer {
        position: static;
        bottom: auto;
        background: transparent;
        padding-top: 8px;
    }

    .content-topbar,
    .content-main {
        padding-left: 20px;
        padding-right: 20px;
    }

    .stats-grid,
    .panel-grid,
    .option-grid,
    .mini-info-grid,
    .response-grid,
    .docs-hero,
    .admin-management-grid,
    .field-row,
    .topup-choice-grid,
    .payment-modal-grid,
    .wallet-layout,
    .topup-channel-grid,
    .topup-method-grid,
    .topup-result-main {
        grid-template-columns: 1fr;
    }

    .table-toolbar,
    .compact-callout,
    .admin-security-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-inline-actions {
        min-width: 0;
    }

    .admin-inline-row,
    .admin-inline-actions .inline-form,
    .admin-inline-compact {
        flex-wrap: wrap;
    }

    .admin-balance-form input[name="description"] {
        min-width: 120px;
    }

    .topup-method-card {
        grid-template-columns: 1fr;
    }

    .topup-choice-card {
        grid-template-columns: 1fr;
    }

    .payment-modal-card {
        width: min(100%, 720px);
    }
}

@media (max-width: 640px) {
    .topup-launchpad-copy h2,
    .payment-modal-head h3 {
        font-size: 28px;
    }

    .topup-choice-body strong {
        font-size: 24px;
    }

    .payment-modal {
        padding: 12px;
    }

    .payment-modal-card {
        padding: 22px 18px;
        border-radius: 24px;
    }

    .system-notice-card {
        padding: 28px 20px 22px;
        border-radius: 24px;
    }

    .system-notice-copy h3 {
        font-size: 34px;
    }

    .system-notice-copy p {
        font-size: 17px;
    }

    .credit-reward-stage {
        padding: 24px 18px;
    }

    .credit-drop-box {
        width: 164px;
        height: 154px;
    }

    .credit-drop-lid {
        height: 54px;
    }

    .credit-drop-body {
        top: 58px;
        height: 88px;
    }

    .credit-drop-core {
        inset: 72px 18px 16px;
    }

    .credit-reward-panel {
        padding: 20px 18px 22px;
        border-radius: 24px;
    }

    .credit-reward-text {
        font-size: 14px;
    }

    .content-topbar {
        flex-direction: column;
    }

    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .copy-input {
        grid-template-columns: 1fr;
    }

    .table-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-card {
        padding: 28px 22px 24px;
        border-radius: 18px;
    }

    .oauth-button {
        min-height: 52px;
        padding: 0 14px;
    }

.auth-card h1 {
        font-size: 26px;
    }
}

/* Dark business theme */
:root {
    color-scheme: dark;
    --bg: #060816;
    --bg-soft: #0a0f1d;
    --panel: rgba(11, 18, 32, 0.88);
    --line: rgba(148, 163, 184, 0.16);
    --line-strong: rgba(148, 163, 184, 0.28);
    --text: #e5eefb;
    --muted: #91a0bb;
    --blue: #3b82f6;
    --blue-strong: #60a5fa;
    --blue-soft: rgba(59, 130, 246, 0.14);
    --green: #34d399;
    --green-soft: rgba(52, 211, 153, 0.14);
    --amber: #f59e0b;
    --amber-soft: rgba(245, 158, 11, 0.14);
    --violet: #8b5cf6;
    --violet-soft: rgba(139, 92, 246, 0.14);
    --red: #fb7185;
    --red-soft: rgba(251, 113, 133, 0.15);
    --code-bg: #0b1120;
    --shadow: 0 18px 44px rgba(2, 6, 23, 0.36);
    --radius: 20px;
    --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4.5 6.75 9 11.25l4.5-4.5' stroke='%2360a5fa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html,
body,
.dashboard-body {
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(139, 92, 246, 0.1), transparent 24%),
        linear-gradient(180deg, #04070f 0%, #09111f 48%, #060816 100%);
    color: var(--text);
}

body {
    font-family: 'Kanit', 'Segoe UI', sans-serif;
    letter-spacing: 0.01em;
}

.admin-shell {
    background: transparent;
}

.sidebar {
    background: rgba(7, 12, 24, 0.92);
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

.sidebar-brand strong,
.content-topbar h1,
.panel-header h2,
.card h2,
.support-widget-head h3,
.payment-modal-head h3,
.auth-card h1 {
    color: #f8fbff;
    letter-spacing: -0.02em;
}

.sidebar-brand span,
.sidebar-section-label,
.page-subtitle,
.panel-copy,
.table-sub,
.support-case-preview,
.support-empty-state,
.sidebar-user-card span,
.docs-subtitle,
.muted {
    color: var(--muted);
}

.sidebar-user-card,
.sidebar-balance,
.sidebar-logout,
.support-entry-button,
.support-topbar-button,
.support-page-strip,
.nav-link,
.panel-chip,
.live-sync-pill,
.auth-card,
.oauth-button {
    background: rgba(15, 23, 42, 0.64);
    border-color: rgba(148, 163, 184, 0.16);
}

.sidebar-user-card,
.sidebar-balance,
.sidebar-logout,
.oauth-button,
.auth-card {
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.nav-link {
    color: #9fb0cb;
}

.nav-link:hover {
    background: rgba(30, 41, 59, 0.72);
    color: #f8fbff;
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.9));
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.28);
}

.nav-link-badge,
.support-count-badge {
    background: linear-gradient(135deg, #fb7185, #ef4444);
    color: #fff;
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.22);
}

.content-topbar {
    background: rgba(5, 10, 20, 0.82);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(18px);
}

.page-kicker {
    color: #7dd3fc;
}

.balance-pill,
.sidebar-balance {
    background: rgba(37, 99, 235, 0.16);
    color: #bfdbfe;
    border: 1px solid rgba(96, 165, 250, 0.22);
}

.topbar-user-badge,
.sidebar-user-avatar {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.surface-card,
.card,
.support-case-list,
.support-thread-panel,
.support-control-panel,
.support-widget-panel,
.payment-modal-card,
.topup-result-card,
.wallet-receiver-card,
.topup-status-sheet,
.support-summary-card,
.topup-status-callout,
.auth-card,
.docs-hero,
.docs-section,
.test-card,
.mini-info-card {
    background: linear-gradient(180deg, rgba(10, 15, 28, 0.96) 0%, rgba(8, 13, 24, 0.92) 100%);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.panel-chip,
.live-sync-pill,
.support-status-pill,
.status-pill {
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.panel-chip.active,
.live-sync-pill[data-state="live"],
.support-status-pill[data-state="open"],
.support-status-pill[data-state="unread"] {
    background: rgba(37, 99, 235, 0.16);
    color: #bfdbfe;
    border-color: rgba(96, 165, 250, 0.22);
}

.support-status-pill[data-state="closed"] {
    background: rgba(127, 29, 29, 0.34);
    color: #fecdd3;
    border-color: rgba(251, 113, 133, 0.22);
}

.shell-button,
.button,
button,
.oauth-button.primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border: 1px solid rgba(96, 165, 250, 0.18);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.24);
}

.shell-button:hover,
.button:hover,
button:hover,
.oauth-button.primary:hover {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.3);
}

.shell-button.secondary,
.button.secondary,
.oauth-button {
    background: rgba(15, 23, 42, 0.72);
    color: #dce8fb;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: none;
}

.shell-button.secondary:hover,
.button.secondary:hover,
.oauth-button:hover {
    background: rgba(30, 41, 59, 0.78);
    color: #ffffff;
}

.shell-button.danger,
.button.danger,
button.danger {
    background: linear-gradient(135deg, #e11d48, #be123c);
    border-color: rgba(251, 113, 133, 0.2);
    box-shadow: 0 14px 32px rgba(225, 29, 72, 0.22);
}

.field select,
.field input,
.copy-input input,
.support-composer textarea,
.support-admin-composer textarea,
.payment-modal .field input,
.auth-card input {
    background: rgba(8, 13, 24, 0.84);
    color: #eff6ff;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.field select:hover,
.field input:hover,
.copy-input input:hover,
.support-composer textarea:hover,
.support-admin-composer textarea:hover,
.auth-card input:hover {
    border-color: rgba(96, 165, 250, 0.24);
}

.field select:focus,
.field input:focus,
.copy-input input:focus,
.support-composer textarea:focus,
.support-admin-composer textarea:focus,
.auth-card input:focus {
    border-color: rgba(96, 165, 250, 0.68);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.field label,
.support-composer-field span,
.panel-kicker,
.auth-card label {
    color: #c6d3ea;
}

.field input::placeholder,
.field textarea::placeholder,
.copy-input input::placeholder,
.support-composer textarea::placeholder,
.support-admin-composer textarea::placeholder,
.auth-card input::placeholder {
    color: #61708c;
}

.transactions-table th,
.transactions-table td,
.logs-table th,
.logs-table td,
.docs-table th,
.docs-table td {
    border-bottom-color: rgba(148, 163, 184, 0.1);
}

.transactions-table th,
.logs-table th,
.docs-table th {
    background: rgba(15, 23, 42, 0.82);
    color: #9fb0cb;
}

.support-thread,
.support-case-card,
.support-message-bubble,
.support-system-note,
.support-selected-file,
.support-page-strip,
.sidebar-user-card,
.response-box,
.copy-input {
    background: rgba(15, 23, 42, 0.58);
    border-color: rgba(148, 163, 184, 0.14);
}

.support-case-card.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(15, 23, 42, 0.82));
    border-color: rgba(96, 165, 250, 0.24);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.28);
}

.support-message-bubble,
.support-system-note,
.topup-result-card,
.response-box,
.docs-hero,
.docs-section,
.mini-info-card,
.auth-card {
    color: #dbeafe;
}

.support-message.is-mine .support-message-bubble {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: rgba(96, 165, 250, 0.22);
    color: #fff;
}

.support-system-note strong {
    color: #f8fbff;
}

.support-message-image,
.support-message-image-link img {
    background: rgba(2, 6, 23, 0.9);
    border-color: rgba(148, 163, 184, 0.12);
}

.payment-modal-backdrop,
.support-widget-backdrop,
.system-notice-backdrop,
.credit-reward-backdrop {
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(16px);
}

.payment-modal-card,
.support-widget-panel,
.system-notice-card {
    background: linear-gradient(180deg, rgba(8, 13, 24, 0.96) 0%, rgba(10, 15, 28, 0.98) 100%);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.alert {
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.alert.success {
    background: rgba(5, 46, 22, 0.46);
    color: #bbf7d0;
}

.alert.error {
    background: rgba(69, 10, 10, 0.46);
    color: #fecdd3;
}

pre,
code,
.docs-code-block {
    background: rgba(8, 13, 24, 0.92);
    color: #d9e7fb;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.7);
}

::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.28);
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.7);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.42);
}

@media (max-width: 960px) {
    .sidebar {
        background: rgba(7, 12, 24, 0.96);
        border-right: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    }

    .content-topbar {
        background: rgba(5, 10, 20, 0.9);
    }
}

/* Next-style product redesign */
:root {
    --bg: #050816;
    --bg-soft: rgba(10, 16, 32, 0.78);
    --panel: rgba(11, 18, 35, 0.82);
    --panel-strong: rgba(8, 13, 27, 0.94);
    --surface-highlight: rgba(255, 255, 255, 0.04);
    --line: rgba(148, 163, 184, 0.14);
    --line-strong: rgba(148, 163, 184, 0.22);
    --text: #eef4ff;
    --muted: #9aa9c7;
    --accent: #5ea4ff;
    --accent-strong: #2f6df6;
    --shadow-xl: 0 32px 80px rgba(1, 6, 20, 0.5);
    --shadow-md: 0 18px 44px rgba(2, 8, 24, 0.3);
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
}

body,
button,
input,
select,
textarea {
    font-family: 'Manrope', 'Kanit', 'Segoe UI', sans-serif;
}

.dashboard-body,
.auth-body {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.18), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.14), transparent 24%),
        radial-gradient(circle at 50% 100%, rgba(99, 102, 241, 0.1), transparent 30%),
        linear-gradient(180deg, #040714 0%, #060b18 42%, #050816 100%);
}

.dashboard-orb {
    position: fixed;
    z-index: 0;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(72px);
    opacity: 0.22;
    pointer-events: none;
}

.dashboard-orb.orb-a {
    top: -120px;
    left: -60px;
    background: #2563eb;
}

.dashboard-orb.orb-b {
    right: -110px;
    bottom: 80px;
    background: #0ea5e9;
}

.dashboard-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), transparent 80%);
}

.admin-shell,
.auth-shell {
    position: relative;
    z-index: 1;
}

.admin-shell {
    gap: 26px;
    padding: 24px;
}

.sidebar {
    width: 308px;
    padding: 24px 18px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(10, 16, 31, 0.95) 0%, rgba(8, 12, 24, 0.92) 100%);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(24px);
}

.sidebar-brand {
    gap: 14px;
    padding: 14px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.sidebar-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.14));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-brand-mark img {
    width: 30px;
    height: 30px;
}

.sidebar-brand-copy {
    display: grid;
    gap: 4px;
}

.sidebar-overview {
    margin: 18px 4px 18px;
    padding: 18px;
    border-radius: 24px;
    background:
        linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.84) 55%);
    border: 1px solid rgba(96, 165, 250, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sidebar-overview-kicker,
.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #93c5fd;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sidebar-overview-title {
    display: block;
    color: #f8fbff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.sidebar-overview-copy {
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.sidebar-overview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sidebar-meta-pill,
.page-view-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.64);
    color: #dce9ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sidebar-section-label {
    margin: 18px 10px 10px;
    color: #7486a7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.sidebar-nav {
    gap: 10px;
}

.nav-link {
    position: relative;
    min-height: 54px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: transparent;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
    transform: translateX(4px);
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    transform: none;
    background: linear-gradient(135deg, rgba(36, 99, 235, 0.2), rgba(13, 18, 33, 0.92));
    border-color: rgba(96, 165, 250, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 30px rgba(8, 15, 32, 0.24);
}

.nav-link-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

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

.sidebar-user-card,
.sidebar-balance,
.sidebar-logout,
.support-entry-button {
    border-radius: 20px;
}

.content-shell {
    gap: 22px;
}

.content-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(10, 16, 31, 0.86) 0%, rgba(8, 12, 24, 0.82) 100%);
    box-shadow: var(--shadow-md);
}

.page-heading-wrap {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.page-heading-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.content-topbar h1,
.panel-header h2,
.auth-showcase-panel h2,
.auth-card h1 {
    font-family: 'Manrope', 'Kanit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.content-topbar h1 {
    font-size: clamp(34px, 3vw, 44px);
    line-height: 1;
}

.page-subtitle {
    max-width: 820px;
    font-size: 14px;
    line-height: 1.75;
}

.topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.balance-pill,
.support-topbar-button,
.shell-button,
.icon-button {
    min-height: 46px;
    border-radius: 16px;
}

.page-stack {
    display: grid;
    gap: 22px;
}

.page-stack > * {
    animation: pageFade 0.35s ease;
}

@keyframes pageFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.surface-card,
.card,
.docs-hero,
.docs-section,
.support-widget-panel,
.payment-modal-card,
.response-box,
.topup-result-card,
.topup-status-sheet,
.wallet-receiver-card {
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(11, 18, 35, 0.92) 0%, rgba(7, 11, 23, 0.9) 100%);
    box-shadow: var(--shadow-md);
}

.surface-card {
    padding: 26px;
}

.panel-header {
    gap: 16px;
    margin-bottom: 18px;
}

.panel-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.stats-grid {
    gap: 18px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background:
        linear-gradient(145deg, rgba(10, 18, 36, 0.92), rgba(7, 11, 23, 0.92));
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: auto -40px -50px auto;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
    opacity: 0.35;
}

.stat-value {
    font-family: 'Manrope', 'Kanit', sans-serif;
    font-size: clamp(28px, 2.5vw, 38px);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.table-toolbar,
.copy-input,
.support-page-strip {
    border-radius: 24px;
}

.table-toolbar {
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line);
}

.table-shell {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(7, 11, 23, 0.7);
}

.transactions-table {
    min-width: 860px;
}

.transactions-table th,
.transactions-table td {
    padding: 18px 20px;
}

.transactions-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge,
.panel-chip,
.live-sync-pill,
.status-pill {
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.field input,
.field select,
.field textarea,
.auth-card input,
.copy-input input,
.support-composer textarea,
.support-admin-composer textarea {
    min-height: 54px;
    border-radius: 16px;
    background: rgba(4, 9, 20, 0.7);
}

.field textarea,
.support-composer textarea,
.support-admin-composer textarea {
    min-height: 132px;
}

.tab-row {
    gap: 10px;
    margin-bottom: 16px;
}

.tab-button {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: #cbd8ef;
    font-weight: 700;
}

.tab-button.active {
    background: rgba(37, 99, 235, 0.16);
    border-color: rgba(96, 165, 250, 0.24);
    color: #fff;
}

.code-panel,
.docs-auth-box pre,
.response-box pre {
    position: relative;
    padding: 56px 22px 22px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        linear-gradient(180deg, rgba(5, 10, 22, 0.98) 0%, rgba(9, 15, 28, 0.95) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.code-panel::before,
.docs-auth-box pre::before,
.response-box pre::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 20px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ff5f57;
    box-shadow: 22px 0 0 #febc2e, 44px 0 0 #28c840;
}

.code-panel::after,
.docs-auth-box pre::after,
.response-box pre::after {
    content: 'terminal';
    position: absolute;
    top: 15px;
    right: 18px;
    color: #7f90ae;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.code-panel code,
.response-box pre code,
.docs-auth-box pre code {
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
}

.docs-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
}

.docs-hero-card,
.docs-auth-box {
    min-height: 240px;
    border-radius: 26px;
}

.topup-choice-card,
.support-case-card,
.mini-info-card,
.option-card,
.oauth-button {
    border-radius: 24px;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.topup-choice-card:hover,
.support-case-card:hover,
.mini-info-card:hover,
.option-card:hover,
.oauth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(2, 8, 24, 0.24);
}

.support-widget-panel,
.payment-modal-card,
.system-notice-card {
    border-radius: 32px;
}

.support-thread,
.support-message-bubble,
.support-selected-file,
.support-system-note {
    border-radius: 22px;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, 520px);
    gap: 28px;
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0;
    align-items: stretch;
}

.auth-showcase {
    display: flex;
}

.auth-showcase-panel,
.auth-form-card {
    height: 100%;
}

.auth-showcase-panel {
    width: 100%;
    padding: 36px;
    border-radius: 36px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(145deg, rgba(37, 99, 235, 0.18), rgba(8, 12, 24, 0.94) 55%),
        linear-gradient(180deg, rgba(12, 18, 33, 0.94), rgba(7, 11, 23, 0.96));
    box-shadow: var(--shadow-xl);
}

.auth-showcase-panel h2 {
    margin: 0;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.02;
    color: #f8fbff;
}

.auth-showcase-panel p {
    max-width: 640px;
    margin: 18px 0 0;
    color: #c0cce2;
    font-size: 15px;
    line-height: 1.85;
}

.auth-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.auth-showcase-grid article {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(10, 16, 31, 0.58);
}

.auth-showcase-grid strong {
    display: block;
    margin-bottom: 8px;
    color: #f8fbff;
    font-size: 16px;
    font-weight: 800;
}

.auth-showcase-grid span {
    color: #aab7d1;
    font-size: 13px;
    line-height: 1.65;
}

.auth-form-card {
    padding: 32px;
    border-radius: 36px;
}

.auth-card .brand-wordmark.auth {
    width: 170px;
    margin-bottom: 12px;
}

.oauth-button {
    min-height: 58px;
}

@media (max-width: 1180px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-showcase-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .admin-shell {
        padding: 16px;
        gap: 16px;
    }

    .sidebar,
    .content-topbar,
    .surface-card,
    .auth-showcase-panel,
    .auth-form-card {
        border-radius: 24px;
    }

    .content-topbar {
        padding: 22px;
    }

    .page-heading-row,
    .topbar-actions {
        align-items: flex-start;
    }

    .page-heading-row,
    .docs-hero,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .content-topbar,
    .page-heading-row {
        display: grid;
    }
}

@media (max-width: 720px) {
    .admin-shell {
        padding: 12px;
    }

    .surface-card {
        padding: 20px;
    }

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

    .content-topbar h1 {
        font-size: 30px;
    }

    .page-view-badge,
    .sidebar-meta-pill {
        width: 100%;
        justify-content: center;
    }
}

/* Contrast fixes for auth interactions */
.oauth-button,
.oauth-button span,
.oauth-button strong {
    color: #e6efff;
}

.oauth-button .oauth-icon {
    color: inherit;
}

.oauth-button:hover,
.oauth-button:focus-visible {
    background: rgba(30, 41, 59, 0.92);
    color: #ffffff;
    border-color: rgba(96, 165, 250, 0.26);
}

.oauth-button.oauth-google:hover,
.oauth-button.oauth-google:focus-visible {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.18), rgba(30, 41, 59, 0.96));
    color: #ffffff;
    border-color: rgba(251, 191, 36, 0.22);
}

.oauth-button.oauth-discord:hover,
.oauth-button.oauth-discord:focus-visible {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(30, 41, 59, 0.96));
    color: #ffffff;
    border-color: rgba(129, 140, 248, 0.28);
}

.oauth-button.oauth-disabled {
    opacity: 1;
    background: rgba(15, 23, 42, 0.48);
    color: #9aa9c7;
    border-color: rgba(148, 163, 184, 0.14);
}

.oauth-button.oauth-disabled .oauth-icon {
    color: #a5b4fc;
}

.auth-divider span {
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(5, 10, 20, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #9fb0cb;
}

/* Stability patch for page-specific legacy components */
.sidebar-footer {
    position: static !important;
    background: transparent !important;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.sidebar-user-card,
.sidebar-balance,
.sidebar-logout,
.support-entry-button {
    background: rgba(17, 24, 39, 0.84) !important;
    color: #e7efff !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
}

.stat-card.tone-blue,
.stat-card.tone-violet,
.stat-card.tone-green,
.stat-card.tone-amber {
    background: linear-gradient(145deg, rgba(10, 18, 36, 0.96), rgba(7, 11, 23, 0.94)) !important;
    color: #eef4ff !important;
}

.stat-label,
.stat-note,
.mini-info-card span,
.connection-help,
.inline-hint,
.topup-empty-state p,
.payment-note-box p,
.payment-note-box span,
.topup-note-list span,
.topup-choice-body p,
.docs-copy-hint,
.docs-auth-box p {
    color: #97a8c8 !important;
}

.docs-hero-card,
.docs-auth-box,
.docs-keyline,
.mini-info-card,
.response-box,
.copy-input,
.table-shell,
.topup-empty-state,
.topup-inline-state,
.topup-result-card,
.topup-status-sheet,
.wallet-receiver-card,
.payment-note-box,
.payment-note-box.wallet,
.topup-choice-card,
.topup-choice-card:hover,
.topup-choice-card.bank,
.topup-choice-card.wallet {
    background: linear-gradient(180deg, rgba(11, 18, 35, 0.94) 0%, rgba(7, 11, 23, 0.92) 100%) !important;
    color: #e7efff !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
    box-shadow: var(--shadow-md) !important;
}

.topup-choice-card:hover {
    transform: translateY(-2px);
}

.topup-choice-kicker,
.docs-keyline code,
.panel-copy code,
.connection-help code {
    color: #a9c7ff !important;
}

.topup-choice-body strong,
.topup-empty-state h3,
.topup-note-list strong,
.topup-meta-row strong,
.payment-note-box strong,
.docs-hero-card h2,
.docs-auth-box h2,
.mini-info-card strong {
    color: #f8fbff !important;
}

.copy-input input,
.docs-copy-field .copy-input input,
.field input,
.field textarea,
.field select,
.select-box select,
.admin-inline-actions select {
    background-color: rgba(4, 9, 20, 0.92) !important;
    color: #eef4ff !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
}

.field select,
.select-box select,
.admin-inline-actions select {
    -webkit-appearance: none;
    appearance: none;
    background-image: var(--select-arrow) !important;
    background-repeat: no-repeat !important;
    background-position: right 18px center !important;
    background-size: 16px 16px !important;
    padding-right: 50px !important;
}

.field select option,
.select-box select option,
.admin-inline-actions select option {
    background: #0b1324;
    color: #eef4ff;
}

.transactions-table th {
    background: rgba(10, 16, 31, 0.92) !important;
}

.transactions-table td {
    background: transparent;
}

.support-page-strip {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(8, 13, 24, 0.88)) !important;
}

/* Layout polish patch */
.admin-shell {
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.sidebar {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.sidebar-footer {
    gap: 10px;
    padding-top: 16px;
}

.sidebar-user-card,
.sidebar-balance,
.sidebar-logout,
.support-entry-button {
    min-height: 56px;
}

.content-shell {
    min-width: 0;
}

.content-topbar {
    align-items: center;
    gap: 22px;
    padding: 24px 26px;
}

.page-heading-wrap {
    max-width: min(100%, 780px);
}

.page-heading-row {
    align-items: flex-end;
    gap: 12px;
}

.topbar-actions {
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.balance-pill,
.support-topbar-button,
.shell-button {
    min-height: 44px;
}

.balance-pill {
    min-width: 156px;
    justify-content: center;
}

.page-stack {
    align-content: start;
}

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

.stat-card {
    min-height: 168px;
    padding: 22px;
}

.stat-value {
    display: block;
    margin-top: 8px;
}

.latest-card {
    overflow: hidden;
}

.latest-layout {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    align-items: stretch;
}

.latest-qr-wrap {
    min-height: 250px;
}

.latest-meta {
    display: grid;
    gap: 18px;
}

.latest-empty {
    display: grid;
    place-items: center;
    min-height: 240px;
    padding: 28px;
    border-radius: 24px;
    border: 1px dashed rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(9, 14, 28, 0.78), rgba(6, 10, 20, 0.72));
    text-align: center;
}

.latest-empty h3 {
    margin: 0 0 10px;
    color: #f8fbff;
}

.latest-empty p {
    margin: 0;
    max-width: 520px;
    color: #9fb0cb;
    line-height: 1.75;
}

.auth-shell {
    width: min(1220px, calc(100% - 48px));
    align-items: center;
}

.auth-showcase-panel {
    padding: 42px;
}

.auth-form-card {
    justify-self: end;
    width: min(100%, 520px);
    padding: 34px;
}

.auth-card .brand-wordmark.auth {
    width: 210px;
    margin-bottom: 16px;
}

.auth-heading-block {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
}

.auth-heading-block .auth-kicker {
    margin-bottom: 0;
}

.auth-card h1 {
    margin: 0;
}

.auth-card .muted {
    margin: 0;
}

.auth-socials {
    margin: 0 0 20px;
}

.oauth-button {
    min-height: 60px;
    padding: 0 18px;
}

.auth-form {
    gap: 16px;
}

.auth-submit {
    width: 100%;
    min-height: 54px;
    margin-top: 4px;
}

@media (max-width: 1180px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        top: auto;
        max-height: none;
    }

    .auth-form-card {
        justify-self: stretch;
        width: 100%;
    }
}

@media (max-width: 960px) {
    .content-topbar {
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .latest-layout {
        grid-template-columns: 1fr;
    }

    .auth-showcase-panel,
    .auth-form-card {
        padding: 28px;
    }
}

@media (max-width: 720px) {
    .auth-shell {
        width: min(100%, calc(100% - 24px));
    }

    .content-topbar {
        padding: 20px;
    }

    .surface-card {
        padding: 20px;
    }
}

/* Global overflow and overlap guard */
html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

.admin-shell > *,
.auth-shell > *,
.stats-grid > *,
.page-stack > *,
.docs-hero > *,
.panel-grid > * {
    min-width: 0;
}

.sidebar {
    width: 100% !important;
    max-width: 100%;
}

.content-shell,
.content-topbar,
.surface-card,
.card,
.auth-showcase,
.auth-showcase-panel,
.auth-form-card,
.latest-layout,
.latest-meta,
.table-shell,
.copy-input {
    min-width: 0;
}

.auth-shell {
    overflow: visible;
}

.auth-showcase-panel,
.auth-form-card,
.content-topbar,
.surface-card,
.card {
    width: 100%;
    max-width: 100%;
}

.topbar-actions,
.page-heading-row,
.sidebar-footer,
.auth-socials,
.support-composer-actions {
    flex-wrap: wrap;
}

/* Admin user modal and auth-only polish */
.admin-modal-open {
    overflow: hidden;
}

.admin-users-table-clean th:nth-child(1) {
    min-width: 280px;
}

.admin-users-table-clean th:nth-child(2),
.admin-users-table-clean th:nth-child(3),
.admin-users-table-clean th:nth-child(4) {
    min-width: 150px;
}

.account-badge-stack {
    display: grid;
    gap: 10px;
    align-content: start;
}

.manage-user-trigger {
    min-width: 136px;
    justify-content: center;
}

.admin-user-avatar-large {
    width: 68px;
    height: 68px;
    font-size: 24px;
}

.admin-user-modal[hidden] {
    display: none !important;
}

.admin-user-modal {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: grid;
    place-items: center;
    padding: 24px;
}

.admin-user-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 8, 23, 0.64);
    backdrop-filter: blur(12px);
}

.admin-user-modal__panel {
    position: relative;
    width: min(1040px, 96vw);
    max-height: min(92vh, 960px);
    overflow: auto;
    padding: 28px;
    border-radius: 32px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(9, 15, 28, 0.98) 0%, rgba(5, 9, 20, 0.98) 100%);
    box-shadow: 0 40px 100px rgba(2, 8, 23, 0.48);
    display: grid;
    gap: 22px;
}

.admin-user-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.82);
    color: #dce8fb;
    font-size: 28px;
    line-height: 1;
    box-shadow: none;
}

.admin-user-modal__close:hover {
    background: rgba(30, 41, 59, 0.96);
    color: #ffffff;
}

.admin-user-modal__header {
    display: grid;
    gap: 18px;
}

.admin-user-modal__identity {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding-right: 56px;
}

.admin-user-modal__copy {
    display: grid;
    gap: 8px;
}

.admin-user-modal__copy h3 {
    margin: 0;
    font-size: clamp(28px, 3vw, 36px);
    line-height: 1;
    color: #f8fbff;
}

.admin-user-modal__copy p {
    margin: 0;
    color: #97a8c8;
    line-height: 1.7;
}

.admin-user-modal__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-user-modal__stat,
.admin-modal-card {
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(13, 19, 35, 0.92) 0%, rgba(8, 12, 24, 0.94) 100%);
}

.admin-user-modal__stat span,
.admin-user-modal__api-key span {
    display: block;
    color: #90a3c4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-user-modal__stat strong {
    display: block;
    margin-top: 10px;
    color: #f8fbff;
    font-size: 20px;
    line-height: 1.4;
    word-break: break-word;
}

.admin-user-modal__body {
    display: grid;
    gap: 16px;
}

.admin-modal-card h4 {
    margin: 6px 0 16px;
    color: #f8fbff;
    font-size: 20px;
}

.admin-modal-form {
    display: grid;
    gap: 14px;
}

.admin-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-modal-grid-triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-modal-toolbar,
.admin-modal-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-user-modal__api-key {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(4, 9, 20, 0.76);
}

.admin-user-modal__api-key code {
    color: #e7efff;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    word-break: break-all;
    line-height: 1.7;
}

.auth-shell-oauth-only {
    align-items: center;
}

.auth-form-card-oauth-only {
    justify-self: end;
}

.auth-oauth-only-note {
    display: grid;
    gap: 6px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid rgba(96, 165, 250, 0.18);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(8, 14, 28, 0.84));
}

.auth-oauth-only-note strong {
    color: #f8fbff;
    font-size: 14px;
}

.auth-oauth-only-note span,
.auth-footnote-oauth-only {
    color: #a9b8d2;
    font-size: 13px;
    line-height: 1.7;
}

.auth-footnote-oauth-only {
    margin: 18px 0 0;
    text-align: center;
}

.auth-card .oauth-icon,
.auth-card .oauth-google .oauth-icon,
.auth-card .oauth-discord .oauth-icon,
.auth-card .oauth-disabled .oauth-icon {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #edf4ff !important;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.auth-card .oauth-button.oauth-google:hover,
.auth-card .oauth-button.oauth-google:focus-visible,
.auth-card .oauth-button.oauth-discord:hover,
.auth-card .oauth-button.oauth-discord:focus-visible {
    background: rgba(30, 41, 59, 0.92) !important;
    color: #ffffff !important;
    border-color: rgba(96, 165, 250, 0.24) !important;
}

.auth-card .oauth-button:hover .oauth-icon,
.auth-card .oauth-button:focus-visible .oauth-icon {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

.dashboard-body .sidebar-brand {
    align-items: center;
    gap: 14px;
    padding: 2px 4px 14px;
}

.dashboard-body .sidebar-brand-mark {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    padding: 14px;
    border-radius: 20px;
}

.dashboard-body .sidebar-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    margin: 0;
}

.dashboard-body .sidebar-brand-copy {
    min-width: 0;
    align-content: center;
}

.dashboard-body .sidebar-brand-copy strong {
    line-height: 1.1;
}

.dashboard-body .sidebar-brand-copy span {
    margin-top: 0;
    line-height: 1.55;
    word-break: break-word;
}

@media (max-width: 980px) {
    .admin-user-modal__stats,
    .admin-modal-grid,
    .admin-modal-grid-triple {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .admin-user-modal {
        padding: 12px;
    }

    .admin-user-modal__panel {
        width: min(100%, 100vw - 16px);
        padding: 20px;
        border-radius: 24px;
    }

    .admin-user-modal__identity,
    .admin-user-modal__stats,
    .admin-modal-grid,
    .admin-modal-grid-triple {
        grid-template-columns: 1fr;
    }

    .admin-user-modal__identity {
        padding-right: 44px;
    }

    .manage-user-trigger {
        width: 100%;
    }
}

/* Sidebar nav icon fit */
.dashboard-body .nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 14px;
}

.dashboard-body .nav-link-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.9;
    overflow: visible;
}

/* Topup page refinement */
body.payment-modal-open {
    overflow: hidden;
}

.payment-modal {
    position: fixed !important;
    inset: 0 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 3000 !important;
}

.payment-modal.is-visible {
    display: flex !important;
}

.payment-modal-backdrop {
    position: absolute;
    inset: 0;
}

.topup-launchpad {
    gap: 28px;
}

.topup-launchpad-copy {
    max-width: 920px;
    margin: 0;
    text-align: left;
}

.payment-modal-card {
    width: min(100%, 980px);
    padding: 34px;
    overflow-x: hidden;
}

.payment-modal[data-mode="wallet"] .payment-modal-card {
    width: min(100%, 920px);
}

.payment-modal-head {
    gap: 12px;
    text-align: left;
}

.payment-modal-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 24px;
}

.wallet-layout {
    grid-template-columns: minmax(0, 1.06fr) minmax(300px, 0.94fr);
}

.payment-modal[data-mode="wallet"] .wallet-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    gap: 20px;
}

.payment-modal-panel,
.stack-form,
.topup-transaction-view {
    min-width: 0;
}

.stack-form {
    gap: 18px;
}

.payment-note-box,
.wallet-auto-note {
    padding: 20px 22px;
}

.wallet-auto-note strong {
    font-size: 20px;
    line-height: 1.45;
}

.payment-modal .actions {
    justify-content: flex-start;
}

.topup-transaction-view {
    min-height: 100%;
    align-self: stretch;
}

.topup-transaction-view > * {
    height: 100%;
}

.bank-summary-card,
.wallet-summary-card {
    display: grid;
    gap: 18px;
}

.wallet-side-card {
    display: grid;
    gap: 18px;
    align-content: start;
    min-height: 100%;
    padding: 24px;
    border-radius: 28px;
    border: 1px solid rgba(59, 130, 246, 0.16);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(9, 14, 33, 0.96), rgba(8, 12, 26, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 20px 50px rgba(2, 6, 23, 0.28);
}

.payment-modal[data-mode="wallet"] .wallet-side-card {
    gap: 16px;
    padding: 22px;
}

.wallet-side-art {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 168px;
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.22));
}

.payment-modal[data-mode="wallet"] .wallet-side-art {
    min-height: 148px;
}

.wallet-side-art img {
    width: min(180px, 100%);
    max-width: 180px;
    filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.28));
}

.wallet-side-copy {
    display: grid;
    gap: 8px;
}

.wallet-side-copy h4 {
    margin: 0;
    color: #f8fafc;
    font-size: 24px;
    line-height: 1.2;
}

.wallet-side-copy p {
    margin: 0;
    color: rgba(226, 232, 240, 0.78);
    font-size: 14px;
    line-height: 1.7;
}

.wallet-side-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(14, 165, 233, 0.96));
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wallet-side-steps {
    display: grid;
    gap: 10px;
}

.wallet-side-step {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.36);
}

.wallet-side-step strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    font-size: 14px;
    font-weight: 800;
}

.wallet-side-step span {
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.wallet-side-result {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(8, 12, 26, 0.52);
}

.wallet-side-result span {
    color: rgba(148, 163, 184, 0.86);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wallet-side-result strong {
    color: #f8fafc;
    font-size: 18px;
    line-height: 1.35;
}

.wallet-side-result-amount {
    color: #f8fafc;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
}

.wallet-side-result.success {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.42), rgba(8, 12, 26, 0.54));
}

.wallet-side-result.failed {
    border-color: rgba(248, 113, 113, 0.24);
    background: linear-gradient(180deg, rgba(127, 29, 29, 0.34), rgba(8, 12, 26, 0.54));
}

.wallet-side-result.pending,
.wallet-side-result.is-idle {
    border-color: rgba(59, 130, 246, 0.24);
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.28), rgba(8, 12, 26, 0.54));
}

.bank-summary-card .topup-result-main {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
    align-items: start;
}

.topup-status-sheet,
.topup-status-callout,
.topup-empty-state {
    height: 100%;
}

.topup-empty-state {
    align-content: start;
}

@media (max-width: 1100px) {
    .topup-launchpad-copy {
        margin: 0 auto;
        text-align: center;
    }

    .payment-modal-card {
        width: min(100%, 860px);
    }

    .payment-modal-grid,
    .wallet-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .payment-modal-card {
        padding: 22px;
    }

    .payment-modal-head {
        padding-right: 44px;
    }

    .payment-modal .actions .shell-button:first-child {
        min-width: 0;
        width: 100%;
    }
}

/* Profile / Security */
.profile-hero {
    display: grid;
    gap: 24px;
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 24px;
    overflow: hidden;
    flex: 0 0 72px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.42));
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
    color: #f8fbff;
    font-size: 26px;
    font-weight: 800;
}

.profile-avatar.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-identity-copy {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.profile-identity-copy h2 {
    margin: 0;
}

.profile-identity-copy p {
    margin: 0;
    color: rgba(219, 229, 255, 0.72);
}

.profile-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-mini-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.provider-card,
.session-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(9, 16, 32, 0.92)),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 52%);
}

.provider-card strong,
.session-card strong {
    display: block;
    margin-bottom: 6px;
    color: #f8fbff;
    font-size: 16px;
}

.provider-card p,
.session-card p {
    margin: 0;
    color: rgba(219, 229, 255, 0.74);
    line-height: 1.65;
}

.provider-card.is-connected {
    border-color: rgba(34, 197, 94, 0.24);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.08);
}

.provider-card.is-idle {
    border-style: dashed;
}

.provider-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.2);
    background: rgba(37, 99, 235, 0.12);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 18px 16px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(10, 18, 34, 0.88);
    cursor: pointer;
}

.toggle-card input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
}

.toggle-card span {
    display: grid;
    gap: 4px;
}

.toggle-card strong {
    color: #f8fbff;
    font-size: 15px;
    line-height: 1.4;
}

.toggle-card small {
    color: rgba(219, 229, 255, 0.68);
    line-height: 1.55;
}

.session-list {
    display: grid;
    gap: 14px;
}

.session-card {
    align-items: center;
}

.session-card.is-current {
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.session-card.empty {
    justify-content: flex-start;
}

.session-copy {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.session-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: rgba(219, 229, 255, 0.62);
    font-size: 13px;
}

.session-action {
    flex: 0 0 auto;
}

@media (max-width: 1180px) {
    .profile-mini-grid,
    .provider-grid,
    .toggle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .profile-identity,
    .provider-card,
    .session-card {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-mini-grid,
    .provider-grid,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .session-action .shell-button {
        width: 100%;
    }
}

/* Test page */
.test-panel-grid {
    align-items: start;
}

.test-panel-grid > .surface-card {
    align-self: start;
}

.test-wallet-card .stack-form {
    gap: 20px;
}

.test-wallet-card .panel-copy {
    margin-bottom: 18px;
}

.test-wallet-card .actions {
    margin-top: 2px;
    margin-bottom: 10px;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.test-wallet-card .actions .inline-hint {
    max-width: 100%;
    line-height: 1.7;
}

.test-wallet-result-view {
    min-height: 0;
    align-self: auto;
    margin-top: 6px;
}

.test-wallet-result-view > * {
    height: auto;
}

.test-wallet-empty-state {
    min-height: 200px;
    padding: 28px 24px;
    align-content: center;
}

.test-wallet-empty-state h3 {
    margin-bottom: 6px;
}

.test-wallet-empty-state p {
    max-width: 680px;
}

.test-wallet-result-card {
    min-height: 0;
    padding: 24px;
}

@media (max-width: 780px) {
    .test-wallet-card .actions {
        align-items: stretch;
    }

    .test-wallet-card .actions .shell-button {
        width: 100%;
    }
}
