:root {
    /* Colors */
    --bg-dark: #0a0a12;
    --bg-dark-elevated: #10131d;
    --bg-panel: #151520;
    --bg-input: #1e1e2a;

    --primary: #c8aa6e;
    --primary-hover: #f0e6d2;

    --accent-blue: #00b4d8;
    --accent-red: #ff4d4d;
    --accent-green: #00e676;

    --text-main: #ffffff;
    --text-muted: #a0a0b0;

    /* Typography - Scaled for readability */
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --border-color: #2a2a35;
    --border-soft: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.28);
    --shadow-gold: 0 18px 36px rgba(200, 170, 110, 0.18);

    /* --- Paleta semantica unificada ---
       Fuente unica de los colores que antes se repetian como hex
       sueltos dentro de las vistas. NO usar hex nuevos en JS/CSS:
       usar siempre estas variables. */
    --success-green: #00b894;
    --teal: #00cec9;
    --danger: #ff4757;
    --delete: #ef4444;
    --gold-vivid: #ffd700;
    --gold-deep: #ffaa00;
    --gold-warm: #fdcb6e;
    --gold-pale: #ffda79;
    --orange: #ff6b35;
    --orange-soft: #ff9f43;
    --coral: #e17055;
    --purple: #6c5ce7;
    --purple-soft: #a29bfe;
    --primary-dark: #a08040;
    --blue: #0984e3;
    --info-blue: #74b9ff;
    --twitch: #9146ff;
    --twitch-dark: #6441a5;
    --team-red: #d13639;
    --team-red-dark: #a02020;
    --gray-mid: #636e72;
    --gray-deep: #2d3436;
    --surface-mid: #1f2937;
    --surface-deep: #0d0d14;
    --panel-deep: #1a1a25;
    --cyan-label: #8adfff;

    color-scheme: dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlight on mobile */
}

body {
    background-color: var(--bg-dark);
    background-image:
        radial-gradient(circle at top left, rgba(0, 180, 216, 0.12), transparent 32%),
        radial-gradient(circle at top right, rgba(200, 170, 110, 0.16), transparent 28%),
        linear-gradient(180deg, #0c1017 0%, #090b11 55%, #07080d 100%);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-attachment: fixed;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    background: transparent;
    min-height: 100vh;
}

/* --- Mobile First Layout (Default) --- */

/* Sidebar is hidden by default (slide-in menu) */
.desktop-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(180deg, rgba(17, 20, 30, 0.98) 0%, rgba(10, 12, 19, 0.96) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    transform: translateX(-100%);
    /* Hidden off-screen */
    transition: transform 0.3s ease-in-out;
    display: flex;
    /* Always display flex inside to layout content */
    flex-direction: column;
    padding: var(--spacing-md);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 24px 0 60px rgba(0, 0, 0, 0.35);
}

.desktop-sidebar.active {
    transform: translateX(0);
    /* Slide in */
    box-shadow: 20px 0 48px rgba(0, 0, 0, 0.45);
}

/* Overlay for mobile sidebar */
#mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mobile-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.main-content {
    flex: 1;
    width: 100%;
    padding: var(--spacing-sm);
    /* Smaller padding on mobile */
    overflow-x: hidden;
}

.desktop-main-content {
    width: 100%;
    min-height: 100vh;
}

/* Utility to hide elements on mobile if needed */
.desktop-only {
    display: none !important;
}

.mobile-only {
    display: block !important;
}

/* Mobile Header Bar */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(18, 21, 31, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    position: sticky;
    top: 0;
    z-index: 800;
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    margin-bottom: 1rem;
}

/* --- Tablet / Desktop Breakpoint --- */
@media (min-width: 768px) {
    #app {
        flex-direction: row;
        /* Sidebar | Content */
    }

    .desktop-sidebar {
        position: sticky;
        /* Sticky sidebar */
        transform: none;
        /* Always visible */
        z-index: 1;
        /* Lower z-index than modals */
        box-shadow: none;
    }

    .main-content {
        padding: var(--spacing-lg);
        /* Larger padding */
    }

    .mobile-header {
        display: none;
        /* Hide top bar on desktop */
    }

    .desktop-only {
        display: block !important;
    }

    .mobile-only {
        display: none !important;
    }

    #mobile-sidebar-overlay {
        display: none !important;
        /* Never show overlay on desktop */
    }
}

/* Typography Scale */
h1 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

