/**
 * Football Club — Youth UI Theme
 * Energetic pitch-inspired design with motion & micro-interactions
 */

:root {
    /* --------------------------------------------------------------------
       هویت بصری باشگاه فوتبال نواب تبریز — NAVAB brand colour system
       مشکی پایه، قرمز به‌عنوان لهجهٔ برند، سفید و خاکستری برای تایپوگرافی.

       The NAVAB palette is defined once here. Every legacy variable name is
       kept and now points at a palette colour, so all existing rules — and the
       inline `var(--…)` uses inside the templates — keep working untouched.
       -------------------------------------------------------------------- */

    /* --- brand ------------------------------------------------------- */
    --brand-primary: #E30613;
    --brand-primary-hover: #FF1E2D;
    --brand-primary-dark: #B8000C;
    --brand-primary-soft: rgba(227, 6, 19, 0.12);

    /* --- surfaces ----------------------------------------------------- */
    --bg-main: #0B0B0D;
    --bg-secondary: #111114;
    --surface: #18181C;
    --surface-hover: #222228;
    --border-color: #2D2D33;
    --border-light: #3A3A42;

    /* --- typography --------------------------------------------------- */
    --text-primary: #FFFFFF;
    --text-secondary: #B8B8C0;
    --text-subtle: #777780;

    /* --- semantic ----------------------------------------------------- */
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #E30613;
    --info: #3B82F6;

    /* --- elevation ---------------------------------------------------- */
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 15px 40px rgba(0, 0, 0, 0.5);
    --glow-primary: 0 0 20px rgba(227, 6, 19, 0.35);

    /* --- gradients ---------------------------------------------------- */
    --gradient-dark: linear-gradient(135deg, #0B0B0D 0%, #151518 50%, #0B0B0D 100%);
    --gradient-primary: linear-gradient(135deg, #FF1E2D 0%, #E30613 50%, #B8000C 100%);

    /* --------------------------------------------------------------------
       Legacy aliases — names unchanged, values remapped to the palette.
       -------------------------------------------------------------------- */
    --club-red: var(--brand-primary);
    --club-red-bright: var(--brand-primary-hover);
    --club-red-deep: var(--brand-primary-dark);
    --pitch-dark: var(--bg-main);       /* مشکی اصلی */
    --pitch-mid: var(--surface);        /* سطح کارت‌ها */
    --pitch-light: var(--surface-hover);
    --grass: var(--brand-primary);      /* رنگ اصلی (قرمز) */
    --grass-bright: var(--brand-primary-hover);
    --grass-glow: rgba(227, 6, 19, 0.35);
    --accent: var(--warning);           /* کهربایی برای نشان‌ها و جام‌ها */
    --accent-hot: var(--brand-primary-hover);
    --white: var(--text-primary);
    --text: var(--text-primary);
    --text-muted: var(--text-secondary);
    --card-bg: var(--surface);
    --card-border: var(--border-color);
    --glass: rgba(17, 17, 20, 0.88);
    --shadow: var(--shadow-md);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
}

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--pitch-dark);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(227, 6, 19, 0.22), transparent),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 49px,
            rgba(255, 255, 255, 0.02) 49px,
            rgba(255, 255, 255, 0.02) 50px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            rgba(255, 255, 255, 0.02) 49px,
            rgba(255, 255, 255, 0.02) 50px
        );
    min-height: 100vh;
    overflow-x: hidden;
}

/* Floating pitch decorations */
body::before {
    content: '';
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--grass-glow) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 12s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
    bottom: -50px;
    right: -50px;
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 15s ease-in-out infinite reverse;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 20px) scale(1.1); }
}

