/**
 * ValueBet ELITE — Tracking Dashboard Styles
 */

/* ====== HERO COMPACT ====== */
.hero-compact {
    padding: 3rem 0 2.5rem;
    min-height: auto;
}
.hero-compact .hero-title { font-size: 2.5rem; margin-bottom: 0.5rem; }
.hero-compact .hero-subtitle { font-size: 1rem; }

/* Fix: override negative margin from main styles.css */
.hero-compact + .stats-section {
    margin-top: 0 !important;
    padding-top: 2rem;
    position: relative;
    z-index: 1;
}
/* Also ensure hero actions stay above */
.hero-actions {
    position: relative;
    z-index: 2;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-lg { padding: 0.8rem 1.6rem; font-size: 1rem; }
.btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 4px 15px rgba(34,197,94,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(34,197,94,0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.15);
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ====== STATS GRID 6 ====== */
.stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

/* Override stat-card for tracking compact layout */
.stats-grid-6 .stat-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem 0.6rem;
    gap: 0.6rem;
}
.stats-grid-6 .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stats-grid-6 .stat-icon svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.stats-grid-6 .stat-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}
.stats-grid-6 .stat-value {
    font-size: 1.5rem;
    line-height: 1.1;
}
.stats-grid-6 .stat-label {
    font-size: 0.65rem;
    white-space: nowrap;
    letter-spacing: 0.08em;
}

@media (max-width: 1024px) {
    .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .stats-grid-6 { grid-template-columns: repeat(2, 1fr); }
}

/* ====== VALUE COLORS ====== */
.val-positive { color: #22c55e !important; }
.val-negative { color: #ef4444 !important; }

/* ====== SECTIONS ====== */
.section { padding: 3rem 0; }
.section-dark { background: rgba(0,0,0,0.2); }
.section-header { text-align: center; margin-bottom: 2rem; }
.section-title { font-size: 1.6rem; font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.section-subtitle { font-size: 0.95rem; color: rgba(255,255,255,0.5); }

/* ====== COMPARE GRID ====== */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
@media (max-width: 700px) {
    .compare-grid { grid-template-columns: 1fr; }
}
.compare-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}
.compare-card:hover { border-color: rgba(255,255,255,0.15); }
.compare-header {
    padding: 0.8rem 1.2rem;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
}
.compare-header.positive { background: rgba(34,197,94,0.15); color: #22c55e; }
.compare-header.negative { background: rgba(239,68,68,0.15); color: #ef4444; }
.compare-body { padding: 1rem 1.2rem; }
.compare-stats { display: flex; flex-direction: column; gap: 0.6rem; }
.compare-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.compare-row:last-child { border-bottom: none; }
.compare-label { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.compare-val { font-weight: 600; font-size: 0.95rem; color: #fff; font-family: 'JetBrains Mono', monospace; }
.compare-empty { text-align: center; padding: 1.5rem; color: rgba(255,255,255,0.3); }

/* ====== BREAKDOWN GRID ====== */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}
.breakdown-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.3s;
}
.breakdown-card:hover { border-color: rgba(255,255,255,0.15); transform: translateY(-2px); }
.breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.breakdown-title { font-weight: 600; font-size: 0.9rem; color: #fff; }
.breakdown-count { font-size: 0.75rem; color: rgba(255,255,255,0.4); font-family: 'JetBrains Mono', monospace; }
.breakdown-body { padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.breakdown-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.breakdown-label { font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.breakdown-val { font-size: 0.85rem; font-weight: 600; font-family: 'JetBrains Mono', monospace; color: #fff; }

/* ====== CHART ====== */
.chart-container {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    overflow-x: auto;
}
.profit-svg { width: 100%; height: auto; }
.chart-label { font-size: 11px; fill: rgba(255,255,255,0.35); font-family: 'JetBrains Mono', monospace; }
.chart-grid { stroke: rgba(255,255,255,0.05); stroke-width: 1; }
.chart-zero { stroke: rgba(255,255,255,0.2); stroke-width: 1; stroke-dasharray: 5,5; }
.chart-final { font-size: 14px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.chart-positive { fill: #22c55e; }
.chart-negative { fill: #ef4444; }

/* ====== DATA TABLE ====== */
.table-wrapper {
    overflow-x: auto;
    max-width: 1200px;
    margin: 0 auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,0.03);
    border-radius: 14px;
    overflow: hidden;
}
.data-table thead th {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.8rem 1rem;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.data-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
}
.data-table tbody tr:hover { background: rgba(255,255,255,0.04); }
.data-table td {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}
.text-center { text-align: center; }
.team-cell { font-weight: 500; }
.empty-cell { text-align: center; padding: 2rem !important; }
.empty-state-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.9rem;
    padding: 1.5rem;
}

/* ====== RESULT BADGES ====== */
.result-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.badge-win { background: rgba(34,197,94,0.15); color: #22c55e; }
.badge-loss { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-push { background: rgba(250,204,21,0.15); color: #facc15; }
.badge-halfwin { background: rgba(34,197,94,0.1); color: #86efac; }
.badge-halfloss { background: rgba(239,68,68,0.1); color: #fca5a5; }
.badge-void { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); }

/* ====== MANUAL RESOLVE ====== */
.manual-resolve {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.goles-input {
    width: 38px;
    padding: 0.3rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}
.goles-input:focus { border-color: rgba(34,197,94,0.5); }
.goles-input::placeholder { color: rgba(255,255,255,0.2); }
.goles-sep { color: rgba(255,255,255,0.3); font-weight: 600; }
.btn-resolve-mini {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.btn-resolve-mini:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(34,197,94,0.4); }

/* ====== TOAST ====== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    max-width: 420px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.toast-show { transform: translateX(0); opacity: 1; }
.toast-success { background: rgba(34,197,94,0.9); }
.toast-error { background: rgba(239,68,68,0.9); }
.toast-warning { background: rgba(250,204,21,0.85); color: #000; }
.toast-info { background: rgba(59,130,246,0.9); }

/* ====== LOADING OVERLAY ====== */
.loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}
.loading-overlay.active { display: flex; }
.loading-content { text-align: center; }
.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
}
.spinner-ring {
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}
.spinner-ring:nth-child(2) { inset: 6px; border-top-color: #3b82f6; animation-duration: 1.8s; }
.spinner-ring:nth-child(3) { inset: 12px; border-top-color: #a855f7; animation-duration: 2.4s; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: rgba(255,255,255,0.7); font-size: 0.95rem; }

/* ====== CLV DASHBOARD ====== */
.clv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}
@media (max-width: 700px) {
    .clv-grid { grid-template-columns: 1fr; }
}
.clv-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s;
}
.clv-card:hover { border-color: rgba(255,255,255,0.15); }
.clv-main { text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.clv-big-number {
    font-size: 2.8rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}
.clv-big-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.8rem;
}
.clv-desc {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.4;
}
.clv-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.clv-stat-row:last-child { border-bottom: none; }
.clv-label { font-size: 0.85rem; color: rgba(255,255,255,0.5); }
.clv-val { font-weight: 600; font-family: 'JetBrains Mono', monospace; color: #fff; }

/* ====== NAV ====== */
.brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}
.brand-link:hover .brand-name { opacity: 0.8; }
.nav-links { display: flex; gap: 1rem; align-items: center; }
.nav-link {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-link:hover { color: #fff; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .hero-compact .hero-title { font-size: 1.8rem; }
    .section-title { font-size: 1.3rem; }
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 0.5rem 0.6rem; }
    .breakdown-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .breakdown-grid { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: center; }
}
