* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0ea5e9;
    --primary-dark: #0369a1;
    --primary-light: #38bdf8;
    --secondary-color: #14b8a6;
    --secondary-light: #2dd4bf;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #1e293b;
    --darker-bg: #0f172a;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(248, 250, 252, 0.3)),
        url('images/soccer-sketch.png'),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
}

.login-box {
    background: rgba(255, 255, 255, 0.08);
    padding: 2.25rem;
    border-radius: 1.5rem;
    box-shadow:
        0 20px 60px 0 rgba(0, 0, 0, 0.25),
        0 2px 10px 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: 420px;
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.login-box .logo {
    text-align: center;
    margin-bottom: 2rem;
    color: #2d3748;
}

.login-box .logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
}

.login-box h1 {
    display: inline-block;
    font-size: 0.5rem;
    color: #1a202c;
    font-weight: 500;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
    text-shadow: none;
}

.subtitle {
    display: none;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: none;
}

.form-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.3);
    font-size: 1rem;
    background: rgba(255,255,255,0.08);
    color: #0f172a;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.error-message {
    color: var(--danger-color);
    font-size: 0.9rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 0.5rem;
    display: none;
}

.error-message:not(:empty) {
    display: block;
}

button.btn-primary {
    border: 1px solid rgba(255,255,255,0.35);
    background: transparent;
    color: #0f172a;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

button.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
}
/* Allinea stile login con altri portali */
.login-container .btn-primary {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
    color: #0f172a !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
    text-transform: none !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}
.login-container .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.2) !important;
    background: transparent !important;
}
@media (max-width: 520px) {
    .forgot-password a { color: #000000 !important; }
}

.main-app {
    display: flex;
    width: 100%;
}

.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Mobile Header - Hidden on desktop */
.mobile-header {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background:
        linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.45) 100%),
        url('images/menu-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 2rem 0;
    box-shadow: var(--shadow-xl);
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.logo-icon {
    font-size: 2rem;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0%, 90%, 100% { transform: rotate(0deg); }
    95% { transform: rotate(360deg); }
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-color);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.2);
    border-left-color: var(--primary-color);
}

.nav-item .icon {
    font-size: 1.5rem;
}

/* Bold labels in sidebar (desktop) */
.sidebar .nav-item span:not(.icon) {
    font-weight: 700;
}

