:root {
    --app-bg: #f4f1ea;
    --app-surface: #fffdf8;
    --app-surface-soft: #f8f4ed;
    --app-border: #ddd2c1;
    --app-text: #251d16;
    --app-muted: #766556;
    --app-accent: #ad7c33;
    --app-accent-dark: #7d5518;
    --meron: #dc143c;
    --meron-soft: rgba(220, 20, 60, 0.14);
    --wala: #000080;
    --wala-soft: rgba(0, 0, 128, 0.12);
    --success-soft: rgba(35, 128, 73, 0.12);
    --warning-soft: rgba(255, 193, 7, 0.18);
    --danger-soft: rgba(220, 53, 69, 0.14);
    --sidebar-rail-width: 78px;
    --sidebar-width: 280px;
    --shadow-lg: 0 18px 50px rgba(49, 35, 20, 0.12);
    --shadow-md: 0 10px 30px rgba(49, 35, 20, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", "Segoe UI", sans-serif;
    color: var(--app-text);
    background:
        radial-gradient(circle at top left, rgba(173, 124, 51, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(0, 0, 128, 0.12), transparent 24%),
        linear-gradient(180deg, #fbf7f0 0%, #f4f1ea 100%);
    min-height: 100vh;
}

a {
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
    padding: clamp(0.5rem, 0.4rem + 0.45vw, 0.95rem);
    background: linear-gradient(180deg, #f8efe6 0%, #f2e6dc 100%);
}

.app-sidebar {
    width: var(--sidebar-rail-width);
    background: linear-gradient(180deg, #13090b 0%, #1f0b12 100%);
    color: #f7efe5;
    position: fixed;
    inset: 0 auto 0 0;
    margin: clamp(0.5rem, 0.45rem + 0.35vw, 0.85rem) 0 0.75rem clamp(0.5rem, 0.45rem + 0.35vw, 0.85rem);
    padding: 0.9rem 0.7rem;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1030;
    border-radius: 28px;
    height: calc(100vh - 1.5rem);
}

.brand-mark {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--meron), var(--app-accent));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 25px rgba(220, 20, 60, 0.2);
    overflow: hidden;
    position: relative;
    flex: 0 0 auto;
}

.brand-mark-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.brand-mark-fallback {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1rem;
    letter-spacing: 0.04em;
    opacity: 0;
}

.brand-title {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
}

.sidebar-brand-copy,
.sidebar-panel,
.section-label,
.app-nav-link span {
    display: none;
}

.brand-subtitle,
.sidebar-meta,
.section-label,
.helper-text {
    color: rgba(247, 239, 229, 0.7);
}

.sidebar-panel {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.nav-pills .nav-link.app-nav-link {
    color: rgba(255, 248, 240, 0.82);
    border-radius: 16px;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: all 0.2s ease;
    font-size: 1.35rem;
}

.nav-pills .nav-link.app-nav-link:hover,
.nav-pills .nav-link.app-nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateX(2px);
}

.app-main {
    margin-left: calc(var(--sidebar-rail-width) + 16px);
    min-height: calc(100vh - 96px);
    padding: clamp(0.9rem, 0.7rem + 0.7vw, 1.35rem);
    background: linear-gradient(180deg, #120709 0%, #14080a 100%);
    border-radius: 28px;
    color: #fff7f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl);
    padding: 0.95rem 1.15rem;
    color: #fff4ea;
    min-height: 76px;
}

.app-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.app-topbar-left > div {
    min-width: 0;
}

.app-topbar-right {
    margin-left: auto;
    flex: 0 0 auto;
}

.app-topbar-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex: 0 0 auto;
}

.app-topbar-toggle i {
    font-size: 1.2rem;
}

.app-page-title {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
    margin: 0;
}

.app-card,
.hero-panel,
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    color: #fff6ee;
}

.hero-panel {
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -60px -60px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(173, 124, 51, 0.22), transparent 65%);
}

.hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--app-accent-dark);
}

.hero-copy {
    max-width: 48rem;
    color: rgba(255, 244, 234, 0.72);
}

.stat-card {
    padding: 1.15rem 1.2rem;
    height: 100%;
}

.stat-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 244, 234, 0.58);
}

.stat-value {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0.35rem 0;
}

.surface-muted {
    background: rgba(255, 255, 255, 0.04);
}

.bet-side-card {
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid transparent;
    min-height: 100%;
}

.bet-side-card.meron {
    background: linear-gradient(180deg, rgba(220, 20, 60, 0.1), rgba(255, 255, 255, 0.92));
    border-color: rgba(220, 20, 60, 0.18);
}

.bet-side-card.wala {
    background: linear-gradient(180deg, rgba(0, 0, 128, 0.08), rgba(255, 255, 255, 0.92));
    border-color: rgba(0, 0, 128, 0.16);
}

.side-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.side-pill.meron {
    background: var(--meron-soft);
    color: #9e0f2d;
}

.side-pill.wala {
    background: var(--wala-soft);
    color: #0d1f72;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.status-open {
    background: var(--success-soft);
    color: #1a6a3c;
}

.status-closed {
    background: var(--danger-soft);
    color: #9c2130;
}

.status-pending {
    background: var(--warning-soft);
    color: #8a6411;
}

.app-theme-light {
    --app-bg: #f8f6f1;
    --app-surface: #ffffff;
    --app-surface-soft: #f2eee7;
    --app-border: #d8cdbc;
    --app-text: #201a15;
    --app-muted: #6f6258;
}

.btn-battle {
    background-color: var(--brand-primary, var(--app-accent));
    border-color: var(--brand-primary, var(--app-accent));
}

.theme-swatch {
    display: inline-block;
    width: 34px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
}

.status-unpaid {
    color: #ffe2a3;
    border-color: rgba(255, 200, 92, 0.45);
    background: rgba(255, 200, 92, 0.12);
}

.status-paid,
.status-won,
.status-refunded,
.status-approved {
    color: #9ee7ba;
    border-color: rgba(87, 213, 131, 0.45);
    background: rgba(87, 213, 131, 0.12);
}

.status-lost,
.status-rejected,
.status-inactive {
    color: #ffabb4;
    border-color: rgba(255, 92, 106, 0.45);
    background: rgba(255, 92, 106, 0.12);
}

.status-cancelled,
.status-canceled {
    color: #d8cfc8;
    border-color: rgba(216, 207, 200, 0.32);
    background: rgba(216, 207, 200, 0.1);
}

.quick-action {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-lg);
    padding: 1rem;
    transition: all 0.2s ease;
    height: 100%;
    color: #fff6ee;
}

.quick-action:hover {
    border-style: solid;
    border-color: rgba(173, 124, 51, 0.4);
    transform: translateY(-2px);
}

.quick-action a,
.app-main a.text-dark,
.app-main .text-dark {
    color: #fff6ee !important;
}

.section-title {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1.1rem;
    margin: 0;
    color: #fff7f0;
}

.table-responsive {
    scrollbar-width: thin;
}

.table-modern {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
    color: #fff4ea;
}

.table-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.table-toolbar .form-control,
.table-toolbar .form-select {
    min-height: 40px;
}

.table-search {
    position: relative;
    flex: 1 1 260px;
    max-width: 420px;
}

.table-search i {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    color: rgba(255, 244, 234, 0.48);
    transform: translateY(-50%);
    pointer-events: none;
}

.table-search .form-control {
    padding-left: 2.35rem;
}

.table-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
}

.table-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
}

.table-sort-button i {
    font-size: 0.8rem;
    opacity: 0.52;
}

.empty-state-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 76px;
    color: rgba(255, 244, 234, 0.56);
}

.empty-state-inline i {
    font-size: 1.15rem;
}

.table-modern thead th {
    border-bottom-width: 1px;
    color: rgba(255, 244, 234, 0.58);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.table-modern td,
.table-modern tbody th {
    color: #fff4ea;
    vertical-align: middle;
}

.form-control,
.form-select,
textarea.form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff6ee;
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(220, 169, 100, 0.34);
    color: #fff;
    box-shadow: 0 0 0 0.18rem rgba(123, 16, 29, 0.14);
}

.form-control::placeholder {
    color: rgba(255, 244, 234, 0.45);
}

.form-select option,
.form-select optgroup {
    background: #fff8f0;
    color: #251d16;
}

.app-main .form-label,
.app-main label {
    color: #fff4ea;
}

.list-group-item {
    background: rgba(255, 255, 255, 0.04);
    color: #fff5ec;
    border-color: rgba(255, 255, 255, 0.08);
}

.list-group-item.active {
    background: #7b101d;
}

.app-main .btn-outline-dark {
    color: #fff6ee;
    border-color: rgba(255, 255, 255, 0.24);
}

.app-main .btn-outline-dark:hover,
.app-main .btn-outline-dark:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.34);
}

.transaction-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.36rem 0.72rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: #fff7f0;
}

.action-inline-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

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

.action-btn,
.action-inline-group .btn {
    min-height: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.78rem;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}

.action-btn i,
.action-inline-group .btn i {
    margin-right: 0 !important;
    font-size: 0.9em;
}

.table-actions {
    width: 1%;
    white-space: nowrap;
}

.mobile-action-toggle {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.84rem;
}

.settings-backup-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.settings-backup-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.settings-backup-form .form-control {
    min-height: 32px;
    height: 32px;
    width: 150px;
    font-size: 0.78rem;
    padding: 0 9px;
}

