/* ═══════════════════════════════════════════════════════════════
   G5Fighters - Layout System v3
   ═══════════════════════════════════════════════════════════════ */

.g5-main { max-width: var(--g5-max); }

.g5-main--wide { max-width: var(--g5-max-wide); }

/* ── Bento home grid ── */
.g5-bento {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.g5-bento-span-8 { grid-column: span 8; }
.g5-bento-span-4 { grid-column: span 4; }
.g5-bento-span-6 { grid-column: span 6; }
.g5-bento-span-12 { grid-column: span 12; }

.g5-hero-bento {
    padding: 0;
    overflow: hidden;
    min-height: 420px;
}

.g5-hero-split {
    display: grid;
    grid-template-columns: 1fr 340px;
    min-height: 420px;
}

.g5-hero-main {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.g5-hero-aside {
    padding: 32px;
    background: rgba(0, 0, 0, 0.35);
    border-left: 1px solid var(--g5-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.g5-live-card {
    padding: 24px;
    border-radius: var(--g5-radius-sm);
    background: rgba(46, 242, 194, 0.06);
    border: 1px solid var(--g5-border-accent);
    text-align: center;
}

.g5-live-card-val {
    font-family: var(--g5-display);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--g5-accent);
    line-height: 1;
}

.g5-live-card-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--g5-muted);
    margin-top: 8px;
}

.g5-ip-hero {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.g5-ip-hero code {
    font-family: var(--g5-display);
    font-size: 1.35rem;
    color: var(--g5-text);
    letter-spacing: 0.05em;
    word-break: break-all;
}

.g5-ip-hero .g5-btn-primary {
    width: 100%;
}

.g5-gradient-text {
    background: linear-gradient(135deg, var(--g5-text) 0%, var(--g5-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.g5-bento-feature {
    padding: 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.g5-bento-feature .g5-feature-icon {
    margin-bottom: 16px;
    color: var(--g5-accent);
}

.g5-bento-feature .g5-feature-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* ── Account layout ── */
.g5-account-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

.g5-account-sidebar {
    position: sticky;
    top: 96px;
    padding: 24px;
    border-radius: var(--g5-radius);
    background: var(--g5-surface);
    border: 1px solid var(--g5-border);
}

.g5-account-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--g5-border);
}

.g5-account-user strong {
    display: block;
    font-size: 0.95rem;
}

.g5-account-user .g5-muted { font-size: 0.78rem; }

.g5-avatar-sm {
    width: 48px;
    height: 48px;
    min-width: 48px;
}

.g5-account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.g5-account-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--g5-radius-sm);
    color: var(--g5-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--g5-transition);
}

.g5-account-nav-link:hover {
    color: var(--g5-text);
    background: rgba(255, 255, 255, 0.04);
}

.g5-account-nav-link.g5-active {
    color: var(--g5-accent);
    background: var(--g5-mint-dim);
    box-shadow: inset 0 0 0 1px rgba(46, 242, 194, 0.15);
}

.g5-account-nav-icon {
    width: 28px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.85;
}

.g5-account-content { min-width: 0; }

/* ── Admin layout ── */
.g5-admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 28px;
    align-items: start;
}

.g5-admin-sidebar {
    position: sticky;
    top: 96px;
    padding: 22px;
    border-radius: var(--g5-radius);
    background: var(--g5-surface);
    border: 1px solid var(--g5-border);
}

.g5-admin-brand {
    padding-bottom: 18px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--g5-border);
}

.g5-admin-brand strong {
    display: block;
    font-family: var(--g5-display);
    font-size: 1rem;
}

.g5-admin-brand .g5-muted { font-size: 0.78rem; }

.g5-admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.g5-admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: var(--g5-radius-sm);
    color: var(--g5-muted);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 500;
    transition: all var(--g5-transition);
}

.g5-admin-nav-link:hover {
    color: var(--g5-text);
    background: rgba(255, 255, 255, 0.04);
}