/* Main Content */
.main-content {
    flex: 1;
    background:
        linear-gradient(135deg, rgba(248, 250, 252, 0.4) 0%, rgba(241, 245, 249, 0.35) 100%),
        url('images/dashboard-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow-y: auto;
}

.top-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-bar {
    position: relative;
    width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

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

.date {
    color: var(--text-secondary);
    font-weight: 500;
}

.content-area {
    padding: 2rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

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

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
    padding: 1.75rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 20px;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
    position: relative;
    z-index: 1;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Dashboard Sections */
.dashboard-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 0.75rem;
}

.recent-matches,
.upcoming-matches {
    background: rgba(255, 255, 255, 0.92);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}
.tournament-card,
.match-card,
.team-card,
.player-card,
.expense-card,
.section {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border: 1px solid rgba(15,23,42,0.06);
}
.section h3,
.section p,
.match-card h3,
.tournament-card h3,
.team-card h3,
.player-card h3,
.expense-card h3 {
    color: #0f172a !important;
}
.section .stat-card p,
.section .stat-card h3 {
    color: #0f172a !important;
}
.tournament-card,
.match-card,
.team-card,
.player-card,
.expense-card {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border: 1px solid rgba(15,23,42,0.06);
}
.tournament-card h3,
.team-card h3,
.player-card h3,
.expense-card h3,
.match-card h3 {
    color: #0f172a;
}
.tournament-detail-label,
.match-tournament-name,
.match-status,
.match-detail,
.player-meta,
.player-role,
.expense-meta {
    color: #475569;
}

.recent-matches h3,
.upcoming-matches h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-item {
    padding: 1rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    transition: all 0.3s;
    background: rgba(255,255,255,0.05);
}

.match-item:hover {
    border-color: var(--primary-color);
    background: rgba(255,255,255,0.08);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.match-tournament {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.match-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.match-score {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.team-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.team-header {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.team-badge {
    font-size: 4rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.team-leva {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.team-body {
    padding: 1.5rem;
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.team-coach {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.team-stat {
    text-align: center;
}

.team-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.team-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.team-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Tournaments Grid */
.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.tournament-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

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

.tournament-header {
    display: flex;
    align-items: start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tournament-icon {
    font-size: 2.5rem;
}

.tournament-info {
    flex: 1;
}

.tournament-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.tournament-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

.tournament-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.tournament-detail {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.tournament-detail-label {
    color: var(--text-secondary);
}

.tournament-detail-value {
    font-weight: 600;
}

.tournament-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Matches Grid */
.matches-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* tournament cards scure */
.tournament-card {
    background: rgba(12, 18, 28, 0.9);
    border: 1px solid rgba(255,255,255,0.12);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.tournament-card h3, .tournament-name { color: #ffffff; }

/* match card scure */
.match-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border: 1px solid rgba(15,23,42,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0,0,0,0.2);
}

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

.match-tournament-name {
    font-weight: 600;
    color: #1e293b;
}

.match-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.match-status.scheduled {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.match-status.completed {
    background: rgba(16,185,129,0.15);
    color: #a7f3d0;
}

.match-card-body {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    align-items: center;
    gap: 1rem;
}

.match-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.match-team.away {
    justify-content: flex-end;
}

.match-team-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.match-team-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.match-card-score {
    text-align: center;
}

.match-score-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.match-vs {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.match-card-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.match-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

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

.btn-secondary:hover {
    background: #475569;
}

.btn-back-tournaments {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-right: 1rem;
}

.btn-back-tournaments:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(14, 165, 233, 0.35);
    background: linear-gradient(135deg, #38bdf8 0%, #1d4ed8 100%);
}

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

.btn-danger:hover {
    background: #dc2626;
}

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

.btn-success:hover {
    background: #059669;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s;
}

.modal.modal-offset {
    align-items: flex-start !important;
}

.modal.modal-offset .modal-content {
    margin-top: 72px !important;
    height: calc(100vh - 72px) !important;
}

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

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

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

.modal .close {
    font-size: 1.9rem;
    cursor: pointer;
    color: var(--text-primary);
    line-height: 1;
    transition: color 0.3s, background 0.3s;
    background: rgba(14, 165, 233, 0.12);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    border: none;
    opacity: 1 !important;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

.modal .close:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.15);
}

.modal-body {
    padding: 0 !important;
    margin: 0 !important;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Scroll controllato per modali desktop */
@media (min-width: 768px) {
    #modal .modal-content {
        max-height: 90vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    #modal #modal-body {
        max-height: calc(90vh - 80px);
        overflow-y: auto;
        padding: 0 1.5rem 1.5rem 1.5rem;
        box-sizing: border-box;
    }
}

/* Modal usability on mobile: allow scroll and add safe padding */
@media (max-width: 767px) {
    .modal {
        padding: calc(80px + env(safe-area-inset-top, 0)) 1rem 1.5rem;
        top: 60px !important;
        height: calc(100% - 60px) !important;
    }

    .modal.show {
        align-items: flex-start;
        justify-content: center;
    }

    #modal .modal-content {
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 60px - 24px);
        overflow: hidden;
        margin-top: 0;
    }

    #modal #modal-body {
        padding: 1rem;
        overflow-y: auto;
        max-height: calc(100vh - 60px - 24px - 80px);
        box-sizing: border-box;
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input[type="color"] {
    height: 50px;
    cursor: pointer;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.score-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.score-section h4 {
    margin-bottom: 1rem;
}

.score-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

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

.empty-state-text {
    font-size: 1.1rem;
}

/* Responsive */
/* OLD MOBILE STYLES - REPLACED BY NEW RESPONSIVE DESIGN AT END OF FILE */

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Teams Selection in Tournament Modal */
.teams-selection {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.team-checkbox-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
}

.team-checkbox-item:hover {
    background: #f8fafc;
}

.team-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.team-checkbox-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.team-checkbox-info {
    flex: 1;
}

.team-checkbox-name {
    font-weight: 600;
    font-size: 1rem;
}

.team-checkbox-leva {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Large Modal for Bracket */
.modal-large .modal-content-large {
    max-width: 1200px;
    width: 95%;
    height: 90vh;
}

.modal-large .modal-body {
    padding: 0;
    height: calc(90vh - 80px);
}

/* Bracket Container */
.bracket-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100%;
}

.bracket-sidebar {
    background: #f8fafc;
    padding: 1.5rem;
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bracket-sidebar h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.bracket-teams-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bracket-team-item {
    padding: 0.75rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.bracket-team-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.bracket-team-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.bracket-team-badge {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.bracket-team-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.bracket-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.bracket-main {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.bracket-header {
    margin-bottom: 1.5rem;
}

.bracket-header h4 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.bracket-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.bracket-schedule {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.bracket-match-slot {
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    min-height: 100px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.bracket-match-slot.drag-over {
    border-color: var(--primary-color);
    background: #eff6ff;
    border-style: solid;
}

.bracket-match-slot.complete {
    border-style: solid;
    border-color: var(--success-color);
    background: #f0fdf4;
}

.bracket-slot-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    min-height: 60px;
    position: relative;
}

.bracket-slot-team.home {
    justify-content: flex-start;
}

.bracket-slot-team.away {
    justify-content: flex-end;
}

.bracket-slot-team.empty {
    border: 2px dashed var(--border-color);
    background: white;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.bracket-slot-team.filled {
    background: white;
    border: 2px solid var(--border-color);
}

.bracket-slot-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.bracket-slot-team:hover .bracket-slot-remove {
    opacity: 1;
}

.bracket-slot-vs {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-align: center;
}

.bracket-match-info {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.bracket-match-info input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    flex: 1;
}

.bracket-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

/* Drag and Drop States */
.draggable {
    cursor: grab;
    user-select: none;
}

.draggable:active {
    cursor: grabbing;
}

.drop-zone {
    transition: all 0.3s;
}

.drop-zone.drag-over {
    background: #eff6ff;
    border-color: var(--primary-color);
}

/* Tournament Card Enhancement */
.tournament-card {
    position: relative;
}

.tournament-manage-btn {
    margin-top: 0.5rem;
}

/* Bracket Tabs */
.bracket-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: #f8fafc;
}

.bracket-tab {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.bracket-tab:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

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

.bracket-tab-content {
    display: none;
    height: calc(100% - 60px);
}

.bracket-tab-content.active {
    display: block;
}

/* Groups Management */
.groups-container {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.groups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.groups-header h4 {
    font-size: 1.25rem;
}

.groups-content {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.group-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    height: fit-content;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.group-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.group-teams-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.group-team-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.group-team-item:hover {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.group-team-position {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.group-team-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.group-team-info {
    flex: 1;
}

.group-team-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.group-team-stats {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.group-team-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.group-team-item:hover .group-team-remove {
    opacity: 1;
}

.groups-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

/* Knockout Bracket */
.knockout-container {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.knockout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.knockout-header h4 {
    font-size: 1.25rem;
}

.knockout-controls {
    display: flex;
    gap: 0.5rem;
}

.knockout-bracket {
    flex: 1;
    overflow: auto;
    background: #f8fafc;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.knockout-rounds {
    display: flex;
    justify-content: space-around;
    gap: 3rem;
    min-width: fit-content;
}

.knockout-round {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 2rem;
    min-width: 250px;
}

.knockout-round-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.knockout-match {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    position: relative;
}

.knockout-match:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.knockout-match.completed {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.knockout-match.upcoming {
    border-style: dashed;
    opacity: 0.7;
}

.knockout-match-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.knockout-team {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: #f8fafc;
    margin-bottom: 0.5rem;
    transition: all 0.3s;
}

.knockout-team:last-child {
    margin-bottom: 0;
}

.knockout-team.winner {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid var(--success-color);
    font-weight: 700;
}

.knockout-team.loser {
    opacity: 0.5;
}

.knockout-team.empty {
    border: 2px dashed var(--border-color);
    background: white;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.knockout-team-badge {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.knockout-team-name {
    flex: 1;
    font-weight: 600;
}

.knockout-team-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 30px;
    text-align: center;
}

.knockout-vs {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 0.25rem 0;
}

.knockout-match-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.knockout-match-actions button {
    flex: 1;
}

.knockout-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.knockout-winner-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #8b4513;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Empty State for Knockout */
.knockout-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.knockout-empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.knockout-empty-text {
    font-size: 1.1rem;
}

/* Responsive Bracket */
@media (max-width: 1024px) {
    .bracket-container {
        grid-template-columns: 1fr;
    }

    .bracket-sidebar {
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        max-height: 200px;
    }

    .modal-large .modal-content-large {
        width: 98%;
        height: 95vh;
    }

    .groups-content {
        grid-template-columns: 1fr;
    }

    .knockout-rounds {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .modal {
        align-items: flex-start;
        padding: calc(80px + env(safe-area-inset-top, 0)) 1rem 1.5rem;
    }

    .modal-content {
        border-radius: 16px;
        width: 94%;
        margin-top: calc(60px + env(safe-area-inset-top, 0));
    }

    .modal-header {
        padding: 1.25rem 1rem;
    }

    .modal .close {
        width: 38px;
        height: 38px;
        font-size: 1.6rem;
        background: rgba(14, 165, 233, 0.14);
        top: 0.45rem;
        right: 0.45rem;
    }

    .bracket-match-slot {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .bracket-slot-vs {
        transform: rotate(90deg);
    }

    .bracket-tabs {
        flex-wrap: wrap;
    }

    .bracket-tab {
        flex: 1;
        min-width: 120px;
    }
}

/* Additional Styles for Supervisor */
.role-badge {
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 600;
}

.nav-footer {
    padding: 1rem;
    margin-top: auto;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0;
}

.tactics-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tactics-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tactics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.tactics-panel {
    width: 100%;
}

.football-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.tactics-error {
    display: none;
    color: #b91c1c;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tactics-notice {
    display: none;
    color: #166534;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tactics-panel-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    justify-content: flex-start;
    align-items: center;
}

/* Player Card Styling for Coach Portal */
.data-grid .card {
    background: white;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
}

.data-grid .card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.data-grid .card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
    text-align: center;
}

.data-grid .card p {
    margin: 0.75rem 0;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
    border-left: 3px solid var(--success-color);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.data-grid .card p strong {
    display: inline-block;
    min-width: 120px;
    color: var(--success-color);
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Players Page Header */
.players-page-header {
    position: relative;
    top: auto;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18) 0%, rgba(37, 99, 235, 0.16) 100%);
    z-index: 1;
    padding: 0.75rem 1rem;
    margin: 0 0 1rem 0;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.18);
}

.players-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    width: 100%;
}

.players-header-top .page-title {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
    text-shadow: none;
}

.btn-add-player {
    width: 56px;
    height: 56px;
    background: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-add-player:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-add-player:active {
    transform: scale(0.95);
}

.plus-icon {
    font-size: 2rem;
    font-weight: 300;
    color: #0ea5e9;
    line-height: 1;
}

/* Reuse player add-btn style for expenses "+" */
.page-title-card .btn.btn-primary.btn-icon-only {
    width: 56px;
    height: 56px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 0;
}
.page-title-card .btn.btn-primary.btn-icon-only span {
    font-size: 2rem;
    font-weight: 300;
    color: #0ea5e9;
    line-height: 1;
}
.page-title-card .btn.btn-primary.btn-icon-only:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.page-title-card .btn.btn-primary.btn-icon-only:active {
    transform: scale(0.95);
}

.players-search-container {
    padding: 0 0.25rem;
}

.players-search-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.players-search-input:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

/* Players Grid - Modern Card Layout */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    width: 100%;
    align-items: stretch;
}

.players-grid.players-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.player-groups-board {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.group-manager {
    grid-column: 1 / -1;
}

/* Forzatura colonne più dense su desktop largo */
@media (min-width: 1024px) {
    .player-groups-board {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

.player-group-card {
    background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
    border: 1px solid #93c5fd;
    border-radius: 16px;
    padding: 0.9rem;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.player-group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.player-group-name {
    font-weight: 800;
    color: #0f172a;
    font-size: 1.05rem;
}

.player-group-count {
    color: #1d4ed8;
    font-size: 0.9rem;
}

.public-access-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #065f46;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.public-access-badge.public-access-badge-compact {
    padding: 0.22rem 0.45rem;
    font-size: 0.75rem;
    line-height: 1;
}

.player-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: none;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.player-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.player-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
}

.player-card-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #0ea5e9 0%, #2563eb 100%);
}

.player-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
    flex-shrink: 0;
    position: relative;
}

.player-number::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 18px;
    padding: 2px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-position {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(14, 165, 233, 0.1);
    border-radius: 6px;
}

.player-card.player-card-compact {
    border-radius: 14px;
}

.player-card.player-card-compact:hover {
    transform: translateY(-3px);
}

.player-card.player-card-compact .player-card-header {
    padding: 0.9rem 1rem;
    gap: 0.75rem;
}

.player-card.player-card-compact .player-name {
    font-size: 1.05rem;
    margin-bottom: 0.2rem;
}

.player-card.player-card-compact .player-position {
    font-size: 0.75rem;
    padding: 0.18rem 0.6rem;
    border-radius: 8px;
}

.player-card.player-card-compact .player-card-actions .btn:first-child {
    border-radius: 0 0 0 14px;
}

.player-card.player-card-compact .player-card-actions .btn:last-child {
    border-radius: 0 0 14px 0;
}

.player-card.player-card-compact .player-card-actions .btn {
    padding: 0.75rem 0.6rem;
    font-size: 0.9rem;
}

.player-card-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.player-card-toolbar-icon {
    font-size: 0.95rem;
    opacity: 0.9;
    flex-shrink: 0;
}

.player-card-toolbar select {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-weight: 700;
    color: #0f172a;
}

.player-card-actions {
    display: flex;
    gap: 0;
    border-top: 1px solid #e5e7eb;
}

.player-card-actions .btn {
    flex: 1;
    border-radius: 0;
    border: none;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.2s;
}

.player-card-actions .btn:first-child {
    border-radius: 0 0 0 20px;
    border-right: 1px solid #e5e7eb;
}

.player-card-actions .btn:last-child {
    border-radius: 0 0 20px 0;
}

.player-card-actions .btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.player-card-actions .btn-secondary:hover {
    background: #e2e8f0;
}

.player-card-actions .btn-danger {
    background: #fef2f2;
    color: #dc2626;
}

.player-card-actions .btn-danger:hover {
    background: #fee2e2;
}

.card-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    padding: 0.75rem;
    background: var(--card-bg);
    border-left: 3px solid var(--primary-color);
    border-radius: 0.5rem;
}

.btn-block {
    width: 100%;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-content h3 {
    margin-bottom: 0;
    margin-top: 0;
    color: var(--text-primary);
}

.close {
    color: var(--text-secondary);
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.close:hover,
.close:focus {
    color: var(--danger-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: white;
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* Coach-specific styles */
.coach-badge {
    background: var(--success-color);
}

.coach-stat {
    border-left: 4px solid var(--success-color);
}

.coach-info {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.coach-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.login-help {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}

.login-help small {
    font-size: 0.8rem;
}

.forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password a {
    color: #000000;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.forgot-password a:hover {
    color: #000000;
    text-decoration: underline;
}

.welcome-section {
    background: rgba(255, 255, 255, 0.92);
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border: 1px solid rgba(15,23,42,0.06);
}
.welcome-section h2 { color: var(--text-primary); }
.welcome-section p { color: var(--text-secondary); }

@media (max-width: 768px) {
    .welcome-section {
        background: rgba(255, 255, 255, 0.92) !important;
        padding: 1.5rem !important;
        border-radius: 16px !important;
        margin-bottom: 1.25rem !important;
        box-shadow: 0 14px 32px rgba(0,0,0,0.14) !important;
        color: var(--text-primary) !important;
    }
    .welcome-section h2 { color: var(--text-primary) !important; }
    .welcome-section p { color: var(--text-secondary) !important; }
}

.team-info-card, .team-card, .team-header {
    background: white;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.team-card h3, .team-info-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.3);
    letter-spacing: 0.5px;
    text-align: center;
}

.team-card p, .team-info-card p {
    margin: 0.75rem 0;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-left: 3px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.team-card p strong, .team-info-card p strong {
    display: inline-block;
    min-width: 100px;
    color: var(--primary-color);
    font-weight: 700;
}

.player-number {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    border: 3px solid white;
    z-index: 10;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
}

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

.match-card {
    background: white;
    padding: 1.75rem;
    border-radius: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.match-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.my-team {
    color: var(--primary-color);
    font-weight: 700;
}

/* User Menu Dropdown */
.user-menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    padding: 8px;
    z-index: 1000;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}

.user-menu-item:hover {
    background: #fee2e2;
    color: #dc2626;
}

.user-menu-item span:first-child {
    font-size: 18px;
}

/* Team Showcase Styles */
.team-showcase {
    max-width: 1200px;
    margin: 0 auto;
}

.team-hero {
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.team-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

.team-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.team-badge {
    margin: 0 auto;
}

.badge-shield {
    width: 200px;
    height: 240px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border: 6px solid rgba(255, 255, 255, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    border-radius: 20px 20px 100px 100px / 20px 20px 60% 60%;
    clip-path: path('M 20,0 L 180,0 Q 200,0 200,20 L 200,120 Q 200,180 100,240 Q 0,180 0,120 L 0,20 Q 0,0 20,0 Z');
}

.badge-shield::before {
    content: '';
    position: absolute;
    inset: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
    border-radius: 15px 15px 95px 95px / 15px 15px 60% 60%;
    pointer-events: none;
}

.shield-leva-label {
    font-size: 1.5rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 1;
    margin-top: -1rem;
    margin-bottom: 0.5rem;
}

.shield-leva-year {
    font-size: 4.5rem;
    font-weight: 900;
    color: #1e293b;
    z-index: 1;
    line-height: 1;
    margin-bottom: 1rem;
}

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

.team-hero-name {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.team-hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.team-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

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

.hero-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-stat-divider {
    width: 2px;
    height: 60px;
    background: rgba(255, 255, 255, 0.3);
}

.team-positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.position-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.position-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.position-card {
    cursor: pointer;
    user-select: none;
}

.position-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: currentColor;
}

.position-card:active {
    transform: translateY(-4px) scale(0.98);
}

.position-card:hover::before {
    opacity: 1;
}

.gk-card { color: #f59e0b; }
.df-card { color: #3b82f6; }
.mf-card { color: #10b981; }
.fw-card { color: #ef4444; }

.position-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.position-info {
    margin-bottom: 1.5rem;
}

.position-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.position-count {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

.position-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 700;
    color: #64748b;
    min-width: 45px;
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .team-hero {
        padding: 2rem 1.5rem;
    }

    .team-hero-name {
        font-size: 2rem;
    }

    .team-hero-subtitle {
        font-size: 1.2rem;
    }

    .badge-shield {
        width: 160px;
        height: 190px;
    }

    .shield-leva-label {
        font-size: 1.2rem;
    }

    .shield-leva-year {
        font-size: 3.5rem;
    }

    .team-positions-grid {
        grid-template-columns: 1fr;
    }
}

/* Players Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table thead {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: white;
}

.data-table th {
    padding: 0.875rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: #f9fafb;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table td {
    padding: 0.75rem 0.75rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

.data-table td:first-child {
    font-weight: 600;
    color: var(--primary-color);
}

/* Column widths */
.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 8%;
    min-width: 60px;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 20%;
    min-width: 120px;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 20%;
    min-width: 120px;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 15%;
    min-width: 100px;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 25%;
    min-width: 180px;
    text-align: left;
}

/* Actions cell */
.data-table .actions-cell {
    white-space: nowrap;
    text-align: left;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
    margin: 0 0.125rem;
}

.btn-icon:hover {
    background: #f3f4f6;
    transform: scale(1.1);
}

.btn-icon.success:hover {
    background: #d1fae5;
}

.btn-icon.warning:hover {
    background: #fef3c7;
}

.btn-icon.danger:hover {
    background: #fee2e2;
    transform: scale(1.15);
}

/* Match Group Cards (Expandable) */
.match-group-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #cbd5e1;
    margin-bottom: 20px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.match-group-card,
.match-group-card * {
    color: #0f172a !important;
}

.match-group-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.match-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #0f172a;
    color: #ffffff !important;
    cursor: pointer;
    user-select: none;
}

.match-group-header:hover {
    background: #111827;
}

.match-group-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.match-group-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.expand-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.match-group-content {
    padding: 15px;
    background: #f9fafb;
}

/* Match Card Inside Group */
.match-card-in-group {
    background: #ffffff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.match-card-in-group:last-child {
    margin-bottom: 0;
}

.match-card-in-group:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.match-card-in-group .match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.match-card-in-group,
.match-card-in-group * {
    color: #0f172a !important;
}

.match-card-in-group .match-status {
    color: #0f172a !important;
    font-weight: 700;
}

.match-card-in-group .match-location {
    font-weight: 600;
    color: #1f2937 !important;
}

.match-card-in-group .match-date {
    color: #1f2937 !important;
    font-size: 0.9rem;
}

.match-card-in-group .match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
}

.match-card-in-group .team-home,
.match-card-in-group .team-away {
    flex: 1;
    font-weight: 500;
    color: #374151;
}

.match-card-in-group .team-away {
    text-align: right;
}

.match-card-in-group .my-team {
    font-weight: 700;
    color: #6366f1;
}

.match-card-in-group .match-score {
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    min-width: 80px;
    text-align: center;
}

.match-card-in-group .match-tournament,
.match-card-in-group .match-venue {
    margin-top: 8px;
    padding: 6px 10px;
    background-color: #e5e7eb;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #0f172a !important;
    text-align: center;
}

.match-card-in-group .match-tournament {
    background-color: #e5e7eb;
    color: #0f172a !important;
}

.match-group-card .match-group-header h3,
.match-group-card .match-group-header p,
.match-group-card .match-header,
.match-group-card .match-teams,
.match-group-card .match-score,
.match-group-card .match-status,
.match-group-card .match-tournament,
.match-group-card .match-venue,
.match-group-card .match-actions .btn {
    color: #0f172a !important;
}

.match-group-card .match-actions .btn.btn-secondary {
    color: #111827 !important;
}

.match-card-in-group .match-actions {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.match-card-in-group .match-actions .btn {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* ========================================

/* ========================================
   BIRTHDAY GRID RESPONSIVE
   ======================================== */

/* Desktop - 2 columns */
.birthdays-grid {
    grid-template-columns: 1fr 1fr !important;
}

/* ========================================
   MOBILE WEB APP - PROFESSIONAL DESIGN
   ======================================== */

@media (max-width: 768px) {
    /* Reset e Base */
    body {
        font-size: 16px;
        -webkit-font-smoothing: antialiased;
        -webkit-tap-highlight-color: transparent;
    }

    .app-container {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
        padding-top: calc(60px + env(safe-area-inset-top, 0));
    }

    /* ========== MOBILE HEADER ========== */
    .mobile-header {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
        z-index: 1100 !important;
        padding: calc(env(safe-area-inset-top, 0) / 2) 1rem 0 1rem !important;
    }

    .mobile-header-content {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 100% !important;
    }

    .mobile-user-info {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .mobile-user-avatar {
        width: 40px !important;
        height: 40px !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.25rem !important;
    }

    .mobile-user-details {
        display: flex !important;
        flex-direction: column !important;
        color: white !important;
    }

    .mobile-user-name {
        font-size: 1rem !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
    }

    .mobile-user-meta {
        font-size: 0.75rem !important;
        opacity: 0.9 !important;
        line-height: 1.2 !important;
    }

    .mobile-user-role {
        font-size: 0.75rem !important;
        opacity: 0.9 !important;
        line-height: 1.2 !important;
    }

    .mobile-menu-wrapper {
        position: static !important;
    }

    .mobile-menu-btn {
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        font-size: 1.75rem !important;
        font-weight: bold !important;
        color: white !important;
        line-height: 1 !important;
    }

    .mobile-menu-btn:active {
        transform: scale(0.9) !important;
        background: rgba(255, 255, 255, 0.3) !important;
    }

    .mobile-dropdown-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        height: 100vh !important;
        width: 75% !important;
        max-width: 300px !important;
        background: white !important;
        border-radius: 0 16px 16px 0 !important;
        box-shadow: 4px 0 25px rgba(15, 23, 42, 0.25) !important;
        padding-top: 70px !important;
        display: block !important;
        transform: translateX(-105%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
        z-index: 1102 !important;
    }

    .mobile-dropdown-menu.open {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    .mobile-menu-item {
        width: 100% !important;
        padding: 1rem 1.25rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        background: white !important;
        border: none !important;
        cursor: pointer !important;
        transition: background 0.2s ease !important;
        text-align: left !important;
        font-size: 1rem !important;
        color: #1e293b !important;
        font-weight: 500 !important;
    }

    .mobile-menu-item:active {
        background: #f1f5f9 !important;
    }

    .mobile-menu-item .menu-icon {
        font-size: 1.25rem !important;
        width: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .mobile-menu-item + .mobile-menu-item {
        border-top: 1px solid #e2e8f0 !important;
    }

    .sidebar .nav-item:active {
        transform: scale(0.95);
        background: rgba(59, 130, 246, 0.2);
    }

    .sidebar .nav-item.active {
        border-bottom: 3px solid #3b82f6 !important;
        background: rgba(59, 130, 246, 0.15) !important;
        border-left: none !important;
    }

    .sidebar .nav-item .icon {
        font-size: 1.4rem !important;
        margin: 0 !important;
        line-height: 1 !important;
    }

    .sidebar .nav-item span:not(.icon) {
        font-size: 0.6rem !important;
        font-weight: 700 !important;
        display: block !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        max-width: 100% !important;
        line-height: 1.1 !important;
        word-break: break-word !important;
        hyphens: auto !important;
    }

    /* ========== MAIN CONTENT ========== */
    .main-content {
        margin-left: 0 !important;
        margin-top: 60px !important;
        margin-bottom: 0 !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 0 !important;
        background: #f1f5f9 !important;
        -webkit-overflow-scrolling: touch;
    }

    .content-area {
        padding: 1rem !important;
        min-height: 100%;
    }

    /* ========== PAGE HEADERS ========== */
    .page-header {
        flex-direction: column !important;
        gap: 0.5rem !important;
        align-items: stretch !important;
        margin-bottom: 0.75rem !important;
        padding: 0.75rem 1rem !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }

    .page-title {
        font-size: 1.25rem !important;
        font-weight: 700 !important;
        margin: 0 !important;
    }

    /* ========== WELCOME SECTION ========== */
    .welcome-section {
        padding: 1rem !important;
        background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%) !important;
        border-radius: 12px !important;
        color: white !important;
        margin-bottom: 1rem !important;
    }

    .welcome-section h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.25rem !important;
        font-weight: 600 !important;
    }

    .welcome-section p {
        font-size: 0.85rem !important;
        opacity: 0.9 !important;
        margin: 0 !important;
    }

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

    .stat-card {
        padding: 1.25rem !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
        transition: transform 0.2s !important;
    }

    .stat-card:active {
        transform: scale(0.98);
    }

    .stat-icon {
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
    }

    .stat-info h3 {
        font-size: 1.75rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.25rem !important;
    }

    .stat-info p {
        font-size: 0.75rem !important;
        font-weight: 500 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    /* ========== BUTTONS ========== */
    .btn {
        min-height: 48px !important;
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        transition: all 0.2s !important;
        touch-action: manipulation !important;
    }

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

    .btn-primary {
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
    }

    .btn-block {
        width: 100% !important;
    }

    /* ========== SEARCH & INPUTS ========== */
    #player-search-input {
        width: 100% !important;
        min-width: 100% !important;
        min-height: 48px !important;
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
        border-radius: 10px !important;
        margin-bottom: 1rem !important;
    }

    /* ========== CARDS & LISTS ========== */
    .data-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    /* ========== PLAYERS PAGE MOBILE ========== */
    #players-page {
        padding-top: 0 !important;
    }

	    .players-page-header {
	        position: fixed !important;
	        top: 68px !important;
	        left: 0 !important;
	        right: 0 !important;
	        background: var(--gradient-card) !important;
	        z-index: 99 !important;
	        padding-top: 0.75rem !important;
	        padding-bottom: 0.75rem !important;
	        margin-bottom: 0 !important;
	        margin-top: 0 !important;
	        border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
	    }

    .players-header-top {
        padding: 1rem !important;
        margin-bottom: 0.5rem !important;
        margin-left: 1rem !important;
        margin-right: 1rem !important;
        margin-top: 0 !important;
        border-radius: 12px !important;
    }

    .players-search-container {
        padding: 0 1rem !important;
        margin-top: 0 !important;
    }

    .players-header-top .page-title {
        font-size: 1.25rem !important;
    }

    .btn-add-player {
        width: 52px !important;
        height: 52px !important;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2) !important;
    }

    .btn-add-player:active {
        transform: scale(0.9) !important;
    }

    .plus-icon {
        font-size: 1.75rem !important;
    }

    .players-search-input {
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
    }

    /* ========== PLAYERS GRID MOBILE ========== */
    #players-list {
        padding: 0 1rem !important;
        margin-top: 115px !important;
    }

    .players-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .player-card {
        border-radius: 16px !important;
        box-shadow: 0 3px 8px rgba(0,0,0,0.1) !important;
        transition: transform 0.2s !important;
    }

    .player-card:active {
        transform: scale(0.98) !important;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }

    .player-card-header {
        padding: 1.25rem !important;
        gap: 1rem !important;
    }

    .player-number {
        width: 64px !important;
        height: 64px !important;
        font-size: 1.5rem !important;
        border-radius: 14px !important;
        flex-shrink: 0 !important;
    }

    .player-info {
        flex: 1 !important;
        min-width: 0 !important;
    }

    .player-name {
        font-size: 1.125rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.375rem !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .player-position {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        padding: 0.25rem 0.625rem !important;
    }

    .player-card-actions {
        display: flex !important;
        gap: 0 !important;
        border-top: 1px solid #e5e7eb !important;
    }

    .player-card-actions .btn {
        flex: 1 !important;
        padding: 0.875rem !important;
        min-height: 48px !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        border-radius: 0 !important;
    }

    .player-card-actions .btn:first-child {
        border-radius: 0 0 0 16px !important;
        border-right: 1px solid #e5e7eb !important;
    }

    .player-card-actions .btn:last-child {
        border-radius: 0 0 16px 0 !important;
    }

    .team-card {
        padding: 1.25rem !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
        transition: transform 0.2s !important;
    }

    .team-card:active {
        transform: scale(0.98);
    }

    /* ========== CALENDAR MOBILE - VERTICAL LIST ========== */

    /* Calendar container */
    .calendar-container {
        padding: 0 !important;
        margin-bottom: 1rem !important;
    }

    /* FORZA: Rimuovi TUTTO lo spazio tra header e contenuto delle carte giorno */
    .calendar-container * {
        margin-top: 0 !important;
    }

    .calendar-container > * > * > div:first-child {
        margin-bottom: 0 !important;
        padding-bottom: 0.25rem !important;
    }

    .calendar-container > * > * > div:nth-child(2) {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
    }

    /* Calendar header fixed (non si muove mai) */
    .calendar-month-header {
        position: fixed !important;
        top: 68px !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 1rem !important;
        z-index: 100 !important;
        width: calc(100% - 2rem) !important;
    }

    /* Spazio per l'header fisso */
    .calendar-container > div:nth-child(2),
    .coach-calendar .calendar-days-list {
        margin-top: 65px !important;
        padding-top: 0.5rem !important;
    }

    /* Month navigation header */
    .calendar-container > div:first-child {
        flex-direction: row !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
        padding-bottom: 0.75rem !important;
    }

    /* Navigation buttons - make them icon-only on mobile */
    .calendar-container > div:first-child .btn {
        min-height: 44px !important;
        padding: 0.5rem 1rem !important;
        font-size: 1.25rem !important;
        font-weight: 700 !important;
    }

    .calendar-container > div:first-child .btn span:not(:first-child) {
        display: none !important;
    }

    /* Fix per i nuovi pulsanti freccia senza classe .btn */
    .calendar-container > div:first-child button {
        min-width: 40px !important;
        min-height: 40px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Month title in header */
    .calendar-container > div:first-child h2,
    .calendar-month-title {
        font-size: 1rem !important;
        flex: 1 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }

    /* Extra small screens */
    @media (max-width: 360px) {
        .calendar-month-title {
            font-size: 0.85rem !important;
        }
    }

    /* Hide day names header on mobile */
    .calendar-container > div:nth-child(2) {
        display: none !important;
    }

    /* Calendar grid - CHANGE TO VERTICAL LIST */
    .calendar-container > div:nth-child(3) {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        grid-template-columns: unset !important;
    }

    /* Hide empty cells (days before/after month) */
    .calendar-container > div:nth-child(3) > div[style*="background: #f9fafb"] {
        display: none !important;
    }

    /* Calendar day cells - FULL WIDTH CARDS */
    .coach-calendar .calendar-day-card {
        min-height: auto !important;
        padding: 0.75rem !important;
        border-radius: 12px !important;
        overflow: visible !important;
        background: white !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        border: 2px solid #e5e7eb !important;
        display: flex !important;
        flex-direction: column !important;
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    .coach-calendar {
        padding: 0 1rem !important;
        margin-bottom: 1rem !important;
    }

    .coach-calendar .calendar-days-list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .coach-calendar .calendar-day-card > div:first-child {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
    }

    .coach-calendar .calendar-day-card > div:first-child > div:first-child {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }

    .coach-calendar .calendar-day-card > div:first-child > div:last-child {
        display: flex !important;
        gap: 0.35rem !important;
        flex-shrink: 0 !important;
    }

    .coach-calendar .calendar-day-card > div:first-child .calendar-add-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 20px !important;
    }

    .coach-calendar .calendar-events-list {
        margin-top: 0.25rem !important;
        padding-top: 0 !important;
    }

    /* Today's card - special styling */
    .coach-calendar .calendar-day-card[style*="background: #dbeafe"] {
        background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
        border-color: #3b82f6 !important;
        box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2) !important;
    }

    /* Day number header in card */
    .calendar-container > div:nth-child(3) > div > div:first-child,
    div[id*="today-card"] > div:first-child,
    .coach-calendar .calendar-day-card > div:first-child {
        font-size: 1rem !important;
        font-weight: 700 !important;
        margin-bottom: 0 !important;
        padding-bottom: 0.1rem !important;
        border-bottom: 2px solid #e5e7eb !important;
        color: #1f2937 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        line-height: 1 !important;
    }

    /* Add day name after number using CSS */
    .calendar-container > div:nth-child(3) > div > div:first-child::after {
        content: '';
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        color: #6b7280 !important;
        text-transform: uppercase !important;
    }

    /* Event container inside day card */
    .calendar-container > div:nth-child(3) > div > div:nth-child(2),
    .calendar-container div > div[style*="display: flex; flex-direction: column; gap: 0.5rem"] {
        gap: 0.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0.1rem !important;
    }

    /* Match event cards */
    .calendar-container > div:nth-child(3) > div > div:nth-child(2) > div {
        padding: 0.75rem !important;
        border-radius: 8px !important;
        margin-bottom: 0 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }

    /* Match event - time and icon */
    .calendar-container > div:nth-child(3) > div > div:nth-child(2) > div > div:first-child {
        font-size: 0.875rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.375rem !important;
    }

    /* Match event - opponent */
    .calendar-container > div:nth-child(3) > div > div:nth-child(2) > div > div:nth-child(2) {
        font-size: 0.875rem !important;
        white-space: normal !important;
        overflow: visible !important;
        line-height: 1.4 !important;
        font-weight: 600 !important;
    }

    /* Match event - score */
    .calendar-container > div:nth-child(3) > div > div:nth-child(2) > div > div:nth-child(3) {
        font-size: 0.875rem !important;
        margin-top: 0.25rem !important;
        font-weight: 700 !important;
    }

    /* Training event cards */
    .calendar-container > div:nth-child(3) > div > div:nth-child(2) > div[style*="linear-gradient"] {
        padding: 0.875rem !important;
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2) !important;
    }

    .calendar-container > div:nth-child(3) > div > div:nth-child(2) > div[style*="linear-gradient"] > div:first-child {
        font-size: 0.875rem !important;
        font-weight: 700 !important;
        margin-bottom: 0.375rem !important;
    }

    .calendar-container > div:nth-child(3) > div > div:nth-child(2) > div[style*="linear-gradient"] > div:nth-child(2) {
        font-size: 0.875rem !important;
        font-weight: 600 !important;
    }

    .calendar-container > div:nth-child(3) > div > div:nth-child(2) > div[style*="linear-gradient"] > div:nth-child(3) {
        font-size: 0.8rem !important;
        margin-top: 0.25rem !important;
    }

    /* Add button container */
    .calendar-container > div:nth-child(3) > div > div:last-child {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
        border-top: 1px solid #e5e7eb !important;
        display: flex !important;
        justify-content: center !important;
    }

    .calendar-add-btn {
        width: 44px;
        height: 44px;
        font-size: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-weight: 700;
        transition: all 0.2s;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
    }

.calendar-add-btn:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

    /* ========== MODAL MOBILE ========== */
    .modal {
        padding: 0 !important;
    }

    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 1rem 1rem 0 1rem !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .modal-content h3 {
        font-size: 1.2rem !important;
        font-weight: 700 !important;
        margin-bottom: 0 !important;
        margin-top: 0 !important;
    }

    .close {
        font-size: 2rem !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
    }

    /* Modal action buttons - mobile optimized */
    .modal-content > div > div[style*="margin-top: 20px"] {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .modal-content > div > div[style*="margin-top: 20px"] > button {
        width: 100% !important;
        min-width: auto !important;
        flex: none !important;
        justify-content: center !important;
    }

    .modal-content > div > div[style*="margin-top: 20px"] > div {
        width: 100% !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .modal-content > div > div[style*="margin-top: 20px"] > div > button {
        width: 100% !important;
    }

    /* ========== FORMS ========== */
    .form-group {
        margin-bottom: 1.25rem !important;
    }

    .form-group label {
        font-size: 0.95rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.5rem !important;
        display: block !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100% !important;
        min-height: 48px !important;
        font-size: 1rem !important;
        padding: 0.75rem 1rem !important;
        border-radius: 10px !important;
        border: 2px solid #e2e8f0 !important;
        transition: border 0.2s !important;
    }

    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        border-color: #3b82f6 !important;
        outline: none !important;
    }

    .form-actions {
        display: flex !important;
        flex-direction: column-reverse !important;
        gap: 0.75rem !important;
        margin-top: 1.5rem !important;
    }

    .form-actions .btn {
        width: 100% !important;
    }

    /* ========== AUTOCOMPLETE ========== */
    .autocomplete-suggestions {
        max-height: 200px !important;
        font-size: 1rem !important;
        border-radius: 10px !important;
    }

    .autocomplete-suggestion {
        padding: 0.75rem !important;
        min-height: 48px !important;
    }

    /* ========== MATCH CARDS ========== */
    .matches-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .match-card {
        padding: 1.25rem !important;
        border-radius: 12px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }

    /* ========== TABLES ========== */
    table {
        font-size: 0.85rem !important;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem !important;
    }

    /* ========== TOUCH IMPROVEMENTS ========== */
    * {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
        tap-highlight-color: rgba(0, 0, 0, 0.05);
    }

    button, .btn, a, .nav-item, .player-card, .match-card {
        touch-action: manipulation;
        -webkit-user-select: none;
        user-select: none;
    }

    input, textarea, select {
        touch-action: manipulation;
        -webkit-user-select: auto;
        user-select: auto;
    }

    /* Smooth scrolling */
    .main-content,
    .modal-content {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }

    /* Hide scrollbar but keep functionality */
    .main-content::-webkit-scrollbar {
        width: 3px;
    }

    .main-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .main-content::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,0.2);
        border-radius: 3px;
    }

    /* ========== SECTIONS ========== */
    .section {
        padding: 1.25rem !important;
        background: rgba(255, 255, 255, 0.95) !important;
        border-radius: 12px !important;
        box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
        margin-bottom: 0 !important;
        color: #0f172a !important;
    }

    .dashboard-sections {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    /* ========== EVENT TYPE DIALOG ========== */
    #event-type-dialog .modal-content {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 2rem 1.5rem !important;
    }

    #event-type-dialog h3 {
        font-size: 1.5rem !important;
        margin-bottom: 2rem !important;
    }

    #event-type-dialog .btn {
        min-height: 60px !important;
        font-size: 1.125rem !important;
        margin: 0.5rem 0 !important;
    }

    /* ========== ROLE BADGE ========== */
    .role-badge {
        font-size: 0.8rem !important;
        padding: 0.375rem 0.75rem !important;
    }

    /* ========== USER MENU ========== */
    .user-menu-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 75px !important;
        right: 10px !important;
    }
}

/* ========== EXTRA SMALL DEVICES ========== */
@media (max-width: 375px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .sidebar .nav-item span:not(.icon) {
        font-size: 0.6rem !important;
    }

    .calendar-grid > div {
        min-height: 75px !important;
        font-size: 0.7rem !important;
    }

    /* Birthday card responsive */
    .birthdays-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

    /* Force single column on mobile for birthdays */
    #birthdays-card .birthdays-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }
}
    .coach-calendar .calendar-event-draggable {
        cursor: grab;
        touch-action: none;
    }

    .coach-calendar .calendar-event-dragging {
        opacity: 0.7;
        cursor: grabbing;
    }

    .coach-calendar .calendar-day-card.calendar-drop-target {
        border-color: #2563eb !important;
        background: #eff6ff !important;
    }
.coach-calendar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.coach-calendar .calendar-day-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.coach-calendar .calendar-day-card.calendar-drop-target {
    border-color: #2563eb;
    background: #eff6ff;
}

.coach-calendar .calendar-event-draggable {
    cursor: grab;
    touch-action: none;
}

.coach-calendar .calendar-event-dragging {
    opacity: 0.7;
    cursor: grabbing;
}

.coach-calendar .calendar-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-badge.submitted { background: #fef3c7; color: #92400e; }
.status-badge.approved { background: #dbeafe; color: #1d4ed8; }
.status-badge.paid { background: #d1fae5; color: #065f46; }
.status-badge.rejected { background: #fee2e2; color: #991b1b; }
.squad-modal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 80vh;
    padding-top: 0.5rem;
}

 .match-info-card {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    color: #fff;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
    position: sticky;
    top: 1.25rem;
    z-index: 5;
    margin: 0.75rem 0 0.5rem;
}

.match-info-badge {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.match-info-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.match-info-date {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.squad-list-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    max-height: calc(100vh - 260px);
}

.squad-list {
    background: #f9fafb;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.squad-player-card {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.65rem;
    background: #fff;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.squad-player-card.selected {
    border-color: #0ea5e9;
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.2);
    background: #ffffff;
    color: #0f172a;
}

.squad-player-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.squad-player-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0ea5e9;
}

.squad-player-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.add-goal-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.add-goal-btn[disabled] {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
}

.add-goal-btn:not([disabled]):hover {
    transform: scale(1.08);
}

.goals-pill small {
    color: #10b981;
    font-weight: 600;
}

.squad-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.25rem;
    padding-bottom: 0.5rem;
}

.squad-action-btn {
    flex: 0 0 auto;
    font-size: 0.9rem;
    padding: 0.5rem 0.8rem;
    min-height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.squad-action-btn.whatsapp {
    background: #25D366;
    border-color: #25D366;
}

@media (max-width: 640px) {
    .squad-modal {
        min-height: 100%;
        padding-top: 1rem;
        padding-bottom: calc(2.4rem + env(safe-area-inset-bottom, 0));
    }

     .match-info-card {
        position: relative;
        top: 0;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .squad-list-wrapper {
        max-height: calc(100vh - 260px);
        padding-bottom: 0.15rem;
    }

    .squad-actions {
        position: fixed;
        left: 0;
        right: 0;
        bottom: env(safe-area-inset-bottom, 0);
        padding: 0.5rem 0.75rem calc(1rem + env(safe-area-inset-bottom, 0));
        background: rgba(255,255,255,0.96);
        border-top: 1px solid #e5e7eb;
        backdrop-filter: blur(6px);
        box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.12);
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 0;
    }

    .squad-action-btn {
        flex: 0 1 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
        font-size: 0.9rem;
        min-height: 36px;
        padding: 0.45rem 0.75rem;
        border-radius: 10px;
    }
}

@media (min-width: 641px) {
    .squad-actions {
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    .tactics-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }
    #tactics-page .tactics-actions {
        justify-content: flex-start;
        gap: 1rem;
        flex-wrap: wrap;
    }
    #tactics-page .tactics-actions .btn {
        padding: 0.8rem 1.2rem;
    }
    #tactics-page .football-field {
        max-width: 1000px;
    }
    #tactics-page .tactics-panel {
        width: 360px;
        max-width: 380px;
        min-width: 320px;
    }
    #tactics-page .football-wrapper {
        flex: 1;
        min-width: 720px;
    }
    #tactics-page .tactics-panel-actions {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

/* --- Override mobile header/sidebar to match org/public --- */
@media (max-width: 768px) {
    .mobile-header {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: #0b0d14 !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 0.6rem !important;
        padding: 0.75rem 1rem !important;
        z-index: 1100 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.35) !important;
    }
    .mobile-header-content,
    .mobile-user-info,
    .mobile-user-avatar,
    .mobile-user-details,
    .mobile-user-meta,
    .mobile-menu-wrapper,
    .mobile-dropdown-menu,
    .mobile-menu-item,
    .mobile-logout-item {
        display: none !important;
    }
    .burger-menu-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        font-size: 1.5rem !important;
        line-height: 1 !important;
        background: transparent !important;
        border: none !important;
        color: #ffffff !important;
        padding: 0 !important;
    }
    .mobile-logo {
        display: flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }
    .mobile-logo img {
        height: 32px !important;
        width: auto !important;
        margin: 0 !important;
        display: block !important;
    }
    .mobile-user-name {
        display: inline-block !important;
        color: #ffffff !important;
        font-weight: 700 !important;
        font-size: 0.95rem !important;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        bottom: 0;
        width: 260px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 4px 0 18px rgba(0,0,0,0.35);
        overflow-y: auto;
        scrollbar-width: none;
        padding-top: 4.5rem;
        background:
            linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.45) 100%),
            url('images/menu-background.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        display: block !important;
    }
    .sidebar.open { left: 0; }
    .sidebar::-webkit-scrollbar { width: 0; height: 0; }
    .sidebar .nav-item { color: #fff; flex-wrap: nowrap; padding-left: 1.25rem; padding-right: 1.25rem; gap: 0.75rem; }
    .sidebar .nav-item span:not(.icon) { color: #fff !important; display: inline !important; font-size: 0.95rem !important; flex: 1; text-align: left; font-weight: 700 !important; }
    .sidebar .nav-item .icon { width: 28px; text-align: center; }
    .sidebar .logo { flex-direction: column; align-items: center; }
    .sidebar .logo img { height: 88px; width: auto; object-fit: contain; margin-top: 8px; }
    .mobile-menu-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }
    .mobile-menu-overlay.show { display: block; }
    .main-content { margin-left: 0 !important; margin-top: 60px !important; height: calc(100vh - 60px) !important; }
}

/* Dark card overrides for tournament/match/expense/etc across desktop and mobile */
#tournaments-list .tournament-card,
#tournaments-page .tournament-card,
#tournament-matches-content .match-card,
#matches-list .match-card,
.matches-container .match-card,
#players-list .player-card,
#expenses-list .expense-card,
#coach-compensations-list .expense-card,
#coach-compensations-list .compensation-card,
#teams-list .team-card,
.dashboard-content .section,
.dashboard-content .card,
.data-grid .card,
.data-grid > div {
    background: rgba(255, 255, 255, 0.92) !important;
    color: #0f172a !important;
    border: 1px solid rgba(15,23,42,0.06) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

#tournaments-list .tournament-card h3,
#tournaments-page .tournament-card h3,
#tournament-matches-content .match-card h3,
#matches-list .match-card h3,
.matches-container .match-card h3,
#players-list .player-card h3,
#expenses-list .expense-card h3,
#coach-compensations-list .expense-card h3,
#coach-compensations-list .compensation-card h3,
#teams-list .team-card h3,
.dashboard-content .section h3,
.dashboard-content .card h3,
.data-grid .card h3,
.data-grid > div h3 {
    color: #0f172a !important;
}

#tournaments-list .tournament-card p,
#tournaments-page .tournament-card p,
#tournament-matches-content .match-card p,
#matches-list .match-card p,
.matches-container .match-card p,
#players-list .player-card p,
#expenses-list .expense-card p,
#coach-compensations-list .expense-card p,
#coach-compensations-list .compensation-card p,
#teams-list .team-card p,
.dashboard-content .section p,
.dashboard-content .card p,
.data-grid .card p,
.data-grid > div p,
.tournament-detail,
.match-detail,
.player-meta,
.expense-meta,
.team-meta {
    color: #475569 !important;
}

/* Tornei: testi scuri su card chiare */
.tournament-card h3,
.tournament-card p,
.tournament-card span,
.tournament-card .tournament-detail,
.tournament-card .tournament-meta,
.tournament-card .badge {
    color: #0f172a !important;
}
.tournament-card .badge {
    background: rgba(15,23,42,0.08);
}

/* Tornei: maggior contrasto e leggibilità (mobile e desktop) */
#tournaments-list .tournament-card,
#tournaments-page .tournament-card {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 26px rgba(0,0,0,0.1) !important;
    color: #0f172a !important;
}
#tournaments-list .tournament-card *,
#tournaments-page .tournament-card * {
    color: #0f172a !important;
}
#tournaments-list .tournament-card h3,
#tournaments-page .tournament-card h3,
#tournaments-list .tournament-card p,
#tournaments-page .tournament-card p,
#tournaments-list .tournament-card span,
#tournaments-page .tournament-card span {
    color: #0f172a !important;
}
#tournaments-list .tournament-card .tournament-name,
#tournaments-page .tournament-card .tournament-name,
#tournaments-list .tournament-card .tournament-meta,
#tournaments-page .tournament-card .tournament-meta,
#tournaments-list .tournament-card .tournament-detail,
#tournaments-page .tournament-card .tournament-detail {
    color: #0f172a !important;
}

/* Calendario tornei: forza contrasto su card e contenuti */
#tournament-calendar-content .match-group-card,
#tournament-calendar-content .match-card-in-group {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #0f172a !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2) !important;
    opacity: 1 !important;
}

#tournament-calendar-content .match-group-card *,
#tournament-calendar-content .match-card-in-group *,
#tournament-calendar-content .match-group-header,
#tournament-calendar-content .match-group-header *,
#tournament-calendar-content .match-card-in-group .match-score,
#tournament-calendar-content .match-card-in-group .match-status,
#tournament-calendar-content .match-card-in-group .match-date,
#tournament-calendar-content .match-card-in-group .match-location,
#tournament-calendar-content .match-card-in-group .match-venue,
#tournament-calendar-content .match-card-in-group .match-tournament {
    color: #0f172a !important;
}

#tournament-calendar-content .match-card-in-group .match-venue,
#tournament-calendar-content .match-card-in-group .match-tournament {
    background: #e5e7eb !important;
}

#tournament-calendar-content .match-card-in-group .match-actions .btn {
    color: #0f172a !important;
}

/* Sfondo dedicato per calendario tornei (copre il prato) */
#tournament-calendar-page {
    background: #e5e7eb !important;
    padding: 1rem !important;
}

#tournament-calendar-content {
    background: rgba(255, 255, 255, 0.96) !important;
    padding: 1rem !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 36px rgba(0,0,0,0.18) !important;
}

#tournament-calendar-page .page-header,
#tournament-calendar-page h2,
#tournament-calendar-page p,
#tournament-calendar-page span {
    color: #0f172a !important;
}

#tournament-calendar-page .page {
    background: #e5e7eb !important;
}
#tournaments-list .tournament-card .tournament-detail-label,
#tournaments-page .tournament-card .tournament-detail-label {
    color: #1f2937 !important;
    opacity: 1 !important;
}
#tournaments-list .tournament-card .badge,
#tournaments-page .tournament-card .badge {
    background: #e0f2fe !important;
    color: #0f172a !important;
    font-weight: 700 !important;
}

/* Title card (shared) */
.page-title-card {
    background: var(--gradient-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.page-title-card .page-title {
    color: var(--text-primary);
    margin: 0;
}
.page-title-card .page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .page-title-card {
        padding: 0.75rem 1rem;
        margin-top: 0.35rem;
        background: var(--gradient-card) !important;
        border: 2px solid var(--border-color) !important;
    }
    .page-title-card .page-title {
        color: var(--text-primary) !important;
        margin: 0;
    }
	    /* Welcome card (mobile) */
	    .page .welcome-section,
	    .welcome-section {
	        background: rgba(255, 255, 255, 0.92) !important;
	        padding: 1.5rem !important;
	        border-radius: 16px !important;
	        margin-bottom: 1.25rem !important;
	        box-shadow: 0 14px 32px rgba(0,0,0,0.14) !important;
	        color: var(--text-primary) !important;
	        border: 1px solid rgba(15,23,42,0.06) !important;
	    }
	    .page .welcome-section h2,
	    .welcome-section h2 { color: var(--text-primary) !important; }
	    .page .welcome-section p,
	    .welcome-section p { color: var(--text-secondary) !important; }

    /* Schiarisci le card della dashboard mister su mobile */
    .dashboard-content .section,
    .dashboard-content .card,
    .recent-matches,
    .upcoming-matches,
    .stat-card,
    #tournaments-list .tournament-card,
    #tournaments-page .tournament-card,
    #tournament-matches-content .match-card,
    #matches-list .match-card,
    .matches-container .match-card,
    #players-list .player-card,
    #expenses-list .expense-card,
    #coach-compensations-list .expense-card,
    #coach-compensations-list .compensation-card,
    #teams-list .team-card {
        background: rgba(255, 255, 255, 0.95) !important;
        color: #0f172a !important;
        border: 1px solid rgba(15,23,42,0.06) !important;
        box-shadow: 0 10px 26px rgba(0,0,0,0.15) !important;
    }
    .dashboard-content .section h3,
    .dashboard-content .card h3,
    .stat-card h3,
    .match-card h3,
    .tournament-card h3,
    .team-card h3,
    .player-card h3,
    .expense-card h3 {
        color: #0f172a !important;
    }
    .dashboard-content .section p,
    .dashboard-content .card p,
    .stat-card p,
    .match-detail,
    .player-meta,
    .expense-meta,
    .team-meta {
        color: #475569 !important;
    }
}

/* Tabs styling for Rimborsi/Compensi */
.tabs {
    display: flex;
    gap: 0.6rem;
    margin: 0.75rem 0 1rem 0;
    flex-wrap: wrap;
}
.tab-btn {
    background: rgba(12, 18, 28, 0.8);
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    padding: 0.65rem 1.15rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
}
.tab-btn:hover {
    border-color: rgba(125, 211, 252, 0.8);
    color: #7dd3fc;
    transform: translateY(-1px);
}
.tab-btn.active {
    background: linear-gradient(135deg, rgba(56,189,248,0.24) 0%, rgba(56,189,248,0.12) 100%);
    border-color: rgba(125, 211, 252, 0.9);
    color: #ffffff;
    box-shadow: 0 16px 32px rgba(0,0,0,0.32);
}
.tab-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(125,211,252,0.4);
}

/* Tournament calendar (coach) - high contrast */
.coach-tournament-calendar {
    padding: 1rem;
    background: #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(0,0,0,0.22);
}

.calendar-date-section {
    margin-bottom: 1.5rem;
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
    padding: 1rem;
}

.calendar-date-section h3 {
    margin: 0 0 0.75rem 0;
    color: #0f172a;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 0.35rem;
}

.calendar-match-card {
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 10px;
    padding: 0.85rem;
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
    color: #0f172a;
    margin-bottom: 0.75rem;
}

.coach-tournament-calendar,
.coach-tournament-calendar * {
    color: #0f172a !important;
}

.calendar-match-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.calendar-team-name {
    font-weight: 700;
    color: #0f172a;
}

.calendar-match-score {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
}

.calendar-match-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.65rem 0;
    padding-top: 0.5rem;
    border-top: 1px solid #0f172a;
    gap: 0.5rem;
}

.calendar-match-meta {
    color: #0f172a;
    font-size: 0.9rem;
}

.coach-tournament-calendar .matches-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* Card tornei (coach) a contrasto chiaro */
.coach-tournaments {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.coach-tournament-card {
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 12px 28px rgba(0,0,0,0.14);
    color: #0f172a;
}

.coach-tournament-card .coach-tournament-type {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #0f172a;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.coach-tournament-card .coach-tournament-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.coach-tournament-card .coach-tournament-status {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    background: #e5e7eb;
    color: #0f172a;
    border: 1px solid #0f172a;
    display: inline-block;
}

.coach-tournament-card .coach-tournament-status.upcoming { background: #dbeafe; border-color: #3b82f6; color: #1d4ed8; }
.coach-tournament-card .coach-tournament-status.active { background: #dcfce7; border-color: #16a34a; color: #166534; }
.coach-tournament-card .coach-tournament-status.completed { background: #e5e7eb; border-color: #0f172a; color: #0f172a; }

.coach-tournament-card .coach-tournament-dates {
    margin: 0.75rem 0;
    padding: 0.75rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.9rem;
}

.coach-tournament-card .date-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0f172a;
}

.coach-tournament-card .date-label {
    font-size: 0.75rem;
    color: #475569;
}

.coach-tournament-card .date-value {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
}

.coach-tournament-card .coach-tournament-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-content: center;
}

.coach-tournament-card .coach-tournament-actions button {
    border: 1px solid #0f172a;
    background: #ffffff;
    color: #0f172a;
    border-radius: 10px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coach-tournament-card .coach-tournament-actions button:hover {
    background: #0f172a;
    color: #ffffff;
}
.calendar-status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    color: #0f172a;
    background: #e5e7eb;
    border: 1px solid #0f172a;
}

.calendar-status-badge.completed {
    background: #dcfce7;
    border-color: #16a34a;
    color: #166534;
}

.calendar-status-badge.active {
    background: #dbeafe;
    border-color: #1d4ed8;
    color: #1d4ed8;
}

.calendar-match-card.is-completed {
    border-color: #16a34a;
}

/* Tournament matches list (coach) */
.coach-tournament-matches {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.coach-match-card {
    background: #ffffff;
    border: 2px solid #0f172a;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 12px 26px rgba(0,0,0,0.18);
    color: #0f172a;
}

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

.coach-match-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.coach-match-meta .match-date {
    font-weight: 700;
    color: #0f172a;
}

.coach-match-meta .match-time {
    font-size: 0.9rem;
    color: #1f2937;
    opacity: 0.85;
}

.coach-match-status {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid #0f172a;
    background: #e5e7eb;
    color: #0f172a;
}
.coach-match-status.completed { background: #dcfce7; border-color: #16a34a; color: #166534; }
.coach-match-status.live { background: #dbeafe; border-color: #3b82f6; color: #1d4ed8; }

.coach-match-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
}

.coach-team-block {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.coach-team-block.align-right { text-align: right; align-items: flex-end; }

.coach-team-name {
    font-weight: 800;
    font-size: 1.15rem;
    color: #0f172a;
}

.coach-team-tag {
    font-size: 0.8rem;
    color: #0f172a;
    opacity: 0.8;
}

.coach-score-block {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    min-width: 90px;
    justify-content: center;
}

.coach-match-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.coach-match-card .btn.btn-icon {
    border: 1px solid #0f172a;
    background: #ffffff;
    color: #0f172a;
    border-radius: 8px;
    padding: 0.45rem 0.65rem;
    font-size: 1.2rem;
}

.coach-match-card .btn.btn-icon:hover {
    background: #0f172a;
    color: #ffffff;
}
