/* ===== VARIABLES CSS ===== */
:root {
    /* Paleta de colores cálidos y elegantes */
    --color-primary: #8B7355;          /* Marrón claro elegante */
    --color-primary-light: #A68B5B;    /* Marrón claro más suave */
    --color-primary-dark: #6B5B47;     /* Marrón más profundo */
    
    --color-secondary: #D4C4B0;        /* Beige cálido */
    --color-accent: #E8DDD4;           /* Arena suave */
    
    --color-background: #FEFCF8;       /* Blanco roto cálido */
    --color-surface: #F9F6F1;          /* Crema muy suave */
    --color-surface-elevated: #FFFFFF; /* Blanco puro para tarjetas */
    
    --color-text-primary: #3C3530;     /* Marrón oscuro para texto principal */
    --color-text-secondary: #6B5B47;   /* Marrón medio para texto secundario */
    --color-text-muted: #8B7355;       /* Marrón claro para texto deshabilitado */
    
    --color-border: #E8DDD4;           /* Bordes suaves */
    --color-border-light: #F2EDE6;     /* Bordes muy suaves */
    
    /* Estados */
    --color-success: #7A8471;          /* Verde oliva suave */
    --color-warning: #C4956C;          /* Naranja cálido */
    --color-error: #B85C57;            /* Rojo cálido */
    --color-info: #8B9DC3;             /* Azul grisáceo suave */
    
    /* Estados de pedidos */
    --color-pendiente: #C4956C;
    --color-en-produccion: #D4956C;
    --color-entregado: #7A8471;
    --color-cancelado: #9B8B7D;
    
    /* Tipografía */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
    --font-ui: 'Montserrat', sans-serif;
    
    /* Espaciado */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Bordes redondeados */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Sombras elegantes */
    --shadow-sm: 0 1px 3px rgba(139, 115, 85, 0.08);
    --shadow-md: 0 4px 12px rgba(139, 115, 85, 0.12);
    --shadow-lg: 0 8px 24px rgba(139, 115, 85, 0.15);
    --shadow-xl: 0 16px 40px rgba(139, 115, 85, 0.18);
    
    /* Transiciones */
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.25s ease-out;
    --transition-slow: 0.35s ease-out;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADER ELEGANTE ===== */
.header {
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-elevated) 100%);
    border-bottom: 1px solid var(--color-border-light);
    padding: var(--spacing-lg) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    color: var(--color-primary);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    gap: var(--spacing-sm);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 400;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.nav-btn:hover {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
    transform: translateY(-1px);
}

.nav-btn.active {
    background-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-icon {
    width: 1.125rem;
    height: 1.125rem;
}

/* ===== LAYOUT PRINCIPAL ===== */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-xl);
}

.section {
    display: none;
    animation: fadeIn var(--transition-slow);
}

.section.active {
    display: block;
}

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

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacing-2xl);
    gap: var(--spacing-xl);
}

.section-title h2 {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    font-weight: 300;
}

.section-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

/* ===== BOTONES ELEGANTES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.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 var(--transition-slow);
}

.btn:hover:before {
    left: 100%;
}

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

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

.btn-secondary {
    background-color: var(--color-surface-elevated);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

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

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.8125rem;
}

.btn-icon {
    width: 1rem;
    height: 1rem;
}

/* ===== PANEL DE CONFIGURACIÓN ===== */
.config-panel {
    background-color: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    display: none;
    animation: slideDown var(--transition-normal);
}

.config-panel.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.config-content h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
}

.config-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.config-option {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.config-option:hover {
    color: var(--color-text-primary);
}

.config-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    position: relative;
    transition: all var(--transition-fast);
}

.config-option input[type="checkbox"]:checked + .checkmark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.config-option input[type="checkbox"]:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===== FILTROS ELEGANTES ===== */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background-color: var(--color-surface-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.filter-label {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select,
.filter-input {
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-text-primary);
    background-color: white;
    transition: all var(--transition-fast);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.search-container {
    position: relative;
}

.search-input {
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-text-primary);
    background-color: white;
    width: 100%;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--color-text-muted);
}

/* ===== GRID DE PEDIDOS ===== */
.pedidos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-xl);
}

.pedido-card {
    background-color: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.pedido-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--color-primary-light);
}