h4 {
    font-size: 1.1rem;
    font-weight: 600;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 0.95rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 14px;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #a08040 100%);
    color: #000;
    box-shadow: 0 12px 28px rgba(200, 170, 110, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(200, 170, 110, 0.34);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(200, 170, 110, 0.35);
    color: var(--primary-hover);
}

.btn-secondary:hover {
    background: rgba(200, 170, 110, 0.1);
    border-color: rgba(200, 170, 110, 0.55);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}

.btn-success {
    background: var(--accent-green);
    color: #000;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-muted);
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.96) 0%, rgba(14, 17, 25, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(200, 170, 110, 0.12);
}

select,
select.form-control,
.auth-field select,
.p2p-input,
.p2p-type-selector {
    color-scheme: dark;
}

select option,
select optgroup {
    background: var(--bg-panel) !important;
    background-color: var(--bg-panel) !important;
    color: var(--text-main) !important;
}

select option[value=""],
select option:disabled,
select:disabled {
    color: var(--text-muted) !important;
}

select option:checked,
select option:hover,
select option:focus {
    background: var(--primary) !important;
    background-color: var(--primary) !important;
    color: #000 !important;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.view-container {
    animation: fadeIn 0.3s ease-out;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.auth-view {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(200, 170, 110, 0.08), transparent 22%),
        radial-gradient(circle at bottom right, rgba(0, 180, 216, 0.08), transparent 24%),
        linear-gradient(180deg, #07080d 0%, #090b12 100%);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    width: 100%;
}

.auth-hero-panel {
    display: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(7, 9, 13, 0.15), rgba(7, 9, 13, 0.9)),
        url('./assets/login_bg.png') center center / cover no-repeat;
}

.auth-hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.05), transparent 40%),
        repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 78px);
    opacity: 0.55;
    pointer-events: none;
}

.auth-hero-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(200, 170, 110, 0.32), transparent 24%),
        radial-gradient(circle at bottom left, rgba(0, 180, 216, 0.2), transparent 26%),
        radial-gradient(circle at center, rgba(255, 214, 140, 0.08), transparent 32%);
    pointer-events: none;
}

.auth-ray-strip {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-ray-strip span {
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.2;
}

.auth-ray-strip span:first-child {
    right: -40px;
    top: -40px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.9), rgba(255, 107, 53, 0));
}

.auth-ray-strip span:last-child {
    left: -60px;
    bottom: -80px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.75), rgba(0, 210, 255, 0));
}

.auth-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 8, 14, 0.92) 0%, rgba(7, 10, 18, 0.66) 44%, rgba(8, 10, 16, 0.82) 100%),
        linear-gradient(180deg, rgba(9, 11, 17, 0.08) 0%, rgba(9, 11, 17, 0.82) 72%, rgba(9, 11, 17, 0.96) 100%);
}

.auth-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    min-height: 100%;
    max-width: 760px;
    padding: clamp(2.5rem, 4.2vw, 4.5rem);
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    align-self: flex-start;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary-hover);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.auth-title {
    max-width: 700px;
    font-size: clamp(2.65rem, 4.2vw, 4.85rem);
    line-height: 0.94;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.auth-title span {
    color: var(--primary);
    text-shadow: 0 0 24px rgba(200, 170, 110, 0.22);
}

.auth-copy {
    max-width: 610px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.02rem;
    line-height: 1.68;
}

.auth-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    max-width: 650px;
}

.auth-hero-tag {
    --tone-bg: rgba(200, 170, 110, 0.14);
    --tone-border: rgba(200, 170, 110, 0.28);
    --tone-fg: var(--primary-hover);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: 14px;
    background: var(--tone-bg);
    border: 1px solid var(--tone-border);
    color: var(--tone-fg);
    font-size: 0.78rem;
    font-weight: 700;
    backdrop-filter: blur(12px);
}

.auth-hero-tag span:first-child {
    font-size: 0.95rem;
}

.auth-metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    max-width: 640px;
}

.auth-metric,
.auth-feature-item,
.auth-hero-tag {
    --tone-bg: rgba(200, 170, 110, 0.14);
    --tone-border: rgba(200, 170, 110, 0.26);
    --tone-fg: var(--primary-hover);
}

.auth-tone-blue {
    --tone-bg: rgba(0, 180, 216, 0.14);
    --tone-border: rgba(0, 180, 216, 0.26);
    --tone-fg: #9feaff;
}

.auth-tone-purple {
    --tone-bg: rgba(145, 70, 255, 0.14);
    --tone-border: rgba(145, 70, 255, 0.28);
    --tone-fg: #d8c0ff;
}

.auth-tone-orange {
    --tone-bg: rgba(255, 107, 53, 0.14);
    --tone-border: rgba(255, 107, 53, 0.28);
    --tone-fg: #ffd0c0;
}

.auth-tone-cyan {
    --tone-bg: rgba(0, 210, 255, 0.14);
    --tone-border: rgba(0, 210, 255, 0.26);
    --tone-fg: #c4f5ff;
}

.auth-metric {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 1rem 1.05rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(7, 10, 16, 0.72), rgba(10, 12, 20, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(12px);
}

.auth-metric::before {
    content: '';
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--tone-border), transparent);
}

