:root {
    --primary: #1a5f2a;
    --primary-dark: #0d3d18;
    --primary-light: #2d8a42;
    --accent: #f0c808;
    --danger: #dc3545;
    --danger-light: #ffebee;
    --success: #28a745;
    --success-light: #e8f5e9;
    --warning: #ffc107;
    --warning-light: #fffde7;
    --bg-main: #f5f7f5;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border: #e0e0e0;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 30px 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.sidebar-header h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.club-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.sidebar-header span {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu {
    padding: 20px 0;
}

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

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 15px 25px 10px;
    opacity: 0.5;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    border-left-color: var(--accent);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    opacity: 0.8;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px 40px;
    min-height: 100vh;
}

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

.page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    letter-spacing: 2px;
    color: var(--primary-dark);
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-icon {
    padding: 8px;
    border-radius: 6px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-main);
}

.card-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    color: var(--primary-dark);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--primary-dark);
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

th:first-child {
    border-radius: 8px 0 0 0;
}

th:last-child {
    border-radius: 0 8px 0 0;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

/* CORREGIDO: Hover de filas en tablas - ahora aplica a todas las celdas */
tr:hover td {
    background: var(--bg-main);
}

tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

/* Balance colors */
.balance-positive {
    background: var(--success-light);
    color: var(--success);
    font-weight: 700;
}

.balance-negative {
    background: var(--danger-light);
    color: var(--danger);
    font-weight: 700;
}

.balance-zero {
    background: var(--warning-light);
    color: #856404;
    font-weight: 700;
}

.row-positive td {
    background: var(--success-light);
}

.row-negative td {
    background: var(--danger-light);
}

.row-zero td {
    background: var(--warning-light);
}

/* Hover en filas de saldos - debe aplicar a todas las celdas incluyendo las de balance */
tr:hover td.balance-positive,
tr:hover td.balance-negative,
tr:hover td.balance-zero {
    background: var(--bg-main);
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: #856404;
}

/* Fecha de vencimiento badges */
.fecha-vencimiento {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
}

.fecha-vencida {
    background: var(--danger-light);
    color: var(--danger);
}

.fecha-proxima {
    background: var(--warning-light);
    color: #856404;
}

.fecha-vigente {
    background: var(--success-light);
    color: var(--success);
}

.fecha-no-definida {
    background: #f5f5f5;
    color: #999;
    font-style: italic;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(26, 95, 42, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* Combo con input editable */
.combo-editable-container {
    display: flex;
    gap: 10px;
}

.combo-editable-container select {
    flex: 0 0 auto;
    width: auto;
    min-width: 180px;
}

.combo-editable-container input {
    flex: 1;
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid var(--bg-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 1px;
    color: var(--primary-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 5px;
    line-height: 1;
}

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

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid var(--bg-main);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

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

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

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

.stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Player select list */
.player-select-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid var(--border);
    border-radius: 8px;
}

.player-select-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.player-select-item:hover {
    background: var(--bg-main);
}

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

.player-select-item input {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.select-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.select-actions button {
    font-size: 0.8rem;
    padding: 6px 12px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
}

.select-actions button:hover {
    background: var(--border);
}

/* Page sections */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
}

/* Action buttons in table */
.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.action-btn.edit {
    background: #e3f2fd;
    color: #1976d2;
}

.action-btn.delete {
    background: var(--danger-light);
    color: var(--danger);
}

.action-btn.view {
    background: var(--success-light);
    color: var(--success);
}

.action-btn:hover {
    transform: scale(1.05);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
}

.tab {
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

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

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

/* Estado mensual */
.month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.month-cell {
    text-align: center;
    padding: 10px;
    background: var(--bg-main);
    border-radius: 8px;
    font-size: 0.85rem;
}

.month-cell.header {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.month-total {
    font-weight: 700;
}

/* Filter */
.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar .form-control {
    width: auto;
    min-width: 200px;
}

/* Print styles */
@media print {
    .sidebar, .btn, .action-btns, .filter-bar {
        display: none !important;
    }
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Year selector */
.year-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-selector select {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Saldo del jugador en pagos */
.saldo-jugador-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 600;
}

.saldo-jugador-box.positivo {
    background: var(--success-light);
    border: 2px solid var(--success);
}

.saldo-jugador-box.negativo {
    background: var(--danger-light);
    border: 2px solid var(--danger);
}

.saldo-jugador-box.cero {
    background: var(--warning-light);
    border: 2px solid var(--warning);
}

.saldo-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.saldo-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.saldo-jugador-box.positivo .saldo-value {
    color: var(--success);
}

.saldo-jugador-box.negativo .saldo-value {
    color: var(--danger);
}

.saldo-jugador-box.cero .saldo-value {
    color: #856404;
}

/* Cargos pendientes */
.cargos-pendientes-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
}

.cargo-pendiente-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.cargo-pendiente-item:hover {
    background: white;
}

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

.cargo-pendiente-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.cargo-pendiente-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.cargo-pendiente-concepto {
    font-weight: 500;
}

.cargo-pendiente-fecha {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 10px;
}

.cargo-pendiente-monto {
    font-weight: 700;
    color: var(--danger);
}

.no-cargos-pendientes {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Cumpleaños */
.birthday-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

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

.birthday-row td {
    background: linear-gradient(90deg, rgba(255, 202, 87, 0.15), transparent) !important;
}

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

.apodo {
    color: var(--primary);
    font-style: italic;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Backup section */
.backup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.backup-stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-main);
    border-radius: 10px;
}

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

.backup-stat-value {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--primary);
}

.backup-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.import-preview-box {
    background: var(--bg-main);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.import-preview-box h4 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.import-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.import-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.import-option:hover {
    border-color: var(--primary);
    background: rgba(26, 95, 42, 0.05);
}

.import-option input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--primary);
}

.import-option-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.import-option-content strong {
    color: var(--text-primary);
}

.import-option-content span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Estado cuenta imagen */
.estado-cuenta-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-main);
}

.estado-cuenta-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.estado-cuenta-club {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--primary);
}

.estado-cuenta-fecha {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Sortable columns */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 25px;
}

th.sortable:hover {
    background: var(--primary-light);
}

th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 8px;
    opacity: 0.4;
    font-size: 0.8rem;
}

