/**
 * IsmetCup — Stylesheet
 * Modern, sporty, clean design
 */

/* ============================================
   CSS Variables / Design Tokens
   ============================================ */
:root {
    /* Colors */
    --green-900: #0d3320;
    --green-800: #14532d;
    --green-700: #166534;
    --green-600: #16a34a;
    --green-500: #22c55e;
    --green-400: #4ade80;
    --green-300: #86efac;
    --green-200: #bbf7d0;
    --green-100: #dcfce7;
    --green-50:  #f0fdf4;
    
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50:  #f9fafb;
    
    --white: #ffffff;
    --black: #000000;
    
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --info: #3b82f6;
    --warning: #f59e0b;
    --success: #22c55e;
    
    /* Primary */
    --primary: var(--green-700);
    --primary-light: var(--green-600);
    --primary-dark: var(--green-800);
    --primary-bg: var(--green-50);
    
    /* Layout */
    --sidebar-width: 260px;
    --topbar-height: 60px;
    --border-radius: 10px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
    
    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

input, select, textarea, button {
    font-family: var(--font);
    font-size: 0.933rem;
}

/* ============================================
   App Layout
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   Mobile Top Bar
   ============================================ */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--green-900);
    z-index: 100;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    box-shadow: var(--shadow-md);
}

.mobile-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
}

.mobile-user {
    color: var(--green-300);
    font-size: 0.8rem;
    font-weight: 500;
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle--active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle--active span:nth-child(2) { opacity: 0; }
.menu-toggle--active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   Sidebar Overlay (mobile)
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay--show {
    display: block;
    opacity: 1;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--green-900) 0%, var(--green-800) 60%, var(--green-700) 100%);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    transition: var(--transition-slow);
}

.sidebar-header {
    padding: 1.8rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--white);
    font-size: 1.4rem;
}

.logo-icon {
    font-size: 1.6rem;
}

.logo-icon-lg {
    font-size: 2.5rem;
}

.logo-text {
    font-weight: 400;
    letter-spacing: -0.5px;
}

.logo-text strong {
    font-weight: 800;
}

.sidebar-tagline {
    color: var(--green-400);
    font-size: 0.73rem;
    margin-top: 0.4rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255,255,255,0.08);
}

.nav-link.active {
    color: var(--white);
    background: rgba(255,255,255,0.12);
    border-left-color: var(--green-400);
}

.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--green-500);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
}

.user-role {
    color: var(--green-400);
    font-size: 0.7rem;
}

.logout-btn {
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 0.3rem;
}

.logout-btn:hover {
    color: var(--danger);
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.8rem;
}

.page-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.page-header-right {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.page-subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.87rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-form {
    max-width: 720px;
}

/* ============================================
   Stats Grid (Dashboard)
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card--success { border-left-color: var(--success); }
.stat-card--warning { border-left-color: var(--warning); }

.stat-icon {
    font-size: 1.6rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h2, .empty-state h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.empty-state--small {
    padding: 2rem 1rem;
}

.empty-state--small .empty-state-icon {
    font-size: 2.5rem;
}

/* ============================================
   Dashboard Grid
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.dashboard-grid .card:first-child {
    grid-column: 1 / -1;
}

/* ============================================
   Competition List (Dashboard)
   ============================================ */
.competition-list {
    display: flex;
    flex-direction: column;
}

.competition-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
    gap: 0.5rem;
}

.competition-item:last-child {
    border-bottom: none;
}

.competition-item:hover {
    background: var(--gray-50);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: var(--border-radius-sm);
}

.competition-item-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.competition-item-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.competition-item-name {
    font-weight: 600;
    color: var(--gray-800);
}

/* ============================================
   Competition Cards (List page)
   ============================================ */
.competitions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.2rem;
}

.competition-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary);
}

.competition-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.competition-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.competition-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
}

.competition-card-season {
    color: var(--gray-500);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.competition-card-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}

.competition-card-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-num {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-lbl {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 600;
}

.competition-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   Badges
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    white-space: nowrap;
}

.badge-primary {
    background: var(--green-100);
    color: var(--green-800);
}

.badge-accent {
    background: #fef3c7;
    color: #92400e;
}