.auth-metric-top {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.auth-metric-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--tone-bg);
    border: 1px solid var(--tone-border);
    color: var(--tone-fg);
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-metric-kicker {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.62);
    font-weight: 700;
}

.auth-metric-value {
    display: block;
    margin-top: 0.85rem;
    font-family: var(--font-heading);
    font-size: 1.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.auth-metric-label {
    display: block;
    margin-top: 0.28rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.84rem;
    line-height: 1.45;
}

.auth-feature-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    max-width: 640px;
}

.auth-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    min-height: 94px;
    padding: 1rem 1.05rem;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(11, 13, 20, 0.58), rgba(15, 18, 28, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.14);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-feature-item:hover {
    transform: translateY(-2px);
    border-color: var(--tone-border);
}

.auth-feature-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--tone-bg);
    border: 1px solid var(--tone-border);
    color: var(--tone-fg);
    flex-shrink: 0;
    font-size: 1.05rem;
}

.auth-feature-item strong {
    display: block;
    font-size: 1rem;
    color: var(--text-main);
}

.auth-feature-item span {
    display: block;
    margin-top: 0.24rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.82rem;
    line-height: 1.52;
}

.auth-form-panel {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 1.25rem;
    background: linear-gradient(180deg, rgba(8, 10, 18, 0.92) 0%, rgba(10, 12, 19, 0.98) 100%);
}

.auth-form-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top center, rgba(200, 170, 110, 0.14), transparent 24%),
        radial-gradient(circle at bottom left, rgba(0, 180, 216, 0.08), transparent 22%);
    pointer-events: none;
}

.auth-form-inner {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.auth-mobile-summary {
    padding: 1.1rem 1.15rem;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.12), rgba(0, 180, 216, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-soft);
}

.auth-mobile-summary strong {
    display: block;
    font-size: 1rem;
    color: var(--text-main);
}

.auth-mobile-summary span {
    display: block;
    margin-top: 0.2rem;
    color: var(--text-muted);
    font-size: 0.84rem;
}

.auth-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.95) 0%, rgba(12, 15, 23, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 30px;
    padding: 1.65rem;
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200, 170, 110, 0.7), transparent);
}

.auth-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(200, 170, 110, 0.08), transparent 28%),
        radial-gradient(circle at bottom left, rgba(0, 180, 216, 0.06), transparent 25%);
    pointer-events: none;
}

.auth-card-header {
    position: relative;
    z-index: 1;
    margin-bottom: 1.45rem;
}

.auth-logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.auth-logo {
    width: 78px;
    height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #f0d08f, #b38839);
    color: #000;
    font-size: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 34px rgba(200, 170, 110, 0.2);
}

.auth-logo-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    display: block;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    line-height: 1.15;
    margin-top: 0.2rem;
}

.auth-brand-name {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.auth-brand-game {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold-vivid);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.28);
}

.auth-card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    background: rgba(0, 180, 216, 0.1);
    border: 1px solid rgba(0, 180, 216, 0.24);
    color: #bdefff;
    font-size: 0.76rem;
    font-weight: 700;
}

.auth-eyebrow {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: var(--primary-hover);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-card-header h2 {
    margin-bottom: 0.45rem;
}

.auth-card-header p {
    color: var(--text-muted);
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

.auth-card-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 1rem;
}

.auth-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--primary-hover);
    font-size: 0.76rem;
    font-weight: 700;
}

.auth-field {
    position: relative;
}

.auth-field input,
.auth-field select {
    padding-left: 3rem;
    background: linear-gradient(180deg, rgba(12, 16, 26, 0.95), rgba(10, 12, 20, 0.98));
    border-color: rgba(255, 255, 255, 0.08);
}

.auth-field input:focus,
.auth-field select:focus {
    border-color: rgba(200, 170, 110, 0.8);
    box-shadow: 0 0 0 4px rgba(200, 170, 110, 0.14), 0 12px 30px rgba(0, 0, 0, 0.18);
}

.auth-field-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.82;
    pointer-events: none;
}

.auth-grid-two {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.auth-helper-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.auth-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    cursor: pointer;
}

.auth-inline-check input {
    width: 18px;
    height: 18px;
    padding: 0;
    accent-color: var(--primary);
    border-radius: 6px;
    box-shadow: none;
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
}

.auth-link:hover {
    color: var(--primary-hover);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.15rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-note-card {
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(145, 70, 255, 0.18), rgba(145, 70, 255, 0.04));
    border: 1px solid rgba(145, 70, 255, 0.34);
}

.auth-note-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #d6baff;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.auth-note-card small {
    display: block;
    margin-top: 0.55rem;
    color: rgba(255, 255, 255, 0.64);
}

