:root {
    --admin-bg-1: #070b12;
    --admin-bg-2: #0f1419;
    --admin-card: rgba(12, 16, 24, 0.88);
    --admin-border: rgba(255, 255, 255, 0.08);
    --admin-text: #f4f4f5;
    --admin-muted: #8b95a5;
    --admin-accent: #6366f1;
    --admin-accent-2: #8b5cf6;
    --login-gold: #c9a962;
    --login-gold-soft: rgba(201, 169, 98, 0.14);
    --login-line: rgba(255, 255, 255, 0.1);
    --login-input-bg: rgba(255, 255, 255, 0.03);
    --admin-topbar-bg: rgba(8, 11, 18, 0.96);
    --admin-sidebar-bg: rgba(8, 11, 18, 0.88);
    --admin-dropdown-bg: rgba(12, 16, 24, 0.98);
    --admin-surface: rgba(255, 255, 255, 0.02);
    --admin-surface-2: rgba(255, 255, 255, 0.02);
    --admin-surface-hover: rgba(255, 255, 255, 0.04);
    --admin-nav-color: rgba(255, 255, 255, 0.72);
    --admin-nav-active-color: #fff;
    --admin-title-color: rgba(255, 255, 255, 0.88);
    --admin-toggle-bg: rgba(255, 255, 255, 0.03);
    --admin-main-glow-1: rgba(201, 169, 98, 0.06);
    --admin-main-glow-2: rgba(99, 102, 241, 0.06);
    --admin-shadow: rgba(0, 0, 0, 0.45);
    --admin-login-card-bg: rgba(8, 11, 18, 0.72);
    --admin-login-card-shadow: rgba(0, 0, 0, 0.55);
    --admin-login-feature-text: rgba(255, 255, 255, 0.78);
    --admin-scrollbar-track: rgba(255, 255, 255, 0.05);
    --admin-scrollbar-thumb: rgba(148, 163, 184, 0.34);
    --admin-scrollbar-thumb-hover: rgba(201, 169, 98, 0.58);
    --admin-scrollbar-corner: rgba(7, 11, 18, 0.98);
    --admin-scrollbar-size: 6px;
    --admin-scrollbar-thumb-border: 1px;
    --home-menu-head-bg: linear-gradient(180deg, rgba(201, 169, 98, 0.2) 0%, rgba(201, 169, 98, 0.1) 100%);
    --home-menu-head-border: rgba(201, 169, 98, 0.28);
    --home-menu-head-hover: rgba(201, 169, 98, 0.24);
}

html[data-theme="light"] {
    --admin-bg-1: #f5f6f8;
    --admin-bg-2: #eef0f4;
    --admin-card: rgba(255, 255, 255, 0.95);
    --admin-border: rgba(15, 23, 42, 0.1);
    --admin-text: #1e293b;
    --admin-muted: #64748b;
    --login-gold: #9a7b3c;
    --login-gold-soft: rgba(154, 123, 60, 0.12);
    --login-line: rgba(15, 23, 42, 0.12);
    --login-input-bg: #fff;
    --admin-topbar-bg: rgba(255, 255, 255, 0.96);
    --admin-sidebar-bg: rgba(255, 255, 255, 0.92);
    --admin-dropdown-bg: rgba(255, 255, 255, 0.98);
    --admin-surface: rgba(255, 255, 255, 0.92);
    --admin-surface-2: rgba(248, 250, 252, 0.95);
    --admin-surface-hover: rgba(15, 23, 42, 0.04);
    --admin-nav-color: rgba(30, 41, 59, 0.78);
    --admin-nav-active-color: #1e293b;
    --admin-title-color: rgba(15, 23, 42, 0.88);
    --admin-toggle-bg: rgba(15, 23, 42, 0.04);
    --admin-main-glow-1: rgba(201, 169, 98, 0.08);
    --admin-main-glow-2: rgba(99, 102, 241, 0.05);
    --admin-shadow: rgba(15, 23, 42, 0.12);
    --admin-login-card-bg: rgba(255, 255, 255, 0.94);
    --admin-login-card-shadow: rgba(15, 23, 42, 0.1);
    --admin-login-feature-text: rgba(30, 41, 59, 0.78);
    --admin-scrollbar-track: rgba(15, 23, 42, 0.07);
    --admin-scrollbar-thumb: rgba(100, 116, 139, 0.38);
    --admin-scrollbar-thumb-hover: rgba(154, 123, 60, 0.52);
    --admin-scrollbar-corner: rgba(245, 246, 248, 0.98);
    --home-menu-head-bg: linear-gradient(180deg, #f3ead8 0%, #ebe2cf 100%);
    --home-menu-head-border: rgba(154, 123, 60, 0.22);
    --home-menu-head-hover: rgba(154, 123, 60, 0.16);
}

/* ── Scrollbars ── */

html[data-theme="dark"],
html[data-theme="light"] {
    scrollbar-width: thin;
    scrollbar-color: var(--admin-scrollbar-thumb) var(--admin-scrollbar-track);
}

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

html[data-theme="dark"] *,
html[data-theme="light"] * {
    scrollbar-width: thin;
    scrollbar-color: var(--admin-scrollbar-thumb) var(--admin-scrollbar-track);
}

html[data-theme="dark"] ::-webkit-scrollbar,
html[data-theme="light"] ::-webkit-scrollbar {
    width: var(--admin-scrollbar-size);
    height: var(--admin-scrollbar-size);
}

html[data-theme="dark"] ::-webkit-scrollbar-track,
html[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--admin-scrollbar-track);
    border-radius: 999px;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb,
html[data-theme="light"] ::-webkit-scrollbar-thumb {
    background-color: var(--admin-scrollbar-thumb);
    border-radius: 999px;
    border: var(--admin-scrollbar-thumb-border) solid transparent;
    background-clip: padding-box;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover,
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background-color: var(--admin-scrollbar-thumb-hover);
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:active,
html[data-theme="light"] ::-webkit-scrollbar-thumb:active {
    background-color: var(--login-gold);
}

html[data-theme="dark"] ::-webkit-scrollbar-corner,
html[data-theme="light"] ::-webkit-scrollbar-corner {
    background: var(--admin-scrollbar-corner);
}

html[data-theme="dark"] .admin-topbar-stats,
html[data-theme="light"] .admin-topbar-stats {
    scrollbar-width: none;
}

html[data-theme="dark"] .admin-topbar-stats::-webkit-scrollbar,
html[data-theme="light"] .admin-topbar-stats::-webkit-scrollbar {
    display: none;
}


* {
    box-sizing: border-box;
}

body.admin-login-body,
body.admin-app-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--admin-text);
    -webkit-font-smoothing: antialiased;
}


/* ── Login page ── */

body.admin-login-body {
    background: var(--admin-bg-1);
    position: relative;
    overflow-x: hidden;
}

.admin-login-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.admin-login-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.admin-login-glow--gold {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: rgba(201, 169, 98, 0.12);
}

.admin-login-glow--blue {
    width: 360px;
    height: 360px;
    bottom: -100px;
    left: -60px;
    background: rgba(99, 102, 241, 0.1);
}

.admin-login-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}

.admin-login-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-login-card {
    width: 100%;
    max-width: 920px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    background: var(--admin-login-card-bg);
    backdrop-filter: blur(24px);
    box-shadow:
        0 32px 100px var(--admin-login-card-shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.admin-login-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 36px;
    background:
        linear-gradient(165deg, rgba(201, 169, 98, 0.08) 0%, transparent 45%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-right: 1px solid var(--admin-border);
}

.admin-login-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 36px;
    right: 36px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--login-gold), transparent);
    opacity: 0.5;
}

.admin-login-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}

.admin-login-mark-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 14px;
    color: var(--login-gold);
    background: var(--login-gold-soft);
    border: 1px solid rgba(201, 169, 98, 0.22);
}

.admin-login-mark-text {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--admin-nav-color);
}

.admin-login-headline {
    margin: 0 0 16px;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.admin-login-panel-desc {
    margin: 0 0 32px;
    color: var(--admin-muted);
    font-size: 14px;
    line-height: 1.7;
    max-width: 280px;
}

.admin-login-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.admin-login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--admin-login-feature-text);
}

.admin-login-features i {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 14px;
    color: var(--login-gold);
    background: var(--admin-surface-hover);
    border: 1px solid var(--login-line);
    flex-shrink: 0;
}

.admin-login-panel-foot {
    margin-top: 40px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(139, 149, 165, 0.7);
}

.admin-login-form-wrap {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-login-form-header {
    margin-bottom: 28px;
}

.admin-login-kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--login-gold);
}

.admin-login-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.admin-login-desc {
    margin: 0;
    color: var(--admin-muted);
    font-size: 14px;
    line-height: 1.5;
}

.admin-login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.admin-login-alert i {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.admin-login-alert--error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.admin-login-alert--success {
    color: #bbf7d0;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.admin-login-form {
    display: grid;
    gap: 20px;
}

.admin-input-group {
    display: grid;
    gap: 8px;
}

.admin-input-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
}

.admin-input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-input-icon {
    position: absolute;
    left: 16px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    transition: color 0.2s ease;
}

.admin-input {
    width: 100%;
    min-height: 54px;
    padding: 0 48px 0 46px;
    border: 1px solid var(--login-line);
    border-radius: 14px;
    background: var(--login-input-bg);
    color: var(--admin-text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.admin-input::placeholder {
    color: rgba(139, 149, 165, 0.65);
}

.admin-input:focus {
    border-color: rgba(201, 169, 98, 0.45);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.08);
}

.admin-input-shell:focus-within .admin-input-icon {
    color: var(--login-gold);
}

.admin-input-toggle {
    position: absolute;
    right: 8px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.admin-input-toggle:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
}

.admin-submit {
    position: relative;
    min-height: 54px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #0a0c10;
    background: linear-gradient(135deg, #e8d5a3 0%, #c9a962 48%, #b8944f 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 12px 32px rgba(201, 169, 98, 0.22);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.admin-submit:hover {
    filter: brightness(1.04);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.3) inset,
        0 16px 40px rgba(201, 169, 98, 0.28);
}

.admin-submit:active {
    transform: scale(0.985);
}

.admin-submit-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
    font-size: 14px;
}

.admin-login-foot {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--admin-muted);
}

.admin-login-foot-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}


/* ── Admin app layout ── */

body.admin-app-body {
    background: var(--admin-bg-1);
    overflow: hidden;
}

.admin-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

.admin-topbar {
    flex-shrink: 0;
    width: 100%;
    height: 56px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-topbar-bg);
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 30;
}

.admin-topbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}


.admin-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-left: auto;
    min-width: 0;
    flex: 1;
}

.admin-topbar-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px 0;
}

.admin-topbar-stats::-webkit-scrollbar {
    display: none;
}

.admin-topbar-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: var(--admin-toggle-bg);
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-topbar-stat i {
    color: var(--login-gold);
    font-size: 13px;
}

.admin-topbar-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--admin-muted);
}

.admin-topbar-stat--link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.admin-topbar-stat--link:hover {
    border-color: rgba(201, 169, 98, 0.45);
    background: rgba(201, 169, 98, 0.1);
}

.admin-topbar-stat--link:hover .admin-topbar-stat-label,
.admin-topbar-stat--link:hover .admin-topbar-stat-value {
    color: var(--admin-text);
}

.admin-topbar-stat-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--admin-text);
    font-variant-numeric: tabular-nums;
}

.admin-topbar-stat-value.is-updated {
    animation: admin-topbar-stat-pulse 0.6s ease;
}

@keyframes admin-topbar-stat-pulse {
    0% { color: var(--admin-text); transform: scale(1); }
    35% { color: var(--admin-accent, #3b82f6); transform: scale(1.08); }
    100% { color: var(--admin-text); transform: scale(1); }
}

.admin-topbar-user {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.admin-sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--login-line);
    border-radius: 10px;
    background: var(--admin-toggle-bg);
    color: var(--admin-text);
    place-items: center;
    cursor: pointer;
}

.admin-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.admin-topbar-brand:hover {
    color: inherit;
    opacity: 0.88;
}

.admin-topbar-brand:focus-visible {
    outline: 2px solid rgba(201, 169, 98, 0.55);
    outline-offset: 3px;
    border-radius: 8px;
}

.admin-topbar-logo {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 14px;
    color: var(--login-gold);
    background: var(--login-gold-soft);
    border: 1px solid rgba(201, 169, 98, 0.22);
}


.admin-charge-quick {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    padding: 7px 13px 7px 11px;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    background: var(--admin-toggle-bg);
    color: var(--admin-text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.admin-charge-quick i {
    font-size: 15px;
    color: #6366f1;
    transition: color 0.15s ease;
}

.admin-charge-quick-label {
    line-height: 1;
}

.admin-charge-quick:hover {
    background: var(--admin-surface-hover);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
    color: var(--admin-text);
}

.admin-charge-quick:hover i {
    color: #4f46e5;
}

.admin-charge-quick.has-pending {
    border-color: rgba(220, 38, 38, 0.28);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.88));
}

html[data-theme="dark"] .admin-charge-quick.has-pending {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.22), rgba(15, 23, 42, 0.72));
}

.admin-charge-quick.has-pending i {
    color: #dc2626;
}

.admin-charge-quick-badge {
    position: absolute;
    top: -7px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(145deg, #ff4d4f 0%, #dc2626 55%, #b91c1c 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    border: 2px solid var(--admin-topbar-bg);
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    animation: admin-charge-badge-pop 0.28s ease;
}

.admin-charge-quick-badge[hidden] {
    display: none !important;
}

@keyframes admin-charge-badge-pop {
    0% { transform: scale(0.55); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 640px) {
    .admin-charge-quick-label {
        display: none;
    }

    .admin-charge-quick {
        margin-left: 6px;
        padding: 7px 10px;
    }
}


.admin-topbar-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--admin-title-color);
}

.admin-app-frame {
    flex: 1;
    display: flex;
    min-height: 0;
    position: relative;
}

.admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 20;
}

.admin-sidebar {
    width: 248px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--admin-border);
    background: var(--admin-sidebar-bg);
    backdrop-filter: blur(16px);
    z-index: 25;
}

.admin-user-dropdown {
    position: relative;
}

.admin-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 130px;
    padding: 6px 10px;
    border: 1px solid var(--login-line);
    border-radius: 999px;
    background: var(--admin-toggle-bg);
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 600;
}

.admin-user-toggle::after {
    margin-left: 2px;
    font-size: 11px;
    color: var(--admin-muted);
}

.admin-user-toggle i {
    font-size: 16px;
    color: var(--login-gold);
    flex-shrink: 0;
}

.admin-user-id {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-dropdown-menu {
    min-width: 180px;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: var(--admin-dropdown-bg);
    box-shadow: 0 20px 50px var(--admin-shadow);
    text-align: right;
}

.admin-dropdown-meta {
    padding: 10px 12px 6px;
    text-align: left;
}

.admin-dropdown-meta-label {
    display: block;
    font-size: 11px;
    color: var(--admin-muted);
    margin-bottom: 2px;
    text-align: left;
}

.admin-dropdown-meta strong {
    display: block;
    font-size: 13px;
    color: var(--admin-text);
    text-align: left;
}

.admin-dropdown-divider {
    border-color: var(--admin-border);
    margin: 6px 0;
}

.admin-logout-form {
    margin: 0;
}

.admin-dropdown-item {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fecaca;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    cursor: pointer;
    transition: background 0.15s ease;
}

.admin-dropdown-item:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

.admin-nav {
    flex: 1;
    padding: 10px 12px;
    overflow-y: auto;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    margin-bottom: 2px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--admin-nav-color);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.admin-nav-item i {
    width: 20px;
    font-size: 17px;
    color: var(--admin-muted);
    transition: color 0.15s ease;
}

.admin-nav-item:hover {
    background: var(--admin-surface-hover);
    color: var(--admin-text);
}

.admin-nav-item:hover i {
    color: var(--login-gold);
}

.admin-nav-item.is-active {
    background: var(--login-gold-soft);
    border-color: rgba(201, 169, 98, 0.24);
    color: var(--admin-nav-active-color);
}


.admin-nav-item.is-pending {
    cursor: default;
    opacity: 0.72;
}

.admin-nav-item.is-pending:hover {
    background: transparent;
    color: var(--admin-nav-color);
    border-color: transparent;
}

.admin-nav-item.is-pending:hover i {
    color: var(--admin-muted);
}

.admin-nav-item.is-active i {
    color: var(--login-gold);
}

.admin-main {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    padding: 28px;
    background:
        radial-gradient(circle at top right, var(--admin-main-glow-1), transparent 30%),
        radial-gradient(circle at bottom left, var(--admin-main-glow-2), transparent 28%),
        var(--admin-bg-1);
}



.admin-main-content {
    flex: 1;
    min-height: 0;
    width: 100%;
}

.admin-main:has(.mgmt-page) .admin-main-content,
.admin-main:has(.charge-page) .admin-main-content {
    display: flex;
    flex-direction: column;
}

.admin-main.is-loading .admin-main-content {
    pointer-events: none;
    user-select: none;
}

.admin-main-loader {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(245, 246, 248, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: admin-loader-in 0.2s ease;
}

html[data-theme="dark"] .admin-main-loader {
    background: rgba(15, 23, 42, 0.78);
}

.admin-main-loader[hidden] {
    display: none !important;
}

.admin-main-loader-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 22px 26px;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.admin-spinner {
    position: relative;
    width: 54px;
    height: 54px;
}

.admin-spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.12);
    border-top-color: #6366f1;
    border-right-color: rgba(201, 169, 98, 0.85);
    animation: admin-spin 0.85s linear infinite;
}

.admin-spinner-core {
    position: absolute;
    inset: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.16), rgba(99, 102, 241, 0.12));
    color: var(--login-gold);
    font-size: 14px;
    animation: admin-spinner-pulse 1.2s ease-in-out infinite;
}

.admin-main-loader-text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--admin-muted);
}

@keyframes admin-spin {
    to { transform: rotate(360deg); }
}

@keyframes admin-spinner-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.92); opacity: 0.82; }
}

@keyframes admin-loader-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.admin-page-head {
    margin-bottom: 28px;
}

.admin-page-kicker {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--login-gold);
}

.admin-page-title {
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.admin-page-desc {
    margin: 0;
    color: var(--admin-muted);
    line-height: 1.6;
}

.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
}

.admin-stat-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 18px;
    color: var(--login-gold);
    background: var(--login-gold-soft);
    border: 1px solid rgba(201, 169, 98, 0.18);
    flex-shrink: 0;
}

.admin-stat-label {
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--admin-muted);
}

.admin-stat-value {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    word-break: break-all;
}

.admin-panel {
    border-radius: 18px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    overflow: hidden;
}

.admin-panel-head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}

.admin-panel-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-panel-title i {
    color: var(--login-gold);
}

.admin-panel-body {
    padding: 20px;
}

.admin-panel-text {
    margin: 0;
    color: var(--admin-muted);
    line-height: 1.7;
}

/* ── Dashboard HOME (admin-page) ── */
.admin-main:has(.admin-page) {
    padding: 6px 10px 12px;
}

.admin-page > .admin-stat-grid:first-child,
.admin-page > .home-menu-table-panel:first-child {
    margin-top: 0;
}

.admin-page .admin-page-head {
    margin-bottom: 14px;
}

.admin-page .admin-page-kicker {
    margin-bottom: 4px;
}

.admin-page .admin-page-title {
    margin-bottom: 4px;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.admin-page .admin-page-desc {
    font-size: 13px;
    line-height: 1.5;
}

.admin-page .admin-stat-grid {
    gap: 10px;
    margin-bottom: 12px;
}

.admin-page .admin-stat-card {
    padding: 12px 14px;
    border-radius: 12px;
    gap: 10px;
}

.admin-page .admin-stat-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
    border-radius: 10px;
}

.admin-page .admin-panel {
    border-radius: 12px;
}

.admin-page .admin-panel-head {
    padding: 10px 14px;
}

.admin-page .admin-panel-body {
    padding: 12px 14px;
}

.admin-page .admin-panel-text {
    line-height: 1.6;
    font-size: 13px;
}



.home-members-panel {
    margin-top: 10px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    overflow: hidden;
}

html[data-theme="dark"] .home-members-panel {
    background: var(--admin-surface);
}

.home-members-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.home-members-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 12px;
}

.home-members-table thead tr,
.home-members-table tbody tr {
    display: table-row;
}

.home-members-table th,
.home-members-table td {
    display: table-cell;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.home-members-table thead tr {
    background: var(--admin-surface-2);
}

.home-members-table th {
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
}

.home-members-table th.num,
.home-members-table td.num {
    text-align: right;
}

.home-members-table tbody tr:hover td {
    background: rgba(148, 163, 184, 0.06);
}

.home-members-empty {
    padding: 24px 10px !important;
    text-align: center;
    color: var(--admin-muted);
    white-space: normal;
}

.home-members-name strong,
.home-members-cell-inner strong {
    font-weight: 700;
    color: var(--admin-text);
}

.home-members-cell-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    vertical-align: middle;
}

.home-members-cell-inner--level {
    justify-content: flex-end;
    width: 100%;
}

.home-members-level-icon {
    display: block;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.home-members-table .members-unit {
    margin-left: 2px;
    font-size: 10px;
    color: var(--admin-muted);
    font-weight: 500;
}

.home-members-table .muted {
    color: var(--admin-muted);
}

.home-members-table .mid {
    font-weight: 600;
}

.home-members-table .member-name-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.home-members-popup-icon {
    font-size: 11px;
    line-height: 1;
    opacity: 0.62;
    flex-shrink: 0;
}

.home-members-table .member-name-link:hover .home-members-popup-icon,
.home-members-table .member-name-link:focus-visible .home-members-popup-icon {
    opacity: 1;
}

.home-members-table .member-name-link,
.home-members-table .member-name-link .mid {
    color: #000;
}

.home-members-table .member-name-link:hover,
.home-members-table .member-name-link:focus-visible {
    color: #111;
    text-decoration: underline;
}

html[data-theme="dark"] .home-members-table .member-name-link,
html[data-theme="dark"] .home-members-table .member-name-link .mid {
    color: #f3f4f6;
}

.home-join-chart-panel {
    margin-top: 10px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    overflow: hidden;
}

html[data-theme="dark"] .home-join-chart-panel {
    background: var(--admin-surface);
}

.home-join-chart-tabs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.home-join-chart-tab {
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    background: var(--admin-surface);
    color: var(--admin-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 10px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.home-join-chart-tab:hover {
    color: var(--admin-text);
    border-color: rgba(148, 163, 184, 0.45);
}

.home-join-chart-tab.is-active {
    color: var(--admin-text);
    border-color: var(--login-gold);
    background: rgba(212, 175, 55, 0.1);
}

.home-join-chart-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
    font-size: 12px;
    color: var(--admin-muted);
}

.home-join-stat strong {
    color: var(--admin-text);
    font-weight: 700;
}

.home-join-chart-stage {
    position: relative;
    min-height: 210px;
    padding: 10px 12px 6px;
}

.home-join-chart-view[hidden] {
    display: none !important;
}

.home-join-chart-caption {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--admin-muted);
}

.home-join-chart-empty {
    margin: 24px 0;
    text-align: center;
    font-size: 13px;
    color: var(--admin-muted);
}

.home-join-chart-plot {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.home-join-chart-yaxis {
    flex: 0 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 156px;
    padding-top: 2px;
}

.home-join-chart-ytick {
    font-size: 10px;
    font-weight: 600;
    color: var(--admin-muted);
    line-height: 1;
    text-align: right;
}

.home-join-chart-plot-wrap {
    flex: 1;
    min-width: 0;
}

.home-join-chart-plot-area {
    position: relative;
    height: 156px;
    border-left: 1px solid rgba(148, 163, 184, 0.45);
    border-bottom: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(148, 163, 184, 0.04);
}

html[data-theme="dark"] .home-join-chart-plot-area {
    background: rgba(15, 23, 42, 0.35);
    border-left-color: rgba(148, 163, 184, 0.35);
    border-bottom-color: rgba(148, 163, 184, 0.45);
}

.home-join-chart-grid {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
    z-index: 0;
}

.home-join-chart-grid-line {
    display: block;
    width: 100%;
    height: 0;
    border-top: 1px dashed rgba(148, 163, 184, 0.28);
}

.home-join-chart-grid-line:last-child {
    border-top: 0;
}

.home-join-bars {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3px;
    height: 100%;
    padding: 0 6px;
    box-sizing: border-box;
}

.home-join-bars--wide {
    gap: 8px;
    padding: 0 8px;
}

.home-join-bars--hourly {
    gap: 1px;
    padding: 0 4px;
}

.home-join-bar-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    position: relative;
}

.home-join-bar-value {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    min-height: 12px;
    font-size: 10px;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

.home-join-bar-slot {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.home-join-bar {
    display: block;
    width: 100%;
    max-width: 26px;
    min-height: 0;
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.98) 0%, rgba(180, 140, 30, 0.88) 100%);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: height 0.35s ease;
}

.home-join-bars--hourly .home-join-bar {
    max-width: 100%;
    border-radius: 2px 2px 1px 1px;
}

.home-join-xlabels {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 3px;
    margin-top: 4px;
    padding: 0 6px;
}

.home-join-bars--wide + .home-join-xlabels,
.home-join-chart-plot-wrap:has(.home-join-bars--wide) .home-join-xlabels {
    gap: 8px;
    padding: 0 8px;
}

.home-join-chart-plot-wrap:has(.home-join-bars--hourly) .home-join-xlabels {
    gap: 1px;
    padding: 0 4px;
}

.home-join-bar-label {
    flex: 1 1 0;
    min-width: 0;
    font-size: 10px;
    color: var(--admin-muted);
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-join-company-plot {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 8px;
    padding: 8px 10px 6px;
    background: rgba(148, 163, 184, 0.04);
}

html[data-theme="dark"] .home-join-company-plot {
    background: rgba(15, 23, 42, 0.35);
}

.home-join-company-xaxis {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 6px;
    padding: 0 96px 0 0;
    font-size: 10px;
    font-weight: 600;
    color: var(--admin-muted);
    border-bottom: 1px dashed rgba(148, 163, 184, 0.28);
    padding-bottom: 4px;
}

.home-join-company-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-join-company-item {
    display: grid;
    grid-template-columns: minmax(72px, 88px) 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.home-join-company-label {
    color: var(--admin-text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-join-company-track {
    display: block;
    height: 12px;
    border-radius: 2px;
    background:
        repeating-linear-gradient(
            to right,
            transparent,
            transparent calc(50% - 0.5px),
            rgba(148, 163, 184, 0.2) calc(50% - 0.5px),
            rgba(148, 163, 184, 0.2) 50%
        ),
        rgba(148, 163, 184, 0.12);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.home-join-company-bar {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: 1px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.95), rgba(180, 140, 30, 0.85));
}

.home-join-company-value {
    color: var(--admin-muted);
    font-weight: 600;
    white-space: nowrap;
}

.home-join-chart-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px 10px;
}

.home-join-chart-dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.home-join-chart-dot:hover {
    background: rgba(148, 163, 184, 0.6);
}

.home-join-chart-dot.is-active {
    background: var(--login-gold);
    transform: scale(1.15);
}

.admin-page-footer {
    margin-top: 14px;
    padding: 12px 4px 4px;
    border-top: 1px solid var(--admin-border);
    text-align: center;
}

.admin-page-footer-copy {
    margin: 0;
    font-size: 12px;
    color: var(--admin-muted);
    letter-spacing: 0.02em;
}

@media (max-width: 900px) {
    .home-join-chart-summary {
        gap: 6px 10px;
    }

    .home-join-bar {
        max-width: 100%;
    }

    .home-join-company-xaxis {
        padding-right: 56px;
    }
}

.home-recent-badge--new {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}

html[data-theme="dark"] .home-recent-badge--new {
    color: #4ade80;
}

.home-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 0;
}

.home-recent-panel {
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: var(--admin-surface);
    overflow: hidden;
    min-height: 210px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

html[data-theme="dark"] .home-recent-panel {
    background: var(--admin-surface);
}

.home-recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}

.home-recent-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--admin-text);
    min-width: 0;
}

.home-recent-title .bi {
    color: var(--login-gold);
    font-size: 15px;
}

.home-recent-more {
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-muted);
    text-decoration: none;
    white-space: nowrap;
}

.home-recent-more:hover {
    color: var(--login-gold);
}

.home-recent-soon {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
}

.home-recent-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    flex: 1;
}

.home-recent-item {
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.home-recent-item:last-child {
    border-bottom: 0;
}

.home-recent-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease;
}

.home-recent-link:hover {
    background: rgba(148, 163, 184, 0.08);
}

.home-recent-link.is-disabled {
    pointer-events: none;
}

.home-recent-link-main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.home-recent-subject {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-text);
}

.home-recent-subject--muted {
    color: var(--admin-muted);
    font-weight: 500;
}

.home-recent-meta {
    flex-shrink: 0;
    margin-left: auto;
    font-size: 10px;
    color: var(--admin-muted);
    white-space: nowrap;
    text-align: right;
}


.home-recent-site-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--login-gold);
    background: rgba(201, 169, 98, 0.12);
    border: 1px solid rgba(201, 169, 98, 0.35);
}
.home-recent-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: var(--admin-muted);
    background: var(--admin-surface-2);
    border: 1px solid var(--admin-border);
}

.home-recent-badge--warn {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

html[data-theme="dark"] .home-recent-badge--warn {
    color: #fbbf24;
}

.home-recent-empty {
    padding: 28px 14px;
    text-align: center;
    font-size: 13px;
    color: var(--admin-muted);
}

.home-recent-panel--pending {
    opacity: 0.92;
}

.home-recent-list--placeholder {
    opacity: 0.55;
}

.home-recent-pending-msg {
    display: none;
}

@media (max-width: 1199px) {
    .home-recent-grid {
        grid-template-columns: repeat(4, minmax(180px, 1fr));
        overflow-x: auto;
        padding-bottom: 2px;
    }
}

@media (max-width: 991px) {
    .home-recent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
    }

    .admin-main:has(.admin-page) {
        padding: 8px 10px 12px;
    }
}

@media (max-width: 575px) {
    .home-recent-grid {
        grid-template-columns: 1fr;
    }
}


/* ── HOME menu table ── */
.home-menu-table-panel {
    margin: 0 0 14px;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

html[data-theme="dark"] .home-menu-table-panel {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.home-menu-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.home-menu-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: auto;
}

.home-menu-table thead tr {
    display: table-row;
}

.home-menu-table thead th {
    white-space: nowrap;
    text-align: left;
}

.home-menu-th {
    padding: 0;
    vertical-align: middle;
    border-bottom: 1px solid var(--home-menu-head-border);
    background: var(--home-menu-head-bg);
}

.home-menu-th-inner,
.home-menu-th-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start !important;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    text-align: left !important;
    text-decoration: none;
    color: var(--admin-text);
    white-space: nowrap;
    box-sizing: border-box;
}

.home-menu-th-link:hover {
    background: var(--home-menu-head-hover);
    color: var(--admin-text);
}

.home-menu-th-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    font-size: 15px;
    color: var(--login-gold);
    background: var(--login-gold-soft);
    border: 1px solid rgba(201, 169, 98, 0.22);
    flex-shrink: 0;
}

.home-menu-th-label {
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
    word-break: keep-all;
}

.home-menu-th.is-pending {
    opacity: 0.72;
}

.home-menu-soon {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    color: var(--admin-muted);
    background: var(--admin-surface-2);
    border: 1px solid var(--admin-border);
}

.home-menu-td {
    padding: 0;
    height: 38px;
    vertical-align: middle;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    background: var(--admin-surface);
}

.home-menu-td:last-child {
    border-right: 0;
}

.home-menu-table tbody tr:last-child .home-menu-td {
    border-bottom: 0;
}

.home-menu-td.is-empty {
    background: var(--admin-surface-2);
    opacity: 0.55;
}

.home-menu-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
    height: 100%;
    min-height: 36px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-muted);
    text-decoration: none;
    line-height: 1.35;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.home-menu-link-icon {
    width: 18px;
    font-size: 14px;
    color: var(--login-gold);
    flex-shrink: 0;
    line-height: 1;
}

.home-menu-link:hover .home-menu-link-icon {
    color: var(--login-gold);
}