.g5-admin-nav-link.g5-active {
    color: var(--g5-sky);
    background: rgba(91, 157, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(91, 157, 255, 0.2);
}

.g5-admin-nav-link--muted {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--g5-border);
    font-size: 0.82rem;
}

.g5-admin-nav-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

.g5-admin-content { min-width: 0; }

.g5-admin-content > .g5-card + .g5-card {
    margin-top: 24px;
}

/* ── Report form ── */
.g5-report-form .g5-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 16px;
}

.g5-report-form .g5-form-grid label {
    margin-bottom: 16px;
}

.g5-report-evidence-icon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.g5-report-evidence-icon svg {
    width: 15px;
    height: 15px;
    color: var(--g5-muted);
}

/* ── Error pages ── */
.g5-error-page {
    text-align: center;
    padding: 48px 32px;
    max-width: 520px;
    margin: 40px auto;
}

.g5-error-code {
    font-family: var(--g5-display);
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--g5-mint), var(--g5-sky));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 12px;
}

/* ── Round timeline ── */
.g5-round-timeline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.g5-round-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--g5-border);
    background: rgba(0, 0, 0, 0.25);
}

.g5-round-chip--a {
    border-color: rgba(91, 157, 255, 0.35);
    color: #93c5fd;
    background: rgba(91, 157, 255, 0.1);
}

.g5-round-chip--b {
    border-color: rgba(255, 92, 92, 0.35);
    color: #fca5a5;
    background: rgba(255, 92, 92, 0.1);
}

.g5-round-scoreboard {
    display: grid;
    gap: 10px;
    margin: 24px 0;
}

.g5-round-row {
    display: grid;
    grid-template-columns: 48px 1fr 80px;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-radius: var(--g5-radius-sm);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--g5-border);
    transition: border-color var(--g5-transition), transform var(--g5-transition);
}

.g5-round-row:hover {
    border-color: var(--g5-border-bright);
    transform: translateX(4px);
}

.g5-round-num {
    font-family: var(--g5-display);
    font-size: 0.85rem;
    color: var(--g5-muted);
}

.g5-round-bar {
    display: flex;
    height: 8px;
    border-radius: 100px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.g5-round-bar-a {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.g5-round-bar-b {
    background: linear-gradient(90deg, #ef4444, #f87171);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.g5-round-score {
    font-family: var(--g5-display);
    font-weight: 600;
    text-align: right;
    font-size: 0.95rem;
}

.g5-score-final {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 32px;
    margin: 24px 0;
    border-radius: var(--g5-radius);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--g5-border);
}

.g5-score-team {
    text-align: center;
    min-width: 100px;
}

.g5-score-team-lbl {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--g5-muted);
    margin-bottom: 8px;
}

.g5-score-team-val {
    font-family: var(--g5-display);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.g5-score-team--a .g5-score-team-val { color: #60a5fa; }
.g5-score-team--b .g5-score-team-val { color: #f87171; }

.g5-score-divider {
    font-family: var(--g5-display);
    font-size: 1.5rem;
    color: var(--g5-muted);
}

/* ── Shop layout ── */
.g5-shop-hero {
    text-align: center;
    padding: 48px 32px;
    margin-bottom: 32px;
}

.g5-shop-trust {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 28px;
}

.g5-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--g5-text-secondary);
}

.g5-trust-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--g5-mint-dim);
    border: 1px solid var(--g5-border-accent);
    font-size: 1rem;
}

.g5-rank-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.g5-rank-tier {
    position: relative;
    padding: 0;
    overflow: hidden;
    transition: transform var(--g5-transition), box-shadow var(--g5-transition);
}

.g5-rank-tier:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), var(--g5-glow);
}

.g5-rank-tier-header {
    padding: 28px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--g5-border);
}

.g5-rank-tier-header h3 {
    font-family: var(--g5-display);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 12px;
}

.g5-rank-tier-body { padding: 20px 24px 28px; }

