:root {
    --bg: #050a12;
    --bg-2: #071223;
    --surface: #0d1a30;
    --surface-2: #101f38;
    --ink: #eef4ff;
    --ink-strong: #f8fbff;
    --muted: #9cb0d3;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(111, 142, 214, 0.25);
    --primary: #3f6fff;
    --primary-strong: #254fd2;
    --accent: #63f3a4;
    --accent-strong: #2ed37e;
    --gold: #d9b86f;
    --danger: #ff7c7c;
    --warning: #f0b243;
    --success: #2fa84f;
    --radius: 8px;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

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

html {
    background: #030914;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.app-shell {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
}

.auth-shell {
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(16, 77, 58, 0.28), transparent 34%),
        linear-gradient(180deg, #030914 0%, #071326 100%);
}

.auth-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(rgba(151, 199, 255, 0.11) 1px, transparent 1px),
        linear-gradient(102deg, transparent 0 32%, rgba(99, 243, 164, 0.18) 32.2%, transparent 33%),
        linear-gradient(14deg, transparent 0 45%, rgba(217, 184, 111, 0.16) 45.2%, transparent 45.8%);
    background-size: 28px 28px, 100% 100%, 100% 100%;
    opacity: 0.64;
    pointer-events: none;
}

.auth-shell::after {
    content: "";
    position: fixed;
    left: -8vw;
    right: -8vw;
    bottom: 18vh;
    height: 180px;
    border-top: 8px solid rgba(99, 243, 164, 0.20);
    border-radius: 50%;
    transform: rotate(-2deg);
    pointer-events: none;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 22px;
    background: rgba(5, 10, 18, 0.92);
    border-right: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--ink-strong);
    font-weight: 900;
}

.brand.large {
    justify-content: center;
    font-size: 20px;
}

.brand-logo {
    width: min(100%, 210px);
    height: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.28));
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #06111f;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(46, 211, 126, 0.18);
}

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

.nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted);
    font-weight: 800;
}

.nav a:hover,
.nav a.active {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
    color: var(--ink-strong);
}

.nav a.active {
    border-color: rgba(99, 243, 164, 0.28);
}

.sidebar-footer {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.sidebar-footer strong {
    display: block;
    color: var(--ink-strong);
}

.sidebar-footer span,
.table-subtitle,
.list-item span,
.muted {
    color: var(--muted);
}

.sidebar-footer span,
.table-subtitle {
    font-size: 12px;
}

.main {
    min-width: 0;
    padding: 26px 24px 40px;
}

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

.topbar h1,
.card h2,
.empty-state h2,
.login-panel h1 {
    margin: 0;
    color: var(--ink-strong);
    line-height: 1.1;
    letter-spacing: 0;
}

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

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.card {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(13, 26, 48, 0.98) 0%, rgba(8, 19, 38, 0.98) 100%);
    box-shadow: var(--shadow);
    padding: 20px;
}

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

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

.grid.three,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

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

.form-and-table {
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    align-items: start;
}

.user-form-screen {
    max-width: 720px;
    margin-inline: auto;
}

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

.lookup-card {
    margin-bottom: 18px;
}

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

.ticket-status-card {
    display: grid;
    gap: 8px;
}

.ticket-status-card strong {
    color: var(--ink-strong);
    font-size: 26px;
    line-height: 1;
}

.ticket-status-card span {
    color: var(--muted);
    font-weight: 800;
}

.ticket-status-card.won {
    border-color: rgba(47, 168, 79, 0.36);
}

.ticket-status-card.pending {
    border-color: rgba(217, 184, 111, 0.34);
}

.ticket-status-card.paid {
    border-color: rgba(99, 243, 164, 0.30);
}

label,
.compact-label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    padding: 10px 12px;
    outline: none;
}

select {
    background-color: var(--surface-2);
    color-scheme: dark;
}

select option {
    background: var(--surface);
    color: var(--ink);
}

textarea {
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: rgba(220, 232, 255, 0.44);
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(63, 111, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(63, 111, 255, 0.14);
}

#user-login-id,
#cashbox-login-id,
.login-field input[name="login_id"] {
    text-transform: uppercase;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-line input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
    accent-color: var(--accent-strong);
}

.cashbox-league-picker {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(4, 13, 27, 0.42);
}

.cashbox-league-group {
    border: 1px solid rgba(143, 253, 88, 0.2);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(6, 18, 33, 0.58);
}

.cashbox-league-group summary {
    cursor: pointer;
    padding: 14px 16px;
    font-weight: 900;
    color: var(--ink-strong);
}

.cashbox-league-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    padding: 0 16px 16px;
}

.cashbox-league-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(16, 31, 55, 0.72);
    color: var(--ink-strong);
    font-weight: 800;
}

.cashbox-league-option input {
    width: 18px;
    min-height: 18px;
    accent-color: var(--accent-strong);
}

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

.button,
button.button,
a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 9px 14px;
    color: var(--ink);
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
}

.button.primary {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-strong) 100%);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(37, 79, 210, 0.24);
}

.button.primary:hover {
    filter: brightness(1.06);
}

.button.ghost {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
}

.button.ghost:hover {
    background: rgba(255, 255, 255, 0.07);
}

.button.full {
    width: 100%;
}

.button.small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button-row,
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.section-title h2,
.form-card h2 {
    font-size: 20px;
}

.alert {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    padding: 14px 16px;
    margin-bottom: 18px;
    color: var(--ink);
    font-weight: 800;
}

.alert.success {
    border-color: rgba(47, 168, 79, 0.42);
    color: #d8f5df;
}

.alert.warning {
    border-color: rgba(240, 178, 67, 0.42);
    color: #fde7b0;
}

.alert.danger {
    border-color: rgba(255, 124, 124, 0.42);
    color: #ffd9dd;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

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

th,
td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

td {
    color: var(--ink);
}

td strong,
.table-subtitle {
    display: block;
}

.ticket-row.won {
    background: rgba(47, 168, 79, 0.10);
}

.ticket-row.paid {
    background: rgba(99, 243, 164, 0.07);
}

.ticket-row.lost,
.ticket-row.cancelled,
.ticket-row.expired {
    background: rgba(255, 124, 124, 0.055);
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
}

.badge.active,
.badge.open,
.badge.won,
.badge.paid,
.badge.success {
    border-color: rgba(47, 168, 79, 0.42);
    color: #d8f5df;
}

.badge.pending,
.badge.reopened,
.badge.running {
    border-color: rgba(217, 184, 111, 0.42);
    color: #ffeec5;
}

.badge.inactive,
.badge.blocked,
.badge.deleted,
.badge.closed,
.badge.lost,
.badge.cancelled,
.badge.expired,
.badge.voided,
.badge.failed {
    border-color: rgba(255, 124, 124, 0.42);
    color: #ffd9dd;
}

.stack {
    display: grid;
    gap: 12px;
}

.stack.compact {
    max-height: 420px;
    overflow: auto;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.list-item strong {
    color: var(--ink-strong);
}

.history-actions,
.history-filters,
.history-summary-grid,
.history-main-grid {
    margin-bottom: 18px;
}

.history-entry-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.history-entry-actions.compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.history-entry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(14, 33, 61, 0.98) 0%, rgba(8, 21, 42, 0.98) 100%);
    color: var(--ink-strong);
    font-size: 28px;
    font-weight: 950;
    text-align: center;
    box-shadow: var(--shadow);
}

.history-entry-actions.compact .history-entry-btn {
    min-height: 54px;
    padding: 0 22px;
    font-size: 18px;
}

.history-entry-btn.active,
.history-entry-btn:hover {
    border-color: rgba(143, 255, 69, 0.7);
    background: linear-gradient(180deg, rgba(143, 255, 69, 0.18), rgba(67, 221, 81, 0.08));
}

.history-general-filters {
    padding-bottom: 28px;
}

.history-general-filter-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.history-general-filter-actions .button {
    min-width: 190px;
    min-height: 64px;
}

.history-general-panel {
    min-height: 560px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px 28px 28px;
    background: linear-gradient(180deg, rgba(6, 18, 34, 0.88), rgba(5, 15, 29, 0.84));
    box-shadow: var(--shadow);
}

.history-general-panel h2 {
    margin: 0 0 18px;
    color: var(--ink-strong);
    font-size: 28px;
    line-height: 1.1;
}

.history-general-layout {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    align-items: start;
    gap: 26px;
}

.history-general-summaries {
    display: grid;
    gap: 18px;
}

.history-general-summary {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px 28px 18px;
    background: rgba(255, 255, 255, 0.035);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.history-general-summary h3 {
    margin: 0 0 28px;
    color: var(--ink-strong);
    font-size: 23px;
    line-height: 1.1;
}

.history-general-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 68px;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.history-general-row:first-child {
    border-top: 0;
}

.history-general-row span {
    color: var(--muted);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.15;
}

.history-general-row strong {
    min-width: 76px;
    max-width: 190px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(67, 87, 145, 0.96), rgba(35, 52, 96, 0.96));
    color: var(--ink-strong);
    font-size: 18px;
    font-weight: 950;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 28px rgba(0, 0, 0, 0.22);
}

.history-general-space {
    min-height: 430px;
}

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

.history-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #f5fbf7;
    font-weight: 900;
    background: linear-gradient(180deg, rgba(32, 48, 78, 0.88) 0%, rgba(18, 29, 52, 0.96) 100%);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    white-space: nowrap;
}

.history-action-btn.active {
    border-color: rgba(143, 255, 69, 0.72);
    background: linear-gradient(180deg, rgba(143, 255, 69, 0.18), rgba(67, 221, 81, 0.09));
    box-shadow: 0 0 0 1px rgba(143, 255, 69, 0.12), 0 16px 30px rgba(0, 0, 0, 0.24);
}

.history-main-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
}

.history-specific-list {
    display: grid;
    gap: 10px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 6px;
}

.history-specific-item {
    display: grid;
    grid-template-columns: minmax(170px, 1.15fr) minmax(160px, 1fr) repeat(3, minmax(120px, 0.8fr)) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    padding: 12px;
}

.history-specific-item strong {
    display: block;
    color: var(--ink-strong);
}

.history-specific-item span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.history-specific-item.won {
    border-color: rgba(143, 255, 69, 0.55);
    background: linear-gradient(180deg, rgba(47, 168, 79, 0.20), rgba(16, 57, 42, 0.16));
    box-shadow: 0 0 0 1px rgba(143, 255, 69, 0.08), 0 18px 34px rgba(47, 168, 79, 0.12);
}

.history-specific-item.paid {
    border-color: rgba(99, 243, 164, 0.48);
    background: linear-gradient(180deg, rgba(99, 243, 164, 0.16), rgba(10, 45, 35, 0.14));
    box-shadow: 0 0 0 1px rgba(99, 243, 164, 0.07), 0 18px 34px rgba(47, 168, 79, 0.10);
}

.history-specific-item.lost,
.history-specific-item.cancelled,
.history-specific-item.expired {
    background: rgba(255, 124, 124, 0.055);
}

.history-ticket-row.won {
    background: rgba(47, 168, 79, 0.18);
    box-shadow: inset 4px 0 0 rgba(143, 255, 69, 0.78);
}

.history-ticket-row.paid {
    background: rgba(99, 243, 164, 0.12);
    box-shadow: inset 4px 0 0 rgba(99, 243, 164, 0.74);
}

.winner-mark {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    margin-top: 7px;
    border: 1px solid rgba(143, 255, 69, 0.62);
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(143, 255, 69, 0.16);
    color: #e9ffdc;
    font-size: 12px;
    font-weight: 950;
}