.home-menu-link:hover {
    background: rgba(201, 169, 98, 0.12);
    color: var(--admin-text);
}

.home-menu-link.is-pending {
    opacity: 0.55;
    cursor: default;
}

.admin-page-head--compact {
    margin-bottom: 12px;
}

@media (max-width: 991px) {
    .home-main-menu-track {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .home-menu-card {
        flex: 0 0 auto;
        max-width: none;
    }

    .home-menu-card--group {
        flex: 0 0 auto;
        min-width: 240px;
    }
}

@media (max-width: 575px) {
    .home-menu-card {
        min-width: 96px;
        padding: 12px 10px;
    }

    .home-menu-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .home-menu-label {
        font-size: 12px;
    }
}

@media (max-width: 575px) {
    .admin-main:has(.admin-page) {
        padding: 6px 8px max(10px, env(safe-area-inset-bottom));
    }

    .admin-page .admin-page-head {
        margin-bottom: 10px;
    }

    .admin-page .admin-stat-grid {
        gap: 8px;
        margin-bottom: 10px;
    }
}

.admin-theme-toggle {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--login-line);
    border-radius: 10px;
    background: var(--admin-toggle-bg);
    color: var(--login-gold);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.admin-theme-toggle:hover {
    background: var(--admin-surface-hover);
    border-color: rgba(201, 169, 98, 0.35);
}

.admin-theme-toggle:active {
    transform: scale(0.96);
}

.admin-theme-icon {
    font-size: 17px;
    line-height: 1;
}

html[data-theme="dark"] .admin-theme-icon--to-light { display: block; }
html[data-theme="dark"] .admin-theme-icon--to-dark { display: none; }
html[data-theme="light"] .admin-theme-icon--to-light { display: none; }
html[data-theme="light"] .admin-theme-icon--to-dark { display: block; }


html[data-theme="light"] .admin-login-mark-text {
    color: rgba(15, 23, 42, 0.72);
}

html[data-theme="light"] .admin-input {
    color: var(--admin-text);
}

html[data-theme="light"] .admin-input::placeholder {
    color: rgba(100, 116, 139, 0.8);
}

html[data-theme="light"] .admin-dropdown-item {
    color: #dc2626;
}

html[data-theme="light"] .admin-dropdown-item:hover {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.1);
}

/* ── Responsive ── */


@media (max-width: 1199px) {
    .admin-topbar-stat-label {
        display: none;
    }

    .admin-topbar-stat {
        padding: 6px 8px;
    }
}

@media (max-width: 991px) {
    .admin-topbar-stats {
        display: none;
    }
}

@media (max-width: 991px) {
    .admin-sidebar-toggle {
        display: grid;
    }

    .admin-sidebar {
        position: fixed;
        top: 56px;
        left: 0;
        bottom: 0;
        transform: translateX(-100%);
        transition: transform 0.22s ease, box-shadow 0.22s ease;
        box-shadow: none;
        border-right-color: transparent;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    body.admin-sidebar-open .admin-sidebar {
        transform: translateX(0);
        box-shadow: 16px 0 48px rgba(0, 0, 0, 0.28);
        border-right-color: var(--admin-border);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

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

    .admin-main {
        padding: 20px 16px;
    }

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

@media (max-width: 575px) {
    .admin-topbar-inner {
        padding: 0 14px;
    }

    
.admin-charge-quick {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    padding: 7px 13px 7px 11px;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    background: var(--admin-toggle-bg);
    color: var(--admin-text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.admin-charge-quick i {
    font-size: 15px;
    color: #6366f1;
    transition: color 0.15s ease;
}

.admin-charge-quick-label {
    line-height: 1;
}

.admin-charge-quick:hover {
    background: var(--admin-surface-hover);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
    color: var(--admin-text);
}

.admin-charge-quick:hover i {
    color: #4f46e5;
}

.admin-charge-quick.has-pending {
    border-color: rgba(220, 38, 38, 0.28);
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.92), rgba(255, 255, 255, 0.88));
}

html[data-theme="dark"] .admin-charge-quick.has-pending {
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.22), rgba(15, 23, 42, 0.72));
}

.admin-charge-quick.has-pending i {
    color: #dc2626;
}

.admin-charge-quick-badge {
    position: absolute;
    top: -7px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(145deg, #ff4d4f 0%, #dc2626 55%, #b91c1c 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    border: 2px solid var(--admin-topbar-bg);
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    animation: admin-charge-badge-pop 0.28s ease;
}

.admin-charge-quick-badge[hidden] {
    display: none !important;
}

@keyframes admin-charge-badge-pop {
    0% { transform: scale(0.55); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 640px) {
    .admin-charge-quick-label {
        display: none;
    }

    .admin-charge-quick {
        margin-left: 6px;
        padding: 7px 10px;
    }
}


.admin-topbar-title {
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .admin-user-toggle {
        max-width: 110px;
        padding: 6px 8px;
    }

    .admin-main {
        padding: 16px 14px max(16px, env(safe-area-inset-bottom));
    }
}

/* ── Sidebar submenu ── */
.admin-nav-group {
    margin-bottom: 2px;
}

.admin-nav-group-toggle {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
}

.admin-nav-group-toggle .admin-nav-chevron {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.15s ease;
    transform: rotate(180deg);
}

.admin-nav-group.is-collapsed .admin-nav-sub {
    display: none;
}

.admin-nav-group.is-collapsed .admin-nav-group-toggle .admin-nav-chevron {
    transform: rotate(0deg);
}

.admin-nav-sub {
    display: block;
    padding: 2px 0 4px 8px;
}



.admin-nav-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 28px;
    margin-bottom: 2px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--admin-nav-color);
    font-size: 13px;
    font-weight: 600;
}

.admin-nav-subitem i {
    font-size: 14px;
    color: var(--admin-muted);
}

.admin-nav-subitem:hover {
    background: var(--admin-surface-hover);
    color: var(--admin-text);
}

.admin-nav-subitem.is-active {
    background: var(--login-gold-soft);
    color: var(--admin-nav-active-color);
}

.admin-nav-subitem.is-pending {
    opacity: 0.72;
    pointer-events: none;
}

/* ── Management pages (charge, settings, ...) ── */
.admin-main:has(.mgmt-page),
.admin-main:has(.charge-page) {
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
}

.admin-main:has(.mgmt-page) {
    overflow: auto;
}

.admin-main:has(.charge-page) {
    overflow: hidden;
}

/* game_monitor: charge-page  orth로 스크롤이 막히지 않도록 */
.admin-main:has(.gm-page) {
    overflow: auto;
}

.admin-main:has(.gm-page) .admin-main-content {
    flex: none;
    min-height: auto;
    height: auto;
}

.mgmt-page,

.charge-page .charge-col-data,
.charge-page th.charge-col-data {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0;
    vertical-align: middle;
}

.charge-page td.num.charge-col-data strong,
.charge-page td.charge-col-data strong {
    font-family: inherit;
    font-weight: 600;
    font-variant-numeric: inherit;
}

.charge-page td.charge-col-data.muted,
.charge-page td.charge-col-data.confirmed {
    font-size: 13px;
}

.charge-page .charge-data-date {
    font-family: inherit;
    font-variant-numeric: inherit;
}

.charge-page .charge-table thead tr {
    background: #252017;
}

.charge-page .charge-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #252017;
    color: #f0e6c8;
    font-weight: 800;
    font-size: 15px;
    padding: 10px 8px;
    vertical-align: middle;
    line-height: 1.3;
    border-bottom: 2px solid rgba(201, 169, 98, 0.45);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .charge-page .charge-table thead tr,
[data-theme="light"] .charge-page .charge-table thead th {
    background: #ede4d0;
    color: #5c4a1e;
    border-bottom-color: rgba(154, 123, 60, 0.35);
    box-shadow: 0 1px 0 rgba(154, 123, 60, 0.12);
}

.charge-page .charge-table thead .charge-th-sort {
    white-space: nowrap;
}

.charge-page .charge-table thead .charge-th-label {
    display: inline-block;
    vertical-align: middle;
}

.charge-page .charge-table thead .charge-sort-btn.is-active {
    opacity: 1;
    color: var(--login-gold, #c9a962);
}

.charge-page .charge-table tbody tr:not(.charge-row-loading):not(.charge-row-empty) {
    transition: background 0.12s ease;
}

.charge-page .charge-table tbody tr:not(.charge-row-loading):not(.charge-row-empty):hover td {
    background: rgba(201, 169, 98, 0.06);
}

html[data-theme="dark"] .charge-page .charge-table tbody tr:not(.charge-row-loading):not(.charge-row-empty):hover td {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .charge-page .charge-table tbody tr:not(.charge-row-loading):not(.charge-row-empty):hover td {
    background: rgba(201, 169, 98, 0.08);
}


.charge-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 8px 10px 12px;
    max-width: 100%;
}


.charge-head-left {
    min-width: 0;
}

.mgmt-head-left {
    min-width: 0;
}

.charge-head-title-row .mgmt-title {
    min-width: 0;
}



.charge-head-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-page-head-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.admin-page-head-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--admin-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.admin-page-head-nav-btn:hover {
    color: var(--login-gold);
    border-color: rgba(201, 169, 98, 0.45);
    background: rgba(201, 169, 98, 0.08);
}

.admin-page-head-nav-btn:focus-visible {
    outline: 2px solid rgba(201, 169, 98, 0.45);
    outline-offset: 2px;
}

.admin-page-head-nav-btn .bi {
    font-size: 15px;
    line-height: 1;
}

.charge-head-title-row .charge-title {
    min-width: 0;
}

.mgmt-head,
.charge-head {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.mgmt-title,
.charge-title {
    margin: 0;
    font-size: calc(1.05rem + 2px);
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mgmt-title-icon,
.charge-title-icon {
    color: var(--login-gold);
    font-size: 1.15em;
    line-height: 1;
}

.mgmt-sub,
.charge-sub {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--admin-muted);
}

.mgmt-head-actions,
.charge-head-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mgmt-panel,
.charge-panel {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.charge-panel--history {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 0;
}

.mgmt-panel-head,
.charge-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
    flex-wrap: wrap;
}

.charge-panel-head--split {
    align-items: flex-start;
}

.mgmt-panel-title,
.charge-panel-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mgmt-panel-icon,
.charge-panel-icon {
    font-size: 1.05em;
    line-height: 1;
    flex-shrink: 0;
}

.mgmt-panel-body {
    padding: 10px;
}

.mgmt-panel-text {
    margin: 0;
    font-size: 13px;
    color: var(--admin-muted);
    line-height: 1.6;
}

.mgmt-section-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.mgmt-section-nav-item {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-muted);
    font-size: 13px;
    font-weight: 600;
}

.mgmt-section-nav-item.is-active {
    color: var(--admin-text);
    border-color: rgba(201, 169, 98, 0.35);
    background: var(--login-gold-soft);
}

.mgmt-panel-icon--gold {
    color: #ca8a04;
}

.mgmt-panel-icon--indigo {
    color: #6366f1;
}

.charge-panel-icon--pending {
    color: #ca8a04;
}

.charge-panel-icon--history {
    color: #6366f1;
}

.charge-badge {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #dc2626;
}

.charge-muted {
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-muted);
}

.charge-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.charge-select,
.charge-input {
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 14px;
    line-height: 1.2;
}

.charge-select {
    min-width: 96px;
    padding-right: 28px;
}

.charge-input {
    width: 132px;
}

.charge-input--sm {
    width: 88px;
}

.charge-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
}

.charge-head-actions .charge-btn {
    min-height: 34px;
    padding: 0 16px;
}

.charge-filters .charge-btn {
    min-width: 38px;
    padding: 0 12px;
}

.charge-filters .charge-btn i {
    font-size: 16px;
}

.charge-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.charge-btn--primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
}

.charge-btn--ghost:hover {
    background: var(--admin-surface-hover);
}

.charge-btn--sm {
    height: 30px;
    padding: 0 10px;
    font-size: 13px;
    gap: 4px;
}

.charge-filters .charge-btn--sm {
    min-width: 34px;
    padding: 0 10px;
}

.charge-head-actions .charge-btn--sm {
    height: 34px;
    padding: 0 14px;
    font-size: 14px;
}

.charge-table-wrap {
    overflow: auto;
    max-height: 32vh;
}

.charge-panel--history .charge-panel-head,
.charge-panel--history .charge-pagination {
    flex-shrink: 0;
}

.charge-panel--history .charge-table-wrap {
    flex: 1;
    max-height: none;
    min-height: 0;
}

.charge-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.25;
}

.charge-table th,
.charge-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
    white-space: nowrap;
}

.charge-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--admin-surface-2);
    font-size: 14px;
    font-weight: 700;
    color: var(--admin-muted);
    text-align: left;
}


.charge-th-sort {
    min-width: 88px;
}

.charge-th-sort .charge-th-label {
    margin-right: 4px;
}

.charge-th-sort-btns {
    display: inline-flex;
    flex-direction: column;
    vertical-align: middle;
    gap: 0;
    line-height: 0;
}

.charge-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 11px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    cursor: pointer;
    opacity: 0.45;
    transition: color 0.12s ease, opacity 0.12s ease;
}

.charge-sort-btn i {
    font-size: 11px;
    line-height: 1;
}

.charge-sort-btn:hover {
    opacity: 1;
    color: var(--admin-text);
}

.charge-sort-btn.is-active {
    opacity: 1;
    color: #6366f1;
}

.charge-table .col-check {
    width: 42px;
    text-align: center;
}

.charge-check,
.charge-table .col-check .charge-check {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #6366f1;
    vertical-align: middle;
}

.charge-table .col-actions {
    width: 96px;
    min-width: 96px;
    text-align: center;
    white-space: nowrap;
}

.charge-table td.col-actions {
    padding: 6px 4px;
}

.charge-table .num {
    text-align: right;
    color: #bc2600;
}

.charge-table .num strong {
    font-weight: 700;
}



.exchange-member-cell {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.charge-table .exchange-member-cell .grade-vip strong,
.charge-table .exchange-member-cell.grade-vip strong {
    color: #dc2626;
}

.charge-table .exchange-member-cell .grade-vvip strong,
.charge-table .exchange-member-cell.grade-vvip strong {
    color: #059669;
}

.charge-table .charge-nic-td {
    vertical-align: middle;
}

.charge-table .charge-member-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-align: inherit;
}

.charge-table .charge-member-link:hover,
.charge-table .charge-member-link:focus-visible {
    text-decoration: underline;
}

.charge-table .member-cell .member-name-link .mid {
    color: #0074ba;
    font-weight: 600;
}

.charge-table .grade-vip .charge-member-link strong {
    color: #dc2626;
}

.charge-table .grade-vvip .charge-member-link strong {
    color: #059669;
}

.charge-table .member-cell .mid {
    color: #0074ba;
    font-weight: 600;
}

.auto-type--auto {
    color: #2563eb;
    font-weight: 700;
}

.auto-type--manual {
    color: #dc2626;
    font-weight: 700;
}

.charge-table .muted,
.charge-table .confirmed {
    color: var(--admin-muted);
    font-size: 14px;
}

.charge-table .grade-vip {
    color: #dc2626;
    font-weight: 700;
}

.charge-table .grade-vvip {
    color: #059669;
    font-weight: 700;
}

.charge-row-loading td,
.charge-row-empty td {
    text-align: center;
    padding: 14px 6px;
    color: var(--admin-muted);
}

.charge-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--admin-text);
    cursor: pointer;
    vertical-align: middle;
    font-size: 20px;
    line-height: 1;
    transition: background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.charge-icon-btn + .charge-icon-btn {
    margin-left: 6px;
}

.charge-icon-btn:hover {
    background: var(--admin-surface-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.charge-icon-btn:active {
    transform: translateY(0);
}

.charge-approve-one {
    color: #059669;
}

.charge-cancel-one {
    color: #dc2626;
}

.status {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.status-wait {
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
}

.status-done {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
}

.status-cancel {
    background: rgba(100, 116, 139, 0.15);
    color: var(--admin-muted);
}

.charge-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 10px 8px;
    border-top: 1px solid var(--admin-border);
}

.charge-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    max-width: 32px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}

.charge-page-btn:hover {
    background: var(--admin-surface-hover);
}

.charge-page-btn.is-active {
    background: var(--login-gold-soft);
    border-color: rgba(201, 169, 98, 0.35);
    color: var(--admin-text);
}

.charge-page-btn--edge {
    min-width: 34px;
    padding: 0 8px;
    font-size: 15px;
    letter-spacing: -0.04em;
}

.charge-toast {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 2000;
    max-width: 360px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 8px 24px var(--admin-shadow);
}

.charge-toast.is-ok {
    background: rgba(34, 197, 94, 0.95);
    color: #fff;
}

.charge-toast.is-error {
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
}

@media (max-width: 991px) {
    .charge-table-wrap {
        max-height: none;
    }
}



.settings-panel-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
}

.settings-panel-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.settings-panel-btn:hover {
    color: var(--admin-text);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
}

.settings-panel-btn i {
    font-size: 13px;
    line-height: 1;
}

.mgmt-panel.is-panel-collapsed .mgmt-panel-body {
    display: none;
}

.mgmt-panel.is-panel-collapsed .mgmt-panel-head {
    border-bottom: none;
}
.settings-page .mgmt-panel-head.settings-panel-head--toggle {
    cursor: pointer;
    user-select: none;
}

.settings-page .mgmt-panel-head.settings-panel-head--toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}

.settings-panel-toggle {
    pointer-events: auto;
}



@media (max-width: 767px) {
    .settings-panel-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .settings-panel-btn {
        padding: 0 8px;
        font-size: 11px;
    }
}

/* 설정 페이지 — 소섹션 (매충전방식 / 사운드) */
.settings-sub-block {
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.settings-sub-block:last-child {
    margin-bottom: 0;
}

.settings-sub-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-bottom: 1px solid var(--admin-border);
}
.settings-sub-head {
    justify-content: space-between;
}
.settings-page .settings-sub-head.settings-sub-head--toggle {
    cursor: pointer;
    user-select: none;
}

.settings-page .settings-sub-head.settings-sub-head--toggle:hover {
    background: rgba(255, 255, 255, 0.04);
}



.settings-sub-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.settings-sub-toggle:hover {
    color: var(--admin-text);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
}

.settings-sub-toggle-text {
    line-height: 1;
}

.settings-sub-chevron {
    font-size: 13px;
    line-height: 1;
    transition: transform 0.15s ease;
}

.settings-sub-block.is-collapsed .settings-sub-chevron {
    transform: rotate(180deg);
}

.settings-sub-block.is-collapsed .settings-sub-body {
    display: none;
}

.settings-sub-block.is-collapsed .settings-sub-head {
    border-bottom: none;
}

@media (max-width: 479px) {
    .settings-sub-toggle-text {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .settings-sub-toggle {
        padding: 0 6px;
        min-width: 28px;
        justify-content: center;
    }
}




.settings-sub-block--exchange-alert .settings-sub-head {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.16) 0%, rgba(14, 165, 233, 0.06) 100%);
    border-bottom-color: rgba(14, 165, 233, 0.22);
}

.settings-sub-block--exchange-alert {
    background: rgba(14, 165, 233, 0.04);
    border-color: rgba(14, 165, 233, 0.18);
}

.settings-exchange-alert-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-exchange-alert-input-wrap #exchange_alert_threshold {
    width: 220px;
    max-width: 100%;
}

.settings-exchange-alert-unit {
    font-size: 13px;
    color: var(--admin-muted);
    font-weight: 600;
}

.settings-sub-block--charge .settings-sub-head {
    background: linear-gradient(90deg, rgba(202, 138, 4, 0.16) 0%, rgba(202, 138, 4, 0.06) 100%);
    border-bottom-color: rgba(202, 138, 4, 0.22);
}

.settings-sub-block--sound .settings-sub-head {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.16) 0%, rgba(99, 102, 241, 0.06) 100%);
    border-bottom-color: rgba(99, 102, 241, 0.22);
}

.settings-sub-block--charge {
    background: rgba(202, 138, 4, 0.04);
    border-color: rgba(202, 138, 4, 0.18);
}

.settings-sub-block--sound {
    background: rgba(99, 102, 241, 0.04);
    border-color: rgba(99, 102, 241, 0.18);
}

.settings-sub-body {
    padding: 10px;
}

.settings-sub-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.3;
}

.settings-sub-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

.settings-sub-icon--charge {
    color: #ca8a04;
}

.settings-sub-icon--sound {
    color: #6366f1;
}

.settings-sound-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.settings-sound-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface-2);
}

.settings-sound-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 240px;
    min-width: 0;
}

.settings-sound-item-icon {
    color: #ca8a04;
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}

.settings-sound-item-label {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.settings-sound-item-file {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    color: var(--admin-text);
    min-width: 0;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-sound-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    flex-shrink: 0;
}

.settings-sound-badge.is-custom {
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.35);
    background: rgba(99, 102, 241, 0.12);
}

.settings-sound-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.settings-sound-item-actions .charge-btn {
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
}

.settings-sound-upload-label {
    cursor: pointer;
    margin: 0;
}

.settings-sound-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--admin-muted);
    line-height: 1.5;
}

@media (max-width: 767px) {
    .settings-sound-item-left {
        flex-basis: 100%;
    }

    .settings-sound-item-file {
        max-width: 100%;
        flex: 1 1 auto;
    }
}

.settings-charge-kind-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
}

.settings-charge-kind-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-charge-kind-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface-2);
}

.settings-mini-game-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.settings-mini-game-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface-2);
}

.settings-mini-game-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 420px;
    min-width: 0;
    flex-wrap: wrap;
}

.settings-mini-game-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.settings-mini-game-value {
    width: 88px;
    min-width: 72px;
}

.settings-mini-game-name {
    flex: 1 1 140px;
    min-width: 120px;
    max-width: 240px;
}

.settings-mini-game-item-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.settings-mini-game-item-actions .charge-btn {
    padding: 4px 8px;
}

.settings-charge-kind-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 420px;
    min-width: 0;
    flex-wrap: wrap;
}

.settings-charge-kind-item-icon {
    color: #6366f1;
    font-size: 15px;
    flex-shrink: 0;
}

.settings-charge-kind-value {
    width: 96px;
    min-width: 96px;
}

.settings-charge-kind-label {
    flex: 1 1 180px;
    min-width: 140px;
}


.settings-charge-kind-bonus {
    width: 4.5rem;
    flex: 0 0 auto;
    text-align: center;
}

.settings-charge-kind-bonus-suffix {
    flex: 0 0 auto;
    font-size: 0.85rem;
    color: var(--text-muted, #8b949e);
    margin-right: 0.25rem;
}

.settings-charge-kind-sub {
    flex: 1 1 200px;
    min-width: 160px;
}

.settings-charge-kind-enabled {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
}

.settings-charge-kind-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.settings-charge-kind-item-actions .charge-btn {
    min-width: 32px;
    max-width: 32px;
    width: 36px;
    padding: 0;
}

.settings-charge-kind-notices-label {
    display: block;
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 600;
}

.settings-charge-kind-notices {
    width: 100%;
    min-height: 125px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
}

.settings-charge-kind-toast,
.settings-sound-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 2400;
    max-width: min(420px, calc(100vw - 24px));
    margin-top: 0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid transparent;
    box-shadow: 0 10px 28px var(--admin-shadow);
    pointer-events: none;
}

.settings-charge-kind-toast[hidden],
.settings-sound-toast[hidden] {
    display: none !important;
}

.settings-charge-kind-toast.is-ok,
.settings-sound-toast.is-ok {
    color: #fff;
    border-color: transparent;
    background: rgba(34, 197, 94, 0.95);
}

.settings-charge-kind-toast.is-error,
.settings-sound-toast.is-error {
    color: #fff;
    border-color: transparent;
    background: rgba(239, 68, 68, 0.95);
}

@media (max-width: 767px) {
    .settings-charge-kind-item-main {
        flex-basis: 100%;
    }
}

