@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root,
[data-theme="dark"] {
    --bg-dark: #0b1220;
    --bg-card: #141e30;
    --bg-card-hover: #1a2740;
    --topbar-bg: rgba(20, 30, 48, 0.8);
    --sidebar-bg: linear-gradient(180deg, #0a1628 0%, #0d2137 50%, #0a1a2e 100%);
    --accent: #00c896;
    --accent-glow: rgba(0, 200, 150, 0.25);
    --gold: #f4c430;
    --silver: #a8b2c1;
    --platinum: #b9f2ff;
    --text: #e8edf5;
    --text-muted: #8b9cb3;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 14px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-border: rgba(255, 255, 255, 0.12);
    --btn-outline-color: rgba(255, 255, 255, 0.3);
    --btn-outline-hover-bg: rgba(255, 255, 255, 0.1);
}

[data-theme="light"] {
    --bg-dark: #eef2f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --topbar-bg: rgba(255, 255, 255, 0.92);
    --sidebar-bg: linear-gradient(180deg, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
    --accent: #009e75;
    --accent-glow: rgba(0, 158, 117, 0.2);
    --gold: #b8860b;
    --silver: #64748b;
    --platinum: #0e7490;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.1);
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    --input-bg: #ffffff;
    --input-border: rgba(15, 23, 42, 0.15);
    --btn-outline-color: rgba(15, 23, 42, 0.25);
    --btn-outline-hover-bg: rgba(15, 23, 42, 0.06);
}

html, body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--accent); }

.btn-primary {
    background: linear-gradient(135deg, #00c896, #00a67d);
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00dba8, #00b88a);
}

.btn-outline-light {
    border-color: var(--btn-outline-color);
    color: var(--text);
}

.btn-outline-light:hover {
    background: var(--btn-outline-hover-bg);
    color: var(--text);
}

.btn-outline-secondary {
    border-color: var(--btn-outline-color);
    color: var(--text-muted);
}

.btn-outline-secondary:hover {
    background: var(--btn-outline-hover-bg);
    color: var(--text);
    border-color: var(--border);
}

.form-control,
.form-select {
    background: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text);
}

.form-control:focus,
.form-select:focus {
    background: var(--input-bg);
    border-color: var(--accent);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem var(--accent-glow);
}

.theme-toggle-btn {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
}

.theme-toggle-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

[data-theme="light"] .sidebar .nav-link {
    color: #475569 !important;
}

[data-theme="light"] .sidebar .nav-link.active {
    background-color: rgba(0, 158, 117, 0.15) !important;
    color: #009e75 !important;
}

[data-theme="light"] .sidebar .nav-link:hover {
    background-color: rgba(15, 23, 42, 0.06) !important;
    color: #1e293b !important;
}

[data-theme="light"] .sidebar .navbar-brand {
    color: #1e293b !important;
}

[data-theme="light"] .alert-danger {
    color: #842029;
    background: #f8d7da;
    border-color: #f5c2c7;
}

[data-theme="light"] .alert-success {
    color: #0f5132;
    background: #d1e7dd;
    border-color: #badbcc;
}

.live-auction-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 200, 150, 0.25);
    background: linear-gradient(
        135deg,
        rgba(0, 200, 150, 0.1),
        var(--bg-card)
    );
}

.live-auction-banner .live-badge {
    margin-right: 0.5rem;
}

.content { padding-top: 1.5rem; padding-bottom: 3rem; }

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-weight: 800;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin: 0;
}

.text-muted { color: var(--text-muted) !important; }

.card-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 0 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .hero { grid-template-columns: 2fr 1fr; }
}