.history-ticket-row.lost,
.history-ticket-row.cancelled,
.history-ticket-row.expired {
    background: rgba(255, 124, 124, 0.055);
}

.result-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 11px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.result-badge.won,
.result-badge.paid {
    border-color: rgba(47, 168, 79, 0.5);
    background: rgba(47, 168, 79, 0.16);
    color: #dbffe4;
}

.result-badge.pending {
    border-color: rgba(240, 178, 67, 0.5);
    background: rgba(240, 178, 67, 0.12);
    color: #fff1c9;
}

.result-badge.lost,
.result-badge.cancelled,
.result-badge.expired {
    border-color: rgba(255, 124, 124, 0.5);
    background: rgba(255, 124, 124, 0.12);
    color: #ffe0e3;
}

.ticket-detail-row.hidden {
    display: none;
}

.ticket-detail-row td {
    background: rgba(255, 255, 255, 0.025);
}

.history-detail-panel {
    display: grid;
    gap: 14px;
    padding: 6px 0;
}

.history-detail-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.history-detail-metrics span {
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    font-weight: 800;
}

.history-detail-metrics strong {
    color: var(--ink-strong);
    font-size: 16px;
}

.history-picks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.history-pick {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px;
    background: rgba(255, 255, 255, 0.03);
}

.history-pick.won {
    border-color: rgba(47, 168, 79, 0.45);
    background: rgba(47, 168, 79, 0.12);
}

.history-pick.lost,
.history-pick.cancelled {
    border-color: rgba(255, 124, 124, 0.35);
}

.history-pick strong {
    color: var(--ink-strong);
}

.history-pick span {
    color: var(--muted);
}

.result-note {
    margin-bottom: 18px;
}

.result-note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.result-note-grid span {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 11px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    font-weight: 800;
}

.score-form {
    display: inline-grid;
    grid-template-columns: 54px auto 54px auto;
    align-items: center;
    gap: 6px;
}

.score-input {
    min-height: 38px;
    padding: 8px;
    text-align: center;
}

.results-filter-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.results-filter-bar {
    padding: 18px 26px;
    margin-bottom: 12px;
}

.results-filter-grid {
    display: grid;
    grid-template-columns: minmax(18rem, 1.2fr) minmax(12rem, 0.8fr) minmax(12rem, 0.8fr);
    gap: 14px;
    align-items: end;
}

.results-filter-bar label {
    gap: 8px;
}

.results-filter-bar input,
.results-filter-bar select {
    min-height: 54px;
}

.results-filter-actions .button {
    min-width: 190px;
    min-height: 58px;
}

.results-stats {
    margin-bottom: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.results-stats .stat-card {
    min-height: 132px;
    padding: 22px 24px;
}

.results-stats .stat-card strong {
    font-size: 30px;
    line-height: 1;
}

.results-league-list {
    margin-top: 14px;
}

.results-board-row {
    grid-template-columns: minmax(21rem, 0.95fr) minmax(18rem, 0.7fr) minmax(30rem, 1.1fr);
}

.results-league-card .royal-league-icon {
    width: 54px;
    height: 54px;
}

.results-league-card .royal-league-icon.has-image {
    padding: 6px;
}

.results-league-card .royal-league-icon.has-image img {
    width: 96%;
    height: 96%;
}

.results-board-row .royal-team-name {
    display: -webkit-box;
    min-height: 30px;
    white-space: normal;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-overflow: clip;
}

.result-score-board,
.result-actions-board {
    display: grid;
    align-content: center;
    gap: 12px;
    min-height: 7.75rem;
    border: 1px solid rgba(183, 243, 74, 0.10);
    border-radius: 0.45rem;
    padding: 13px 15px;
    background: linear-gradient(135deg, rgba(18, 63, 54, 0.94), rgba(14, 39, 42, 0.90));
}

.result-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.result-board-head > span {
    color: #ffffff;
    font-size: 13px;
    font-weight: 1000;
}

.result-score-stack {
    display: grid;
    gap: 8px;
}

.result-score-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px 11px;
    background: rgba(255, 255, 255, 0.045);
}

.result-score-line > span:first-child {
    color: rgba(232, 240, 255, 0.78);
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
}

.result-score-line.final {
    border-color: rgba(143, 255, 69, 0.20);
    background: rgba(143, 255, 69, 0.07);
}

.result-score-line.half {
    border-color: rgba(255, 194, 71, 0.18);
}

.result-score-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 1000;
    line-height: 1;
}

.result-score-mini b {
    color: #ffc247;
}

.result-score-mini.pending {
    min-width: 112px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.result-ticket-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.result-ticket-chips span,
.result-readonly-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 900;
}

.result-actions-board .result-ticket-chips {
    gap: 10px;
}

.result-actions-board .result-ticket-chips span {
    min-height: 40px;
}

.result-ticket-chips strong {
    color: #ffffff;
}

.result-management-actions {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.result-score-form {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr) minmax(110px, auto);
    align-items: center;
    gap: 7px;
}

.result-score-group {
    display: grid;
    grid-template-columns: auto 48px auto 48px;
    align-items: center;
    gap: 6px;
}

.result-score-group span,
.result-score-group b {
    color: rgba(232, 240, 255, 0.76);
    font-size: 12px;
    font-weight: 950;
}

.result-score-form .button,
.result-management-actions > form > .button {
    min-height: 44px;
    padding-inline: 16px;
}

.catalog-team {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.catalog-stats .stat-card span,
.catalog-table .table-subtitle {
    color: var(--muted);
    font-weight: 800;
}

.catalog-management {
    align-items: start;
}

.catalog-table.compact-table {
    min-width: 620px;
}

.catalog-team-table {
    min-width: 960px;
}

.catalog-status-form {
    display: inline-flex;
}

.catalog-logo-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.catalog-logo-form input {
    min-height: 38px;
}

.stat-card {
    display: grid;
    gap: 10px;
}

.stat-card strong {
    color: var(--ink-strong);
    font-size: 28px;
    line-height: 1;
}

.meta-list {
    display: grid;
    gap: 8px;
    color: var(--muted);
}

.login-panel {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 560px);
    margin: 0 auto;
}

.login-card {
    display: grid;
    gap: 13px;
    border: 1px solid rgba(102, 130, 194, 0.28);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(6, 16, 34, 0.96) 0%, rgba(3, 10, 23, 0.97) 100%);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    padding: 22px 26px 20px;
}

.login-logo {
    display: block;
    width: min(100%, 365px);
    max-height: 145px;
    object-fit: contain;
    margin: 0 auto -2px;
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.38));
}

.login-card h1 {
    margin: 0 0 8px;
    color: var(--ink-strong);
    font-size: 40px;
    line-height: 1;
    text-align: center;
    font-weight: 950;
}

.login-field {
    position: relative;
    display: grid;
}

.login-field input {
    min-height: 58px;
    border-color: rgba(87, 107, 250, 0.42);
    border-radius: 16px;
    background: rgba(12, 25, 55, 0.88);
    color: var(--ink-strong);
    padding: 13px 56px 13px 58px;
    font-size: 17px;
    font-weight: 750;
}

.login-field input::placeholder {
    color: rgba(239, 246, 255, 0.64);
}

.login-field input:focus {
    border-color: rgba(103, 130, 255, 0.92);
    box-shadow: 0 0 0 4px rgba(79, 99, 255, 0.16), 0 18px 35px rgba(42, 67, 255, 0.14);
}

.login-icon,
.login-eye {
    position: absolute;
    z-index: 1;
    display: grid;
    place-items: center;
    top: 50%;
    transform: translateY(-50%);
    color: #83ff3f;
}

.login-icon {
    left: 22px;
    width: 23px;
    height: 23px;
}

.login-eye {
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #e9eefb;
    padding: 0;
}

.login-eye.active {
    color: #83ff3f;
}

.login-icon svg,
.login-eye svg,
.login-submit svg,
.secure-line svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.remember-line {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: fit-content;
    color: var(--ink);
    font-size: 15px;
    font-weight: 850;
}

.remember-line input {
    width: 26px;
    min-height: 26px;
    border: 1px solid rgba(99, 243, 164, 0.42);
    border-radius: 8px;
    appearance: none;
    background: rgba(255, 255, 255, 0.025);
    accent-color: #83ff3f;
}

.remember-line input:checked {
    background: #83ff3f;
    box-shadow: inset 0 0 0 5px #071326;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: 60px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, #6377ff 0%, #3f59f2 100%);
    color: #ffffff;
    box-shadow: 0 18px 34px rgba(52, 74, 243, 0.32);
    font-size: 21px;
    font-weight: 950;
    cursor: pointer;
}

.login-submit:hover {
    filter: brightness(1.06);
}

.login-submit svg {
    width: 25px;
    height: 25px;
}

.secure-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #c7ffd3;
    font-size: 15px;
    font-weight: 900;
}

.secure-line svg {
    width: 22px;
    height: 22px;
}

.login-version {
    margin: -6px 0 0;
    color: rgba(223, 232, 255, 0.62);
    text-align: center;
    font-size: 13px;
    font-weight: 650;
}

.login-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: rgba(244, 248, 255, 0.76);
    font-size: 12px;
    font-weight: 850;
    text-align: center;
}

.login-legal img {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.30));
}

.settings-logo-preview {
    display: block;
    width: min(100%, 360px);
    margin: 0 auto;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.30));
}

.auth-main {
    width: 100%;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 45vh;
    text-align: center;
}

.empty-state p,
.card p {
    color: var(--muted);
}

.ticket-builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 18px;
    align-items: start;
}

.odds-board,
.bet-slip {
    min-width: 0;
}

.bet-slip {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 16px;
}

.odds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.odds-accordion,
.league-list,
.event-list,
.market-list {
    display: grid;
    gap: 12px;
}

.sport-group,
.league-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.025);
    overflow: hidden;
}

.sport-group > summary,
.league-group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--ink-strong);
    cursor: pointer;
    font-weight: 900;
    list-style: none;
}

.sport-group > summary::-webkit-details-marker,
.league-group > summary::-webkit-details-marker {
    display: none;
}

.sport-group > summary {
    border-bottom: 1px solid var(--line);
    background: rgba(99, 243, 164, 0.055);
}

.league-group > summary {
    background: rgba(255, 255, 255, 0.025);
}

.sport-group > summary b,
.league-group > summary b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
}

.league-list {
    padding: 12px;
}

.league-group[open] > summary {
    border-bottom: 1px solid var(--line);
}

.event-list {
    padding: 12px;
}

.event-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.03);
    padding: 14px;
}

.event-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.event-summary time {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.match-row.compact {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    margin: 0;
}

.match-row.compact .match-vs {
    margin: 0;
}

.market-row {
    display: grid;
    grid-template-columns: minmax(90px, 140px) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.market-row > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.odd-choice-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 8px;
}

.odd-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    padding: 8px 10px;
    cursor: pointer;
    text-align: left;
}

.odd-choice span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 850;
}

.odd-choice b {
    flex: 0 0 auto;
    border: 1px solid rgba(99, 243, 164, 0.28);
    border-radius: var(--radius);
    background: rgba(99, 243, 164, 0.08);
    color: #d8f5df;
    padding: 5px 8px;
    font-size: 13px;
}

.odd-choice:hover,
.odd-choice.selected {
    border-color: rgba(99, 243, 164, 0.48);
    background: rgba(99, 243, 164, 0.08);
}

.sell-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px);
    gap: 12px;
    margin-bottom: 14px;
}