.deposit_c_kind_loading {
    margin: 0;
    color: var(--admin-muted, #8b95a5);
}


/* 게임머니 */
.admin-main:has(.game-money-page) {
    overflow: auto;
}

.game-money-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 6px 10px 8px;
    font-size: 13px;
    color: var(--text-muted, #8b95a5);
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
}

.game-money-summary strong {
    color: var(--login-gold, #d4a853);
    font-weight: 700;
}

.game-money-table .col-no {
    width: 72px;
}

.game-money-table .col-comment {
    min-width: 220px;
    max-width: 420px;
}

.money-comment {
    font-size: 12px;
    line-height: 1.45;
    word-break: break-word;
}

.money-comment-admin {
    color: #ff4444;
    font-weight: 700;
}

.money-comment-cancel {
    color: #3366ff;
    font-weight: 700;
}

.money-comment-win {
    color: #9999ff;
}

.money-comment-first {
    color: #33cccc;
}

.money-comment-refirst {
    color: #0066ff;
}

.money-price-plus strong {
    color: #2ecc71;
}

.money-price-minus strong {
    color: #e74c3c;
}

.admin-main:has(.points-page) {
    overflow: auto;
}


/* 회원관리 */
.admin-main:has(.members-page) {
    overflow: auto;
}

.members-filters {
    flex-wrap: wrap;
    max-width: 100%;
}

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

.members-table {
    min-width: 1200px;
    font-size: 14px;
}

.members-table th,
.members-table td {
    white-space: nowrap;
}

.members-page .members-table tbody tr:not(.charge-row-loading):not(.charge-row-empty) {
    transition: background 0.12s ease;
}

.members-page .members-table tbody tr:not(.charge-row-loading):not(.charge-row-empty):hover td {
    background: rgba(201, 169, 98, 0.06);
}

html[data-theme="dark"] .members-page .members-table tbody tr:not(.charge-row-loading):not(.charge-row-empty):hover td {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="light"] .members-page .members-table tbody tr:not(.charge-row-loading):not(.charge-row-empty):hover td {
    background: rgba(201, 169, 98, 0.08);
}



.members-table thead tr {
    background: #252017;
}

.members-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #252017;
    color: #f0e6c8;
    font-weight: 800;
    font-size: 15px;
    padding: 10px 8px;
    vertical-align: middle;
    line-height: 1.3;
    border-bottom: 2px solid rgba(201, 169, 98, 0.45);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .members-table thead tr,
[data-theme="light"] .members-table thead th {
    background: #ede4d0;
    color: #5c4a1e;
    border-bottom-color: rgba(154, 123, 60, 0.35);
    box-shadow: 0 1px 0 rgba(154, 123, 60, 0.12);
}

.member-domain {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-online-dot {
    color: #2ecc71;
    font-size: 0.55rem;
    vertical-align: middle;
}

.member-offline-dot {
    color: #9aa3b2;
    font-size: 0.55rem;
    vertical-align: middle;
}

.member-account-1 { color: #888; font-weight: 700; }
.member-account-2 { color: #e74c3c; font-weight: 700; }
.member-account-9 { color: #27ae60; font-weight: 700; }
.member-account-0 { color: #2c3e8f; font-weight: 700; }

.member-group-out { color: #2c3e8f; font-weight: 700; }
.member-group-stop { color: #e74c3c; font-weight: 700; }
.member-group-normal { color: inherit; }

.member-grade-human { color: #888; font-weight: 700; }
.member-grade-vip { color: #e74c3c; font-weight: 700; }
.member-grade-vvip { color: #27ae60; font-weight: 700; }
.member-grade-normal { color: #2c3e8f; font-weight: 700; }

#members_online_btn.is-active {
    border-color: var(--login-gold, #d4a853);
    color: var(--login-gold, #d4a853);
}

.members-summary {
    flex-wrap: wrap;
}
.members-summary-bar {
    flex-wrap: wrap;
}

.members-summary-stats {
    flex: 1 1 auto;
}

.members-company-tabs {
    flex: 0 0 auto;
}
.settings-sub-block--member-colors .settings-sub-head {
    background: linear-gradient(90deg, rgba(51, 102, 255, 0.16) 0%, rgba(51, 102, 255, 0.06) 100%);
    border-bottom-color: rgba(51, 102, 255, 0.22);
}

.settings-sub-block--member-colors {
    background: rgba(51, 102, 255, 0.04);
    border-color: rgba(51, 102, 255, 0.18);
}

.settings-member-color-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.settings-member-color-toolbar {
    display: flex;
    justify-content: flex-end;
}

.settings-member-color-list {
    margin-top: 0;
}

.settings-member-color-item .settings-sound-item-icon {
    font-size: 14px;
}

.settings-member-color-code {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    color: var(--admin-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-transform: lowercase;
}

.settings-member-color-hex {
    font-size: 12px;
    font-weight: 600;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--admin-muted);
    min-width: 62px;
    text-align: right;
}

.settings-member-color-actions {
    gap: 10px;
}

.settings-member-color-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    cursor: pointer;
    flex-shrink: 0;
}

.settings-member-color-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: 0;
    padding: 0;
}

.settings-member-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14), 0 2px 6px rgba(15, 23, 42, 0.1);
    pointer-events: none;
    transition: background 0.15s ease;
}

.members-company-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.members-company-palette-divider {
    margin-left: 2px;
}

.members-company-palette-btn {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--login-gold, #9a7b3c);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.members-company-palette-btn:hover,
.members-company-palette-btn:focus-visible {
    background: var(--login-gold-soft, rgba(201, 169, 98, 0.14));
    border-color: rgba(201, 169, 98, 0.45);
    color: var(--login-gold, #9a7b3c);
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.12);
}

.members-bulk-memo-btn {
    flex-shrink: 0;
    height: 34px;
    margin-left: 6px;
    padding: 0 12px;
    font-weight: 600;
    white-space: nowrap;
    border-color: rgba(29, 78, 216, 0.22);
    color: #1d4ed8;
}

.members-bulk-memo-btn:hover:not(:disabled),
.members-bulk-memo-btn:focus-visible:not(:disabled) {
    background: rgba(29, 78, 216, 0.06);
    border-color: rgba(29, 78, 216, 0.35);
    color: #1e40af;
}

.members-bulk-memo-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.members-company-tab-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.member-company {
    font-weight: 700;
    text-transform: lowercase;
}

.home-members-table .member-company {
    text-align: center;
    white-space: nowrap;
    text-transform: none;
}

.home-members-table .member-company .home-recent-site-chip {
    vertical-align: middle;
}



@media (max-width: 900px) {
    .members-summary-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .members-company-tabs {
        justify-content: flex-start;
    }
}



/* 회원 선택 · 일괄지급 */
.members-table .col-check {
    width: 48px;
    min-width: 48px;
    text-align: center;
    padding-left: 8px;
    padding-right: 8px;
}

.member-check {
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--login-gold, #c9a962);
    vertical-align: middle;
}

.members-footer-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-top: 1px solid var(--admin-border);
    flex-shrink: 0;
}

.members-bulk-bar {
    grid-column: 1;
    justify-self: start;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.members-bulk-count {
    font-size: 15px;
    font-weight: 600;
    color: var(--login-gold, #c9a962);
    white-space: nowrap;
}

.members-bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.members-footer-bar .members-pagination {
    grid-column: 2;
    justify-self: center;
    justify-content: center;
    padding: 0;
    border-top: none;
    margin: 0;
}

.members-cash-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
}

.member-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

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

.member-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.member-modal-card {
    position: relative;
    width: min(480px, 100%);
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    box-shadow: 0 20px 50px var(--admin-shadow);
    overflow: hidden;
}

.member-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--login-gold-soft);
}

.member-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.member-modal-close {
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.member-modal-body {
    padding: 16px;
    display: grid;
    gap: 12px;
}

.member-modal-desc {
    margin: 0;
    font-size: 13px;
    color: var(--admin-muted);
}

.member-modal-row {
    display: grid;
    grid-template-columns: 72px 1fr;
    align-items: center;
    gap: 10px;
}

.member-modal-row--full {
    grid-template-columns: 1fr;
}

.member-modal-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-muted);
}

.member-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
}

#members_toast.charge-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1300;
}

.members-table thead .charge-th-sort {
    white-space: nowrap;
}

.members-table thead .charge-th-label {
    display: inline-block;
    vertical-align: middle;
}

.members-table thead .charge-sort-btn.is-active {
    opacity: 1;
    color: var(--login-gold, #c9a962);
}


.members-table .members-manage-col {
    width: 96px;
    min-width: 96px;
    text-align: center;
    white-space: nowrap;
}

.members-disconnect-btn {
    color: var(--admin-danger, #dc3545);
    border-color: rgba(220, 53, 69, 0.35);
}

.members-disconnect-btn:hover,
.members-disconnect-btn:focus-visible {
    color: #fff;
    background: var(--admin-danger, #dc3545);
    border-color: var(--admin-danger, #dc3545);
}

.members-table .mem-col-data,
.members-table th.mem-col-data {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0;
    vertical-align: middle;
}

.members-table .mem-col-data strong {
    font-family: inherit;
    font-weight: 600;
    font-variant-numeric: inherit;
}

.members-table td.mem-col-data.muted,
.members-table td.num.mem-col-data .members-unit {
    color: var(--admin-muted);
}

.members-table td.num.mem-col-data .members-unit {
    font-family: inherit;
    font-weight: 400;
    font-size: 13px;
    margin-left: 1px;
}

.members-table td.mem-col-data.muted {
    font-size: 13px;
}

.members-last-log {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.35;
    vertical-align: middle;
    font-family: inherit;
    font-variant-numeric: inherit;
}

.members-last-log .member-online-dot,
.members-last-log .member-offline-dot {
    font-size: 0.5rem;
    line-height: 1;
    flex-shrink: 0;
}


/* 회원정보 팝업 윈도우 */
.admin-window-body {
    margin: 0;
    min-height: 100vh;
    background: var(--admin-bg, #f5f6f8);
    color: var(--admin-text, #1a1d21);
    font-family: Inter, system-ui, -apple-system, sans-serif;
}

.mi-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.25;
}

.mi-topbar {
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.1) 0%, var(--admin-surface-2, #f8f9fb) 100%);
    border-bottom: 1px solid rgba(201, 169, 98, 0.35);
    color: #5c4a1e;
    position: sticky;
    top: 0;
    z-index: 100;
    white-space: nowrap;
    overflow: hidden;
}

.mi-topbar-title {
    margin: 0;
    font-size: calc(0.88rem + 3px);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    white-space: nowrap;
    color: #5c4a1e;
    letter-spacing: -0.01em;
}

.mi-topbar-title i { color: var(--login-gold, #c9a962); }

.mi-topbar-summary {
    font-size: 13px;
    line-height: 1.2;
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap !important;
    text-overflow: ellipsis;
    color: #5c4a1e;
}

.mi-topbar-summary strong { font-weight: 700; color: #3d3220; }

.mi-topbar-meta {
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.mi-topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
}

.mi-nine-link {
    color: #7eb6ff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.mi-nine-link:hover { color: #a8d0ff; text-decoration: underline; }

.mi-topbar .mi-close-btn {
    color: #5c4a1e;
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(201, 169, 98, 0.45);
}

.mi-topbar .mi-close-btn:hover,
.mi-topbar .mi-close-btn:focus-visible {
    color: #3d3220;
    background: #fff;
    border-color: rgba(201, 169, 98, 0.75);
}

.mi-topbar .mi-close-btn i {
    color: var(--login-gold, #9a7b3c);
}

.mi-topbar .charge-btn {
    height: 26px;
    padding: 0 8px;
    font-size: 14px;
}

.mi-main {
    flex: 1;
    padding: 5px 7px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mi-row {
    display: grid;
    gap: 5px;
}

.mi-row--2 { grid-template-columns: 1fr 1fr; }
.mi-row--3 { grid-template-columns: 1fr 1fr 1fr; }

.mi-section {
    background: var(--admin-surface, #fff);
    border: 1px solid var(--admin-border, #e2e5ea);
    border-radius: 7px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mi-section--full { width: 100%; }

.mi-section-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #1a2332 0%, #2a3548 70%, #3a3020 100%);
    border-bottom: 1px solid rgba(201, 169, 98, 0.45);
    box-shadow: inset 0 -1px 0 rgba(201, 169, 98, 0.25);
}

.mi-section-head i {
    font-size: 16px;
    color: var(--login-gold, #c9a962);
    flex-shrink: 0;
}

.mi-section-body {
    padding: 4px 5px;
    flex: 1;
    min-height: 0;
}

.mi-section[data-section="info"] .mi-section-body { min-height: 0; }
.mi-section[data-section="bet"] .mi-section-body { min-height: 0; }

.mi-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    color: var(--admin-muted, #6b7280);
    font-size: 15px;
}

.mi-loading-inline { color: rgba(255,255,255,0.7); font-size: 15px; }

.mi-error { color: #dc2626; padding: 12px; font-size: 16px; margin: 0; }

.mi-form-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.mi-form-table th,
.mi-form-table td {
    border: 1px solid var(--admin-border, #e2e5ea);
    padding: 1px 3px;
    vertical-align: middle;
    line-height: 1.15;
}

.mi-form-table th {
    width: 96px;
    background: var(--admin-surface-2, #f8f9fb);
    font-weight: 600;
    color: var(--admin-muted, #4b5563);
    white-space: nowrap;
}

.mi-pass-row th,
.mi-pass-row td { background: rgba(220, 38, 38, 0.06); }

.mi-pass-label { color: #dc2626; font-weight: 700; }

.mi-user-pw-row th { color: #dc2626; }

.mi-save-btn { margin-left: 4px; }

.mi-readonly-id { font-weight: 600; color: var(--admin-text); }

.mi-company-tag {
    display: inline-block;
    font-weight: 700;
    color: #2563eb;
    margin-right: 4px;
}

.mi-memo { width: 100%; min-height: 40px; resize: vertical; }
.mi-memo--ok { background: rgba(46, 160, 67, 0.08); }
.mi-memo--warn { background: rgba(220, 38, 38, 0.08); }

.mi-stats-note { margin: 0 0 2px; font-size: 13px; }

.mi-stats-table { font-size: 14px; }
.mi-stats-table th { text-align: center; font-size: 14px; }
.mi-stats-table td { text-align: center; }
.mi-stats-table .mi-limit-cell { text-align: left; min-width: 220px; }

.mi-limit-check { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; font-weight: 500; }
.mi-limit-input { width: 80px; min-width: 60px; display: inline-block; }

.mi-input-sm { width: 100px; }
.mi-input-xs { width: 56px; }


.mi-profit { color: #dc2626; font-weight: 700; }
.mi-pending-bets { color: #1d4ed8; }

.mi-ledger-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 3px;
    font-size: 14px;
}

.mi-table-wrap { max-height: 224px; overflow: auto; }

.mi-ledger-table { font-size: 14px; }

.mi-grant-row td { background: rgba(201, 169, 98, 0.08); }

.mi-grant-comment { width: min(180px, 100%); }

.mi-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
    margin-top: 3px;
}

.mi-log-referer {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.mi-bet-card {
    border: 1px solid var(--admin-border, #e2e5ea);
    border-radius: 6px;
    margin-bottom: 4px;
    overflow: hidden;
}

.mi-bet-head {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
    gap: 3px;
    align-items: center;
    padding: 3px 5px;
    background: linear-gradient(180deg, rgba(208, 255, 255, 0.35), rgba(208, 255, 255, 0.1));
    font-size: 13px;
}

.mi-bet-table-wrap {
    overflow-x: hidden;
    max-width: 100%;
    border: 1px solid rgba(154, 123, 60, 0.2);
    border-radius: 6px;
    background: #fff;
}

.mi-bet-summary-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 12px;
}

/* 고정폭 컬럼 — 남는 가로는 종목(sports)이 가져감 */
.mi-bet-summary-table col.mi-bet-col-date { width: 118px; }
.mi-bet-summary-table col.mi-bet-col-oid { width: 112px; }
.mi-bet-summary-table col.mi-bet-col-category { width: 72px; }
.mi-bet-summary-table col.mi-bet-col-sports { width: auto; }
.mi-bet-summary-table col.mi-bet-col-count { width: 42px; }
.mi-bet-summary-table col.mi-bet-col-money { width: 72px; }
.mi-bet-summary-table col.mi-bet-col-rate { width: 48px; }
.mi-bet-summary-table col.mi-bet-col-payout { width: 72px; }
.mi-bet-summary-table col.mi-bet-col-status { width: 68px; }
.mi-bet-summary-table col.mi-bet-col-result { width: 52px; }
.mi-bet-summary-table col.mi-bet-col-actions { width: 42px; }

.mi-bet-summary-row > td {
    padding: 5px 6px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(154, 123, 60, 0.16);
    border-right: 1px solid rgba(154, 123, 60, 0.14);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.08) 0%, rgba(201, 169, 98, 0.02) 100%);
}

.mi-bet-summary-row > td:last-child {
    border-right: 0;
}

.mi-bet-summary-row.is-open > td {
    background: rgba(201, 169, 98, 0.14);
}

.mi-bet-col-money,
.mi-bet-col-rate,
.mi-bet-col-payout,
.mi-bet-col-count {
    text-align: right;
}

.mi-bet-col-status,
.mi-bet-col-result,
.mi-bet-col-category,
.mi-bet-col-sports {
    text-align: center;
}

.mi-bet-summary-table td.mi-bet-col-actions,
.mi-bet-summary-table th.mi-bet-col-actions {
    width: 42px !important;
    max-width: 42px !important;
    min-width: 42px !important;
    padding: 2px !important;
    text-align: center;
    overflow: hidden;
    box-sizing: border-box;
}

.mi-bet-col-actions .mi-bet-actions {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
    min-height: 0;
    min-width: 0;
}

.mi-bet-col-actions .mi-bet-toggle,
.mi-bet-col-actions .charge-btn--sm.mi-bet-toggle {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    height: 28px;
    padding: 0;
    box-sizing: border-box;
}

.mi-bet-summary-table td.mi-bet-col-actions--wide,
.mi-bet-summary-table th.mi-bet-col-actions--wide {
    width: 96px !important;
    max-width: 96px !important;
    min-width: 96px !important;
}

.mi-bet-summary-table col.mi-bet-col-actions.mi-bet-col-actions--wide {
    width: 96px;
}

.mi-bet-detail-row > td {
    padding: 0;
    background: var(--admin-surface-2, #f8f9fb);
    border-bottom: 1px solid rgba(154, 123, 60, 0.18);
    overflow: hidden;
}

.mi-bet-head--bh .bh-category-cell,
.mi-bet-summary-row .bh-category-cell,
.mi-bet-summary-row .bh-sport-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mi-bet-head--bh .bh-sport-icon,
.mi-bet-head--bh .bh-sport-icon-ph,
.mi-bet-summary-row .bh-sport-icon,
.mi-bet-summary-row .bh-sport-icon-ph {
    width: 18px;
    height: 18px;
}

.mi-bet-legs-wrap {
    overflow-x: auto;
    max-width: 100%;
    margin: 2px 0 4px;
    padding: 4px 6px 6px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* 배팅내역 페이지(.bh-legs-table)와 동일한 auto 비율 — 고정%로 균등분할하지 않음 */
.mi-bet-legs-wrap .bh-legs-table {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100%;
    margin: 0 !important;
    font-size: 12px;
    border-collapse: collapse;
    table-layout: auto !important;
}

.mi-bet-legs-wrap .bh-legs-table th,
.mi-bet-legs-wrap .bh-legs-table td {
    border: 1px solid rgba(154, 123, 60, 0.22);
    border-top: 1px solid rgba(154, 123, 60, 0.18);
    border-bottom: 1px solid rgba(154, 123, 60, 0.18);
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    vertical-align: middle !important;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: normal;
}

.mi-bet-legs-wrap .bh-legs-table thead th {
    border-bottom-color: rgba(154, 123, 60, 0.32);
    font-size: 12px;
}

/* 컨텐츠만큼만: 게임타입/종목/시간/리그/배당/스코어/결과 */
.mi-bet-legs-wrap .bh-legs-table th:nth-child(1),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(1),
.mi-bet-legs-wrap .bh-legs-table th:nth-child(2),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(2),
.mi-bet-legs-wrap .bh-legs-table th:nth-child(3),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(3),
.mi-bet-legs-wrap .bh-legs-table th:nth-child(4),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(4),
.mi-bet-legs-wrap .bh-legs-table th:nth-child(9),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(9),
.mi-bet-legs-wrap .bh-legs-table th:nth-child(10),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(10),
.mi-bet-legs-wrap .bh-legs-table th:nth-child(11),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(11) {
    width: 1%;
    white-space: nowrap;
}

/* 홈/원정이 남는 가로를 가져감 */
.mi-bet-legs-wrap .bh-legs-table th:nth-child(5),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(5),
.mi-bet-legs-wrap .bh-legs-table th:nth-child(7),
.mi-bet-legs-wrap .bh-legs-table td:nth-child(7) {
    width: auto;
    min-width: 140px;
}

.mi-bet-legs-wrap .bh-legs-table td:nth-child(6) {
    min-width: 0;
    text-align: center;
    width: 1%;
    white-space: nowrap;
}

.mi-bet-legs-wrap .bh-leg-time {
    min-width: 120px;
    white-space: nowrap !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
}

.mi-bet-legs-wrap .bh-leg-side {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    justify-content: space-between;
}

.mi-bet-legs-wrap .bh-leg-side--away {
    justify-content: flex-start;
}

.mi-bet-legs-wrap .bh-leg-team {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
}

/* 원정: 팀명만 우측, 배당/아이콘은 좌측 유지 */
.mi-bet-legs-wrap .bh-leg-side--away .bh-leg-odds-group {
    flex: 0 0 auto;
    margin-right: 8px;
}

.mi-bet-legs-wrap .bh-leg-side--away .bh-leg-team {
    flex: 1 1 auto;
    text-align: right;
    margin-left: auto;
}

.mi-bet-legs-wrap .bh-leg-odds-group {
    flex: 0 0 auto;
}

.mi-bet-legs-wrap .bh-leg-game-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.mi-bet-legs-wrap .bh-leg-game-type > span {
    display: inline;
}

.mi-bet-legs-wrap .bh-leg-league {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: none;
    white-space: nowrap;
    overflow: visible;
}

.mi-bet-legs-wrap .bh-leg-league > span {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.mi-bet-head--bh .bh-sport-icons-toggle,
.mi-bet-head--bh .mi-bet-sport-toggle,
.mi-bet-summary-row .bh-sport-icons-toggle,
.mi-bet-summary-row .mi-bet-sport-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mi-bet-head--bh .bh-sport-icons-toggle:hover,
.mi-bet-head--bh .mi-bet-sport-toggle:hover,
.mi-bet-summary-row .bh-sport-icons-toggle:hover,
.mi-bet-summary-row .mi-bet-sport-toggle:hover {
    opacity: 0.85;
}

.mi-bet-oid { font-weight: 700; color: #446b2f; text-decoration: underline; }
.mi-bet-rate { color: #dc2626; font-weight: 700; }
.mi-bet-actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.mi-bet-settled { color: #16a34a; font-weight: 700; }
.mi-bet-cancelled { color: #dc2626; font-weight: 700; }

.mi-bet-detail { padding: 2px 4px 4px; background: var(--admin-surface-2, #f8f9fb); }
.mi-bet-picks { font-size: 14px; }

.mi-empty { padding: 16px; text-align: center; }


.member-name-td {
    vertical-align: middle;
}


.member-nic-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

.member-new-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e53935;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    text-transform: lowercase;
    vertical-align: middle;
}

.member-nic-td .member-name-link {
    display: inline-flex;
    max-width: 100%;
}

.member-name-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    vertical-align: middle;
}

.member-level-icon {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.member-level-icon img {
    display: block;
    width: 18px;
    height: 18px;
    max-width: 18px;
    max-height: 18px;
    object-fit: contain;
    object-position: center;
}

.members-table .member-name-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.member-name-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: #2563eb;
    cursor: pointer;
    font: inherit;
    text-align: inherit;
}

.member-name-link:hover,
.member-name-link:focus-visible {
    color: #1d4ed8;
    text-decoration: underline;
}

.member-name-link strong { font-weight: 700; }

.members-table .member-name-link,
.members-table .member-name-link strong {
    color: #000;
}

.members-table .member-name-link:hover,
.members-table .member-name-link:focus-visible {
    color: #111;
    text-decoration: underline;
}

html[data-theme="dark"] .members-table .member-name-link,
html[data-theme="dark"] .members-table .member-name-link strong {
    color: #f3f4f6;
}

#mi_toast.charge-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1400;
}


.mi-page .charge-input,
.mi-page .charge-select {
    height: 26px;
    padding: 0 8px;
    font-size: 13px;
    border-radius: 6px;
}

.mi-page textarea.charge-input {
    height: auto;
    min-height: 36px;
    padding: 3px 5px;
    line-height: 1.25;
}

.mi-page .charge-btn {
    height: 26px;
    padding: 0 8px;
    font-size: 14px;
    border-radius: 4px;
    gap: 4px;
}

.mi-page .charge-btn--sm {
    height: 24px;
    padding: 0 6px;
    font-size: 13px;
}

.mi-page .charge-table {
    font-size: 14px;
    line-height: 1.2;
}

.mi-page .charge-table th,
.mi-page .charge-table td {
    padding: 2px 4px;
}

.mi-page .charge-table thead th {
    font-size: 14px;
    padding: 2px 4px;
}

.mi-page .charge-page-btn {
    min-width: 22px;
    height: 24px;
    padding: 0 4px;
    font-size: 13px;
}

.mi-page .charge-row-empty td,
.mi-page .charge-row-loading td {
    padding: 6px 4px;
    font-size: 14px;
}

.mi-stats-table th,
.mi-stats-table td {
    padding: 1px 3px;
}

.mi-limit-check {
    gap: 2px;
    margin-right: 3px;
    font-size: 13px;
}

.mi-limit-input {
    width: 68px;
    min-width: 52px;
}

.mi-save-btn { margin-left: 4px; }

.mi-form-table th { font-size: 14px; }

.mi-section { border-radius: 7px; }


/* 가입자 기본정보 — 초밀집 폼 */
.mi-section[data-section="info"] .mi-section-body {
    padding: 2px 3px;
}

.mi-info-form .mi-form-table {
    border-collapse: collapse;
    font-size: 13px;
}

.mi-info-form .mi-form-table.charge-table th,
.mi-info-form .mi-form-table.charge-table td {
    padding: 1px 3px !important;
    line-height: 1.15;
    vertical-align: middle;
    border-bottom: 1px solid var(--admin-border, #e2e5ea);
}

.mi-info-form .mi-form-table th {
    width: 1%;
    max-width: none;
    min-width: 0;
    font-size: 13px;
    padding: 1px 3px !important;
    background: var(--admin-surface-2, #f8f9fb);
}

.mi-field-label {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--admin-muted, #4b5563);
}

.mi-field-label i {
    color: #8b7355;
    font-size: 13px;
    flex-shrink: 0;
    opacity: 0.95;
}

.mi-pass-bar {
    padding: 2px 4px !important;
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.15) !important;
}

.mi-pass-bar-inner {
    display: flex;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 8px;
    width: 100%;
    white-space: nowrap !important;
    overflow: hidden;
}

.mi-pass-spacer {
    flex: 1 1 auto;
    min-width: 12px;
}

.mi-pass-bar-inner > :not(.mi-pass-spacer) {
    flex-shrink: 0;
}

.mi-memo-send-btn {
    color: #1d4ed8;
    border-color: rgba(29, 78, 216, 0.25);
    font-weight: 600;
}

.mi-memo-send-btn:hover {
    color: #1e40af;
    background: rgba(29, 78, 216, 0.06);
}

.mi-pass-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    white-space: nowrap;
    margin-left: auto;
}

.mi-pass-pw-label {
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    flex-shrink: 0;
}

.mi-pass-input {
    width: 120px;
    flex: 0 0 120px;
    min-width: 90px;
}

.mi-pass-row .mi-save-btn {
    margin-left: 0;
    flex-shrink: 0;
}

.mi-save-btn {
    height: 32px !important;
    min-height: 32px;
    padding: 0 16px !important;
    font-size: 14px !important;
    font-weight: 700;
    border-radius: 6px;
    gap: 6px;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.28), 0 1px 2px rgba(15, 23, 42, 0.08);
}

.mi-save-btn i {
    font-size: 16px;
    line-height: 1;
}

.mi-save-btn:hover,
.mi-save-btn:focus-visible {
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.35), 0 1px 3px rgba(15, 23, 42, 0.1);
}

.mi-pass-label { color: #dc2626; font-weight: 700; }

.mi-user-pw-row th { color: #dc2626; }

.mi-page .mi-info-form .charge-input,
.mi-page .mi-info-form .charge-select {
    height: 26px;
    padding: 0 8px;
    font-size: 13px;
    border-radius: 6px;
    vertical-align: middle;
}

.mi-page .mi-info-form textarea.charge-input {
    min-height: 32px;
    max-height: 56px;
    padding: 4px 8px;
    line-height: 1.3;
    border-radius: 6px;
    field-sizing: content;
}

.mi-page .mi-info-form .charge-btn {
    height: 22px;
    padding: 0 7px;
    font-size: 13px;
}

.mi-info-form .mi-hint,
.mi-info-form .muted {
    font-size: 12px;
    color: var(--admin-muted, #6b7280);
}

.mi-info-form input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 0 3px;
    vertical-align: middle;
    accent-color: #6366f1;
}

.mi-info-form .mi-stats-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.1;
}

.mi-info-form .mi-stats-table {
    margin-top: 1px;
    font-size: 12px;
}

.mi-info-form .mi-stats-table th,
.mi-info-form .mi-stats-table td {
    padding: 0 2px !important;
    line-height: 1.15;
}

.mi-info-form .mi-stats-table thead th {
    font-size: 12px;
    padding: 1px 2px !important;
    background: var(--admin-surface-2, #f8f9fb);
}

.mi-info-form .mi-stats-table .mi-limit-cell {
    min-width: 160px;
    font-size: 12px;
    text-align: left;
}

.mi-info-form .mi-limit-check {
    font-size: 12px;
    gap: 1px;
    margin-right: 2px;
}

.mi-info-form .mi-limit-input {
    width: 56px;
    min-width: 44px;
    height: 20px;
    padding: 0 3px;
    font-size: 12px;
}

.mi-info-form .mi-memo {
    min-height: 28px;
}


.mi-info-form .mi-company-tag {
    font-size: 13px;
    margin-right: 2px;
}

.mi-info-form .member-name-link {
    font-size: 13px;
}


/* 회원정보 팝업 — 프리미엄 스타일 (레이아웃 유지) */
.admin-window-body {
    background: var(--admin-bg-2, #eef0f4);
    -webkit-font-smoothing: antialiased;
}

.mi-page {
    line-height: 1.35;
}

.mi-topbar {
    align-items: center;
    padding: 6px 12px;
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.1) 0%, var(--admin-surface-2, #f8f9fb) 100%);
    border-bottom: 1px solid rgba(201, 169, 98, 0.35);
    box-shadow: none;
}

.mi-topbar-title {
    letter-spacing: -0.01em;
    color: #5c4a1e;
}

.mi-topbar-summary,
.mi-topbar-meta {
    color: #5c4a1e;
}

.mi-section {
    border-color: rgba(154, 123, 60, 0.14);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.mi-section-head {
    padding: 5px 10px;
    letter-spacing: 0.01em;
    background: linear-gradient(90deg, #252017 0%, #2a3548 58%, #3a3020 100%);
    border-bottom: 2px solid rgba(201, 169, 98, 0.48);
    box-shadow: inset 0 -1px 0 rgba(201, 169, 98, 0.22);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.mi-section-head i {
    filter: drop-shadow(0 0 6px rgba(201, 169, 98, 0.35));
}

.mi-section-body {
    padding: 5px 6px;
    background: var(--admin-surface, #fff);
}

.mi-form-table th,
.mi-form-table td,
.mi-page .charge-table th,
.mi-page .charge-table td {
    vertical-align: middle;
}

.mi-form-table th,
.mi-info-form .mi-form-table th {
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.1) 0%, var(--admin-surface-2, #f8f9fb) 100%);
    color: #5c4a1e;
    font-weight: 700;
    border-color: rgba(201, 169, 98, 0.16);
}

.mi-field-label {
    align-items: center;
    gap: 4px;
    color: #5c4a1e;
}

.mi-field-label i {
    color: var(--login-gold, #9a7b3c);
    opacity: 1;
}

.mi-info-form .mi-form-table.charge-table th,
.mi-info-form .mi-form-table.charge-table td {
    padding: 2px 5px !important;
    line-height: 1.35;
    border-color: rgba(15, 23, 42, 0.08);
}

.mi-info-form .mi-form-table tbody tr:nth-child(even):not(.mi-pass-row) td {
    background: rgba(201, 169, 98, 0.025);
}

.mi-info-form .mi-form-table tbody tr:hover:not(.mi-pass-row) td {
    background: rgba(201, 169, 98, 0.05);
}

.mi-pass-bar {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.04) 0%, rgba(220, 38, 38, 0.08) 100%);
    border-color: rgba(220, 38, 38, 0.18) !important;
}

.mi-pass-pw-label,
.mi-pass-label,
.mi-user-pw-row th {
    color: #b91c1c;
}

.mi-page input.charge-input:not([type="checkbox"]),
.mi-page select.charge-select,
.mi-page textarea.charge-input,
.mi-page .mi-info-form input.charge-input:not([type="checkbox"]),
.mi-page .mi-info-form select.charge-select,
.mi-page .mi-info-form textarea.charge-input {
    vertical-align: middle;
    border: 1px solid rgba(201, 169, 98, 0.32);
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.mi-page input.charge-input:not([type="checkbox"]),
.mi-page select.charge-select,
.mi-page .mi-info-form input.charge-input:not([type="checkbox"]),
.mi-page .mi-info-form select.charge-select {
    display: inline-flex;
    align-items: center;
}

.mi-page .charge-input:focus,
.mi-page .charge-select:focus,
.mi-page .mi-info-form .charge-input:focus,
.mi-page .mi-info-form .charge-select:focus {
    border-color: rgba(201, 169, 98, 0.78);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.14), inset 0 1px 2px rgba(15, 23, 42, 0.04);
    outline: none;
}

.mi-info-form .mi-limit-check,
.mi-limit-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
}

.mi-info-form input[type="checkbox"],
.mi-page input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin: 0 3px;
    vertical-align: middle;
    accent-color: var(--login-gold, #9a7b3c);
    cursor: pointer;
    transform: translateY(-0.5px);
}

.mi-page .charge-btn {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.mi-page .charge-btn--primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.mi-page .charge-table thead th,
.mi-info-form .mi-stats-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ede4d0;
    color: #5c4a1e;
    font-weight: 800;
    border-bottom: 2px solid rgba(201, 169, 98, 0.35);
    box-shadow: 0 1px 0 rgba(154, 123, 60, 0.12);
}

.mi-page .charge-table tbody tr:hover td {
    background: rgba(201, 169, 98, 0.04);
}

.mi-ledger-toolbar {
    padding: 2px 0 4px;
    border-bottom: 1px solid rgba(201, 169, 98, 0.14);
}

.mi-table-wrap {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 5px;
    background: #fff;
}

.mi-grant-row td {
    background: rgba(201, 169, 98, 0.1);
}

.mi-bet-card {
    border-color: rgba(154, 123, 60, 0.18);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.mi-bet-head {
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.12) 0%, rgba(201, 169, 98, 0.04) 100%);
    border-bottom: 1px solid rgba(201, 169, 98, 0.2);
}

.mi-bet-detail {
    background: var(--admin-surface-2, #f8f9fb);
}

.mi-company-tag {
    color: #4f46e5;
}

.mi-readonly-id {
    color: #1e293b;
}

.mi-memo--ok {
    background: rgba(46, 160, 67, 0.06);
    border-color: rgba(46, 160, 67, 0.18);
}

.mi-memo--warn {
    background: rgba(220, 38, 38, 0.05);
    border-color: rgba(220, 38, 38, 0.14);
}

html[data-theme="dark"] .admin-window-body {
    background: var(--admin-bg-1, #070b12);
}

html[data-theme="dark"] .mi-section {
    border-color: rgba(201, 169, 98, 0.14);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .mi-section-body,
html[data-theme="dark"] .mi-table-wrap {
    background: rgba(12, 16, 24, 0.72);
}

html[data-theme="dark"] .mi-form-table th,
html[data-theme="dark"] .mi-info-form .mi-form-table th {
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    color: rgba(240, 230, 200, 0.92);
    border-color: rgba(201, 169, 98, 0.14);
}

html[data-theme="dark"] .mi-field-label {
    color: rgba(240, 230, 200, 0.88);
}

html[data-theme="dark"] .mi-page input.charge-input:not([type="checkbox"]),
html[data-theme="dark"] .mi-page select.charge-select,
html[data-theme="dark"] .mi-page textarea.charge-input,
html[data-theme="dark"] .mi-page .mi-info-form input.charge-input:not([type="checkbox"]),
html[data-theme="dark"] .mi-page .mi-info-form select.charge-select,
html[data-theme="dark"] .mi-page .mi-info-form textarea.charge-input {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(201, 169, 98, 0.22);
    color: var(--admin-text);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .mi-page .charge-table thead th,
html[data-theme="dark"] .mi-info-form .mi-stats-table thead th {
    background: #252017;
    color: #f0e6c8;
    border-bottom-color: rgba(201, 169, 98, 0.4);
}

html[data-theme="dark"] .mi-info-form .mi-form-table tbody tr:nth-child(even):not(.mi-pass-row) td {
    background: rgba(255, 255, 255, 0.015);
}

html[data-theme="dark"] .mi-bet-head {
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.14) 0%, rgba(201, 169, 98, 0.04) 100%);
}

@media (max-width: 1100px) {
    .mi-row--2,
    .mi-row--3 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .mi-topbar { flex-wrap: nowrap; }
    .mi-topbar-summary { font-size: 12px; gap: 6px; }
    .mi-form-table th { width: 90px; }
    .mi-bet-head { grid-template-columns: 1fr 1fr; }
}



/* 이벤트관리 */
.admin-main:has(.events-page) {
    overflow: auto;
}

.events-page .events-cat-panel {
    flex-shrink: 0;
    margin-bottom: 6px;
}


.events-page .events-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    flex: 1 1 auto;
    min-width: 0;
}

.events-page .events-category-tabs {
    flex: 1 1 auto;
    justify-content: flex-end;
    max-width: 100%;
}

.events-page .events-category-tabs .events-category-btn.is-active {
    background: var(--login-gold-soft);
    border-color: rgba(229, 170, 6, 0.45);
    color: var(--admin-text);
}

.events-page .events-list-panel {
    flex: 1;
    min-height: 0;
}

.events-cat-compact { padding: 6px 10px 8px; }
.events-cat-compact-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.events-cat-compact-title { font-size: 12px; font-weight: 700; color: var(--admin-text); display: inline-flex; align-items: center; gap: 6px; }
.events-cat-compact-title strong { color: var(--login-gold); font-weight: 700; }
.events-cat-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 74px; overflow-y: auto; padding: 2px 0; }
.events-cat-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 999px; border: 1px solid var(--admin-border); background: var(--admin-surface-2); font-size: 11px; line-height: 1.2; }
.events-cat-chip.is-hidden { opacity: .55; }
.events-cat-chip-name { font-weight: 600; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.events-cat-chip-slug { font-size: 11px; color: var(--admin-muted); }
.events-cat-chip-btn { border: 0; background: transparent; color: var(--admin-muted); padding: 0 2px; cursor: pointer; font-size: 11px; line-height: 1; }
.events-cat-chip-btn:hover { color: var(--admin-text); }
.events-cat-chip-btn:disabled { opacity: .35; cursor: default; }
.events-cat-loading, .events-cat-empty { font-size: 12px; color: var(--admin-muted); }

.events-page .events-table .col-thumb { width: 84px; min-width: 84px; }
.events-page .events-thumb-cell { width: 68px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid var(--admin-border); background: var(--admin-surface); display: block; }
.events-page .events-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.events-page .events-badge--on { background: rgba(46, 160, 67, 0.15); color: #16a34a; }
html[data-theme="dark"] .events-page .events-badge--on { color: #3ddc84; }
.events-page .events-badge--off { background: var(--admin-surface-2); color: var(--admin-muted); }
.events-page .events-table .col-actions { width: 72px; min-width: 72px; }
.events-page .events-table .col-category { min-width: 120px; }
.events-page .events-table .col-sort { width: 72px; min-width: 72px; }
.events-page .events-table .col-visible { width: 72px; min-width: 72px; text-align: center; }
.events-page .events-table .col-views { width: 84px; min-width: 84px; }

.events-page .events-inline-select {
    width: 100%;
    min-width: 108px;
    max-width: 140px;
    height: 30px;
    padding: 2px 6px;
    font-size: 12px;
}

.events-page .events-inline-num {
    width: 68px;
    min-width: 68px;
    height: 30px;
    padding: 2px 6px;
    font-size: 12px;
    text-align: center;
}

.events-page .events-inline-select.is-saving,
.events-page .events-inline-num.is-saving {
    opacity: 0.55;
}

.events-switch--table {
    margin: 0 auto;
}

.events-switch--table .events-switch-track {
    width: 36px;
    height: 20px;
}

.events-switch--table .events-switch-thumb {
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
}

.events-switch--table .events-switch-input:checked + .events-switch-track .events-switch-thumb {
    transform: translateX(16px);
}


.events-page .events-actions { display: inline-flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: nowrap; }
.events-page .events-actions .charge-btn--sm { width: 32px; min-width: 32px; height: 30px; padding: 0; }

.events-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.events-modal[hidden] { display: none !important; }
.events-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}
.events-modal-card {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    box-shadow: 0 20px 50px var(--admin-shadow);
    overflow: hidden;
}
.events-modal--wide .events-modal-card { width: min(880px, 100%); }
.events-modal--event-form:not([hidden]) {
    padding: 5vh 12px;
    align-items: center;
    justify-content: center;
}

.events-modal--event-form:not([hidden]) .events-modal-card {
    width: min(1120px, 100%);
    height: 90vh;
    max-height: 90vh;
    min-height: 90vh;
}

.events-modal--event-form .events-event-form-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.events-event-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

.events-inline-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin: 0;
}

.events-inline-field > span {
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
    white-space: nowrap;
}

.events-inline-field .charge-select,
.events-inline-field .charge-input {
    width: auto !important;
    min-width: 0;
    height: 32px;
    padding: 4px 8px;
    font-size: 13px;
}

.events-inline-field .charge-select {
    min-width: 120px;
    max-width: 160px;
}

.events-inline-field--title {
    flex: 1 1 auto;
    min-width: 180px;
}

.events-inline-field--title .charge-input {
    width: 100% !important;
    min-width: 140px;
}

.events-inline-field--sort .charge-input {
    width: 72px !important;
}

.events-visible-field {
    margin-left: auto;
    flex-shrink: 0;
}

.events-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.events-switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.events-switch-track {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--admin-border);
    position: relative;
    transition: background 0.2s ease;
}

.events-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.events-switch-input:checked + .events-switch-track {
    background: #16a34a;
}

html[data-theme="dark"] .events-switch-input:checked + .events-switch-track {
    background: #22c55e;
}

.events-switch-input:checked + .events-switch-track .events-switch-thumb {
    transform: translateX(18px);
}


.events-modal--event-form .events-thumb-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
}

.events-modal--event-form .events-thumb-preview {
    flex: 0 0 auto;
    width: 200px;
    min-width: 200px;
    min-height: 120px;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.events-modal--event-form .events-thumb-preview img {
    max-width: 184px;
    max-height: 160px;
    margin: 0;
}


.events-modal--event-form .events-thumb-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.events-modal--event-form .events-thumb-actions {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-top: 4px;
}

.events-modal--event-form .events-thumb-actions .charge-btn--sm {
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 720px) {
    .events-modal--event-form .events-thumb-row {
        flex-wrap: wrap;
    }

    .events-modal--event-form .events-thumb-actions {
        flex-wrap: wrap;
        width: 100%;
    }
}

.events-modal--event-form .events-editor-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.events-modal--event-form .events-editor-wrap .free-board-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.events-modal--event-form .events-editor-wrap .free-board-editor-panel .ql-container.ql-snow {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.events-modal--event-form .events-editor-wrap .free-board-editor-panel .ql-editor {
    min-height: calc(90vh - 320px) !important;
    max-height: none !important;
    flex: 1;
}

.events-modal--event-form .events-editor-wrap .free-board-source-area {
    min-height: calc(90vh - 320px) !important;
    max-height: none !important;
    flex: 1;
    resize: vertical;
}

@media (max-width: 900px) {
    .events-event-toolbar {
        flex-wrap: wrap;
    }

    .events-visible-field {
        margin-left: 0;
    }

    .events-inline-field--title {
        flex: 1 1 100%;
    }
}


.events-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--login-gold-soft);
    flex-shrink: 0;
}
.events-modal-head h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--admin-text); }
.events-modal-close {
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    font-size: 1rem;
}
.events-modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    min-height: 0;
}
.events-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 4px;
    flex-shrink: 0;
}
.events-field { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.events-field > span,
.events-field-label { font-size: 13px; font-weight: 600; color: var(--admin-muted); }
.events-field--check {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
}
.events-field--check span { font-weight: 500; }
.events-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
}
.events-form-grid .events-field--check { grid-column: 1 / -1; }
.events-modal .charge-input,
.events-modal .charge-select {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}
.events-modal .charge-select { min-width: 0; }
.events-modal .events-content-area {
    width: 100% !important;
    min-height: 220px;
    height: auto;
    padding: 10px 12px;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.events-thumb-block { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.events-thumb-preview {
    min-height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--admin-border);
    border-radius: 8px;
    color: var(--admin-muted);
    background: var(--admin-surface);
    overflow: hidden;
    padding: 8px;
}

.events-thumb-hint { margin: 0; font-size: 11px; color: var(--admin-muted); line-height: 1.4; }
.events-thumb-hint kbd { display: inline-block; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--admin-border); background: var(--admin-surface-2); font-size: 11px; font-family: inherit; }
.events-thumb-preview:focus { outline: 2px solid var(--login-gold, #c9a962); outline-offset: 2px; }
.events-thumb-preview.is-paste-target { border-color: var(--login-gold, #c9a962); box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.25); }
.events-thumb-preview.is-uploading { opacity: 0.6; pointer-events: none; }

.events-thumb-preview img { max-width: 100%; max-height: 220px; display: block; border-radius: 6px; }
.events-thumb-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 720px) {
    .events-form-grid { grid-template-columns: 1fr; }
}

/* 고객센터 */
.admin-main:has(.qna-page) {
    overflow: auto;
}

.qna-filters {
    flex-wrap: wrap;
    max-width: 100%;
}

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

.qna-table {
    min-width: 980px;
    font-size: 12px;
}

.qna-table thead tr {
    background: #252017;
}

.qna-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #252017;
    color: #f0e6c8;
    font-weight: 800;
    font-size: 13px;
    padding: 10px 8px;
    vertical-align: middle;
    border-bottom: 2px solid rgba(201, 169, 98, 0.45);
}

[data-theme="light"] .qna-table thead tr,
[data-theme="light"] .qna-table thead th {
    background: #ede4d0;
    color: #5c4a1e;
    border-bottom-color: rgba(154, 123, 60, 0.35);
}

.qna-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 6px 10px 8px;
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
}

.qna-summary-stats {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    border-bottom: none;
    white-space: nowrap;
}

.qna-filter-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
}

.qna-filter-divider {
    flex: 0 0 1px;
    width: 1px;
    height: 22px;
    margin: 0 2px;
    background: var(--admin-border);
    align-self: center;
}

.qna-filter-tabs .qna-tab-btn {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.2;
    margin: 0;
    flex: 0 0 auto;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.qna-filter-tabs .qna-tab-btn:hover {
    background: var(--admin-surface-hover);
    color: var(--admin-text);
}

.qna-filter-tabs .qna-company-btn.is-active {
    border-color: rgba(51, 102, 255, 0.55);
    background: rgba(51, 102, 255, 0.12);
    color: #3366ff;
}

.qna-filter-tabs .qna-kind-btn.is-active {
    border-color: var(--login-gold, #c9a962);
    background: var(--login-gold-soft);
    color: var(--login-gold, #c9a962);
}

.qna-filter-tabs .qna-kind-btn[data-kind="unanswered"].is-active {
    border-color: rgba(231, 76, 60, 0.55);
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

.qna-pending-count {
    display: inline;
    margin: 0;
    padding: 0 2px;
    border: 0;
    background: transparent;
    font: inherit;
    color: #e74c3c;
    cursor: pointer;
    line-height: inherit;
    vertical-align: baseline;
    text-decoration: underline dotted rgba(231, 76, 60, 0.45);
    text-underline-offset: 2px;
}

.qna-pending-count:hover,
.qna-pending-count:focus-visible {
    color: #ff6b5a;
    text-decoration: underline solid #e74c3c;
    outline: none;
}

.qna-pending-count #qna_pending,
.qna-summary-pending strong {
    color: #e74c3c;
}

#qna_unanswered_btn.is-active {
    border-color: var(--login-gold, #d4a853);
    color: var(--login-gold, #d4a853);
}

.qna-row {
    cursor: pointer;
    transition: background 0.15s ease;
}

.qna-row:hover {
    background: rgba(201, 169, 98, 0.08);
}

.qna-row.is-expanded {
    background: rgba(201, 169, 98, 0.12);
}

.qna-row-op1-warning {
    background: rgba(231, 76, 60, 0.08);
}

.qna-row-company-max .qna-member-tag,
.qna-row-company-max .mid {
    color: #3366ff;
    font-weight: 700;
}

.qna-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
    white-space: nowrap;
}

.qna-badge--pending {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.35);
}

.qna-badge--done {
    background: rgba(46, 204, 113, 0.12);
    color: #27ae60;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.qna-badge--account {
    background: rgba(52, 152, 219, 0.12);
    color: #2980b9;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.qna-subject {
    font-weight: 600;
    max-width: 320px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.col-expand {
    width: 36px;
    text-align: center;
    color: var(--admin-muted);
}

.qna-expand-icon {
    font-size: 14px;
}

.qna-detail-row td {
    padding: 0 !important;
    border-top: none !important;
    background: transparent !important;
}

.qna-detail-panel {
    margin: 0 8px 12px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.qna-detail-panel--loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 234px;
    padding: 32px 16px;
}

.qna-detail-loader {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qna-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
    gap: 20px;
    align-items: start;
}

.qna-detail-main {
    min-width: 0;
}

.qna-detail-replies {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-border);
}

.qna-detail-compose {
    position: sticky;
    top: 8px;
    min-height: 420px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .qna-detail-compose {
    background: rgba(0, 0, 0, 0.02);
}

.qna-compose-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.qna-detail-compose .qna-reply-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.qna-detail-compose .qna-reply-toolbar {
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
}

.qna-detail-compose .qna-template-select {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.qna-detail-compose .qna-reply-text {
    width: 100%;
    height: auto;
    min-height: 240px;
    flex: 1;
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 1.55;
    resize: vertical;
}

.qna-detail-compose .qna-reply-actions {
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .qna-detail-grid {
        grid-template-columns: 1fr;
    }

    .qna-detail-compose {
        position: static;
    }
}

.qna-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.qna-meta-chip {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--login-gold-soft);
    border: 1px solid var(--admin-border);
    font-weight: 600;
}

.qna-detail-subject {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
}

.qna-detail-content {
    font-size: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--admin-border);
    min-height: 120px;
}

[data-theme="light"] .qna-detail-content {
    background: rgba(0, 0, 0, 0.03);
}

.qna-attach {
    margin: 10px 0 0;
    font-size: 12px;
}

.qna-replies-title {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
}

.qna-comments {
    display: grid;
    gap: 10px;
    max-height: 364px;
    overflow-y: auto;
    margin-bottom: 12px;
    padding-right: 4px;
}

.qna-comment {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: rgba(0, 0, 0, 0.12);
}

.qna-comment--admin {
    border-color: rgba(201, 169, 98, 0.45);
    background: rgba(201, 169, 98, 0.08);
}

.qna-comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
}

.qna-comment-head strong {
    font-weight: 700;
}

.qna-comment-del {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #e74c3c;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
}

.qna-comment-body {
    font-size: 13px;
    line-height: 1.55;
}

.qna-reply-form {
    display: grid;
    gap: 8px;
}

.qna-reply-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qna-template-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-muted);
    margin: 0;
}

.qna-template-select {
    min-width: 180px;
    flex: 1;
}

.qna-reply-text {
    width: 100%;
    min-height: 96px;
    resize: vertical;
}

.qna-reply-actions {
    display: flex;
    justify-content: flex-end;
}

.qna-grade-human { color: #888; font-weight: 700; }
.qna-grade-vip { color: #e74c3c; font-weight: 700; }
.qna-grade-vvip { color: #27ae60; font-weight: 700; }
.qna-grade-normal { color: #2c3e8f; font-weight: 700; }

.qna-member-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
}

.admin-nav-subitem.has-pending-badge {
    position: relative;
}

.admin-nav-pending-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}

.admin-nav-pending-badge[hidden] {
    display: none !important;
}

#qna_toast.charge-toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1300;
}

body.events-modal-open { overflow: hidden; }



/* 자유게시판 관리 */
.admin-main:has(.free-board-page) {
    overflow: auto;
}


.free-board-summary-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.free-board-bulk-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.free-board-delete-btn:not(:disabled) {
    border-color: rgba(231, 76, 60, 0.45);
    color: #e74c3c;
}

.free-board-delete-btn:not(:disabled):hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.6);
    color: #e74c3c;
}

.free-board-move-btn:not(:disabled) {
    border-color: rgba(52, 152, 219, 0.45);
    color: #3498db;
}

.free-board-move-btn:not(:disabled):hover {
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.6);
    color: #3498db;
}

.free-board-copy-btn:not(:disabled) {
    border-color: rgba(39, 174, 96, 0.45);
    color: #27ae60;
}

.free-board-copy-btn:not(:disabled):hover {
    background: rgba(39, 174, 96, 0.1);
    border-color: rgba(39, 174, 96, 0.6);
    color: #27ae60;
}

.free-board-move-modal {
    position: fixed;
    inset: 0;
    z-index: 12050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.free-board-move-modal[hidden] {
    display: none !important;
}

.free-board-move-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.free-board-move-card {
    position: relative;
    width: min(420px, 100%);
    background: var(--admin-surface, #fff);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.free-board-move-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.free-board-move-desc {
    margin: 0;
    color: var(--admin-muted, #64748b);
    font-size: 14px;
    line-height: 1.5;
}

.free-board-move-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.free-board-move-actions .charge-btn {
    flex: 1 1 140px;
}

.free-board-move-cancel {
    align-self: flex-end;
}

.free-board-table .col-check {
    width: 42px;
    text-align: center;
}

.free-board-table .free-row-check {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #6366f1;
    vertical-align: middle;
}

.free-board-page .free-board-btn.is-active {
    border-color: rgba(51, 102, 255, 0.55);
    background: rgba(51, 102, 255, 0.12);
    color: #3366ff;
}

.free-board-page .free-type-btn.is-active {
    border-color: var(--login-gold, #c9a962);
    background: var(--login-gold-soft);
    color: var(--login-gold, #c9a962);
}

.free-badge--event {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.free-badge--bet {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.free-row-notice td {
    background: rgba(201, 169, 98, 0.06);
}

.free-row-event td {
    background: rgba(139, 92, 246, 0.05);
}

.free-row-hidden td {
    opacity: 0.72;
}

.free-cat-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--admin-muted);
    margin-right: 4px;
    vertical-align: middle;
}

.free-detail-panel .free-edit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.free-detail-panel .free-edit-subject {
    width: 100%;
    margin-bottom: 8px;
}

.free-detail-panel .free-edit-content {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    margin-bottom: 8px;
}

.free-hidden-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
}

.free-view-link {
    text-decoration: none;
    color: #3366ff !important;
}

.free-view-link:hover {
    text-decoration: underline;
}

/* 게시판 상세 모달 */
body.free-board-modal-open {
    overflow: hidden;
}

.free-board-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

.free-board-modal[hidden] {
    display: none !important;
}

.free-board-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 24, 0.62);
    backdrop-filter: blur(4px);
}

.free-board-modal-card {
    position: relative;
    z-index: 1;
    width: min(1360px, 98%);
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.free-board-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--login-gold-soft);
    flex-shrink: 0;
    min-height: 52px;
}

.free-board-modal-head-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.free-board-modal-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.free-board-modal-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
    background: rgba(51, 102, 255, 0.12);
    color: #3366ff;
    border: 1px solid rgba(51, 102, 255, 0.22);
}

.free-board-modal-chip.is-warn {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.28);
}

.free-board-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 42%;
}

.free-board-modal-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--admin-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.free-board-modal-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.free-board-modal-meta span i {
    font-size: 12px;
    opacity: 0.85;
}

.free-board-modal-meta .fb-meta-sep {
    opacity: 0.45;
    user-select: none;
}

.free-board-modal-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.free-board-modal-close {
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    font-size: 1rem;
    border-radius: 6px;
}

.free-board-modal-close:hover {
    background: var(--admin-surface-hover);
    color: var(--admin-text);
}

.free-board-modal-body {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.free-board-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.free-board-modal-form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.free-board-modal-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 14px 12px;
}

.free-board-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-bottom: 8px;
    min-width: 0;
}

.free-board-inline-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin: 0;
}

.free-board-inline-field > span {
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
    white-space: nowrap;
}

.free-board-inline-field .charge-select,
.free-board-inline-field .charge-input {
    width: auto !important;
    min-width: 0;
    height: 32px;
    padding: 4px 8px;
    font-size: 12px;
    box-sizing: border-box;
}

.free-board-inline-field .charge-select {
    min-width: 88px;
    max-width: 110px;
}

.free-board-inline-field--subject {
    flex: 1 1 auto;
    min-width: 0;
}

.free-board-inline-field--subject .charge-input {
    width: 100% !important;
    flex: 1;
    min-width: 120px;
}

.free-board-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-text);
    white-space: nowrap;
}

.free-board-inline-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #6366f1;
}

.free-board-editor-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.free-board-editor-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 24px;
}

.free-board-editor-label > span {
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
}

.free-board-source-toggle {
    appearance: none;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-muted);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.free-board-source-toggle:hover,
.free-board-source-toggle.is-active {
    border-color: rgba(51, 102, 255, 0.45);
    background: rgba(51, 102, 255, 0.1);
    color: #3366ff;
}

.free-board-editor-panel {
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--admin-card);
}

.free-board-editor-panel .ql-toolbar.ql-snow {
    border: 0;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface);
    padding: 6px 8px;
}

.free-board-editor-panel .ql-container.ql-snow {
    border: 0;
    font-size: 14px;
}

.free-board-editor-panel .ql-editor {
    min-height: 280px;
    max-height: 44vh;
    overflow-y: auto;
    line-height: 1.6;
    color: var(--admin-text);
    padding: 10px 12px;
}

.free-board-source-area {
    display: block;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 220px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.5;
    resize: vertical;
    padding: 10px 12px;
}

.free-board-bet-info {
    margin: 0 0 8px;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 6px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
}

.free-board-comments-section {
    border-top: 1px solid var(--admin-border);
    padding-top: 10px;
    margin-top: 4px;
}

.free-board-comments-head {
    margin-bottom: 8px;
}

.free-board-comments-head h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--admin-text);
    display: flex;
    align-items: center;
    gap: 5px;
}

.free-board-comments {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.free-board-no-comments {
    margin: 0;
    padding: 12px;
    font-size: 12px;
    text-align: center;
    border: 1px dashed var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
}

.free-board-comment {
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
    overflow: hidden;
}

.free-board-comment-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--admin-border);
    font-size: 11px;
    background: var(--admin-card);
}

.free-board-comment-head strong {
    color: var(--admin-text);
    font-size: 12px;
}

.free-board-comment-head .muted {
    margin-left: auto;
    font-size: 11px;
}

.free-board-comment-del {
    border: 0;
    background: transparent;
    color: var(--admin-muted);
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    flex-shrink: 0;
}

.free-board-comment-del:hover {
    color: #e74c3c;
}

.free-board-comment-body {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--admin-text);
    word-break: break-word;
}

.free-board-reply-author {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.free-board-reply-author .free-board-inline-field span {
    white-space: nowrap;
}

.free-board-reply-author .charge-input {
    min-width: 120px;
}

.free-board-reply-form {
    display: block;
    width: 100%;
}

.free-board-reply-text {
    display: block;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 72px;
    height: auto;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-card);
    color: var(--admin-text);
}

.free-board-reply-text:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.free-board-reply-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.free-board-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    border-top: 1px solid var(--admin-border);
    background: var(--admin-surface);
    flex-shrink: 0;
}

.free-board-modal-foot-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.free-board-modal-delete:not(:disabled) {
    border-color: rgba(231, 76, 60, 0.45);
    color: #e74c3c;
}

.free-board-modal-delete:not(:disabled):hover {
    background: rgba(231, 76, 60, 0.1);
}


/* 게시판 모달(등록·수정) — 화면 높이 90% */
#free_board_detail_modal:not([hidden]) {
    padding: 5vh 12px;
    align-items: center;
    justify-content: center;
}

#free_board_detail_modal:not([hidden]) .free-board-modal-card {
    height: 90vh !important;
    max-height: 90vh !important;
    min-height: 90vh !important;
    margin: 0 auto;
}

#free_board_detail_modal:not([hidden]) .free-board-modal-body,
#free_board_detail_modal:not([hidden]) .free-board-modal-form {
    flex: 1;
    min-height: 0;
}

#free_board_detail_modal:not([hidden]) .free-board-modal-scroll {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#free_board_detail_modal:not([hidden]) .free-board-editor-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

#free_board_detail_modal:not([hidden]) .free-board-editor-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#free_board_detail_modal:not([hidden]) .free-board-editor-panel .ql-container.ql-snow {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#free_board_detail_modal:not([hidden]) .free-board-editor-panel .ql-editor {
    min-height: calc(90vh - 260px) !important;
    max-height: none !important;
    flex: 1;
}

#free_board_detail_modal:not([hidden]) .free-board-source-area {
    min-height: calc(90vh - 260px) !important;
    max-height: none !important;
    flex: 1;
    resize: vertical;
}

.free-board-page .qna-row {
    cursor: pointer;
}

.free-board-page .qna-row:hover td {
    background: rgba(51, 102, 255, 0.04);
}

.free-board-page .qna-row.is-selected td {
    background: rgba(51, 102, 255, 0.14);
}

.free-board-page .qna-row.is-selected td:first-child {
    box-shadow: inset 3px 0 0 #3366ff;
}

.free-board-page .qna-row.is-selected:hover td {
    background: rgba(51, 102, 255, 0.18);
}

@media (max-width: 900px) {
    .free-board-modal-head {
        flex-wrap: wrap;
    }

    .free-board-modal-title {
        max-width: 100%;
        flex: 1 1 100%;
        order: 3;
    }

    .free-board-modal-meta {
        display: none;
    }

    .free-board-toolbar {
        flex-wrap: wrap;
    }

    .free-board-inline-field--subject {
        flex: 1 1 100%;
    }
}

[data-theme="dark"] .free-board-editor-panel .ql-snow .ql-stroke {
    stroke: var(--admin-muted);
}

[data-theme="dark"] .free-board-editor-panel .ql-snow .ql-fill {
    fill: var(--admin-muted);
}

[data-theme="dark"] .free-board-editor-panel .ql-snow .ql-picker {
    color: var(--admin-text);
}

[data-theme="dark"] .free-board-editor-panel .ql-snow .ql-picker-options {
    background: var(--admin-card);
    border-color: var(--admin-border);
}


.free-subject-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.free-subject-text {
    white-space: nowrap;
}

.free-reply-count {
    flex-shrink: 0;
    margin-left: 3px;
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
    line-height: 1.2;
}

.free-board-list-chip {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    vertical-align: middle;
    background: rgba(51, 102, 255, 0.1);
    color: #3366ff;
    border: 1px solid rgba(51, 102, 255, 0.2);
}



.settings-free-board-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.settings-free-board-toolbar {
    display: flex;
    justify-content: flex-end;
}

.settings-free-board-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--admin-border, rgba(15, 23, 42, 0.1));
    border-radius: 12px;
    background: var(--admin-surface, #fff);
}

.settings-free-board-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    table-layout: fixed;
}

.settings-free-board-table thead th {
    padding: 9px 10px;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    color: var(--admin-muted, #64748b);
    background: var(--admin-surface-2, rgba(15, 23, 42, 0.03));
    border-bottom: 1px solid var(--admin-border, rgba(15, 23, 42, 0.08));
    white-space: nowrap;
}

.settings-fb-th--info { width: 150px; }
.settings-fb-th--label { width: 120px; }
.settings-fb-th--table { width: 140px; }
.settings-fb-th--url { width: auto; }
.settings-fb-th--tag { width: 88px; }
.settings-fb-th--use { width: 64px; text-align: center; }

.settings-fb-row td {
    padding: 8px 10px;
    vertical-align: middle;
    border-bottom: 1px solid var(--admin-border, rgba(15, 23, 42, 0.06));
}

.settings-fb-row:last-child td {
    border-bottom: none;
}

.settings-fb-row:nth-child(even) td {
    background: var(--admin-surface-2, rgba(15, 23, 42, 0.015));
}

.settings-fb-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.settings-fb-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.settings-fb-code {
    font-size: 11px;
    color: var(--admin-muted, #64748b);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.settings-fb-badges {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.settings-fb-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.settings-fb-badge.is-ok {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    border-color: rgba(39, 174, 96, 0.25);
}

.settings-fb-badge.is-error {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.25);
}

.settings-fb-lock {
    font-size: 10px;
    color: var(--admin-muted, #64748b);
}

.settings-fb-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--admin-border, rgba(15, 23, 42, 0.12));
    background: var(--admin-surface, #fff);
    color: var(--admin-text, #0f172a);
    font-size: 13px;
    line-height: 1.2;
    box-sizing: border-box;
}

.settings-fb-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.55);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.settings-fb-input[readonly] {
    background: var(--admin-surface-2, rgba(15, 23, 42, 0.04));
    color: var(--admin-muted, #64748b);
}

.settings-fb-td--use {
    text-align: center;
}

.settings-fb-use {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    cursor: pointer;
    user-select: none;
}

.settings-fb-use input {
    margin: 0;
}

.settings-fb-use-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted, #64748b);
    min-width: 22px;
}

.free-board-type-tabs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.free-board-tab-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}


.free-board-tab-static {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    background: var(--login-gold-soft);
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 700;
}


.free-board-icon-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.free-board-icon-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
    white-space: nowrap;
}

.free-board-icon-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.free-board-icon-box {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px dashed var(--admin-border);
    border-radius: 8px;
    background: var(--admin-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.free-board-icon-box:hover,
.free-board-icon-box.is-focused {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
}

.free-board-icon-box.is-uploading {
    opacity: 0.65;
    pointer-events: none;
}

.free-board-icon-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.free-board-icon-placeholder {
    color: var(--admin-muted);
    font-size: 16px;
    line-height: 1;
}

.free-board-icon-upload-btn,
.free-board-icon-clear-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: var(--admin-card);
    color: var(--admin-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.free-board-icon-upload-btn:hover,
.free-board-icon-clear-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.free-board-icon-clear-btn {
    color: #ef4444;
}

.free-board-icon-clear-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

@media (max-width: 900px) {
    .free-board-icon-field {
        margin-left: auto;
    }
}

.free-board-table td.col-subject {
    white-space: nowrap;
    width: auto;
    max-width: none;
}

.free-board-table .qna-subject,
.free-board-table .free-subject-line {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.free-board-table .free-subject-text {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.free-subject-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    max-width: 18px;
    min-height: 18px;
    max-height: 18px;
    border-radius: 4px;
    object-fit: cover;
    flex: 0 0 18px;
    display: block;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .free-subject-icon {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(148, 163, 184, 0.2);
}

/* ── Popups admin ── */
.admin-main:has(.popups-page) {
    max-width: 100%;
    overflow: auto;
}

.popups-page {
    flex: none;
    min-height: auto;
    overflow: visible;
}

.popups-page .charge-head-actions { flex-wrap: wrap; gap: 8px; }

.popups-panels {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popups-page .popups-list-panel.charge-panel--history {
    flex: 0 0 auto;
    min-height: auto;
    margin-bottom: 0;
}

.popups-page .popups-list-panel .popups-grid {
    overflow: visible;
}

.popups-page .popups-preview-panel {
    flex: 0 0 auto;
    min-height: auto;
    max-height: none;
    margin-bottom: 0;
    overflow: visible;
}

.popups-page .popups-preview-panel .popups-preview-stage {
    overflow: visible;
    max-height: none;
}

.popups-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}
.popups-stat-card {
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    background: linear-gradient(145deg, var(--admin-surface) 0%, var(--admin-surface-2) 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.popups-stat-label { display: block; font-size: 12px; color: var(--admin-muted); margin-bottom: 4px; }
.popups-stat-value { font-size: 1.6rem; font-weight: 800; color: var(--admin-text); letter-spacing: -.02em; }
.popups-stat-card--on .popups-stat-value { color: #16a34a; }
html[data-theme="dark"] .popups-stat-card--on .popups-stat-value { color: #3ddc84; }
.popups-stat-card--off .popups-stat-value { color: var(--admin-muted); }
.popups-stat-card--legacy .popups-stat-value { color: var(--login-gold); }

.popups-preview-panel { margin-bottom: 0; }
.popups-preview-stage {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    padding: 20px 16px 24px;
    min-height: 120px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(212,175,55,.08) 0%, transparent 55%),
        var(--admin-surface-2);
    border-radius: 0 0 10px 10px;
}
.popups-preview-empty, .popups-grid-empty, .popups-grid-loading {
    width: 100%;
    text-align: center;
    color: var(--admin-muted);
    font-size: 13px;
    padding: 24px 12px;
}
.popups-grid-empty i { font-size: 2rem; display: block; margin-bottom: 8px; opacity: .5; }
.popups-preview-item {
    margin: 0;
    text-align: center;
    max-width: 100%;
}
.popups-preview-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    border: 1px solid rgba(212,175,55,.35);
    box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.popups-preview-item figcaption {
    margin-top: 6px;
    font-size: 11px;
    color: var(--admin-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popups-order-hint {
    padding: 8px 14px;
    font-size: 12px;
    color: var(--admin-muted);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.popups-inline-btn {
    border: 0;
    background: none;
    color: var(--login-gold);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0 2px;
}

.popups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 14px;
}
.popups-card {
    display: grid;
    grid-template-columns: 24px 96px 1fr auto;
    gap: 10px;
    align-items: stretch;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    transition: border-color .15s, box-shadow .15s, opacity .15s;
}
.popups-card.is-hidden { opacity: .72; }
.popups-card.is-dragging { opacity: .45; }
.popups-card.is-drop-target { border-color: var(--login-gold); box-shadow: 0 0 0 2px rgba(212,175,55,.25); }
.popups-card-drag {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-muted);
    cursor: grab;
    font-size: 1.1rem;
}
.popups-card-thumb {
    border-radius: 8px;
    overflow: hidden;
    background: var(--admin-surface-2);
    border: 1px solid var(--admin-border);
    min-height: 72px;
}
.popups-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 72px; }
.popups-card-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.popups-card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.popups-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
}
.popups-badge--on { background: rgba(46,160,67,.15); color: #16a34a; }
html[data-theme="dark"] .popups-badge--on { color: #3ddc84; }
.popups-badge--off { background: var(--admin-surface-2); color: var(--admin-muted); }
.popups-badge--legacy { background: rgba(212,175,55,.15); color: var(--login-gold); }
.popups-badge--target { background: rgba(59,130,246,.12); color: #2563eb; }
html[data-theme="dark"] .popups-badge--target { color: #60a5fa; }
.popups-card-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--admin-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.popups-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--admin-muted);
}
.popups-card-period { width: 100%; }
.popups-card-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.popups-order-btn {
    border: 0;
    background: var(--admin-surface-2);
    color: var(--admin-muted);
    width: 28px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}
.popups-order-btn:hover:not(:disabled) { color: var(--admin-text); background: var(--admin-border); }
.popups-order-btn:disabled { opacity: .35; cursor: default; }
.popups-card-actions .charge-btn--sm { width: 32px; min-width: 32px; height: 30px; padding: 0; }

.popups-modal--wide .events-modal-card { width: min(960px, 100%); max-height: min(92vh, 900px); }
.popups-edit-layout {
    display: grid;
    grid-template-columns: 1fr min(280px, 34%);
    gap: 16px;
    align-items: start;
}
.popups-edit-aside { display: flex; flex-direction: column; gap: 14px; }
.popups-image-preview {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--admin-border);
    border-radius: 10px;
    background: var(--admin-surface-2);
    overflow: hidden;
    cursor: pointer;
    outline: none;
}
.popups-image-preview:focus { border-color: var(--login-gold); box-shadow: 0 0 0 2px rgba(212,175,55,.2); }
.popups-image-preview img { max-width: 100%; max-height: 240px; display: block; }
.popups-image-placeholder { color: var(--admin-muted); font-size: 13px; text-align: center; }
.popups-image-placeholder i { display: block; font-size: 2rem; margin-bottom: 6px; opacity: .45; }
.popups-content-area {
    min-height: 88px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}
.popups-live-preview .events-field-label { margin-bottom: 6px; }
.popups-live-frame {
    min-height: 100px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
}
.popups-live-popup img { width: 100%; height: auto; display: block; border-radius: 6px; }
.popups-live-empty { font-size: 12px; color: rgba(255,255,255,.55); text-align: center; }

@media (max-width: 900px) {
    .popups-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .popups-edit-layout { grid-template-columns: 1fr; }
    .popups-card { grid-template-columns: 20px 80px 1fr; }
    .popups-card-actions { grid-column: 2 / -1; flex-direction: row; justify-content: flex-end; }
}


/* ── Messages admin (쪽지관리) ── */
.admin-main:has(.messages-page) {
    overflow: auto;
}

.messages-page {
    min-height: 0;
}

.messages-page .charge-head-actions {
    flex-wrap: wrap;
    gap: 8px;
}

.messages-page .msg-filters {
    flex-wrap: wrap;
    max-width: 100%;
}

.messages-page .msg-date-input {
    min-width: 130px !important;
    max-width: 148px !important;
    width: 138px !important;
}

.msg-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    padding: 6px 10px 8px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}

.msg-summary-stats {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    border-bottom: none;
    white-space: nowrap;
}

.msg-summary-stats .game-money-summary-item strong {
    font-size: 14px;
}

.msg-summary-unread strong {
    color: #ea580c !important;
}

html[data-theme="dark"] .msg-summary-unread strong {
    color: #fb923c !important;
}

.msg-summary-read strong {
    color: #16a34a !important;
}

html[data-theme="dark"] .msg-summary-read strong {
    color: #3ddc84 !important;
}

.messages-page .msg-filter-tabs {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
}

.messages-page .msg-filter-tabs .msg-tab-btn.is-active {
    border-color: rgba(201, 169, 98, 0.55);
    background: rgba(201, 169, 98, 0.14);
    color: var(--login-gold);
}

.messages-page .msg-filter-tabs .msg-tab-btn--unread.is-active {
    border-color: rgba(234, 88, 12, 0.45);
    background: rgba(234, 88, 12, 0.12);
    color: #ea580c;
}

html[data-theme="dark"] .messages-page .msg-filter-tabs .msg-tab-btn--unread.is-active {
    color: #fb923c;
}

.messages-page .msg-filter-tabs .msg-tab-btn--read.is-active {
    border-color: rgba(46, 160, 67, 0.45);
    background: rgba(46, 160, 67, 0.12);
    color: #16a34a;
}

html[data-theme="dark"] .messages-page .msg-filter-tabs .msg-tab-btn--read.is-active {
    color: #3ddc84;
}

.msg-bulk-delete-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.msg-bulk-delete-btn:not(:disabled):hover {
    border-color: rgba(220, 38, 38, 0.35);
    color: #dc2626;
}

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

.messages-page .msg-table {
    min-width: 920px;
    font-size: 13px;
}

.messages-page .msg-table thead tr {
    background: #252017;
}

.messages-page .msg-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #252017;
    color: #f0e6c8;
    font-weight: 800;
    font-size: 13px;
    padding: 10px 8px;
    vertical-align: middle;
    border-bottom: 2px solid rgba(201, 169, 98, 0.45);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .messages-page .msg-table thead tr,
html[data-theme="light"] .messages-page .msg-table thead th {
    background: #ede4d0;
    color: #5c4a1e;
    border-bottom-color: rgba(154, 123, 60, 0.35);
    box-shadow: 0 1px 0 rgba(154, 123, 60, 0.12);
}

.messages-page .msg-table tbody td {
    padding: 8px;
    vertical-align: middle;
    font-size: 13px;
}

.messages-page .msg-table .col-check {
    width: 42px;
    min-width: 42px;
    text-align: center;
}

.messages-page .msg-table .col-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6366f1;
    cursor: pointer;
}

.messages-page .msg-table .col-status {
    width: 76px;
    min-width: 76px;
}

.messages-page .msg-table .col-content {
    min-width: 240px;
    max-width: 480px;
    white-space: normal;
}

.messages-page .msg-table .col-actions {
    width: 112px;
    min-width: 112px;
    text-align: center;
}

.messages-page .msg-row {
    transition: background 0.12s ease;
}

.messages-page .msg-row:hover td {
    background: rgba(201, 169, 98, 0.05);
}

.messages-page .msg-row.is-unread td {
    background: rgba(234, 88, 12, 0.04);
}

html[data-theme="dark"] .messages-page .msg-row.is-unread td {
    background: rgba(251, 146, 60, 0.06);
}

.messages-page .msg-member-cell strong {
    font-weight: 700;
    color: var(--admin-text);
}

.messages-page .msg-member-cell .mid {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.msg-content-btn {
    appearance: none;
    border: 0;
    background: none;
    color: var(--admin-text);
    text-align: left;
    padding: 0;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.45;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.msg-content-btn:hover {
    color: var(--login-gold);
}

.msg-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.messages-page .msg-actions .charge-btn--sm {
    width: 32px;
    min-width: 32px;
    height: 30px;
    padding: 0;
}

.msg-empty {
    text-align: center;
    color: var(--admin-muted);
    padding: 32px 12px !important;
    font-size: 14px;
}


/* 쪽지 발송 모달 — 공지 새글등록과 동일 크기 */
#msg_compose_modal:not([hidden]) {
    padding: 5vh 12px;
    align-items: center;
    justify-content: center;
}

#msg_compose_modal:not([hidden]) .free-board-modal-card {
    height: 90vh !important;
    max-height: 90vh !important;
    min-height: 90vh !important;
    margin: 0 auto;
}

#msg_compose_modal:not([hidden]) .free-board-modal-body,
#msg_compose_modal:not([hidden]) .free-board-modal-form {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

#msg_compose_modal:not([hidden]) .msg-compose-scroll {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 18px;
}

.msg-compose-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    min-height: 0;
}

.msg-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.msg-field--full { width: 100%; }
.msg-field--grow { flex: 1; margin: 0; }
.msg-field--inline { max-width: 220px; }

.msg-field-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--admin-text);
}

.msg-field-label i {
    color: var(--login-gold);
    font-size: 14px;
    line-height: 1;
}

.msg-field-label .charge-muted {
    font-weight: 500;
    font-size: 12px;
}

.msg-content-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 280px;
    gap: 8px;
}

.msg-content-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.msg-content-wrap .msg-content-area {
    flex: 1;
    min-height: 320px !important;
    height: auto !important;
    width: 100% !important;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.msg-ids-area {
    width: 100% !important;
    min-height: 96px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
}

.msg-member-search {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.msg-member-pick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px dashed var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface-2);
}

.msg-member-chip {
    appearance: none;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-text);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.msg-member-chip:hover {
    border-color: rgba(201, 169, 98, 0.55);
    background: rgba(201, 169, 98, 0.08);
    color: var(--login-gold);
}

.msg-template-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.msg-chip {
    appearance: none;
    border: 1px solid rgba(201, 169, 98, 0.35);
    background: rgba(201, 169, 98, 0.1);
    color: var(--login-gold);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.msg-chip:hover { background: rgba(201, 169, 98, 0.18); }

/* 상세·수정 모달 */
.msg-modal--detail .events-modal-card {
    width: min(680px, 100%);
    max-height: min(88vh, 760px);
}

@media (max-width: 960px) {
    .msg-summary-bar {
        flex-wrap: wrap;
    }

    .messages-page .msg-filter-tabs {
        order: 3;
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .msg-bulk-delete-btn {
        order: 2;
    }

    .msg-detail-meta {
        grid-template-columns: 1fr;
    }
}


/* ── Member levels admin (레벨관리) ── */
.admin-main:has(.member-levels-page) {
    min-width: 0;
}

.member-levels-page {
    min-width: 0;
}

.member-levels-page .charge-panel {
    width: 100%;
}

.member-levels-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.member-levels-table {
    width: 100%;
    table-layout: fixed;
    font-size: 14px;
}

.member-levels-table thead tr {
    background: #252017;
}

.member-levels-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #252017;
    color: #f0e6c8;
    font-weight: 800;
    padding: 10px 8px;
    border-bottom: 2px solid rgba(201, 169, 98, 0.45);
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-theme="light"] .member-levels-table thead tr,
html[data-theme="light"] .member-levels-table thead th {
    background: #ede4d0;
    color: #5c4a1e;
    border-bottom-color: rgba(154, 123, 60, 0.35);
}

.member-levels-table th,
.member-levels-table td {
    vertical-align: middle;
    padding: 8px 6px;
    overflow: hidden;
}

.member-levels-table .col-level-no {
    width: 56px;
    text-align: center;
    white-space: nowrap;
}

.member-levels-table .col-level-stack {
    width: 32px;
    padding-left: 0;
    padding-right: 0;
}

.member-levels-table th:nth-child(3),
.member-levels-table td:nth-child(3) {
    width: 14%;
}

.member-levels-table th:nth-child(4),
.member-levels-table td:nth-child(4),
.member-levels-table th:nth-child(5),
.member-levels-table td:nth-child(5) {
    width: 12%;
}

.member-levels-table th:nth-child(6),
.member-levels-table td:nth-child(6) {
    width: 10%;
    text-align: right;
    white-space: nowrap;
}

.member-levels-table.charge-table th.col-actions,
.member-levels-table.charge-table td.col-actions {
    width: auto;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
}

.ml-level-stack {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
}

.ml-level-node {
    width: 10px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.85) 0%, rgba(201, 169, 98, 0.25) 100%);
    box-shadow: 0 0 0 1px rgba(201, 169, 98, 0.25);
}

.ml-level-node--top {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.ml-level-node--bottom {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.ml-row--withdrawn td {
    background: rgba(148, 163, 184, 0.08);
}

.ml-row--add td {
    background: linear-gradient(180deg, rgba(201, 169, 98, 0.08) 0%, rgba(201, 169, 98, 0.02) 100%);
    border-top: 2px solid rgba(201, 169, 98, 0.22);
}

.ml-input-name {
    width: 100%;
    max-width: 160px;
    min-width: 0;
    box-sizing: border-box;
}

.ml-input-rate {
    width: 72px;
    max-width: 100%;
    min-width: 0;
    text-align: center;
    box-sizing: border-box;
}

.ml-rate-field {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.ml-rate-suffix {
    color: var(--admin-muted, #6b7280);
    font-size: 13px;
}

.ml-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.ml-actions .charge-btn,
.ml-actions .ml-move-select {
    flex: 0 0 auto;
}

.ml-move-select {
    min-width: 92px;
    max-width: 120px;
    height: 30px;
}

.ml-member-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.ml-member-link:hover {
    text-decoration: underline;
}

.ml-add-pos {
    white-space: nowrap;
}

.ml-add-pos-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 8px;
    font-weight: 600;
    color: #5c4a1e;
}

.member-levels-table input[readonly] {
    background: var(--admin-surface-2, #f3f4f6);
    color: var(--admin-muted, #6b7280);
}




.mgmt-section-nav-item {
    cursor: pointer;
    font: inherit;
}

.mgmt-section-nav-item:focus-visible {
    outline: 2px solid rgba(201, 169, 98, 0.55);
    outline-offset: 2px;
}

.mgmt-panel-icon--emerald {
    color: #059669;
}

.settings-sub-block--level-icons .settings-sub-head {
    background: linear-gradient(90deg, rgba(5, 150, 105, 0.16) 0%, rgba(5, 150, 105, 0.06) 100%);
    border-bottom-color: rgba(5, 150, 105, 0.22);
}

.settings-sub-block--level-icons {
    background: rgba(5, 150, 105, 0.04);
    border-color: rgba(5, 150, 105, 0.18);
}

.settings-sub-icon--level {
    color: #059669;
}

.settings-level-icon-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.settings-level-icon-toolbar {
    display: flex;
    justify-content: flex-end;
}

.settings-level-icon-list {
    margin-top: 0;
}

.settings-level-icon-left {
    gap: 8px;
    flex-wrap: wrap;
}

.settings-level-icon-preview {
    display: inline-block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--admin-border);
    background: #fff;
    flex-shrink: 0;
}

.settings-level-icon-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px dashed var(--admin-border);
    color: var(--admin-muted);
    font-size: 12px;
    flex-shrink: 0;
}

.settings-level-icon-label {
    display: inline-flex;
    align-items: center;
    min-width: 34px;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.settings-level-icon-file {
    font-size: 11px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-level-icon-actions {
    flex-wrap: wrap;
}

.settings-level-icon-item .settings-sound-item-label {
    font-weight: 600;
}

@media (max-width: 900px) {
    .settings-level-icon-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

button.mgmt-section-nav-item {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

.settings-level-icon-file {
    max-width: min(420px, 52vw);
}

/* 회원별매출 */

.member-sales-table td.num.mem-col-data,
.member-sales-table th.mem-col-data {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0;
    vertical-align: middle;
}

.member-sales-table td.num.mem-col-data strong {
    font-family: inherit;
    font-weight: 600;
    font-variant-numeric: inherit;
}

.member-sales-table td.num.mem-col-data .members-unit {
    font-family: inherit;
    font-weight: 400;
    color: var(--admin-muted);
    font-size: 13px;
    margin-left: 1px;
}

.admin-main:has(.member-sales-page) {
    overflow: auto;
}

.member-sales-table .sales-charge strong {
    color: #e74c3c;
}

.member-sales-table .sales-exchange strong {
    color: #3366cc;
}

.member-sales-table .sales-profit-plus strong {
    color: #2ecc71;
}

.member-sales-table .sales-profit-minus strong {
    color: #e74c3c;
}

.member-sales-table .sales-profit-zero strong {
    color: var(--admin-muted, #9aa3b2);
}

[data-theme="light"] .member-sales-table .sales-profit-plus strong {
    color: #1e8449;
}

[data-theme="light"] .member-sales-table .sales-profit-minus strong {
    color: #c0392b;
}

/* ── 관리자설정 (super admins) ── */
.admin-main:has(.super-admins-page) {
    overflow: auto;
}

.super-admins-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.super-admins-page .charge-panel--history {
    flex: 1;
    min-height: 0;
}

.super-admins-summary-bar {
    margin: 0;
    border-bottom: 1px solid var(--admin-border);
}

.super-admins-filters {
    flex-wrap: wrap;
    max-width: 100%;
}

.super-admins-search-panel {
    margin: 0;
    padding: 12px 14px;
    background: var(--admin-surface-2);
    border-bottom: 1px solid var(--admin-border);
}

.super-admins-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.super-admins-search-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.super-admins-no-access {
    text-align: center;
    padding: 48px 24px;
    color: var(--admin-muted);
    border-bottom: 1px solid var(--admin-border);
}

.super-admins-no-access i {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.55;
    color: var(--login-gold, #c9a962);
}

.super-admins-table-wrap {
    overflow-x: auto;
}

.super-admins-table {
    min-width: 1100px;
    font-size: 14px;
}

.super-admins-table thead tr {
    background: #252017;
}

.super-admins-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #252017;
    color: #f0e6c8;
    font-weight: 800;
    font-size: 15px;
    padding: 10px 8px;
    border-bottom: 2px solid rgba(201, 169, 98, 0.45);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .super-admins-table thead tr,
[data-theme="light"] .super-admins-table thead th {
    background: #ede4d0;
    color: #5c4a1e;
    border-bottom-color: rgba(154, 123, 60, 0.35);
    box-shadow: 0 1px 0 rgba(154, 123, 60, 0.12);
}

.super-admins-table tbody tr:nth-child(even) td {
    background: rgba(201, 169, 98, 0.06);
}

[data-theme="dark"] .super-admins-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
}

.super-admins-table tbody tr:hover td {
    background: rgba(201, 169, 98, 0.12);
}

[data-theme="dark"] .super-admins-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.06);
}

.super-admins-table .col-num {
    width: 52px;
    text-align: center;
}

.super-admins-table .col-actions {
    width: 72px;
    text-align: center;
}

.super-admins-type-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.super-admins-type-row .charge-select {
    min-width: 140px;
}

.super-admins-pagination {
    padding: 10px 8px;
    border-top: 1px solid var(--admin-border);
    justify-content: center;
}

.super-admins-modal .events-modal-foot-spacer {
    flex: 1;
}


/* ── 총판관리 (agencies) ── */
.admin-main:has(.agencies-page) {
    overflow: auto;
}

.agencies-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agencies-page .charge-panel--history {
    flex: 1;
    min-height: 0;
}

.agencies-summary-bar {
    margin: 0;
    border-bottom: 1px solid var(--admin-border);
}

.agencies-filters {
    flex-wrap: wrap;
    gap: 6px;
}

.agencies-company-tabs {
    flex-wrap: wrap;
}

.agencies-online-link {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

.agencies-online-link:hover strong {
    text-decoration: underline;
}

.agencies-search-panel {
    margin: 0;
    padding: 12px 14px;
    background: var(--admin-surface-2);
    border-bottom: 1px solid var(--admin-border);
}

.agencies-search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agencies-search-row {
    display: grid;
    gap: 12px;
    align-items: end;
    width: 100%;
}

.agencies-search-row--keyword {
    grid-template-columns: minmax(140px, 1fr) minmax(96px, 0.55fr) minmax(220px, 2fr) minmax(180px, 1.4fr);
}

.agencies-search-row--dates {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agencies-search-row .events-field {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.agencies-search-row .events-field--grow {
    min-width: 0;
}

.agencies-search-row .charge-input,
.agencies-search-row .charge-select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.agencies-search-row .charge-input {
    min-width: 120px;
}

@media (max-width: 960px) {
    .agencies-search-row--keyword {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .agencies-search-row--dates {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .agencies-search-row--keyword,
    .agencies-search-row--dates {
        grid-template-columns: 1fr;
    }
}

.agencies-search-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.agencies-footer-bar {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.agencies-footer-bar .agencies-pagination {
    grid-column: 2;
    justify-self: center;
    padding: 0;
    border-top: none;
}

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

.agencies-table {
    min-width: 1280px;
}

.agencies-table thead .charge-th-sort {
    white-space: nowrap;
}

.agencies-table thead .charge-th-label {
    display: inline-block;
    vertical-align: middle;
}

.agencies-table thead .charge-sort-btn.is-active {
    opacity: 1;
    color: var(--login-gold, #c9a962);
}


.agencies-table .ag-col-data {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    font-size: 13px;
    line-height: 1.35;
    letter-spacing: 0;
    vertical-align: middle;
}

.agencies-table th.ag-col-data {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.agencies-table .ag-col-data strong {
    font-family: inherit;
    font-weight: 600;
    font-variant-numeric: inherit;
}

.agencies-table td.ag-col-data.agencies-meta {
    font-size: 13px;
    color: var(--admin-text);
}

.agencies-table .agencies-unit {
    font-family: inherit;
    font-weight: 400;
    font-size: 12px;
    color: var(--admin-muted);
    margin-left: 1px;
}

.agencies-online {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.35;
    vertical-align: middle;
    font-family: inherit;
    font-variant-numeric: inherit;
}

.agencies-table .col-money {
    text-align: right;
    white-space: nowrap;
}

.agencies-money strong { color: #e74c3c; }
.agencies-cash strong { color: #3366cc; }
.agencies-profit strong { color: #e74c3c; }

.agencies-online--on {
    color: #2ecc71;
}

.agencies-online--on .bi-circle-fill {
    font-size: 0.55rem;
    vertical-align: middle;
}

.agencies-meta {
    font-size: 0.82rem;
    color: var(--admin-muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}


.agencies-register-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.agencies-tel-row {
    display: flex;
    gap: 6px;
}

.agencies-tel-row .charge-input {
    flex: 1;
    min-width: 0;
}

.agencies-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.agencies-check-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
}

[data-theme="light"] .agencies-money strong { color: #c0392b; }
[data-theme="light"] .agencies-cash strong { color: #2563eb; }


/* ── 지급 모달 (회원관리 · 총판관리 공통) ── */
.member-modal--grant {
    padding: 24px;
}

.member-modal--grant .member-modal-backdrop {
    background: rgba(8, 12, 22, 0.72);
    backdrop-filter: blur(6px);
}

.member-modal-card--grant {
    width: min(560px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(201, 169, 98, 0.28);
    background: linear-gradient(165deg, var(--admin-card) 0%, rgba(20, 26, 38, 0.98) 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 64px rgba(0, 0, 0, 0.45),
        0 0 48px rgba(201, 169, 98, 0.08);
    animation: memberGrantModalIn 0.28s ease-out;
}

[data-theme="light"] .member-modal-card--grant {
    background: linear-gradient(165deg, #ffffff 0%, #f8f6f1 100%);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04) inset,
        0 24px 56px rgba(15, 23, 42, 0.14),
        0 0 40px rgba(201, 169, 98, 0.12);
}

.member-modal-card--grant.is-cash {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 24px 64px rgba(0, 0, 0, 0.45),
        0 0 48px rgba(139, 92, 246, 0.12);
}

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

.member-modal-head--grant {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(201, 169, 98, 0.18);
    background: linear-gradient(135deg, rgba(201, 169, 98, 0.14) 0%, rgba(201, 169, 98, 0.04) 55%, transparent 100%);
}

.member-modal-card--grant.is-cash .member-modal-head--grant {
    border-bottom-color: rgba(139, 92, 246, 0.2);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.14) 0%, rgba(99, 102, 241, 0.05) 55%, transparent 100%);
}

.member-modal-head-main {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.member-grant-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.25rem;
    color: var(--login-gold, #c9a962);
    background: linear-gradient(145deg, rgba(201, 169, 98, 0.22), rgba(201, 169, 98, 0.06));
    box-shadow: 0 4px 14px rgba(201, 169, 98, 0.18);
}

.member-modal-card--grant.is-cash .member-grant-icon {
    color: #a78bfa;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.22), rgba(99, 102, 241, 0.08));
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.2);
}

.member-modal-head--grant .member-modal-title {
    font-size: 1.08rem;
    letter-spacing: -0.02em;
}

.member-modal-sub {
    margin: 4px 0 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--admin-muted);
}

.member-modal-body--grant {
    padding: 20px;
    gap: 16px;
}

.member-grant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 520px) {
    .member-grant-grid {
        grid-template-columns: 1fr;
    }
}

.member-grant-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.member-grant-field--comment {
    margin-top: 2px;
}

.member-grant-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--admin-muted);
}

.member-grant-label i {
    font-size: 0.95rem;
    opacity: 0.85;
}

.member-grant-select,
.member-grant-input {
    width: 100%;
}

.member-grant-input {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.member-grant-textarea {
    width: 100%;
    min-height: 148px;
    padding: 14px 16px;
    line-height: 1.55;
    font-size: 14px;
    resize: vertical;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    background: rgba(0, 0, 0, 0.12);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="light"] .member-grant-textarea {
    background: rgba(255, 255, 255, 0.92);
}

.member-grant-textarea:focus {
    outline: none;
    border-color: rgba(201, 169, 98, 0.55);
    box-shadow: 0 0 0 3px rgba(201, 169, 98, 0.14);
}

.member-modal-card--grant.is-cash .member-grant-textarea:focus {
    border-color: rgba(139, 92, 246, 0.55);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.member-modal-foot--grant {
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--admin-border);
}

.member-grant-submit {
    min-width: 148px;
    box-shadow: 0 4px 16px rgba(201, 169, 98, 0.22);
}

.member-modal-card--grant.is-cash .member-grant-submit {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.28);
}

/* 추천한 사람 — 줄바꿈·스크롤 (회원정보 팝업) */
.admin-window-body,
.mi-page,
.mi-main,
.mi-section-body,
.mi-info-form {
    max-width: 100%;
    overflow-x: hidden;
}

.mi-info-form .mi-form-table.charge-table {
    table-layout: auto !important;
    width: 100% !important;
}

.mi-info-form .mi-form-table.charge-table col.mi-col-label {
    width: 1%;
}

.mi-info-form .mi-form-table.charge-table col.mi-col-data {
    width: auto;
}

/* 라벨(th) — 내용 너비만 (width:1% + nowrap) */
.mi-info-form .mi-form-table.charge-table > tbody > tr > th {
    width: 1% !important;
    max-width: none !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    padding: 2px 8px 2px 4px !important;
    box-sizing: border-box;
}

.mi-info-form .mi-form-table.charge-table > tbody > tr > td {
    width: auto !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.mi-info-form .mi-form-table.charge-table th {
    white-space: nowrap !important;
}

.mi-info-form .mi-form-table.charge-table td {
    white-space: normal !important;
}

.mi-info-form .mi-form-table.charge-table .mi-referred-cell {
    width: auto !important;
    max-width: none !important;
    white-space: normal !important;
    word-break: break-word;
    vertical-align: top !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}

.mi-info-form .mi-stats-table {
    table-layout: auto !important;
}

.mi-info-form .mi-stats-table th {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    white-space: nowrap;
}

.mi-referred-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.mi-referred-count {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: #5c4a1e;
    background: rgba(201, 169, 98, 0.16);
    border: 1px solid rgba(201, 169, 98, 0.28);
}

.mi-referred-list {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 4px 6px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 120px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px 0;
    box-sizing: border-box;
}

.mi-ref-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    max-width: 100%;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(37, 99, 235, 0.07);
    border: 1px solid rgba(37, 99, 235, 0.14);
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
}

.mi-ref-chip:hover,
.mi-ref-chip:focus-visible {
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(37, 99, 235, 0.28);
}

.mi-ref-chip .mi-ref-nic {
    color: var(--admin-muted, #6b7280);
    font-weight: 500;
}

html[data-theme="dark"] .mi-ref-chip {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.22);
}

html[data-theme="dark"] .mi-referred-count {
    color: rgba(240, 230, 200, 0.92);
    background: rgba(201, 169, 98, 0.12);
}

/* ── IP차단관리 (login_blocks) ── */
.login-blocks-page .lb-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.login-blocks-page .lb-summary-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--admin-surface-2, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--admin-border, rgba(255, 255, 255, 0.08));
}

.login-blocks-page .lb-summary-card--danger {
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.06);
}

.login-blocks-page .lb-summary-card--warn {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.06);
}

.login-blocks-page .lb-summary-label {
    font-size: 12px;
    color: var(--admin-muted, #9ca3af);
    font-weight: 600;
}

.login-blocks-page .lb-summary-value {
    font-size: 28px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.login-blocks-page .lb-summary-hint {
    font-size: 11px;
    color: var(--admin-muted, #9ca3af);
}

.login-blocks-page .lb-limit-note {
    margin: 0 0 16px;
    font-size: 12px;
    color: var(--admin-muted, #9ca3af);
}

.login-blocks-page .lb-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0 16px 16px;
}

.login-blocks-page .lb-quick-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-blocks-page .lb-quick-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--admin-muted, #9ca3af);
}

.login-blocks-page .lb-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.login-blocks-page .lb-quick-row .charge-input {
    flex: 1 1 180px;
    min-width: 0;
}

.login-blocks-page .lb-lookup-result {
    margin: 0 16px 16px;
}

.login-blocks-page .lb-lookup-card {
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--admin-surface-2, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--admin-border, rgba(255, 255, 255, 0.1));
}

.login-blocks-page .lb-lookup-card--error {
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.login-blocks-page .lb-lookup-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 15px;
}

.login-blocks-page .lb-lookup-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
    font-size: 13px;
}

.login-blocks-page .lb-lookup-issues,
.login-blocks-page .lb-lookup-sub,
.login-blocks-page .lb-lookup-ok {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.5;
}

.login-blocks-page .lb-lookup-issues ul,
.login-blocks-page .lb-lookup-sub ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.login-blocks-page .lb-lookup-ok {
    color: #34d399;
}

.login-blocks-page .lb-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
}

.login-blocks-page .lb-badge--blocked {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.login-blocks-page .lb-badge--warn {
    color: #b45309;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.login-blocks-page .lb-badge--ok {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.32);
}

html[data-theme="dark"] .login-blocks-page .lb-badge--blocked {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.22);
}

html[data-theme="dark"] .login-blocks-page .lb-badge--warn {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.22);
}

html[data-theme="dark"] .login-blocks-page .lb-badge--ok {
    color: #6ee7b7;
    background: rgba(16, 185, 129, 0.2);
}

.login-blocks-page tr.lb-row-blocked td {
    background: rgba(239, 68, 68, 0.04);
}

.login-blocks-page tr.lb-row-warn td {
    background: rgba(245, 158, 11, 0.04);
}

.login-blocks-page .lb-danger-panel .mgmt-panel-text {
    margin: 0 16px 12px;
    font-size: 13px;
    color: var(--admin-muted, #9ca3af);
    line-height: 1.5;
}

.login-blocks-page .lb-danger-panel .charge-btn--danger {
    margin: 0 16px 16px;
}

@media (max-width: 1100px) {
    .login-blocks-page .lb-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .login-blocks-page .lb-summary,
    .login-blocks-page .lb-quick-grid {
        grid-template-columns: 1fr;
    }
}

.admin-main:has(.login-blocks-page) {
    overflow: auto;
}

.login-blocks-page .lb-list-panel.charge-panel--history {
    flex: 0 0 auto;
    min-height: auto;
    margin-bottom: 8px;
}

.login-blocks-page .lb-ip-panel .charge-table-wrap {
    min-height: calc(2.15rem * 11);
    max-height: none;
    overflow: auto;
}

.login-blocks-page .lb-recent-panel .charge-table-wrap {
    min-height: auto;
    max-height: none;
    overflow: auto;
}

.newup-alert-audio-wrap {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}


/* Registered games */
.admin-main:has(.registered-games-page) {
    overflow: hidden;
}

.registered-games-page .registered-games-head-meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--admin-muted);
    white-space: nowrap;
}

.registered-games-page .registered-games-panel-head {
    --rg-bar-control-h: 34px;
    display: block;
}

.registered-games-page .registered-games-panel-head .registered-games-tabs-block {
    width: 100%;
    min-width: 0;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.registered-games-page .registered-games-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    width: 100%;
}

.registered-games-page .registered-games-panel-head .registered-games-sport-tabs {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0;
}

.registered-games-page .registered-games-panel-head .registered-games-filters {
    flex: 0 0 auto;
    margin-left: 0;
    align-self: center;
}

.registered-games-page .registered-games-mini-tabs {
    width: 100%;
}

.registered-games-type-bar {
    --rg-bar-control-h: 34px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}

.registered-games-type-bar-left #registered_games_toggle_btn {
    box-sizing: border-box;
    height: var(--rg-bar-control-h);
    min-height: var(--rg-bar-control-h);
    max-height: var(--rg-bar-control-h);
    padding: 0 12px;
    line-height: 1;
    flex-shrink: 0;
}

.registered-games-type-bar-left .rg-bulk-btn {
    box-sizing: border-box;
    height: var(--rg-bar-control-h);
    min-height: var(--rg-bar-control-h);
    max-height: var(--rg-bar-control-h);
    padding: 0 12px;
    line-height: 1;
    flex-shrink: 0;
    font-weight: 700;
    border-width: 1px;
    border-style: solid;
}

.registered-games-type-bar-left .rg-bulk-btn.is-busy {
    opacity: 0.65;
    cursor: wait;
}

.registered-games-type-bar-left .rg-bulk-btn--waiting {
    color: #92400e;
    background: #fef3c7;
    border-color: #f59e0b;
}

.registered-games-type-bar-left .rg-bulk-btn--waiting:hover:not(:disabled) {
    background: #fde68a;
    border-color: #d97706;
}

.registered-games-type-bar-left .rg-bulk-btn--exception {
    color: #1e40af;
    background: #dbeafe;
    border-color: #3b82f6;
}

.registered-games-type-bar-left .rg-bulk-btn--exception:hover:not(:disabled) {
    background: #bfdbfe;
    border-color: #2563eb;
}

.registered-games-type-bar-left .rg-bulk-btn--delete {
    color: #991b1b;
    background: #fee2e2;
    border-color: #ef4444;
}

.registered-games-type-bar-left .rg-bulk-btn--delete:hover:not(:disabled) {
    background: #fecaca;
    border-color: #dc2626;
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--waiting {
    color: #fcd34d;
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.45);
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--waiting:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.24);
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--exception {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.45);
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--exception:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.24);
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--delete {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.45);
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--delete:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.24);
}

.registered-games-type-bar-left .rg-bulk-btn--toggle {
    color: #5b21b6;
    background: #ede9fe;
    border-color: #8b5cf6;
}

.registered-games-type-bar-left .rg-bulk-btn--toggle:hover:not(:disabled) {
    background: #ddd6fe;
    border-color: #7c3aed;
}

.registered-games-type-bar-left .rg-bulk-btn--register,
.registered-games-type-bar-left .rg-bulk-btn--save {
    color: #166534;
    background: #dcfce7;
    border-color: #22c55e;
}

.registered-games-type-bar-left .rg-bulk-btn--register:hover:not(:disabled),
.registered-games-type-bar-left .rg-bulk-btn--save:hover:not(:disabled) {
    background: #bbf7d0;
    border-color: #16a34a;
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--toggle {
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.16);
    border-color: rgba(139, 92, 246, 0.45);
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--toggle:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.24);
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--register,
html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--save {
    color: #86efac;
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.45);
}

html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--register:hover:not(:disabled),
html[data-theme="dark"] .registered-games-type-bar-left .rg-bulk-btn--save:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.24);
}

.registered-games-status.is-waiting {
    color: #6b7280;
}

html[data-theme="dark"] .registered-games-status.is-waiting {
    color: #9ca3af;
}

.registered-games-table tbody tr[data-uid] {
    transition: opacity 0.28s ease, transform 0.28s ease, background-color 0.28s ease;
}

.registered-games-table tbody tr[data-uid].rg-row-removing {
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

.registered-games-table tbody tr[data-uid].rg-row-registering {
    background: rgba(34, 197, 94, 0.14);
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

html[data-theme="dark"] .registered-games-table tbody tr[data-uid].rg-row-registering {
    background: rgba(34, 197, 94, 0.18);
}

.registered-games-table tbody tr[data-uid].rg-row-waiting {
    background: rgba(245, 158, 11, 0.16);
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
}

html[data-theme="dark"] .registered-games-table tbody tr[data-uid].rg-row-waiting {
    background: rgba(245, 158, 11, 0.2);
}

.registered-games-table tbody tr[data-uid].rg-row-result-overdue {
    background: rgba(236, 72, 153, 0.14);
}

html[data-theme="dark"] .registered-games-table tbody tr[data-uid].rg-row-result-overdue {
    background: rgba(236, 72, 153, 0.22);
}

.registered-games-status.is-result-waiting {
    color: #7c3aed;
    font-weight: 700;
}

.registered-games-status.is-result-finished,
.registered-games-status.is-result-saved {
    color: #16a34a;
    font-weight: 700;
}

.registered-games-status.is-result-exception {
    color: #6b7280;
    font-weight: 700;
}

html[data-theme="dark"] .registered-games-status.is-result-exception {
    color: #9ca3af;
}

.result-waiting-games-page.rw-action-busy .registered-games-type-bar-left .rg-bulk-btn,
.result-waiting-games-page.rw-action-busy #result_waiting_games_toggle_btn,
.result-waiting-games-page.rw-action-busy #result_waiting_games_refresh_btn {
    pointer-events: none;
    opacity: 0.65;
}

.rw-action-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(245, 246, 248, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

html[data-theme="dark"] .rw-action-overlay {
    background: rgba(15, 23, 42, 0.82);
}

.rw-action-overlay[hidden] {
    display: none !important;
}

.rw-action-overlay-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 220px;
    padding: 22px 26px;
    border-radius: 16px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.rw-action-overlay-text {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--admin-text, #111827);
    text-align: center;
}

#result_waiting_games_page {
    position: relative;
}

#result_done_games_page {
    position: relative;
}

.result-done-games-page .registered-games-table tbody tr[data-uid] > td {
    padding-top: 7px;
    padding-bottom: 7px;
}

.result-done-games-page .registered-games-table tbody tr[data-uid] > td.is-winner-cell {
    background: rgba(250, 204, 21, 0.42);
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.45);
}

html[data-theme="dark"] .result-done-games-page .registered-games-table tbody tr[data-uid] > td.is-winner-cell {
    background: rgba(250, 204, 21, 0.24);
}

.result-done-games-page .rw-result-cell--readonly {
    gap: 6px;
}

.result-done-games-page .rd-result-score {
    min-width: 28px;
    font-weight: 700;
    color: #dc2626;
    text-align: center;
}

.result-done-games-page .rd-result-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    color: #334155;
    background: rgba(148, 163, 184, 0.2);
    white-space: nowrap;
}

.result-done-games-page .rg-col-result-time {
    width: 108px;
    min-width: 108px;
    text-align: center;
    font-size: 0.68rem;
}

.result-done-games-page .rg-time-text,
.result-done-games-page .rd-result-entered-at {
    font-size: 0.68rem;
    color: var(--admin-text-muted, #6b7280);
}

.registered-games-table tbody tr[data-uid].rg-row-saving {
    background: rgba(59, 130, 246, 0.12);
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.28);
}

html[data-theme="dark"] .registered-games-table tbody tr[data-uid].rg-row-saving {
    background: rgba(59, 130, 246, 0.18);
}

.registered-games-table tbody tr[data-uid].rg-row-saved {
    background: rgba(34, 197, 94, 0.18);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.42);
    transform: none;
    opacity: 1;
}

#result_waiting_games_page .registered-games-table tbody tr[data-uid].rg-row-saved > td {
    background: rgba(34, 197, 94, 0.14);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.22);
}