.g5-rank-benefits {
    list-style: none;
    margin-bottom: 24px;
}

.g5-rank-benefits li {
    padding: 10px 0;
    font-size: 0.88rem;
    color: var(--g5-text-secondary);
    border-bottom: 1px solid var(--g5-border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.g5-rank-benefits li::before {
    content: '✓';
    color: var(--g5-accent);
    font-weight: 700;
    flex-shrink: 0;
}

.g5-price-options { display: flex; flex-direction: column; gap: 10px; }

.g5-price-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--g5-radius-sm);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--g5-border);
    flex-wrap: wrap;
}

.g5-shop-checkout-panel {
    flex-basis: 100%;
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid var(--g5-border);
    margin-top: 4px;
}

.g5-price-option strong {
    font-family: var(--g5-display);
    font-size: 1.15rem;
    color: var(--g5-accent);
}

.g5-price-option--disabled {
    opacity: 0.55;
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.g5-price-option--disabled strong,
.g5-price-option--disabled .g5-shop-discount-badge {
    color: var(--g5-muted);
}

.g5-price-option--disabled .g5-muted {
    color: rgba(255, 255, 255, 0.45);
}

.g5-shop-discount-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #7dffb2;
    background: rgba(46, 204, 113, 0.12);
    border: 1px solid rgba(46, 204, 113, 0.35);
    border-radius: 999px;
    padding: 4px 10px;
}

.g5-coupon-cards {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.g5-coupon-card {
    padding: 18px 20px;
}

.g5-coupon-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
}

.g5-coupon-code {
    font-family: var(--g5-display);
    font-size: 1.1rem;
    letter-spacing: 0.04em;
}

.g5-coupon-benefit {
    color: var(--g5-accent);
    font-weight: 700;
}

.g5-coupon-conditions {
    margin: 12px 0 0;
    padding-left: 18px;
    color: var(--g5-text-muted);
}

.g5-coupon-conditions li {
    margin-bottom: 4px;
}

.g5-coupon-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--g5-border);
    font-size: 0.9rem;
    color: var(--g5-text-muted);
}

.g5-coupon-card--used {
    opacity: 0.75;
}

.g5-coupon-card--expired {
    opacity: 0.7;
    border-color: rgba(255, 120, 120, 0.25);
}

.g5-coupon-expired-label {
    margin-top: 12px;
    color: #ff8a8a;
    font-weight: 600;
}

.g5-coupon-actions {
    margin-top: 14px;
}

.g5-coupon-hint {
    margin-top: 12px;
    font-size: 0.9rem;
}

.g5-form-section {
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius-sm);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.g5-form-section legend {
    padding: 0 8px;
    font-weight: 600;
}

.g5-checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
}

.g5-comparison-matrix {
    overflow-x: auto;
    margin-top: 16px;
}

.g5-comparison-matrix table { min-width: 600px; }

/* ── Rankings layout ── */
.g5-rankings-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.g5-podium--pro {
    gap: 24px;
    margin: 32px 0 40px;
}

.g5-podium--pro .g5-podium-item {
    min-width: 160px;
    padding: 28px 24px;
}

/* ── Toast ── */
.g5-toast-host {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.g5-toast {
    padding: 14px 24px;
    border-radius: 100px;
    background: rgba(10, 14, 22, 0.92);
    border: 1px solid var(--g5-border-accent);
    color: var(--g5-text);
    font-size: 0.88rem;
    font-weight: 500;
    box-shadow: var(--g5-shadow);
    animation: g5toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

@keyframes g5toastIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Scroll reveal ── */
.g5-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.g5-reveal.g5-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes g5-reveal-fallback {
    to { opacity: 1; transform: translateY(0); }
}
.g5-reveal:not(.g5-visible) {
    animation: g5-reveal-fallback 0.01s ease 1.2s forwards;
}

.g5-reveal-delay-1 { transition-delay: 0.1s; }
.g5-reveal-delay-2 { transition-delay: 0.2s; }
.g5-reveal-delay-3 { transition-delay: 0.3s; }

/* ── Section labels ── */
.g5-section-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--g5-accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.g5-retention-note {
    font-size: 0.8rem;
    color: var(--g5-muted);
    padding: 12px 16px;
    border-radius: var(--g5-radius-sm);
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--g5-border);
    margin-bottom: 20px;
}

/* ── Round accordion ── */
.g5-round-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.g5-round-details {
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius-sm);
    background: rgba(0, 0, 0, 0.22);
    overflow: hidden;
    transition: border-color var(--g5-transition);
}

