body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #181818;
    color: #f1f1f1;
    min-height: 100vh;
}
#background {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1500&q=80') center/cover no-repeat;
    z-index: -1;
}
header {
    text-align: center;
    padding: 2rem 1rem 1rem 1rem;
}
header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #8bc34a;
    letter-spacing: 2px;
}
header p {
    font-size: 1.2rem;
    color: #e0e0e0;
}
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
}
#auth-section, #account-section, #admin-section {
    background: rgba(34, 40, 34, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    padding: 2rem;
    min-width: 320px;
    max-width: 90vw;
    margin-bottom: 100px;
}
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
input[type="text"], input[type="password"], input[type="number"] {
    padding: 0.7rem;
    border-radius: 6px;
    border: none;
    font-size: 1rem;
    background: #232323;
    color: #f1f1f1;
}
button {
    padding: 0.7rem;
    border-radius: 6px;
    border: none;
    background: #8bc34a;
    color: #181818;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background: #689f38;
}
a {
    color: #8bc34a;
    text-decoration: underline;
    cursor: pointer;
} 

/* Estilos para la hoja de cálculo tipo Excel */
.spreadsheet-container {
    max-width: 1400px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.spreadsheet-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.spreadsheet-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.spreadsheet-header p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.sheet-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#current-sheet {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.spreadsheet-table-container {
    overflow-x: auto;
    padding: 20px;
}

.spreadsheet-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.spreadsheet-table th {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 2px solid #e1e5e9;
    font-size: 14px;
    white-space: nowrap;
}

.spreadsheet-table th:first-child {
    width: 60px;
    text-align: center;
}

.spreadsheet-table th:last-child {
    width: 100px;
    text-align: center;
}

.spreadsheet-row {
    transition: background-color 0.2s ease;
}

.spreadsheet-row:hover {
    background-color: #f8f9fa;
}

.spreadsheet-row:nth-child(even) {
    background-color: #fafbfc;
}

.spreadsheet-row:nth-child(even):hover {
    background-color: #f1f3f4;
}

.spreadsheet-table td {
    padding: 8px;
    border-bottom: 1px solid #e1e5e9;
    vertical-align: middle;
}

.row-number {
    background: #f8f9fa;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    border-right: 1px solid #e1e5e9;
}

.spreadsheet-table input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.spreadsheet-table input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.date-input {
    min-width: 120px;
}

.comprobante-input,
.remito-input {
    min-width: 100px;
}

.pesos-input,
.dolares-input {
    min-width: 100px;
    text-align: right;
}

.saldo-cell {
    background: #e8f5e8;
    font-weight: 600;
    color: #2d5a2d;
    text-align: right;
    padding-right: 12px;
    border-left: 1px solid #e1e5e9;
}

.spreadsheet-table button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    font-size: 16px;
}

.save-row-btn:hover {
    background-color: #d4edda;
}

.delete-row-btn:hover {
    background-color: #f8d7da;
}

.spreadsheet-footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e1e5e9;
}

.action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

/* Responsive design */
@media (max-width: 1200px) {
    .spreadsheet-table-container {
        padding: 10px;
    }
    
    .spreadsheet-table th,
    .spreadsheet-table td {
        padding: 6px 4px;
        font-size: 12px;
    }
    
    .date-input {
        min-width: 100px;
    }
    
    .comprobante-input,
    .remito-input,
    .pesos-input,
    .dolares-input {
        min-width: 80px;
    }
}

@media (max-width: 768px) {
    .spreadsheet-container {
        margin: 10px;
        border-radius: 4px;
    }
    
    .spreadsheet-header {
        padding: 15px;
    }
    
    .spreadsheet-header h2 {
        font-size: 20px;
    }
    
    .sheet-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .spreadsheet-footer {
        padding: 15px;
    }
    
    .action-btn {
        display: block;
        margin: 10px auto;
        width: 200px;
    }
}

/* Estilos para inputs de solo lectura */
.spreadsheet-table input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Estilos para filas con datos */
.spreadsheet-row.has-data {
    background-color: #fff3cd;
}

.spreadsheet-row.has-data:hover {
    background-color: #ffeaa7;
}

