/* =============================================================
   Halı Saha Sistemi – Premium Design System v4.0
   Tema: Dark sidebar, Glassmorphism, Premium Green
   ============================================================= */

/* ---------- GOOGLE FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;600;700;800;900&display=swap');

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- DESIGN TOKENS ---------- */
:root {
    /* Brand greens */
    --hs-green-dark:   #052e10;
    --hs-green:        #16a34a;
    --hs-green-mid:    #22c55e;
    --hs-green-light:  #4ade80;
    --hs-green-pale:   #f0fdf4;
    --hs-accent:       #00e676;
    --hs-accent-glow:  rgba(0, 230, 118, 0.35);

    /* Team colours */
    --team-a:          #2563eb;
    --team-a-bg:       #eff6ff;
    --team-a-border:   #bfdbfe;
    --team-b:          #dc2626;
    --team-b-bg:       #fef2f2;
    --team-b-border:   #fecaca;

    /* Surfaces */
    --bg:              #f8fafc;
    --surface:         #ffffff;
    --surface-2:       #f1f5f9;
    --border:          #e2e8f0;
    --border-strong:   #cbd5e1;
    --text:            #0f172a;
    --text-2:          #475569;
    --text-3:          #94a3b8;
    --shadow-sm:       0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:          0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    --shadow-lg:       0 20px 48px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.06);
    --shadow-green:    0 8px 24px rgba(22,163,74,0.25);

    /* Sidebar */
    --sidebar-w:       240px;
    --sidebar-bg:      #0a1628;
    --sidebar-border:  rgba(255,255,255,0.06);
    --sidebar-text:    rgba(255,255,255,0.65);
    --sidebar-active:  rgba(0,230,118,0.12);

    /* Navbar (top, mobile) */
    --nav-h:           60px;

    /* Typography */
    --font-main:  'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', sans-serif;

    /* Radius */
    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  20px;
    --r-2xl: 24px;

    /* Status colours */
    --status-draft:       #f59e0b;
    --status-voting:      #3b82f6;
    --status-finalized:   #8b5cf6;
    --status-played:      #10b981;
    --status-attendance:  #06b6d4;
}

/* ---------- BASE ---------- */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

/* ---------- LAYOUT: SIDEBAR + MAIN ---------- */
.hs-layout {
    display: flex;
    min-height: 100vh;
}

/* =========================================================
   SIDEBAR NAVIGATION
   ========================================================= */
.hs-sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    overflow-x: hidden;
}
.hs-sidebar::-webkit-scrollbar { width: 4px; }
.hs-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Sidebar brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    text-decoration: none;
    flex-shrink: 0;
}
.sidebar-brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--hs-green-mid), var(--hs-accent));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,230,118,0.3);
}
.sidebar-brand-text { flex: 1; min-width: 0; }
.sidebar-brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.1;
    white-space: nowrap;
}
.sidebar-brand-sub {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Sidebar nav section */
.sidebar-section {
    padding: 10px 12px 4px;
}
.sidebar-section-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.28);
    padding: 0 8px;
    margin-bottom: 4px;
}
.sidebar-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--r-sm);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.18s;
    position: relative;
}
.sidebar-nav a:hover {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}
.sidebar-nav a.active {
    background: var(--sidebar-active);
    color: var(--hs-accent);
    font-weight: 600;
}
.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 18px;
    background: var(--hs-accent);
    border-radius: 0 3px 3px 0;
}
.sidebar-nav a i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.sidebar-nav .nav-badge {
    margin-left: auto;
    background: var(--hs-green);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
}
.sidebar-nav .nav-badge.pulse {
    animation: pulseBadge 2s infinite;
}
@keyframes pulseBadge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.4); }
    50% { box-shadow: 0 0 0 5px rgba(22,163,74,0); }
}

/* Sidebar footer / user */
.sidebar-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background 0.18s;
    text-decoration: none;
}
.sidebar-user:hover { background: rgba(255,255,255,0.06); }
.sidebar-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--hs-green-mid), var(--hs-green));
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem;
    flex-shrink: 0;
}
.sidebar-user-name {
    font-size: 0.825rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.35);
}
.sidebar-user-caret {
    margin-left: auto;
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 190;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* =========================================================
   MAIN WRAPPER
   ========================================================= */
.hs-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* =========================================================
   TOP BAR (inside main)
   ========================================================= */
.hs-topbar {
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--r-sm);
    transition: background 0.15s;
}
.topbar-hamburger:hover { background: var(--surface-2); }
.topbar-breadcrumb {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-2);
}
.topbar-breadcrumb .current {
    font-weight: 600;
    color: var(--text);
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.topbar-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-2);
    border-radius: var(--r-sm);
    padding: 6px 10px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.18s;
    display: flex; align-items: center; gap: 6px;
    text-decoration: none;
}
.topbar-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}
.topbar-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--hs-green-mid), var(--hs-green));
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: border-color 0.18s;
}
.topbar-avatar:hover { border-color: var(--hs-green); }