.odd-card {
    display: grid;
    gap: 6px;
    min-height: 168px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    padding: 14px;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.odd-card span,
.odd-card small {
    color: var(--muted);
}

.odd-card em {
    color: var(--ink-strong);
    font-style: normal;
    font-weight: 900;
}

.odd-card b {
    justify-self: start;
    border: 1px solid rgba(99, 243, 164, 0.28);
    border-radius: var(--radius);
    background: rgba(99, 243, 164, 0.08);
    color: #d8f5df;
    padding: 6px 10px;
}

.match-row {
    display: grid;
    gap: 6px;
    margin: 2px 0;
}

.team-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.team-line strong {
    min-width: 0;
    color: var(--ink-strong);
    overflow-wrap: anywhere;
}

.team-logo {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    object-fit: contain;
    padding: 3px;
}

.team-logo.placeholder {
    display: grid;
    place-items: center;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.match-vs {
    margin-left: 38px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.odd-card.selected {
    border-color: rgba(99, 243, 164, 0.48);
    box-shadow: 0 0 0 3px rgba(99, 243, 164, 0.10);
}

.odd-card.hidden {
    display: none;
}

.odd-choice.hidden,
.event-panel.hidden,
.league-group.hidden,
.sport-group.hidden {
    display: none;
}

.slip-items {
    display: grid;
    gap: 10px;
    min-height: 80px;
}

.slip-item {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.slip-item span {
    color: var(--muted);
}

.slip-item button {
    justify-self: end;
}

.stake-field input {
    min-height: 56px;
    font-size: 24px;
    font-weight: 900;
}

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

.quick-stakes button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    cursor: pointer;
    font-weight: 900;
}

.quick-stakes button:hover {
    border-color: rgba(99, 243, 164, 0.35);
}

.payout-panel {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(99, 243, 164, 0.28);
    border-radius: var(--radius);
    background: rgba(99, 243, 164, 0.08);
    padding: 14px;
}

.payout-panel span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.payout-panel strong {
    color: var(--ink-strong);
    font-size: 30px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.slip-totals {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.slip-totals span,
.receipt-totals span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.ticket-page {
    display: grid;
    grid-template-columns: 380px minmax(240px, 320px);
    gap: 18px;
    align-items: start;
}

.ticket-receipt {
    display: grid;
    gap: 14px;
    width: 100%;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    padding: 18px;
}

.receipt-head,
.receipt-code,
.receipt-meta,
.receipt-lines,
.receipt-totals {
    display: grid;
    gap: 8px;
}

.receipt-head {
    text-align: center;
}

.receipt-head strong,
.receipt-code strong {
    color: var(--ink-strong);
    font-size: 20px;
}

.receipt-code {
    border-block: 1px dashed var(--line-strong);
    padding-block: 12px;
    text-align: left;
}

.receipt-code span {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-weight: 850;
}

.receipt-code strong {
    font-size: 16px;
    text-align: right;
    overflow-wrap: anywhere;
}

.receipt-meta,
.receipt-lines span,
.receipt-footer {
    color: var(--muted);
}

.receipt-lines div {
    border: 1px solid rgba(183, 243, 74, 0.18);
    border-radius: 10px;
    padding: 12px;
    background:
        linear-gradient(135deg, rgba(183, 243, 74, 0.1), transparent 48%),
        rgba(2, 23, 21, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.receipt-lines small {
    display: block;
    color: rgba(183, 243, 74, 0.86);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0;
}

.receipt-lines small:not(.receipt-play-label) {
    display: none;
}

.receipt-lines div > strong {
    display: block;
    color: var(--ink-strong);
    font-size: 17px;
    line-height: 1.18;
    margin-top: 4px;
}

.receipt-lines span {
    display: block;
}

.receipt-pick {
    display: inline-flex !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(183, 243, 74, 0.18);
    border-radius: 10px;
    background: rgba(183, 243, 74, 0.1);
    color: var(--ink-strong) !important;
    font-weight: 850;
}

.receipt-pick strong,
.receipt-pick b {
    color: var(--ink-strong);
}

.receipt-totals {
    border-top: 1px dashed var(--line-strong);
    padding-top: 12px;
}

.receipt-totals span {
    color: var(--ink-strong);
    font-weight: 900;
}

.receipt-totals strong {
    font-size: 18px;
}

.receipt-footer {
    font-size: 13px;
    text-align: center;
}

.ticket-action-panel {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    background: rgba(255, 255, 255, 0.035);
}

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

.ticket-action-panel > strong {
    color: var(--ink-strong);
    font-size: 28px;
    line-height: 1;
}

.ticket-action-panel.won {
    border-color: rgba(47, 168, 79, 0.45);
    background: rgba(47, 168, 79, 0.12);
}

.ticket-action-panel.pending {
    border-color: rgba(217, 184, 111, 0.45);
    background: rgba(217, 184, 111, 0.10);
}

.ticket-action-panel.lost,
.ticket-action-panel.cancelled,
.ticket-action-panel.expired {
    border-color: rgba(255, 124, 124, 0.38);
    background: rgba(255, 124, 124, 0.08);
}

.ticket-action-panel.paid {
    border-color: rgba(99, 243, 164, 0.36);
    background: rgba(99, 243, 164, 0.09);
}

.printer-status {
    display: block;
    min-height: 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-align: center;
}

.printer-status[data-status="success"] {
    color: var(--accent);
}

.printer-status[data-status="failed"] {
    color: var(--danger);
}

.pos-print-output {
    position: fixed;
    top: 0;
    left: -100000px;
    width: 58mm;
    pointer-events: none;
    opacity: 1;
}

.pos-ticket-paper {
    width: 58mm;
    max-width: 58mm;
    overflow: hidden;
    border-radius: 0;
    background: #ffffff;
    color: #111111;
    padding: 2mm;
    font-family: "Courier New", Courier, monospace;
    box-shadow: none;
}

.pos-ticket-logo {
    display: block;
    width: 38mm;
    max-height: 22mm;
    object-fit: contain;
    margin: 0 auto 2mm;
}

.pos-ticket-paper pre {
    margin: 0;
    color: #111111;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.3;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

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

    .sidebar {
        position: static;
        height: auto;
    }

    .nav {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .sidebar-footer {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .grid.two,
    .grid.three,
    .stats-grid,
    .ticket-status-summary,
    .form-and-table,
    .ticket-builder,
    .ticket-page {
        grid-template-columns: 1fr;
    }

    .bet-slip {
        position: static;
    }

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

    .history-general-space {
        display: none;
    }

    .results-filter-grid,
    .results-board-row {
        min-width: 0;
        grid-template-columns: 1fr;
    }

    .result-management-actions,
    .result-score-form {
        grid-template-columns: 1fr;
    }

    .result-score-group {
        grid-template-columns: auto minmax(54px, 1fr) auto minmax(54px, 1fr);
    }
}

@media (max-width: 640px) {
    .main,
    .sidebar,
    .auth-shell {
        padding: 18px;
    }

    .login-card {
        border-radius: 22px;
        padding: 22px 18px;
    }

    .login-card h1 {
        font-size: 34px;
    }

    .login-field input {
        min-height: 56px;
        border-radius: 15px;
        padding-left: 56px;
        font-size: 16px;
    }

    .login-icon {
        left: 21px;
        width: 22px;
        height: 22px;
    }

    .login-submit {
        min-height: 58px;
        font-size: 20px;
    }

    .history-general-panel {
        padding: 18px;
    }

    .history-general-filter-actions .button,
    .history-general-row strong {
        width: 100%;
    }

    .history-general-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .history-general-summary {
        padding: 20px 18px 14px;
    }

    .history-general-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 0;
    }

    .results-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .results-filter-actions .button {
        width: 100%;
    }

    .result-score-value {
        font-size: 26px;
    }

    .topbar,
    .section-title,
    .sell-toolbar,
    .event-summary,
    .market-row,
    .split {
        display: grid;
        grid-template-columns: 1fr;
    }

    .match-row.compact {
        grid-template-columns: 1fr;
    }

    .match-row.compact .match-vs {
        margin-left: 38px;
    }

    .button,
    button.button,
    a.button {
        width: 100%;
    }

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

/* PositivoGo visual system */
:root {
    --bg: #040b16;
    --bg-2: #071224;
    --surface: rgba(7, 19, 37, 0.96);
    --surface-2: rgba(10, 24, 44, 0.92);
    --ink: #edf4ff;
    --ink-strong: #f7fbff;
    --muted: #93a9cf;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(122, 255, 114, 0.16);
    --primary: #8fff45;
    --primary-strong: #43dd51;
    --accent: #8fff45;
    --accent-strong: #43dd51;
    --gold: #ffd66d;
    --danger: #ff575d;
    --warning: #f0b243;
    --success: #27c878;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
    --font: "Instrument Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
    background: #030914;
}

body {
    background:
        linear-gradient(125deg, transparent 0 10%, rgba(64, 228, 94, 0.10) 11%, transparent 13%, transparent 86%, rgba(255, 214, 109, 0.07) 88%, transparent 90%),
        radial-gradient(circle, rgba(111, 255, 101, 0.16) 0 1px, transparent 1.8px) 0 0 / 32px 32px,
        linear-gradient(180deg, #040b16 0%, #071224 54%, #030914 100%);
    color-scheme: dark;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

.app-shell {
    display: block;
    min-height: 100vh;
}

.main {
    width: min(1640px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 26px 0 40px;
}

.desktop-topbar,
.mobile-header {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.desktop-topbar {
    display: flex;
}

.mobile-header {
    display: none;
}

.brand {
    display: inline-flex;
}

.brand-logo {
    width: 168px;
    filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.24));
}

.desktop-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    white-space: nowrap;
}

.chip strong {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.chip span {
    font-weight: 900;
}

.chip-status {
    border-color: rgba(143, 255, 69, 0.18);
    background: linear-gradient(180deg, rgba(143, 255, 69, 0.10), rgba(143, 255, 69, 0.04));
    box-shadow: 0 18px 40px rgba(67, 221, 81, 0.14);
}

.account-btn,
.logout-btn,
.quick-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 16px;
    font-weight: 900;
    color: #f5fbf7;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    white-space: nowrap;
}

.account-btn {
    border: 0;
    color: #042612;
    background: linear-gradient(180deg, #8fff45 0%, #43dd51 100%);
    box-shadow: 0 18px 34px rgba(67, 221, 81, 0.24);
}

.logout-btn,
.quick-nav-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(32, 48, 78, 0.88) 0%, rgba(18, 29, 52, 0.96) 100%);
}

.account-btn:hover,
.logout-btn:hover,
.quick-nav-btn:hover {
    transform: translateY(-1px);
}

.quick-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.quick-nav-btn.active {
    border-color: rgba(143, 255, 69, 0.72);
    background: linear-gradient(180deg, rgba(143, 255, 69, 0.18), rgba(67, 221, 81, 0.09));
    box-shadow: 0 0 0 1px rgba(143, 255, 69, 0.12), 0 16px 30px rgba(0, 0, 0, 0.24);
}

.page-title {
    margin: 0 0 18px;
}

.page-title h1 {
    margin: 0;
    color: var(--ink-strong);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 0.98;
    letter-spacing: 0;
}

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

.module-card {
    position: relative;
    overflow: hidden;
    min-height: 218px;
    padding: 24px;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    isolation: isolate;
}

.module-card::before {
    content: "";
    position: absolute;
    left: -24px;
    bottom: 34px;
    width: 150px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(143, 255, 69, 0), rgba(143, 255, 69, 0.34), rgba(255, 214, 109, 0.18));
    transform: rotate(-12deg);
    z-index: -1;
    pointer-events: none;
}

.module-card::after {
    content: "";
    position: absolute;
    top: 28px;
    right: -36px;
    width: 156px;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255, 214, 109, 0.22), rgba(143, 255, 69, 0.26), rgba(143, 255, 69, 0));
    transform: rotate(-16deg);
    z-index: -1;
    pointer-events: none;
}

.module-card:hover {
    transform: translateY(-4px);
    border-color: rgba(143, 255, 69, 0.22);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42), 0 16px 36px rgba(67, 221, 81, 0.12);
}

.module-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.module-icon {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(143, 255, 69, 0.18), rgba(143, 255, 69, 0.06));
    border: 1px solid rgba(143, 255, 69, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 34px rgba(0, 0, 0, 0.22);
    color: var(--accent);
    flex: 0 0 auto;
}

.module-icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.module-card[data-tone="gold"] .module-icon {
    color: var(--gold);
    background: linear-gradient(180deg, rgba(255, 214, 109, 0.18), rgba(255, 214, 109, 0.06));
    border-color: rgba(255, 214, 109, 0.18);
}

.module-glow {
    width: 54px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(143, 255, 69, 0.92), rgba(255, 214, 109, 0.60));
    box-shadow: 0 0 18px rgba(143, 255, 69, 0.34);
    opacity: 0.9;
    margin-top: 4px;
}

.module-name {
    margin: 18px 0 0;
    color: var(--ink-strong);
    font-size: 1.32rem;
    line-height: 1.04;
    letter-spacing: 0;
}

.module-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 22px;
    border-radius: 18px;
    border: 1px solid rgba(143, 255, 69, 0.24);
    background: linear-gradient(180deg, rgba(143, 255, 69, 0.24), rgba(34, 136, 86, 0.18));
    color: #f6fffb;
    font-weight: 900;
    box-shadow: 0 18px 30px rgba(67, 221, 81, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    width: fit-content;
}

.dashboard-hub .module-grid {
    gap: 16px;
    margin-top: 22px;
}

.dashboard-hub .module-card {
    min-height: 174px;
    padding: 22px 24px;
}

.dashboard-hub .module-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}

.dashboard-hub .module-name {
    font-size: 1.22rem;
}

.dashboard-hub .module-action {
    min-height: 48px;
    padding-inline: 20px;
}

.topbar {
    display: none;
}

.card {
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(7, 19, 37, 0.96) 0%, rgba(5, 15, 28, 0.98) 100%);
    box-shadow: var(--shadow);
    padding: 18px;
}

.stat-card,
.module-card,
.list-item,
.event-panel,
.slip-item,
.history-pick,
.history-detail-metrics span,
.result-note-grid span,
.ticket-action-panel {
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(14, 31, 58, 0.94) 0%, rgba(9, 21, 39, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 34px rgba(0, 0, 0, 0.24);
}

.eyebrow {
    color: var(--accent);
    letter-spacing: 0;
}

.card h2,
.form-card h2,
.section-title h2 {
    letter-spacing: 0;
}

input,
select,
textarea {
    min-height: 54px;
    border-radius: 18px;
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(19, 35, 62, 0.96) 0%, rgba(13, 26, 47, 1) 100%);
    color: #eef4ff;
    padding: 0 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

textarea {
    padding-block: 14px;
}

select {
    background-color: #16243c;
    border-radius: 18px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(79, 108, 255, 0.58);
    box-shadow: 0 0 0 3px rgba(79, 108, 255, 0.14), 0 12px 24px rgba(0, 0, 0, 0.18);
}

.button,
button.button,
a.button,
.quick-stakes button,
.odd-choice {
    min-height: 54px;
    border-radius: 18px;
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.button:hover,
button.button:hover,
a.button:hover,
.quick-stakes button:hover,
.odd-choice:hover {
    transform: translateY(-1px);
}

.button.small,
button.button.small,
a.button.small {
    min-height: 38px;
    border-radius: 14px;
    padding: 7px 12px;
    font-size: 12px;
}

.catalog-logo-form input {
    min-height: 42px;
}

.import-preview {
    margin-bottom: 18px;
}

.import-preview-table {
    min-width: 980px;
}

.button.primary {
    background: linear-gradient(180deg, #8fff45 0%, #43dd51 58%, #1f9f4a 100%);
    color: #042612;
    box-shadow: 0 18px 34px rgba(67, 221, 81, 0.26);
}

.button.ghost {
    background: linear-gradient(180deg, rgba(32, 48, 78, 0.88) 0%, rgba(18, 29, 52, 0.96) 100%);
    border-color: rgba(255, 255, 255, 0.08);
}

.alert,
.empty-state {
    border-radius: 20px;
    border-color: rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(14, 31, 58, 0.92) 0%, rgba(9, 21, 39, 0.98) 100%);
}

table {
    border-collapse: collapse;
    background: transparent;
}

th {
    color: #dce9fb;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

td {
    padding: 15px 16px;
}

tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.018);
}

tbody tr:hover {
    background: rgba(79, 108, 255, 0.07);
}

.badge {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(55, 77, 128, 0.78) 0%, rgba(26, 40, 72, 0.92) 100%);
    border-color: rgba(109, 137, 199, 0.22);
    color: #f0f5ff;
    font-weight: 900;
    letter-spacing: 0;
}

.badge.active,
.badge.open,
.badge.won,
.badge.paid,
.badge.success {
    background: linear-gradient(180deg, rgba(39, 200, 120, 0.22) 0%, rgba(20, 141, 94, 0.28) 100%);
    border-color: rgba(69, 255, 142, 0.26);
    color: #dfffea;
}

.badge.pending,
.badge.reopened,
.badge.running {
    background: linear-gradient(180deg, rgba(240, 178, 67, 0.18) 0%, rgba(203, 126, 20, 0.26) 100%);
    border-color: rgba(255, 199, 95, 0.24);
    color: #fff4d8;
}

.badge.inactive,
.badge.blocked,
.badge.deleted,
.badge.closed,
.badge.lost,
.badge.cancelled,
.badge.expired,
.badge.voided,
.badge.failed {
    background: linear-gradient(180deg, rgba(255, 87, 93, 0.18) 0%, rgba(217, 36, 54, 0.24) 100%);
    border-color: rgba(255, 120, 128, 0.22);
    color: #ffe3e6;
}

.auth-shell {
    background:
        linear-gradient(160deg, transparent 0 21%, rgba(111, 255, 80, 0.18) 21% 22%, transparent 22% 100%),
        linear-gradient(21deg, transparent 0 71%, rgba(111, 255, 80, 0.15) 71% 72%, transparent 72% 100%),
        radial-gradient(circle, rgba(98, 255, 88, 0.12) 0 1px, transparent 2px) 0 0 / 32px 32px,
        linear-gradient(180deg, #020817 0%, #021226 34%, #020817 100%);
}

.auth-shell::before,
.auth-shell::after {
    display: none;
}

.login-panel {
    width: min(100%, 560px);
}

.login-card {
    gap: 12px;
    border: 2px solid rgba(95, 255, 124, 0.48);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 29, 56, 0.88) 0%, rgba(5, 16, 35, 0.95) 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 0 28px rgba(65, 255, 95, 0.14), 0 32px 80px rgba(0, 0, 0, 0.48);
    padding: 24px 36px 22px;
    overflow: hidden;
}

.login-logo {
    width: min(100%, 360px);
    max-height: 132px;
    margin-bottom: 0;
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 0;
    background: linear-gradient(90deg, #ffffff 0%, #f7f7f7 55%, #5eff56 82%, #38c34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-field input {
    min-height: 60px;
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 19px;
    background: linear-gradient(180deg, rgba(28, 42, 71, 0.96) 0%, rgba(22, 34, 59, 0.92) 100%);
    padding: 0 62px 0 68px;
    font-size: 18px;
}

.login-field input:focus {
    border-color: rgba(129, 255, 105, 0.78);
    box-shadow: 0 0 0 3px rgba(129, 255, 105, 0.12), 0 0 24px rgba(74, 255, 95, 0.08);
}

.login-icon {
    left: 22px;
    width: 28px;
    height: 28px;
}

.login-eye {
    right: 20px;
    width: 32px;
    height: 32px;
}

.remember-line {
    gap: 12px;
    color: rgba(213, 227, 255, 0.70);
    font-size: 16px;
}

.remember-line input {
    width: 28px;
    min-height: 28px;
    border-radius: 7px;
    border: 1.5px solid rgba(111, 255, 83, 0.55);
    background: rgba(20, 35, 58, 0.96);
}

.login-submit {
    min-height: 66px;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(180deg, #89ff3c 0%, #57d341 56%, #2a9f34 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 16px 34px rgba(35, 152, 43, 0.32), 0 0 28px rgba(117, 255, 82, 0.24);
    font-size: 24px;
    font-weight: 900;
}

.secure-line {
    color: rgba(120, 255, 133, 0.92);
    font-size: 15px;
}

.login-version {
    color: rgba(228, 236, 255, 0.68);
    font-size: 13px;
}

.login-legal {
    margin-top: -2px;
    padding-top: 2px;
}

.mobile-drawer,
.mobile-drawer-backdrop {
    display: none;
}

.mobile-menu-btn,
.mobile-close-btn {
    width: 52px;
    min-width: 52px;
    height: 52px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--ink);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn svg,
.mobile-close-btn svg,
.mobile-drawer-link svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.mobile-logo {
    width: min(126px, 42vw);
    height: auto;
    filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.26));
}

@media (max-width: 980px) {
    .main {
        width: min(100%, calc(100vw - 24px));
        padding: 16px 0 28px;
    }

    .desktop-topbar,
    .quick-nav,
    .page-title {
        display: none;
    }

    .mobile-header {
        display: flex;
        position: relative;
        justify-content: center;
        min-height: 54px;
        overflow: hidden;
    }

    .mobile-header a {
        display: inline-flex;
        justify-content: center;
        min-width: 0;
        flex: 0 1 auto;
    }

    .mobile-header .mobile-menu-btn {
        position: absolute;
        left: 0;
        top: 0;
    }

    .mobile-drawer {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 70;
        display: flex;
        flex-direction: column;
        width: min(86vw, 360px);
        min-height: 100vh;
        min-height: 100dvh;
        background: linear-gradient(180deg, rgba(9, 15, 25, 0.98), rgba(7, 11, 18, 0.99));
        border-right: 1px solid rgba(143, 255, 69, 0.16);
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.48);
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }

    .mobile-drawer.is-open {
        transform: translateX(0);
    }

    .mobile-drawer-backdrop {
        position: fixed;
        inset: 0;
        z-index: 65;
        display: block;
        background: rgba(0, 0, 0, 0.58);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .mobile-drawer-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 18px 18px 14px;
    }

    .mobile-drawer-logo {
        width: 112px;
        height: auto;
        filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.26));
    }

    .mobile-drawer-links {
        display: grid;
        gap: 10px;
        padding: 6px 14px 14px;
        overflow: auto;
    }

    .mobile-drawer-link {
        min-height: 58px;
        border-radius: 18px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.04);
        color: var(--ink);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 0 16px;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
        font-weight: 900;
    }

    .mobile-drawer-link span {
        display: inline-flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-drawer-link i {
        width: 12px;
        height: 12px;
        border-radius: 999px;
        background: linear-gradient(180deg, var(--accent), var(--gold));
        box-shadow: 0 0 18px rgba(143, 255, 69, 0.34);
    }

    .mobile-drawer-link.active {
        border-color: rgba(143, 255, 69, 0.24);
        background: rgba(143, 255, 69, 0.08);
    }

    .mobile-drawer-footer {
        display: grid;
        gap: 8px;
        margin-top: auto;
        padding: 14px;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.03));
    }

    .mobile-drawer-footer strong {
        color: var(--ink-strong);
    }

    .mobile-drawer-footer span {
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
    }

    .mobile-logout {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 56px;
        border-radius: 18px;
        color: #ffffff;
        background: linear-gradient(180deg, #25344c 0%, #172130 100%);
        font-weight: 900;
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    }

    .card {
        border-radius: 24px;
        padding: 14px;
    }

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

    .grid.two,
    .grid.three,
    .stats-grid,
    .ticket-status-summary,
    .form-and-table,
    .ticket-builder,
    .ticket-page {
        grid-template-columns: 1fr;
    }

    .button,
    button.button,
    a.button {
        width: 100%;
    }

    .history-entry-actions {
        grid-template-columns: 1fr;
    }

    .history-entry-actions.compact {
        display: grid;
        grid-template-columns: 1fr;
    }

    .history-specific-item {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .auth-shell {
        padding: 20px 14px;
    }

    .login-panel {
        display: block;
        width: 100%;
    }

    .auth-main,
    .login-panel,
    .login-card {
        max-width: 100%;
        min-width: 0;
    }

    .auth-main {
        width: calc(100vw - 32px);
    }

    .login-card {
        width: min(100%, 340px);
        margin: 0 auto;
        gap: 12px;
        border-radius: 22px;
        padding: 20px 18px 18px;
    }

    .login-field,
    .login-field input,
    .login-submit,
    .secure-line,
    .login-legal,
    .login-version {
        max-width: 100%;
        min-width: 0;
    }

    .login-logo {
        width: min(100%, 330px);
        max-height: 124px;
    }

    .login-card h1 {
        font-size: 30px;
    }

    .login-field input {
        min-height: 66px;
        border-radius: 16px;
        padding-left: 66px;
        padding-right: 52px;
        font-size: 18px;
    }

    .login-icon {
        left: 18px;
        width: 30px;
        height: 30px;
    }

    .login-eye {
        right: 18px;
    }

    .remember-line {
        font-size: 16px;
    }

    .login-submit {
        min-height: 66px;
        border-radius: 17px;
        font-size: 24px;
    }

    .login-legal {
        gap: 8px;
        font-size: 11px;
    }

    .login-legal img {
        width: 34px;
        height: 34px;
    }

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

    .module-card {
        min-height: 168px;
    }
}

.ticket-builder.sale-workbench {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    overflow: hidden;
}

.sale-console {
    position: relative;
    z-index: 20;
    display: grid;
    gap: 12px;
    border: 1px solid rgba(143, 255, 69, 0.14);
    border-radius: 24px;
    background:
        linear-gradient(90deg, rgba(7, 45, 34, 0.95) 0%, rgba(5, 39, 32, 0.97) 48%, rgba(4, 28, 28, 0.99) 100%);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 -2px 0 rgba(143, 255, 69, 0.10);
    padding: 18px;
}

.sale-console-main {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
    align-items: stretch;
    min-width: 0;
}

.sale-input {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    align-items: center;
    min-height: 56px;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #edf3ff 100%);
    color: #1d2940;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

.sale-stake-input {
    grid-template-columns: 126px minmax(0, 1fr) 58px;
}

.sale-payout-input {
    grid-template-columns: 168px minmax(0, 1fr);
}

.sale-input span {
    display: inline-flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    border-right: 1px solid rgba(16, 30, 54, 0.12);
    color: #2c3951;
    font-size: 15px;
    font-weight: 900;
    white-space: nowrap;
}

.sale-input input {
    min-height: 56px;
    width: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #101928;
    font-size: 15px;
    font-weight: 900;
    padding: 0 14px;
}

.sale-input em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-left: 1px solid rgba(16, 30, 54, 0.12);
    color: #1a2539;
    font-style: normal;
    font-size: 16px;
    font-weight: 950;
}

.sale-input input:focus {
    box-shadow: inset 0 0 0 3px rgba(79, 108, 255, 0.16);
}

.sale-payout-input strong {
    min-width: 0;
    padding: 0 16px;
    color: #0d1729;
    font-size: 16px;
    line-height: 1;
    overflow-wrap: anywhere;
    white-space: nowrap;
}

.sale-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    padding: 0 14px;
    color: #f8fff8;
    font-size: 14px;
    font-weight: 950;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
    min-width: 0;
}

