:root {
    --bg-dark: #0a0a0c;
    --sidebar-bg: #111114;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.1);
    --accent-emerald: #10b981;
    --accent-emerald-glow: rgba(16, 185, 129, 0.2);
    --accent-gold: #f59e0b;
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    --glass-blur: blur(16px);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    font-size: 105%; /* Subtle global increase */
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0c;
}

::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
    border: 2px solid #0a0a0c;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-emerald);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
        url('bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    overflow-x: hidden;
    height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}


h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

/* Login Screen */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0c;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.15) 0%, transparent 60%),
        url('bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.7);
    animation: fadeInUp 0.6s ease-out;
}

.login-overlay.hidden {
    display: none !important;
}

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

/* Sidebar */
.sidebar {
    width: 280px; /* Increased from 260px */
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.75rem;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-emerald);
    margin-bottom: 3rem;
    font-family: 'Outfit', sans-serif;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-emerald);
}

.org-selector-container {
    margin: 1.5rem 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.org-selector-container label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.org-selector-container label i {
    width: 12px;
    color: var(--accent-gold);
}

.org-dropdown {
    width: 100%;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
    appearance: none; /* Remove seta padrão para colocar personalizada se quiser */
}

.org-dropdown:hover {
    border-color: var(--accent-emerald);
}

.org-dropdown option {
    background: #111114; /* Fundo bem escuro para as opções */
    color: #ffffff;      /* Texto branco puro */
    padding: 10px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-dim);
    transition: var(--transition-smooth);
    font-weight: 600; /* Negrito nas opções */
}

.nav-links li i {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px; /* Ícones mais gordinhos */
}

.nav-links li:hover {
    background: var(--card-bg);
    color: var(--accent-emerald); /* Em vez de branco, usa esmeralda no hover */
}

/* Tournament Brackets */
.brackets-wrapper {
    margin-top: 1rem;
    animation: fadeIn 0.4s ease-out;
}

.bracket-rounds-container::-webkit-scrollbar {
    height: 8px;
}

.bracket-rounds-container::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}

.bracket-rounds-container::-webkit-scrollbar-thumb {
    background: var(--accent-emerald);
    border-radius: 10px;
}

.bracket-match {
    transition: all 0.3s ease;
    min-height: 140px;
    display: flex;
    flex-direction: column;
}

.bracket-match:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    border-color: var(--accent-emerald) !important;
}

.bracket-match select {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    color: white !important;
}

.bracket-match .btn-icon:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.btn-secondary[style*="dashed"]:hover {
    border-style: solid !important;
    background: rgba(255,255,255,0.05) !important;
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .bracket-rounds-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .bracket-round {
        min-width: 240px !important;
    }

    /* Mobile Sidebar & Navigation */
    .sidebar {
        display: flex !important;
        width: 100% !important;
        height: 65px !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        z-index: 9999 !important;
        padding: 0 !important;
        flex-direction: row !important;
        border-right: none !important;
        border-top: 1px solid var(--card-border) !important;
        background: #0a0a0c !important;
        backdrop-filter: blur(20px) saturate(180%) !important;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.8) !important;
    }

    .logo, .sidebar-footer, .org-selector-container {
        display: none;
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        width: 100%;
        margin: 0;
        height: 100%;
    }

    .nav-links li {
        display: flex !important;
        flex: 1;
        flex-direction: column;
        padding: 0.5rem 0;
        margin-bottom: 0;
        border-radius: 0;
        font-size: 0.65rem;
        gap: 0.2rem;
        text-align: center;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        opacity: 0.8;
    }

    .nav-links li.active {
        opacity: 1;
        color: var(--accent-emerald);
    }

    .nav-links li.active i {
        transform: translateY(-2px);
        filter: drop-shadow(0 0 8px var(--accent-emerald-glow));
    }

    .nav-links li i {
        margin: 0;
        width: 22px;
        height: 22px;
        transition: transform 0.2s;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0;
        padding-bottom: 75px; /* Space for bottom nav */
    }

    .top-bar {
        height: 60px;
        padding: 0 1rem;
        display: flex !important;
    }

    .top-bar h1 {
        font-size: 1.2rem;
    }

    .view-content {
        padding: 1rem;
    }

    /* Mobile Header */
    .mobile-top-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem;
        background: rgba(255,255,255,0.02);
        border-bottom: 1px solid var(--card-border);
    }

    /* Stats Grid on Mobile */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    /* Tables & Lists */
    .glass {
        border-radius: 12px;
    }

    .section-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

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