.auth-back-row {
    margin-bottom: 1.1rem;
}

.auth-primary-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: 0 16px 32px rgba(200, 170, 110, 0.24);
}

.auth-primary-action::after {
    content: '↗';
    font-size: 1rem;
}

.auth-primary-action:disabled::after {
    display: none;
}

.auth-secondary-action {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

.auth-footnote {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

.auth-admin-link-wrap {
    display: none;
}

.auth-admin-link {
    display: none;
}

.auth-admin-link:hover {
    color: var(--text-muted);
}

@media (min-width: 700px) {
    .auth-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 980px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1.15fr) minmax(430px, 520px);
    }

    .auth-hero-panel {
        display: block;
    }

    .auth-mobile-summary {
        display: none;
    }

    .auth-form-panel {
        padding: 2rem;
    }

    .auth-card {
        padding: 2rem;
    }
}

@media (max-width: 979px) {
    .auth-feature-list,
    .auth-metric-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .view-container {
        flex-direction: row;
    }

    .view-container .desktop-main-content {
        flex: 1;
        width: 100%;
        max-width: none;
        min-width: 0;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--bg-panel);
    width: 90%;
    max-width: 400px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: scale(0.95);
    animation: scaleIn 0.2s ease-out forwards;
}

.modal-wide .modal-content {
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-wide .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: 60vh;
    padding: 0 !important;
}

.modal-wide .modal-body > div:last-child {
    max-height: 60vh;
    overflow-y: auto;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

.modal-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.modal-header.error h3 {
    color: var(--accent-red);
}

.modal-header.success h3 {
    color: var(--accent-green);
}

.modal-header.warning h3 {
    color: var(--primary);
}

.modal-body {
    padding: var(--spacing-md);
    color: var(--text-muted);
}

.modal-footer {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* Dashboard specific styles moved from dashboard.js */
.profile-section {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.avatar-circle {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.profile-info h3 {
    margin: 0;
    font-size: 1.2rem;
}

.region-badge {
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
}

.section-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.mode-cards {
    display: grid;
    gap: var(--spacing-md);
    /* Mobile: 1 column */
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .mode-cards {
        /* Desktop: 3 columns or auto-fit */
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .profile-section {
        /* Make profile section more prominent on desktop */
        padding: 1.5rem;
    }
}

.card {
    background: linear-gradient(180deg, rgba(22, 26, 36, 0.94) 0%, rgba(16, 19, 28, 0.94) 100%);
    padding: var(--spacing-md);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.24);
}

.active-challenge-card {
    border: 1px solid var(--accent-green);
    background: linear-gradient(to right, rgba(0, 230, 118, 0.05), var(--bg-input));
}

.card.highlight-border {
    border: 1px solid var(--primary);
}

.card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: var(--spacing-sm) 0;
}

.card ul {
    list-style: none;
    padding: 0;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
    /* Ensure buttons align at bottom */
}

.card ul li {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.card ul li::before {
    content: "•";
    color: var(--primary);
    margin-right: 0.5rem;
}



/* --- New Dashboard Design 2.0 --- */

.glass-panel {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.avatar-large {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), #8a7030);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 0 0 15px rgba(200, 170, 110, 0.3);
}

.welcome-text {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
}

.highlight-text {
    color: var(--primary);
}

.region-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-sm);
}

.stat-card {
    padding: var(--spacing-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.text-green {
    color: var(--accent-green);
}

.text-red {
    color: var(--accent-red);
}

.text-gold {
    color: var(--primary);
}

.active-challenge-section h3 {
    margin-bottom: var(--spacing-sm);
}

.challenge-card {
    padding: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.challenge-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-sm);
}

.challenge-progress-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-main);
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent-green));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.modes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .modes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.mode-card {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.mode-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.mode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.mode-header h4 {
    margin: 0;
}

.mode-features {
    list-style: none;
    padding: 0;
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}

.mode-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    padding-left: 1.2rem;
    position: relative;
}

.mode-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
}

.special-offer {
    border: 1px solid var(--primary);
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.1), transparent);
    position: relative;
}

.badge-offer {
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--primary);
    color: black;
    font-weight: bold;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-main);
    padding: 0;
}

.desktop-sidebar .btn {
    justify-content: flex-start;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    font-size: 0.94rem;
}

.desktop-sidebar .btn-primary {
    box-shadow: 0 12px 24px rgba(200, 170, 110, 0.2);
}

.full-width {
    width: 100%;
}

/* Report Payment Card Design */
.report-payment-section {
    margin-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-md);
}

.report-payment-card {
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.1), rgba(0, 0, 0, 0.4));
    border: 1px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.report-payment-card:hover {
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.2), rgba(0, 0, 0, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200, 170, 110, 0.15);
    border-style: solid;
}