@media (min-width: 1280px) {
    .sale-console-main {
        grid-template-columns: minmax(15rem, 0.9fr) minmax(16rem, 0.9fr) auto auto auto auto;
        align-items: center;
    }
}

.sale-action.save {
    border: 0;
    color: #082414;
    background: linear-gradient(180deg, #a6ff49 0%, #44df52 62%, #209f49 100%);
    box-shadow: 0 18px 34px rgba(67, 221, 81, 0.28);
}

.sale-action.clear,
.sale-action.guide,
.sale-action.odd-total {
    background: rgba(2, 20, 20, 0.72);
}

.sale-action.odd-total {
    gap: 8px;
    color: #e6ffb8;
}

.sale-action.odd-total strong {
    color: #ffffff;
    letter-spacing: 0;
}

.sale-action:disabled {
    cursor: not-allowed;
    opacity: 0.54;
    filter: grayscale(0.2);
}

.sale-action.save:disabled {
    opacity: 1;
    filter: none;
}

.sale-console-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.sale-count-pill,
.sale-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 950;
}

.sale-count-pill {
    color: #061d11;
    background: linear-gradient(180deg, #a6ff49 0%, #5bea45 100%);
    box-shadow: 0 14px 30px rgba(67, 221, 81, 0.22);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sale-count-pill strong {
    margin-left: 7px;
    letter-spacing: 0;
}

.sale-status-pill {
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: rgba(238, 244, 255, 0.72);
    background: rgba(255, 255, 255, 0.025);
}

.sell-guide-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) minmax(260px, 340px);
    gap: 12px;
    align-items: end;
    padding-top: 6px;
}