.dashboard-inner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .dashboard-grid, .dashboard-inner-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .stat-card {
        width: 100% !important;
    }

    .data-table {
        min-width: 600px;
    }

    /* Buttons adjustments */
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    /* Tournament Row Mobile */
    .tournament-match-row {
        grid-template-columns: 1fr 20px 1fr !important;
        gap: 0.75rem !important;
    }
    .tournament-match-row .t-match-date,
    .tournament-match-row .t-match-time {
        grid-column: span 1;
    }
    .tournament-match-row .btn-icon {
        grid-column: span 3;
        justify-content: center;
        background: rgba(255,68,68,0.1);
        padding: 0.5rem;
        width: 100%;
        border-radius: 8px;
    }
}

.nav-links li.active {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    border: 1px solid var(--accent-emerald);
    font-weight: 800;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.top-bar {
    height: 80px;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--card-border);
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.top-bar h1 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
}

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

.profile-info {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.user-role {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.avatar {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Views */
.view-content {
    padding: 2.5rem;
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

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

/* Glass Components */
.glass {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--card-border);
    border-radius: 16px;
}

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

.mobile-nav {
    display: none;
}

.stat-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-emerald);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

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

.btn-secondary.active-filter {
    background: var(--accent-emerald-glow);
    color: var(--accent-emerald);
    border-color: var(--accent-emerald);
    font-weight: 700;
}

/* Cards & Lists */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: var(--accent-emerald);
    color: #000;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: #059669;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-card {
    width: 100%;
    max-width: 700px;
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}


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

.close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
}

.hidden {
    display: none;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-emerald);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th {
    text-align: left;
    padding: 1rem;
    color: var(--text-dim);
    font-weight: 500;
    border-bottom: 1px solid var(--card-border);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--card-border);
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Avatars */
.player-avatar-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--card-border);
}

.avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 0.75rem;
    border: 1px solid var(--card-border);
}

/* Profile Card (Ficha do Atleta) */
.profile-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-card-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 2rem;
}

.profile-card-photo {
    width: 150px;
    height: 150px;
    border-radius: 20px;
    object-fit: cover;
    border: 3px solid var(--accent-emerald);
}

.profile-card-main-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.profile-card-main-info p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-emerald); /* Títulos em verde para destacar */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
    font-weight: 700; /* Negrito nos labels da ficha */
}

.info-item span {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-main);
}

.profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--card-border);
    padding-top: 2rem;
}

/* Print Styles */
@media print {
    /* Hide everything except the modal and its content */
    body * {
        visibility: hidden;
    }
    #modal-container, #modal-container * {
        visibility: visible;
    }
    
    /* Position the modal content for the full page */
    #modal-container {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: white !important;
        display: block !important;
    }

    .modal-card {
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
        background: white !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hide UI elements within the modal */
    .modal-header, .profile-actions, .close-btn, .btn-secondary, .print-btn {
        display: none !important;
    }

    /* Adjust profile card for printing */
    .profile-card {
        color: black !important;
        background: white !important;
        width: 100% !important;
    }

    .profile-card-header {
        border-bottom: 2px solid #eee !important;
    }

    .profile-card-photo {
        border: 2px solid #ccc !important;
        width: 120px !important; /* Slightly smaller for print */
        height: 120px !important;
    }

    .profile-card-main-info h2, 
    .profile-card-main-info p,
    .info-item span {
        color: black !important;
    }

    .info-item label {
        color: #000 !important;
        border-bottom: 1px solid #000;
        margin-bottom: 5px;
        font-weight: 800 !important; /* Bem negrito na impressão */
    }

    .badge {
        border: 1px solid #ccc !important;
        color: black !important;
        background: transparent !important;
    }

    /* Sidebar and background */
    .sidebar, .top-bar, .app-container {
        display: none !important;
    }
}