.hero-badge {
    display: inline-block;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 520px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.stat-value { display: block; font-size: 1.8rem; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) { .section-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }
.feature-card a { font-weight: 600; text-decoration: none; }

.category-showcase { margin-top: 2rem; }
.category-showcase h2 { font-weight: 700; margin-bottom: 1rem; }
.category-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Sponsors */
.sponsors-showcase {
    margin-top: 2.5rem;
    padding: 1.75rem;
    border-radius: 16px;
    background: linear-gradient( 145deg, rgba(34, 197, 94, 0.08), rgba(15, 23, 42, 0.6) );
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.sponsors-showcase-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

    .sponsors-showcase-header h2 {
        font-weight: 700;
        margin-bottom: 0.35rem;
    }

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .sponsors-grid {
        grid-template-columns: 1fr;
    }
}

.sponsor-card {
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

    .sponsor-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    }

.sponsor-photo {
    width: 100px;
    height: 100px;
    margin: 0 auto 0.85rem;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .sponsor-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.sponsor-initials {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.sponsor-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.sponsor-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.sponsors-manage-link {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}

.sponsors-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.sponsor-admin-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    border-radius: 14px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.sponsor-admin-body {
    text-align: center;
}

    .sponsor-admin-body h3 {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

.sponsor-image-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
}

/* Category badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.category-lg { padding: 0.5rem 1.2rem; font-size: 0.85rem; }
.category-silver { background: rgba(168,178,193,0.2); color: var(--silver); border: 1px solid var(--silver); }
.category-gold { background: rgba(244,196,48,0.15); color: var(--gold); border: 1px solid var(--gold); }
.category-platinum { background: rgba(185,242,255,0.12); color: var(--platinum); border: 1px solid var(--platinum); }

/* Player avatar */
.player-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-avatar.avatar-sm { width: 44px; height: 44px; border-width: 2px; }
.player-avatar.avatar-lg {
    width: 220px;
    height: 220px;
    border-width: 4px;
}

.player-avatar.avatar-square {
    border-radius: 14px;
}

.player-avatar.avatar-lg .avatar-fallback { font-size: 2.5rem; }
.player-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.avatar-fallback { font-weight: 700; font-size: 1.5rem; color: var(--accent); }

/* Auction page */
.auction-ceremony {
    position: relative;
    overflow: hidden;
}

.ceremony-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.auction-ceremony > *:not(.ceremony-bg) {
    position: relative;
    z-index: 1;
}

.spotlight {
    position: absolute;
    top: -20%;
    width: 55%;
    height: 80%;
    opacity: 0.12;
    filter: blur(40px);
    animation: spotlight-sway 8s ease-in-out infinite alternate;
}

.spotlight-left {
    left: -10%;
    background: radial-gradient(ellipse, #00c896 0%, transparent 70%);
}

.spotlight-right {
    right: -10%;
    background: radial-gradient(ellipse, #f4c430 0%, transparent 70%);
    animation-delay: -4s;
}

@keyframes spotlight-sway {
    from { transform: translateX(0) rotate(-5deg); }
    to { transform: translateX(30px) rotate(5deg); }
}

.ceremony-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.5);
    left: calc(var(--p) * 5.5%);
    top: calc((var(--p) * 7%) + 10%);
    animation: float-particle 6s ease-in-out infinite;
    animation-delay: calc(var(--p) * -0.4s);
}

@keyframes float-particle {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-30px) scale(1.5); opacity: 0.8; }
}

.auction-marquee {
    background: linear-gradient(90deg, #c9a227, #f4d03f, #c9a227);
    color: #1a1200;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(244, 196, 48, 0.25);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 22s linear infinite;
    padding: 0.45rem 0;
}

.marquee-track span { padding-right: 3rem; white-space: nowrap; }

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.live-badge-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.live-badge {
    background: #e63946;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.08em;
    animation: live-pulse 1.5s ease infinite;
    box-shadow: 0 0 12px rgba(230, 57, 70, 0.6);
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}

.auction-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.stat-pill {
    font-size: 0.8rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 200, 150, 0.12);
    border: 1px solid rgba(0, 200, 150, 0.3);
    color: var(--accent);
}

.stat-pill.sold-pill {
    background: rgba(244, 196, 48, 0.12);
    border-color: rgba(244, 196, 48, 0.35);
    color: var(--gold);
}

.ceremony-stage {
    border: 1px solid rgba(244, 196, 48, 0.2);
    box-shadow:
        0 0 40px rgba(0, 200, 150, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    background: linear-gradient(
        180deg,
        rgba(20, 30, 48, 0.95) 0%,
        rgba(11, 18, 32, 0.98) 100%
    );
}

.ceremony-sidebar {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 22, 36, 0.9);
}

.ceremony-btn {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 200, 150, 0.4);
    animation: btn-glow 2s ease infinite alternate;
}