html[data-theme="dark"] .registered-games-table tbody tr[data-uid].rg-row-saved {
    background: rgba(34, 197, 94, 0.24);
}

html[data-theme="dark"] #result_waiting_games_page .registered-games-table tbody tr[data-uid].rg-row-saved > td {
    background: rgba(34, 197, 94, 0.2);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.28);
}

.registered-games-type-bar-left .rg-bulk-btn--save.is-busy {
    position: relative;
    color: transparent;
}

.registered-games-type-bar-left .rg-bulk-btn--save.is-busy::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: admin-spin 0.75s linear infinite;
}

.registered-games-table .rg-col-result {
    width: 1%;
    min-width: 0;
    max-width: max-content;
    padding: 2px 10px;
    text-align: left;
    white-space: nowrap;
}

#result_waiting_games_page .registered-games-table th.rg-bet-line,
#result_waiting_games_page .registered-games-table td.rg-bet-line {
    width: 84px;
    min-width: 84px;
    max-width: 96px;
}

#result_waiting_games_page .registered-games-table th.rg-bet-away,
#result_waiting_games_page .registered-games-table td.rg-bet-away {
    padding-right: 2px;
}

#result_waiting_games_page .registered-games-table th.rg-col-result {
    text-align: center;
}

#result_waiting_games_page .registered-games-table td.rg-col-result {
    width: 1%;
    padding-left: 10px;
    padding-right: 10px;
    text-align: left;
}