/* Lineup Editor */
.player-checklist::-webkit-scrollbar {
    width: 6px;
}

.player-checklist::-webkit-scrollbar-track {
    background: transparent;
}

.player-checklist::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 10px;
}

.player-checklist label:hover {
    color: var(--accent-emerald);
}

.player-checklist input[type="checkbox"] {
    accent-color: var(--accent-emerald);
    width: 16px;
    height: 16px;
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-gold);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

/* Icon Buttons */
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    color: var(--text-dim);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

/* Admin-only visibility */
.admin-only {
    display: flex;
}

.admin-only.hidden-auth {
    display: none !important;
}

/* Mobile-only elements */
.mobile-only {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-only {
        display: flex;
    }
}


/* ID Card Specific Styles */
.id-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

.id-card {
    width: 450px;
    height: 270px;
    background: #111114;
    border: 1px solid var(--accent-emerald);
    border-radius: 15px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.id-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), transparent);
    transform: rotate(25deg);
    pointer-events: none;
}

.id-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    padding-bottom: 0.75rem;
}

.id-card-body {
    display: flex;
    gap: 1.25rem;
    padding: 1rem 0;
    align-items: center;
}

.id-card-photo-wrapper {
    width: 90px;
    height: 100px;
    border: 2px solid var(--accent-emerald);
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1e;
}

.id-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-card-info {
    flex: 1;
}

.id-card-info label {
    display: block;
    font-size: 0.55rem;
    color: var(--accent-emerald);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.id-card-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: white;
    font-family: 'Outfit', sans-serif;
    line-height: 1.1;
    text-transform: uppercase;
}

.id-card-data {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.id-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

@media print {
    @page {
        margin: 0.5cm;
        size: auto;
    }
    
    html, body {
        overflow: visible !important;
        height: auto !important;
        background: white !important;
    }

    body * {
        visibility: hidden;
        overflow: visible !important;
    }
    
    #modal-container, #modal-container * {
        visibility: visible;
    }
    
    #modal-container {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        background: white !important;
        display: block !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .modal-card {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .modal-header, .no-print, .close-btn, .btn-primary:not(.print-btn), .btn-secondary, .sidebar, .top-nav {
        display: none !important;
    }

    /* Batch Printing Grid */
    .id-card-grid {
        display: grid !important;
        grid-template-columns: 90mm 90mm !important;
        gap: 10mm !important;
        justify-content: center !important;
        visibility: visible !important;
        margin: 0 auto !important;
        padding: 10mm 0 !important;
        overflow: visible !important;
    }
    
    .id-card {
        width: 90mm !important;
        height: 60mm !important;
        margin-bottom: 5mm !important;
        border: 1px solid #000 !important;
        page-break-inside: avoid !important;
        background: white !important;
        box-shadow: none !important;
        color: black !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
        overflow: hidden !important;
    }

    .id-card-batch-container {
        visibility: visible !important;
        overflow: visible !important;
    }
}

.id-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 2rem;
    padding: 1rem;
    justify-items: center;
}

.id-card {
    width: 420px;
    height: 250px;
    background: #111114;
    border: 1px solid var(--accent-emerald);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--card-border);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Mobile Responsiveness --- */

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        position: sticky;
        top: 0;
        z-index: 100;
        border-right: none;
        border-bottom: 1px solid var(--card-border);
    }

    .sidebar .logo {
        margin-bottom: 0;
        font-size: 1.2rem;
    }

    .nav-links {
        display: none; /* We can implement a mobile drawer later if needed, or simple icons */
    }

    /* Mobile Bottom Nav */
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--sidebar-bg);
        border-top: 1px solid var(--card-border);
        justify-content: space-around;
        padding: 0.75rem 0;
        z-index: 100;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.7rem;
        color: var(--text-dim);
        cursor: pointer;
    }

    .mobile-nav-item.active {
        color: var(--accent-emerald);
    }

    .main-content {
        padding-bottom: 70px; /* Space for bottom nav */
    }

    .top-bar {
        display: none; /* Redundant on mobile if we have sidebar/bottom nav */
    }

    .view-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }

    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table th, .data-table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    /* Public Portal Mobile */
    .public-nav {
        max-width: 100% !important;
        overflow-x: auto;
        justify-content: flex-start !important;
        padding: 0.5rem 1rem !important;
        gap: 1rem !important;
        scrollbar-width: none; /* Firefox */
    }

    .public-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .nav-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .profile-card-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    /* Settings Panel Mobile */
    #form-settings .form-group, 
    #form-settings div[style*="grid-column: span 3"] {
        grid-column: span 3 !important;
    }

    #form-settings div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .logo span {
        display: none; /* Only icon on very small screens */
    }
}