.sell-guide-panel[hidden],
.sale-slip-items.is-empty {
    display: none !important;
}

.sale-slip-items {
    max-height: 230px;
    overflow: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 12px;
}

.sale-slip-items .slip-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.sale-slip-items .slip-item strong,
.sale-slip-items .slip-item span {
    grid-column: 1;
}

.sale-slip-items .slip-item button {
    grid-column: 2;
    grid-row: 1 / span 2;
}

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

.sale-league-card {
    overflow: hidden;
    border: 1px solid rgba(143, 255, 69, 0.12);
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(4, 22, 22, 0.97) 0%, rgba(5, 34, 25, 0.95) 100%);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26), inset 0 -2px 0 rgba(143, 255, 69, 0.08);
}

.sale-league-card.hidden {
    display: none;
}

.sale-league-card > summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 12px 18px;
    cursor: pointer;
    list-style: none;
    min-width: 0;
}

.sale-league-card > summary::-webkit-details-marker {
    display: none;
}

.sale-league-code {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #d9ff9d;
    font-size: 12px;
    font-weight: 950;
}

.sale-league-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.sale-league-copy strong {
    color: #ffffff;
    font-size: 21px;
    line-height: 1.05;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}

.sale-league-copy small {
    color: rgba(235, 241, 255, 0.58);
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.sale-league-open {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #ffffff;
    color: #051113;
    font-size: 28px;
    font-weight: 950;
    transition: transform 0.18s ease, background 0.18s ease;
}

.sale-league-card[open] .sale-league-open {
    transform: rotate(45deg);
    background: #a6ff49;
}

.sale-league-events {
    display: grid;
    gap: 12px;
    padding: 0 18px 18px;
}

.sale-empty-line {
    min-height: 58px;
    display: flex;
    align-items: center;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(238, 244, 255, 0.58);
    font-weight: 900;
    padding: 0 18px;
}

.sale-event-panel {
    background: linear-gradient(180deg, rgba(10, 25, 42, 0.98) 0%, rgba(6, 18, 30, 0.98) 100%);
}

.sale-event-panel .event-summary {
    margin-bottom: 14px;
}

.sale-event-panel .market-row {
    grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
}

@media (max-width: 980px) {
    .sell-guide-panel {
        grid-template-columns: 1fr 1fr;
    }

    .sell-guide-panel .quick-stakes {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .sale-console {
        position: static;
        border-radius: 22px;
        padding: 14px;
    }

    .sale-console-main,
    .sell-guide-panel,
    .sale-league-card > summary,
    .sale-event-panel .market-row {
        grid-template-columns: 1fr;
    }

    .sale-league-card > summary {
        justify-items: start;
        gap: 12px;
        min-height: 0;
    }

    .sale-league-open {
        position: absolute;
        right: 18px;
        top: 22px;
        width: 48px;
        height: 48px;
    }

    .sale-league-card {
        position: relative;
    }

    .sale-league-copy strong {
        padding-right: 64px;
        font-size: 21px;
    }
}

@media (max-width: 420px) {
    .sale-stake-input,
    .sale-payout-input {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .sale-input span {
        min-height: 42px;
        border-right: 0;
        border-bottom: 1px solid rgba(16, 30, 54, 0.12);
    }

    .sale-input em {
        min-height: 42px;
        border-left: 0;
        border-top: 1px solid rgba(16, 30, 54, 0.12);
    }
}

.royal-sale-workbench {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
    overflow: visible;
}

.royal-parley-ticketbar {
    position: relative;
    z-index: 30;
    border: 1px solid rgba(183, 243, 74, 0.13);
    border-radius: 1.45rem;
    background: rgba(4, 31, 27, 0.90);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.30);
    padding: 14px;
}

.royal-ticketbar-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: center;
}

.royal-parley-input {
    overflow: hidden;
    border-radius: 1.05rem;
    background: #ffffff;
    color: #111827;
}

.royal-input-grid {
    display: grid;
    align-items: center;
    min-height: 56px;
}

.royal-stake-grid {
    grid-template-columns: 7rem minmax(0, 1fr) 4rem;
}

.royal-payout-grid {
    grid-template-columns: 10rem minmax(0, 1fr);
}

.royal-input-grid span,
.royal-input-grid em,
.royal-input-grid strong {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 0 14px;
    color: #334155;
    font-size: 14px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.royal-input-grid span {
    border-right: 1px solid #e2e8f0;
}

.royal-input-grid em {
    justify-content: center;
    border-left: 1px solid #e2e8f0;
    color: #1f2937;
    font-style: normal;
}

.royal-input-grid strong {
    min-width: 0;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
}

.royal-input-grid input {
    min-height: 56px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    color: #0f172a;
    box-shadow: none;
    font-size: 14px;
    font-weight: 950;
    padding: 0 12px;
}

.royal-input-grid input::placeholder {
    color: #94a3b8;
}

.royal-input-grid input:focus {
    border: 0;
    box-shadow: none;
}

.royal-parley-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border-radius: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0 20px;
    font-size: 13px;
    font-weight: 1000;
    letter-spacing: 0.18em;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.royal-parley-action:hover {
    transform: translateY(-1px);
}

.royal-action-save {
    border: 0;
    background: linear-gradient(180deg, #a6ff49 0%, #44df52 62%, #209f49 100%);
    color: #03130f;
    box-shadow: 0 18px 34px rgba(67, 221, 81, 0.28);
}

.royal-action-save:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.royal-action-dark,
.royal-action-odd {
    background: rgba(2, 20, 20, 0.72);
    color: #ffffff;
}

.royal-action-odd {
    color: #e6ffb8;
    gap: 8px;
}

.royal-action-odd span {
    color: #ffffff;
    letter-spacing: 0;
}

.royal-selection-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.royal-selection-count,
.royal-selection-empty,
.royal-selection-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 0 18px;
    font-size: 13px;
    font-weight: 950;
}

.royal-selection-count {
    background: linear-gradient(180deg, #a6ff49 0%, #5bea45 100%);
    color: #03130f;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    box-shadow: 0 14px 30px rgba(67, 221, 81, 0.22);
}

.royal-selection-count strong {
    margin-left: 7px;
    letter-spacing: 0;
}

.royal-selection-empty {
    border: 1px dashed rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.025);
    color: rgba(255, 255, 255, 0.45);
}

.royal-selection-empty.is-hidden {
    display: none;
}

.royal-selection-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.royal-selection-items.is-empty {
    display: none;
}

.royal-selection-pill {
    border: 1px solid rgba(183, 243, 74, 0.30);
    background: rgba(183, 243, 74, 0.10);
    color: #eaffd6;
    cursor: pointer;
}

.royal-selection-pill span {
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.52);
}

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

.royal-league-card {
    overflow: hidden;
    border: 1px solid rgba(183, 243, 74, 0.11);
    border-radius: 0.95rem;
    background: rgba(8, 31, 29, 0.80);
}

.royal-league-card.hidden {
    display: none;
}

.royal-league-card > summary {
    list-style: none;
}

.royal-league-card > summary::-webkit-details-marker {
    display: none;
}

.royal-league-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
    border-bottom: 2px solid rgba(183, 243, 74, 0.12);
    background: linear-gradient(90deg, rgba(6, 19, 17, 0.98), rgba(20, 42, 31, 0.94));
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.16s ease;
}