a {
    color: var(--grass-bright);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.container {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 20px 40px;
}

/* ─── Navbar ─── */
.navbar {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 2px solid var(--grass);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand .logo-ball {
    font-size: 28px;
    animation: spinBall 4s linear infinite;
    display: inline-block;
}

/* Logo animation in animations.css */

.navbar-brand h1 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, var(--grass-bright), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid var(--grass);
    color: var(--grass-bright);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
}

.nav-toggle:hover {
    background: var(--grass);
    color: var(--pitch-dark);
    transform: scale(1.05);
}

.navbar-nav ul {
    display: flex;
    list-style: none;
    gap: 6px;
    flex-wrap: wrap;
}

.navbar-nav a {
    color: var(--text);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 14px;
    left: 14px;
    height: 2px;
    background: var(--grass-bright);
    transform: scaleX(0);
    transition: transform var(--transition);
    border-radius: 2px;
}

.navbar-nav a:hover,
.navbar-nav a.active {
    color: var(--grass-bright);
    background: rgba(227, 6, 19, 0.12);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
    transform: scaleX(1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-badge {
    background: rgba(227, 6, 19, 0.12);
    border: 1px solid var(--grass);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-logout {
    background: linear-gradient(135deg, #FF1E2D, #B8000C);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: none;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.4);
    text-decoration: none;
    color: white;
}

/* ─── Page header ─── */
.page-header {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 20px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.5s ease-out 0.1s both;
    border-right: 4px solid var(--grass);
}

.page-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
}

.content {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Panels & cards ─── */
.panel,
.players-section,
.financial-section,
.attendance-section,
.medical-section,
.player-form-section,
.player-profile,
.dashboard {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    transition: transform var(--transition), box-shadow var(--transition);
}

.panel:hover,
.players-section:hover,
.financial-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(227, 6, 19, 0.12);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

/* ─── Stat cards (dashboard) ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(227, 6, 19, 0.12), rgba(17, 17, 20, 0.9));
    border: 1px solid var(--card-border);
    padding: 24px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.5s ease-out both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: var(--grass-glow);
    border-radius: 0 0 0 100%;
    opacity: 0.5;
}

.stat-card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--grass);
    box-shadow: 0 12px 30px var(--grass-glow);
}

.stat-card .stat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.stat-card h3 {
    margin: 0 0 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: none;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin: 0;
    line-height: 1.2;
}

.stat-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.stat-card.stat-warning { border-right: 4px solid var(--accent-hot); }
.stat-card.stat-info { border-right: 4px solid #3B82F6; }
.stat-card.stat-success { border-right: 4px solid var(--grass); }

/* ─── Charts ─── */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.chart-container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    padding: 24px;
    border-radius: var(--radius);
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.chart-container h3 {
    margin: 0 0 20px;
    font-size: 1rem;
    color: var(--grass-bright);
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    align-items: center;
    gap: 12px;
}

.bar-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.bar-track {
    height: 28px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 999px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--grass), var(--grass-bright));
    border-radius: 999px;
    width: 0;
    transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 12px var(--grass-glow);
}

.bar-value {
    font-weight: 800;
    color: var(--accent);
    font-size: 0.9rem;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(227, 6, 19, 0.10);
    border: 2px solid var(--grass);
    border-radius: var(--radius-sm);
    color: var(--grass-bright);
    font-weight: 700;
    transition: var(--transition);
}

.quick-action-btn:hover {
    background: var(--grass);
    color: var(--pitch-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px var(--grass-glow);
    text-decoration: none;
}

/* ─── Alerts / toasts ─── */
.alert {
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    animation: slideInAlert 0.4s ease-out;
    border: 1px solid transparent;
    font-weight: 600;
}

@keyframes slideInAlert {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-success {
    background: rgba(227, 6, 19, 0.12);
    color: var(--grass-bright);
    border-color: var(--grass);
}

.alert-error {
    background: rgba(227, 6, 19, 0.2);
    color: #FF6B75;
    border-color: #FF1E2D;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    border-color: var(--accent);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #93B4F8;
    border-color: #3B82F6;
}

.alert-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    transition: var(--transition);
    flex-shrink: 0;
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ─── Tables ─── */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.2);
}

thead {
    background: rgba(227, 6, 19, 0.10);
    border-bottom: 2px solid var(--grass);
}

th, td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid var(--card-border);
    color: var(--text);
}

th {
    font-weight: 700;
    color: var(--grass-bright);
    font-size: 0.85rem;
}

tbody tr {
    transition: background 0.2s, transform 0.2s;
}

tbody tr:hover {
    background: rgba(227, 6, 19, 0.08);
}

tbody tr.row-pop {
    animation: rowPop 0.4s ease-out;
}

@keyframes rowPop {
    0% { background: rgba(227, 6, 19, 0.18); }
    100% { background: transparent; }
}

/* ─── Forms ─── */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-muted);
}