/* Helper class for responsive tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
}

/* --- Premium Public Portal Effects --- */

.public-body {
    position: relative;
    overflow-x: hidden;
    background: #050507;
}

/* Animated Aura Background */
.aura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aura-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: orbFloat 20s infinite alternate ease-in-out;
}

.aura-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-emerald);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.aura-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-gold);
    bottom: -10%;
    right: -10%;
    animation-duration: 30s;
    animation-delay: -5s;
}

@keyframes orbFloat {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* Modern Ticker Style */
.news-ticker-container {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(5px);
    margin: 0.5rem 1rem 1.5rem !important;
    padding: 0.3rem 0.6rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    border-radius: 8px;
    height: 32px; /* Altura fixa e discreta */
}

.ticker-label {
    background: var(--accent-emerald);
    color: #000;
    padding: 2px 8px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-right: 0.75rem;
    flex-shrink: 0;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.news-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-content {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    font-size: 0.85rem;
    gap: 3rem;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
}

.ticker-item span {
    color: var(--accent-emerald);
    font-weight: 800;
    font-size: 0.75rem;
}

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

/* Global Form Inputs Visibility */
select, option, input[type="text"], input[type="password"], input[type="number"], input[type="date"], textarea {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    font-weight: 600 !important;
}

select option {
    background-color: #111114 !important;
    color: #ffffff !important;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-emerald) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2) !important;
    outline: none !important;
}

/* Enhanced Glass Cards */
.public-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.public-card:hover {
    transform: translateY(-8px);
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(16, 185, 129, 0.1);
}

/* Hero Section Styles */
.hero-banner {
    padding: 4rem 2rem;
    text-align: center;
    background: radial-gradient(circle at center, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 1rem;
    background: linear-gradient(to bottom, #fff 40%, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }

    .mobile-admin-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        background: #0a0a0c !important;
        background-image: linear-gradient(to top, #000 0%, #111 100%) !important;
        border-top: 1px solid var(--card-border) !important;
        justify-content: space-around !important;
        padding: 0.75rem 0 !important;
        height: 75px !important;
        z-index: 9999 !important;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
    }

    .admin-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        color: var(--text-dim);
        cursor: pointer;
        flex: 1;
        transition: all 0.2s;
    }

    .admin-nav-item i {
        width: 22px;
        height: 22px;
        stroke-width: 2.5px;
    }

    .admin-nav-item span {
        font-size: 0.65rem;
        font-weight: 600;
    }

    .admin-nav-item.active {
        color: var(--accent-emerald);
    }
}

/* Mobile elements hidden by default on Desktop */
.mobile-admin-nav, .mobile-only {
    display: none !important;
}


@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        z-index: 1000000 !important;
        transition: var(--transition-smooth);
        box-shadow: 25px 0 80px rgba(0,0,0,0.9);
        width: 85% !important;
        max-width: 320px;
        background: #111114 !important;
        display: none;
    }

    .sidebar.active {
        left: 0;
        display: flex !important;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.85);
        backdrop-filter: blur(8px);
        z-index: 9999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    .main-header {
        position: relative !important;
        top: auto !important;
        margin-bottom: 1rem;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        z-index: 10;
    }

    .view-content {
        padding: 1rem;
        padding-top: 2rem !important;
        padding-bottom: 100px;
    }

    .mobile-only {
        display: flex !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .mobile-admin-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: #111114;
        border-top: 1px solid var(--card-border);
        z-index: 9999;
        padding: 0 1rem;
        justify-content: space-around;
        align-items: center;
        backdrop-filter: blur(10px);
    }

    .admin-nav-item:active {
        background: rgba(16, 185, 129, 0.3) !important;
        color: #fff !important;
        border-radius: 12px;
    }
}

/* Authentication & Login Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 60%),
        url('bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 3rem 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(16, 185, 129, 0.3);
}

.hidden-auth {
    display: none !important;
}

/* --- Professional Sumula (Match Report) Styles --- */
.sumula-container-scroll {
    max-height: 80vh;
    overflow-y: auto;
    padding: 1rem;
    background: #555;
    border-radius: 8px;
}

.sumula-sheet {
    background: white;
    color: black;
    width: 210mm; /* A4 Width */
    min-height: 297mm; /* A4 Height */
    margin: 0 auto;
    padding: 15mm;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    position: relative;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 11px;
    line-height: 1.2;
}

.sumula-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 80px;
    font-weight: 900;
    color: rgba(0,0,0,0.03);
    pointer-events: none;
    white-space: nowrap;
}