.rw-result-cell {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: max-content;
    max-width: 100%;
}

.rw-team-bulk-btn {
    flex: 0 0 auto;
    height: 26px;
    padding: 0 3px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid #93c5fd;
    border-radius: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    cursor: pointer;
}

.rw-team-bulk-btn:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.rw-team-bulk-btn:active {
    background: #bfdbfe;
}

.rw-score-input {
    width: 34px;
    min-width: 34px;
    flex: 0 0 34px;
    padding: 4px 1px;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid var(--admin-border, #d1d5db);
    border-radius: 6px;
    background: var(--admin-surface, #fff);
    color: var(--admin-text, #111827);
}

.rw-score-input--filled,
.rw-score-input:not(:placeholder-shown) {
    color: #dc2626;
}

.rw-score-input.is-disabled,
.rw-score-input:disabled {
    opacity: 0.55;
    background: #f3f4f6;
}

.rw-score-sep {
    flex: 0 0 auto;
    padding: 0 1px;
    font-weight: 700;
    color: var(--charge-muted, #6b7280);
}

.rw-result-select {
    min-width: 68px;
    width: 68px;
    flex: 0 0 68px;
    height: 30px;
    padding: 2px 2px;
    font-size: 11px;
}

.rw-time-input {
    width: 100%;
    min-width: 118px;
    padding: 4px 8px;
    font-size: 12px;
}

.rg-bet-odds--readonly {
    font-weight: 700;
    color: #dc2626;
}

#result_waiting_games_page .registered-games-table tbody td.rg-bet-home,
#result_waiting_games_page .registered-games-table tbody td.rg-bet-line,
#result_waiting_games_page .registered-games-table tbody td.rg-bet-away {
    vertical-align: middle;
}

#result_waiting_games_page .rg-bet-cell {
    align-items: center;
}

#result_waiting_games_page .rg-bet-odds-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 0 0 auto;
    min-width: 0;
}

#result_waiting_games_page .rg-bet-cell--home .rg-bet-odds-stack {
    align-items: flex-end;
}