th.sortable.asc::after {
    content: '↑';
    opacity: 1;
}

th.sortable.desc::after {
    content: '↓';
    opacity: 1;
}

/* Estado general split tables */
.estado-tables-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.estado-table-section h4 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: var(--primary-dark);
    margin-bottom: 15px;
    padding-left: 5px;
    border-left: 4px solid var(--primary);
}

/* Dashboard deudores count card */
.deudores-count-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.deudores-count {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--danger);
    line-height: 1;
}

.deudores-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Posición badge */
.posicion-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e3f2fd;
    color: #1976d2;
}

/* Totales mes anterior */
.totales-mes-anterior {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-main);
}

.totales-mes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.total-mes-item {
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid var(--border);
}

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

.total-mes-item.ingreso {
    background: var(--success-light);
    border-color: var(--success);
}

.total-mes-item.ingreso:hover {
    background: #c8e6c9;
}

.total-mes-item.egreso {
    background: var(--danger-light);
    border-color: var(--danger);
}

.total-mes-item.egreso:hover {
    background: #ffcdd2;
}

.total-mes-concepto {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.total-mes-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.total-mes-monto {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.total-mes-item.ingreso .total-mes-monto {
    color: var(--success);
}

.total-mes-item.egreso .total-mes-monto {
    color: var(--danger);
}

.total-mes-tipo {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* ==================== RESPONSIVE ==================== */

/* Mobile Header - oculto por defecto */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
    z-index: 90;
    padding: 0 15px;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

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

.hamburger-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.mobile-header-title span {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: white;
    letter-spacing: 2px;
}

.mobile-logo {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

/* Botón cerrar sidebar */
.sidebar-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-close:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-close svg {
    width: 24px;
    height: 24px;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 95;
    opacity: 0;
    transition: opacity 0.3s;
}

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

/* Responsive - Tablets */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        margin-left: 240px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Responsive - Móviles */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 75px;
    }
    
    .page-section {
        padding: 15px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar input,
    .filter-bar select {
        width: 100%;
    }
    
    /* Modal responsive */
    .modal {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .modal-body {
        max-height: 70vh;
    }
    
    /* Botones de acción en tabla */
    .action-btns {
        flex-direction: column;
        gap: 5px;
    }
    
    .action-btn {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
    
    /* Año selector */
    .year-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Player select list */
    .player-select-list {
        max-height: 200px;
    }
    
    /* Cargos pendientes list */
    .cargos-pendientes-list {
        max-height: 200px;
    }
    
    /* Totales mes anterior */
    .totales-mes-list {
        grid-template-columns: 1fr;
    }
    
    /* Estado cuenta en modal detalle */
    #tablaEstadoCuenta {
        min-width: 500px;
    }
}

/* Responsive - Móviles pequeños */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .deudores-count {
        font-size: 3rem;
    }
    
    /* Combo editable */
    .combo-editable-container {
        flex-direction: column;
    }
    
    .combo-editable-container select,
    .combo-editable-container input {
        width: 100%;
    }
}