.dropdown-menu .dropdown-item {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.status-choice {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.btn-check:checked + .status-choice {
    background: linear-gradient(180deg, #7c1823 0%, #65131c 100%);
    border-color: rgba(198, 145, 78, 0.45);
    color: #fff;
}

.amount-positive {
    color: #67df8a !important;
    font-weight: 700;
}

.amount-negative {
    color: #ff8f8f !important;
    font-weight: 700;
}

.amount-neutral {
    color: #f1d28e !important;
    font-weight: 700;
}

.app-bottom-bar {
    margin-left: calc(var(--sidebar-rail-width) + 16px);
    margin-top: 0.5rem;
    min-height: 58px;
    background: linear-gradient(180deg, #13090b 0%, #1a0b0e 100%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(1rem, 0.8rem + 0.9vw, 1.8rem);
}

.theme-battle-master {
    background:
        radial-gradient(circle at top, rgba(171, 118, 72, 0.14), transparent 24%),
        linear-gradient(180deg, #f6ece0 0%, #efe1d3 100%);
}

.theme-battle-master .app-sidebar {
    background:
        linear-gradient(180deg, rgba(20, 8, 8, 0.98) 0%, rgba(43, 15, 16, 0.98) 55%, rgba(58, 18, 19, 0.98) 100%);
    color: #f7e9d5;
    border-right: 1px solid rgba(176, 132, 75, 0.18);
}

.theme-battle-master .brand-mark {
    background: linear-gradient(135deg, #7b101d, #c08a45);
    box-shadow: 0 12px 25px rgba(123, 16, 29, 0.35);
}

.theme-battle-master .nav-pills .nav-link.app-nav-link:hover,
.theme-battle-master .nav-pills .nav-link.app-nav-link.active {
    background: linear-gradient(90deg, rgba(123, 16, 29, 0.42), rgba(192, 138, 69, 0.16));
}

.theme-battle-master .app-topbar,
.theme-battle-master .app-card,
.theme-battle-master .hero-panel,
.theme-battle-master .stat-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.theme-battle-master .hero-kicker {
    color: #8f1b2d;
}

.theme-battle-master .quick-action:hover {
    border-color: rgba(123, 16, 29, 0.35);
}

.battle-login-card {
    background:
        linear-gradient(180deg, rgba(18, 7, 7, 0.98) 0%, rgba(20, 8, 8, 0.99) 100%);
    border-radius: 28px;
    padding: 2rem 1.6rem 1.4rem;
    box-shadow: 0 28px 70px rgba(42, 18, 15, 0.2);
    color: #fff5eb;
    position: relative;
    overflow: hidden;
}

.battle-login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top center, rgba(200, 140, 72, 0.16), transparent 28%),
        radial-gradient(circle at bottom center, rgba(123, 16, 29, 0.18), transparent 34%);
    pointer-events: none;
}

.battle-login-body {
    position: relative;
    z-index: 1;
}

.battle-emblem {
    width: 128px;
    height: 128px;
    margin: 0 auto 0.95rem;
    border-radius: 32px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(204, 157, 88, 0.22);
    box-shadow:
        inset 0 0 22px rgba(255, 220, 169, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.battle-emblem-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.battle-logo-text {
    text-align: center;
    margin-bottom: 1.3rem;
}

.battle-logo-text h1 {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1.16rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
    color: #dca964;
}

.battle-logo-text p {
    margin: 0.25rem 0 0;
    color: rgba(255, 245, 235, 0.7);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.battle-field {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff7ef;
    border-radius: 999px;
    padding: 0.92rem 1.1rem;
    text-align: center;
    font-style: italic;
}

.battle-field::placeholder {
    color: rgba(255, 245, 235, 0.78);
}

.battle-field:focus {
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(220, 169, 100, 0.34);
    color: #fffdf8;
    box-shadow: 0 0 0 0.18rem rgba(123, 16, 29, 0.18);
}

.btn-battle {
    background: linear-gradient(180deg, #7c1823 0%, #65131c 100%);
    color: #fff8f0;
    border: none;
    border-radius: 999px;
    padding: 0.95rem 1.25rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 14px 28px rgba(123, 16, 29, 0.28);
}

.btn-battle:hover,
.btn-battle:focus {
    background: linear-gradient(180deg, #8d1c29 0%, #731822 100%);
    color: #fff;
}

.battle-footer-note {
    text-align: center;
    margin-top: 1rem;
    color: rgba(255, 245, 235, 0.7);
    font-size: 0.7rem;
}

.battle-footer-note strong {
    display: block;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    color: #fff5eb;
    letter-spacing: 0.12em;
    margin-top: 0.18rem;
}

.battle-public-link {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(220, 169, 100, 0.22);
    background: rgba(255, 255, 255, 0.04);
    color: #fff5eb;
    padding: 0.85rem 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.battle-quick-links {
    margin-top: 0.9rem;
}

.battle-public-link:hover,
.battle-public-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.admin-hero {
    background:
        linear-gradient(135deg, rgba(20, 8, 8, 0.96), rgba(58, 18, 19, 0.94)),
        linear-gradient(180deg, rgba(123, 16, 29, 0.6), rgba(192, 138, 69, 0.22));
    color: #fff4e8;
    border-color: rgba(192, 138, 69, 0.18);
}

.admin-hero .hero-kicker,
.admin-hero .hero-copy {
    color: rgba(255, 244, 232, 0.78);
}

.admin-hero .section-title {
    color: #fff7f0;
}

.admin-accent-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

.admin-action {
    border-color: rgba(123, 16, 29, 0.18);
}

.admin-action:hover {
    background: rgba(123, 16, 29, 0.04);
}

.controller-board {
    background:
        radial-gradient(circle at top, rgba(134, 20, 48, 0.2), transparent 34%),
        linear-gradient(180deg, #1c0d13 0%, #14090e 100%);
    color: #fff7f0;
    border-color: rgba(255, 255, 255, 0.08);
}

.controller-status-bar,
.controller-fight-title {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.5rem;
    padding: 0.8rem 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.controller-status-bar {
    background: rgba(255, 0, 0, 0.92);
}

.controller-fight-title {
    background: linear-gradient(180deg, rgba(36, 49, 89, 0.95) 0%, rgba(34, 46, 83, 0.95) 100%);
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    padding-block: 0.65rem;
}

.controller-fight-heading {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(1.55rem, 1.25rem + 0.75vw, 2rem);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.controller-total-bets {
    display: inline-flex;
    align-items: baseline;
    gap: 0.65rem;
    flex-wrap: wrap;
    justify-content: center;
}

.controller-total-bets-label {
    color: rgba(255, 247, 240, 0.7);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.controller-total-bets-value {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(1.55rem, 1.2rem + 1vw, 2.35rem);
    font-weight: 900;
    color: #ffe18f;
    line-height: 1;
}

.controller-side {
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 100%;
}

.controller-side-meron {
    background: linear-gradient(180deg, rgba(220, 20, 60, 0.16) 0%, rgba(38, 16, 23, 0.96) 100%);
}

.controller-side-wala {
    background: linear-gradient(180deg, rgba(0, 0, 128, 0.2) 0%, rgba(17, 24, 52, 0.98) 100%);
}

.controller-side-head {
    text-align: center;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(1.45rem, 1.1rem + 0.75vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    padding: 0.9rem 1rem;
    color: #fff;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.controller-side-meron .controller-side-head {
    background: #dc143c;
}

.controller-side-wala .controller-side-head {
    background: #000080;
}

.controller-side-body {
    padding: 1.15rem 1rem 1.05rem;
    text-align: center;
    display: grid;
    gap: 0.4rem;
}

.controller-big-number {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(3.8rem, 2.8rem + 2.6vw, 5.8rem);
    font-weight: 1000;
    color: #ffe053;
    line-height: 0.96;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
}

.controller-odds-line {
    margin-top: 0.18rem;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(1.55rem, 1.3rem + 0.85vw, 2.45rem);
    font-weight: 900;
    color: #fff7f0;
    line-height: 1;
    white-space: nowrap;
}

.controller-odds-sample {
    color: #ef9718;
}

.controller-meta {
    margin-top: 0.15rem;
    font-size: clamp(1rem, 0.9rem + 0.4vw, 1.35rem);
    font-weight: 800;
    color: rgba(255, 247, 240, 0.92);
    letter-spacing: 0.03em;
}

.controller-action {
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    padding: 0.9rem 1rem;
    text-transform: uppercase;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.controller-action:disabled {
    opacity: 0.55;
}

.controller-win-meron {
    background: #df0000;
}

.controller-win-wala {
    background: #1d79c9;
}

.controller-win-draw {
    background: #08a439;
}

.controller-toggle-open {
    background: #0aa637;
}

.controller-toggle-close {
    background: #a92939;
}

.controller-secondary {
    background: #4a4a4a;
}

.controller-post {
    background: #87007b;
}

.controller-board-footer {
    padding: 0.75rem 0.25rem 0.25rem;
}

.controller-note {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: rgba(255, 247, 240, 0.82);
}

.form-helper-text {
    color: rgba(255, 244, 234, 0.7);
    font-size: 0.82rem;
    line-height: 1.45;
}

.text-secondary,
.small.text-secondary {
    color: rgba(255, 244, 234, 0.6) !important;
}

.app-modal {
    background: linear-gradient(180deg, #16090c 0%, #1e0a0e 100%);
    color: #fff6ee;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
}

.app-popup {
    position: fixed;
    right: 18px;
    bottom: 88px;
    z-index: 2000;
    min-width: 260px;
    max-width: 360px;
    border-radius: 18px;
    padding: 0.9rem 1rem;
    color: #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    opacity: 1;
    transform: translateY(0);
    transition: all 0.22s ease;
}

.app-popup.is-hiding {
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
}

.app-popup-success {
    background: linear-gradient(180deg, #087b34 0%, #065826 100%);
}

.app-popup-danger {
    background: linear-gradient(180deg, #a51524 0%, #7d111c 100%);
}

.app-popup-warning {
    background: linear-gradient(180deg, #af7b11 0%, #825a09 100%);
}

.app-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
}

.app-popup-message {
    padding-right: 1rem;
    font-weight: 600;
}

.settings-list {
    display: grid;
    gap: 0.75rem;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.settings-empty {
    padding: 1rem;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: rgba(255, 244, 234, 0.62);
}

.settings-danger-card {
    border-color: rgba(220, 53, 69, 0.18);
}

.settings-warning-box {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #ffd1d6;
}

.settings-code-input {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.current-games-empty {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
    color: rgba(255, 244, 234, 0.72);
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
}

.teller-terminal {
    background: linear-gradient(180deg, #1a0d10 0%, #14080a 100%);
    color: #f4ede6;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1rem 1.1rem;
}

.teller-terminal-compact {
    width: 100%;
    max-width: none;
}

.teller-terminal-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.teller-terminal-title {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1.15rem;
    margin: 0;
    color: #fff7f0;
}

.teller-terminal-subtitle {
    color: rgba(255, 244, 234, 0.62);
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.teller-terminal-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.teller-mini-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff6ee;
    font-weight: 700;
    padding: 0.7rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.teller-mini-action i {
    font-size: 1rem;
    line-height: 1;
}

.teller-mini-action:hover,
.teller-mini-action:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.teller-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.teller-meta-card {
    min-height: 88px;
    border-radius: 16px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
}

.teller-meta-label {
    color: rgba(255, 244, 234, 0.56);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.teller-meta-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff8ef;
}

.teller-status-pill {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    min-width: 96px;
    padding: 0.4rem 0.85rem;
    border-radius: 10px;
    background: linear-gradient(180deg, #b90d15 0%, #860911 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.84rem;
}

.teller-status-pill.is-open {
    background: linear-gradient(180deg, #0aa637 0%, #08762a 100%);
}

.teller-status-pill.is-closed {
    background: linear-gradient(180deg, #b90d15 0%, #860911 100%);
}

.teller-subtitle-status {
    display: none;
}

.teller-wallet-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f4d596;
}

.teller-bet-form-compact {
    display: grid;
    gap: 0.9rem;
}

.teller-terminal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.9fr);
    gap: 0.8rem;
    align-items: stretch;
}

.teller-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.teller-side-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    color: #fff8ef;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    text-align: left;
    min-height: 220px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.teller-side-card:hover,
.teller-side-card:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.teller-side-card.is-disabled,
.teller-side-card:disabled {
    opacity: 0.46;
    box-shadow: none;
    transform: none;
}

.teller-side-meron {
    background: linear-gradient(180deg, rgba(145, 10, 18, 0.92) 0%, rgba(92, 7, 14, 0.96) 100%);
}

.teller-side-wala {
    background: linear-gradient(180deg, rgba(22, 69, 149, 0.92) 0%, rgba(12, 43, 101, 0.96) 100%);
}

.teller-side-name {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.teller-side-odds-line {
    color: rgba(255, 248, 239, 0.82);
    font-size: 1rem;
}

.teller-side-return-line {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffe18f;
}

.teller-side-caption {
    margin-top: auto;
    color: rgba(255, 248, 239, 0.74);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.teller-amount-card {
    border-radius: 18px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.teller-amount-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
}

.teller-amount-label {
    color: rgba(255, 244, 234, 0.7);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.teller-amount-input-row {
    display: grid;
    grid-template-columns: 1fr auto;
}

.teller-amount-input {
    border-radius: 12px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    min-height: 54px;
}

.teller-clear-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #3d3d3d;
    color: #fff;
    border-radius: 12px;
    padding: 0 0.95rem;
    font-weight: 700;
    min-height: 54px;
}

.teller-chip-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.teller-chip {
    border: 1px solid #caa25d;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    color: #f1d28e;
    font-weight: 700;
    padding: 0.75rem 0.4rem;
    min-height: 48px;
}

.teller-info-box {
    margin-top: 0.8rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.9rem 1rem;
    color: rgba(255, 244, 234, 0.82);
}

.teller-compact-note {
    margin-top: 0.7rem;
    color: rgba(255, 244, 234, 0.68);
    font-size: 0.84rem;
}

.teller-short-actions {
    display: grid;
    gap: 0.75rem;
}

.teller-short-actions .controller-action {
    text-decoration: none;
}

.public-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(163, 20, 40, 0.2), transparent 28%),
        radial-gradient(circle at top right, rgba(24, 76, 169, 0.18), transparent 24%),
        linear-gradient(180deg, #120709 0%, #16090b 100%);
    color: #fff7f0;
}

.public-monitor-shell {
    min-height: 100vh;
    padding: 0.75rem;
    display: grid;
    gap: 0.55rem;
    align-content: start;
    grid-template-rows: auto auto minmax(0, 1fr);
    position: relative;
}

.public-meta-card,
.public-board-card,
.public-side-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    color: #fff7f0;
}

.public-body .hero-kicker,
.public-body .text-secondary {
    color: rgba(255, 247, 240, 0.68) !important;
}

.public-toolbar {
    padding: 0.14rem 0.5rem;
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto minmax(220px, 1fr);
    align-items: center;
    gap: 0.18rem;
}

.public-toolbar-copy {
    min-width: 0;
    justify-self: start;
    display: grid;
    gap: 0.02rem;
}

.public-toolbar-total-label {
    color: rgba(255, 247, 240, 0.62);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.52rem;
    line-height: 1;
}

.public-toolbar-total-value {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(1.45rem, 1.15rem + 0.85vw, 2.4rem);
    font-weight: 700;
    line-height: 1;
    color: #fff8ef;
    white-space: nowrap;
}

.public-toolbar-fight {
    text-align: center;
    justify-self: center;
}

.public-toolbar-fight-label,
.public-toolbar-time-label {
    color: rgba(255, 247, 240, 0.62);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.56rem;
    margin-bottom: 0.05rem;
}

.public-toolbar-fight-value {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(2.8rem, 2.3rem + 2vw, 4.8rem);
    font-weight: 800;
    line-height: 1;
    color: #fff8ef;
}

.public-toolbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.18rem;
    min-width: 0;
    justify-self: end;
}

.public-toolbar-time {
    text-align: right;
}

.public-toolbar-time-value {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(0.72rem, 0.7rem + 0.18vw, 0.9rem);
    font-weight: 700;
    color: #fff7f0;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.public-fullscreen-btn {
    border: none;
    border-radius: 12px;
    background: #1295d4;
    color: #fff;
    font-weight: 700;
    padding: 0.34rem 0.62rem;
}

.public-meta-grid {
    display: block;
}

.public-meta-card {
    padding: 0.9rem 1rem;
}

.public-meta-card-total {
    width: 100%;
    padding: 0.48rem 0.9rem 0.56rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.public-meta-card-total .public-meta-label {
    margin-bottom: 0;
}

.public-meta-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.public-meta-label {
    color: rgba(255, 247, 240, 0.66);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

.public-meta-value {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(2.1rem, 1.8rem + 1.1vw, 3.4rem);
    font-weight: 700;
    color: #fff8ef;
    line-height: 1;
}

.public-meta-card-total .public-meta-value {
    font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.8rem);
    text-align: right;
}

.public-side-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    align-items: start;
}

.public-side-panel {
    overflow: hidden;
}

.public-side-panel.meron {
    background: rgba(27, 19, 19, 0.98);
}

.public-side-panel.wala {
    background: rgba(27, 19, 19, 0.98);
}

.public-side-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 82px;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(2.9rem, 2.3rem + 2.7vw, 5.5rem);
    font-weight: 1000;
    letter-spacing: 0.1em;
    color: #fff;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.public-side-panel.meron .public-side-header {
    background: #dc143c;
}

.public-side-panel.wala .public-side-header {
    background: #000080;
}

.public-side-body {
    padding: 0.4rem 0.82rem 0.26rem;
    display: grid;
    gap: 0.08rem;
}

.public-side-main {
    min-width: 0;
}

.public-side-total-label {
    color: rgba(255, 247, 240, 0.68);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.68rem;
    margin-bottom: 0;
}

.public-side-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.32rem;
}

.public-side-amount {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(4rem, 13vw, 21rem);
    font-weight: 1000;
    color: #fff7f0;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
    width: 100%;
    overflow: hidden;
}

.public-odds-line {
    font-size: clamp(2rem, 1.65rem + 1.25vw, 3.2rem);
    font-weight: 800;
    color: #fff7f0;
    white-space: nowrap;
    letter-spacing: 0.01em;
    line-height: 1;
}

.public-odds-sample-value {
    color: #ef9718;
}

.public-side-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.22rem;
    justify-content: flex-end;
    margin-left: auto;
    align-items: center;
}

.public-side-metric {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    line-height: 1;
}

.public-side-metric-label {
    color: rgba(255, 247, 240, 0.9);
    font-size: 1.15rem;
    font-weight: 1000;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.public-side-metric-value {
    color: #ff5f7a;
    font-size: 1.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.public-side-panel.wala .public-side-metric-value {
    color: #64a9ff;
}

.public-board-card {
    padding: 0.8rem 1rem 0.95rem;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.public-fights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(62px, 62px));
    grid-auto-rows: 62px;
    grid-auto-flow: row;
    gap: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: none;
    min-height: 0;
    flex: 1 1 auto;
    align-content: start;
    padding: 0.2rem 0.15rem 0.55rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
}

.public-fight-chip {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 2rem;
    font-weight: 1000;
    color: #fff7f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex: 0 0 auto;
}

.public-fight-pending {
    background: rgba(255, 255, 255, 0.05);
}

.public-fight-meron {
    background: linear-gradient(180deg, #cf1a38 0%, #8b1026 100%);
}

.public-fight-wala {
    background: linear-gradient(180deg, #1e6ee2 0%, #123f9d 100%);
}

.public-fight-draw {
    background: linear-gradient(180deg, #f0c546 0%, #c99712 100%);
    color: #201500;
}

.public-fight-chip.is-current {
    box-shadow: 0 0 0 3px rgba(244, 213, 150, 0.9);
    transform: translateY(-2px);
}

.public-recent-list {
    display: grid;
    gap: 0.65rem;
}

.public-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.public-recent-side {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    border-radius: 999px;
    padding: 0.34rem 0.72rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.public-recent-side.meron {
    background: rgba(220, 20, 60, 0.9);
}

.public-recent-side.wala {
    background: rgba(29, 121, 201, 0.9);
}

.public-recent-meta {
    margin-top: 0.28rem;
    color: rgba(255, 247, 240, 0.68);
    font-size: 0.82rem;
}

.public-recent-amount {
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffe18f;
}

.public-empty-state {
    grid-column: 1 / -1;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    padding: 1rem;
    text-align: center;
    color: rgba(255, 247, 240, 0.68);
}

.public-bet-popup-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2100;
    width: min(340px, calc(100vw - 2rem));
    display: grid;
    gap: 0.7rem;
    pointer-events: none;
}

.public-winner-popup-layer {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: grid;
    place-items: center;
    pointer-events: none;
    padding: 1.5rem;
}

.public-winner-popup {
    width: min(720px, calc(100vw - 3rem));
    border-radius: 30px;
    padding: 1.35rem 1.6rem 1.5rem;
    text-align: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(22, 10, 12, 0.72) 0%, rgba(18, 8, 10, 0.62) 100%);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
    opacity: 0;
    transform: scale(0.96) translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.public-winner-popup.is-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.public-winner-popup.meron {
    background: linear-gradient(180deg, rgba(176, 19, 45, 0.78) 0%, rgba(118, 10, 30, 0.68) 100%);
}

.public-winner-popup.wala {
    background: linear-gradient(180deg, rgba(31, 101, 211, 0.78) 0%, rgba(18, 65, 150, 0.68) 100%);
}

.public-winner-popup.draw {
    background: linear-gradient(180deg, rgba(219, 171, 25, 0.8) 0%, rgba(168, 122, 10, 0.68) 100%);
    color: #241300;
}

.public-winner-popup-kicker {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.public-winner-popup.draw .public-winner-popup-kicker {
    color: rgba(36, 19, 0, 0.82);
}

.public-winner-popup-body {
    margin-top: 0.35rem;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(3rem, 2.2rem + 2.8vw, 6rem);
    font-weight: 1000;
    letter-spacing: 0.08em;
    line-height: 1;
}

.public-winner-popup-meta {
    margin-top: 0.45rem;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(1rem, 0.88rem + 0.6vw, 1.6rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
}

.public-winner-popup.draw .public-winner-popup-meta {
    color: rgba(36, 19, 0, 0.9);
}

.public-bet-popup {
    border-radius: 18px;
    padding: 0.9rem 1rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(14px);
}

.public-bet-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.public-bet-popup.meron {
    background: linear-gradient(180deg, rgba(176, 19, 45, 0.72) 0%, rgba(125, 12, 32, 0.62) 100%);
}

.public-bet-popup.wala {
    background: linear-gradient(180deg, rgba(31, 101, 211, 0.72) 0%, rgba(20, 66, 153, 0.62) 100%);
}

.public-bet-popup-kicker {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.74);
}

.public-bet-popup-body {
    margin-top: 0.3rem;
    font-weight: 700;
    font-size: 1.05rem;
}

.public-bet-popup-meta {
    margin-top: 0.28rem;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1.05rem;
    color: #ffe18f;
}

.auth-grid {
    width: min(1140px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 430px);
    gap: 1.2rem;
    align-items: stretch;
}

.auth-showcase,
.auth-panel {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.auth-showcase {
    background:
        linear-gradient(145deg, rgba(0, 0, 128, 0.85), rgba(45, 34, 24, 0.92)),
        linear-gradient(180deg, #1b1b52, #24180e);
    color: #fff8f0;
    padding: clamp(1.5rem, 1.2rem + 1vw, 2.3rem);
    position: relative;
    min-height: 100%;
}

.auth-showcase::before,
.auth-showcase::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: 0.35;
}

.auth-showcase::before {
    width: 240px;
    height: 240px;
    background: rgba(220, 20, 60, 0.28);
    top: -40px;
    right: -40px;
}

.auth-showcase::after {
    width: 180px;
    height: 180px;
    background: rgba(255, 193, 7, 0.18);
    bottom: -30px;
    left: -30px;
}

.auth-panel {
    background: rgba(255, 253, 248, 0.95);
    padding: 1.5rem;
    border: 1px solid rgba(125, 85, 24, 0.12);
}

.battle-login-card.auth-panel {
    background:
        linear-gradient(180deg, rgba(18, 7, 7, 0.98) 0%, rgba(20, 8, 8, 0.99) 100%);
    border: 1px solid rgba(204, 157, 88, 0.12);
}

.battle-showcase {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1.25rem;
}

.battle-showcase-copy,
.battle-showcase-panels {
    position: relative;
    z-index: 1;
}

.battle-showcase-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8d391;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.battle-showcase-title {
    margin: 1rem 0 0.75rem;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: clamp(2rem, 1.5rem + 1.8vw, 3.4rem);
    line-height: 0.98;
    color: #fff9f0;
}

.battle-showcase-text {
    max-width: 42rem;
    margin: 0;
    color: rgba(255, 246, 236, 0.76);
    font-size: 1rem;
    line-height: 1.7;
}

.battle-showcase-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
    align-self: end;
}

.battle-metric-card {
    min-height: 150px;
    padding: 1rem 1rem 1.05rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.battle-metric-label {
    color: #f6c16b;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
}

.battle-metric-value {
    margin-top: 0.55rem;
    font-family: "Space Grotesk", "Poppins", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff9f0;
}

.battle-metric-note {
    margin-top: 0.45rem;
    color: rgba(255, 246, 236, 0.68);
    font-size: 0.86rem;
    line-height: 1.55;
}

.auth-input {
    border-radius: 14px;
    border: 1px solid rgba(125, 85, 24, 0.18);
    padding: 0.85rem 0.95rem;
}

.auth-input:focus {
    border-color: rgba(173, 124, 51, 0.7);
    box-shadow: 0 0 0 0.2rem rgba(173, 124, 51, 0.16);
}

.metric-chip {
    padding: 0.8rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.content-fade {
    animation: contentFade 0.24s ease;
}

@keyframes contentFade {
    from {
        opacity: 0.65;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1200px) {
    .app-sidebar {
        width: var(--sidebar-width);
        padding: 1rem 0.9rem 1.15rem;
    }

    .sidebar-brand-copy,
    .sidebar-panel,
    .section-label,
    .app-nav-link span {
        display: block;
    }

    .nav-pills .nav-link.app-nav-link {
        justify-content: flex-start;
        gap: 0.8rem;
        padding-inline: 1rem;
        font-size: 1rem;
    }

    .nav-pills .nav-link.app-nav-link i {
        font-size: 1.1rem;
    }

    .app-main,
    .app-bottom-bar {
        margin-left: calc(var(--sidebar-width) + 16px);
    }
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        margin: 0;
        height: 100vh;
        border-radius: 0 24px 24px 0;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
        padding: 1rem;
    }

    .app-bottom-bar {
        margin-left: 0;
    }

    .auth-grid {
        grid-template-columns: 1fr;
    }

    .battle-showcase-panels {
        grid-template-columns: 1fr;
    }

    .public-fights-grid {
        grid-template-columns: repeat(auto-fill, minmax(56px, 56px));
        grid-auto-rows: 56px;
        max-height: 308px;
    }

    .teller-terminal-layout {
        grid-template-columns: 1fr;
    }

    .teller-meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .teller-side-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teller-chip-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 575.98px) {
    .hero-panel,
    .auth-panel,
    .auth-showcase,
    .app-topbar,
    .stat-card {
        padding: 1.2rem;
    }

    .teller-terminal {
        padding: 0.7rem;
    }

    .controller-status-bar,
    .controller-fight-title {
        padding-inline: 0.85rem;
    }

    .controller-fight-heading {
        font-size: 1.2rem;
    }

    .controller-total-bets {
        gap: 0.4rem;
    }

    .controller-total-bets-label {
        font-size: 0.72rem;
        letter-spacing: 0.1em;
    }

    .controller-total-bets-value {
        font-size: 1.35rem;
    }

    .controller-side-head {
        font-size: 1.55rem;
    }

    .controller-big-number {
        font-size: 3rem;
    }

    .controller-odds-line {
        font-size: 1.35rem;
        white-space: normal;
    }

    .controller-meta {
        font-size: 0.95rem;
    }

    .public-monitor-shell {
        padding: 0.75rem;
        gap: 0.6rem;
        grid-template-rows: auto auto minmax(0, 1fr);
    }

    .public-toolbar {
        grid-template-columns: 1fr;
        gap: 0.35rem;
        text-align: left;
    }

    .public-meta-grid {
        display: block;
    }

    .public-meta-card,
    .public-side-panel,
    .public-board-card {
        border-radius: 18px;
    }

    .public-meta-card {
        padding: 0.85rem 1rem;
    }

    .public-meta-card-total {
        width: 100%;
        padding: 0.58rem 0.82rem;
        display: block;
    }

    .public-meta-value {
        font-size: 1.6rem;
    }

    .public-toolbar-fight {
        justify-self: start;
        text-align: left;
    }

    .public-toolbar-fight-value {
        font-size: 2.4rem;
    }

    .public-side-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .public-side-header {
        min-height: 64px;
        font-size: 2.5rem;
    }

    .public-side-body {
        padding: 0.48rem 0.76rem 0.36rem;
        display: grid;
        justify-content: stretch;
        text-align: left;
    }

    .public-side-amount {
        font-size: 2.35rem;
    }

    .public-odds-line {
        font-size: 1.45rem;
    }

    .public-side-metrics {
        justify-content: flex-start;
        margin-left: 0;
    }

    .public-side-details {
        justify-content: flex-start;
        text-align: left;
        gap: 0.22rem 0.45rem;
    }

    .public-fights-grid {
        grid-template-columns: repeat(auto-fill, minmax(48px, 48px));
        grid-auto-rows: 48px;
        gap: 0.4rem;
        max-height: none;
    }

    .public-fight-chip {
        width: 48px;
        height: 48px;
        font-size: 1.05rem;
    }

    .public-recent-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }

    .public-bet-popup-stack {
        top: auto;
        right: 12px;
        bottom: 12px;
        width: min(300px, calc(100vw - 1.5rem));
    }

    .public-winner-popup {
        width: min(92vw, 560px);
        padding: 1rem 1.1rem 1.15rem;
        border-radius: 24px;
    }

    .public-winner-popup-kicker {
        font-size: 0.78rem;
    }

    .public-winner-popup-body {
        font-size: clamp(2.3rem, 1.85rem + 1.8vw, 3.6rem);
    }

    .public-winner-popup-meta {
        font-size: 1rem;
    }

    .public-toolbar-right {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .public-toolbar-time {
        text-align: left;
    }

    .public-toolbar-time-value {
        white-space: normal;
    }

    .app-topbar {
        align-items: flex-start;
    }

    .app-topbar-left {
        gap: 0.7rem;
    }

    .app-topbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    .auth-grid {
        width: 100%;
        gap: 0.9rem;
    }

    .auth-showcase {
        display: none;
    }

    .battle-login-card {
        padding: 1.35rem 1rem 1.05rem;
    }

    .battle-emblem {
        width: 104px;
        height: 104px;
        border-radius: 24px;
    }

    .battle-showcase-title {
        font-size: 1.85rem;
    }

    .battle-showcase-text {
        font-size: 0.92rem;
        line-height: 1.6;
    }

    .battle-metric-card {
        min-height: 0;
        padding: 0.9rem;
    }

    .teller-terminal-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 0.45rem;
    }

    .teller-terminal-actions {
        width: auto;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .teller-mini-action {
        width: 38px;
        min-width: 38px;
        min-height: 38px;
        border-radius: 10px;
        padding: 0;
        font-size: 0;
    }

    .teller-mini-action i {
        font-size: 1rem;
    }

    .teller-mini-action span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .teller-terminal-subtitle {
        gap: 0.4rem;
        font-size: 0.8rem;
        line-height: 1.2;
    }

    .teller-subtitle-status {
        display: inline-flex;
        width: 14px;
        min-width: 14px;
        height: 14px;
        padding: 0;
        border-radius: 999px;
        font-size: 0;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
    }

    .teller-meta-grid {
        grid-template-columns: minmax(86px, 0.65fr) minmax(0, 1.35fr);
        gap: 0.45rem;
    }

    .teller-status-card {
        display: none;
    }

    .teller-meta-card {
        min-height: 66px;
        padding: 0.55rem 0.6rem;
        border-radius: 12px;
    }

    .teller-meta-label {
        font-size: 0.62rem;
    }

    .teller-meta-value,
    .teller-wallet-amount {
        font-size: 0.95rem;
    }

    .teller-status-pill {
        min-width: 74px;
        padding: 0.35rem 0.55rem;
        font-size: 0.72rem;
    }

    .teller-meta-card:last-child {
        grid-column: auto;
    }

    .teller-terminal-layout {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .teller-side-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .teller-side-card {
        min-height: 150px;
        padding: 0.8rem 0.7rem;
        border-radius: 14px;
    }

    .teller-side-name {
        font-size: 1rem;
    }

    .teller-side-odds-line {
        font-size: 0.78rem;
    }

    .teller-side-return-line {
        display: none;
    }

    .teller-side-caption {
        font-size: 0.72rem;
    }

    .teller-amount-card {
        padding: 0.75rem;
        border-radius: 14px;
    }

    .teller-amount-row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 0.45rem;
    }

    .teller-amount-input {
        min-height: 46px;
        font-size: 0.92rem;
        padding: 0.7rem 0.8rem;
    }

    .teller-clear-btn {
        min-height: 46px;
        padding: 0 0.75rem;
        font-size: 0.8rem;
    }

    .teller-chip-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .teller-chip {
        min-height: 42px;
        padding: 0.55rem 0.2rem;
        font-size: 0.8rem;
    }

    .teller-compact-note {
        margin-top: 0.55rem;
        font-size: 0.76rem;
    }
}

/* Density and mobile comfort pass */
:root {
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --shadow-lg: 0 12px 34px rgba(49, 35, 20, 0.14);
    --shadow-md: 0 8px 22px rgba(49, 35, 20, 0.1);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.app-shell {
    padding: 0.45rem;
}

.app-sidebar {
    border-radius: 20px;
    margin: 0.45rem 0 0.45rem 0.45rem;
    height: calc(100vh - 0.9rem);
}

.app-main {
    min-width: 0;
    min-height: calc(100vh - 0.9rem);
    padding: 0.85rem;
    border-radius: 20px;
}

.app-topbar {
    min-height: 58px;
    padding: 0.65rem 0.8rem;
    border-radius: 16px;
    margin-bottom: 0.8rem !important;
    flex-wrap: wrap;
}

.app-page-title {
    font-size: 1.45rem;
    line-height: 1.12;
}

.hero-kicker {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.app-card,
.hero-panel,
.stat-card,
.teller-terminal,
.public-side-panel,
.public-board-card,
.public-meta-card {
    border-color: rgba(255, 255, 255, 0.06);
}

.app-main .row.g-4,
.app-main .g-4 {
    --bs-gutter-x: 0.8rem;
    --bs-gutter-y: 0.8rem;
}

.app-main .mb-4 {
    margin-bottom: 0.8rem !important;
}

.app-main .p-5 {
    padding: 1.35rem !important;
}

.app-main .p-4 {
    padding: 0.95rem !important;
}

.app-main .py-4 {
    padding-top: 0.8rem !important;
    padding-bottom: 0.8rem !important;
}

.section-title {
    font-size: 1rem;
    line-height: 1.2;
}

.stat-card {
    padding: 0.9rem;
}

.stat-value {
    font-size: 1.45rem;
    margin: 0.25rem 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-modern {
    min-width: 680px;
    margin-bottom: 0;
}

.table-modern th,
.table-modern td {
    padding: 0.52rem 0.62rem;
    white-space: nowrap;
}

.btn,
.form-control,
.form-select {
    min-height: 40px;
}

.form-control,
.form-select,
textarea.form-control {
    border-radius: 10px;
}

.btn-battle,
.controller-action,
.teller-mini-action,
.teller-chip,
.status-badge,
.transaction-badge {
    overflow-wrap: anywhere;
}

.controller-status-bar,
.controller-fight-title {
    margin-bottom: 0.4rem;
    padding: 0.62rem 0.75rem;
}

.controller-fight-heading {
    font-size: 1.45rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.controller-side-head {
    padding: 0.68rem 0.75rem;
}

.controller-side-body {
    padding: 0.85rem 0.8rem;
}

.controller-big-number {
    font-size: 3.6rem;
    letter-spacing: 0;
}

.controller-odds-line {
    font-size: 1.45rem;
    white-space: normal;
}

.controller-action {
    min-height: 44px;
    padding: 0.68rem 0.75rem;
    line-height: 1.12;
}

.controller-board-footer {
    padding: 0.55rem 0 0;
}

.controller-note,
.settings-row,
.settings-warning-box,
.settings-empty,
.teller-info-box {
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
}

.teller-terminal {
    border-radius: 16px;
    padding: 0.75rem;
}

.teller-terminal-top {
    margin-bottom: 0.65rem;
}

.teller-terminal-title {
    font-size: 1.05rem;
}

.teller-meta-grid {
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.teller-meta-card {
    min-height: 70px;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
}

.teller-meta-value,
.teller-wallet-amount {
    font-size: 1.08rem;
}

.teller-bet-form-compact,
.teller-terminal-layout,
.teller-side-grid {
    gap: 0.55rem;
}

.teller-side-card {
    min-height: 168px;
    border-radius: 14px;
    padding: 0.8rem;
}

.teller-side-name {
    font-size: 1.12rem;
}

.teller-side-return-line {
    font-size: 1.12rem;
    line-height: 1.18;
}

.teller-side-caption {
    font-size: 0.74rem;
    letter-spacing: 0.04em;
}

.teller-amount-card {
    border-radius: 14px;
    padding: 0.8rem;
}

.teller-amount-input,
.teller-clear-btn {
    min-height: 46px;
}

.teller-chip {
    min-height: 42px;
    padding: 0.52rem 0.3rem;
}

.public-monitor-shell {
    padding: 0.5rem;
    gap: 0.4rem;
}

.public-side-row {
    gap: 0.4rem;
}

.public-side-header {
    min-height: 64px;
    letter-spacing: 0.04em;
}

.public-side-body {
    padding: 0.38rem 0.62rem 0.3rem;
}

.public-side-amount {
    letter-spacing: 0;
}

.public-board-card {
    padding: 0.65rem 0.75rem;
}

@media (min-width: 1200px) {
    .app-main,
    .app-bottom-bar {
        margin-left: calc(var(--sidebar-width) + 10px);
    }

    .app-sidebar {
        padding: 0.85rem;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        padding: 0;
        background: #120709;
    }

    .app-sidebar {
        width: min(82vw, 280px);
        height: 100vh;
        margin: 0;
        border-radius: 0 18px 18px 0;
    }

    .app-main {
        min-height: 100vh;
        margin-left: 0;
        padding: 0.65rem;
        border: 0;
        border-radius: 0;
    }

    .app-topbar {
        padding: 0.55rem 0.65rem;
        border-radius: 12px;
    }

    .app-topbar-right {
        min-width: 0;
    }

    .status-badge {
        max-width: 100%;
        padding: 0.35rem 0.55rem;
        font-size: 0.74rem;
    }

    .app-page-title {
        font-size: 1.22rem;
    }

    .app-main .row.g-4,
    .app-main .g-4 {
        --bs-gutter-x: 0.6rem;
        --bs-gutter-y: 0.6rem;
    }

    .app-main .p-5,
    .app-main .p-4 {
        padding: 0.75rem !important;
    }

    .table-modern {
        min-width: 620px;
    }
}

@media (max-width: 575.98px) {
    .app-main {
        padding: 0.5rem;
    }

    .app-topbar {
        gap: 0.45rem;
        align-items: center;
    }

    .app-topbar-left {
        width: 100%;
        align-items: center;
    }

    .app-topbar-right {
        width: 100%;
        justify-content: flex-start;
    }

    .app-topbar-toggle {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .hero-kicker {
        display: none;
    }

    .app-main .row.g-4,
    .app-main .g-4 {
        --bs-gutter-x: 0.45rem;
        --bs-gutter-y: 0.45rem;
    }

    .app-main .mb-4 {
        margin-bottom: 0.55rem !important;
    }

    .app-main .p-5,
    .app-main .p-4,
    .hero-panel,
    .auth-panel,
    .auth-showcase,
    .stat-card {
        padding: 0.65rem !important;
    }

    .app-card,
    .teller-terminal,
    .app-modal {
        border-radius: 12px;
    }

    .section-title {
        font-size: 0.95rem;
    }

    .table-modern {
        min-width: 560px;
    }

    .table-modern th,
    .table-modern td {
        padding: 0.45rem 0.5rem;
        font-size: 0.82rem;
    }

    .controller-status-bar,
    .controller-fight-title {
        border-radius: 10px;
        padding: 0.48rem 0.55rem;
    }

    .controller-fight-heading {
        font-size: 1.05rem;
    }

    .controller-total-bets-value {
        font-size: 1.18rem;
    }

    .controller-big-number {
        font-size: 2.45rem;
    }

    .controller-odds-line {
        font-size: 1.08rem;
        line-height: 1.16;
    }

    .controller-side-head {
        padding: 0.55rem;
        font-size: 1.25rem;
        letter-spacing: 0.03em;
    }

    .controller-side-body {
        padding: 0.65rem 0.55rem;
    }

    .controller-note {
        padding: 0.6rem;
    }

    .teller-terminal {
        padding: 0.55rem;
    }

    .teller-terminal-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .teller-terminal-actions .teller-mini-action:first-child {
        grid-column: auto;
    }

    .teller-mini-action {
        min-width: 0;
        min-height: 36px;
        padding: 0.45rem 0.35rem;
        font-size: 0.68rem;
        line-height: 1.1;
    }

    .teller-meta-grid {
        grid-template-columns: minmax(76px, 0.62fr) minmax(0, 1.38fr);
        gap: 0.35rem;
    }

    .teller-meta-card {
        min-height: 58px;
        padding: 0.45rem 0.5rem;
    }

    .teller-meta-label {
        font-size: 0.58rem;
        letter-spacing: 0.05em;
    }

    .teller-status-pill {
        min-width: 0;
        width: 100%;
    }

    .teller-side-card {
        min-height: 116px;
        padding: 0.62rem;
    }

    .teller-side-return-line {
        display: none;
    }

    .teller-amount-row {
        grid-template-columns: 1fr auto;
    }

    .teller-amount-label {
        grid-column: 1 / -1;
    }

    .teller-chip-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .public-monitor-shell {
        min-height: 100svh;
        padding: 0.4rem;
        gap: 0.35rem;
    }

    .public-toolbar {
        padding: 0.1rem 0.2rem;
    }

    .public-side-row {
        gap: 0.35rem;
    }

    .public-side-panel,
    .public-board-card {
        border-radius: 12px;
    }

    .public-side-header {
        min-height: 52px;
        font-size: 2rem;
    }

    .public-side-amount {
        font-size: 2rem;
    }

    .public-odds-line {
        font-size: 1.12rem;
        white-space: normal;
    }

    .public-side-metric-label,
    .public-side-metric-value {
        font-size: 0.9rem;
    }
}

@media (max-width: 380px) {
    .app-page-title {
        font-size: 1.08rem;
    }

    .teller-side-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .teller-side-card {
        min-height: 102px;
        padding: 0.5rem;
    }

    .teller-side-name {
        font-size: 0.9rem;
    }

    .teller-side-odds-line,
    .teller-side-caption {
        font-size: 0.64rem;
    }

    .teller-chip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .app-topbar {
        flex-wrap: nowrap;
    }

    .app-topbar-left {
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

    .app-topbar-right {
        width: auto;
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    .app-topbar-right .status-badge {
        width: 34px;
        min-width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 999px;
        font-size: 0;
        justify-content: center;
    }

    .app-topbar-right .status-badge i {
        font-size: 0.9rem;
    }

    .app-topbar-right .status-badge span {
        display: none;
    }

    .teller-terminal-subtitle {
        flex-wrap: nowrap;
        gap: 0.35rem;
        font-size: 0.72rem;
        line-height: 1.15;
        white-space: nowrap;
    }

    .teller-subtitle-status {
        display: inline-flex !important;
        flex: 0 0 10px;
        width: 10px !important;
        min-width: 10px !important;
        height: 10px !important;
        padding: 0 !important;
        border-radius: 999px;
        font-size: 0 !important;
        box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
    }
}

/* Mobile shell and modal cleanup */
@media (max-width: 991.98px) {
    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 1025;
        background: rgba(0, 0, 0, 0.58);
        backdrop-filter: blur(2px);
    }

    .app-sidebar {
        width: min(84vw, 292px);
        padding: 0.85rem;
        border-radius: 0 16px 16px 0;
        box-shadow: 18px 0 40px rgba(0, 0, 0, 0.42);
    }

    .app-sidebar .sidebar-brand-copy,
    .app-sidebar .sidebar-panel,
    .app-sidebar .section-label,
    .app-sidebar .app-nav-link span {
        display: block;
    }

    .app-sidebar .brand-mark {
        width: 2.55rem;
        height: 2.55rem;
        border-radius: 12px;
    }

    .app-sidebar .brand-title {
        font-size: 0.98rem;
        line-height: 1.15;
    }

    .app-sidebar .brand-subtitle,
    .app-sidebar .helper-text {
        font-size: 0.72rem;
        line-height: 1.25;
    }

    .app-sidebar .sidebar-panel {
        padding: 0.72rem;
        margin-bottom: 0.7rem !important;
        border-radius: 12px;
    }

    .app-sidebar .section-label {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .app-sidebar .nav-pills .nav-link.app-nav-link {
        justify-content: flex-start;
        gap: 0.65rem;
        min-height: 42px;
        padding: 0.58rem 0.72rem;
        border-radius: 11px;
        font-size: 0.86rem;
    }

    .app-sidebar .nav-pills .nav-link.app-nav-link i {
        width: 20px;
        min-width: 20px;
        font-size: 1rem;
    }

    .modal {
        --bs-modal-margin: 0.5rem;
    }

    .modal-dialog {
        margin: var(--bs-modal-margin);
    }

    .app-modal {
        max-height: calc(100dvh - 1rem);
        overflow: hidden;
        border-radius: 14px;
        box-shadow: 0 18px 54px rgba(0, 0, 0, 0.45);
    }

    .app-modal .modal-header {
        align-items: center;
        padding: 0.75rem 0.85rem 0.55rem;
        gap: 0.65rem;
    }

    .app-modal .modal-body {
        max-height: calc(100dvh - 5.5rem);
        overflow-y: auto;
        padding: 0 0.85rem 0.85rem;
        -webkit-overflow-scrolling: touch;
    }

    .app-modal .modal-footer {
        padding: 0.65rem 0.85rem 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .modal-fullscreen-sm-down {
        width: 100vw;
        max-width: none;
        height: 100dvh;
        margin: 0;
    }

    .modal-fullscreen-sm-down .app-modal {
        height: 100dvh;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }

    .modal-fullscreen-sm-down .app-modal .modal-header {
        flex: 0 0 auto;
        min-height: 52px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .modal-fullscreen-sm-down .app-modal .modal-body {
        flex: 1 1 auto;
        max-height: none;
        padding: 0.65rem;
    }

    .app-modal .table-responsive {
        margin: 0 -0.25rem;
        padding-bottom: 0.35rem;
    }

    .app-modal .table-modern {
        min-width: 520px;
    }

    .app-modal .table-modern th,
    .app-modal .table-modern td {
        padding: 0.42rem 0.45rem;
        font-size: 0.78rem;
        vertical-align: middle;
    }

    .recent-ticket-actions {
        gap: 0.3rem;
        flex-wrap: nowrap;
    }

    .recent-ticket-actions .btn,
    .recent-ticket-actions .small {
        min-height: 30px;
        padding: 0.28rem 0.48rem;
        font-size: 0.68rem;
        white-space: nowrap;
    }
}

/* Superadmin dashboard and report density */
.dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.compact-stat {
    min-height: 128px;
    padding: 1rem;
}

.compact-stat .stat-value {
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.05;
}

.dashboard-panel {
    padding: 1rem;
}

.dashboard-split {
    display: grid;
    gap: 0.85rem;
}

.dashboard-split-row {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) minmax(92px, auto);
    gap: 0.75rem;
    align-items: center;
}

.dashboard-split-label,
.dashboard-split-money {
    font-weight: 800;
    white-space: nowrap;
}

.dashboard-split-track,
.dashboard-bar-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-split-fill,
.dashboard-bar-fill {
    height: 100%;
    min-width: 3px;
    border-radius: inherit;
}

.meron-fill,
.gross-fill {
    background: linear-gradient(90deg, #b9162a, #f25b68);
}

.wala-fill {
    background: linear-gradient(90deg, #0f3f8c, #52a7ff);
}

.income-fill {
    background: linear-gradient(90deg, #d6a33a, #ffe08b);
}

.income-track {
    height: 8px;
    opacity: 0.78;
}

.meron-text {
    color: #ff8d98;
}

.wala-text {
    color: #8fbdff;
}

.dashboard-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.dashboard-mini-grid > div,
.dashboard-metric-list > div {
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
}

.dashboard-mini-grid span,
.dashboard-metric-list span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-mini-grid strong,
.dashboard-metric-list strong {
    display: block;
    color: var(--text-main);
    font-size: 0.98rem;
    line-height: 1.25;
}

.dashboard-metric-list {
    display: grid;
    gap: 0.55rem;
}

.dashboard-metric-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-metric-list span {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.84rem;
}

.dashboard-metric-list strong {
    text-align: right;
    font-size: 0.95rem;
}

.dashboard-bars {
    display: grid;
    gap: 0.75rem;
}

.dashboard-bar-row {
    display: grid;
    grid-template-columns: minmax(140px, 0.9fr) minmax(180px, 1.4fr) minmax(112px, auto);
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-bar-row:last-child {
    border-bottom: 0;
}

.dashboard-bar-name strong,
.dashboard-bar-name span,
.dashboard-bar-values strong,
.dashboard-bar-values span {
    display: block;
}

.dashboard-bar-name span,
.dashboard-bar-values span {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.dashboard-bar-body {
    display: grid;
    gap: 0.35rem;
}

.dashboard-bar-values {
    text-align: right;
}

.report-game-picker {
    min-width: min(360px, 100%);
}

.report-side-totals {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-weight: 800;
}

.report-side-totals span {
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.report-fight-list {
    display: grid;
    gap: 0.7rem;
}

.report-fight-item {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.report-fight-item summary {
    display: grid;
    grid-template-columns: 64px auto repeat(3, minmax(92px, auto));
    align-items: center;
    gap: 0.7rem;
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    list-style: none;
}

.report-fight-item summary::-webkit-details-marker {
    display: none;
}

.report-fight-title {
    font-size: 1.05rem;
    font-weight: 900;
}

.report-fight-body {
    padding: 0 0.85rem 0.85rem;
}

.report-ticket-table {
    min-width: 760px;
}

body .btn-battle {
    background: linear-gradient(180deg, var(--brand-primary, #7c1823) 0%, var(--brand-secondary, #65131c) 100%);
}

body .btn-battle:hover,
body .btn-battle:focus {
    background: linear-gradient(180deg, var(--brand-accent, #dc143c) 0%, var(--brand-secondary, #65131c) 100%);
}

/* Preset theme token layer. Keep this late so it wins over older hardcoded styles. */
body {
    color: var(--text-primary);
    background:
        radial-gradient(circle at top left, rgba(var(--primary-rgb), 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.12), transparent 24%),
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.app-shell,
.theme-battle-master {
    background:
        radial-gradient(circle at top, rgba(var(--primary-rgb), 0.14), transparent 24%),
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.app-main {
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-color: var(--border-color);
    box-shadow: 0 18px 50px var(--shadow-color);
}

.app-sidebar,
.theme-battle-master .app-sidebar {
    color: var(--text-primary);
    background:
        linear-gradient(180deg, var(--sidebar-bg) 0%, var(--bg-secondary) 100%);
    border-color: var(--border-color);
    box-shadow: 0 18px 50px var(--shadow-color);
}

.app-topbar,
.theme-battle-master .app-topbar {
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--navbar-bg), var(--bg-card));
    border-color: var(--border-color);
    box-shadow: 0 8px 22px var(--shadow-color);
}

.app-card,
.hero-panel,
.stat-card,
.admin-accent-card,
.dashboard-panel,
.teller-terminal,
.public-board-card,
.theme-battle-master .app-card,
.theme-battle-master .hero-panel,
.theme-battle-master .stat-card {
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--bg-card), rgba(var(--secondary-rgb), 0.72));
    border-color: var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.app-modal,
.modal-content,
.connection-overlay-panel {
    color: var(--text-primary);
    background: var(--modal-bg);
    border-color: var(--border-color);
    box-shadow: 0 22px 70px var(--shadow-color);
}

.brand-mark,
.theme-battle-master .brand-mark,
.battle-emblem {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: var(--border-color);
    box-shadow: 0 12px 25px rgba(var(--primary-rgb), 0.3);
}

.brand-title,
.app-page-title,
.section-title,
.stat-value,
.dashboard-mini-grid strong,
.dashboard-metric-list strong,
.table-modern td,
.table-modern tbody th {
    color: var(--text-primary);
}

.brand-subtitle,
.sidebar-meta,
.section-label,
.helper-text,
.text-secondary,
.stat-label,
.hero-copy,
.dashboard-mini-grid span,
.dashboard-metric-list span,
.dashboard-bar-name span,
.dashboard-bar-values span,
.empty-state-inline,
.form-helper-text {
    color: var(--text-muted) !important;
}

.hero-kicker,
.theme-battle-master .hero-kicker,
.battle-logo-text h1 {
    color: var(--accent);
}

.nav-pills .nav-link.app-nav-link {
    color: var(--text-secondary);
}

.nav-pills .nav-link.app-nav-link:hover,
.nav-pills .nav-link.app-nav-link.active,
.theme-battle-master .nav-pills .nav-link.app-nav-link:hover,
.theme-battle-master .nav-pills .nav-link.app-nav-link.active {
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.42), rgba(var(--accent-rgb), 0.18));
}

.btn-battle,
body .btn-battle,
.btn-check:checked + .status-choice,
.list-group-item.active {
    color: #fff;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.28);
}

.btn-battle:hover,
.btn-battle:focus,
body .btn-battle:hover,
body .btn-battle:focus {
    color: #fff;
    background: linear-gradient(180deg, var(--primary-hover), var(--accent));
    border-color: var(--accent);
}

.btn-outline-light,
.btn-outline-secondary,
.btn-outline-dark,
.app-main .btn-outline-dark {
    color: var(--text-primary);
    border-color: var(--border-color);
    background: transparent;
}

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-dark:hover,
.btn-outline-dark:focus,
.app-main .btn-outline-dark:hover,
.app-main .btn-outline-dark:focus {
    color: var(--text-primary);
    background: rgba(var(--primary-rgb), 0.16);
    border-color: var(--primary);
}

.table-modern {
    --bs-table-bg: var(--table-row-bg);
    --bs-table-striped-bg: rgba(var(--primary-rgb), 0.06);
    --bs-table-hover-bg: var(--table-row-hover);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.table-modern thead th {
    color: var(--text-secondary);
    background: var(--table-header-bg);
    border-color: var(--border-color);
}

.table-modern td,
.table-modern th,
.table-modern tbody tr {
    border-color: var(--border-color);
}

.form-control,
.form-select,
textarea.form-control,
.battle-field {
    color: var(--text-primary);
    background: var(--input-bg);
    border-color: var(--input-border);
}

.form-control:focus,
.form-select:focus,
textarea.form-control:focus,
.battle-field:focus {
    color: var(--text-primary);
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 0.18rem rgba(var(--primary-rgb), 0.18);
}

.form-control::placeholder,
.battle-field::placeholder {
    color: var(--text-muted);
}

.form-select option,
.form-select optgroup {
    background: var(--bg-card);
    color: var(--text-primary);
}

.transaction-badge,
.status-badge,
.sidebar-panel,
.dashboard-mini-grid > div,
.dashboard-metric-list > div,
.report-fight-item,
.controller-note,
.teller-meta-card,
.teller-amount-card,
.settings-row,
.settings-warning-box,
.settings-empty,
.surface-muted,
.list-group-item {
    color: var(--text-primary);
    background: var(--surface-soft);
    border-color: var(--border-color);
}

.status-open,
.status-paid,
.status-won,
.status-refunded,
.status-approved,
.status-finalized,
.status-settled,
.status-active {
    color: var(--success);
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.38);
}

.status-pending,
.status-created,
.status-declared,
.status-unpaid {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.38);
}

.status-closed,
.status-ended,
.status-lost,
.status-rejected,
.status-inactive {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.38);
}

.alert-danger,
.app-popup-danger {
    color: #fff;
    background: rgba(239, 68, 68, 0.28);
    border-color: rgba(239, 68, 68, 0.44);
}

.alert-warning,
.app-popup-warning {
    color: var(--text-primary);
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.42);
}

.alert-success,
.app-popup-success {
    color: var(--text-primary);
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.42);
}

.side-record-meron,
.meron-fill,
.gross-fill {
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

.side-record-wala,
.wala-fill,
.income-fill {
    background: linear-gradient(90deg, var(--primary), var(--info));
}

.side-record-draw {
    background: linear-gradient(90deg, var(--success), var(--accent));
}

.meron-text,
.amount-negative {
    color: var(--accent) !important;
}

.wala-text,
.amount-positive {
    color: var(--success) !important;
}

.amount-neutral {
    color: var(--warning) !important;
}

.controller-board,
.teller-terminal,
.public-monitor-shell {
    background:
        radial-gradient(circle at top, rgba(var(--primary-rgb), 0.2), transparent 34%),
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    color: var(--text-primary);
}

.controller-fight-title,
.public-toolbar,
.battle-login-card {
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--navbar-bg), var(--bg-card));
    border-color: var(--border-color);
}

.controller-status-bar {
    background: linear-gradient(90deg, var(--danger), var(--accent));
}

.public-side-panel,
.controller-side,
.teller-side-card {
    color: var(--text-primary);
    background: linear-gradient(180deg, var(--bg-card), rgba(var(--secondary-rgb), 0.76));
    border-color: var(--border-color);
}

.public-side-header,
.controller-side-head {
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.public-side-panel.meron .public-side-header,
.controller-side-meron .controller-side-head,
.teller-side-meron {
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.18), rgba(var(--secondary-rgb), 0.72));
}

.public-side-panel.wala .public-side-header,
.controller-side-wala .controller-side-head,
.teller-side-wala {
    background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.18), rgba(var(--secondary-rgb), 0.72));
}

.battle-login-card::before,
.auth-showcase::before,
.auth-showcase::after {
    background:
        radial-gradient(circle at top center, rgba(var(--primary-rgb), 0.18), transparent 28%),
        radial-gradient(circle at bottom center, rgba(var(--accent-rgb), 0.18), transparent 34%);
}

.record-print-rule {
    border-top-color: var(--secondary);
}

[data-report-content].is-loading {
    opacity: 0.58;
    pointer-events: none;
    transition: opacity 0.16s ease;
}

.record-print-area {
    display: none;
}

.record-print-title {
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.record-print-subtitle {
    margin-bottom: 10px;
    text-align: center;
}

.record-print-grid {
    display: grid;
    grid-template-columns: 34px 1fr 1fr;
    gap: 18px;
    line-height: 1.45;
}

.record-print-grid > div:nth-child(3) {
    text-align: right;
}

.record-print-head {
    margin-bottom: 4px;
    font-weight: 800;
}

.record-print-rule {
    margin: 8px 0;
    border-top: 1px dashed #111;
}

.record-print-line {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.record-print-empty {
    padding: 10px 0;
    text-align: center;
}

.side-record-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.side-record-meron {
    background: #bd1735;
}

.side-record-wala {
    background: #1f62d0;
}

.side-record-draw {
    background: #4d8061;
}

.status-finalized,
.status-settled,
.status-active {
    color: #9ee7ba;
    border-color: rgba(87, 213, 131, 0.45);
    background: rgba(87, 213, 131, 0.12);
}

.status-closed,
.status-ended {
    color: #ffabb4;
    border-color: rgba(255, 92, 106, 0.45);
    background: rgba(255, 92, 106, 0.12);
}

.status-created,
.status-declared {
    color: #ffe2a3;
    border-color: rgba(255, 200, 92, 0.45);
    background: rgba(255, 200, 92, 0.12);
}

.status-presence-online {
    color: #9ee7ba;
    border-color: rgba(34, 197, 94, 0.42);
    background: rgba(34, 197, 94, 0.16);
}

.status-presence-idle {
    color: #ffd88a;
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.16);
}

.status-presence-offline {
    color: #c9c3bd;
    border-color: rgba(180, 180, 180, 0.28);
    background: rgba(180, 180, 180, 0.1);
}

/* Betting side identity lock: themes must never recolor MERON/WALA. */
.side-pill.meron,
.side-record-meron,
.bet-side-card.meron,
.teller-side-meron,
.controller-side-meron,
.public-side-panel.meron,
.meron-text,
.report-side-totals .meron-text,
[class*="meron"]:not(.brand-mark):not(.brand-mark-image):not(.brand-mark-fallback) {
    border-color: var(--meron-border) !important;
}

.side-pill.meron,
.side-record-meron,
.controller-win-meron,
.controller-side-meron .controller-side-head,
.public-side-panel.meron .public-side-header,
.side-record-badge.side-record-meron {
    color: #fff !important;
    background: linear-gradient(180deg, #DC143C 0%, #9F1239 100%) !important;
}

.bet-side-card.meron,
.teller-side-meron,
.controller-side-meron .controller-side-body,
.public-side-panel.meron .public-side-body {
    background: linear-gradient(180deg, var(--meron-bg), rgba(220, 20, 60, 0.06)) !important;
    border-color: var(--meron-border) !important;
}

.meron-text,
.controller-side-meron,
.public-side-panel.meron,
.teller-side-meron .teller-side-name,
.teller-side-meron .teller-side-odds-line,
.teller-side-meron .teller-side-return-line,
.side-pill.meron:not(.side-record-badge) {
    color: var(--meron-color) !important;
}

.meron-fill {
    background: linear-gradient(90deg, #9F1239 0%, var(--meron-color) 100%) !important;
}

.side-pill.wala,
.side-record-wala,
.bet-side-card.wala,
.teller-side-wala,
.controller-side-wala,
.public-side-panel.wala,
.wala-text,
.report-side-totals .wala-text,
[class*="wala"]:not(.brand-mark):not(.brand-mark-image):not(.brand-mark-fallback) {
    border-color: var(--wala-border) !important;
}

.side-pill.wala,
.side-record-wala,
.controller-win-wala,
.controller-side-wala .controller-side-head,
.public-side-panel.wala .public-side-header,
.side-record-badge.side-record-wala {
    color: #fff !important;
    background: linear-gradient(180deg, #0B3D91 0%, #061A40 100%) !important;
}

.bet-side-card.wala,
.teller-side-wala,
.controller-side-wala .controller-side-body,
.public-side-panel.wala .public-side-body {
    background: linear-gradient(180deg, var(--wala-bg), rgba(11, 61, 145, 0.06)) !important;
    border-color: var(--wala-border) !important;
}

.wala-text,
.controller-side-wala,
.public-side-panel.wala,
.teller-side-wala .teller-side-name,
.teller-side-wala .teller-side-odds-line,
.teller-side-wala .teller-side-return-line,
.side-pill.wala:not(.side-record-badge) {
    color: var(--wala-color) !important;
}

.wala-fill {
    background: linear-gradient(90deg, #061A40 0%, var(--wala-color) 100%) !important;
}

.connection-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(12, 7, 10, 0.78);
    backdrop-filter: blur(8px);
}

.connection-overlay.is-visible {
    display: flex;
}

.connection-overlay-panel {
    width: min(360px, 100%);
    padding: 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(34, 18, 27, 0.96);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    color: var(--text-main);
    text-align: center;
}

.connection-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.85rem;
    border: 4px solid rgba(255, 255, 255, 0.18);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: connection-spin 0.8s linear infinite;
}

.connection-title {
    font-size: 1.05rem;
    font-weight: 900;
}

.connection-copy {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

body.is-offline {
    cursor: wait;
}

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

@media print {
    @page {
        size: 58mm auto;
        margin: 2mm;
    }

    body.fight-data-print-page {
        background: #fff !important;
        color: #000 !important;
    }

    body.fight-data-print-page * {
        visibility: hidden !important;
    }

    body.fight-data-print-page [data-fight-data-print],
    body.fight-data-print-page [data-fight-data-print] *,
    body.fight-data-print-page [data-current-fight-print],
    body.fight-data-print-page [data-current-fight-print] * {
        visibility: visible !important;
    }

    body.fight-data-print-page [data-fight-data-print],
    body.fight-data-print-page [data-current-fight-print] {
        position: absolute;
        top: 0;
        left: 0;
        display: block !important;
        width: 54mm;
        max-width: 54mm;
        padding: 0;
        color: #000 !important;
        font-family: "Courier New", monospace;
        font-size: 10px;
        line-height: 1.25;
    }

    body.fight-data-print-page .record-print-title {
        font-size: 12px;
        line-height: 1.25;
    }

    body.fight-data-print-page .record-print-subtitle {
        margin-bottom: 6px;
        font-size: 10px;
    }

    body.fight-data-print-page .record-print-grid {
        grid-template-columns: 6mm 22mm 22mm;
        gap: 1mm;
        line-height: 1.25;
    }

    body.fight-data-print-page .record-print-rule {
        margin: 5px 0;
    }

    body.fight-data-print-page .record-print-line {
        gap: 4mm;
    }
}

@media (max-width: 991.98px) {
    .dashboard-header {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-actions {
        justify-content: flex-start;
    }

    .dashboard-bar-row {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .dashboard-bar-values {
        text-align: left;
    }

    .report-fight-item summary {
        grid-template-columns: 52px auto;
    }

    .report-fight-item summary > span:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .compact-stat {
        min-height: 104px;
        padding: 0.85rem;
    }

    .dashboard-panel {
        padding: 0.85rem;
    }

    .dashboard-split-row {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 0.5rem;
    }

    .dashboard-split-money {
        grid-column: 2;
        font-size: 0.85rem;
    }

    .dashboard-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-metric-list > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .dashboard-metric-list strong {
        text-align: left;
    }

    .report-fight-item summary {
        gap: 0.45rem;
        padding: 0.65rem;
        font-size: 0.82rem;
    }

    .report-fight-body {
        padding: 0 0.65rem 0.65rem;
    }
}

/* Production polish layer: small refinements without changing workflows. */
.app-main {
    container-type: inline-size;
}

.app-card,
.stat-card,
.dashboard-panel,
.teller-terminal,
.controller-board,
.public-board-card {
    border-radius: 16px;
}

.app-card {
    overflow: hidden;
}

.stat-card,
.compact-stat {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.35rem;
    min-height: 118px;
}

.stat-label,
.section-label,
.form-helper-text {
    line-height: 1.45;
}

.stat-value {
    line-height: 1.08;
    letter-spacing: 0;
}

.table-responsive {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.table-modern {
    min-width: 760px;
    margin-bottom: 0;
}

.table-modern thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 0.78rem 0.8rem;
    white-space: nowrap;
}

.table-modern td,
.table-modern tbody th {
    padding: 12px 14px;
}

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

.status-badge,
.transaction-badge,
.side-record-badge {
    min-height: 28px;
    line-height: 1.15;
    white-space: nowrap;
}

.action-inline-group,
.action-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.action-inline-group form,
.action-group form {
    margin: 0;
}

.action-btn,
.action-inline-group .btn {
    min-height: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 0.78rem;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}

.action-btn i,
.action-inline-group .btn i {
    margin-right: 0 !important;
    font-size: 0.9em;
}

.table-actions {
    width: 1%;
    white-space: nowrap;
}

.mobile-action-toggle {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px !important;
    font-size: 0.84rem;
}

@media (max-width: 767.98px) {
    .action-inline-group,
    .action-group {
        flex-wrap: wrap;
    }

    .settings-row {
        align-items: stretch;
    }

    .settings-backup-actions,
    .settings-backup-form {
        width: 100%;
    }

    .settings-backup-actions {
        justify-content: stretch;
    }

    .settings-backup-actions .action-btn,
    .settings-backup-actions > .btn {
        flex: 1 1 100%;
        min-height: 40px;
    }

    .settings-backup-form {
        flex-wrap: wrap;
    }

    .settings-backup-form .form-control {
        width: 100%;
        min-height: 40px;
    }
}

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.btn-sm {
    min-height: 34px;
}

.btn:disabled,
.btn.disabled,
button:disabled,
.controller-action:disabled,
.teller-side-card:disabled {
    cursor: not-allowed;
    filter: grayscale(0.22);
    opacity: 0.5 !important;
    transform: none !important;
    box-shadow: none !important;
}

.form-label {
    margin-bottom: 0.42rem;
    font-size: 0.86rem;
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 42px;
    border-radius: 12px;
}

.settings-code-input {
    font-weight: 800;
    letter-spacing: 0.08em;
}

.alert {
    border: 1px solid transparent;
    border-radius: 12px;
    line-height: 1.45;
}

.app-popup {
    border: 1px solid currentColor;
    border-radius: 12px;
    box-shadow: 0 18px 48px var(--shadow-color);
}

.app-popup-message {
    line-height: 1.45;
}

.app-modal {
    border-radius: 16px;
}

.app-modal .modal-header {
    padding-bottom: 0.5rem;
}

.app-modal .modal-title {
    font-weight: 900;
    letter-spacing: 0;
}

#appConfirmModalMessage {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(245, 158, 11, 0.32);
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--text-primary);
    line-height: 1.5;
}

.auth-grid {
    width: min(1180px, 100%);
    align-items: stretch;
}

.battle-login-card {
    border: 1px solid var(--border-color);
}

.battle-field {
    min-height: 48px;
    text-align: left;
    font-style: normal;
}

.battle-logo-text h1,
.app-page-title,
.section-title {
    letter-spacing: 0;
}

.controller-action {
    min-height: 54px;
    border-radius: 12px;
}

.teller-meta-grid {
    gap: 0.75rem;
}

.teller-chip,
.teller-clear-btn,
.teller-mini-action {
    min-height: 42px;
}

.public-toolbar {
    border-radius: 16px;
}

.public-toolbar-total-value,
.public-side-amount,
.controller-big-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

.public-side-panel {
    border-radius: 14px;
    overflow: hidden;
}

.public-side-header {
    letter-spacing: 0.06em;
}

.empty-state-inline,
.settings-empty,
.public-empty-state {
    min-height: 82px;
    border-radius: 12px;
}

@media (max-width: 991.98px) {
    .app-topbar {
        align-items: flex-start;
        flex-direction: column;
        min-height: auto;
    }

    .app-topbar-right {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

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

    .battle-login-card {
        width: min(520px, 100%);
        margin-inline: auto;
    }

    .table-modern {
        min-width: 680px;
    }
}

@media (max-width: 575.98px) {
    .app-shell {
        padding: 0;
    }

    .app-main {
        min-height: 100vh;
        border-radius: 0;
        padding: 0.85rem;
    }

    .app-topbar {
        border-radius: 14px;
        padding: 0.8rem;
    }

    .app-page-title {
        font-size: 1.35rem;
        line-height: 1.15;
    }

    .app-card,
    .stat-card,
    .dashboard-panel {
        border-radius: 12px;
    }

    .table-responsive {
        margin-inline: -0.15rem;
        border-radius: 10px;
    }

    .table-modern {
        min-width: 620px;
    }

    .battle-emblem {
        width: 96px;
        height: 96px;
        border-radius: 24px;
    }

    .battle-login-card {
        padding: 1.25rem;
        border-radius: 18px;
    }

    .controller-action {
        min-height: 48px;
        font-size: 0.88rem;
    }

    .public-toolbar {
        gap: 0.65rem;
    }

    .public-toolbar-total-value,
    .public-side-amount {
        line-height: 1;
    }
}