#result_waiting_games_page .rg-bet-cell--away .rg-bet-odds-stack {
    align-items: flex-start;
}

#result_waiting_games_page .rg-bet-line-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

#result_waiting_games_page .rg-bet-line-stack .rg-bet-line-val {
    line-height: 1.2;
}

#result_waiting_games_page button.rw-bet-sum-badge,
#result_waiting_games_page .rw-bet-sum-badge.is-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 16px;
    padding: 1px 7px;
    margin: 0;
    border: 1px solid rgba(59, 130, 246, 0.24);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
}

#result_waiting_games_page button.rw-bet-sum-badge {
    cursor: pointer;
}

#result_waiting_games_page .rw-bet-sum-badge.is-empty {
    visibility: hidden;
    pointer-events: none;
    border-color: transparent;
    background: transparent;
}

#result_waiting_games_page .rw-bet-sum-badge__ghost {
    display: inline-block;
}

#result_waiting_games_page button.rw-bet-sum-badge.is-high {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

#result_waiting_games_page button.rw-bet-sum-badge.is-clickable:hover,
#result_waiting_games_page button.rw-bet-sum-badge.is-clickable:focus-visible {
    filter: brightness(0.96);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.14);
}

#result_waiting_games_page button.rw-bet-sum-badge.is-high.is-clickable:hover,
#result_waiting_games_page button.rw-bet-sum-badge.is-high.is-clickable:focus-visible {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}

html[data-theme="dark"] #result_waiting_games_page button.rw-bet-sum-badge {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.28);
    color: #93c5fd;
}

html[data-theme="dark"] #result_waiting_games_page button.rw-bet-sum-badge.is-high {
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(248, 113, 113, 0.32);
    color: #fca5a5;
}

.rw-bet-sum {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    color: #1d4ed8;
    line-height: 1.2;
}

.rw-bet-sum.is-high {
    color: #dc2626;
    font-weight: 700;
}

button.rw-bet-sum {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    text-align: inherit;
}

button.rw-bet-sum.is-clickable:hover,
button.rw-bet-sum.is-clickable:focus-visible {
    text-decoration: underline;
    outline: none;
}

.admin-window-page.gbl-page {
    padding: 16px 18px 24px;
    min-width: 920px;
}

.gbl-head {
    margin-bottom: 16px;
}

.gbl-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.gbl-meta {
    margin: 0;
    color: var(--charge-muted, #6b7280);
    font-size: 13px;
}

.gbl-empty {
    padding: 28px 12px;
    text-align: center;
    color: var(--charge-muted, #6b7280);
    border: 1px dashed var(--admin-border, #d1d5db);
    border-radius: 10px;
}

.gbl-cart {
    margin-bottom: 18px;
    border: 1px solid var(--admin-border, #d1d5db);
    border-radius: 10px;
    overflow: hidden;
    background: var(--admin-surface, #fff);
}

.gbl-cart-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 14px;
    background: rgba(135, 97, 14, 0.92);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.gbl-member-link {
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.gbl-cart-nick,
.gbl-cart-oid,
.gbl-cart-mode {
    opacity: 0.95;
}

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

.gbl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.gbl-table th,
.gbl-table td {
    border-bottom: 1px solid var(--admin-border, #e5e7eb);
    padding: 8px 10px;
    vertical-align: middle;
}

.gbl-table thead th {
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.gbl-col-time {
    width: 12%;
    text-align: center;
    white-space: nowrap;
}

.gbl-col-home,
.gbl-col-away {
    width: 32%;
}

.gbl-col-line {
    width: 7%;
    text-align: center;
}

.gbl-col-score,
.gbl-col-result {
    width: 8%;
    text-align: center;
    white-space: nowrap;
}

.gbl-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.gbl-pick--away {
    flex-direction: row;
}

.gbl-team {
    min-width: 0;
    text-align: left;
}

.gbl-odds {
    font-weight: 700;
    color: #dc2626;
    white-space: nowrap;
}

.gbl-col-home.is-selected,
.gbl-col-line.is-selected,
.gbl-col-away.is-selected {
    background: rgba(250, 204, 21, 0.42);
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.45);
}

.gbl-tag {
    color: #6b7280;
    font-weight: 700;
}

.gbl-tag--over {
    color: #dc2626;
}

.gbl-tag--under {
    color: #1d4ed8;
}

.gbl-result.is-win {
    color: #16a34a;
    font-weight: 700;
}

.gbl-result.is-lose {
    color: #dc2626;
    font-weight: 700;
}

.gbl-result.is-void,
.gbl-result.is-pending {
    color: #6b7280;
    font-weight: 700;
}

.gbl-cart-foot,
.gbl-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 10px 14px;
    font-size: 12px;
    background: rgba(17, 24, 39, 0.04);
}

.gbl-summary {
    margin-top: 4px;
    border: 1px solid var(--admin-border, #d1d5db);
    border-radius: 10px;
    font-size: 13px;
}

.gbl-payout {
    color: #16a34a;
}

html[data-theme="dark"] .gbl-cart {
    background: var(--admin-surface, #111827);
}

html[data-theme="dark"] .gbl-cart-foot,
html[data-theme="dark"] .gbl-summary {
    background: rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .gbl-col-home.is-selected,
html[data-theme="dark"] .gbl-col-line.is-selected,
html[data-theme="dark"] .gbl-col-away.is-selected {
    background: rgba(250, 204, 21, 0.22);
}

.registered-games-table tbody tr.rg-list-loading-inline td {
    padding: 18px 12px;
    color: var(--charge-muted, #6b7280);
    font-size: 13px;
}

.registered-games-type-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.registered-games-sport-tabs {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding: 8px 0 2px;
    scrollbar-width: thin;
}

.registered-games-sport-tabs::-webkit-scrollbar {
    height: 4px;
}

.rg-sport-tab {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    height: var(--rg-bar-control-h, 34px);
    min-height: var(--rg-bar-control-h, 34px);
    max-height: var(--rg-bar-control-h, 34px);
    padding: 0 8px 0 10px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: var(--admin-surface);
    color: var(--admin-text);
    cursor: pointer;
    flex: 0 0 auto;
    line-height: 1;
    white-space: nowrap;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.rg-sport-tab:hover {
    border-color: color-mix(in srgb, var(--login-gold, #c9a962) 35%, var(--admin-border));
    background: color-mix(in srgb, var(--login-gold-soft) 55%, var(--admin-surface));
}

.rg-sport-tab.is-active {
    background: var(--login-gold-soft);
    border-color: rgba(201, 169, 98, 0.45);
    box-shadow: inset 0 0 0 1px rgba(201, 169, 98, 0.18);
}

.rg-sport-tab-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.rg-sport-tab-icon--all,
.rg-sport-tab-icon--ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--admin-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.rg-sport-tab.is-active .rg-sport-tab-icon--all,
.rg-sport-tab.is-active .rg-sport-tab-icon--ph {
    color: var(--login-gold, #c9a962);
}

.rg-mini-mode-tab.is-open {
    border-color: rgba(201, 169, 98, 0.55);
    box-shadow: inset 0 0 0 1px rgba(201, 169, 98, 0.2);
}

.registered-games-mini-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 2px 0 4px;
}

.registered-games-mini-tabs[hidden] {
    display: none !important;
}

.rg-mini-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    height: 30px;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.rg-mini-tab-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
}

.rg-mini-tab-icon img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 5px;
}

.rg-mini-tab-icon-ph {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: color-mix(in srgb, var(--admin-border) 55%, transparent);
    flex-shrink: 0;
}

.rg-mini-tab-label {
    flex-shrink: 0;
}

.rg-mini-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 18px;
    height: 16px;
    margin-left: 2px;
    padding: 0 5px;
    border-radius: 999px;
    border: 0;
    background: color-mix(in srgb, var(--login-gold, #c9a962) 22%, var(--admin-surface));
    color: color-mix(in srgb, var(--login-gold, #c9a962) 55%, #6b5a2e);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    pointer-events: none;
}

.rg-mini-tab.is-active .rg-mini-tab-badge {
    background: color-mix(in srgb, var(--login-gold, #c9a962) 35%, #fff);
    color: #6b5318;
}

.rg-mini-tab-badge.is-zero {
    background: color-mix(in srgb, var(--admin-border) 70%, transparent);
    color: var(--admin-muted);
}

.rg-mini-tab-badge[hidden] {
    display: none !important;
}

.rg-mini-settings-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    min-height: 30px;
    border: 1px solid color-mix(in srgb, #d64545 45%, var(--admin-border));
    border-radius: 8px;
    background: color-mix(in srgb, #d64545 12%, var(--admin-surface));
    color: #d64545;
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.rg-mini-settings-btn:hover {
    background: color-mix(in srgb, #d64545 22%, var(--admin-surface));
    border-color: #d64545;
    color: #c0392b;
}

.rg-mini-settings-btn i {
    font-size: 14px;
    line-height: 1;
}

.rg-mini-tab:hover {
    border-color: color-mix(in srgb, var(--login-gold, #c9a962) 35%, var(--admin-border));
    background: color-mix(in srgb, var(--login-gold-soft) 55%, var(--admin-surface));
}

.rg-mini-tab.is-active {
    background: var(--login-gold-soft);
    border-color: rgba(201, 169, 98, 0.45);
    box-shadow: inset 0 0 0 1px rgba(201, 169, 98, 0.18);
}

.rg-sport-tab-label {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
    flex-shrink: 0;
}

.rg-sport-tab-badge {
    flex-shrink: 0;
    min-width: auto;
    height: auto;
    margin-left: 1px;
    padding: 0;
    border-radius: 0;
    display: inline;
    align-items: unset;
    justify-content: unset;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    background: transparent;
    color: inherit;
    border: 0;
    box-shadow: none;
    pointer-events: none;
}

.rg-sport-tab.is-active .rg-sport-tab-badge {
    color: inherit;
}

.registered-games-type-tabs {
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    align-items: center;
    overflow: visible;
    padding-bottom: 0;
}

.registered-games-type-tabs .registered-games-type-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    height: var(--rg-bar-control-h, 34px);
    min-height: var(--rg-bar-control-h, 34px);
    max-height: var(--rg-bar-control-h, 34px);
    padding: 0 14px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.registered-games-type-tabs .registered-games-amount-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: var(--rg-bar-control-h, 34px);
    min-height: var(--rg-bar-control-h, 34px);
    max-height: var(--rg-bar-control-h, 34px);
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
}

.registered-games-type-tabs button.registered-games-amount-tab {
    gap: 6px;
    padding: 0 14px;
}

.registered-games-type-tabs div.registered-games-amount-tab {
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.registered-games-amount-tab-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 100%;
    margin: 0;
    padding: 0 8px 0 14px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.registered-games-amount-tab-check-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    margin: 0;
    padding: 0 12px 0 4px;
    cursor: pointer;
}

.registered-games-amount-tab-check {
    width: 14px;
    height: 14px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--login-gold, #c9a962);
    cursor: pointer;
}

.registered-games-type-tabs-divider {
    display: inline-block;
    width: 1px;
    height: 22px;
    margin: 0 2px;
    background: var(--admin-border, #d1d5db);
    flex-shrink: 0;
}

.registered-games-type-tabs .registered-games-amount-tab i {
    font-size: 1rem;
    line-height: 1;
    color: var(--admin-muted);
    transition: color 0.15s ease;
}

.registered-games-type-tabs .registered-games-amount-tab.is-active {
    background: var(--login-gold-soft);
    border-color: rgba(201, 169, 98, 0.45);
    color: var(--admin-text);
}

.registered-games-type-tabs .registered-games-amount-tab.is-active i {
    color: var(--login-gold, #c9a962);
}


.registered-games-type-tabs .registered-games-amount-tab.is-active i {
    color: var(--login-gold, #c9a962);
}

#registered_games_page.is-amount-include .registered-games-table tbody td.rg-bet-home,
#waiting_games_page.is-amount-include .registered-games-table tbody td.rg-bet-home,
#result_done_games_page.is-amount-include .registered-games-table tbody td.rg-bet-home,
#registered_games_page.is-amount-include .registered-games-table tbody td.rg-bet-line,
#waiting_games_page.is-amount-include .registered-games-table tbody td.rg-bet-line,
#result_done_games_page.is-amount-include .registered-games-table tbody td.rg-bet-line,
#registered_games_page.is-amount-include .registered-games-table tbody td.rg-bet-away,
#waiting_games_page.is-amount-include .registered-games-table tbody td.rg-bet-away,
#result_done_games_page.is-amount-include .registered-games-table tbody td.rg-bet-away {
    vertical-align: middle;
}

#registered_games_page.is-amount-include .rg-bet-cell,
#waiting_games_page.is-amount-include .rg-bet-cell,
#result_done_games_page.is-amount-include .rg-bet-cell {
    align-items: center;
}

#registered_games_page.is-amount-include .rg-bet-odds-stack,
#waiting_games_page.is-amount-include .rg-bet-odds-stack,
#result_done_games_page.is-amount-include .rg-bet-odds-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 0 0 auto;
    min-width: 0;
}

#registered_games_page.is-amount-include .rg-bet-odds-stack--home,
#waiting_games_page.is-amount-include .rg-bet-odds-stack--home,
#result_done_games_page.is-amount-include .rg-bet-odds-stack--home {
    align-items: flex-end;
}

#registered_games_page.is-amount-include .rg-bet-odds-stack--away,
#waiting_games_page.is-amount-include .rg-bet-odds-stack--away,
#result_done_games_page.is-amount-include .rg-bet-odds-stack--away {
    align-items: flex-start;
}

#registered_games_page.is-amount-include .rg-bet-line-stack,
#waiting_games_page.is-amount-include .rg-bet-line-stack,
#result_done_games_page.is-amount-include .rg-bet-line-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-width: 0;
}

#registered_games_page.is-amount-include .registered-games-table th.rg-bet-line,
#waiting_games_page.is-amount-include .registered-games-table th.rg-bet-line,
#result_done_games_page.is-amount-include .registered-games-table th.rg-bet-line,
#registered_games_page.is-amount-include .registered-games-table td.rg-bet-line,
#waiting_games_page.is-amount-include .registered-games-table td.rg-bet-line,
#result_done_games_page.is-amount-include .registered-games-table td.rg-bet-line {
    width: 84px;
    min-width: 84px;
    max-width: 96px;
}

#registered_games_page.is-amount-include button.rw-bet-sum-badge,
#waiting_games_page.is-amount-include button.rw-bet-sum-badge,
#result_done_games_page.is-amount-include button.rw-bet-sum-badge,
#registered_games_page.is-amount-include .rw-bet-sum-badge.is-empty,
#waiting_games_page.is-amount-include .rw-bet-sum-badge.is-empty,
#result_done_games_page.is-amount-include .rw-bet-sum-badge.is-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 16px;
    padding: 1px 7px;
    margin: 0;
    border: 1px solid rgba(59, 130, 246, 0.24);
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    font: inherit;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    text-align: center;
    box-sizing: border-box;
}

#registered_games_page.is-amount-include button.rw-bet-sum-badge,
#waiting_games_page.is-amount-include button.rw-bet-sum-badge,
#result_done_games_page.is-amount-include button.rw-bet-sum-badge {
    cursor: pointer;
}

#registered_games_page.is-amount-include button.rw-bet-sum-badge.is-high,
#waiting_games_page.is-amount-include button.rw-bet-sum-badge.is-high,
#result_done_games_page.is-amount-include button.rw-bet-sum-badge.is-high {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

#registered_games_page.is-amount-include button.rw-bet-sum-badge.is-clickable:hover,
#waiting_games_page.is-amount-include button.rw-bet-sum-badge.is-clickable:hover,
#result_done_games_page.is-amount-include button.rw-bet-sum-badge.is-clickable:hover,
#registered_games_page.is-amount-include button.rw-bet-sum-badge.is-clickable:focus-visible,
#waiting_games_page.is-amount-include button.rw-bet-sum-badge.is-clickable:focus-visible,
#result_done_games_page.is-amount-include button.rw-bet-sum-badge.is-clickable:focus-visible {
    filter: brightness(0.96);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.14);
}

#registered_games_page.is-amount-include button.rw-bet-sum-badge.is-high.is-clickable:hover,
#waiting_games_page.is-amount-include button.rw-bet-sum-badge.is-high.is-clickable:hover,
#result_done_games_page.is-amount-include button.rw-bet-sum-badge.is-high.is-clickable:hover,
#registered_games_page.is-amount-include button.rw-bet-sum-badge.is-high.is-clickable:focus-visible,
#waiting_games_page.is-amount-include button.rw-bet-sum-badge.is-high.is-clickable:focus-visible,
#result_done_games_page.is-amount-include button.rw-bet-sum-badge.is-high.is-clickable:focus-visible {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}

html[data-theme="dark"] #registered_games_page.is-amount-include button.rw-bet-sum-badge,
html[data-theme="dark"] #waiting_games_page.is-amount-include button.rw-bet-sum-badge,
html[data-theme="dark"] #result_done_games_page.is-amount-include button.rw-bet-sum-badge {
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(96, 165, 250, 0.28);
    color: #93c5fd;
}

html[data-theme="dark"] #registered_games_page.is-amount-include button.rw-bet-sum-badge.is-high,
html[data-theme="dark"] #waiting_games_page.is-amount-include button.rw-bet-sum-badge.is-high,
html[data-theme="dark"] #result_done_games_page.is-amount-include button.rw-bet-sum-badge.is-high {
    background: rgba(220, 38, 38, 0.18);
    border-color: rgba(248, 113, 113, 0.32);
    color: #fca5a5;
}

#registered_games_page.is-amount-include .rw-bet-sum-badge.is-empty,
#waiting_games_page.is-amount-include .rw-bet-sum-badge.is-empty,
#result_done_games_page.is-amount-include .rw-bet-sum-badge.is-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 16px;
    padding: 1px 7px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    visibility: hidden;
    pointer-events: none;
    box-sizing: border-box;
}

#registered_games_page.is-amount-include .rw-bet-sum-badge__ghost,
#waiting_games_page.is-amount-include .rw-bet-sum-badge__ghost,
#result_done_games_page.is-amount-include .rw-bet-sum-badge__ghost {
    display: inline-block;
}


.registered-games-ou-icon {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 14px;
    height: 14px;
    line-height: 1;
    font-size: 0.68rem;
    flex-shrink: 0;
}

.registered-games-type-tabs .registered-games-type-tab .registered-games-ou-icon i {
    font-size: 0.68rem;
    line-height: 0.85;
}

.registered-games-type-tabs .registered-games-type-tab i {
    font-size: 1rem;
    line-height: 1;
    color: var(--admin-muted);
    transition: color 0.15s ease;
}

.registered-games-type-tabs .registered-games-type-tab.is-active {
    background: var(--login-gold-soft);
    border-color: rgba(201, 169, 98, 0.45);
    color: var(--admin-text);
}

.registered-games-type-tabs .registered-games-type-tab.is-active i {
    color: var(--login-gold, #c9a962);
}

.registered-games-filters .registered-games-keyword {
    width: 180px;
    min-width: 140px;
    max-width: 220px;
}



.settings-sub-block--sport-icons .settings-sub-head {
    border-left: 3px solid #c9a962;
}

.settings-sub-block--sport-icons {
    margin-bottom: 0;
}

.settings-sport-icon-add-form {
    margin-bottom: 14px;
}

.settings-sport-icon-add-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.settings-sport-icon-add-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: .78rem;
    color: var(--admin-muted);
}

.settings-sport-icon-add-field .charge-input {
    width: 120px;
    min-width: 88px;
}

.rg-col-sport {
    width: 40px;
    max-width: 40px;
    text-align: center;
}

.rg-sport-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
}

.registered-games-table tbody tr[data-uid] {
    font-size: 14px;
}
.registered-games-table tbody tr[data-uid] > td {
    border-right: 1px solid var(--admin-border);
}

.registered-games-table tbody tr[data-uid] > td:last-child {
    border-right: none;
}


.registered-games-table tbody tr[data-uid] .rg-col-time {
    font-family: inherit;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.registered-games-table tbody tr[data-uid] .registered-games-status,
.registered-games-table tbody tr[data-uid] .registered-games-info-pill {
    font-size: 12px;
}

.registered-games-table {
    width: 100%;
    min-width: 980px;
    font-size: 13px;
    table-layout: auto;
}

.registered-games-page .registered-games-table th,
.registered-games-page .registered-games-table td {
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.registered-games-table td.left { text-align: left; }
.registered-games-table td.num { font-variant-numeric: tabular-nums; }
.registered-games-page .registered-games-toggle-btn.is-active,
#registered_games_toggle_btn.is-active {
    background: var(--login-gold-soft);
    border-color: rgba(201, 169, 98, 0.45);
}

.registered-games-table .rg-col-status {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding-left: 1px;
    padding-right: 1px;
}

.registered-games-table .rg-col-info {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    padding-left: 1px;
    padding-right: 1px;
}

.registered-games-table .rg-col-time {
    width: 78px;
    min-width: 78px;
    max-width: 78px;
    padding-left: 1px;
    padding-right: 1px;
    font-family: inherit;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.registered-games-table thead th.rg-col-time.charge-th-sort {
    min-width: 78px;
    white-space: nowrap;
}

.registered-games-table .col-check {
    width: 24px;
    min-width: 24px;
    max-width: 24px;
    padding-left: 2px;
    padding-right: 2px;
    text-align: center;
}

.registered-games-table .col-check .charge-check {
    margin: 0;
}

.registered-games-table td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.registered-games-info-pill { display: inline-block; padding: 0; font-size: .68rem; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.registered-games-pill { display: inline-block; border: 1px solid var(--admin-border); border-radius: 999px; padding: 2px 8px; font-size: .75rem; }
.registered-games-status { display: inline-flex; align-items: center; justify-content: center; min-width: 0; padding: 0; color: #16a34a; font-weight: 700; font-size: .68rem; }

.registered-games-table th.rg-bet-home,
.registered-games-table td.rg-bet-home {
    width: 148px;
    max-width: 148px;
}

.registered-games-table th.rg-bet-line,
.registered-games-table td.rg-bet-line {
    width: 52px;
    max-width: 52px;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
}

.registered-games-table th.rg-bet-away,
.registered-games-table td.rg-bet-away {
    width: 148px;
    max-width: 148px;
}

.registered-games-table .rg-col-status {
    white-space: nowrap;
}

.registered-games-table .rg-col-actions {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    padding: 4px 2px;
    text-align: center;
}

.registered-games-table .registered-games-edit-btn {
    width: 32px;
    min-width: 32px;
    height: 28px;
    padding: 0;
}

.rg-league-cell .rg-sport-icon {
    flex-shrink: 0;
}

.rg-league-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    vertical-align: middle;
}

.rg-league-check-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.rg-league-check-wrap .registered-games-league-check,
.rg-league-check-wrap .charge-check {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.rg-league-check-wrap .registered-games-league-check:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rg-league-icon {
    width: 22px;
    height: 15px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

.rg-league-icon--placeholder {
    display: inline-block;
    box-sizing: border-box;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}


.rg-league-header-row td {
    background: var(--admin-surface-2);
    border-top: 1px solid var(--admin-border);
    border-bottom: 1px solid var(--admin-border);
    padding: 8px 12px;
    text-align: left;
}

.rg-league-header-cell {
    font-weight: 700;
}

.rg-league-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.registered-games-table .rg-col-league {
    max-width: 160px;
    text-align: left;
}

.rg-bet-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.rg-bet-cell--home {
    justify-content: space-between;
}

.rg-bet-cell--away {
    justify-content: space-between;
}

.rg-bet-team {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    font-weight: 700;
}

.rg-bet-team--home {
    flex: 1 1 auto;
    text-align: left;
    justify-content: flex-start;
}

.rg-bet-team--away {
    flex: 1 1 auto;
    text-align: right;
    justify-content: flex-end;
}

.rg-bet-team-name {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rg-team-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex: 0 0 18px;
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--admin-border) 72%, transparent);
    background: #fff;
}

.rg-team-icon--placeholder {
    background: color-mix(in srgb, var(--admin-muted) 15%, transparent);
    border-style: dashed;
}

.rg-team-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    flex: 0 0 18px;
    line-height: 0;
}

.rg-team-icon-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--admin-primary) 70%, white 30%);
    outline-offset: 1px;
}

.rg-bet-odds {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}



.rg-bet-input {
    width: 54px;
    max-width: 100%;
    padding: 2px 4px;
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    background: var(--admin-surface);
    color: var(--admin-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: inherit;
    line-height: 1.2;
    box-sizing: border-box;
}

.rg-bet-input--home {
    text-align: right;
}

.rg-bet-input--away {
    text-align: left;
}

.rg-bet-input--line {
    width: 52px;
    text-align: center;
}

.rg-bet-input:focus {
    outline: none;
    border-color: rgba(201, 169, 98, 0.65);
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.15);
}

.rg-bet-input.is-saving {
    opacity: 0.65;
}

.rg-bet-input.is-modified {
    background: rgba(201, 169, 98, 0.22);
    border-color: rgba(154, 123, 60, 0.55);
}

.rg-bet-input.is-modified:focus {
    background: rgba(201, 169, 98, 0.3);
    border-color: rgba(154, 123, 60, 0.65);
}

.rg-bet-input.is-saved-flash {
    animation: rg-bet-text-flash 3s ease-in-out forwards;
}

@keyframes rg-bet-text-flash {
    0%, 100% { color: inherit; text-shadow: none; }
    8% { color: #67e8f9; text-shadow: 0 0 10px rgba(103, 232, 249, 0.85); }
    16% { color: inherit; text-shadow: none; }
    24% { color: #fde047; text-shadow: 0 0 10px rgba(253, 224, 71, 0.85); }
    32% { color: inherit; text-shadow: none; }
    40% { color: #86efac; text-shadow: 0 0 10px rgba(134, 239, 172, 0.85); }
    48% { color: inherit; text-shadow: none; }
    56% { color: #f472b6; text-shadow: 0 0 10px rgba(244, 114, 182, 0.85); }
    64% { color: inherit; text-shadow: none; }
    72% { color: #c4b5fd; text-shadow: 0 0 10px rgba(196, 181, 253, 0.85); }
    80% { color: inherit; text-shadow: none; }
    88% { color: #38bdf8; text-shadow: 0 0 10px rgba(56, 189, 248, 0.85); }
    96% { color: inherit; text-shadow: none; }
}

html[data-theme="dark"] .rg-bet-input.is-modified {
    background: rgba(201, 169, 98, 0.2);
    border-color: rgba(201, 169, 98, 0.42);
}

html[data-theme="dark"] .rg-bet-input.is-modified:focus {
    background: rgba(201, 169, 98, 0.28);
}

.rg-bet-input.is-error {
    border-color: #dc2626;
}

.rg-bet-odds-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex: 0 0 auto;
}

.rg-bet-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    line-height: 1;
}

.rg-bet-mark--handicap {
    color: #65a30d;
    font-weight: 900;
    font-size: 17px;
    -webkit-text-stroke: 0.65px #65a30d;
    paint-order: stroke fill;
}

.rg-bet-mark--over,
.rg-bet-mark--under {
    font-size: 17px;
}

.rg-bet-mark--over {
    color: #dc2626;
}

.rg-bet-mark--over i {
    -webkit-text-stroke: 0.55px #dc2626;
    paint-order: stroke fill;
}

.rg-bet-mark--under {
    color: #2563eb;
}

.rg-bet-mark--under i {
    -webkit-text-stroke: 0.55px #2563eb;
    paint-order: stroke fill;
}

.rg-bet-odds--home {
    text-align: right;
}

.rg-bet-odds--away {
    text-align: left;
}

.rg-bet-line-val {
    display: inline-block;
    width: 100%;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.registered-games-table td.rg-bet-home,
.registered-games-table td.rg-bet-away,
.registered-games-table td.rg-bet-line {
    overflow: visible;
    text-overflow: clip;
}

#registered_games_page .registered-games-table tbody td.rg-bet-home,
#registered_games_page .registered-games-table tbody td.rg-bet-line,
#registered_games_page .registered-games-table tbody td.rg-bet-away,
#waiting_games_page .registered-games-table tbody td.rg-bet-home,
#waiting_games_page .registered-games-table tbody td.rg-bet-line,
#waiting_games_page .registered-games-table tbody td.rg-bet-away {
    background: rgba(241, 245, 249, 0.9);
}

html[data-theme="dark"] #registered_games_page .registered-games-table tbody td.rg-bet-home,
html[data-theme="dark"] #registered_games_page .registered-games-table tbody td.rg-bet-line,
html[data-theme="dark"] #registered_games_page .registered-games-table tbody td.rg-bet-away,
html[data-theme="dark"] #waiting_games_page .registered-games-table tbody td.rg-bet-home,
html[data-theme="dark"] #waiting_games_page .registered-games-table tbody td.rg-bet-line,
html[data-theme="dark"] #waiting_games_page .registered-games-table tbody td.rg-bet-away {
    background: rgba(30, 41, 59, 0.55);
}

.registered-games-table .odds { color: #2563eb; }

/* ── 리그(팀)관리 ── */
.lt-page { padding: 0; }
.lt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 16px;
}
.lt-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 280px;
    min-width: 200px;
}
.lt-search-wrap input[type="search"] {
    flex: 1;
    min-width: 160px;
    padding: 8px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--admin-surface);
    color: var(--admin-text);
}
.lt-search-type {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    font-size: 13px;
    background: var(--admin-surface);
    color: var(--admin-text);
}
.lt-breadcrumb {
    font-size: 13px;
    color: var(--admin-muted);
    margin-bottom: 12px;
}
.lt-breadcrumb a {
    color: var(--admin-accent);
    text-decoration: none;
    cursor: pointer;
}
.lt-breadcrumb a:hover { text-decoration: underline; }
.lt-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 900px) {
    .lt-layout { grid-template-columns: 1fr; }
}
.lt-sports {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    overflow: hidden;
}
.lt-sports-title {
    padding: 10px 12px;
    font-weight: 700;
    font-size: 13px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}
.lt-sports-list { list-style: none; margin: 0; padding: 4px 0; max-height: 70vh; overflow-y: auto; }
.lt-sports-list li button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 13px;
    cursor: pointer;
    color: var(--admin-text);
}
.lt-sports-list li button:hover { background: var(--admin-surface-hover); }
.lt-sports-list li.is-active button {
    background: var(--login-gold-soft);
    color: var(--login-gold);
    font-weight: 600;
}
.lt-main { min-width: 0; }
.lt-panel {
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    overflow: hidden;
}
.lt-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}
.lt-panel-head h3 { margin: 0; font-size: 14px; font-weight: 700; color: var(--admin-text); }
.lt-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lt-table th,
.lt-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
    color: var(--admin-text);
}
.lt-table th {
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--admin-muted);
    background: var(--admin-surface-2);
}
.lt-table tbody tr:hover { background: var(--admin-surface-hover); }
.lt-icon-cell { width: 72px; text-align: center; }
.lt-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px dashed var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface-2);
    cursor: pointer;
    padding: 2px;
    overflow: hidden;
}
.lt-icon-btn img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}
.lt-icon-btn:hover { border-color: var(--login-gold); background: var(--login-gold-soft); }
.lt-icon-actions {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}
.lt-icon-actions button {
    font-size: 10px;
    padding: 2px 4px;
    border: none;
    background: transparent;
    color: var(--admin-muted);
    cursor: pointer;
}
.lt-icon-actions button:hover { color: var(--login-gold); }
.lt-inline-input {
    width: 100%;
    min-width: 80px;
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    background: transparent;
    color: var(--admin-text);
}
.lt-inline-input:hover { border-color: var(--admin-border); background: var(--admin-surface); }
.lt-inline-input:focus {
    outline: none;
    border-color: var(--login-gold);
    background: var(--admin-surface);
}
.lt-row-actions { white-space: nowrap; }
.lt-row-actions button {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: var(--admin-surface);
    color: var(--admin-text);
    cursor: pointer;
    margin-right: 4px;
}
.lt-row-actions button:hover { background: var(--admin-surface-hover); }
.lt-row-actions button.is-danger { color: #f87171; border-color: rgba(248, 113, 113, 0.35); }
.lt-row-actions button.is-danger:hover { background: rgba(248, 113, 113, 0.12); }
.lt-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--admin-border);
}
.lt-pagination button {
    padding: 4px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    background: var(--admin-surface);
    color: var(--admin-text);
    cursor: pointer;
    font-size: 12px;
}
.lt-pagination button:disabled { opacity: 0.4; cursor: default; }
.lt-search-results { padding: 12px; }
.lt-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--admin-border);
    cursor: pointer;
    color: var(--admin-text);
}
.lt-search-item:hover { background: var(--admin-surface-hover); }
.lt-search-item img { width: 28px; height: 28px; object-fit: contain; }
.lt-search-item .lt-search-meta { font-size: 11px; color: var(--admin-muted); }
.lt-empty {
    padding: 32px;
    text-align: center;
    color: var(--admin-muted);
    font-size: 13px;
}
.lt-filter-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.lt-filter-row input {
    flex: 1;
    min-width: 120px;
    padding: 6px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 13px;
    background: var(--admin-surface);
    color: var(--admin-text);
}

