/* ============================================================
   index.css — dashboard / home page styles
   ============================================================ */

/* ── Hero ── */
.dash-hero {
    background: linear-gradient(135deg, var(--cricket-dark) 0%, #283593 100%);
    color: white;
    border-radius: 15px;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    flex-wrap: wrap;
}

.dash-hero-left { display: flex; align-items: center; gap: 18px; }
.dash-hero-logo img { height: 56px; width: auto; display: block; }

.dash-hero-text h1 {
    font-size: 1.7em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 4px 0;
    line-height: 1.1;
}

.dash-hero-text p {
    opacity: 0.85;
    font-size: 0.95em;
    margin: 0;
}

.dash-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-white { background: white; color: var(--cricket-dark); }
.btn-white:hover { background: #f0f0f0; transform: translateY(-1px); }
.btn-yellow { background: var(--png-yellow); color: #111; }
.btn-yellow:hover { background: #e6bc00; transform: translateY(-1px); }

/* ── Stat bar ── */
.stat-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-tile {
    background: white;
    border-radius: 12px;
    padding: 16px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    text-align: center;
    border-top: 4px solid var(--cricket-blue);
    transition: transform 0.2s;
}

.stat-tile:hover { transform: translateY(-2px); }
.stat-tile.green  { border-top-color: var(--cricket-green); }
.stat-tile.red    { border-top-color: var(--png-red); }
.stat-tile.yellow { border-top-color: var(--png-yellow); }

.stat-tile .val {
    font-size: 2em;
    font-weight: 900;
    line-height: 1;
    color: #111;
}

.stat-tile .lbl {
    margin-top: 4px;
    font-size: 0.72em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #777;
    font-weight: 700;
}

/* ── Section cards ── */
.section-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header {
    padding: 14px 20px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-header h2 {
    margin: 0;
    font-size: 1em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--png-red);
}

.section-header a {
    font-size: 0.82em;
    color: var(--cricket-blue);
    text-decoration: none;
    font-weight: 700;
}

.section-header a:hover { text-decoration: underline; }
.section-body { padding: 16px 20px; }
.section-body--about { color: #555; font-size: 0.92em; line-height: 1.7; }

/* ── Live match cards grid ── */
.live-body-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 400px));
    gap: 14px;
}

.live-card {
    border: 2px solid var(--cricket-green);
    border-radius: 10px;
    padding: 14px 16px;
    background: #f9fff9;
    position: relative;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.live-card:hover { box-shadow: 0 4px 14px rgba(46,125,50,0.15); }

.live-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.live-pulse {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--cricket-green);
    color: white;
    font-size: 0.7em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

.live-dot {
    width: 7px;
    height: 7px;
    background: white;
    border-radius: 50%;
    animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

.live-matchup {
    font-weight: 900;
    font-size: 1.05em;
    color: #111;
}

.live-comp { font-size: 0.78em; color: #888; }

/* Score rows */
.live-scores {
    border-top: 1px solid #d4edda;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.live-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88em;
}

.live-score-team {
    color: #555;
    font-weight: 600;
}

.live-score-val {
    font-weight: 900;
    color: var(--cricket-green);
    font-size: 1.05em;
    font-variant-numeric: tabular-nums;
}

.live-score-pending {
    color: #aaa;
    font-style: italic;
    font-size: 0.85em;
}

.live-actions { margin-top: auto; }

.btn--live {
    font-size: 0.85em;
    padding: 8px 16px;
    width: 100%;
    text-align: center;
    display: block;
}

/* ── Result card ── */
.result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
    flex-wrap: wrap;
}

.result-card:last-child { border-bottom: none; }
.result-matchup { font-weight: 700; color: #111; font-size: 0.95em; }

.result-winner {
    font-size: 0.82em;
    font-weight: 800;
    color: var(--cricket-green);
    margin-top: 3px;
}

.result-winner.tied { color: var(--cricket-blue); }

.result-link {
    font-size: 0.82em;
    color: var(--cricket-blue);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.result-link:hover { text-decoration: underline; }

/* ── Empty / loading ── */
.dash-empty {
    text-align: center;
    padding: 24px 16px;
    color: #aaa;
    font-size: 0.9em;
}

.dash-empty-link {
    color: var(--cricket-blue);
    font-weight: 700;
}

/* ── Competition card ── */
.comp-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
    flex-wrap: wrap;
}

.comp-card:last-child { border-bottom: none; }
.comp-name { font-weight: 700; color: #111; font-size: 0.95em; }
.comp-meta { font-size: 0.82em; color: #888; margin-top: 2px; }

.comp-link {
    color: inherit;
    text-decoration: none;
}
.comp-link:hover { color: var(--cricket-blue); }

.comp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.comp-badge.upcoming    { background: #FFF3E0; color: #E65100; }
.comp-badge.in-progress { background: #E8F5E9; color: var(--cricket-green); }
.comp-badge.completed   { background: #E3F2FD; color: var(--cricket-blue); }

/* ── Two-column layout ── */
.dash-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── Quick actions ── */
.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Staggered fade-in ── */
.fade-in {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeUp 0.4s ease forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.10s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.20s; }
.fade-in:nth-child(5) { animation-delay: 0.25s; }

/* ── Responsive ── */
@media (max-width: 760px) {
    .dash-cols { grid-template-columns: 1fr; }
    .dash-hero { padding: 20px; flex-direction: column; align-items: flex-start; }
    .dash-hero-text h1 { font-size: 1.3em; }
    .dash-hero-actions { width: 100%; }
    .dash-hero-actions .btn { flex: 1; text-align: center; }
}
.section-card--hidden { display: none; }

/* Role-based visibility — added for CSP compliance */
.role-hidden { display: none !important; }

/* ── Quick action buttons — compact size ── */
.quick-actions .btn {
    padding: 9px 18px;
    font-size: 0.85em;
}