.g5-round-details[open] {
    border-color: var(--g5-border-accent);
}

.g5-round-details-summary {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.g5-round-details-summary::-webkit-details-marker { display: none; }

.g5-round-details-summary:hover {
    background: rgba(255, 255, 255, 0.02);
}

.g5-round-bar-inline {
    display: flex;
    height: 8px;
    border-radius: 100px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    min-width: 80px;
}

.g5-round-expand-icon {
    font-size: 0.7rem;
    color: var(--g5-muted);
    transition: transform 0.25s ease;
}

.g5-round-details[open] .g5-round-expand-icon {
    transform: rotate(180deg);
    color: var(--g5-accent);
}

.g5-round-details-body {
    padding: 0 20px 20px;
    border-top: 1px solid var(--g5-border);
    animation: g5accordionIn 0.3s ease;
}

@keyframes g5accordionIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.g5-table-compact th,
.g5-table-compact td {
    padding: 9px 12px;
    font-size: 0.82rem;
}

.g5-bot-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: rgba(167, 139, 250, 0.15);
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: #c4b5fd;
    vertical-align: middle;
}

.g5-row-bot {
    opacity: 0.92;
}

.g5-row-bot td:first-child {
    color: var(--g5-text-secondary);
}

tr.g5-highlight.g5-row-bot,
tr.g5-highlight {
    background: var(--g5-mint-dim);
}