.sumula-header {
    border: 2px solid black;
    margin-bottom: 10px;
}

.header-main {
    display: flex;
    border-bottom: 1px solid black;
}

.org-info {
    flex: 1;
    padding: 10px;
    text-align: center;
}

.org-info h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.org-info p { margin: 5px 0 0; font-weight: 700; color: #444; }

.game-meta {
    width: 150px;
    border-left: 1px solid black;
    display: flex;
    flex-direction: column;
}

.meta-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid black;
}
.meta-box:last-child { border-bottom: none; }
.meta-box span { font-size: 8px; font-weight: 700; }
.meta-box strong { font-size: 14px; }

.header-details {
    display: flex;
    padding: 5px 10px;
    gap: 20px;
    background: #f0f0f0;
}

.sumula-section {
    margin-bottom: 10px;
}

.section-title {
    background: black;
    color: white;
    padding: 3px 10px;
    font-weight: 700;
    font-size: 10px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.sumula-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid black;
}

.sumula-table th, .sumula-table td {
    border: 1px solid black;
    padding: 4px 6px;
    text-align: left;
}

.sumula-table th {
    background: #e5e5e5;
    font-weight: 700;
}

.sumula-table.mini td { padding: 3px 5px; font-size: 10px; }

.field-line { border-bottom: 1px solid black !important; border-top: none !important; border-left: none !important; border-right: none !important; }

.sumula-teams-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.team-header-sumula {
    background: #333;
    color: white;
    padding: 5px;
    text-align: center;
    font-weight: 800;
    font-size: 11px;
}

.sumula-obs-line {
    border-bottom: 1px solid #aaa;
    height: 25px;
    width: 100%;
}

.sumula-footer {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.sig-line {
    flex: 1;
    border-top: 1px solid black;
    text-align: center;
    padding-top: 5px;
    margin-top: 20px;
}
.sig-line span { font-size: 9px; font-weight: 700; color: #666; }

/* Model Selection UI */
.model-option { cursor: pointer; position: relative; }
.model-option input { position: absolute; opacity: 0; }
.model-card {
    background: rgba(255,255,255,0.03);
    border: 2px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    transition: all 0.2s;
}
.model-option input:checked + .model-card {
    border-color: var(--accent-emerald);
    background: rgba(16,185,129,0.1);
    transform: translateY(-3px);
}
.model-card i { width: 24px; color: var(--accent-gold); }

/* Print Settings */
@media print {
    body * { visibility: hidden; }
    .sumula-sheet, .sumula-sheet * { visibility: visible; }
    .sumula-sheet {
        position: absolute;
        left: 0;
        top: 0;
        width: 210mm;
        height: 297mm;
        margin: 0;
        padding: 10mm;
        box-shadow: none;
        border: none;
    }
    .no-print { display: none !important; }
    #modal-overlay { background: white !important; }
    #modal-content { 
        background: white !important; 
        padding: 0 !important; 
        width: 100% !important; 
        max-width: none !important;
        box-shadow: none !important;
        border: none !important;
    }
    .modal-header, .modal-close { display: none !important; }
}

.hidden {
    display: none !important;
}