/* Estilos para totales */
.spreadsheet-table .total-row {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.spreadsheet-table .total-row td {
    border-bottom: none;
}

.spreadsheet-table .total-row .saldo-cell {
    background: transparent;
    color: white;
    border-left: none;
} 
/* Estilos para el panel de administración */
.admin-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.tab-btn {
    background: #f8f9fa;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.transaction-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.transaction-controls select,
.transaction-controls input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.transaction-controls button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.transaction-controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.admin-spreadsheet-header {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-spreadsheet-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.admin-sheet-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-spreadsheet-table-container {
    overflow-x: auto;
    padding: 20px;
}

.admin-spreadsheet-footer {
    background: #f8f9fa;
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #e1e5e9;
}

/* Responsive design para el panel de administración */
@media (max-width: 768px) {
    .admin-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        border-bottom: none;
        border-right: 3px solid transparent;
    }
    
    .tab-btn.active {
        border-right-color: #667eea;
        border-bottom: none;
    }
    
    .transaction-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .transaction-controls select,
    .transaction-controls input,
    .transaction-controls button {
        width: 100%;
    }
    
    .admin-spreadsheet-header {
        flex-direction: column;
        text-align: center;
    }
    
    .admin-sheet-navigation {
        justify-content: center;
    }
} 
/* Estilos para controles adicionales */
.spreadsheet-controls {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 200px;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

.control-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.export-btn {
    background: #28a745;
}

.export-btn:hover {
    background: #218838;
}

/* Estilos para sección de resumen */
.summary-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.summary-card h4 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

/* Estilos para historial de cambios */
.history-section {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
}

.history-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.change-history {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border-radius: 6px;
    border: 1px solid #e1e5e9;
}

.change-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f3f4;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.change-item:last-child {
    border-bottom: none;
}

.change-item:hover {
    background-color: #f8f9fa;
}

.change-item.active {
    background-color: #e3f2fd;
    border-left: 3px solid #667eea;
}

.change-icon {
    font-size: 16px;
    min-width: 20px;
}

.change-description {
    flex: 1;
    font-size: 14px;
    color: #495057;
}

.change-time {
    font-size: 12px;
    color: #6c757d;
    min-width: 80px;
}

.change-user {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    min-width: 60px;
}

/* Estilos para notificaciones */
.notificacion {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 400px;
    border-left: 4px solid #6c757d;
}

.notificacion.mostrar {
    transform: translateX(0);
}

.notificacion-success {
    border-left-color: #28a745;
}

.notificacion-error {
    border-left-color: #dc3545;
}

.notificacion-warning {
    border-left-color: #ffc107;
}

.notificacion-info {
    border-left-color: #17a2b8;
}

.notificacion-mensaje {
    flex: 1;
    font-size: 14px;
    color: #495057;
}

.notificacion-cerrar {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.notificacion-cerrar:hover {
    background-color: #f8f9fa;
    color: #495057;
}

/* Estilos para tabla con totales */
.spreadsheet-table tfoot {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.spreadsheet-table tfoot td {
    color: white;
    font-weight: 600;
    border-bottom: none;
}

.spreadsheet-table tfoot .saldo-cell {
    background: transparent;
    color: white;
    border-left: none;
}

/* Estilos para botones de historial */
#undo-btn:disabled,
#redo-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#undo-btn:not(:disabled):hover,
#redo-btn:not(:disabled):hover {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

/* Estilos para filtros activos */
.spreadsheet-row[style*="display: none"] {
    display: none !important;
}

/* Estilos para campos con datos */
.spreadsheet-row.has-data {
    background-color: #fff3cd;
}

.spreadsheet-row.has-data:hover {
    background-color: #ffeaa7;
}

/* Estilos para campos de solo lectura */
.spreadsheet-table input[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Estilos para exportación */
.export-btn {
    position: relative;
    overflow: hidden;
}

.export-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.export-btn:hover::before {
    left: 100%;
}

/* Estilos para impresión */
@media print {
    .spreadsheet-controls,
    .summary-section,
    .history-section,
    .spreadsheet-footer,
    .notificacion {
        display: none !important;
    }
    
    .spreadsheet-container {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .spreadsheet-table {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .spreadsheet-table th,
    .spreadsheet-table td {
        border: 1px solid #000;
    }
}

/* Estilos para temas oscuros (opcional) */
.theme-dark {
    background-color: #1a1a1a;
    color: #ffffff;
}

.theme-dark .spreadsheet-container {
    background: #2d2d2d;
    color: #ffffff;
}

.theme-dark .spreadsheet-table {
    background: #2d2d2d;
    color: #ffffff;
}

.theme-dark .spreadsheet-table th {
    background: #404040;
    color: #ffffff;
}

.theme-dark .spreadsheet-table input {
    background: #404040;
    color: #ffffff;
    border-color: #555;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    .spreadsheet-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input,
    .filter-select,
    .control-btn {
        width: 100%;
    }
    
    .summary-section {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .change-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .change-time,
    .change-user {
        min-width: auto;
    }
    
    .notificacion {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notificacion.mostrar {
        transform: translateY(0);
    }
}

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-card {
    animation: fadeInUp 0.5s ease forwards;
}

.summary-card:nth-child(1) { animation-delay: 0.1s; }
.summary-card:nth-child(2) { animation-delay: 0.2s; }
.summary-card:nth-child(3) { animation-delay: 0.3s; }
.summary-card:nth-child(4) { animation-delay: 0.4s; }

/* Estilos para estados de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 