@keyframes btn-glow {
    from { box-shadow: 0 4px 20px rgba(0, 200, 150, 0.35); }
    to { box-shadow: 0 4px 32px rgba(0, 200, 150, 0.65); }
}

.btn-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 60%
    );
    animation: shine-sweep 2.5s ease infinite;
}

@keyframes shine-sweep {
    from { transform: translateX(-120%); }
    to { transform: translateX(120%); }
}

.ceremony-title {
    font-weight: 900;
    background: linear-gradient(135deg, #fff 30%, var(--gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

.ceremony-sub {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

.auction-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .auction-grid { grid-template-columns: 1fr 300px; }
}

.player-auction-card {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.player-visual { text-align: center; flex-shrink: 0; }

.player-auction-card .player-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.player-details h2 { font-weight: 800; margin-bottom: 0.25rem; }

.price-block {
    display: inline-flex;
    flex-direction: column;
    margin-right: 1.5rem;
    margin-top: 1rem;
}

.price-block .label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.price-block .amount { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.current-bid .amount { color: var(--gold); }

.leading-team { font-weight: 600; margin-top: 0.75rem; }

.team-bid-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 576px) { .team-bid-grid { grid-template-columns: repeat(2, 1fr); } }

.team-bid-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    background: var(--bg-dark);
    border-radius: 10px;
    border-left: 3px solid var(--team-color, var(--accent));
}

.team-logo, .team-logo-sm { border-radius: 50%; object-fit: cover; }
.team-logo { width: 56px; height: 56px; }
.team-logo-sm { width: 36px; height: 36px; }

.team-bid-info { flex: 1; min-width: 0; }
.team-bid-info strong { display: block; font-size: 0.9rem; }
.team-bid-info small { color: var(--text-muted); }

.btn-team-bid {
    background: var(--team-color, var(--accent));
    color: #fff;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.btn-team-bid:disabled { opacity: 0.4; }

.sell-actions { margin-top: 1.5rem; text-align: center; }

.bid-timer {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 12px;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
}

.bid-timer.timer-urgent {
    border-color: #e63946;
    animation: timer-pulse 1s ease infinite;
}

@keyframes timer-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(230, 57, 70, 0); }
}

.timer-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 4px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timer-urgent .timer-ring {
    border-color: #e63946;
}

.timer-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.timer-urgent .timer-value { color: #e63946; }

.timer-label strong { display: block; margin-bottom: 0.25rem; }
.timer-label small { color: var(--text-muted); }

.team-edit-btn { margin-left: auto; flex-shrink: 0; }

.team-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-logo-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent);
    margin: 0.75rem 0;
}

.team-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-control-color {
    height: 44px;
    padding: 0.25rem;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
}


.bid-history ul { list-style: none; padding: 0; margin: 0; }
.bid-history li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.bid-history small { color: var(--text-muted); }

.spin-animation, .auction-idle, .auction-complete, .sold-reveal, .team-showcase {
    text-align: center;
    padding: 3rem 1rem;
    position: relative;
}

/* Idle — stage waiting */
.ceremony-idle { padding: 4rem 1rem; }

.idle-stage {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.idle-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
}

.idle-ring-1 {
    border-top-color: var(--gold);
    border-right-color: rgba(244, 196, 48, 0.3);
    animation: ring-spin 4s linear infinite;
}

.idle-ring-2 {
    inset: 12px;
    border-bottom-color: var(--accent);
    border-left-color: rgba(0, 200, 150, 0.3);
    animation: ring-spin 3s linear infinite reverse;
}

@keyframes ring-spin {
    to { transform: rotate(360deg); }
}

.idle-icon {
    font-size: 4.5rem;
    animation: idle-bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 200, 150, 0.4));
}

@keyframes idle-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.05); }
}