@media (max-width: 1024px) {
    .g5-hero-split { grid-template-columns: 1fr; }
    .g5-hero-aside {
        border-left: none;
        border-top: 1px solid var(--g5-border);
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .g5-bento-span-8, .g5-bento-span-4, .g5-bento-span-6 { grid-column: span 12; }
    .g5-account-layout { grid-template-columns: 1fr; }
    .g5-admin-layout { grid-template-columns: 1fr; }
    .g5-admin-sidebar { position: static; }
    .g5-account-sidebar { position: static; }
    .g5-account-nav { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .g5-hero-main { padding: 32px 24px; }
    .g5-score-final { flex-direction: column; gap: 16px; }
    .g5-round-row { grid-template-columns: 40px 1fr; }
    .g5-round-score { grid-column: 2; text-align: left; margin-top: -8px; }
    .g5-round-details-summary {
        grid-template-columns: 1fr auto;
        gap: 10px;
    }
    .g5-round-bar-inline { grid-column: 1 / -1; }
}

.g5-shop-steps {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.g5-shop-step {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--g5-border);
    color: var(--g5-muted);
    font-size: 0.9rem;
}
.g5-shop-step.g5-active {
    border-color: var(--g5-accent);
    color: var(--g5-text);
    background: var(--g5-accent-dim);
}
.g5-shop-step.g5-done {
    border-color: var(--g5-mint);
    color: var(--g5-mint);
}
.g5-summary-box {
    display: grid;
    gap: 12px;
    margin: 24px 0;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--g5-border);
}
.g5-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.g5-summary-total strong {
    font-size: 1.25rem;
    color: var(--g5-accent);
}
.g5-summary-discount strong {
    color: #34d399;
}
.g5-text-success {
    color: #34d399;
}
.g5-hint {
    margin-top: -8px;
    margin-bottom: 16px;
    font-size: 0.85rem;
}
.g5-select-wrap {
    position: relative;
    margin-top: 8px;
}
.g5-select-wrap select,
.g5-select-wrap .g5-select,
.g5-select-wrap input {
    margin-top: 0;
}
.g5-select-wrap::after {
    display: none;
}
.g5-select,
.g5-input.g5-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 13px 42px 13px 16px;
    border-radius: var(--g5-radius-sm);
    border: 1px solid var(--g5-border-accent);
    background-color: var(--g5-surface-solid);
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.03), transparent),
        url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%233dffb5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: center, right 14px center;
    color: var(--g5-text);
    font-family: inherit;
    font-size: 0.95rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color var(--g5-transition), box-shadow var(--g5-transition);
    cursor: pointer;
}
.g5-select:focus,
.g5-input.g5-select:focus {
    outline: none;
    border-color: var(--g5-accent);
    box-shadow: 0 0 0 3px var(--g5-accent-dim);
}
.g5-select option {
    background: var(--g5-bg-elevated);
    color: var(--g5-text);
}
.g5-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.g5-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.g5-chart-card--full {
    grid-column: 1 / -1;
}
.g5-chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.g5-chart-canvas-wrap {
    position: relative;
    width: 100%;
    min-height: 280px;
    height: 320px;
    border: 2px solid var(--border-bright);
    border-radius: var(--radius-md);
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: var(--shadow-pixel-sm);
}
.g5-chart-canvas-wrap--sm {
    min-height: 220px;
    height: 240px;
    border: 2px solid var(--border-bright);
    border-radius: var(--radius-md);
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    box-shadow: var(--shadow-pixel-sm);
}
.g5-chart-card--full canvas {
    width: 100% !important;
    max-height: none;
}
.g5-metric-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.g5-metric-tab {
    border: 1px solid var(--g5-border);
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    color: var(--g5-text-secondary);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease, box-shadow .2s ease;
}
.g5-metric-tab:hover {
    color: var(--g5-text);
    border-color: rgba(56, 189, 248, 0.45);
}
.g5-metric-tab.g5-active {
    color: #e0f2fe;
    border-color: rgba(56, 189, 248, 0.8);
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0.08));
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15);
}
.g5-chart-card canvas {
    max-height: 220px;
}
.g5-table-wrap {
    overflow-x: auto;
    margin-top: 12px;
}
.g5-table {
    width: 100%;
    border-collapse: collapse;
}
.g5-table th, .g5-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--g5-border);
    text-align: left;
}
.g5-form-label {
    display: block;
    margin-bottom: 16px;
}
.g5-input {
    width: 100%;
    margin-top: 6px;
    padding: 13px 16px;
    border-radius: var(--g5-radius-sm);
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
    color: var(--g5-text);
    font-family: inherit;
    font-size: 0.95rem;
}

.g5-trust-icon svg {
    width: 18px;
    height: 18px;
    color: var(--g5-accent);
}

@media (max-width: 640px) {
    .g5-table--responsive thead { display: none; }
    .g5-table--responsive tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--g5-border);
        border-radius: var(--g5-radius-xs);
        padding: 8px 12px;
    }
    .g5-table--responsive td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        border: none;
        padding: 6px 0;
    }
    .g5-table--responsive td::before {
        content: attr(data-label);
        color: var(--g5-muted);
        font-size: 0.8rem;
    }
}

/* ── Shared view utilities ── */
.g5-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--g5-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 12px;
    transition: color var(--g5-transition);
}
.g5-back-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.g5-back-link:hover { color: var(--g5-accent); }

.g5-back-link + .g5-title,
.g5-title--after-back { margin-top: 12px; }

.g5-card--narrow {
    max-width: 560px;
    margin: 48px auto;
}

.g5-form-actions--center {
    justify-content: center;
    margin-top: 24px;
}

.g5-tile-icon--center {
    margin: 0 auto 20px;
}

.g5-summary-box--spaced { margin: 20px 0; }

.g5-text-pre {
    white-space: pre-wrap;
    margin-bottom: 24px;
    line-height: 1.6;
}

