/* Variables de colores */
:root {
    --primary-color: #ff7eb3;
    --primary-light: #ffb3d1;
    --primary-dark: #ff5c9b;
    --secondary-color: #a2d2ff;
    --accent-color: #bde0fe;
    --background-color: #faf7f5;
    --text-color: #333;
    --text-light: #777;
    --success-color: #8ac926;
    --warning-color: #ffca3a;
    --error-color: #ff595e;
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Login con slider */
.login-body {
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
    background: #f8f9fa;
}

.login-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

.login-left {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.slide.active {
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.slide-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.slide-content {
    position: absolute;
    bottom: 80px;
    left: 60px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    z-index: 2;
}

.slide-content h3 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 600;
}

.slide-content p {
    font-size: 18px;
    opacity: 0.9;
    line-height: 1.5;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 10;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-size: 18px;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 12px;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 40px;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 180px;
    height: auto;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 28px;
}

.login-header p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-color);
    font-size: 14px;
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 18px;
}

.input-with-icon input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    background: white;
    font-size: 16px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 126, 179, 0.2);
}

.input-with-icon input::placeholder {
    color: #aaa;
}

.login-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 126, 179, 0.4);
}

.error-message {
    background: var(--error-color);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.login-footer p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
    }
    
    .login-left {
        height: 40vh;
    }
    
    .login-right {
        padding: 20px;
    }
    
    .slide-content {
        bottom: 40px;
        left: 30px;
        max-width: 100%;
        padding-right: 30px;
    }
    
    .slide-content h3 {
        font-size: 24px;
    }
    
    .slide-content p {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .slide-content {
        bottom: 30px;
        left: 20px;
    }
    
    .slide-content h3 {
        font-size: 20px;
    }
    
    .slide-content p {
        font-size: 14px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
    }
}

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.dashboard-header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-left h1 {
    font-size: 24px;
    color: var(--text-color);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info, .panaderia-info {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logout-btn {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.logout-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.dashboard-main {
    flex: 1;
    padding: 30px;
}

.dashboard-footer {
    text-align: center;
    padding: 20px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Contenido del dashboard */
.dashboard-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.welcome-section {
    margin-bottom: 30px;
}

.welcome-section h2 {
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 20px;
}

.user-info-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.user-info-card p {
    margin-bottom: 10px;
    font-size: 16px;
}

.user-info-card strong {
    color: var(--primary-color);
}

.role-header {
    margin-bottom: 30px;
}

.role-header h2 {
    font-size: 24px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.role-header p {
    color: var(--text-light);
}

/* Tablas */
.pedidos-container {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--card-shadow);
}

.pedidos-container h3 {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 20px;
}

.pedidos-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.pedidos-table th,
.pedidos-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.pedidos-table th {
    background: var(--primary-light);
    color: var(--text-color);
    font-weight: 600;
}

.pedidos-table tr:hover {
    background: rgba(255, 255, 255, 0.9);
}

.estado-select {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.estado-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 126, 179, 0.2);
}

.estado-en-espera {
    color: var(--warning-color);
    font-weight: 500;
}

.estado-en-proceso {
    color: var(--primary-color);
    font-weight: 500;
}

.estado-listo {
    color: var(--success-color);
    font-weight: 500;
}

.estado-despachado {
    color: var(--text-light);
    font-weight: 500;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.notification.success {
    background: var(--success-color);
}

.notification.error {
    background: var(--error-color);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard-content {
    animation: fadeIn 0.5s ease;
}

.login-card {
    animation: fadeIn 0.5s ease;
}

/* Estados de carga */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Efectos de hover mejorados */
.pedidos-table tr {
    transition: all 0.3s ease;
}

.pedidos-table tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/*DEBUG*/
.debug-info {
    margin-top: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-size: 14px;
    max-height: 300px;
    overflow-y: auto;
}

.debug-info h3 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 16px;
}

.debug-info pre {
    font-size: 12px;
    color: var(--text-light);
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #fff;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
}