.idle-sparkle-row {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: var(--gold);
    opacity: 0.6;
    animation: sparkle-blink 2s ease infinite;
}

.idle-sparkle-row span:nth-child(2) { animation-delay: 0.3s; }
.idle-sparkle-row span:nth-child(3) { animation-delay: 0.6s; }

@keyframes sparkle-blink {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Spin ceremony */
.ceremony-spin { padding: 4rem 1rem; }

.spin-stage-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin: -100px 0 0 -100px;
    border-radius: 50%;
    border: 3px dashed rgba(244, 196, 48, 0.4);
    animation: ring-spin 2s linear infinite;
}

.spin-drum {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
}

.spin-wheel {
    font-size: 5rem;
    animation: spin-drum 0.35s ease-in-out infinite;
    filter: drop-shadow(0 0 24px rgba(244, 196, 48, 0.5));
}

@keyframes spin-drum {
    0% { transform: rotate(-8deg) scale(1); }
    25% { transform: rotate(8deg) scale(1.1); }
    50% { transform: rotate(-6deg) scale(1.05); }
    75% { transform: rotate(6deg) scale(1.12); }
    100% { transform: rotate(-8deg) scale(1); }
}

.spin-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.spin-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    animation: dot-bounce 1.2s ease infinite;
}

.spin-dots span:nth-child(2) { animation-delay: 0.2s; }
.spin-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dot-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-12px); opacity: 1; }
}

/* Sold reveal — Rank Up style celebration (4s step timeline) */
.ceremony-sold {
    padding: 2.5rem 1rem 3rem;
    overflow: hidden;
    min-height: 420px;
}

.sold-celebration {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sold-step {
    opacity: 0;
    animation-fill-mode: forwards;
}

.sold-step-rays {
    animation: sold-rays-in 0.8s ease 0s forwards;
}

@keyframes sold-rays-in {
    from { opacity: 0; transform: rotate(0deg) scale(0.8); }
    to { opacity: 1; transform: rotate(0deg) scale(1); }
}

.sold-step-flash {
    animation: sold-flash-burst 1s ease-out 0s forwards;
}

.sold-step-confetti {
    animation: step-show 0.5s ease 0.4s forwards;
}

.sold-step-ribbon {
    animation: ribbon-drop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) 0.75s forwards;
}

.sold-step-podium {
    animation: podium-rise 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1.45s forwards;
}

.sold-step-crown {
    animation: crown-bounce 0.75s ease 1.85s forwards;
}

.sold-step-badge {
    animation: badge-pop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) 2.45s forwards;
}

.sold-step-reward {
    animation: reward-slide 0.75s ease 3.1s forwards;
}

@keyframes step-show {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sold-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    margin: -100% 0 0 -100%;
    background: repeating-conic-gradient(
        from 0deg at 50% 30%,
        rgba(120, 200, 255, 0.14) 0deg 8deg,
        transparent 8deg 16deg
    );
    animation: sold-rays-spin 18s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes sold-rays-spin {
    to { transform: rotate(360deg); }
}

.sold-flash {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 50% 35%,
        rgba(255, 255, 255, 0.4) 0%,
        transparent 55%
    );
    pointer-events: none;
    z-index: 1;
}

@keyframes sold-flash-burst {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.sold-confetti, .finale-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 2;
}

.confetti-piece {
    position: absolute;
    top: -12%;
    left: calc(var(--x, 50) * 1%);
    width: 10px;
    height: 14px;
    border-radius: 2px;
    animation: confetti-fall 3.5s ease-in forwards;
    animation-delay: calc(0.5s + var(--i) * 0.035s);
    opacity: 0;
}

.confetti-red { background: #e63946; }
.confetti-gold { background: #f4d03f; }

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg) translateX(0);
        opacity: 1;
    }
    25% {
        transform: translateY(25vh) rotate(180deg) translateX(20px);
        opacity: 1;
    }
    100% {
        transform: translateY(115vh) rotate(720deg) translateX(-30px);
        opacity: 0.5;
    }
}