.royal-league-head:hover {
    background: linear-gradient(90deg, rgba(7, 24, 21, 0.98), rgba(24, 49, 36, 0.96));
}

.royal-league-label {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
}

.royal-league-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    color: #d9ff9d;
    font-size: 12px;
    font-weight: 1000;
}

.royal-league-icon.has-image {
    padding: 6px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 0 0 1px rgba(3, 19, 15, 0.10), 0 12px 24px rgba(0, 0, 0, 0.20);
}

.royal-league-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.royal-league-icon.league-logo-mlb,
.royal-league-icon.league-logo-baseball-mlb {
    padding: 4px;
}

.royal-league-icon.league-logo-mlb img,
.royal-league-icon.league-logo-baseball-mlb img {
    width: 98%;
    height: 98%;
}

.royal-league-icon.league-logo-nba,
.royal-league-icon.league-logo-basketball-nba {
    padding: 9px;
}

.royal-league-icon.league-logo-nba img,
.royal-league-icon.league-logo-basketball-nba img {
    width: 92%;
    height: 92%;
}

.royal-league-icon.league-logo-liga-bbva,
.royal-league-icon.league-logo-soccer-spain-la-liga {
    padding: 3px;
}

.royal-league-icon.league-logo-liga-bbva img,
.royal-league-icon.league-logo-soccer-spain-la-liga img {
    width: 108%;
    height: 108%;
}

.royal-league-icon.league-logo-uefa-champions-league,
.royal-league-icon.league-logo-uefa-europa-league,
.royal-league-icon.league-logo-uefa-conference-league {
    padding: 2px;
    background: #07111c;
    box-shadow: inset 0 0 0 1px rgba(143, 255, 69, 0.20), 0 12px 24px rgba(0, 0, 0, 0.24);
}

.royal-league-icon.league-logo-uefa-champions-league img,
.royal-league-icon.league-logo-uefa-europa-league img,
.royal-league-icon.league-logo-uefa-conference-league img {
    width: 112%;
    height: 112%;
}

.royal-league-icon.league-logo-atp,
.royal-league-icon.league-logo-boxeo-internacional,
.royal-league-icon.league-logo-euroleague,
.royal-league-icon.league-logo-grand-slam,
.royal-league-icon.league-logo-ufc {
    width: 64px;
    border-radius: 18px;
    padding: 7px 8px;
}

.royal-league-icon.league-logo-atp img,
.royal-league-icon.league-logo-boxeo-internacional img,
.royal-league-icon.league-logo-euroleague img,
.royal-league-icon.league-logo-grand-slam img,
.royal-league-icon.league-logo-ufc img {
    width: 100%;
    height: 100%;
}

.royal-league-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.royal-league-copy strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 22px;
    font-weight: 1000;
    letter-spacing: 0.04em;
    line-height: 1.05;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.royal-league-copy small {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: 0.18em;
    line-height: 1;
    text-transform: uppercase;
}

.royal-league-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #ffffff;
    color: #03130f;
    font-size: 28px;
    font-weight: 1000;
}

.royal-league-toggle::before {
    content: "+";
}

.royal-league-card[open] .royal-league-toggle::before {
    content: "-";
}

.royal-board-scroll {
    overflow-x: auto;
}

.royal-board-body {
    display: grid;
    gap: 6px;
    background: rgba(5, 17, 17, 0.92);
    padding: 8px;
}

.royal-board-row {
    display: grid;
    min-width: 76rem;
    grid-template-columns: minmax(19rem, 0.95fr) minmax(28rem, 1fr) minmax(26rem, 0.98fr);
    gap: 9px;
}

.royal-board-row.hidden {
    display: none;
}

.royal-matchup-card,
.royal-market-board {
    min-height: 7.75rem;
    border: 1px solid rgba(183, 243, 74, 0.10);
    border-radius: 0.45rem;
    background: linear-gradient(135deg, rgba(18, 63, 54, 0.94), rgba(14, 39, 42, 0.90));
}

.royal-matchup-card {
    position: relative;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    overflow: hidden;
    padding: 13px 15px;
}

.royal-matchup-card::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(61, 137, 157, 0.32), transparent 24%, transparent 76%, rgba(183, 243, 74, 0.14));
}

.royal-team-side,
.royal-game-center {
    position: relative;
    z-index: 1;
}

.royal-team-side {
    display: grid;
    justify-items: center;
    min-width: 0;
    gap: 6px;
    text-align: center;
}

.royal-team-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.90), rgba(183, 243, 74, 0.24) 54%, rgba(4, 20, 18, 0.62));
    color: #03130f;
    font-size: 12px;
    font-weight: 1000;
}

.royal-team-logo.has-image {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 2px rgba(3, 19, 15, 0.08);
    padding: 5px;
}

.royal-team-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.royal-team-logo.has-image .royal-team-initials {
    display: none;
}

.royal-team-logo.has-image img.is-missing {
    display: none;
}

.royal-team-logo.has-image img.is-missing + .royal-team-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.royal-team-name {
    max-width: 100%;
    overflow: hidden;
    color: #ffffff;
    font-size: 13px;
    font-weight: 1000;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.royal-rotation {
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    font-weight: 800;
}

.royal-game-center {
    min-width: 68px;
    text-align: center;
}

.royal-vs {
    margin: 0;
    color: #ffc247;
    font-size: 20px;
    font-weight: 1000;
    line-height: 1;
}

.royal-game-time,
.royal-game-date {
    margin: 4px 0 0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 1000;
    line-height: 1.25;
}

.royal-game-date {
    color: rgba(255, 255, 255, 0.72);
}

.royal-market-board {
    padding: 7px;
}

.royal-market-title {
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 1000;
    line-height: 1;
    text-align: center;
}

.royal-market-grid {
    display: grid;
    grid-template-columns: repeat(var(--market-columns, 4), minmax(0, 1fr));
    gap: 3px;
}

.royal-market-head {
    min-height: 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
}

.royal-board-odd,
.royal-board-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid rgba(90, 184, 211, 0.28);
    border-radius: 0.38rem;
    background: rgba(37, 98, 112, 0.92);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    padding: 5px 7px;
    text-align: center;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.royal-board-odd {
    cursor: pointer;
}

.royal-board-odd.hidden {
    display: none;
}

.royal-board-odd:hover,
.royal-board-odd.selected,
.royal-board-odd.is-selected {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.45);
    background: #a6ff49;
    color: #03130f;
}

.royal-board-odd:disabled,
.royal-board-odd.is-combo-blocked {
    cursor: not-allowed;
    opacity: 0.42;
    filter: grayscale(0.75);
}

.royal-board-odd:disabled:hover,
.royal-board-odd.is-combo-blocked:hover {
    transform: none;
    border-color: rgba(90, 184, 211, 0.28);
    background: rgba(37, 98, 112, 0.92);
    color: #ffffff;
}

.royal-board-empty {
    border-color: transparent;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.62);
}

.royal-board-empty-row {
    min-height: 64px;
    display: flex;
    align-items: center;
    border: 1px dashed rgba(183, 243, 74, 0.15);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.48);
    font-weight: 900;
    padding: 0 18px;
}

.royal-guide-anchor {
    display: block;
    height: 1px;
}

@media (min-width: 1280px) {
    .royal-ticketbar-grid {
        grid-template-columns: minmax(15rem, 0.9fr) minmax(16rem, 0.9fr) auto auto auto auto;
    }
}