.report-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.report-icon {
    width: 45px;
    height: 45px;
    background: rgba(200, 170, 110, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.report-text h4 {
    color: var(--primary);
    margin: 0;
    font-size: 1.1rem;
}

.report-text p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.report-arrow {
    color: var(--primary);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.report-payment-card:hover .report-arrow {
    transform: translateX(5px);
}

/* Mobile Admin Tables */
@media (max-width: 768px) {
    .card {
        padding: 1rem !important;
    }

    /* Force tables to scroll */
    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        /* Force width to trigger scroll if needed */
    }

    /* Better touch targets */
    .btn,
    .btn-icon {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Chat Input Styles - Support Page */
.chat-message-input,
#message-input {
    padding: 16px 20px !important;
    font-size: 16px !important;
    height: 56px !important;
    background-color: #0d0d14 !important;
    color: #ffffff !important;
    border: 2px solid #c8aa6e !important;
    border-radius: 12px !important;
    font-family: var(--font-body) !important;
    outline: none !important;
}

.chat-message-input::placeholder,
#message-input::placeholder {
    color: #888 !important;
    opacity: 1 !important;
}

.chat-message-input:focus,
#message-input:focus {
    border-color: #f0e6d2 !important;
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.3) !important;
}

.chat-input-wrapper {
    padding: 1.5rem !important;
    background: #1a1a25 !important;
    border-top: 2px solid #c8aa6e !important;
}

/* Tournament Bracket */
.bracket-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
}
.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 220px;
}
.bracket-match {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}
.bracket-match:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}
.bracket-match .team {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
}
.bracket-match .team.winner {
    background: rgba(0, 184, 148, 0.2);
    color: var(--success-green);
    font-weight: bold;
    border: 1px solid rgba(0, 184, 148, 0.4);
}
.bracket-match .team.loser {
    opacity: 0.55;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(255, 107, 107, 0.7);
}
.bracket-match .vs {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0.25rem;
}

/* Timers */
.countdown-timer {
    font-family: monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6b35;
}
.countdown-expired {
    color: #ff4757;
}

/* Prize Progress Bar */
.prize-card {
    background: linear-gradient(135deg, rgba(253, 203, 110, 0.1), transparent);
    border: 1px solid rgba(253, 203, 110, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
}
.prize-card .progress-container {
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    position: relative;
    margin: 1rem 0;
}
.prize-card .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fdcb6e, #e17055);
    border-radius: 10px;
    transition: width 0.5s ease;
}
.prize-card .progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Admin Notifications Badge */
.admin-notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-red);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* Form Styles */
.form-control {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    width: 100%;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.3s;
}
.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(200, 170, 110, 0.2);
}
select.form-control {
    appearance: auto;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 28px;
}
.toggle-slider:before {
    content: "";
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-green);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* Match Card */
.match-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
}
.match-card:hover {
    border-color: var(--primary);
}
.match-card .match-code {
    font-family: monospace;
    font-size: 1.3rem;
    color: var(--primary);
    background: rgba(200, 170, 110, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    letter-spacing: 2px;
}
.match-card .opponent-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
}

/* Snackbar / Toast */
.snackbar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-panel);
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateX(-50%) translateY(100px); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}
.empty-state h3 {
    color: white;
    margin-bottom: 0.5rem;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

@keyframes queuePulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200,170,110,0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(200,170,110,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200,170,110,0); }
}

.p2p-queue-pulse {
    animation: queuePulse 1.5s infinite !important;
}

/* ================================
   P2P BETTING SYSTEM
   ================================ */
.p2p-container {
    padding: 1rem;
    max-width: none;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.p2p-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.p2p-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.p2p-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.p2p-balance-card {
    background: linear-gradient(135deg, rgba(200,170,110,0.15), rgba(200,170,110,0.05));
    border: 1px solid rgba(200,170,110,0.3);
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.p2p-balance-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.p2p-balance-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    font-family: monospace;
}

.p2p-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.p2p-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.p2p-card-icon {
    font-size: 1.2rem;
}

.p2p-card-body {
    padding: 1rem;
}

.p2p-badge {
    background: var(--primary);
    color: black;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}

.p2p-badge-active {
    background: var(--accent-green);
    color: black;
}

/* -- TYPE SELECTOR -- */
.p2p-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.p2p-type-btn {
    background: rgba(255,255,255,0.03);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
    color: var(--text-main);
}

.p2p-type-btn:hover {
    border-color: var(--primary);
    background: rgba(200,170,110,0.05);
}

.p2p-type-btn.active {
    border-color: rgba(200,170,110,0.7);
    background: linear-gradient(135deg, rgba(200,170,110,0.96), rgba(160,128,64,0.96));
    box-shadow: 0 10px 22px rgba(200,170,110,0.24);
    color: #000;
}

.p2p-type-btn.active .p2p-type-icon,
.p2p-type-btn.active .p2p-type-name,
.p2p-type-btn.active .p2p-type-desc {
    color: #000;
}

.p2p-type-icon {
    font-size: 1.5rem;
}

.p2p-type-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.p2p-type-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* -- AMOUNT GRID -- */
.p2p-amount-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.p2p-amount-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    transition: all 0.2s;
    text-align: center;
}