/* 리그(팀)관리 — view 보완 */
.lt-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}
.lt-side-title { margin: 0; font-size: 13px; font-weight: 700; color: var(--admin-text); }
.lt-sports-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    max-height: 70vh;
    overflow-y: auto;
    background: transparent;
}
.lt-sport-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--admin-text);
    font-size: 13px;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    font-family: inherit;
}
.lt-sport-item:hover { background: var(--admin-surface-hover); }
.lt-sport-item.is-active {
    background: var(--login-gold-soft);
    color: var(--login-gold);
}
.lt-sport-item.is-active .lt-sport-name { font-weight: 700; }
.lt-sport-ename { font-size: 11px; color: var(--admin-muted); }
.lt-view { margin-top: 0; }
.lt-view-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.lt-view-title { margin: 0; font-size: 15px; font-weight: 700; }
.lt-view-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.lt-filter-input {
    width: 160px;
    max-width: 100%;
    padding: 6px 10px;
    font-size: 13px;
}
.lt-col-icon { width: 88px; }
.lt-col-sort { width: 72px; }
.lt-col-actions { width: 220px; text-align: center; white-space: normal; }
.lt-inline-input--sort { width: 56px; text-align: center; }
.lt-icon-img { max-width: 36px; max-height: 36px; object-fit: contain; display: block; }
.lt-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--admin-muted);
    font-size: 18px;
}
.lt-icon-actions {
    flex-direction: row;
    justify-content: center;
    margin-top: 4px;
}
.lt-crumb-label {
    margin-right: 6px;
    font-weight: 600;
    color: var(--admin-muted);
}
.lt-breadcrumb .bi-chevron-right {
    margin: 0 6px;
    font-size: 10px;
    color: var(--admin-muted);
}
.lt-search-block { margin-bottom: 16px; }
.lt-search-block-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--admin-muted);
}
.lt-search-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
}
.lt-search-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: var(--admin-surface);
    color: var(--admin-text);
    cursor: pointer;
    text-align: center;
    font-size: 13px;
}
.lt-search-card:hover {
    border-color: var(--login-gold);
    background: var(--admin-surface-hover);
}
.lt-search-card-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.lt-search-card-name {
    font-weight: 600;
    word-break: keep-all;
    line-height: 1.3;
}
.lt-page-label {
    font-size: 13px;
    color: var(--admin-muted);
    padding: 0 8px;
}
.lt-search-icon { color: var(--admin-muted); font-size: 16px; }

/* ── 리그(팀)관리 — 레이아웃·타이틀 정리 v2 ── */
.admin-main:has(.lt-page) {
    overflow: hidden;
}

.lt-page {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.lt-page .lt-panel.charge-panel {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.lt-page .lt-panel-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 10px 12px 12px;
    gap: 10px;
}

.lt-page .lt-toolbar {
    margin-bottom: 0;
    padding: 8px 10px;
    background: var(--admin-surface-2);
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    gap: 8px;
    flex-shrink: 0;
}

.lt-page .lt-search-wrap {
    flex: 1 1 240px;
}

.lt-page .lt-search-wrap .lt-search-input,
.lt-page .lt-search-wrap input[type="search"] {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
}

.lt-page .lt-layout {
    grid-template-columns: minmax(0, 252px) minmax(0, 1fr);
    gap: 12px;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

@media (max-width: 900px) {
    .lt-page .lt-layout {
        grid-template-columns: 1fr;
    }
}

.lt-page .lt-sports {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    overflow: hidden;
}

.lt-page .lt-side-head {
    padding: 8px 10px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
    flex-shrink: 0;
}

.lt-page .lt-side-title {
    font-size: 14px;
    gap: 6px;
}

.lt-page .lt-icon-sport { color: #ca8a04; }
.lt-page .lt-icon-league { color: #6366f1; }
.lt-page .lt-icon-team { color: #059669; }
.lt-page .lt-icon-search { color: var(--admin-muted); }

.lt-page .lt-sports-list {
    background: transparent;
}

.lt-page .lt-panel-body {
    background: var(--admin-card);
}

.lt-page .lt-search-wrap .charge-input,
.lt-page .lt-search-wrap input[type="search"],
.lt-page .lt-filter-input {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.lt-page .lt-icon-btn {
    border: 1px dashed var(--admin-border);
    background: var(--admin-surface-2);
}

.lt-page .lt-icon-btn:hover {
    border-color: var(--login-gold);
    background: var(--login-gold-soft);
}

.lt-page .lt-icon-placeholder {
    color: var(--admin-muted);
}

.lt-page .lt-inline-input:hover,
.lt-page .lt-inline-input:focus {
    background: var(--admin-surface);
    border-color: var(--admin-border);
}

.lt-page .lt-inline-input:focus {
    border-color: var(--login-gold);
}

.lt-page .lt-search-select,
.lt-page .lt-search-type {
    background: var(--admin-surface);
    color: var(--admin-text);
    border-color: var(--admin-border);
}

.lt-page .lt-sports-list {
    flex: 1;
    min-height: 0;
    max-height: none;
    padding: 6px;
    overflow-x: hidden;
    overflow-y: auto;
}

.lt-page .lt-sport-item {
    flex-direction: row;
    align-items: center;
    min-width: 0;
    width: 100%;
    padding: 7px 10px;
    gap: 8px;
    border-radius: 8px;
    background: transparent;
    color: var(--admin-text);
}

.lt-page .lt-sport-item:hover {
    background: var(--admin-surface-hover);
}

.lt-page .lt-sport-item.is-active {
    background: var(--login-gold-soft);
    color: var(--login-gold);
}

.lt-sport-icon-wrap,
.lt-sport-icon-btn {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lt-sport-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.lt-sport-icon--placeholder {
    display: block;
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 1px dashed var(--admin-border);
    border-radius: 4px;
    background: var(--admin-surface-2);
}

.lt-sport-icon-btn--empty {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

.lt-sport-icon-btn--empty:hover .lt-sport-icon--placeholder,
.lt-sport-icon-btn--empty:focus-visible .lt-sport-icon--placeholder {
    border-color: var(--login-gold);
    background: var(--login-gold-soft);
}

.lt-page .lt-sport-name {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.35;
}

.lt-page .lt-sport-ename {
    display: none;
}

.lt-page .lt-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    overflow: hidden;
}

.lt-page .lt-breadcrumb {
    margin: 0;
    padding: 7px 12px;
    min-height: 34px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
    font-size: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    flex-shrink: 0;
}

.lt-page .lt-breadcrumb:empty {
    display: none;
}

.lt-page .lt-crumb-label {
    margin-right: 4px;
    font-size: 12px;
}

.lt-page .lt-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-top: 0;
}

.lt-page .lt-view-head {
    margin: 0;
    padding: 8px 12px;
    border-bottom: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
    flex-shrink: 0;
    gap: 8px;
}

.lt-page .lt-view-title {
    font-size: 14px;
    gap: 6px;
}

.lt-page .lt-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    max-height: none;
}

.lt-page .lt-view .charge-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--admin-surface-2);
}

.lt-page .lt-pagination {
    flex-shrink: 0;
    margin: 0;
    padding: 8px 12px;
    border-top: 1px solid var(--admin-border);
    background: var(--admin-surface-2);
}

.lt-page .lt-search-results {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px;
}

.lt-page .lt-empty {
    padding: 18px 10px;
    font-size: 12px;
}

.lt-page .lt-icon-cell {
    padding-top: 6px;
    padding-bottom: 6px;
}

.lt-page .lt-col-icon {
    width: 84px;
}

/* ── 리그(팀)관리 — 아이콘·이름 한 줄 + 미리보기 v3 ── */
.lt-page .lt-col-primary {
    min-width: 280px;
}

.lt-page .lt-primary-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.lt-league-bulk-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 4px 8px;
}

.lt-check-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.lt-check-all-label input {
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.lt-bulk-hint {
    font-size: 12px;
    color: var(--admin-muted);
}

.lt-check-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2px;
    cursor: pointer;
    flex: 0 0 auto;
    min-width: 30px;
    min-height: 30px;
}

.lt-check-wrap input {
    width: 22px;
    height: 22px;
    margin: 0;
    cursor: pointer;
    flex: 0 0 auto;
}

.lt-page .lt-table {
    table-layout: fixed;
    width: 100%;
}

.lt-page .lt-table col.lt-col-primary {
    width: 44%;
}

.lt-page .lt-table col.lt-col-ename {
    width: 16%;
}

.lt-page .lt-table col.lt-col-sort {
    width: 72px;
}

.lt-page .lt-table col.lt-col-actions {
    width: 220px;
}

.lt-page .lt-table th.lt-col-primary,
.lt-page .lt-table td.lt-col-primary {
    white-space: normal;
}

.lt-page .lt-table th.lt-col-ename,
.lt-page .lt-table td.lt-col-ename,
.lt-page .lt-table th.lt-col-actions,
.lt-page .lt-table td.lt-col-actions {
    white-space: normal;
}

.lt-page .lt-col-actions {
    text-align: center;
    vertical-align: middle;
}

.lt-page .lt-actions-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    max-width: 100%;
}

.lt-apply-btn {
    white-space: nowrap;
    min-width: 108px;
}


.lt-google-btn .bi-google {
    color: #4285f4;
}

.lt-apply-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lt-page .lt-icon-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    width: auto;
    text-align: left;
    padding: 0;
}

.lt-page .lt-icon-btn {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    padding: 2px;
    cursor: zoom-in;
}

.lt-page .lt-icon-btn--empty {
    cursor: default;
    opacity: 0.65;
}

.lt-page .lt-icon-btn:disabled {
    cursor: default;
}

.lt-page .lt-icon-img {
    max-width: 32px;
    max-height: 32px;
}

.lt-page .lt-icon-placeholder {
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.lt-page .lt-icon-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.lt-page .lt-icon-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: var(--admin-surface);
    color: var(--admin-muted);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.lt-page .lt-icon-action-btn:hover {
    border-color: var(--login-gold);
    background: var(--login-gold-soft);
    color: var(--login-gold);
}

.lt-page .lt-icon-action-btn--danger:hover {
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
}

.lt-page .lt-inline-input--name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
}

.lt-page .lt-table tbody td.lt-col-primary {
    padding-top: 6px;
    padding-bottom: 6px;
}

.lt-icon-preview {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lt-icon-preview[hidden] {
    display: none !important;
}

.lt-icon-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    cursor: zoom-out;
}

.lt-icon-preview-dialog {
    position: relative;
    z-index: 1;
    max-width: min(92vw, 720px);
    max-height: 92vh;
    padding: 12px;
    border-radius: 12px;
    background: var(--admin-card);
    border: 1px solid var(--admin-border);
    box-shadow: 0 20px 50px var(--admin-shadow);
}

.lt-icon-preview-dialog img {
    display: block;
    max-width: min(88vw, 680px);
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.lt-icon-preview-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: var(--admin-surface-hover);
    color: var(--admin-text);
    cursor: pointer;
    z-index: 2;
}

.lt-icon-preview-close:hover {
    background: var(--admin-surface-2);
}

body.lt-preview-open {
    overflow: hidden;
}

/* ── 등록게임 · 리그 아이콘 모달 ── */
.rg-league-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    line-height: 0;
}

.rg-league-icon-btn:hover {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 1px;
}

.rg-league-icon-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.rg-league-modal {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rg-league-modal[hidden] {
    display: none !important;
}

.rg-league-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.rg-league-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(88vh, 640px);
    display: flex;
    flex-direction: column;
    background: var(--admin-card, #fff);
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.rg-league-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
    background: var(--admin-surface-2, #f8fafc);
    flex-shrink: 0;
}

.rg-league-modal-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6366f1;
}

.rg-league-modal-close {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.rg-league-modal-close:hover {
    background: rgba(15, 23, 42, 0.06);
}

.rg-league-modal-sub-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px 0;
    flex-shrink: 0;
}

.rg-league-modal-sub-wrap .rg-league-modal-sub {
    margin: 0;
    padding: 0;
    flex: 1;
    min-width: 0;
}

.rg-league-modal-sub {
    margin: 0;
    padding: 10px 14px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text, #0f172a);
    flex-shrink: 0;
}

.rg-lm-google-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.rg-lm-google-btn .bi-google {
    color: #4285f4;
}

.rg-league-modal-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    flex-shrink: 0;
}

.rg-league-modal-search i {
    color: #94a3b8;
    font-size: 15px;
}

.rg-league-modal-search .charge-input {
    flex: 1;
    min-width: 0;
}

.rg-league-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 0 14px 10px;
}

.rg-league-modal-foot {
    padding: 10px 14px 12px;
    border-top: 1px solid var(--admin-border, #e2e8f0);
    background: var(--admin-surface-2, #f8fafc);
    flex-shrink: 0;
}

.rg-lm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 28px 12px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.rg-lm-empty-text {
    margin: 0;
}

.rg-lm-add-league-btn {
    min-width: 120px;
}

.rg-lm-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
}

.rg-lm-row:last-child {
    border-bottom: none;
}

.rg-lm-icon-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.rg-lm-thumb {
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    cursor: zoom-in;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rg-lm-thumb.is-empty,
.rg-lm-thumb:disabled {
    cursor: default;
    opacity: 0.7;
}

.rg-lm-icon-img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
    display: block;
}

.rg-lm-icon-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #94a3b8;
    font-size: 16px;
}

.rg-lm-icon-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rg-lm-act {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 15px;
    cursor: pointer;
}

.rg-lm-act:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.rg-lm-act--danger:hover {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #dc2626;
}

.rg-lm-meta {
    min-width: 0;
    flex: 1;
}

.rg-lm-name {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    word-break: keep-all;
}

.rg-lm-ename {
    margin-top: 2px;
    font-size: 12px;
    color: #94a3b8;
}

.rg-lm-league {
    margin-top: 2px;
    font-size: 11px;
    color: #94a3b8;
}

.rg-lm-row--team {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rg-lm-row--team .rg-lm-row-body--team {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.rg-lm-row--team .rg-lm-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.rg-lm-row--team .rg-lm-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rg-lm-row--team .rg-lm-ename,
.rg-lm-row--team .rg-lm-league {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.rg-lm-open {
    overflow: hidden;
}

/* ── 등록게임 리그 모달 · 빅사이즈 + 일괄적용 v2 ── */
.rg-league-modal-dialog {
    width: min(960px, 96vw);
    max-height: min(92vh, 860px);
}

.rg-league-modal-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 14px 8px;
    flex-shrink: 0;
}

.rg-lm-check-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.rg-lm-check-all-label input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.rg-lm-tools-hint {
    font-size: 12px;
    color: #94a3b8;
}

.rg-lm-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
}

.rg-lm-row:last-child {
    border-bottom: none;
}

.rg-lm-check-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

.rg-lm-check-wrap input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.rg-lm-row-body {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.rg-lm-row-tail {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.rg-lm-apply-btn {
    white-space: nowrap;
    min-width: 108px;
}

.rg-lm-apply-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 720px) {
    .rg-league-modal-dialog {
        width: 100%;
        max-height: 96vh;
    }

    .rg-lm-row {
        grid-template-columns: 28px minmax(0, 1fr);
        grid-template-rows: auto auto;
    }

    .rg-lm-row-tail {
        grid-column: 2;
        justify-content: flex-start;
    }

    .rg-lm-tools-hint {
        display: none;
    }
}

/* —— Game sync monitor —— */
.gm-page.charge-page {
    flex: none;
    min-height: auto;
    height: auto;
    overflow: visible;
    padding-bottom: 28px;
}

.gm-page .charge-head.gm-head {
    margin-bottom: 10px;
}

.gm-page .charge-sub {
    margin-top: 4px;
    margin-bottom: 0;
}

.gm-page .charge-head-title-row {
    align-items: center;
    gap: 10px;
}

.gm-page .charge-panel {
    box-shadow: none;
}

.gm-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 2px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--admin-muted);
}

.gm-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.35);
    animation: gm-pulse 2.2s ease-out infinite;
}

.gm-live-pill[data-tone="ok"] { color: #34d399; border-color: rgba(52, 211, 153, 0.28); background: rgba(52, 211, 153, 0.08); }
.gm-live-pill[data-tone="warn"] { color: #fbbf24; border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.08); }
.gm-live-pill[data-tone="error"] { color: #f87171; border-color: rgba(248, 113, 113, 0.28); background: rgba(248, 113, 113, 0.08); }
.gm-live-pill[data-tone="running"] { color: #60a5fa; border-color: rgba(96, 165, 250, 0.3); background: rgba(96, 165, 250, 0.1); }

@keyframes gm-pulse {
    0% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.45); }
    70% { box-shadow: 0 0 0 8px rgba(148, 163, 184, 0); }
    100% { box-shadow: 0 0 0 0 rgba(148, 163, 184, 0); }
}

.gm-meta-line {
    font-size: 12px;
    color: var(--admin-muted);
    margin-right: 8px;
    font-variant-numeric: tabular-nums;
}

.gm-health {
    margin-bottom: 10px;
    padding: 12px 14px;
    box-shadow: none;
}

.gm-health-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.gm-health-badge {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: min(100%, 300px);
}

.gm-health-icon {
    margin-top: 3px;
    font-size: 11px;
    color: var(--admin-muted);
}

.gm-health-badge[data-tone="ok"] .gm-health-icon { color: #34d399; }
.gm-health-badge[data-tone="warn"] .gm-health-icon { color: #fbbf24; }
.gm-health-badge[data-tone="error"] .gm-health-icon { color: #f87171; }
.gm-health-badge[data-tone="running"] .gm-health-icon { color: #60a5fa; }

.gm-health-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gm-health-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--admin-text);
    letter-spacing: -0.02em;
}

.gm-health-detail {
    font-size: 12px;
    line-height: 1.35;
    color: var(--admin-muted);
    max-width: 42rem;
}

.gm-health-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(80px, 1fr));
    gap: 8px;
    min-width: min(100%, 400px);
}

.gm-stat {
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    box-shadow: none;
}

.gm-stat-k {
    display: block;
    font-size: 10px;
    color: var(--admin-muted);
    margin-bottom: 2px;
}

.gm-stat-v {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: var(--admin-text);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.gm-link-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.gm-link-card {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: none;
}

[data-theme="light"] .gm-link-card {
    background: rgba(15, 23, 42, 0.02);
}

.gm-link-card[data-ok="1"] {
    border-color: rgba(52, 211, 153, 0.35);
}

.gm-link-card[data-ok="0"] {
    border-color: rgba(248, 113, 113, 0.4);
}

.gm-link-k {
    display: block;
    font-size: 10px;
    color: var(--admin-muted);
    margin-bottom: 2px;
}

.gm-link-v {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: var(--admin-text);
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.gm-link-card[data-ok="1"] .gm-link-v { color: #34d399; }
.gm-link-card[data-ok="0"] .gm-link-v { color: #f87171; }

.gm-counts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.gm-count-card {
    padding: 10px 12px 9px;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
    box-shadow: none;
}

.gm-count-k {
    display: block;
    font-size: 11px;
    color: var(--admin-muted);
    margin-bottom: 4px;
}

.gm-count-v {
    display: block;
    font-size: 22px;
    line-height: 1;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--admin-text);
    font-variant-numeric: tabular-nums;
    margin-bottom: 4px;
}

.gm-count-sub {
    display: block;
    font-size: 11px;
    color: var(--admin-muted);
}

.gm-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(240px, 0.85fr);
    gap: 10px;
    align-items: start;
}

.gm-log-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.gm-events-panel,
.gm-output-panel,
.gm-backfill-panel {
    margin: 0;
    box-shadow: none;
}

.gm-page .gm-events-panel .charge-panel-head,
.gm-page .gm-output-panel .charge-panel-head,
.gm-page .gm-backfill-panel .charge-panel-head {
    padding: 10px 12px 6px;
    margin-bottom: 0;
}

.gm-panel-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.gm-panel-hint {
    font-size: 11px;
    color: var(--admin-muted);
}

.gm-events {
    /* 약 6줄만 보이도록 고정 (한 줄 ≈ 21~22px) */
    max-height: 138px;
    overflow: auto;
    padding: 2px 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gm-events-empty {
    padding: 16px 8px;
    text-align: center;
    color: var(--admin-muted);
    font-size: 12px;
}

.gm-event {
    display: grid;
    grid-template-columns: 132px 48px minmax(0, 1fr);
    gap: 8px;
    align-items: baseline;
    padding: 3px 8px;
    border-radius: 4px;
    border: 0;
    background: transparent;
    font-size: 12px;
    line-height: 1.25;
}

.gm-event:nth-child(odd) {
    background: var(--admin-surface);
}

.gm-event-at {
    color: var(--admin-muted);
    font-variant-numeric: tabular-nums;
    font-size: 11px;
}

.gm-event-level {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--admin-muted);
}

.gm-event[data-level="ok"] .gm-event-level { color: #34d399; }
.gm-event[data-level="error"] .gm-event-level { color: #f87171; }
.gm-event[data-level="warn"] .gm-event-level { color: #fbbf24; }
.gm-event[data-level="info"] .gm-event-level { color: #60a5fa; }

.gm-event-msg {
    color: var(--admin-text);
    line-height: 1.25;
    word-break: break-word;
}

.gm-output {
    margin: 0;
    padding: 6px 10px 10px;
    max-height: min(34vh, 280px);
    overflow: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--admin-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.gm-backfill-body {
    padding: 2px 10px 10px;
}

.gm-backfill-desc {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--admin-muted);
}

.gm-backfill-notes {
    margin: 0 0 12px;
    padding-left: 16px;
    color: var(--admin-muted);
    font-size: 11px;
    line-height: 1.5;
}

.gm-backfill-notes code {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--admin-text);
}

[data-theme="light"] .gm-backfill-notes code {
    background: rgba(15, 23, 42, 0.06);
}

.gm-backfill-btn {
    width: 100%;
    justify-content: center;
}

.gm-backfill-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.gm-backfill-btn.is-busy {
    opacity: 0.85;
}

.gm-backfill-result {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--admin-muted);
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.gm-backfill-result[data-tone="ok"] {
    border-color: rgba(52, 211, 153, 0.35);
    color: #34d399;
}

.gm-backfill-result[data-tone="error"] {
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

.gm-backfill-disabled {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--admin-muted);
    text-align: center;
}

/* auto_game / auto_process section headers */
.gm-section-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 12px;
    margin: 4px 0 8px;
    padding: 2px 0;
}
.gm-section-label--process {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-border);
}
.gm-section-k {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--admin-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.gm-section-v {
    font-size: 12px;
    color: var(--admin-muted);
}
.gm-live-pill--sm {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 11px;
}

.gm-counts--process {
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 0.9fr) minmax(0, 1.4fr);
}
.gm-count-v--flags {
    font-size: 14px;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: 0;
    word-break: break-word;
}

.gm-event-step {
    display: inline-block;
    margin-right: 6px;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.02em;
    color: var(--admin-muted);
    background: var(--admin-surface);
    vertical-align: baseline;
}

/* auto_process pipeline */
.ap-pipeline {
    list-style: none;
    margin: 0 0 10px;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    border-radius: 10px;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
}
.ap-pipeline-step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 4px;
}
.ap-pipeline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--admin-border);
    flex-shrink: 0;
}
.ap-pipeline-label {
    font-size: 11px;
    color: var(--admin-muted);
    white-space: nowrap;
}
.ap-pipeline-sep {
    width: 18px;
    height: 1px;
    margin: 0 2px;
    background: var(--admin-border);
    flex-shrink: 0;
}
.ap-pipeline-step[data-state="done"] .ap-pipeline-dot {
    background: #34d399;
}
.ap-pipeline-step[data-state="done"] .ap-pipeline-label {
    color: var(--admin-text);
}
.ap-pipeline-step[data-state="running"] .ap-pipeline-dot {
    background: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.22);
}
.ap-pipeline-step[data-state="running"] .ap-pipeline-label {
    color: #60a5fa;
    font-weight: 650;
}
.ap-pipeline-step[data-state="error"] .ap-pipeline-dot {
    background: #f87171;
}
.ap-pipeline-step[data-state="error"] .ap-pipeline-label {
    color: #f87171;
    font-weight: 650;
}

@media (max-width: 1100px) {
    .gm-health-stats,
    .gm-link-row,
    .gm-counts,
    .gm-counts--process {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 640px) {
    .gm-health-stats,
    .gm-link-row,
    .gm-counts {
        grid-template-columns: 1fr;
    }

    .gm-event {
        grid-template-columns: 1fr;
        gap: 1px;
        padding: 4px 8px;
    }

    .gm-meta-line {
        display: none;
    }
}


/* —— Manual game register —— */
.admin-main:has(.mgr-page) {
    overflow: auto !important;
}

.admin-main:has(.mgr-page) .admin-main-content {
    display: block;
    flex: none;
    min-height: auto;
    padding-bottom: 220px;
}

.mgr-page {
    padding-bottom: 180px;
}

.mgr-page .charge-head-actions .charge-btn {
    text-decoration: none;
}

.mgr-page .charge-head-actions a.charge-btn,
.mgr-page .charge-head-actions a.charge-btn:hover,
.mgr-page .charge-head-actions a.charge-btn:focus,
.mgr-page .charge-head-actions a.charge-btn:visited {
    text-decoration: none;
    color: var(--admin-text);
}

.mgr-page .charge-panel.mgr-form {
    box-shadow: none;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
}

.mgr-page .mgr-panel-head {
    margin: 0;
    padding: 3px 14px;
    background: #252017;
    border-bottom: 2px solid rgba(201, 169, 98, 0.45);
    gap: 10px;
}

.mgr-page .mgr-panel-title {
    margin: 0;
    padding: 3px 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #f0e6c8;
    line-height: 1.35;
}

.mgr-page .mgr-panel-title .charge-panel-icon {
    color: var(--login-gold, #c9a962);
}

.mgr-page .mgr-form-hint {
    font-size: 12px;
    color: rgba(240, 230, 200, 0.72);
}

[data-theme="light"] .mgr-page .mgr-panel-head {
    background: #ede4d0;
    border-bottom-color: rgba(154, 123, 60, 0.35);
}

[data-theme="light"] .mgr-page .mgr-panel-title {
    color: #5c4a1e;
}

[data-theme="light"] .mgr-page .mgr-form-hint {
    color: rgba(92, 74, 30, 0.72);
}

.mgr-page .charge-panel-title,
.mgr-page .mgr-market-title {
    color: var(--admin-text);
}

.mgr-page .charge-panel-icon,
.mgr-page .mgr-market-title .charge-panel-icon {
    color: var(--login-gold, #c9a962);
}

.mgr-body {
    padding: 14px 16px 16px;
}

.mgr-grid {
    display: grid;
    gap: 12px 14px;
    margin-bottom: 14px;
}

.mgr-grid--meta,
.mgr-grid--teams {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mgr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mgr-label {
    font-size: 12px;
    font-weight: 650;
    color: var(--admin-muted);
}

.mgr-team-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.mgr-team-row .charge-input {
    flex: 1;
    min-width: 0;
}

.mgr-market {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .mgr-market {
    background: rgba(15, 23, 42, 0.02);
}

.mgr-market--inline {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 10px 16px;
    align-items: center;
}

.mgr-market-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.mgr-market-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.mgr-market-head .mgr-market-title {
    margin: 0;
}

.mgr-market-head > span {
    font-size: 11px;
    color: var(--admin-muted);
}

.mgr-market-actions {
    margin-left: auto;
    display: flex;
    gap: 6px;
}

.mgr-odds-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: center;
}

.mgr-odds-row label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--admin-muted);
    min-width: 0;
}

.mgr-odds-row label > span {
    flex: 0 0 auto;
    min-width: 2.2em;
    font-weight: 600;
}

.mgr-odds-row .charge-input {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.mgr-specials {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mgr-special-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.6fr);
    gap: 10px 14px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--admin-border);
    border-radius: 10px;
    background: var(--admin-surface);
}

.mgr-special-row .mgr-sp-opt {
    width: 100%;
}

.mgr-odds-row--special {
    min-width: 0;
}

.mgr-submit-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--admin-border);
}