@media (max-width: 900px) {
    .royal-parley-ticketbar {
        position: static;
    }

    .royal-board-row {
        min-width: 0;
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .royal-parley-ticketbar {
        border-radius: 22px;
        padding: 12px;
    }

    .royal-league-head {
        min-height: 74px;
        padding: 12px;
    }

    .royal-league-copy strong {
        font-size: 18px;
    }

    .royal-league-toggle {
        width: 48px;
        height: 48px;
    }
}

.mobile-dashboard-home {
    display: none;
}

@media (max-width: 980px) {
    .mobile-header {
        justify-content: space-between;
        min-height: 92px;
        margin-bottom: 20px;
        overflow: visible;
        padding: 10px 8px 0;
    }

    .mobile-header .mobile-menu-btn {
        position: static;
        width: 68px;
        min-width: 68px;
        height: 68px;
        border-radius: 24px;
        background: linear-gradient(180deg, rgba(35, 50, 82, 0.96), rgba(17, 27, 47, 0.98));
    }

    .mobile-header .mobile-menu-btn svg {
        width: 30px;
        height: 30px;
        stroke-width: 2.5;
    }

    .mobile-header a {
        justify-content: flex-end;
        margin-left: auto;
    }

    .mobile-logo {
        width: min(190px, 52vw);
    }

    .mobile-drawer {
        width: min(88vw, 390px);
        border-right-color: rgba(143, 255, 69, 0.28);
        background: linear-gradient(180deg, rgba(8, 14, 24, 0.99), rgba(5, 9, 16, 0.99));
    }

    .mobile-drawer::after {
        content: "";
        position: absolute;
        top: 24%;
        right: -1px;
        bottom: 24%;
        width: 5px;
        border-radius: 999px;
        background: linear-gradient(180deg, rgba(143, 255, 69, 0), rgba(143, 255, 69, 0.72), rgba(143, 255, 69, 0));
    }

    .mobile-drawer-head {
        padding: 34px 26px 24px;
    }

    .mobile-drawer-logo {
        width: min(184px, 50vw);
    }

    .mobile-close-btn {
        width: 68px;
        min-width: 68px;
        height: 68px;
        border-radius: 22px;
        background: linear-gradient(180deg, rgba(32, 42, 65, 0.96), rgba(13, 19, 31, 0.98));
    }

    .mobile-close-btn svg {
        width: 32px;
        height: 32px;
        stroke-width: 2.4;
    }

    .mobile-drawer-links {
        gap: 14px;
        padding: 8px 20px 18px;
    }

    .mobile-drawer-link {
        min-height: 74px;
        border-radius: 22px;
        padding: 0 22px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03));
        color: #f6fbff;
        font-size: 23px;
        font-weight: 950;
    }

    .mobile-drawer-link i {
        width: 14px;
        height: 14px;
    }

    .mobile-drawer-link svg {
        width: 26px;
        height: 26px;
        stroke-width: 2.5;
    }

    .mobile-drawer-footer {
        padding: 16px 20px 24px;
    }

    .mobile-drawer-footer strong,
    .mobile-drawer-footer span {
        display: none;
    }

    .mobile-logout {
        min-height: 72px;
        border-radius: 22px;
        font-size: 24px;
        font-weight: 950;
    }

    .dashboard-hub .module-grid {
        display: none;
    }

    .mobile-dashboard-home {
        display: block;
        padding: 14px 0 34px;
    }

    .mobile-home-card {
        display: grid;
        gap: 18px;
        width: min(100%, 390px);
        margin: 0 auto;
        border: 1px solid rgba(99, 243, 164, 0.20);
        border-radius: 36px;
        background: linear-gradient(160deg, rgba(10, 23, 38, 0.90), rgba(6, 15, 30, 0.98) 62%, rgba(20, 76, 55, 0.15));
        box-shadow: 0 26px 68px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
        padding: 26px;
    }

    .mobile-info-tile {
        display: grid;
        align-content: center;
        gap: 10px;
        min-height: 112px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 26px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
        padding: 22px;
    }

    .mobile-info-tile span {
        color: rgba(215, 226, 249, 0.70);
        font-size: 18px;
        font-weight: 950;
        letter-spacing: 0.02em;
        line-height: 1;
        text-transform: uppercase;
    }

    .mobile-info-tile strong {
        color: #f7fbff;
        font-size: clamp(24px, 6vw, 32px);
        font-weight: 950;
        line-height: 1.08;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .mobile-info-tile .mobile-status-active {
        color: #63f3a4;
    }

    .mobile-time-tile {
        border-color: rgba(99, 243, 164, 0.22);
        background: linear-gradient(180deg, rgba(17, 62, 57, 0.46), rgba(8, 28, 35, 0.64));
    }

    .mobile-time-tile strong {
        font-size: clamp(34px, 9vw, 48px);
        white-space: nowrap;
    }

    .mobile-time-tile em {
        color: rgba(229, 238, 255, 0.72);
        font-size: clamp(17px, 4.4vw, 21px);
        font-style: normal;
        font-weight: 900;
        line-height: 1.18;
    }
}

@media (max-width: 420px) {
    .mobile-header {
        min-height: 84px;
        padding-inline: 4px;
    }

    .mobile-header .mobile-menu-btn {
        width: 64px;
        min-width: 64px;
        height: 64px;
        border-radius: 22px;
    }

    .mobile-logo {
        width: min(178px, 52vw);
    }

    .mobile-home-card {
        width: min(100%, 360px);
        border-radius: 32px;
        padding: 22px 18px;
    }

    .mobile-info-tile {
        min-height: 106px;
        border-radius: 24px;
        padding: 20px 18px;
    }
}