.pedido-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.pedido-numero {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.pedido-estado {
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-xl);
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.estado-pendiente {
    background-color: rgba(196, 149, 108, 0.15);
    color: var(--color-pendiente);
}

.estado-en-produccion {
    background-color: rgba(212, 149, 108, 0.15);
    color: var(--color-en-produccion);
}

.estado-entregado {
    background-color: rgba(122, 132, 113, 0.15);
    color: var(--color-entregado);
}

.estado-cancelado {
    background-color: rgba(155, 139, 125, 0.15);
    color: var(--color-cancelado);
}

.pedido-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.pedido-field {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
}

.pedido-field-icon {
    width: 1rem;
    height: 1rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.pedido-field-label {
    color: var(--color-text-secondary);
    font-weight: 500;
    min-width: 80px;
}

.pedido-field-value {
    color: var(--color-text-primary);
    font-weight: 400;
}

/* ===== CALENDARIO ===== */
.calendar-legend {
    display: flex;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background-color: var(--color-surface-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
}

.legend-color.entregado {
    background-color: var(--color-entregado);
}

.legend-color.en-produccion {
    background-color: var(--color-en-produccion);
}

.legend-color.otro {
    background-color: var(--color-cancelado);
}

.legend-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.calendar-container {
    background-color: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: between;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-secondary) 100%);
    border-bottom: 1px solid var(--color-border);
}

.calendar-nav {
    background: none;
    border: none;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-nav:hover {
    background-color: rgba(255, 255, 255, 0.5);
    color: var(--color-text-primary);
}

.calendar-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
    flex: 1;
    text-align: center;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
    padding: var(--spacing-lg);
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day {
    min-height: 120px;
    padding: var(--spacing-md);
    border-right: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
    background-color: white;
    transition: background-color var(--transition-fast);
}

.calendar-day:hover {
    background-color: var(--color-surface);
}

.calendar-day.other-month {
    background-color: var(--color-surface);
    color: var(--color-text-muted);
}

.calendar-day-number {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-sm);
}

.calendar-event {
    padding: var(--spacing-xs) var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    line-height: 1.3;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.calendar-event:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-sm);
}

.calendar-event.entregado {
    background-color: rgba(122, 132, 113, 0.15);
    color: var(--color-entregado);
    border-left: 3px solid var(--color-entregado);
}

.calendar-event.en-produccion {
    background-color: rgba(212, 149, 108, 0.15);
    color: var(--color-en-produccion);
    border-left: 3px solid var(--color-en-produccion);
}

.calendar-event.otro {
    background-color: rgba(155, 139, 125, 0.15);
    color: var(--color-cancelado);
    border-left: 3px solid var(--color-cancelado);
}

/* ===== PESTAÑAS ===== */
.tabs {
    display: flex;
    margin-bottom: var(--spacing-xl);
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.tab {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    flex: 1;
    justify-content: center;
}

.tab:hover {
    color: var(--color-text-primary);
    background-color: rgba(255, 255, 255, 0.5);
}

.tab.active {
    background-color: var(--color-surface-elevated);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.tab-icon {
    width: 1rem;
    height: 1rem;
}

.tab-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn var(--transition-normal);
}

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

/* ===== GRID DE ENTIDADES ===== */
.entities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.entity-card {
    background-color: var(--color-surface-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.entity-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-primary-light);
}

.entity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.entity-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.entity-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.entity-action {
    background: none;
    border: none;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.entity-action:hover {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
}

.entity-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.entity-field {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
}

.entity-field-icon {
    width: 1rem;
    height: 1rem;
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.entity-field-value {
    color: var(--color-text-secondary);
}

/* ===== MODALES ELEGANTES ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
}

.modal.active {
    display: flex;
    animation: modalFadeIn var(--transition-normal);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(60, 53, 48, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--color-surface-elevated);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn var(--transition-normal);
}

.modal-large {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-elevated) 100%);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.modal-close {
    background: none;
    border: none;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background-color: var(--color-accent);
    color: var(--color-text-primary);
}

.modal-body {
    padding: var(--spacing-xl);
    max-height: 60vh;
    overflow-y: auto;
}

.modal-form {
    padding: var(--spacing-xl);
    max-height: 60vh;
    overflow-y: auto;
}

.form-section {
    margin-bottom: var(--spacing-2xl);
}

.form-section h4 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-label {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form-input,
.form-textarea {
    padding: var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--color-text-primary);
    background-color: white;
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

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

.producto-item {
    padding: var(--spacing-lg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    background-color: var(--color-surface);
}

.modal-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
    padding: var(--spacing-xl);
    border-top: 1px solid var(--color-border);
    background-color: var(--color-surface);
}

/* ===== NOTIFICACIONES ===== */
.notifications {
    position: fixed;
    top: var(--spacing-xl);
    right: var(--spacing-xl);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.notification {
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    animation: notificationSlideIn var(--transition-normal);
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.notification.error {
    background-color: var(--color-error);
    color: white;
}

.notification.info {
    background-color: var(--color-info);
    color: white;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .main {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-lg);
    }
    
    .section-actions {
        justify-content: flex-start;
    }
    
    .filters {
        grid-template-columns: 1fr 1fr;
    }
    
    .pedidos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 var(--spacing-lg);
        flex-direction: column;
        gap: var(--spacing-lg);
    }
    
    .nav {
        width: 100%;
        justify-content: center;
    }
    
    .nav-btn {
        flex: 1;
        justify-content: center;
    }
    
    .main {
        padding: var(--spacing-lg);
    }
    
    .section-title h2 {
        font-size: 1.875rem;
    }
    
    .filters {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .pedidos-grid {
        grid-template-columns: 1fr;
    }
    
    .entities-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: var(--spacing-lg);
        max-width: none;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .calendar-title {
        order: -1;
    }
    
    .calendar-day {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .nav-btn span {
        display: none;
    }
    
    .btn {
        padding: var(--spacing-md);
    }
    
    .btn-icon {
        margin: 0;
    }
    
    .config-options {
        grid-template-columns: 1fr;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .modal {
        padding: var(--spacing-md);
    }
    
    .notifications {
        top: var(--spacing-md);
        right: var(--spacing-md);
        left: var(--spacing-md);
    }
}

/* ===== UTILIDADES ===== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-light);
}