.mgr-result {
    flex: 1;
    margin: 0;
    font-size: 12px;
    color: var(--admin-muted);
    white-space: pre-wrap;
}

.mgr-result[data-tone="ok"] { color: #34d399; }
.mgr-result[data-tone="error"] { color: #f87171; }

.mgr-team-modal-card {
    width: min(520px, calc(100vw - 24px));
    max-height: min(72vh, 640px);
    display: flex;
    flex-direction: column;
}

.mgr-team-search-row {
    margin-bottom: 10px;
}

.mgr-team-list {
    max-height: min(48vh, 420px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mgr-team-empty {
    padding: 24px 8px;
    text-align: center;
    color: var(--admin-muted);
    font-size: 13px;
}

.mgr-team-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--admin-text);
    cursor: pointer;
}

.mgr-team-item:hover {
    background: var(--admin-surface-hover);
    border-color: var(--admin-border);
}

.mgr-team-ico {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
    flex: 0 0 auto;
}

.mgr-team-ico--empty {
    display: inline-block;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
}

.mgr-team-name {
    font-size: 13px;
}

@media (max-width: 960px) {
    .mgr-grid--meta,
    .mgr-grid--teams,
    .mgr-market--inline,
    .mgr-special-row {
        grid-template-columns: 1fr;
    }

    .mgr-odds-row {
        grid-template-columns: 1fr;
    }

    .mgr-odds-row label {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
}

/* —— Excel register —— */
.mgr-page .charge-panel.mgr-excel-panel {
    margin-top: 16px;
    box-shadow: none;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    background: var(--admin-card);
}

.mgr-excel-body {
    padding-top: 12px;
}

.mgr-excel-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 10px;
}

.mgr-excel-status-field {
    min-width: 120px;
}

.mgr-excel-file-btn {
    cursor: pointer;
    margin: 0;
}

.mgr-excel-filename {
    flex: 1 1 160px;
    min-width: 120px;
    font-size: 12px;
    color: var(--admin-muted);
    padding-bottom: 6px;
}

.mgr-excel-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: auto;
}

.mgr-excel-help {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--admin-muted);
    line-height: 1.45;
}

.mgr-excel-help kbd {
    display: inline-block;
    padding: 0 5px;
    border: 1px solid var(--admin-border);
    border-radius: 4px;
    font-size: 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: var(--admin-surface);
}

.mgr-excel-paste-zone {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px dashed rgba(201, 169, 98, 0.45);
    border-radius: 10px;
    background: rgba(201, 169, 98, 0.06);
    color: var(--admin-text);
    cursor: text;
    outline: none;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.mgr-excel-paste-zone > i {
    font-size: 22px;
    color: var(--login-gold, #c9a962);
    flex: 0 0 auto;
}

.mgr-excel-paste-zone-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mgr-excel-paste-zone-text strong {
    font-size: 13px;
    font-weight: 700;
}

.mgr-excel-paste-zone-text span {
    font-size: 12px;
    color: var(--admin-muted);
}

.mgr-excel-paste-zone:hover,
.mgr-excel-paste-zone.is-paste-target,
.mgr-excel-paste-zone:focus {
    border-color: rgba(201, 169, 98, 0.85);
    background: rgba(201, 169, 98, 0.12);
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.18);
}

.mgr-excel-paste-zone.is-filled {
    border-style: solid;
}

.mgr-excel-paste-zone.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

.mgr-excel-paste-zone.is-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
}

.mgr-excel-progress {
    margin-bottom: 12px;
}

.mgr-excel-progress-track {
    height: 6px;
    border-radius: 999px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    overflow: hidden;
}

.mgr-excel-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #9a7b3c, #c9a962);
    transition: width .25s ease;
}

.mgr-excel-progress-text {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--admin-muted);
}

.mgr-excel-table-wrap {
    max-height: min(52vh, 520px);
    overflow: auto;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
}

.mgr-excel-table {
    margin: 0;
    width: 100%;
    font-size: 12px;
}

.mgr-excel-table th,
.mgr-excel-table td {
    padding: 7px 8px;
    white-space: nowrap;
    vertical-align: middle;
}

.mgr-excel-table td.left,
.mgr-excel-table .mgr-excel-msg {
    white-space: normal;
    word-break: break-word;
}

.mgr-excel-table .mgr-excel-msg {
    min-width: 140px;
    max-width: 280px;
    font-size: 11px;
    color: var(--admin-muted);
}

.mgr-excel-empty-row td {
    text-align: center;
    padding: 28px 12px;
    color: var(--admin-muted);
}

.mgr-excel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
}

.mgr-excel-badge.is-ready { color: #94a3b8; }
.mgr-excel-badge.is-running {
    color: #c9a962;
    border-color: rgba(201, 169, 98, .45);
    background: rgba(201, 169, 98, .12);
}
.mgr-excel-badge.is-ok {
    color: #34d399;
    border-color: rgba(52, 211, 153, .35);
    background: rgba(52, 211, 153, .1);
}
.mgr-excel-badge.is-error,
.mgr-excel-badge.is-fail {
    color: #f87171;
    border-color: rgba(248, 113, 113, .35);
    background: rgba(248, 113, 113, .1);
}
.mgr-excel-badge.is-skip {
    color: #94a3b8;
}

.mgr-excel-table tbody tr.is-running {
    background: rgba(201, 169, 98, .08);
}
.mgr-excel-table tbody tr.is-ok {
    background: rgba(52, 211, 153, .05);
}
.mgr-excel-table tbody tr.is-error,
.mgr-excel-table tbody tr.is-fail {
    background: rgba(248, 113, 113, .05);
}

@media (max-width: 960px) {
    .mgr-excel-toolbar-right {
        margin-left: 0;
        width: 100%;
    }
}

/* 배팅내역 */
.betting-history-page .betting-history-panel-head {
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 4px;
}
.betting-history-page .betting-history-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    width: 100%;
    margin-left: 0;
}
.betting-history-page .betting-history-filters #betting_history_select_all_btn {
    margin-right: 0;
}
.betting-history-page .bh-settle-status-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-right: auto;
}
.betting-history-page .bh-settle-status-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid rgba(201, 169, 98, .38);
    background: var(--admin-surface, rgba(255, 255, 255, .03));
    color: var(--admin-muted, #9aa4b2);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.betting-history-page .bh-settle-status-tab i {
    font-size: 14px;
    line-height: 1;
}
.betting-history-page .bh-settle-status-tab.is-active {
    border-color: var(--charge-accent, #c9a962);
    color: var(--charge-accent, #c9a962);
    background: rgba(201, 169, 98, .12);
}
.betting-history-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 100%;
    align-items: center;
}
.bh-type-tab {
    border: 1px solid rgba(201, 169, 98, .38);
    background: var(--admin-surface, rgba(255, 255, 255, .03));
    color: var(--admin-muted, #9aa4b2);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.bh-type-tab.is-active {
    border-color: var(--charge-accent, #c9a962);
    color: var(--charge-accent, #c9a962);
    background: rgba(201, 169, 98, .12);
}
.bh-type-tab--icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    min-height: 34px;
}
.bh-type-tab--icon i {
    font-size: 13px;
    opacity: .9;
}
.bh-type-mini-wrap {
    position: relative;
}
.bh-type-mini-toggle {
    min-width: 152px;
    justify-content: space-between;
}
.bh-type-mini-toggle-label {
    flex: 1 1 auto;
    text-align: left;
}
.bh-type-mini-caret {
    margin-left: 6px;
    font-size: 11px;
    transition: transform .15s ease;
}
.bh-type-mini-wrap.is-open .bh-type-mini-caret {
    transform: rotate(180deg);
}
.bh-type-mini-dropdown {
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 8;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid rgba(201, 169, 98, .38);
    border-radius: 10px;
    background: var(--admin-surface, #111826);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
    padding: 6px;
}
.bh-type-mini-item {
    width: 100%;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--admin-muted, #9aa4b2);
    font-size: 12px;
    text-align: left;
    padding: 8px 10px;
    cursor: pointer;
}
.bh-type-mini-item:hover {
    background: var(--admin-surface-hover, rgba(255, 255, 255, .06));
    color: var(--admin-text, #dde5f1);
}
.bh-type-mini-item.is-active {
    background: rgba(201, 169, 98, .14);
    color: var(--charge-accent, #c9a962);
    font-weight: 600;
}
html[data-theme="light"] .bh-type-mini-dropdown {
    box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
}
.betting-history-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 0;
    padding: 10px 14px;
    margin-bottom: 4px;
    border: 1px solid rgba(201, 169, 98, .38);
    border-radius: 10px;
    background: var(--admin-surface, rgba(255, 255, 255, .02));
    font-size: 13px;
}
.betting-history-summary strong {
    color: var(--charge-accent, #c9a962);
    margin-left: 4px;
}
.bh-col-check { width: 36px; text-align: center; }
.bh-col-member {
    text-align: left;
    white-space: nowrap;
    vertical-align: middle;
}
.bh-col-member .member-name-link {
    display: inline-flex;
    max-width: 100%;
    border: 0;
    background: none;
    color: var(--charge-link, #7eb6ff);
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-align: left;
}
.bh-col-member .bh-member-nick-link {
    margin-top: 2px;
}
.bh-col-member .member-nic-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}
.bh-col-member .member-nic-cell strong {
    font-weight: 700;
    color: var(--admin-text);
}
.betting-history-table-wrap .charge-table td.num.bh-col-money {
    color: var(--admin-text);
}
.bh-category-label {
    font-weight: 700;
}
.bh-member-nick strong {
    font-weight: 700;
    color: var(--admin-text);
}
.bh-unit {
    margin-left: 2px;
    font-size: 11px;
    color: var(--admin-muted);
    font-weight: 500;
}
.bh-table-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 12px;
    color: var(--admin-muted);
    font-size: 14px;
}
.betting-history-table-wrap .bh-row-loading td {
    padding: 0;
    text-align: center;
}
.bh-sport-icons-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    border: 0;
    background: transparent;
    padding: 2px 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
}
.bh-sport-icons-toggle:hover .bh-sport-icon,
.bh-sport-icons-toggle:hover .bh-sport-icon-ph,
.bh-sport-icons-toggle[aria-expanded="true"] .bh-sport-icon,
.bh-sport-icons-toggle[aria-expanded="true"] .bh-sport-icon-ph {
    border-color: rgba(201, 169, 98, .65);
    box-shadow: 0 0 0 2px rgba(201, 169, 98, .12);
}
.bh-row--open .bh-detail-row td {
    animation: bh-detail-open .18s ease-out;
}
.betting-history-table-wrap tr.bh-row.bh-row--open > td {
    background: rgba(201, 169, 98, .14);
}
html[data-theme="dark"] .betting-history-table-wrap tr.bh-row.bh-row--open > td {
    background: rgba(201, 169, 98, .18);
}
html[data-theme="light"] .betting-history-table-wrap tr.bh-row.bh-row--open > td {
    background: rgba(201, 169, 98, .12);
}
@keyframes bh-detail-open {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.bh-col-category,
.bh-col-sport {
    text-align: left;
    white-space: nowrap;
}
.bh-category-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.bh-category-icon {
    font-size: 13px;
    color: var(--charge-accent, #c9a962);
    opacity: .92;
    flex-shrink: 0;
}
.bh-sport-icons {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: 100%;
}
.bh-sport-icon-wrap {
    position: relative;
    display: inline-flex;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}
.bh-sport-icon-wrap .bh-sport-icon,
.bh-sport-icon-wrap .bh-sport-icon-ph {
    width: 22px;
    height: 22px;
}
.bh-sport-icon-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, .95)) drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}
.bh-sport-icon-badge .bi {
    -webkit-text-stroke: 1.1px currentColor;
    paint-order: stroke fill;
    text-shadow:
        0 0 2px #fff,
        0 0 4px rgba(255, 255, 255, .95);
}
.bh-sport-icon-wrap--win .bh-sport-icon,
.bh-sport-icon-wrap--win .bh-sport-icon-ph {
    border-color: #2563eb;
    box-shadow: 0 0 0 1.5px rgba(37, 99, 235, .55);
}
.bh-sport-icon-wrap--win .bh-sport-icon-badge {
    color: #1d4ed8;
}
.bh-sport-icon-wrap--lose .bh-sport-icon,
.bh-sport-icon-wrap--lose .bh-sport-icon-ph {
    border-color: #dc2626;
    box-shadow: 0 0 0 1.5px rgba(220, 38, 38, .55);
}
.bh-sport-icon-wrap--lose .bh-sport-icon-badge {
    color: #b91c1c;
}
.bh-sport-icon-wrap--pending .bh-sport-icon,
.bh-sport-icon-wrap--pending .bh-sport-icon-ph {
    border-color: #fbbf24;
    opacity: .92;
}
.bh-sport-icon-wrap--void .bh-sport-icon,
.bh-sport-icon-wrap--void .bh-sport-icon-ph {
    border-color: #fb923c;
    box-shadow: 0 0 0 1px rgba(251, 146, 60, .4);
}
.bh-sport-icon-wrap--void .bh-sport-icon-badge {
    color: #ea580c;
}
.bh-sport-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(201, 169, 98, .28);
    background: var(--admin-surface-2);
    vertical-align: middle;
    flex-shrink: 0;
}
.bh-sport-icon-ph {
    display: inline-flex;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(201, 169, 98, .28);
    background: var(--admin-surface-2);
    color: #ca8a04;
    font-size: 11px;
    line-height: 1;
    vertical-align: middle;
}
.bh-member-link {
    border: 0;
    background: none;
    color: var(--charge-link, #7eb6ff);
    cursor: pointer;
    padding: 0;
    font: inherit;
}
.bh-row--high-pc { background: rgba(247, 216, 248, .08); }
.bh-row--has-where { background: rgba(208, 255, 255, .04); }
.bh-status { font-size: 12px; font-weight: 600; }
.bh-status--won { color: #34d399; }
.bh-status--lost { color: #f87171; }
.bh-status--cancelled { color: #fb923c; }
.bh-status--pending { color: #fbbf24; }

.bh-col-result {
    white-space: nowrap;
    text-align: center;
}
.bh-result {
    font-size: 12px;
    font-weight: 600;
}
.bh-result--win { color: #34d399; }
.bh-result--lose { color: #f87171; }
.bh-result--void { color: #fb923c; }
.bh-result--pending { color: #fbbf24; }
html[data-theme="light"] .betting-history-page .bh-result--pending {
    color: #ca8a04;
}

html[data-theme="light"] .betting-history-page .bh-status--pending {
    color: #b45309;
    font-weight: 700;
}
.bh-detail-row td { padding: 0 0 12px !important; background: transparent; }
.bh-legs-table { margin: 8px 12px; font-size: 12px; table-layout: auto; width: calc(100% - 24px); }
.bh-legs-table th,
.bh-legs-table td {
    vertical-align: middle !important;
    line-height: 1.35;
}
.bh-legs-table tbody td {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    vertical-align: middle !important;
    border: 1px solid rgba(201, 169, 98, .18);
}
.bh-legs-table tbody td > * {
    vertical-align: middle !important;
}
.bh-legs-table thead th:nth-child(5),
.bh-legs-table thead th:nth-child(6),
.bh-legs-table thead th:nth-child(7),
.bh-legs-table thead th:nth-child(3),
.bh-legs-table thead th:nth-child(4),
.bh-legs-table thead th:nth-child(10),
.bh-legs-table thead th:nth-child(11),
.bh-legs-table thead th:nth-child(12) {
    text-align: center;
}
.bh-legs-table td:nth-child(5),
.bh-legs-table td:nth-child(7) {
    min-width: 0;
}
.bh-legs-table td:nth-child(6) {
    min-width: 0;
    text-align: center;
}
.bh-leg-side {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
    max-width: 100%;
}
.bh-leg-side--away {
    justify-content: space-between;
    width: 100%;
}
.bh-leg-col-center { text-align: center !important; }
.bh-leg-col-left {
    text-align: left !important;
    padding-left: 10px !important;
}
.bh-leg-time {
    text-align: center !important;
    padding-left: 1px !important;
    padding-right: 1px !important;
    white-space: nowrap;
    min-width: 120px;
}
.bh-leg-league-col {
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.bh-leg-home-col,
.bh-leg-away-col,
.bh-leg-oid-col,
.bh-leg-pick-col {
    padding-left: 6px !important;
    padding-right: 6px !important;
}
.bh-leg-col-right {
    text-align: right !important;
    padding-right: 10px !important;
}
.bh-legs-table td.num {
    padding-right: 10px !important;
}
.bh-legs-table td:nth-child(1),
.bh-legs-table th:nth-child(1),
.bh-legs-table td:nth-child(2),
.bh-legs-table th:nth-child(2),
.bh-legs-table td:nth-child(3),
.bh-legs-table th:nth-child(3),
.bh-legs-table td:nth-child(4),
.bh-legs-table th:nth-child(4),
.bh-legs-table td:nth-child(10),
.bh-legs-table th:nth-child(10),
.bh-legs-table td:nth-child(12),
.bh-legs-table th:nth-child(12) {
    width: 1%;
    white-space: nowrap;
}
.bh-leg-game-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}
.bh-leg-game-type i {
    color: var(--charge-accent, #c9a962);
    font-size: 12px;
}
.bh-leg-sport-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(201, 169, 98, .28);
    background: var(--admin-surface-2);
}
.bh-leg-sport-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bh-leg-sport-icon--ph {
    color: #ca8a04;
    font-size: 11px;
}
.bh-leg-league {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-left: 4px;
    padding-right: 4px;
    margin-left: 4px;
    margin-right: 4px;
}
.bh-leg-league > span {
    margin-left: 4px;
    margin-right: 4px;
}
.bh-leg-home-col .bh-leg-side,
.bh-leg-away-col .bh-leg-side {
    padding-left: 4px;
    padding-right: 4px;
    margin-left: 4px;
    margin-right: 4px;
    width: calc(100% - 8px);
    justify-content: space-between;
}
.bh-leg-league i {
    color: #60a5fa;
    font-size: 11px;
}
.bh-leg-team {
    font-weight: 600;
    color: var(--admin-text);
    overflow-wrap: anywhere;
}
.bh-leg-side--away .bh-leg-team {
    margin-right: 4px;
}
.bh-leg-odds {
    display: inline-block;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--admin-text);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}
.bh-bet-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    margin-left: 2px;
    margin-right: 2px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    color: #2563eb;
}
.bh-leg-odds-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.bh-leg-odd-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 22px;
    padding: 0 8px;
    border: 1px solid rgba(201, 169, 98, .28);
    border-radius: 4px;
    background: rgba(255, 255, 255, .72);
    color: var(--admin-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.bh-bet-mark--handicap {
    color: #65a30d;
}
.bh-bet-mark--over,
.bh-bet-mark--under {
    color: #2563eb;
}
.bh-bet-mark--over .bi,
.bh-bet-mark--under .bi {
    font-size: 10px;
    font-weight: 900;
}
.bh-leg-side:not(.bh-leg-side--away) .bh-leg-odds {
    margin-left: 0 !important;
    margin-right: 0;
    text-align: left !important;
}
.bh-leg-side--away .bh-leg-odds {
    margin-right: 0;
    text-align: left;
}
html[data-theme="dark"] .bh-leg-odd-box {
    background: rgba(17, 24, 39, .82);
    border-color: rgba(148, 163, 184, .35);
    color: #e5e7eb;
}
.bh-leg-line {
    display: inline-block;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--admin-text);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.bh-leg-result--win { color: #34d399; font-weight: 600; }
.bh-leg-result--lose { color: #f87171; font-weight: 600; }
.bh-leg-result--void { color: #fb923c; }
.bh-leg-result--pending { color: #fbbf24; }
.bh-actions { white-space: nowrap; }

body.rg-game-edit-open {
    overflow: hidden;
}

.rg-game-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rg-game-edit-modal[hidden] {
    display: none !important;
}

.rg-game-edit-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
}

.rg-game-edit-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    background: var(--admin-card, #fff);
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.rg-game-edit-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--admin-border, #e2e8f0);
    background: var(--admin-surface-2, #f8fafc);
    flex-shrink: 0;
}

.rg-game-edit-modal-head-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.rg-game-edit-modal-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--admin-text);
}

.rg-game-edit-modal-title i {
    color: var(--login-gold, #c9a962);
}

.rg-game-edit-modal-uid {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #4f46e5;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rg-game-edit-modal-close {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    flex-shrink: 0;
}

.rg-game-edit-modal-close:hover {
    background: rgba(100, 116, 139, 0.12);
}

.rg-game-edit-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 16px 18px 18px;
}

.rg-game-edit-loading,
.rg-game-edit-error {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    color: var(--admin-muted);
    font-size: 14px;
}

.rg-game-edit-loading i {
    animation: rg-game-edit-spin 0.9s linear infinite;
}

@keyframes rg-game-edit-spin {
    to { transform: rotate(360deg); }
}

.rg-game-edit-error {
    color: #dc2626;
}

.rg-game-edit-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rg-game-edit-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rg-game-edit-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(201, 169, 98, 0.12);
    border: 1px solid rgba(201, 169, 98, 0.28);
    color: var(--admin-text);
    font-size: 12px;
    font-weight: 700;
}

.rg-game-edit-pill.is-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.24);
    color: #1d4ed8;
}

.rg-game-edit-pill.is-muted {
    background: rgba(100, 116, 139, 0.1);
    border-color: rgba(100, 116, 139, 0.2);
    color: var(--admin-muted);
}

.rg-game-edit-section {
    padding: 14px 14px 12px;
    border: 1px solid var(--admin-border, #e2e8f0);
    border-radius: 12px;
    background: var(--admin-surface, #fff);
}

.rg-game-edit-section-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--admin-text);
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.rg-game-edit-section-title i {
    color: #6366f1;
}

.rg-game-edit-grid {
    display: grid;
    gap: 12px;
}

.rg-game-edit-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rg-game-edit-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.rg-game-edit-field--span2 {
    grid-column: span 2;
}

.rg-game-edit-field--full {
    grid-column: 1 / -1;
}

.rg-game-edit-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--admin-muted);
}

.rg-game-edit-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: end;
}

.rg-game-edit-team {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.rg-game-edit-team-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.rg-game-edit-team-row .charge-input {
    flex: 1 1 auto;
    min-width: 0;
}

.rg-game-edit-team-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--admin-border, #e2e8f0);
    background: var(--admin-surface-2, #f8fafc);
    overflow: hidden;
}

.rg-game-edit-team-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rg-game-edit-team-icon-ph {
    color: var(--admin-muted);
    font-size: 14px;
}

.rg-game-edit-vs {
    align-self: center;
    padding-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--admin-muted);
    letter-spacing: 0.04em;
}

.rg-game-edit-odds {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.rg-game-edit-odd {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.rg-game-edit-odd-input {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: center;
}

.rg-game-edit-bets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.rg-game-edit-bet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.06);
    text-align: center;
}

.rg-game-edit-bet-card.is-high {
    border-color: rgba(220, 38, 38, 0.28);
    background: rgba(220, 38, 38, 0.08);
}

.rg-game-edit-bet-card-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--admin-muted);
}

.rg-game-edit-bet-card-amount {
    font-size: 14px;
    font-weight: 800;
    color: #1d4ed8;
    font-variant-numeric: tabular-nums;
}

.rg-game-edit-bet-card.is-high .rg-game-edit-bet-card-amount {
    color: #dc2626;
}

.rg-game-edit-bet-card-count {
    font-size: 11px;
    color: var(--admin-muted);
}

.rg-game-edit-modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    border-top: 1px solid var(--admin-border, #e2e8f0);
    background: var(--admin-surface-2, #f8fafc);
    flex-shrink: 0;
}

html[data-theme="dark"] .rg-game-edit-modal-dialog {
    background: var(--admin-card);
}

html[data-theme="dark"] .rg-game-edit-bet-card {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(96, 165, 250, 0.24);
}

html[data-theme="dark"] .rg-game-edit-bet-card-amount {
    color: #93c5fd;
}

@media (max-width: 860px) {
    .rg-game-edit-grid--3,
    .rg-game-edit-odds,
    .rg-game-edit-bets {
        grid-template-columns: 1fr;
    }

    .rg-game-edit-field--span2,
    .rg-game-edit-field--full {
        grid-column: auto;
    }

    .rg-game-edit-match {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .rg-game-edit-vs {
        display: none;
    }
}


/* Betting history — sequential settle progress */
.bh-settle-progress {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1200;
    pointer-events: none;
}
.bh-settle-progress-card {
    min-width: 280px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(201, 169, 98, .4);
    background: rgba(18, 22, 30, .94);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
    color: #f5f5f5;
    pointer-events: auto;
}
html[data-theme="light"] .bh-settle-progress-card {
    background: rgba(255, 255, 255, .97);
    color: #1f2937;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
}
.bh-settle-progress-top {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bh-settle-progress-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.bh-settle-progress-copy strong {
    font-size: 14px;
    font-weight: 700;
}
.bh-settle-progress-copy span {
    font-size: 12px;
    color: var(--admin-muted, #9ca3af);
}
.bh-settle-progress-track {
    margin-top: 12px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    overflow: hidden;
}
html[data-theme="light"] .bh-settle-progress-track {
    background: rgba(15, 23, 42, .08);
}
.bh-settle-progress-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #c9a962, #e0c281);
    transition: width .2s ease;
}
.bh-settle-progress-detail {
    margin-top: 8px;
    font-size: 12px;
    color: var(--admin-muted, #9ca3af);
    word-break: break-all;
}
.betting-history-page.is-settling .bh-row-check,
.betting-history-page.is-settling #betting_history_check_all {
    pointer-events: none;
}
.bh-row--settling {
    outline: 1px solid rgba(201, 169, 98, .55);
    background: rgba(201, 169, 98, .08);
}
.bh-row--settle-ok {
    background: rgba(52, 211, 153, .08);
}
.bh-row--settle-fail {
    background: rgba(248, 113, 113, .08);
}
.bh-settle-row-spin {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(201, 169, 98, .35);
    border-top-color: #c9a962;
    border-radius: 50%;
    animation: bh-settle-spin .7s linear infinite;
    vertical-align: middle;
}
@keyframes bh-settle-spin {
    to { transform: rotate(360deg); }
}
.bh-status--fail { color: #f87171; }