.badge-success {
    background: var(--green-100);
    color: var(--green-700);
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-default {
    background: var(--gray-100);
    color: var(--gray-600);
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================
   Match Items
   ============================================ */
.match-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.match-item {
    padding: 0.8rem;
    border-radius: var(--border-radius-sm);
    background: var(--gray-50);
    transition: var(--transition);
}

.match-item:hover {
    background: var(--gray-100);
}

.match-comp {
    font-size: 0.72rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.3rem;
}

.match-score-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.match-team {
    font-weight: 600;
    font-size: 0.87rem;
    flex: 1;
}

.match-team--home {
    text-align: right;
}

.match-team--away {
    text-align: left;
}

.match-score {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    min-width: 60px;
    text-align: center;
}

.match-score--scheduled {
    color: var(--gray-400);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    white-space: nowrap;
}

.tab:hover {
    color: var(--gray-700);
}

.tab--active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ============================================
   Overview Grid
   ============================================ */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* ============================================
   Info List
   ============================================ */
.info-list {
    display: flex;
    flex-direction: column;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.9rem;
}

/* ============================================
   Participant Grid
   ============================================ */
.participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.participant-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.participant-card:hover {
    background: var(--gray-100);
    box-shadow: var(--shadow-sm);
}

.participant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-500), var(--green-700));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.participant-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.participant-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.participant-seed {
    font-size: 0.72rem;
    color: var(--gray-500);
}

.participant-actions {
    display: flex;
    gap: 0.3rem;
}

.participant-select-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.participant-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

.participant-checkbox:hover {
    background: var(--green-50);
}

.participant-checkbox input:checked + span {
    color: var(--primary);
    font-weight: 600;
}

/* ============================================
   Fixtures
   ============================================ */
.fixture-round {
    margin-bottom: 1.5rem;
}

.fixture-round-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--green-200);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fixture-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    background: var(--gray-50);
    margin-bottom: 0.5rem;
    transition: var(--transition);
    gap: 0.75rem;
}

.fixture-item:hover {
    background: var(--gray-100);
}

.fixture-item--finished {
    border-left: 3px solid var(--success);
}

.fixture-teams {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.fixture-team {
    font-weight: 600;
    font-size: 0.87rem;
    flex: 1;
}

.fixture-team--home { text-align: right; }
.fixture-team--away { text-align: left; }
.fixture-team.winner { color: var(--primary); }

.fixture-score {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--gray-900);
    min-width: 80px;
    text-align: center;
    padding: 0.2rem 0.5rem;
    background: var(--white);
    border-radius: var(--border-radius-sm);
}

.fixture-score--scheduled {
    color: var(--gray-400);
    font-weight: 600;
    font-size: 0.85rem;
    background: transparent;
}

.fixture-score--final {
    color: var(--primary);
}

.penalty-score {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 500;
}

.fixture-actions {
    flex-shrink: 0;
}

.result-item {
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-sm);
    background: var(--gray-50);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--success);
}

.result-round {
    font-size: 0.72rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.result-notes {
    font-size: 0.78rem;
    color: var(--gray-500);
    margin-top: 0.3rem;
    font-style: italic;
}

/* ============================================
   Standings Table
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
}

.standings-table th {
    background: var(--gray-50);
    padding: 0.7rem 0.8rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}

.standings-table td {
    padding: 0.7rem 0.8rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
}

.standings-table .col-pos { width: 40px; }
.standings-table .col-name { text-align: left; min-width: 120px; }
.standings-table .col-pts { 
    font-size: 1rem;
    color: var(--primary);
}

.standings-table th.col-name { text-align: left; }

.standings-table tr:hover {
    background: var(--gray-50);
}

.leader-row {
    background: var(--green-50) !important;
}

.leader-row td {
    border-bottom-color: var(--green-200);
}

.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.78rem;
    color: var(--white);
}

.pos-badge--gold { background: linear-gradient(135deg, #fbbf24, #d97706); }
.pos-badge--silver { background: linear-gradient(135deg, #9ca3af, #6b7280); }
.pos-badge--bronze { background: linear-gradient(135deg, #d97706, #92400e); }

.standings-table--compact {
    font-size: 0.82rem;
}

.standings-table--compact th,
.standings-table--compact td {
    padding: 0.5rem 0.6rem;
}

/* ============================================
   Cup Bracket
   ============================================ */
.bracket-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 200px;
    justify-content: center;
}

.bracket-round-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    text-align: center;
    padding: 0.4rem 0;
    border-bottom: 2px solid var(--green-200);
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.bracket-match {
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.bracket-match:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow);
}

.bracket-match--finished {
    border-color: var(--green-300);
}

.bracket-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--gray-200);
}

.bracket-team:last-of-type {
    border-bottom: none;
}

.bracket-team--winner {
    background: var(--green-50);
    font-weight: 700;
    color: var(--primary);
}

.bracket-team-name {
    font-weight: 500;
    flex: 1;
}

.bracket-team-score {
    font-weight: 700;
    min-width: 25px;
    text-align: right;
}

.bracket-team-score small {
    font-size: 0.7rem;
    color: var(--gray-500);
    font-weight: 500;
}

.bracket-match-action {
    padding: 0.3rem 0.5rem;
    background: var(--white);
    text-align: center;
}