.p2p-amount-btn:hover {
    border-color: var(--primary);
    background: rgba(200,170,110,0.1);
}

.p2p-amount-btn.selected {
    border-color: var(--primary);
    background: rgba(200,170,110,0.2);
    color: var(--primary);
}

.challenge-amt {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.challenge-amt:hover {
    border-color: var(--primary);
    background: rgba(200,170,110,0.1);
}

.challenge-amt.selected {
    border-color: rgba(200,170,110,0.7);
    background: linear-gradient(135deg, rgba(200,170,110,0.96), rgba(160,128,64,0.96));
    color: #000;
    box-shadow: 0 10px 22px rgba(200,170,110,0.24);
}

.challenge-type {
    min-height: 44px;
}

.challenge-type.active {
    color: #000;
}

.p2p-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: white;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    transition: border-color 0.2s;
}

.p2p-input:focus {
    border-color: var(--primary);
}

.p2p-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: rgba(0,184,148,0.08);
    border-radius: 8px;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.p2p-total-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.p2p-error {
    color: #ff4757;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: none;
    padding: 0.5rem;
    background: rgba(255,71,87,0.1);
    border-radius: 8px;
}

.p2p-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.p2p-form-row {
    margin-bottom: 0.75rem;
}

/* -- ORDER LIST -- */
.p2p-section-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p2p-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    gap: 0.5rem;
}

.p2p-order-item:hover {
    border-color: rgba(200,170,110,0.3);
}

.p2p-order-mine {
    border-color: rgba(200,170,110,0.3);
    background: rgba(200,170,110,0.05);
}

