/* ==================== BACKOFFICE CSS - MINIMALISTA ==================== */

/* Variables globales */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-color: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --border-radius: 12px;
    --border-radius-sm: 6px;
    --border-radius-lg: 16px;
    --padding-sm: 0.5rem;
    --padding-md: 1rem;
    --padding-lg: 1.5rem;
    --gap-sm: 0.5rem;
    --gap-md: 1rem;
    --gap-lg: 1.5rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-light: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
}

body.modal-open {
    overflow: hidden;
}

/* Componentes base para backoffice */
.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: 1rem 0.75rem;
    gap: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
    margin: 0.5rem 0;
    padding: 0;
    list-style: none;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.25rem;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    width: 100%;
    display: block;
}

.nav-links a:hover {
    background: var(--primary-color);
    color: white;
}

.btn-nav {
    margin-top: 0.5rem;
    width: 100%;
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 0.75rem 0;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
    display: block;
}

.btn-nav:hover {
    background: var(--primary-dark);
}

/* Contenedores y layouts */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--padding-md);
}

.section {
    padding: var(--padding-lg) 0;
}

.section-alt {
    background: var(--white);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-sm);
    padding: var(--padding-sm) var(--padding-md);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

/* Formularios */
.form-group {
    margin-bottom: var(--gap-md);
}

.form-label {
    display: block;
    margin-bottom: var(--gap-sm);
    font-weight: 600;
    color: var(--text-color);
}

.form-input {
    width: 100%;
    padding: var(--padding-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Tablas */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table th,
.table td {
    padding: var(--padding-sm);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-light);
    font-weight: 700;
    color: var(--text-color);
}

.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: var(--padding-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.card-header {
    margin-bottom: var(--gap-md);
    padding-bottom: var(--gap-sm);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-sm {
    margin-bottom: var(--gap-sm);
}

.mb-md {
    margin-bottom: var(--gap-md);
}

.mb-lg {
    margin-bottom: var(--gap-lg);
}

.mt-sm {
    margin-top: var(--gap-sm);
}

.mt-md {
    margin-top: var(--gap-md);
}

.mt-lg {
    margin-top: var(--gap-lg);
}

/* Responsive */
@media (min-width: 768px) {
    .nav {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 2rem;
        gap: 2rem;
    }
    
    .nav-links {
        flex-direction: row;
        width: auto;
        gap: 2rem;
        margin: 0;
    }
    
    .btn-nav {
        width: auto;
        margin-top: 0;
        padding: 0.75rem 1.5rem;
    }
    
    .container {
        padding: 0 var(--padding-lg);
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s ease;
    min-width: 300px;
    max-width: 500px;
    border-left: 4px solid;
    pointer-events: none;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.toast-success {
    border-left-color: var(--success-color, #10b981);
    background: #f0fdf4;
    color: #166534;
}

.toast-error {
    border-left-color: var(--error-color, #ef4444);
    background: #fef2f2;
    color: #991b1b;
}

.toast-info {
    border-left-color: var(--primary-color, #3b82f6);
    background: #f0f9ff;
    color: #1d4ed8;
}

.toast-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.toast-content {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: currentColor;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: opacity 0.2s, background-color 0.2s;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(0,0,0,0.08);
} 