/* Champion Banner */
.champion-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--green-700), var(--green-900));
    border-radius: var(--border-radius-lg);
    color: var(--white);
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.champion-icon {
    font-size: 3rem;
}

.champion-text h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--green-300);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.champion-name {
    font-size: 1.8rem;
    font-weight: 900;
    margin-top: 0.25rem;
}

/* ============================================
   Stats Detail Grid
   ============================================ */
.stats-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.stat-detail-card {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 1.2rem;
    text-align: center;
    transition: var(--transition);
}

.stat-detail-card:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.stat-detail-card--highlight {
    background: linear-gradient(135deg, var(--green-50), var(--green-100));
    border: 1px solid var(--green-200);
}

.stat-detail-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-detail-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    display: block;
}

.stat-detail-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
    display: block;
    margin-top: 0.3rem;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

.form-group small {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-group--wide {
    min-width: 100% !important;
}

.form-section {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
}

.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-800);
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

.input-group input {
    flex: 1;
}

.required {
    color: var(--danger);
}

/* ============================================
   Score Input (Modal)
   ============================================ */
.score-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.score-input-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.score-team-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-800);
    text-align: center;
}

.score-input {
    width: 80px;
    height: 60px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    color: var(--gray-900);
    transition: var(--transition);
}

.score-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

.score-input--penalty {
    width: 60px;
    height: 50px;
    font-size: 1.3rem;
    border-color: var(--accent);
}

.score-vs {
    font-weight: 700;
    color: var(--gray-400);
    font-size: 1.2rem;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 1rem;
}

.modal-overlay--show {
    opacity: 1;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay--show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.3rem;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.87rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.alert strong {
    font-weight: 700;
}

.alert a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid var(--danger);
}

.alert-success {
    background: var(--green-100);
    color: var(--green-800);
    border-left: 3px solid var(--success);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 3px solid var(--info);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 3px solid var(--warning);
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    font-size: 0.87rem;
    max-width: 360px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border-left: 4px solid var(--success);
}

.toast--show {
    transform: translateX(0);
}

.toast--error {
    border-left-color: var(--danger);
}

.toast--warning {
    border-left-color: var(--warning);
}

.toast--info {
    border-left-color: var(--info);
}

.toast-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
}

.toast-close:hover {
    color: var(--gray-700);
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    background: linear-gradient(135deg, var(--green-900) 0%, var(--green-800) 40%, var(--green-700) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--gray-900);
}

.login-logo h1 strong {
    font-weight: 900;
}

.login-tagline {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 500;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.login-footer p {
    color: var(--gray-400);
    font-size: 0.78rem;
}

.divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0 1rem;
    color: var(--gray-400);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-200);
}

.divider-text span {
    padding: 0 0.75rem;
}

.btn-guest {
    border-color: var(--gray-300);
    color: var(--gray-700);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--gray-50);
    transition: var(--transition);
}

.btn-guest:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.guest-notice-bar {
    background: #fef3c7;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}

.guest-notice-bar a {
    color: #b45309;
    font-weight: 700;
    text-decoration: underline;
}

/* ============================================
   Text Utilities
   ============================================ */
.text-muted { color: var(--gray-500); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-primary { color: var(--primary); }

hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 1rem 0;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.stats-grid,
.dashboard-grid,
.competitions-grid,
.card,
.empty-state {
    animation: fadeInUp 0.4s ease;
}

.stat-card {
    animation: fadeInUp 0.4s ease;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }
.stat-card:nth-child(5) { animation-delay: 0.25s; }
.stat-card:nth-child(6) { animation-delay: 0.3s; }
.stat-card:nth-child(7) { animation-delay: 0.35s; }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-topbar {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar--open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: calc(var(--topbar-height) + 1rem);
    }
    
    .page-header {
        flex-direction: column;
    }
    
    .page-title {
        font-size: 1.3rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.9rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .competitions-grid {
        grid-template-columns: 1fr;
    }
    
    .participant-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        gap: 0;
    }
    
    .tab {
        padding: 0.6rem 0.8rem;
        font-size: 0.78rem;
    }
    
    .fixture-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .fixture-teams {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .fixture-team--home,
    .fixture-team--away {
        text-align: center;
    }
    
    .match-score-row {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .match-team--home,
    .match-team--away {
        text-align: center;
    }
    
    .bracket-container {
        gap: 1rem;
    }
    
    .bracket-round {
        min-width: 170px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        min-width: 100%;
    }
    
    .modal {
        max-width: 100%;
        margin: 0.5rem;
    }
    
    .score-input {
        width: 65px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .stats-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-title {
        font-size: 1.1rem;
    }
    
    .stats-detail-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .sidebar, .mobile-topbar, .sidebar-overlay,
    .btn, .fixture-actions, .participant-actions,
    .toast-container, .modal-overlay,
    .page-header-right, .card-actions {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