.p2p-order-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.p2p-order-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.p2p-avatar-solo {
    background: linear-gradient(135deg, #6c5ce7, #0984e3);
    color: white;
}

.p2p-avatar-team {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
}

.p2p-order-info {
    min-width: 0;
}

.p2p-order-nick {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p2p-order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.p2p-mode-tag {
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.p2p-mode-1v1 {
    background: rgba(108,92,231,0.2);
    color: #a29bfe;
}

.p2p-mode-5v5 {
    background: rgba(225,112,85,0.2);
    color: #fab1a0;
}

.p2p-order-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.p2p-order-total {
    font-weight: bold;
    font-size: 1rem;
    color: var(--primary);
    font-family: monospace;
}

/* -- MATCH CARD -- */
.p2p-match-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--accent-green);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.p2p-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.p2p-match-vs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.p2p-match-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.p2p-match-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: black;
}

.p2p-match-vs-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.p2p-match-mode {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
}

.p2p-match-code {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.p2p-code-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.p2p-code-display strong {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--accent-green);
    font-family: monospace;
}

.p2p-match-stakes {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    text-align: center;
}

.p2p-match-actions {
    display: flex;
    gap: 0.5rem;
}

.p2p-match-actions .btn-p2p {
    flex: 1;
}

/* -- CHAT -- */
.p2p-match-chat {
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
}

.p2p-chat-toggle {
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0.25rem 0;
    user-select: none;
}

.p2p-chat-toggle:hover {
    color: var(--primary);
}

.p2p-chat-arrow {
    display: inline-block;
    transition: transform 0.2s;
    font-size: 0.7rem;
}

.p2p-chat-arrow.open {
    transform: rotate(90deg);
}

.p2p-chat-box {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.p2p-chat-box.open {
    display: flex;
}

.p2p-chat-messages {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.p2p-chat-loading,
.p2p-chat-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem;
}

.p2p-msg {
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    max-width: 85%;
}

.p2p-msg-mine {
    background: rgba(0,184,148,0.15);
    align-self: flex-end;
    text-align: right;
}

.p2p-msg-theirs {
    background: rgba(108,92,231,0.15);
    align-self: flex-start;
}

.p2p-msg-sender {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.1rem;
}

.p2p-msg-text {
    word-break: break-word;
}

.p2p-msg-time {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.p2p-chat-input-row {
    display: flex;
    gap: 0.5rem;
}

.p2p-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: white;
    font-size: 0.85rem;
    outline: none;
}

.p2p-chat-input:focus {
    border-color: var(--primary);
}

.p2p-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.p2p-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.p2p-muted {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* -- P2P BUTTONS -- */
.btn-p2p {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.btn-p2p:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-p2p-primary {
    background: linear-gradient(135deg, var(--primary), #d4a854);
    color: black;
}

.btn-p2p-primary:hover:not(:disabled) {
    box-shadow: 0 4px 15px rgba(200,170,110,0.4);
    transform: translateY(-1px);
}

.btn-p2p-accept {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.btn-p2p-accept:hover:not(:disabled) {
    box-shadow: 0 4px 15px rgba(0,184,148,0.4);
    transform: translateY(-1px);
}

.btn-p2p-danger {
    background: rgba(255,71,87,0.2);
    color: #ff4757;
    border: 1px solid rgba(255,71,87,0.3);
}

.btn-p2p-danger:hover {
    background: rgba(255,71,87,0.3);
}

.btn-p2p-win {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.btn-p2p-lose {
    background: rgba(255,71,87,0.2);
    color: #ff4757;
    border: 1px solid rgba(255,71,87,0.3);
}

.btn-p2p-gold {
    background: rgba(200,170,110,0.15);
    color: var(--primary);
    border: 1px solid rgba(200,170,110,0.3);
}

.btn-p2p-gold:hover {
    background: rgba(200,170,110,0.25);
}

.btn-p2p-dark {
    background: rgba(255,255,255,0.1);
    color: white;
}

.btn-p2p-dark:hover {
    background: rgba(255,255,255,0.15);
}

.btn-p2p-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

.btn-p2p-full {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
}

.flex-1 { flex: 1; }

/* responsive */
@media (max-width: 600px) {
    .p2p-amount-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .p2p-header {
        flex-direction: column;
        align-items: stretch;
    }
    .p2p-order-item {
        flex-direction: column;
        align-items: stretch;
    }
    .p2p-order-right {
        justify-content: flex-end;
    }
}

/* App polish: dashboard, sidebars and admin */
.btn-sm {
    min-height: 42px;
    padding: 0.65rem 0.9rem;
    font-size: 0.86rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.sidebar-brand-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.sidebar-brand-kicker {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
}

.sidebar-brand-title {
    font-size: 1.55rem;
    line-height: 1.02;
    color: var(--text-main);
}

.sidebar-brand-title span {
    color: var(--primary);
}

.sidebar-profile-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-color: rgba(200, 170, 110, 0.16);
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.12), rgba(255, 255, 255, 0.03));
}

.sidebar-profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, var(--primary), #e0bf7d);
    box-shadow: 0 10px 24px rgba(200, 170, 110, 0.25);
    flex-shrink: 0;
}

.sidebar-profile-meta {
    min-width: 0;
}

.sidebar-profile-name {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.sidebar-section-label {
    padding: 0.4rem 0.55rem 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-section-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
    margin: 0.55rem 0;
}

.sidebar-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.desktop-sidebar .btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.84);
    border-color: rgba(255, 255, 255, 0.06);
}

.desktop-sidebar .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(200, 170, 110, 0.2);
}

.desktop-sidebar .btn-danger {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.9), rgba(199, 52, 52, 0.95));
    color: #fff;
}

.dashboard-main {
    background: transparent;
}

.dashboard-shell {
    width: 100%;
    max-width: none;
    margin: 0;
}

.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.92), rgba(14, 18, 27, 0.88));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

.dashboard-header-copy {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dashboard-eyebrow {
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-header-summary {
    min-width: 240px;
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}

.dashboard-summary-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.52);
}

.dashboard-header-summary strong {
    font-size: 1rem;
    color: var(--text-main);
}

.dashboard-summary-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.dashboard-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-mobile-menu {
    font-size: 1.1rem;
}

.dashboard-mobile-title {
    font-weight: 700;
    font-size: 1.02rem;
    display: block;
}

.dashboard-mobile-subtitle {
    color: rgba(255, 255, 255, 0.54);
    font-size: 0.74rem;
}

.dashboard-mobile-avatar {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: black;
    box-shadow: 0 8px 18px rgba(200, 170, 110, 0.22);
}

.wallet-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(200, 170, 110, 0.22);
}

.wallet-copy {
    min-width: 0;
}

.wallet-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.56);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wallet-balance {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.05;
    margin-top: 0.2rem;
}

.wallet-hint {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.wallet-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.wallet-lobby {
    margin-top: 0.65rem;
}

.wallet-lobby-link {
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    background: rgba(200, 170, 110, 0.09);
    border: 1px solid rgba(200, 170, 110, 0.18);
    border-radius: 14px;
    color: var(--text-main);
    font-size: 0.86rem;
}

.active-challenge-section,
.modes-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    background: rgba(0, 180, 216, 0.14);
    border: 1px solid rgba(0, 180, 216, 0.24);
}

.section-title {
    font-size: 1.1rem;
    color: var(--text-main);
    margin: 0;
}

