:root {
    --gold: #F4B400;
    --gold-light: #FFD54F;
    --gold-dark: #C49000;
    --green: #00C853;
    --green-dark: #009624;
    --blue: #0A3D91;
    --dark: #0a1628;
    --dark-card: #141f33;
    --dark-card-hover: #1a2840;
    --dark-elevated: #1e2d47;
    --text-muted: #8b9cb8;
    --border-subtle: rgba(244, 180, 0, 0.14);
    --border-gold: rgba(244, 180, 0, 0.28);
    --app-nav-height: 4.25rem;
    --tg-theme-bg: var(--dark);
    --tg-theme-text: #f0f4fc;
    --bs-body-bg: var(--dark);
    --bs-body-color: #f0f4fc;
    --bs-primary: var(--gold);
    --bs-primary-rgb: 244, 180, 0;
    --bs-secondary: #3d4f6f;
    --bs-border-color: var(--border-subtle);
    --bs-card-bg: var(--dark-card);
    --radius: 14px;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

html, body {
    height: 100%;
}

.mini-app-body {
    background:
        radial-gradient(ellipse 100% 60% at 50% -5%, rgba(10, 61, 145, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 50% 35% at 100% 90%, rgba(244, 180, 0, 0.06) 0%, transparent 50%),
        linear-gradient(165deg, #0a1628 0%, #0e1f38 40%, #111827 100%);
    background-attachment: fixed;
    color: var(--tg-theme-text);
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
}

.app-root {
    min-height: 100vh;
}

.app-content {
    max-width: 480px;
    margin: 0 auto;
}

.pb-nav {
    padding-bottom: calc(var(--app-nav-height) + 1rem);
}

.pb-nav-extra {
    padding-bottom: calc(var(--app-nav-height) + 0.5rem) !important;
}

/* Bottom navigation */
.bottom-nav {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 100%;
    min-height: var(--app-nav-height);
    background: rgba(10, 22, 40, 0.94) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-gold) !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35) !important;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    padding: 0.45rem 0.25rem;
    transition: color 0.15s ease;
}

.bottom-nav-link i {
    font-size: 1.15rem;
}

.bottom-nav-link.active {
    color: var(--gold);
    font-weight: 600;
}

/* Cards */
.app-card {
    background: var(--dark-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.app-card:hover {
    border-color: var(--border-gold);
}

.app-card .card-body {
    color: var(--tg-theme-text);
}

.app-card-icon {
    color: var(--gold) !important;
}

.app-card-label {
    color: var(--text-muted) !important;
}

.app-card-value {
    font-size: 1.05rem;
    color: #fff;
}

.app-quick-action {
    color: var(--tg-theme-text);
}

.app-quick-action .card-body {
    min-height: 100%;
}

.app-tabs .nav-link {
    color: var(--text-muted);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

.app-tabs .nav-link.active {
    background: rgba(244, 180, 0, 0.15);
    color: var(--gold);
}

.test-phase-banner {
    position: sticky;
    top: 0;
    z-index: 20;
}

.test-phase-banner-inner {
    border: 1px dashed #e55353;
    border-radius: 0.55rem;
    background: rgba(18, 24, 36, 0.96);
    padding: 0.55rem 0.7rem;
    color: #f3b4b4;
    font-size: 0.72rem;
    line-height: 1.45;
}

.test-phase-banner-line + .test-phase-banner-line {
    margin-top: 0.2rem;
}

.test-phase-banner-line strong {
    color: #ff8f8f;
}

.test-phase-icon {
    display: inline-block;
    width: 1.1rem;
}

.match-card .card-body {
    padding: 0.65rem 0.6rem;
}

.match-meta {
    line-height: 1.4;
}

.match-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.match-card-title {
    flex: 1;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    color: #f0f4fc;
}

.match-card-head .match-status {
    flex-shrink: 0;
    margin-top: 0.05rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.match-card-head .match-status-upcoming::before {
    content: '';
    display: inline-block;
    width: 0.42rem;
    height: 0.42rem;
    margin-right: 0.35rem;
    border-radius: 50%;
    background: var(--gold);
    vertical-align: middle;
}

.match-card-divider {
    border: 0;
    border-top: 1px solid #2b3139;
    opacity: 1;
    margin: 0 0 0.7rem;
}

.match-list-divider {
    height: 1px;
    margin: 0.35rem 0 0.65rem;
    background: linear-gradient(90deg, transparent, var(--green) 12%, var(--green) 88%, transparent);
    opacity: 0.9;
}

.match-face {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto minmax(0, 1fr) 34px;
    align-items: center;
    gap: 0.35rem;
}

.match-score-box {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--gold);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.match-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    min-width: 0;
    text-align: center;
}

.match-team-flag {
    width: 40px;
    height: 28px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.match-team-name {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.match-vs {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.05em;
    padding: 0 0.15rem;
    flex-shrink: 0;
}

.match-schedule {
    margin-top: 0.5rem;
}

.match-venue,
.match-kickoff {
    color: var(--text-muted) !important;
    font-size: 0.68rem;
    line-height: 1.3;
}

.match-venue {
    font-weight: 500;
}

.match-kickoff {
    font-size: 0.64rem;
}

.match-live-link {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    line-height: 1.25;
    border-color: var(--green) !important;
    color: var(--green) !important;
    background: rgba(0, 200, 83, 0.08);
}

.match-live-link:hover,
.match-live-link:focus {
    border-color: var(--green) !important;
    color: var(--green) !important;
    background: rgba(0, 200, 83, 0.16);
}

.match-venue .bi,
.match-kickoff .bi {
    color: var(--gold);
    margin-right: 0.12rem;
    font-size: 0.85em;
}

.match-status-live {
    background: rgba(0, 200, 83, 0.18);
    color: var(--green);
}

.match-status-finished {
    background: rgba(108, 117, 125, 0.25);
    color: #adb5bd;
}

.match-status-upcoming {
    background: rgba(244, 180, 0, 0.15);
    color: var(--gold);
}

.standing-group-block {
    margin-bottom: 0.75rem;
}

.standing-group-title {
    background: #2b3139;
    border-left: 4px solid var(--gold);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--gold);
}

.standing-card {
    padding: 10px 8px 8px;
    overflow: hidden;
}

.standing-card .standing-table {
    margin-bottom: 0;
}

.standing-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 11px;
    text-align: center;
    --bs-table-color: #c5cdd8;
    --bs-table-bg: transparent;
    --bs-table-border-color: #2b3139;
    color: #c5cdd8;
}

.standing-table th {
    color: #848e9c !important;
    font-weight: 400;
    border-bottom: 1px solid #2b3139;
    padding: 0 2px 6px;
    white-space: nowrap;
    vertical-align: bottom;
}

.standing-table td {
    vertical-align: middle;
    padding: 10px 2px;
    border-bottom: 1px solid #2b3139;
    color: #c5cdd8;
    height: 36px;
    line-height: 1;
}

.standing-table tbody tr:last-child td {
    border-bottom: none;
}

.standing-rank-head,
.standing-rank {
    width: 5%;
    color: #848e9c !important;
    padding-left: 4px !important;
    padding-right: 0 !important;
    vertical-align: middle !important;
}

.standing-team-head,
.standing-team-col {
    width: 47%;
    text-align: left !important;
    padding-left: 4px !important;
    padding-right: 2px !important;
    vertical-align: middle !important;
}

.standing-team {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
}

.standing-team-flag {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.standing-team-name {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.1;
    color: #f0f4fc !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.standing-stat-head,
.standing-stat {
    width: 6%;
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 10px;
    color: #c5cdd8 !important;
    letter-spacing: -0.02em;
}

.standing-gd-head,
.standing-stat.standing-gd {
    width: 7%;
}

.standing-pts,
.standing-pts-head {
    width: 6%;
    color: var(--gold) !important;
    font-weight: 700;
    font-size: 10px;
    padding-left: 0 !important;
    padding-right: 4px !important;
    letter-spacing: -0.02em;
}

/* Standing overlay — app colors, transparent page, responsive grid */
html.standing-overlay-html,
.standing-overlay-body {
    background: transparent !important;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

.standing-overlay-page {
    container-type: inline-size;
    container-name: standing-board;
    width: 100%;
    min-height: 100%;
    background: transparent;
    padding: clamp(6px, 1.2cqi, 14px);
    box-sizing: border-box;
    --overlay-gap: clamp(6px, 0.85cqi, 12px);
    font-size: clamp(8px, 1.05cqi, 12px);
    color: var(--tg-theme-text);
    font-family: var(--font);
}

.standing-embed-toolbar h1 {
    color: var(--tg-theme-text);
}

.standing-lang-switch .standing-lang-btn {
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    background: rgba(20, 31, 51, 0.82);
    min-width: 2.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.55rem;
}

.standing-lang-switch .standing-lang-btn:hover {
    color: var(--gold);
    border-color: var(--border-gold);
}

.standing-lang-switch .standing-lang-btn.active {
    background: rgba(244, 180, 0, 0.15);
    color: var(--gold);
    border-color: var(--border-gold);
}

.standing-overlay-page .match-card.app-card {
    background: rgba(20, 31, 51, 0.82);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.standing-overlay-page .match-card.app-card:hover {
    border-color: var(--border-gold);
}

.standing-overlay-page .match-venue,
.standing-overlay-page .match-kickoff {
    color: #c5cdd8 !important;
    line-height: 1.3;
    padding: 0 0.25rem;
}

.standing-overlay-page .match-venue {
    font-size: clamp(0.6rem, 0.85cqi, 0.68rem);
    font-weight: 500;
}

.standing-overlay-page .match-kickoff {
    font-size: clamp(0.56rem, 0.8cqi, 0.64rem);
}

.standing-overlay-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--overlay-gap);
    width: 100%;
    align-content: start;
}

@container standing-board (max-width: 899px) {
    .standing-overlay-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@container standing-board (max-width: 499px) {
    .standing-overlay-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@supports not (container-type: inline-size) {
    @media (max-width: 899px) {
        .standing-overlay-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
    }

    @media (max-width: 499px) {
        .standing-overlay-grid {
            grid-template-columns: minmax(0, 1fr);
        }
    }
}

.standing-overlay-empty {
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.standing-overlay-page .standing-group-block {
    background: rgba(20, 31, 51, 0.82);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.standing-overlay-page .standing-group-title {
    background: rgba(43, 49, 57, 0.92);
    border-left: 4px solid var(--gold);
    border-radius: 0;
    margin: 0;
    padding: clamp(5px, 0.75cqi, 8px) clamp(8px, 1.1cqi, 12px);
    font-weight: 700;
    font-size: clamp(10px, 1.15cqi, 13px);
    color: var(--gold);
}

.standing-overlay-page .standing-card.app-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: clamp(6px, 0.85cqi, 10px) clamp(4px, 0.65cqi, 8px);
}

.standing-overlay-page .standing-card.app-card:hover {
    border-color: transparent;
    background: transparent;
}

.standing-overlay-page .standing-table {
    font-size: 1em;
}

.standing-overlay-page .standing-table th {
    padding: 0 clamp(1px, 0.2cqi, 2px) clamp(4px, 0.55cqi, 6px);
    font-size: 0.92em;
}

.standing-overlay-page .standing-table td {
    padding: clamp(6px, 0.85cqi, 10px) clamp(1px, 0.2cqi, 2px);
    height: auto;
    min-height: clamp(26px, 3.2cqi, 36px);
}

.standing-overlay-page .standing-team-flag {
    width: clamp(16px, 2.2cqi, 22px);
    height: clamp(11px, 1.5cqi, 15px);
}

.standing-overlay-page .standing-team-name {
    font-size: 1.05em;
}

.standing-overlay-page .standing-stat-head,
.standing-overlay-page .standing-stat,
.standing-overlay-page .standing-pts,
.standing-overlay-page .standing-pts-head {
    font-size: 0.95em;
}

/* Hero jackpot */
.app-hero {
    background: linear-gradient(135deg, rgba(10, 61, 145, 0.45) 0%, rgba(20, 31, 51, 0.9) 60%, rgba(244, 180, 0, 0.08) 100%);
    border: 1px solid var(--border-gold);
    position: relative;
    overflow: hidden;
}

.app-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(244, 180, 0, 0.12) 0%, transparent 50%);
    pointer-events: none;
}

.app-hero .display-6 {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    font-family: var(--font-display);
    color: var(--gold) !important;
    text-shadow: 0 0 30px rgba(244, 180, 0, 0.25);
}

.app-hero .text-muted {
    color: var(--text-muted) !important;
}

/* Team flags */
.team-flag {
    width: 40px;
    height: 28px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    background: var(--dark-elevated);
}

.team-flag-lg {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: var(--dark-elevated);
}

.team-card {
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.team-card:active {
    transform: scale(0.98);
}

.team-card .badge-owned {
    font-size: 0.65rem;
}

.team-list-row .min-width-0 {
    min-width: 0;
}

.team-list-meta {
    line-height: 1.35;
}

.team-list-meta .small + .small {
    margin-top: 0.1rem;
}

.prediction-search-wrap {
    position: relative;
}

.prediction-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
    z-index: 2;
}

.prediction-search-input {
    padding: 0.65rem 0.85rem 0.65rem 2.35rem;
    border-radius: var(--radius);
    background: var(--dark-card) !important;
    border: 1px solid var(--border-gold) !important;
    color: #f0f4fc !important;
}

.prediction-search-input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.prediction-search-input:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 0.15rem rgba(244, 180, 0, 0.12);
}

.team-flag-md {
    width: 56px;
    height: 38px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid var(--border-subtle);
    background: var(--dark-elevated);
}

.prediction-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-topbar {
    display: flex;
    align-items: center;
    min-height: 1.75rem;
}

.detail-availability-row .card-body {
    line-height: 1.2;
}

.detail-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.125rem 0;
}

.detail-back-link:active {
    color: var(--gold);
}

.detail-hero {
    padding: 0.125rem 0;
}

.detail-status-badge {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.detail-status-badge.is-available {
    color: var(--green);
}

.detail-status-badge.is-purchased {
    color: var(--gold);
}

.detail-stats-row .detail-stat-value {
    font-size: 0.95rem;
}

.detail-rules-section {
    display: flex;
    flex-direction: column;
}

.detail-rules-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #e8edf5;
}

.detail-rules-body {
    font-size: 0.75rem;
    line-height: 1.45;
    padding: 0.65rem 0.85rem !important;
    color: var(--text-muted) !important;
    overflow-y: auto;
}

.detail-rules-body,
.detail-rules-body p {
    color: var(--text-muted) !important;
}

.detail-rules-body p {
    margin-bottom: 0.45rem;
}

.detail-action-bar {
    flex-shrink: 0;
    margin-top: 0.5rem;
    padding-bottom: 0.125rem;
}

.detail-action-bar .btn {
    font-weight: 600;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 22, 40, 0.82);
    backdrop-filter: blur(4px);
}

.skeleton-block {
    padding: 0.75rem 0;
}

/* Profile */
.profile-avatar {
    object-fit: cover;
    background: var(--dark-elevated);
    border: 2px solid var(--gold);
    box-shadow: 0 0 20px rgba(244, 180, 0, 0.2);
}

.maintenance-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.history-event-title {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--gold) !important;
}

.list-row-compact {
    font-size: 0.875rem;
}

/* User center menu */
.uc-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: var(--tg-theme-text);
    text-decoration: none;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s ease;
}

.uc-menu-link:last-child {
    border-bottom: none;
}

.uc-menu-link:active,
.uc-menu-link:hover {
    background: var(--dark-card-hover);
    color: var(--tg-theme-text);
}

.uc-menu-link i {
    font-size: 1.1rem;
    color: var(--gold);
    width: 1.5rem;
    text-align: center;
}

.uc-menu-link .uc-chevron {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Wallet bind */
.wallet-bind-form .form-control {
    background: var(--dark-elevated);
    border: 1px solid var(--border-subtle);
    color: #fff;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
}

.wallet-bind-form .form-control:focus {
    background: var(--dark-elevated);
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(244, 180, 0, 0.15);
}

.wallet-bind-notice {
    background: rgba(0, 200, 83, 0.08);
    border: 1px solid rgba(0, 200, 83, 0.25);
    border-radius: var(--radius);
    color: #a8f0c8;
    font-size: 0.8rem;
}

/* Reserved sections */
.reserved-section {
    border: 1px dashed var(--border-gold);
    opacity: 0.75;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border: none;
    color: #0a1628;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
    color: #0a1628;
}

.btn-outline-primary {
    border-color: var(--gold);
    color: var(--gold);
}

.btn-outline-primary:hover {
    background: rgba(244, 180, 0, 0.12);
    border-color: var(--gold-light);
    color: var(--gold-light);
}

.btn-outline-secondary {
    border-color: var(--border-subtle);
    color: var(--text-muted);
}

/* Badges */
.badge.bg-success {
    background: var(--green) !important;
    color: #0a1628 !important;
}

.badge.bg-secondary {
    background: var(--dark-elevated) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-subtle);
}

/* Alerts */
.alert-success {
    background: rgba(0, 200, 83, 0.1);
    border-color: rgba(0, 200, 83, 0.3);
    color: #a8f0c8;
}

.alert-secondary {
    background: var(--dark-elevated);
    border-color: var(--border-subtle);
    color: var(--text-muted);
}

/* Modal */
.modal-content {
    background: var(--dark-card);
    border: 1px solid var(--border-gold);
    color: var(--tg-theme-text);
}

.modal-header {
    border-bottom-color: var(--border-subtle);
}

.modal-footer {
    border-top-color: var(--border-subtle);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* List group */
.list-group-item {
    background: transparent;
    border-color: var(--border-subtle);
    color: var(--tg-theme-text);
}

.profile-invite-link {
    color: #fff;
}

/* Toast */
.toast {
    border-radius: var(--radius);
}

/* Form controls in modals */
.form-control,
.form-select {
    background: var(--dark-elevated);
    border-color: var(--border-subtle);
    color: #fff;
}

.form-control:focus,
.form-select:focus {
    background: var(--dark-elevated);
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(244, 180, 0, 0.15);
}

.form-label {
    color: var(--text-muted);
}

.bg-light {
    background: var(--dark-elevated) !important;
    color: var(--tg-theme-text) !important;
}

.text-primary {
    color: var(--gold) !important;
}

.text-warning {
    color: var(--gold-light) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-body {
    color: var(--tg-theme-text) !important;
}

a.text-body:hover {
    color: var(--gold) !important;
}

/* Page headers */
.page-title {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Rollover badge */
.rollover-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(244, 180, 0, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    color: var(--gold-light);
}

/* Status pills */
.status-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-pill.confirmed,
.status-pill.purchased,
.status-pill.completed {
    background: rgba(0, 200, 83, 0.15);
    color: var(--green);
}

.status-pill.pending,
.status-pill.waiting_payment {
    background: rgba(244, 180, 0, 0.12);
    color: var(--gold-light);
}

.status-pill.settled {
    background: rgba(10, 61, 145, 0.3);
    color: #7eb8ff;
}

/* Safe area for Telegram */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
    .pb-nav {
        padding-bottom: calc(var(--app-nav-height) + env(safe-area-inset-bottom) + 1rem);
    }
}

@media (min-width: 576px) {
    .app-content {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

@media (min-width: 768px) {
    .app-content {
        max-width: 420px;
    }
    .bottom-nav {
        max-width: 420px;
    }
}