/* Mobile web refinement */
@media (max-width: 980px) {
    .main {
        width: min(100%, calc(100vw - 18px));
        padding: 10px 0 24px;
    }

    .mobile-header {
        min-height: 66px;
        margin-bottom: 12px;
        padding: 4px 2px 0;
    }

    .mobile-header .mobile-menu-btn,
    .mobile-close-btn {
        width: 54px;
        min-width: 54px;
        height: 54px;
        border-radius: 18px;
    }

    .mobile-header .mobile-menu-btn svg,
    .mobile-close-btn svg {
        width: 24px;
        height: 24px;
        stroke-width: 2.25;
    }

    .mobile-logo {
        width: min(150px, 46vw);
    }

    .mobile-drawer {
        width: min(84vw, 330px);
    }

    .mobile-drawer::after {
        width: 3px;
    }

    .mobile-drawer-head {
        padding: 20px 16px 14px;
    }

    .mobile-drawer-logo {
        width: min(150px, 46vw);
    }

    .mobile-drawer-links {
        gap: 9px;
        padding: 6px 12px 14px;
    }

    .mobile-drawer-link {
        min-height: 56px;
        border-radius: 17px;
        padding: 0 14px;
        font-size: 17px;
        line-height: 1;
    }

    .mobile-drawer-link span {
        gap: 10px;
        min-width: 0;
    }

    .mobile-drawer-link i {
        width: 9px;
        height: 9px;
    }

    .mobile-drawer-link svg {
        width: 21px;
        height: 21px;
        stroke-width: 2.2;
    }

    .mobile-drawer-footer {
        padding: 12px 14px 18px;
    }

    .mobile-logout {
        min-height: 56px;
        border-radius: 18px;
        font-size: 18px;
    }

    .mobile-dashboard-home {
        padding: 6px 0 22px;
    }

    .mobile-home-card {
        width: min(100%, 360px);
        gap: 12px;
        border-radius: 26px;
        padding: 18px;
    }

    .mobile-info-tile {
        min-height: 82px;
        border-radius: 18px;
        gap: 7px;
        padding: 15px 16px;
    }

    .mobile-info-tile span {
        font-size: 13px;
    }

    .mobile-info-tile strong {
        font-size: clamp(21px, 5.3vw, 26px);
    }

    .mobile-time-tile strong {
        font-size: clamp(28px, 7.2vw, 38px);
    }

    .mobile-time-tile em {
        font-size: 15px;
    }

    .card,
    .stat-card,
    .module-card,
    .list-item,
    .event-panel,
    .slip-item,
    .history-pick,
    .history-detail-metrics span,
    .result-note-grid span,
    .ticket-action-panel {
        border-radius: 18px;
    }

    .card {
        padding: 13px;
    }

    .section-title {
        display: grid;
        align-items: stretch;
        gap: 10px;
    }

    .section-title h2,
    .form-card h2 {
        font-size: 20px;
        line-height: 1.1;
    }

    label,
    .compact-label {
        font-size: 12px;
    }

    input,
    select,
    textarea {
        min-height: 48px;
        border-radius: 14px;
        padding-inline: 13px;
        font-size: 16px;
    }

    .button,
    button.button,
    a.button,
    .quick-stakes button,
    .odd-choice {
        min-height: 46px;
        border-radius: 14px;
        padding: 9px 12px;
        white-space: normal;
    }

    .button-row,
    .actions {
        gap: 7px;
    }

    .table-wrap {
        border-radius: 16px;
        scrollbar-width: thin;
    }

    .table-wrap .button,
    .table-wrap button.button,
    .table-wrap a.button {
        width: auto;
        min-height: 40px;
        padding-inline: 12px;
        white-space: nowrap;
    }

    .table-wrap .actions {
        flex-wrap: nowrap;
        align-items: center;
    }

    table {
        min-width: 620px;
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 10px 9px;
    }

    .stats-grid,
    .ticket-status-summary,
    .results-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card,
    .ticket-status-card,
    .results-stats .stat-card {
        min-height: 92px;
        padding: 13px;
    }

    .stat-card strong,
    .ticket-status-card strong,
    .results-stats .stat-card strong {
        font-size: 24px;
    }

    .stat-card span,
    .ticket-status-card span {
        font-size: 13px;
    }

    .eyebrow {
        font-size: 11px;
    }

    .module-card {
        min-height: 138px;
        padding: 16px;
    }

    .module-card::before,
    .module-card::after {
        opacity: 0.72;
    }

    .module-icon,
    .dashboard-hub .module-icon {
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    .module-icon svg {
        width: 22px;
        height: 22px;
    }

    .module-glow {
        width: 40px;
        height: 6px;
    }

    .module-name,
    .dashboard-hub .module-name {
        font-size: 1.04rem;
    }

    .module-action,
    .dashboard-hub .module-action {
        min-height: 40px;
        border-radius: 14px;
        padding-inline: 15px;
    }

    .history-entry-actions {
        gap: 10px;
    }

    .history-entry-btn {
        min-height: 86px;
        border-radius: 20px;
        font-size: 22px;
    }

    .history-entry-actions.compact {
        gap: 8px;
    }

    .history-entry-actions.compact .history-entry-btn {
        min-height: 46px;
        border-radius: 14px;
        padding: 0 13px;
        font-size: 15px;
    }

    .history-general-filters {
        padding-bottom: 16px;
    }

    .history-general-panel {
        min-height: auto;
        border-radius: 20px;
        padding: 16px;
    }

    .history-general-panel h2 {
        margin-bottom: 14px;
        font-size: 22px;
    }

    .history-general-summary {
        border-radius: 18px;
        padding: 16px 14px 12px;
    }

    .history-general-summary h3 {
        margin-bottom: 14px;
        font-size: 18px;
    }

    .history-general-row {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 52px;
        gap: 10px;
        padding: 8px 0;
    }

    .history-general-row span {
        font-size: 16px;
        line-height: 1.1;
    }

    .history-general-row strong {
        width: auto;
        min-width: 58px;
        max-width: 46vw;
        padding: 9px 12px;
        font-size: 14px;
    }

    .history-specific-list {
        max-height: none;
        padding-right: 0;
    }

    .history-specific-item {
        grid-template-columns: 1fr;
        gap: 9px;
        border-radius: 18px;
        padding: 12px;
    }

    .history-specific-item .result-badge {
        justify-content: center;
        width: 100%;
    }

    .results-filter-bar {
        padding: 13px;
    }

    .results-filter-grid {
        gap: 10px;
    }

    .results-filter-actions {
        gap: 10px;
    }

    .results-board-row {
        min-width: 0;
        gap: 8px;
    }

    .result-score-board,
    .result-actions-board {
        min-height: auto;
        border-radius: 12px;
        padding: 12px;
    }

    .result-score-line {
        min-height: 40px;
        border-radius: 11px;
    }

    .result-score-mini {
        font-size: 22px;
    }

    .result-ticket-chips span,
    .result-readonly-note {
        min-height: 34px;
        padding-inline: 10px;
        font-size: 11px;
    }

    .result-management-actions,
    .result-score-form {
        grid-template-columns: 1fr;
    }

    .result-score-group {
        grid-template-columns: auto minmax(44px, 1fr) auto minmax(44px, 1fr);
    }

    .ticket-page {
        gap: 12px;
    }

    .ticket-receipt {
        border-radius: 18px;
        padding: 13px;
    }

    .receipt-head strong,
    .receipt-code strong {
        font-size: 17px;
    }

    .receipt-code span {
        gap: 10px;
    }

    .receipt-code strong {
        font-size: 14px;
    }

    .receipt-lines div {
        border-radius: 12px;
        padding: 10px;
    }

    .receipt-lines div > strong {
        font-size: 15px;
    }

    .receipt-pick {
        padding: 8px;
        font-size: 14px;
    }

    .ticket-action-panel {
        padding: 13px;
    }

    .ticket-action-panel h2 {
        font-size: 19px;
    }

    .ticket-action-panel > strong {
        font-size: 24px;
    }

    .cashbox-league-picker {
        padding: 12px;
        border-radius: 18px;
    }

    .cashbox-league-group summary {
        padding: 12px;
    }

    .cashbox-league-options {
        grid-template-columns: 1fr;
        padding: 0 12px 12px;
    }

    .cashbox-league-option {
        min-height: 44px;
        border-radius: 12px;
        padding: 9px 10px;
    }
}

@media (max-width: 640px) {
    .table-wrap {
        overflow-x: visible;
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .table-wrap thead {
        display: none;
    }

    .table-wrap tbody {
        display: grid;
        gap: 10px;
    }

    .table-wrap tr {
        display: grid;
        gap: 8px;
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 17px;
        padding: 12px;
        background: rgba(255, 255, 255, 0.03);
    }

    .table-wrap tr.history-ticket-row.won,
    .table-wrap tr.ticket-row.won {
        border-color: rgba(143, 255, 69, 0.42);
        background: linear-gradient(180deg, rgba(47, 168, 79, 0.18), rgba(16, 57, 42, 0.13));
        box-shadow: inset 4px 0 0 rgba(143, 255, 69, 0.78);
    }

    .table-wrap tr.history-ticket-row.paid,
    .table-wrap tr.ticket-row.paid {
        border-color: rgba(99, 243, 164, 0.36);
        background: rgba(99, 243, 164, 0.10);
        box-shadow: inset 4px 0 0 rgba(99, 243, 164, 0.70);
    }

    .table-wrap td {
        display: grid;
        grid-template-columns: minmax(82px, 0.35fr) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
        border: 0;
        padding: 3px 0;
        color: var(--ink);
    }

    .table-wrap td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 950;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .table-wrap td.mobile-action-cell,
    .table-wrap td.actions {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 7px;
        padding-top: 7px;
    }

    .table-wrap td.mobile-action-cell::before,
    .table-wrap td.actions::before {
        display: none;
    }

    .table-wrap td.actions form,
    .table-wrap td.actions select {
        width: 100%;
    }

    .table-wrap td.actions form.actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .table-wrap td.actions .button,
    .table-wrap td.actions button.button,
    .table-wrap td.actions a.button {
        width: auto;
    }

    .table-wrap td.actions form.actions .button {
        width: 100%;
    }

    .table-wrap td[colspan] {
        display: block;
    }

    .table-wrap td[colspan]::before {
        display: none;
    }

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

    .stats-grid,
    .ticket-status-summary,
    .results-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .royal-parley-ticketbar {
        border-radius: 18px;
        padding: 10px;
    }

    .royal-ticketbar-grid {
        gap: 10px;
    }

    .royal-input-grid {
        min-height: 48px;
    }

    .royal-stake-grid {
        grid-template-columns: 5.7rem minmax(0, 1fr) 3rem;
    }

    .royal-payout-grid {
        grid-template-columns: 8.5rem minmax(0, 1fr);
    }

    .royal-input-grid span,
    .royal-input-grid em,
    .royal-input-grid strong,
    .royal-input-grid input {
        min-height: 48px;
        padding-inline: 10px;
        font-size: 12px;
    }

    .royal-parley-action {
        min-height: 48px;
        border-radius: 14px;
        padding-inline: 12px;
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    .royal-selection-row {
        gap: 8px;
        margin-top: 10px;
    }

    .royal-selection-count,
    .royal-selection-empty,
    .royal-selection-pill {
        min-height: 36px;
        padding-inline: 12px;
        font-size: 12px;
    }

    .royal-league-list {
        gap: 10px;
    }

    .royal-league-card {
        border-radius: 14px;
    }

    .royal-league-head {
        min-height: 62px;
        gap: 10px;
        padding: 9px 10px;
    }

    .royal-league-label {
        gap: 10px;
    }

    .royal-league-icon,
    .results-league-card .royal-league-icon {
        width: 38px;
        height: 38px;
        font-size: 10px;
    }

    .royal-league-icon.has-image,
    .results-league-card .royal-league-icon.has-image {
        padding: 4px;
    }

    .royal-league-copy strong {
        font-size: 16px;
    }

    .royal-league-copy small {
        font-size: 10px;
    }

    .royal-league-toggle {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 24px;
    }

    .royal-board-scroll {
        overflow-x: visible;
    }

    .royal-board-body {
        gap: 6px;
        padding: 6px;
    }

    .royal-board-row {
        min-width: 0;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .royal-matchup-card,
    .royal-market-board {
        min-height: auto;
        border-radius: 12px;
    }

    .royal-matchup-card {
        padding: 10px;
    }

    .royal-team-logo {
        width: 40px;
        height: 40px;
        font-size: 10px;
    }

    .royal-team-logo.has-image {
        padding: 4px;
    }

    .royal-team-name {
        font-size: 12px;
    }

    .royal-game-center {
        min-width: 56px;
    }

    .royal-vs {
        font-size: 18px;
    }

    .royal-game-time,
    .royal-game-date,
    .royal-rotation {
        font-size: 11px;
    }

    .royal-market-board {
        padding: 6px;
    }

    .royal-market-title {
        font-size: 12px;
    }

    .royal-market-head {
        min-height: 22px;
        font-size: 11px;
    }

    .royal-board-odd,
    .royal-board-empty {
        min-height: 34px;
        border-radius: 9px;
        font-size: 13px;
        padding: 5px;
    }

    .result-board-head {
        gap: 8px;
    }

    .result-score-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .result-score-mini {
        align-self: flex-end;
    }
}

@media (max-width: 420px) {
    .main {
        width: min(100%, calc(100vw - 14px));
    }

    .mobile-header {
        min-height: 62px;
    }

    .mobile-header .mobile-menu-btn,
    .mobile-close-btn {
        width: 50px;
        min-width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .mobile-logo {
        width: min(142px, 44vw);
    }

    .mobile-drawer-link {
        min-height: 52px;
        font-size: 16px;
    }

    .mobile-home-card {
        width: min(100%, 340px);
        border-radius: 24px;
        padding: 16px 14px;
    }

    .mobile-info-tile {
        min-height: 76px;
        border-radius: 16px;
        padding: 13px 14px;
    }

    .mobile-time-tile strong {
        font-size: clamp(26px, 7vw, 34px);
    }

    .stats-grid,
    .ticket-status-summary,
    .results-stats {
        gap: 8px;
    }

    .stat-card,
    .ticket-status-card,
    .results-stats .stat-card {
        min-height: 84px;
        padding: 11px;
    }

    .stat-card strong,
    .ticket-status-card strong,
    .results-stats .stat-card strong {
        font-size: 22px;
    }

    .history-entry-btn {
        min-height: 78px;
        font-size: 20px;
    }

    .history-general-row span {
        font-size: 15px;
    }

    .history-general-row strong {
        font-size: 13px;
    }

    .royal-ticketbar-grid {
        gap: 8px;
    }

    .royal-stake-grid {
        grid-template-columns: 4.7rem minmax(0, 1fr) 2.35rem;
    }

    .royal-payout-grid {
        grid-template-columns: 7.6rem minmax(0, 1fr);
    }

    .royal-input-grid {
        min-height: 42px;
    }

    .royal-input-grid span,
    .royal-input-grid em,
    .royal-input-grid strong,
    .royal-input-grid input {
        min-height: 42px;
        padding-inline: 8px;
        font-size: 12px;
        border-bottom: 0;
    }

    .royal-input-grid span {
        justify-content: center;
    }

    .royal-input-grid em {
        justify-content: center;
        border-left: 1px solid #e2e8f0;
    }

    .royal-payout-grid strong {
        justify-content: flex-start;
    }
}

/* Final mobile polish: compact controls and prevent hidden panels from widening the page */
@media (max-width: 980px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .mobile-drawer-backdrop {
        right: auto;
        width: 100vw;
        max-width: 100vw;
    }

    .mobile-drawer {
        max-width: calc(100vw - 28px);
    }

    .mobile-header .mobile-menu-btn,
    .mobile-close-btn {
        width: 48px;
        min-width: 48px;
        height: 48px;
        border-radius: 15px;
    }

    .mobile-header .mobile-menu-btn svg,
    .mobile-close-btn svg {
        width: 21px;
        height: 21px;
    }

    .mobile-logo,
    .mobile-drawer-logo {
        width: min(138px, 42vw);
    }

    .mobile-drawer-link {
        min-height: 50px;
        border-radius: 15px;
        font-size: 16px;
        padding-inline: 13px;
    }

    .mobile-drawer-link i {
        width: 8px;
        height: 8px;
    }

    .mobile-drawer-link svg {
        width: 19px;
        height: 19px;
    }

    .mobile-logout {
        min-height: 50px;
        border-radius: 15px;
        font-size: 16px;
    }

    .grid > *,
    .stats-grid > *,
    .split > *,
    .card,
    .form-card,
    .table-wrap,
    .result-board-card,
    .royal-league-card {
        min-width: 0;
    }

    .form-card input,
    .form-card select,
    .form-card textarea {
        min-width: 0;
        text-overflow: ellipsis;
    }

    .form-card .split {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        align-items: stretch;
    }

    .stat-card {
        min-height: 82px;
    }

    .stat-card strong {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .section-title {
        margin-bottom: 10px;
    }
}

@media (max-width: 640px) {
    .main {
        width: min(100%, calc(100vw - 14px));
    }

    .mobile-header {
        min-height: 58px;
        margin-bottom: 10px;
    }

    .card {
        padding: 12px;
    }

    input,
    select,
    textarea {
        min-height: 44px;
        border-radius: 13px;
        font-size: 15px;
    }

    .button,
    button.button,
    a.button {
        min-height: 42px;
        border-radius: 13px;
        font-size: 14px;
        padding: 8px 11px;
    }

    .stats-grid,
    .ticket-status-summary,
    .results-stats {
        gap: 8px;
    }

    .stat-card,
    .ticket-status-card,
    .results-stats .stat-card {
        min-height: 76px;
        padding: 10px;
    }

    .stat-card strong,
    .ticket-status-card strong,
    .results-stats .stat-card strong {
        font-size: 21px;
        line-height: 1.05;
    }

    .table-wrap tr {
        padding: 11px;
    }

    .table-wrap td {
        grid-template-columns: minmax(84px, 0.38fr) minmax(0, 1fr);
        gap: 10px;
        padding: 7px 0;
    }

    .history-entry-btn {
        min-height: 72px;
        font-size: 19px;
    }

    .results-filter-panel,
    .history-general-filter {
        gap: 10px;
    }
}

@media (max-width: 420px) {
    .mobile-header .mobile-menu-btn,
    .mobile-close-btn {
        width: 46px;
        min-width: 46px;
        height: 46px;
    }

    .mobile-logo {
        width: min(132px, 41vw);
    }

    .mobile-home-card {
        width: min(100%, 332px);
        padding: 14px;
    }

    .mobile-info-tile {
        min-height: 72px;
        padding: 12px 13px;
    }

    .mobile-time-tile strong {
        font-size: clamp(24px, 6.5vw, 31px);
    }

    .stat-card strong,
    .ticket-status-card strong,
    .results-stats .stat-card strong {
        font-size: 20px;
    }

    .royal-league-head {
        min-height: 56px;
    }

    .royal-league-icon,
    .results-league-card .royal-league-icon {
        width: 34px;
        height: 34px;
    }

    .royal-league-toggle {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
}

@media print {
    body {
        background: #ffffff;
        color: #000000;
    }

    .sidebar,
    .topbar,
    .alert,
    .receipt-lines form,
    .ticket-page aside {
        display: none !important;
    }

    .app-shell,
    .main,
    .ticket-page {
        display: block;
        padding: 0;
        background: #ffffff;
    }

    .ticket-receipt {
        width: 80mm;
        border: none;
        box-shadow: none;
        background: #ffffff;
        color: #000000;
    }

    .receipt-head strong,
    .receipt-code strong,
    .receipt-code span,
    .receipt-meta,
    .receipt-lines span,
    .receipt-lines div > strong,
    .receipt-footer {
        color: #000000;
    }
}