input, textarea, select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--card-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: rgba(0, 0, 0, 0.25);
    color: var(--white);
    transition: var(--transition);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--grass);
    box-shadow: 0 0 0 4px var(--grass-glow);
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

select option {
    background: var(--pitch-mid);
    color: var(--white);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%), rgba(255,255,255,0.4) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
}

.btn:active::after {
    opacity: 1;
    transition: opacity 0s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--grass), #16A34A);
    color: var(--pitch-dark);
    box-shadow: 0 4px 15px var(--grass-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--grass-glow);
    color: var(--pitch-dark);
    text-decoration: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border: 2px solid var(--card-border);
}

.btn-secondary:hover {
    border-color: var(--grass);
    color: var(--grass-bright);
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-success {
    background: linear-gradient(135deg, #22C55E, var(--grass));
    color: var(--pitch-dark);
}

.btn-danger {
    background: linear-gradient(135deg, #FF1E2D, #B8000C);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Status pills (attendance) */
.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-present { background: rgba(227, 6, 19, 0.18); color: var(--grass-bright); }
.status-absent { background: rgba(227, 6, 19, 0.3); color: #FF6B75; }
.status-excused { background: rgba(245, 158, 11, 0.2); color: var(--accent); }
.status-late { background: rgba(245, 158, 11, 0.3); color: #F59E0B; }

.attendance-select {
    max-width: 140px;
    padding: 8px 12px;
}

.mark-attendance.success-pulse {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 var(--grass-glow); }
    70% { box-shadow: 0 0 0 12px transparent; }
    100% { box-shadow: none; }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination span {
    color: var(--text-muted);
    font-weight: 600;
}

.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 20px;
    font-size: 1.1rem;
}

.empty-message a {
    font-weight: 700;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form input {
    min-width: 220px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.modal.is-open {
    display: flex;
}

.modal-content {
    background: var(--pitch-mid);
    border: 2px solid var(--grass);
    padding: 28px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close-modal {
    position: absolute;
    top: 16px;
    left: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    background: none;
    border: none;
    line-height: 1;
}

.close-modal:hover {
    color: var(--accent-hot);
    transform: rotate(90deg);
}

/* Footer */
.footer {
    background: var(--glass);
    border-top: 1px solid var(--card-border);
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 0.85rem;
}

/* ─── Auth pages ─── */
body.auth-layout {
    background: var(--pitch-dark);
}

body.auth-layout .auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

body.auth-layout .auth-container::before {
    content: '⚽';
    position: absolute;
    font-size: 200px;
    opacity: 0.04;
    animation: floatBall 8s ease-in-out infinite;
}

@keyframes floatBall {
    0%, 100% { transform: translate(20%, 10%) rotate(0deg); }
    50% { transform: translate(-10%, -10%) rotate(180deg); }
}

.auth-box {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 2px solid var(--grass);
    padding: 40px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 1;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 8px;
    color: var(--white);
    font-size: 1.5rem;
}

.auth-box .auth-tagline {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 0.9rem;
}

.auth-box .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 8px;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-link a {
    font-weight: 700;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Profile / form extras */
.profile-header,
.form-toolbar,
.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--card-border);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.form-group-full { grid-column: 1 / -1; }

.upload-fieldset {
    margin: 24px 0;
    padding: 16px;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
}

.upload-fieldset legend {
    padding: 0 8px;
    font-weight: 600;
    color: var(--grass-bright);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    color: var(--text);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.info-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
}

/* Desktop-only top nav links */
@media (max-width: 768px) {
    .navbar-nav.desktop-only {
        display: none !important;
    }

    .nav-toggle {
        display: none !important;
    }

    .nav-backdrop {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .bottom-nav,
    .mobile-menu {
        display: none !important;
    }

    body.has-bottom-nav {
        padding-bottom: 0;
    }

    body.has-bottom-nav .container {
        padding-bottom: 24px;
    }
}

/* Responsive — tablet */
@media (max-width: 900px) and (min-width: 769px) {
    .navbar {
        flex-wrap: wrap;
        gap: 12px;
    }

    .navbar-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* RTL tweaks */
html[dir="rtl"] th,
html[dir="rtl"] td {
    text-align: right;
}

html[dir="rtl"] .alert {
    flex-direction: row-reverse;
}

html[dir="rtl"] .page-header {
    border-right: none;
    border-left: 4px solid var(--grass);
}

html[dir="rtl"] .stat-card.stat-warning,
html[dir="rtl"] .stat-card.stat-info,
html[dir="rtl"] .stat-card.stat-success {
    border-right: none;
    border-left-width: 4px;
    border-left-style: solid;
}


/* --------------------------------------------------------------------------
 * Jalali date picker (assets/js/jalali-picker.js)
 * -------------------------------------------------------------------------- */
.jalali-date-input {
    cursor: pointer;
    background-image: linear-gradient(transparent, transparent);
}
.jalali-date-input[readonly] { background-color: inherit; }
.jalali-date-input:focus { outline: 2px solid var(--brand-primary); outline-offset: 1px; }

.jdp-popup {
    z-index: 9999;
    width: 268px;
    padding: 10px;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    font-family: inherit;
    user-select: none;
}
.jdp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-bottom: 8px;
}
.jdp-title { font-weight: 700; font-size: 14px; flex: 1; text-align: center; }
.jdp-nav {
    width: 28px; height: 28px;
    border: none; border-radius: 6px;
    background: transparent; color: var(--brand-primary);
    font-size: 16px; line-height: 1; cursor: pointer;
}
.jdp-nav:hover { background: var(--surface-hover); }
.jdp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.jdp-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-subtle);
    padding: 2px 0;
}
.jdp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.jdp-cell {
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}
.jdp-cell:hover:not(:disabled) { background: var(--surface-hover); color: var(--text-primary); }
.jdp-blank { cursor: default; }
.jdp-today { box-shadow: inset 0 0 0 1px var(--brand-primary); }
.jdp-selected,
.jdp-selected:hover {
    background: var(--brand-primary) !important;
    color: var(--text-primary) !important;
    font-weight: 700;
}
.jdp-foot {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}
.jdp-today-btn, .jdp-clear {
    border: none;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
}
.jdp-today-btn { background: var(--brand-primary-soft); color: var(--brand-primary-hover); }
.jdp-clear { background: transparent; color: var(--text-subtle); }
.jdp-today-btn:hover { background: rgba(227, 6, 19, 0.2); }
.jdp-clear:hover { color: #FF1E2D; }

/* ─── Landing / index page ─────────────────────────────────────────────
 * Club-emblem hero: floodlights, orbiting ball, glowing crest and the
 * login CTA below it. Uses the same theme variables as the rest of the
 * app so the index page feels like part of the club.
 */

.landing {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 56px 24px 64px;
    text-align: center;
    overflow: hidden;
}

/* Stadium floodlights sweeping from the top corners */
.landing-spotlight {
    --sway: 18deg;
    position: absolute;
    top: -22%;
    width: 34vmax;
    height: 95vmax;
    pointer-events: none;
    filter: blur(6px);
    background: linear-gradient(
        to bottom,
        rgba(245, 158, 11, 0.16),
        rgba(227, 6, 19, 0.08) 45%,
        transparent 78%
    );
    clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
    transform-origin: top center;
    animation: spotlightSway 9s ease-in-out infinite alternate;
}

.landing-spotlight-left {
    left: -14vmax;
    --sway: 16deg;
}

.landing-spotlight-right {
    right: -14vmax;
    --sway: -16deg;
    animation-delay: -4.5s;
}

@keyframes spotlightSway {
    from { transform: rotate(calc(var(--sway) - 4deg)); opacity: 0.35; }
    to   { transform: rotate(calc(var(--sway) + 4deg)); opacity: 0.65; }
}

/* Giant slowly-rotating pitch centre circle behind everything */
.landing-pitch-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(150vmin, 980px);
    height: min(150vmin, 980px);
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pitchRingSpin 90s linear infinite;
    pointer-events: none;
}

@keyframes pitchRingSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Eyebrow chip above the crest */
.landing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.4px;
}

/* ── The crest ── */
.landing-emblem-wrap {
    position: relative;
    width: clamp(190px, 36vmin, 300px);
    aspect-ratio: 1;
    margin: 12px 0 4px;
    display: grid;
    place-items: center;
    animation: emblemFloat 6s ease-in-out infinite;
    filter: drop-shadow(0 18px 45px rgba(0, 0, 0, 0.55));
}

.landing-emblem {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid rgba(227, 6, 19, 0.55);
    animation: emblemGlow 3.2s ease-in-out infinite;
}

/* Fallback if the crest image is missing — keeps the page on-theme */
.landing-emblem-fallback {
    display: none;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    background: var(--glass);
    border: 3px solid var(--grass);
    box-shadow: 0 0 45px var(--grass-glow);
}

.landing-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.landing-ring-solid {
    inset: -14px;
    border: 1px solid rgba(227, 6, 19, 0.22);
}

.landing-ring-dashed {
    inset: -26px;
    border: 2px dashed rgba(245, 158, 11, 0.32);
    animation: ringSpin 26s linear infinite;
}

/* A ball orbiting the crest */
.landing-orbit {
    position: absolute;
    inset: -26px;
    animation: ringSpin 9s linear infinite;
    pointer-events: none;
}

.landing-orbit-ball {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 26px;
    filter: drop-shadow(0 0 12px var(--grass-glow));
}

@keyframes ringSpin {
    to { transform: rotate(360deg); }
}

@keyframes emblemFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

@keyframes emblemGlow {
    0%, 100% {
        box-shadow:
            0 0 0 6px rgba(11, 11, 13, 0.9),
            0 0 24px var(--grass-glow);
    }
    50% {
        box-shadow:
            0 0 0 6px rgba(11, 11, 13, 0.9),
            0 0 60px var(--grass-glow),
            0 0 22px rgba(245, 158, 11, 0.25);
    }
}

/* ── Headline & tagline ── */
.landing-title {
    font-size: clamp(2rem, 6vw, 3.4rem);
    font-weight: 800;
    line-height: 1.25;
    background: linear-gradient(
        120deg,
        var(--grass-bright),
        var(--accent) 45%,
        var(--accent-hot) 70%,
        var(--grass-bright) 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: titleShine 7s linear infinite;
}

@keyframes titleShine {
    to { background-position: 220% center; }
}

.landing-tagline {
    color: var(--text-muted);
    font-size: clamp(0.95rem, 2.4vw, 1.15rem);
    margin-top: -8px;
}

/* ── CTA row ── */
.landing-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.landing-cta {
    padding: 16px 48px;
    font-size: 1.15rem;
    border-radius: 999px;
    box-shadow: 0 10px 32px var(--grass-glow);
}

/* Sweeping shine across the login button */
.landing-cta-shine {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 38%;
    left: -60%;
    background: linear-gradient(
        100deg,
        transparent,
        rgba(255, 255, 255, 0.55),
        transparent
    );
    transform: skewX(-20deg);
    animation: ctaShine 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ctaShine {
    0%       { left: -60%; }
    55%, 100% { left: 130%; }
}

.landing-secondary {
    border-radius: 999px;
    padding: 14px 26px;
}

/* ── Feature chips ── */
.landing-features {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
    padding: 0;
}

.landing-features li {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.landing-features li:hover {
    border-color: var(--grass);
    color: var(--grass-bright);
    transform: translateY(-3px);
}

/* ── Page foot ── */
.landing-foot {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Responsive tweaks */
@media (max-width: 560px) {
    .landing { gap: 18px; padding-top: 44px; }
    .landing-cta { width: min(100%, 340px); }
    .landing-secondary { width: min(100%, 340px); }
    .landing-ring-dashed { inset: -18px; }
    .landing-orbit { inset: -18px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    .landing,
    .landing * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
