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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #2d2d2d;
    border-bottom: 1px solid #404040;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4a9eff;
}

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

.user-email {
    background-color: #404040;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.notification-btn {
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.notification-btn:hover {
    background-color: #404040;
}

/* Quick actions */
.quick-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: #4a9eff;
    color: white;
}

.btn-primary:hover {
    background-color: #357abd;
}

.btn-secondary {
    background-color: #404040;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background-color: #555555;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100vh;
    background-color: #2d2d2d;
    border-right: 1px solid #404040;
    transition: left 0.3s ease;
    z-index: 200;
    overflow-y: auto;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #404040;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4a9eff;
}

.close-sidebar {
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 1.5rem;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li {
    margin: 0.5rem 0;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #e0e0e0;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar-menu a:hover {
    background-color: #404040;
}

.sidebar-menu a.active {
    background-color: #4a9eff;
    color: white;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 150;
    display: none;
}

.overlay.show {
    display: block;
}

/* Main content */
.main-content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-title {
    padding: 2rem 0 1rem;
}

.page-title h1 {
    font-size: 2rem;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.back-btn:hover {
    background-color: #404040;
}

.content {
    flex: 1;
    padding: 2rem 0;
}

/* Grid de botones principales */
.main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.main-card {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.main-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.main-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.main-card-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.main-card-title {
    font-size: 1rem;
    font-weight: 500;
    color: #e0e0e0;
}

/* Colores para los iconos */
.icon-blue { background-color: #2563eb; }
.icon-green { background-color: #16a34a; }
.icon-purple { background-color: #9333ea; }
.icon-orange { background-color: #ea580c; }
.icon-red { background-color: #dc2626; }
.icon-yellow { background-color: #ca8a04; }
.icon-indigo { background-color: #4f46e5; }
.icon-gray { background-color: #6b7280; }

/* Tarjetas */
.card {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e0e0e0;
}

/* Badge */
.badge {
    background-color: #404040;
    color: #e0e0e0;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.badge-success { background-color: #16a34a; }
.badge-danger { background-color: #dc2626; }
.badge-warning { background-color: #ca8a04; }

/* Lista de clientes */
.cliente-item {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.cliente-item:hover {
    border-color: #4a9eff;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.1);
}

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

.cliente-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
}

.cliente-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.cliente-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Formularios */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #e0e0e0;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    background-color: #1a1a1a;
    border: 1px solid #404040;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4a9eff;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Botón flotante */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4a9eff;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 158, 255, 0.3);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.fab:hover {
    background-color: #357abd;
    transform: scale(1.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #2d2d2d;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e0e0e0;
}

.close-modal {
    background: none;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Tabs */
.tabs {
    display: flex;
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
}

.tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    color: #b0b0b0;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tab.active {
    background-color: #4a9eff;
    color: white;
}

.tab-content {
    display: none;
}

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

/* Caja summary */
.caja-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.caja-card {
    background-color: #2d2d2d;
    border: 1px solid #404040;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.caja-amount {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.caja-label {
    color: #b0b0b0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .main-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .main-card {
        padding: 1.5rem;
    }
    
    .cliente-details {
        grid-template-columns: 1fr;
    }
    
    .caja-summary {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
}

@media (min-width: 769px) {
    .sidebar {
        left: 0;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .main-content {
        margin-left: 250px;
    }
}