.challenge-card {
    border-radius: 20px;
}

.challenge-actions {
    display: flex;
    gap: 0.6rem;
}

.admin-shell {
    background: transparent;
    width: 100%;
}

.admin-mobile-header {
    align-items: center;
    justify-content: space-between;
    padding: 0.95rem 1rem;
    background: rgba(18, 21, 31, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.admin-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-mobile-title {
    display: block;
    font-weight: 700;
    color: var(--primary);
}

.admin-mobile-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.52);
}

.admin-mobile-toggle {
    font-size: 1.1rem;
}

.admin-sidebar {
    background: linear-gradient(180deg, rgba(18, 22, 32, 0.99) 0%, rgba(11, 14, 21, 0.98) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 20px 0 54px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(20px);
}

.admin-sidebar-overlay {
    backdrop-filter: blur(4px);
}

.admin-sidebar-brand {
    padding: 1.6rem 1.2rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.admin-sidebar-brand-main {
    display: flex;
    align-items: center;
    gap: 0.95rem;
}

.admin-sidebar-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent-blue));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.admin-sidebar-brand-copy h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--primary);
}

.admin-sidebar-brand-copy p {
    margin: 0.15rem 0 0;
    font-size: 0.76rem;
}

.admin-close-sidebar {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.admin-nav {
    padding: 1.15rem 0.9rem;
    flex: 1;
    overflow-y: auto;
}

.admin-nav-group + .admin-nav-group {
    margin-top: 1.15rem;
}

.admin-nav-label {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.65rem 0.45rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    margin-bottom: 0.38rem;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.72);
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.admin-nav-item:hover {
    transform: translateY(-1px);
    color: var(--text-main);
    border-color: rgba(200, 170, 110, 0.2);
    background: rgba(255, 255, 255, 0.06);
}

.admin-nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(200, 170, 110, 0.95), rgba(0, 180, 216, 0.9));
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.admin-nav-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
}

.admin-footer {
    padding: 1rem 1.15rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.92), rgba(188, 45, 45, 0.96));
    border: none;
    cursor: pointer;
    font-size: 0.98rem;
    font-weight: 600;
}

.admin-main {
    background: transparent;
    width: 100%;
    max-width: none;
    min-width: 0;
}

.admin-main > * {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.admin-page-header h1 {
    margin-bottom: 0.25rem;
}

.admin-settings-grid {
    align-items: start;
}

.admin-danger-card {
    border-color: rgba(255, 77, 77, 0.22);
    background: linear-gradient(180deg, rgba(45, 16, 16, 0.95), rgba(24, 13, 16, 0.96));
}

.admin-danger-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.78);
}

.admin-danger-actions {
    margin-top: 1.1rem;
}

.admin-settings-actions {
    flex-wrap: wrap;
}

@media (max-width: 979px) {
    .dashboard-header {
        flex-direction: column;
    }

    .dashboard-header-summary {
        width: 100%;
        min-width: 0;
    }

    .wallet-panel {
        flex-direction: column;
        align-items: flex-start;
    }

    .wallet-actions {
        width: 100%;
    }

    .wallet-actions .btn {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .dashboard-shell {
        max-width: 100%;
    }

    .wallet-balance {
        font-size: 1.75rem;
    }

    .dashboard-header,
    .wallet-panel,
    .auth-card,
    .card,
    .glass-panel {
        border-radius: 18px;
    }

    .admin-settings-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-settings-actions .btn {
        width: 100%;
    }
}

/* --- Utilidades semanticas ---
   Preferir estas clases antes que estilos inline en las vistas.
   El color "semantico" va en el nombre (win/danger/primary...), no en hex. */
.page-container {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}

.btn-gold {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #000;
    box-shadow: 0 12px 28px rgba(200, 170, 110, 0.28);
}

.btn-green {
    background: linear-gradient(135deg, var(--success-green), var(--teal));
    color: #000;
}

.btn-purple {
    background: linear-gradient(135deg, var(--purple), var(--purple-soft));
    color: #fff;
}

.btn-red {
    background: linear-gradient(135deg, var(--danger), var(--team-red-dark));
    color: #fff;
}

.btn-orange {
    background: linear-gradient(135deg, var(--orange), var(--coral));
    color: #fff;
}

.btn-twitch {
    background: linear-gradient(135deg, var(--twitch), var(--twitch-dark));
    color: #fff;
}

.btn-gold:hover,
.btn-green:hover,
.btn-purple:hover,
.btn-red:hover,
.btn-orange:hover,
.btn-twitch:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.text-success {
    color: var(--success-green);
}

.text-danger {
    color: var(--danger);
}

.text-gold {
    color: var(--gold-warm);
}

.text-purple {
    color: var(--purple);
}

.text-twitch {
    color: var(--twitch);
}