/* =========================================================
   PAGE BODY
   ========================================================= */
.hs-page {
    flex: 1;
    padding: 24px 24px 40px;
}

/* =========================================================
   PAGE HERO HEADER
   ========================================================= */
.page-hero {
    background: linear-gradient(135deg, var(--hs-green-dark) 0%, #0d4a22 60%, #16a34a 100%);
    border-radius: var(--r-xl);
    padding: 28px 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    color: #fff;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}
.page-hero::after {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(0,230,118,0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 4px;
}
.page-hero p { color: rgba(255,255,255,0.72); margin: 0; font-size: 0.9rem; }

/* =========================================================
   SECTION TITLE
   ========================================================= */
.section-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.section-title .stitle-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.section-title .stitle-icon.green { background: var(--hs-green-pale); color: var(--hs-green); }
.section-title .stitle-icon.gold  { background: #fef9c3; color: #b45309; }
.section-title .stitle-icon.blue  { background: #eff6ff; color: #2563eb; }
.section-title .stitle-icon.red   { background: #fef2f2; color: #dc2626; }
.section-title .stitle-icon.purple{ background: #faf5ff; color: #7c3aed; }

/* =========================================================
   CARDS
   ========================================================= */
.hs-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.22s, transform 0.22s;
}
.hs-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.hs-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.hs-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.hs-card-title i { color: var(--hs-green); }

/* Glass card */
.glass-card {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
}

/* =========================================================
   STAT CARDS
   ========================================================= */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: all 0.22s;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    right: -20px; top: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: 0.06;
}
.stat-card.green::before { background: var(--hs-green); }
.stat-card.blue::before  { background: var(--team-a); }
.stat-card.orange::before{ background: #f59e0b; }
.stat-card.red::before   { background: var(--team-b); }
.stat-card.purple::before{ background: #7c3aed; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.stat-icon.green  { background: var(--hs-green-pale);  color: var(--hs-green); }
.stat-icon.blue   { background: var(--team-a-bg);       color: var(--team-a); }
.stat-icon.orange { background: #fffbeb;                color: #d97706; }
.stat-icon.red    { background: var(--team-b-bg);       color: var(--team-b); }
.stat-icon.purple { background: #faf5ff;                color: #7c3aed; }
.stat-icon.cyan   { background: #ecfeff;                color: #0891b2; }
.stat-label {
    font-size: 0.72rem;
    color: var(--text-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.stat-trend {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 2px;
}
.stat-trend.up   { color: var(--hs-green); }
.stat-trend.down { color: var(--team-b); }

/* =========================================================
   ACTIVE MATCH HERO CARD
   ========================================================= */
.match-hero-card {
    background: linear-gradient(135deg, #0a1628 0%, #0d3d1e 50%, #052e10 100%);
    border-radius: var(--r-xl);
    padding: 20px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,230,118,0.15);
}
.match-hero-card::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300e676' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none; z-index: 0;
}
.match-hero-card .live-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,230,118,0.15);
    border: 1px solid rgba(0,230,118,0.3);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--hs-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.match-hero-card .live-dot::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--hs-accent);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}
.match-hero-card .match-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.45rem;
    line-height: 1.2;
    margin-bottom: 4px;
}
.match-hero-card .match-meta {
    color: rgba(255,255,255,0.55);
    font-size: 0.8rem;
    margin-bottom: 12px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.match-hero-card .match-meta i { color: var(--hs-accent); }
.match-hero-card > * { position: relative; z-index: 1; }

/* Attendance action buttons */
.attendance-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.att-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--r-md);
    border: 2px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    font-weight: 600;
}
.att-btn:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.12);
    color: #fff;
    transform: translateY(-2px);
}
.att-btn.selected-coming    { border-color: #4ade80; background: rgba(74,222,128,0.18); color: #4ade80; }
.att-btn.selected-maybe     { border-color: #fbbf24; background: rgba(251,191,36,0.15); color: #fbbf24; }
.att-btn.selected-not_coming{ border-color: #f87171; background: rgba(248,113,113,0.15); color: #f87171; }
.att-btn .att-icon { font-size: 1.15rem; }

/* Match status pills */
.match-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.msp-draft         { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.msp-voting        { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.msp-finalized     { background: #faf5ff; color: #5b21b6; border: 1px solid #ddd6fe; }
.msp-played        { background: #f0fdf4; color: #14532d; border: 1px solid #bbf7d0; }
.msp-attendance    { background: #ecfeff; color: #164e63; border: 1px solid #a5f3fc; }

/* =========================================================
   TEAM SPLIT (A vs B)
   ========================================================= */
.team-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.team-half {
    border-radius: var(--r-md);
    padding: 14px;
}
.team-half.team-a { background: var(--team-a-bg); border: 1px solid var(--team-a-border); }
.team-half.team-b { background: var(--team-b-bg); border: 1px solid var(--team-b-border); }
.team-label {
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 8px;
}
.team-label.a { color: var(--team-a); }
.team-label.b { color: var(--team-b); }
.player-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    margin: 2px;
    color: var(--text);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-hs-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--hs-green), var(--hs-green-mid));
    color: #fff;
    border: none;
    border-radius: var(--r-md);
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(22,163,74,0.3);
    text-decoration: none;
    white-space: nowrap;
}
.btn-hs-primary:hover {
    background: linear-gradient(135deg, var(--hs-green-mid), var(--hs-green-light));
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22,163,74,0.4);
}
.btn-hs-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--hs-green);
    border: 1.5px solid var(--hs-green);
    border-radius: var(--r-md);
    padding: 9px 20px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-hs-secondary:hover {
    background: var(--hs-green);
    color: #fff;
}
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-2);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 9px 16px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
}
.btn-ghost:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--hs-accent);
    color: var(--hs-green-dark);
    border: none;
    border-radius: var(--r-md);
    padding: 10px 20px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(0,230,118,0.35);
    text-decoration: none;
}
.btn-accent:hover {
    background: #00ff8c;
    color: var(--hs-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,230,118,0.5);
}
.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: var(--r-md);
    padding: 9px 16px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.18s;
    text-decoration: none;
}
.btn-danger:hover { background: #fee2e2; }

.btn-match-summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ef4444;
    color: #ffffff !important;
    border: 1px solid #dc2626;
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: 600;
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.18s;
}
.btn-match-summary:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
    color: #ffffff !important;
}

.btn-header {
    background: var(--hs-accent);
    color: var(--hs-green-dark);
    border: none;
    border-radius: var(--r-md);
    padding: 8px 18px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.875rem;
    box-shadow: 0 2px 12px rgba(0,230,118,.35);
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.btn-header:hover {
    background: #00ff8c;
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(0,230,118,.5);
    color: var(--hs-green-dark);
}

/* Vote button */
.btn-vote {
    width: 100%;
    display: flex; align-items: center; justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: #fff; border: none; border-radius: var(--r-md);
    font-weight: 600; padding: 10px 20px;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(37,99,235,0.3);
}
.btn-vote:hover { opacity: 0.92; transform: translateY(-1px); color: #fff; }
.btn-vote:disabled {
    background: var(--hs-green);
    cursor: default; transform: none;
    box-shadow: none;
}

.voted-btn {
    cursor: pointer !important;
    transition: all 0.2s ease;
    background: var(--hs-green) !important;
    border-color: var(--hs-green) !important;
    color: #fff !important;
}
.voted-btn .cancel-text {
    display: none;
}
.voted-btn:hover {
    background: #c62828 !important;
    border-color: #c62828 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(198,40,40,0.3);
    transform: translateY(-1px);
}
.voted-btn:hover .voted-text {
    display: none !important;
}
.voted-btn:hover .cancel-text {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   TABLES
   ========================================================= */
.hs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.hs-table th {
    background: var(--surface-2);
    color: var(--text-3);
    font-weight: 700;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.hs-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
}
.hs-table tbody tr:hover { background: var(--hs-green-pale); }
.hs-table tbody tr:last-child td { border-bottom: none; }

/* =========================================================
   BADGES / PILLS
   ========================================================= */
.badge-pos {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pos-k { background: #fffbeb; color: #92400e; }
.pos-d { background: var(--hs-green-pale); color: #14532d; }
.pos-o { background: #eff6ff; color: #1e40af; }
.pos-f { background: #fef2f2; color: #991b1b; }
.skill-stars { color: #f59e0b; letter-spacing: 2px; }

/* =========================================================
   FORMS
   ========================================================= */
.hs-form-group { margin-bottom: 16px; }
.hs-form-group label {
    font-weight: 600;
    font-size: 0.825rem;
    margin-bottom: 6px;
    display: block;
    color: var(--text-2);
}
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: 9px 14px;
    font-size: 0.9rem;
    font-family: var(--font-main);
    color: var(--text);
    background: var(--surface);
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--hs-green);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
    outline: none;
}
.form-control::placeholder { color: var(--text-3); }

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #052e10 0%, #0d4a22 50%, #16a34a 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(0,230,118,0.12) 0%, transparent 60%);
    pointer-events: none;
}
.login-box {
    background: rgba(255,255,255,0.97);
    border-radius: var(--r-2xl);
    padding: 40px;
    width: 100%; max-width: 420px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
}
.login-logo {
    width: 68px; height: 68px;
    background: linear-gradient(135deg, var(--hs-green), var(--hs-accent));
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #fff;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(22,163,74,0.4);
}

/* =========================================================
   FLASH MESSAGES
   ========================================================= */
.flash-success, .flash-error, .flash-warning, .flash-info {
    border-radius: var(--r-md);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 16px;
    animation: fadeInDown 0.3s ease-out;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.flash-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.flash-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.flash-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.flash-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* =========================================================
   TEAM SUGGESTION CARDS
   ========================================================= */
.team-suggestion-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all 0.22s;
    box-shadow: var(--shadow-sm);
}
.team-suggestion-card:hover {
    border-color: var(--hs-green);
    box-shadow: var(--shadow-green);
    transform: translateY(-2px);
}
.team-suggestion-card.voted {
    border-color: var(--hs-accent);
    box-shadow: 0 4px 20px rgba(0,230,118,0.2);
}
.suggestion-header {
    background: linear-gradient(135deg, var(--hs-green-dark), var(--hs-green));
    color: #fff;
    padding: 14px 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.suggestion-meta { font-size: 0.75rem; color: rgba(255,255,255,0.65); }
.suggestion-body { padding: 16px; }
.vote-bar {
    background: var(--hs-green-pale);
    border-top: 1px solid var(--border);
    padding: 12px 18px;
    display: flex; align-items: center; justify-content: space-between;
}
.vote-count { font-weight: 700; color: var(--hs-green); font-size: 0.875rem; }

/* =========================================================
   TEAM BUILDER (drag-drop)
   ========================================================= */
.team-builder {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    align-items: start;
}
@media (max-width: 991px) { .team-builder { grid-template-columns: 1fr; } }

.player-source, .team-zone {
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: var(--r-lg);
    padding: 16px;
    min-height: 400px;
}
.team-zone.team-a-zone { border-color: #93c5fd; background: #f0f7ff; }
.team-zone.team-b-zone { border-color: #fca5a5; background: #fff5f5; }
.team-zone.drag-over   { border-style: solid; opacity: 0.85; }

.zone-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0,0,0,0.06);
}
.zone-title { font-weight: 700; font-size: 0.9rem; }
.zone-count {
    background: rgba(0,0,0,0.07);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
}
.player-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    border-radius: var(--r-sm);
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.18s;
    border: 1.5px solid transparent;
    user-select: none;
    background: rgba(255,255,255,0.8);
    font-size: 0.875rem;
}
.player-item:hover { border-color: var(--hs-green); transform: translateX(2px); }
.player-item.in-team-a { background: #dbeafe; border-color: #2563eb; }
.player-item.in-team-b { background: #fee2e2; border-color: #dc2626; }
.player-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.8rem;
    flex-shrink: 0;
    background: var(--hs-green-pale);
    color: var(--hs-green);
}
.team-a-zone .player-avatar { background: #dbeafe; color: var(--team-a); }
.team-b-zone .player-avatar { background: #fee2e2; color: var(--team-b); }
.player-pos-badge {
    font-size: 0.62rem; font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    text-transform: uppercase;
}
.zone-player-list { min-height: 260px; }
.zone-player-list .btn-link { line-height: 1; text-decoration: none; }
.zone-player-list .btn-link:hover { opacity: 0.7; }

/* =========================================================
   FOOTBALL FIELD / TACTICS BOARD
   ========================================================= */
.tactics-field {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background-color: #16a34a;
    background-image:
        repeating-linear-gradient(
            to bottom,
            rgba(0,0,0,0.05) 0px, rgba(0,0,0,0.05) 40px,
            transparent 40px, transparent 80px
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Crect width='300' height='400' fill='none'/%3E%3Cpath d='M15 15h270v370H15z' fill='none' stroke='rgba%28255,255,255,0.28%29' stroke-width='2'/%3E%3Cpath d='M15 200h270' fill='none' stroke='rgba%28255,255,255,0.28%29' stroke-width='2'/%3E%3Ccircle cx='150' cy='200' r='35' fill='none' stroke='rgba%28255,255,255,0.28%29' stroke-width='2'/%3E%3Ccircle cx='150' cy='200' r='3' fill='rgba%28255,255,255,0.35%29'/%3E%3Cpath d='M65 15h170v45H65zm0 370h170v-45H65z' fill='none' stroke='rgba%28255,255,255,0.28%29' stroke-width='2'/%3E%3Cpath d='M110 15h80v15h-80zm0 370h80v-15h-80z' fill='none' stroke='rgba%28255,255,255,0.28%29' stroke-width='2'/%3E%3Cpath d='M125 60a25 25 0 0 1 50 0M125 340a25 25 0 0 0 50 0' fill='none' stroke='rgba%28255,255,255,0.28%29' stroke-width='2'/%3E%3Ccircle cx='150' cy='50' r='2' fill='rgba%28255,255,255,0.35%29'/%3E%3Ccircle cx='150' cy='350' r='2' fill='rgba%28255,255,255,0.35%29'/%3E%3C/svg%3E");
    background-size: 100% 10%, 100% 100%;
    border: 4px solid #15803d;
    border-radius: var(--r-lg);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.25), 0 8px 24px rgba(0,0,0,0.15);
    overflow: hidden;
}
.field-player {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex; flex-direction: column; align-items: center;
    z-index: 10;
    transition: left 0.4s cubic-bezier(0.25,0.8,0.25,1), top 0.4s cubic-bezier(0.25,0.8,0.25,1);
}
.field-player-node {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--hs-green);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.9);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.78rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s;
}
.field-player-node:hover { transform: scale(1.15); }
.field-player.team-a .field-player-node {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.field-player.team-b .field-player-node {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.field-player-jersey {
    position: absolute; top: -6px; right: -6px;
    background: #fbbf24; color: #000;
    font-size: 0.58rem; font-weight: 800;
    border-radius: 50%; width: 14px; height: 14px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #fff;
}
.field-player-name {
    background: rgba(0,0,0,0.72);
    color: #fff;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.62rem;
    font-weight: 700;
    margin-top: 3px;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
.field-player-role { font-size: 0.52rem; opacity: 0.8; text-transform: uppercase; }

/* GOLD THEME */
.tactics-field.gold-theme {
    background-color: #0a0a0a;
    background-image:
        repeating-linear-gradient(
            to bottom,
            rgba(212,175,55,0.04) 0px, rgba(212,175,55,0.04) 40px,
            transparent 40px, transparent 80px
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Crect width='300' height='400' fill='none'/%3E%3Cpath d='M15 15h270v370H15z' fill='none' stroke='rgba%28212,175,55,0.2%29' stroke-width='2'/%3E%3Cpath d='M15 200h270' fill='none' stroke='rgba%28212,175,55,0.2%29' stroke-width='2'/%3E%3Ccircle cx='150' cy='200' r='35' fill='none' stroke='rgba%28212,175,55,0.2%29' stroke-width='2'/%3E%3Ccircle cx='150' cy='200' r='3' fill='rgba%28212,175,55,0.25%29'/%3E%3Cpath d='M65 15h170v45H65zm0 370h170v-45H65z' fill='none' stroke='rgba%28212,175,55,0.2%29' stroke-width='2'/%3E%3Cpath d='M110 15h80v15h-80zm0 370h80v-15h-80z' fill='none' stroke='rgba%28212,175,55,0.2%29' stroke-width='2'/%3E%3C/svg%3E");
    border: 4px solid #d4af37;
    box-shadow: inset 0 0 40px rgba(212,175,55,0.2), 0 12px 30px rgba(0,0,0,0.4);
}
.field-player.gold-player .field-player-node {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    border: 2px solid #ffd700;
    box-shadow: 0 0 16px rgba(255,215,0,0.55);
    font-weight: 900;
}
.field-player.gold-player .field-player-node:hover {
    transform: scale(1.18);
    box-shadow: 0 0 28px rgba(255,215,0,0.85);
}
.field-player.gold-player .field-player-name {
    background: rgba(12,8,0,0.88);
    color: #ffd700;
    border: 1px solid rgba(212,175,55,0.5);
    font-weight: 800;
}

/* =========================================================
   FIFA STYLE CARD
   ========================================================= */
.fut-card-container { perspective: 1000px; display: inline-block; margin: 8px auto; }
.fut-card {
    width: 220px; height: 340px;
    background: linear-gradient(160deg, #1e1e1e 0%, #111 100%);
    border: 3px solid #d4af37;
    border-radius: var(--r-xl);
    position: relative; padding: 20px 18px;
    color: #fff;
    font-family: var(--font-display);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 20px rgba(212,175,55,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.fut-card:hover {
    transform: translateY(-8px) rotateY(5deg);
    box-shadow: 0 28px 50px rgba(0,0,0,0.6), 0 0 40px rgba(212,175,55,0.4);
}
.fut-card::before {
    content: '';
    position: absolute; top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(212,175,55,0.07) 0%, transparent 65%);
    pointer-events: none;
}
.fut-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 2px solid rgba(212,175,55,0.18);
    padding-bottom: 10px; margin-bottom: 12px;
}
.fut-rating-box { text-align: center; }
.fut-rating {
    font-size: 2.6rem; font-weight: 900; line-height: 1;
    color: #ffd700;
    text-shadow: 0 0 12px rgba(255,215,0,0.4);
}
.fut-pos {
    font-size: 0.78rem; text-transform: uppercase; font-weight: 800;
    color: #d4af37; letter-spacing: 1px;
}
.fut-jersey {
    font-size: 1.4rem; font-weight: 800;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(212,175,55,0.25);
    border-radius: 8px; width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
}
.fut-player-name {
    font-size: 1.1rem; font-weight: 800; text-align: center;
    margin-bottom: 12px; color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fut-stats-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    font-size: 0.8rem;
}
.fut-stat-item {
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 5px 8px; border-radius: 6px; transition: background 0.18s;
}
.fut-stat-item:hover { background: rgba(212,175,55,0.08); border-color: rgba(212,175,55,0.2); }
.fut-stat-label { color: #999; font-weight: 600; }
.fut-stat-value { font-weight: 800; color: #ffd700; }
.fut-card.silver { border-color: #b0b0b0; box-shadow: 0 15px 35px rgba(0,0,0,0.5), 0 0 20px rgba(192,192,192,0.12); }
.fut-card.silver:hover { box-shadow: 0 25px 45px rgba(0,0,0,0.6), 0 0 35px rgba(192,192,192,0.35); }
.fut-card.silver .fut-rating { color: #ddd; text-shadow: 0 0 10px rgba(220,220,220,0.4); }
.fut-card.silver .fut-pos { color: #aaa; }
.fut-card.silver .fut-stat-value { color: #ddd; }

/* =========================================================
   COMPARISON BARS
   ========================================================= */
.compare-bar-container { margin-bottom: 14px; }
.compare-bar-label {
    display: flex; justify-content: space-between;
    font-weight: 700; font-size: 0.85rem; margin-bottom: 5px; color: var(--text);
}
.compare-bar-progress {
    height: 14px; background: #f1f5f9;
    border-radius: 7px; overflow: hidden; display: flex;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.compare-bar-fill { height: 100%; transition: width 0.8s cubic-bezier(0.25,0.8,0.25,1); }
.compare-bar-midpoint {
    position: absolute; top: 0; bottom: 0; left: 50%;
    width: 2px; background: rgba(0,0,0,0.15); z-index: 2;
}

/* =========================================================
   STATS MINI
   ========================================================= */
.stat-mini {
    padding: 14px; background: var(--surface-2);
    border-radius: var(--r-md); border: 1px solid var(--border);
    transition: all 0.2s;
}
.stat-mini:hover { background: var(--hs-green-pale); transform: translateY(-2px); }
.stat-mini .stat-num { font-size: 1.8rem; font-weight: 800; line-height: 1; color: var(--text); }
.stat-mini .stat-lbl {
    font-size: 0.68rem; color: var(--text-3);
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px;
}

/* =========================================================
   LEADERBOARD RANK
   ========================================================= */
.rank-badge {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.75rem;
    flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #f59e0b); color: #000; box-shadow: 0 2px 8px rgba(245,158,11,0.4); }
.rank-2 { background: linear-gradient(135deg, #e0e0e0, #9e9e9e); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }
.rank-n { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }

/* =========================================================
   MATCH SCORE DISPLAY
   ========================================================= */
.score-display {
    display: flex; align-items: center; justify-content: center;
    gap: 12px;
    font-family: var(--font-display);
}
.score-num {
    font-size: 2.8rem; font-weight: 900; line-height: 1;
    letter-spacing: -1px;
}
.score-num.team-a { color: var(--team-a); }
.score-num.team-b { color: var(--team-b); }
.score-sep { font-size: 1.5rem; color: var(--text-3); font-weight: 300; }

/* =========================================================
   MATCH HISTORY CARD
   ========================================================= */
.match-history-card {
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--surface);
    transition: all 0.22s;
    box-shadow: var(--shadow-sm);
}
.match-history-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.match-history-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface-2);
}
.match-history-score {
    padding: 20px;
    text-align: center;
}

/* =========================================================
   FOOTER
   ========================================================= */
.hs-footer {
    background: var(--sidebar-bg);
    color: rgba(255,255,255,0.45);
    padding: 16px 24px;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
}
.footer-brand { color: rgba(255,255,255,0.75); font-weight: 700; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.35s ease-out both; }
.fade-in-up-delay-1 { animation-delay: 0.06s; }
.fade-in-up-delay-2 { animation-delay: 0.12s; }
.fade-in-up-delay-3 { animation-delay: 0.18s; }
.fade-in-up-delay-4 { animation-delay: 0.24s; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}
.slide-in-left { animation: slideInLeft 0.3s ease-out both; }

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* =========================================================
   UTILITIES
   ========================================================= */
.hover-green:hover { color: var(--hs-green) !important; }
.hover-bg:hover { background: var(--hs-green-pale) !important; }
.text-green { color: var(--hs-green); }
.text-accent { color: var(--hs-accent); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
    .hs-sidebar {
        transform: translateX(-100%);
    }
    .hs-sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0,0,0,0.4);
    }
    .hs-main {
        margin-left: 0;
    }
    .topbar-hamburger { display: flex; }
}
@media (max-width: 768px) {
    .hs-page { padding: 16px 16px 32px; }
    .page-hero { padding: 20px; }
    .page-hero h1 { font-size: 1.35rem; }
    .stat-value { font-size: 1.5rem; }
    .team-split { grid-template-columns: 1fr; }
    .attendance-actions { grid-template-columns: repeat(3, 1fr); }
    .match-hero-card { padding: 16px 18px; }
    .hs-card { padding: 16px; }
}
@media (max-width: 480px) {
    .attendance-actions { gap: 6px; }
    .att-btn { padding: 6px 4px; font-size: 0.7rem; gap: 4px; }
    .att-btn .att-icon { font-size: 1rem; }
}

/* =========================================================
   FINAL-TEAM SECTION
   ========================================================= */
.final-team-section {
    background: var(--surface);
    border-radius: var(--r-lg);
    border: 2px solid var(--border);
    overflow: hidden;
}
.final-team-half { padding: 16px; }
.final-team-half.a { border-right: 2px solid var(--border); }
.final-player-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border-radius: var(--r-sm);
    margin-bottom: 4px; transition: background 0.15s;
}
.final-player-row:hover { background: var(--hs-green-pale); }

/* =========================================================
   ATTENDANCE PROGRESS
   ========================================================= */
.attendance-progress-bar {
    height: 10px;
    background: var(--surface-2);
    border-radius: 5px;
    overflow: hidden;
}
.attendance-progress-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--hs-green), var(--hs-green-mid));
    transition: width 0.8s ease;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-2);
}
.empty-state .empty-icon {
    font-size: 3.5rem;
    opacity: 0.2;
    display: block;
    margin-bottom: 12px;
}
.empty-state h3 { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; color: var(--text); }
.empty-state p { font-size: 0.875rem; color: var(--text-2); margin-bottom: 16px; }

/* Admin badge */
.admin-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: #fffbeb; color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Open dropdown z-index elevation and overflow clipping prevention */
.table-responsive:has(.dropdown-menu.show) {
    overflow: visible !important;
}
tr:has(.dropdown-menu.show),
td:has(.dropdown-menu.show),
.hs-card:has(.dropdown-menu.show) {
    position: relative;
    z-index: 1050 !important;
}

/* =========================================================
   FIFA FUT CARD STYLING
   ========================================================= */
.fut-card-gold {
    width: 250px;
    height: 360px;
    background: linear-gradient(135deg, #ffe066 0%, #d4af37 50%, #aa8010 100%);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), inset 0 0 15px rgba(255,255,255,0.4);
    position: relative;
    color: #111;
    font-family: 'Outfit', sans-serif;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 3px solid #ffe066;
    overflow: hidden;
}
.fut-card-gold::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%);
    transform: rotate(25deg);
    pointer-events: none;
}
.fut-card-gold .card-rating-group {
    position: absolute;
    top: 55px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
}
.fut-card-gold .card-ovr {
    font-size: 2.8rem;
    font-weight: 900;
}
.fut-card-gold .card-pos {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #333;
}
.fut-card-gold .card-avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(0,0,0,0.2) 100%);
    border: 2px solid #ffe066;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 900;
    color: #111;
    margin-left: 45px;
}
.fut-card-gold .card-name {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin-top: 15px;
    width: 100%;
    border-bottom: 2px solid rgba(0,0,0,0.15);
    padding-bottom: 5px;
}
.fut-card-gold .card-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-top: 10px;
    gap: 4px 10px;
    padding: 0 10px;
}
.fut-card-gold .card-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
}
.fut-card-gold .card-stat-val {
    font-size: 1.05rem;
    font-weight: 900;
    width: 25px;
    text-align: right;
}
.fut-card-gold .card-stat-lbl {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: #3a3a3a;
}

/* =========================================================
   MATCH POSTER GENERATOR STYLING
   ========================================================= */
.match-poster-container {
    display: flex;
    justify-content: center;
    padding: 10px;
}
.match-poster-card {
    width: 480px;
    height: 680px;
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #0f172a 100%);
    border: 5px solid #d4af37;
    border-radius: 24px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.8), inset 0 0 25px rgba(212,175,55,0.15), 0 0 15px rgba(212,175,55,0.25);
    padding: 24px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.match-poster-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.04) 0%, transparent 70%);
    pointer-events: none;
}
.match-poster-header {
    text-align: center;
    border-bottom: 2px dashed rgba(212,175,55,0.35);
    padding-bottom: 12px;
}
.match-poster-header h2 {
    font-size: 2.1rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #ffd700;
    margin-bottom: 4px;
    letter-spacing: 2px;
    text-shadow: 0 3px 6px rgba(0,0,0,0.8), 0 0 12px rgba(255,215,0,0.4);
}
.match-poster-meta {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.match-poster-pitch {
    flex-grow: 1;
    margin: 15px 0;
    border-radius: 16px;
    border: 3px solid rgba(255,255,255,0.2);
    background-color: #0b3d20;
    background-image: 
        repeating-linear-gradient(
            to bottom,
            rgba(0,0,0,0.08) 0px, rgba(0,0,0,0.08) 35px,
            transparent 35px, transparent 70px
        ),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Crect width='300' height='400' fill='none'/%3E%3Cpath d='M15 15h270v370H15z' fill='none' stroke='rgba%28255,255,255,0.35%29' stroke-width='2'/%3E%3Cpath d='M15 200h270' fill='none' stroke='rgba%28255,255,255,0.35%29' stroke-width='2'/%3E%3Ccircle cx='150' cy='200' r='30' fill='none' stroke='rgba%28255,255,255,0.35%29' stroke-width='2'/%3E%3Cpath d='M65 15h170v35H65zm0 370h170v-35H65z' fill='none' stroke='rgba%28255,255,255,0.35%29' stroke-width='2'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 25px rgba(0,0,0,0.6);
}
.match-poster-pitch .team-title {
    position: absolute;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.15);
}
.match-poster-pitch .team-title.a { 
    top: 12px; 
    left: 12px; 
    color: #fff; 
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.95)); 
    border-left: 4px solid #60a5fa; 
}
.match-poster-pitch .team-title.b { 
    bottom: 12px; 
    left: 12px; 
    color: #fff; 
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.95)); 
    border-left: 4px solid #f87171; 
}

.poster-player {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}
.poster-player-jersey {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    border: 2px solid #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.poster-player.a .poster-player-jersey { 
    background: radial-gradient(circle at 35% 35%, #60a5fa 0%, #1d4ed8 100%); 
    color: #fff; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), 0 0 10px rgba(37, 99, 235, 0.6);
}
.poster-player.b .poster-player-jersey { 
    background: radial-gradient(circle at 35% 35%, #f87171 0%, #b91c1c 100%); 
    color: #fff; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), 0 0 10px rgba(220, 38, 38, 0.6);
}
.poster-player-name {
    background: rgba(10, 15, 30, 0.9);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 5px;
    margin-top: 4px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}
.poster-player.a .poster-player-name {
    border-bottom: 2.5px solid #60a5fa;
}
.poster-player.b .poster-player-name {
    border-bottom: 2.5px solid #f87171;
}
.match-poster-footer {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 12px;
}