.sold-ribbon-wrap {
    position: relative;
    z-index: 5;
    margin-bottom: 1.25rem;
}

@keyframes ribbon-drop {
    0% {
        transform: translateY(-80px) scale(0.5);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.sold-ribbon {
    display: inline-block;
    padding: 0.55rem 2.75rem;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #fff;
    background: linear-gradient(180deg, #ff5a67 0%, #d62839 45%, #9d0208 100%);
    border: 4px solid #f4d03f;
    border-radius: 10px;
    box-shadow:
        0 6px 0 #8b6914,
        0 12px 32px rgba(230, 57, 70, 0.45),
        inset 0 2px 0 rgba(255, 255, 255, 0.25);
    text-shadow:
        0 2px 0 #8b6914,
        0 0 20px rgba(255, 255, 255, 0.35);
    transform: perspective(400px) rotateX(8deg);
}

.sold-podium {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem 0 1.25rem;
}

@keyframes podium-rise {
    0% {
        transform: translateY(60px) scale(0.6);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.sold-sparkle {
    position: absolute;
    color: #fff;
    font-size: 1.25rem;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
    opacity: 0;
    animation: sparkle-twinkle 1.2s ease-in-out 2.1s infinite;
    animation-fill-mode: forwards;
    pointer-events: none;
}

.sold-sparkle-1 { top: 5%; left: 18%; }
.sold-sparkle-2 { top: 12%; right: 15%; animation-delay: 2.5s; }
.sold-sparkle-3 { bottom: 28%; left: 22%; animation-delay: 2.9s; }

@keyframes sparkle-twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.3); }
}

.pedestal-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pedestal-crown {
    font-size: 2.5rem;
    margin-bottom: -0.75rem;
    z-index: 3;
    filter: drop-shadow(0 4px 12px rgba(244, 196, 48, 0.6));
}

@keyframes crown-bounce {
    0% { transform: translateY(-30px) scale(0); opacity: 0; }
    60% { transform: translateY(4px) scale(1.15); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

.pedestal-player {
    position: relative;
    z-index: 2;
    padding: 0.35rem;
    background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
    border-radius: 16px;
    border: 3px solid #f4d03f;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.pedestal-cushion {
    width: 200px;
    height: 28px;
    margin-top: -6px;
    background: linear-gradient(180deg, #ef476f 0%, #c9184a 100%);
    border: 3px solid #d4af37;
    border-radius: 0 0 8px 8px;
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.2);
}

.pedestal-base {
    width: 160px;
    height: 22px;
    background: linear-gradient(180deg, #f4d03f 0%, #c9a227 100%);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.team-star-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(180deg, #4cc9f0 0%, #219ebc 100%);
    border: 3px solid #f4d03f;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(33, 158, 188, 0.4);
}

.team-star-badge img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.team-star-badge span {
    font-weight: 800;
    font-size: 0.85rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes badge-pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.sold-reward-panel {
    position: relative;
    z-index: 5;
    text-align: center;
}

@keyframes reward-slide {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.sold-reward-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin: 0 0 0.35rem;
}

.sold-player-name {
    font-weight: 800;
    font-size: 1.35rem;
    margin: 0 0 0.25rem;
}

.sold-price {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--gold);
    text-shadow: 0 0 24px rgba(244, 196, 48, 0.5);
    margin: 0;
    animation: price-glow 1.5s ease infinite alternate;
}

@keyframes price-glow {
    from { filter: brightness(1); }
    to { filter: brightness(1.2); }
}

.sold-to-team {
    font-size: 1rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
}

.gavel-icon {
    font-size: 3rem;
    animation: gavel-strike 0.6s ease 0.2s both;
    margin-bottom: 0.5rem;
}

@keyframes gavel-strike {
    0% { transform: rotate(-40deg) scale(0.5); opacity: 0; }
    50% { transform: rotate(15deg) scale(1.2); }
    100% { transform: rotate(0) scale(1); opacity: 1; }
}

.sold-banner {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: linear-gradient(180deg, #fff 0%, var(--gold) 50%, #c9a227 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: sold-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 30px rgba(244, 196, 48, 0.5));
}

.sold-player-spotlight {
    margin: 1.25rem auto;
    animation: spotlight-pop 0.8s ease 0.3s both;
}

@keyframes spotlight-pop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Bidding spotlight */
.bidding-ceremony { position: relative; }

.ceremony-ribbon {
    display: inline-block;
    background: linear-gradient(90deg, #c9a227, #f4d03f);
    color: #1a1200;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 0.35rem 1.25rem;
    border-radius: 4px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 16px rgba(244, 196, 48, 0.3);
    animation: ribbon-glow 2s ease infinite alternate;
}

@keyframes ribbon-glow {
    from { box-shadow: 0 4px 12px rgba(244, 196, 48, 0.25); }
    to { box-shadow: 0 4px 24px rgba(244, 196, 48, 0.5); }
}

.player-spotlight-wrap {
    position: relative;
    padding: 2rem;
    border-radius: 16px;
    overflow: hidden;
}

.player-spotlight {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        rgba(244, 196, 48, 0.12) 0%,
        transparent 65%
    );
    animation: spotlight-pulse 3s ease infinite;
}

@keyframes spotlight-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.ceremony-bid-panel {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid rgba(0, 200, 150, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

.ceremony-sold-btn {
    animation: sold-btn-pulse 1.5s ease infinite;
    box-shadow: 0 4px 24px rgba(220, 53, 69, 0.45);
}

@keyframes sold-btn-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

/* Team showcase */
.ceremony-showcase { text-align: center; }

.showcase-sparkles {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    animation: sparkle-blink 1.5s ease infinite;
}

/* Auction complete finale */
.ceremony-finale { position: relative; overflow: hidden; }

.trophy-glow {
    font-size: 5rem;
    animation: trophy-rise 1s ease both;
    filter: drop-shadow(0 0 30px rgba(244, 196, 48, 0.6));
}

@keyframes trophy-rise {
    from { transform: translateY(40px) scale(0.5); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.finale-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.spin-wheel {
    font-size: 4rem;
    animation: spin-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes spin-pulse {
    from { transform: scale(1) rotate(-5deg); }
    to { transform: scale(1.15) rotate(5deg); }
}

.sold-reveal h2 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
    animation: sold-pop 0.5s ease;
}

@keyframes sold-pop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.showcase-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    padding: 1rem;
    border-left: 4px solid;
    background: var(--bg-dark);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.squad-grid { display: flex; flex-direction: column; gap: 0.5rem; }

.squad-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-dark);
    border-radius: 8px;
}

.squad-item .price { margin-left: auto; font-weight: 600; color: var(--gold); }

.team-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.35rem;
    border-bottom: 1px solid var(--border);
    border-radius: 8px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.team-mini img { width: 32px; height: 32px; border-radius: 50%; }
.team-mini small { color: var(--text-muted); display: block; }

.team-mini:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

/* Teams page */
.teams-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) { .teams-grid { grid-template-columns: repeat(2, 1fr); } }

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    border-top: 3px solid var(--team-color);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.team-card h2 { font-size: 1.2rem; font-weight: 700; margin: 0; }
.budget { color: var(--accent); font-weight: 700; }

.team-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.stat-num { display: block; font-weight: 800; font-size: 1.3rem; }
.stat-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }

.team-player-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.player-meta { flex: 1; min-width: 0; }
.player-meta strong { display: block; font-size: 0.9rem; }
.player-meta small { color: var(--text-muted); }
.sold-amount { font-weight: 600; color: var(--gold); font-size: 0.85rem; }
.empty-squad { color: var(--text-muted); font-style: italic; }

.team-card-actions {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.squad-players-btn { width: 100%; }

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.detail-backdrop { z-index: 2100; }

.app-modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.player-detail-modal { max-width: 480px; }

.app-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.app-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.btn-close-modal:hover { color: #fff; }

.app-modal-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
}

.app-modal-footer {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.squad-modal-list { display: flex; flex-direction: column; gap: 0.35rem; }

.squad-modal-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem;
    background: var(--bg-dark);
    border-radius: 10px;
    flex-wrap: wrap;
}

.squad-modal-row .sold-amount { margin-left: auto; }

.player-detail-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    text-align: center;
}

.player-detail-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.player-detail-info { width: 100%; }

.player-detail-info h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
}

.detail-sub {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    text-align: left;
    margin: 0;
}

.detail-grid div {
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
}

.detail-grid dt {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.detail-grid dd {
    margin: 0;
    font-weight: 700;
    font-size: 0.95rem;
}

/* Players page */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }

.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: left;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.player-card .player-avatar {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.player-card:hover { transform: translateY(-2px); }
.player-card.status-sold { opacity: 0.85; }

.player-card-body {
    flex: 1;
    min-width: 0;
}
.player-card-body h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 0.2rem; }
.player-card-body p { margin: 0 0 0.35rem; color: var(--text-muted); font-size: 0.88rem; }

.base-price { color: var(--accent); font-weight: 600; margin-top: 0.5rem; display: block; }
.sold-info { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; display: block; }
.status-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    background: rgba(0,200,150,0.15);
    color: var(--accent);
    margin-top: 0.5rem;
}

.player-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0;
    margin-left: auto;
}

.form-panel { margin-bottom: 1.5rem; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }

.form-grid label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.image-upload-field { grid-column: 1 / -1; }

.image-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent);
    margin: 0.75rem 0;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-picker-btn {
    display: inline-block;
    background: var(--bg-dark);
    border: 1px dashed var(--border);
    color: var(--text);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.25rem;
    transition: border-color 0.2s;
}

.file-picker-btn:hover { border-color: var(--accent); }

.file-picker-btn input[type="file"] {
    display: none;
}

.upload-error {
    color: #ff8a95;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.form-control {
    background: var(--bg-dark) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}


/* Rules page */
.rules-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) { .rules-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rules-grid { grid-template-columns: repeat(3, 1fr); } }

.rule-card { text-align: center; }
.rule-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.rule-card h3 { font-weight: 700; }
.rule-card p, .rule-card li { color: var(--text-muted); font-size: 0.9rem; text-align: left; }
.rule-card ul, .rule-card ol { padding-left: 1.2rem; margin: 0; }
.rule-card li { padding: 0.25rem 0; }

.rule-card-wide { grid-column: 1 / -1; }

.rule-intro p,
.rule-note p,
.rule-closing {
    color: var(--text-muted);
    line-height: 1.65;
    margin: 0;
}

.rule-note { margin-top: 1.5rem; }
.rule-note h3 { font-weight: 700; margin-bottom: 0.75rem; }
.rule-note ul { padding-left: 1.2rem; color: var(--text-muted); }
.rule-closing { margin-top: 1rem; font-style: italic; }

.captain-name { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.extra-badge { color: var(--accent); font-size: 0.8rem; }
.compliance-warn {
    background: rgba(230, 57, 70, 0.12);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: 8px;
    padding: 0.65rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}
.compliance-warn ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.compliance-ok {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.extra-budget-cost .cost-display {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    margin: 0.25rem 0 0;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.75rem;
    cursor: pointer;
}

.rules-form-grid { grid-template-columns: repeat(2, 1fr); }
.form-span-2 { grid-column: 1 / -1; }
.form-section-title {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.rules-list { margin-bottom: 2rem; }
.rules-table-wrap { overflow-x: auto; }
.rules-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.rules-table th,
.rules-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}
.rules-table th { color: var(--text-muted); font-weight: 600; }
.rules-table tr.row-active { background: rgba(0, 200, 150, 0.08); }
.rules-table small { color: var(--text-muted); }
.actions-cell { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.header-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.app-tagline { color: var(--text-muted); font-size: 0.85rem; }

.alert {
    border-radius: 10px;
    border: none;
}

.alert-danger { background: rgba(220,53,69,0.15); color: #ff8a95; }
.alert-success { background: rgba(0,200,150,0.15); color: var(--accent); }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}

.login-page {
    min-height: calc(100vh - 8rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.login-hint {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.access-denied-page {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.team-card-full { max-width: 900px; }

.users-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}
