:root {
    --primary-color: #1e88e5;
    --primary-dark: #1565c0;
    --secondary-color: #29b6f6;
    --accent-color: #00acc1;
    --success-color: #26a69a;
    --warning-color: #ffa726;
    --danger-color: #ef5350;
    --light-bg: #f5f9fc;
    --white: #ffffff;
    --text-dark: #263238;
    --text-muted: #607d8b;
    --border-color: #e0e0e0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo i {
    font-size: 60px;
    color: var(--primary-color);
}

.login-logo h2 {
    margin-top: 15px;
    color: var(--text-dark);
    font-size: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 136, 229, 0.3);
}

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

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

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

.btn-sm {
    padding: 8px 15px;
    font-size: 13px;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: #e0f2f1;
    color: #00695c;
    border-left: 4px solid var(--success-color);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
}

.sidebar-header h3 {
    font-size: 20px;
    margin-top: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--light-bg);
    color: var(--primary-color);
    border-right: 4px solid var(--primary-color);
}

.sidebar-menu i {
    width: 25px;
    margin-right: 12px;
    font-size: 18px;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 20px;
}

.top-bar {
    background: var(--white);
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.top-bar h1 {
    font-size: 24px;
    color: var(--text-dark);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white);
}

.stat-icon.blue { background: var(--primary-color); }
.stat-icon.green { background: var(--success-color); }
.stat-icon.orange { background: var(--warning-color); }
.stat-icon.red { background: var(--danger-color); }

.stat-info h3 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 14px;
}

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

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

thead {
    background: var(--light-bg);
}

thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
}

tbody td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: var(--light-bg);
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-pending { background: #fff3e0; color: #e65100; }
.badge-in-process { background: #e3f2fd; color: #1565c0; }
.badge-ready { background: #e8f5e9; color: #2e7d32; }
.badge-delivered { background: #f3e5f5; color: #6a1b9a; }
.badge-cancelled { background: #ffebee; color: #c62828; }

/* Modal */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

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

.btn-secondary:hover {
    background: var(--text-dark);
}
/* Sistema de Modales Mejorado */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal[style*='display: block'],
.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    font-size: 20px;
    color: white;
    margin: 0;
    font-weight: 600;
}

.modal-body {
    padding: 30px;
    background: var(--white);
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--light-bg);
    border-radius: 0 0 15px 15px;
}

.close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: white;
    line-height: 1;
    transition: all 0.3s;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal de Notificación */
#notificationModal .modal-content {
    max-width: 450px;
}

#notificationModal .modal-body {
    text-align: center;
    padding: 40px 30px;
}

#notificationModal .notification-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

#notificationModal .notification-icon.success {
    color: var(--success-color);
}

#notificationModal .notification-icon.error {
    color: var(--danger-color);
}

#notificationModal .notification-icon.warning {
    color: var(--warning-color);
}

#notificationModal .notification-icon.info {
    color: var(--primary-color);
}

#notificationModal .notification-message {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Modal de Confirmación */
#confirmModal .modal-content {
    max-width: 500px;
}

#confirmModal .modal-body {
    padding: 40px 30px;
    text-align: center;
}

#confirmModal .confirm-icon {
    font-size: 56px;
    color: var(--warning-color);
    margin-bottom: 20px;
}

#confirmModal .confirm-message {
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 10px;
}

#confirmModal .confirm-detail {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
        flex-wrap: wrap;
    }
}