.g5-section-spaced { margin-top: 32px; }

.g5-inline-form--spaced { margin-bottom: 24px; }

.g5-filter-form {
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.g5-table-section { margin-top: 32px; }

.g5-coupon-type {
    margin: 8px 0 0;
}

.g5-mt-sm { margin-top: 16px; }

.g5-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
}
.g5-status-badge--success {
    background: var(--g5-mint-dim);
    color: var(--g5-accent);
    border-color: var(--g5-border-accent);
}
.g5-status-badge--pending {
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.35);
}
.g5-status-badge--error {
    background: var(--g5-coral-dim);
    color: #ffb4b4;
    border-color: rgba(255, 107, 107, 0.35);
}
.g5-status-badge--muted {
    background: rgba(148, 163, 184, 0.12);
    color: var(--g5-muted);
    border-color: var(--g5-border);
}

.g5-empty-state-box {
    padding: 28px 24px;
    text-align: center;
    border: 1px dashed var(--g5-border);
    border-radius: var(--g5-radius-sm);
    background: rgba(0, 0, 0, 0.15);
}

.g5-match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.g5-stats-source {
    margin: 16px 0 8px;
    font-size: 0.86rem;
    color: var(--g5-muted);
}

.g5-stat-val--text {
    font-size: 0.95rem;
    line-height: 1.35;
}

.g5-select-wrap--inline {
    display: inline-flex;
    min-width: 160px;
}
.g5-select-wrap--inline .g5-select {
    min-width: 160px;
}

.g5-podium-name,
.g5-player-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.g5-section-heading {
    margin-bottom: 8px;
}

.g5-section-hint {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--g5-muted);
}

.g5-legal-body h2 {
    font-family: var(--g5-display);
    font-size: 1rem;
    margin: 28px 0 10px;
    color: var(--g5-text);
}
.g5-legal-body h2:first-child { margin-top: 0; }
.g5-legal-body p,
.g5-legal-body li {
    color: var(--g5-text-secondary);
    line-height: 1.65;
    margin-bottom: 12px;
}
.g5-legal-body a { color: var(--g5-accent); }

.g5-status-indicator {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--g5-radius-sm);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--g5-border);
    font-size: 0.9rem;
    color: var(--g5-text-secondary);
}
.g5-status-indicator--success {
    background: var(--g5-mint-dim);
    border-color: var(--g5-border-accent);
    color: var(--g5-accent);
}
.g5-status-indicator--error {
    background: var(--g5-coral-dim);
    border-color: rgba(255, 107, 107, 0.35);
    color: #ffb4b4;
}

.g5-auth-steps ol {
    text-align: left;
    margin-top: 12px;
}

.g5-tournament-page .g5-tournament-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--g5-mint-dim);
    border: 1px solid var(--g5-border-accent);
    color: var(--g5-accent);
}
.g5-tournament-page .g5-tournament-icon svg {
    width: 36px;
    height: 36px;
}

.g5-round-expand-icon svg {
    width: 14px;
    height: 14px;
    display: block;
}
.g5-round-expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.g5-maintenance-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--g5-sky);
}
.g5-maintenance-icon svg {
    width: 40px;
    height: 40px;
}

.g5-profile-head {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.g5-profile-head-main { flex: 1; }
.g5-profile-head .g5-title { margin-bottom: 8px; }

.g5-btn--block { width: 100%; }

.g5-report-card { margin-top: 24px; }

.g5-shop-price-note { font-size: 0.85rem; }

.g5-admin-form-note {
    display: block;
    margin-bottom: 8px;
}

.g5-checkbox-block {
    margin-top: 12px;
}

.g5-checkbox-inline.g5-checkbox-block {
    display: inline-flex;
}

.g5-checkbox-group-spaced { margin-top: 12px; }

.g5-form--zero-margin { margin: 0; }

.g5-muted-note {
    margin: 0;
    font-size: 0.82rem;
}
