/* =============================================================
   ERP Taller de Reparación — Estilos Principales
   Diseño: Moderno, Profesional, ERP-style
   Fuente: Inter (Google Fonts)
   ============================================================= */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Variables CSS ────────────────────────────────────────── */
:root {
    /* Sidebar */
    --sidebar-bg:        #0f1629;
    --sidebar-border:    #1e2d4a;
    --sidebar-hover:     #1a2744;
    --sidebar-active:    #1e3a5f;
    --sidebar-text:      #94a3b8;
    --sidebar-text-active: #e2e8f0;
    --sidebar-width:     260px;
    --sidebar-icon:      #64748b;
    --sidebar-accent:    #3b82f6;

    /* Colores de marca */
    --primary:           #3b82f6;
    --primary-dark:      #2563eb;
    --primary-light:     #dbeafe;
    --secondary:         #6366f1;
    --success:           #10b981;
    --success-light:     #d1fae5;
    --warning:           #f59e0b;
    --warning-light:     #fef3c7;
    --danger:            #ef4444;
    --danger-light:      #fee2e2;
    --info:              #06b6d4;
    --info-light:        #cffafe;

    /* Fondo y superficie */
    --bg-main:           #f0f4f8;
    --bg-card:           #ffffff;
    --bg-card-hover:     #f8fafc;

    /* Texto */
    --text-primary:      #0f172a;
    --text-secondary:    #475569;
    --text-muted:        #94a3b8;

    /* Bordes */
    --border-color:      #e2e8f0;
    --border-radius:     12px;
    --border-radius-sm:  8px;
    --border-radius-lg:  16px;

    /* Sombras */
    --shadow-sm:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:            0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.05);
    --shadow-md:         0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);
    --shadow-lg:         0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

    /* Navbar */
    --navbar-height:     64px;

    /* Transiciones */
    --transition:        all .2s ease;
    --transition-slow:   all .35s ease;
}

/* ─── Reset y Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ─── Scrollbar personalizado ──────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ================================================================
   LAYOUT PRINCIPAL — SIDEBAR + CONTENT
   ================================================================ */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ─── Sidebar ──────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: var(--transition-slow);
    border-right: 1px solid var(--sidebar-border);
    overflow: hidden;
}

/* Logo */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--sidebar-border);
    text-decoration: none;
    min-height: var(--navbar-height);
}

.sidebar-brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(59,130,246,.4);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand-name {
    font-size: .875rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -.3px;
    line-height: 1.2;
}

.sidebar-brand-sub {
    font-size: .7rem;
    color: var(--sidebar-text);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* Navegación */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    scrollbar-width: thin;
    scrollbar-color: #1e2d4a transparent;
}

.sidebar-section-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #3d4f6b;
    padding: 16px 20px 6px;
}

.sidebar-item {
    padding: 0 10px;
    margin-bottom: 2px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--sidebar-text);
    font-size: .855rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.sidebar-link.active {
    background: var(--sidebar-active);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59,130,246,.2);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 3px; height: 60%;
    background: var(--sidebar-accent);
    border-radius: 0 3px 3px 0;
}

.sidebar-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--sidebar-icon);
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: var(--sidebar-accent);
}

.sidebar-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
    line-height: 1.6;
}

/* Usuario en el sidebar */
.sidebar-user {
    border-top: 1px solid var(--sidebar-border);
    padding: 14px;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--sidebar-hover);
}

.sidebar-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: .8rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.2;
}

.sidebar-user-role {
    font-size: .68rem;
    color: var(--sidebar-text);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 12px;
    margin-top: 8px;
    background: none;
    border: 1px solid var(--sidebar-border);
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    justify-content: center;
}

.sidebar-logout:hover {
    background: rgba(239,68,68,.1);
    border-color: rgba(239,68,68,.3);
    color: #fca5a5;
}

/* ─── Área de Contenido ────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ─── Navbar superior ──────────────────────────────────────── */
.top-navbar {
    height: var(--navbar-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-breadcrumb {
    flex: 1;
}

.navbar-breadcrumb .breadcrumb {
    margin: 0;
    font-size: .8rem;
}

.navbar-breadcrumb .breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.navbar-breadcrumb .breadcrumb-item a:hover { color: var(--primary); }
.navbar-breadcrumb .breadcrumb-item.active { color: var(--text-primary); font-weight: 500; }

/* Búsqueda rápida en navbar */
.navbar-search {
    position: relative;
    flex-shrink: 0;
}

.navbar-search input {
    width: 240px;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: .82rem;
    background: var(--bg-main);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
    font-family: 'Inter', sans-serif;
}

.navbar-search input:focus {
    width: 300px;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(59,130,246,.1);
}

.navbar-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .875rem;
}

/* Botones de acción del navbar */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    font-size: .9rem;
}

.navbar-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

/* ─── Página de contenido ──────────────────────────────────── */
.page-content {
    flex: 1;
    padding: 24px;
}

/* Header de página */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -.5px;
    line-height: 1.2;
}

.page-subtitle {
    font-size: .82rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 400;
}

/* ================================================================
   CARDS
   ================================================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover { box-shadow: var(--shadow); }

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: .9rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -.2px;
    margin: 0;
}

.card-body { padding: 20px; }

/* ─── Stat Cards ───────────────────────────────────────────── */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 120px; height: 120px;
    border-radius: 50%;
    opacity: .04;
    transform: translate(30px, -30px);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.stat-card-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-card-info { flex: 1; }

.stat-card-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -1px;
}

.stat-card-label {
    font-size: .78rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-card-change {
    font-size: .72rem;
    font-weight: 600;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Variantes de stat cards */
.stat-blue   .stat-card-icon { background: #dbeafe; color: #2563eb; }
.stat-indigo .stat-card-icon { background: #e0e7ff; color: #4f46e5; }
.stat-green  .stat-card-icon { background: #d1fae5; color: #059669; }
.stat-amber  .stat-card-icon { background: #fef3c7; color: #d97706; }
.stat-red    .stat-card-icon { background: #fee2e2; color: #dc2626; }
.stat-cyan   .stat-card-icon { background: #cffafe; color: #0891b2; }
.stat-purple .stat-card-icon { background: #f3e8ff; color: #7c3aed; }
.stat-teal   .stat-card-icon { background: #ccfbf1; color: #0d9488; }

.stat-blue::before   { background: #3b82f6; }
.stat-green::before  { background: #10b981; }
.stat-amber::before  { background: #f59e0b; }
.stat-red::before    { background: #ef4444; }

/* ================================================================
   TABLAS
   ================================================================ */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.table {
    margin: 0;
    font-size: .845rem;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table thead th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover td { background: #f8fafc; }

.table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--text-primary);
}

.table tbody tr:last-child td { border-bottom: 0; }

/* ================================================================
   BADGES
   ================================================================ */

.badge {
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    letter-spacing: .2px;
}

.badge i { font-size: .7rem; }

/* Colores de badge personalizados */
.badge-primary   { background: #dbeafe; color: #1d4ed8; }
.badge-success   { background: #d1fae5; color: #065f46; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-danger    { background: #fee2e2; color: #991b1b; }
.badge-info      { background: #cffafe; color: #164e63; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* ================================================================
   BOTONES
   ================================================================ */

.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: .845rem;
    border-radius: var(--border-radius-sm);
    padding: 8px 16px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    box-shadow: 0 4px 12px rgba(59,130,246,.35);
    transform: translateY(-1px);
}

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

.btn-success:hover {
    background: #059669;
    color: white;
    box-shadow: 0 4px 12px rgba(16,185,129,.35);
}

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

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

.btn-sm { padding: 5px 12px; font-size: .78rem; }
.btn-lg { padding: 11px 24px; font-size: .95rem; font-weight: 600; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; font-size: .875rem; }

/* ================================================================
   FORMULARIOS
   ================================================================ */

.form-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.form-control, .form-select {
    font-family: 'Inter', sans-serif;
    font-size: .845rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 9px 12px;
    color: var(--text-primary);
    background: white;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    outline: none;
}

.form-control::placeholder { color: var(--text-muted); }

.form-text {
    font-size: .75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.input-group-text {
    background: #f8fafc;
    border-color: var(--border-color);
    color: var(--text-muted);
    font-size: .845rem;
}

/* ================================================================
   ALERTAS / FLASH MESSAGES
   ================================================================ */

.alert {
    border: 0;
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    font-size: .845rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.alert-success { background: var(--success-light); color: #065f46; }
.alert-danger   { background: var(--danger-light);  color: #991b1b; }
.alert-warning  { background: var(--warning-light); color: #92400e; }
.alert-info     { background: var(--info-light);    color: #164e63; }

/* ================================================================
   MODALES
   ================================================================ */

.modal-content {
    border: 0;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    font-family: 'Inter', sans-serif;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 18px 24px;
}

.modal-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.3px;
}

.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); }

/* ================================================================
   PÁGINA DE LOGIN
   ================================================================ */

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f1629 0%, #1a2744 40%, #0f1629 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Decoración de fondo */
.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-page::before {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(59,130,246,.15) 0%, transparent 70%);
    top: -200px; right: -200px;
}

.login-page::after {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(99,102,241,.12) 0%, transparent 70%);
    bottom: -100px; left: -100px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 25px 50px rgba(0,0,0,.4);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,.1);
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(59,130,246,.4);
}

.login-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    text-align: center;
    line-height: 1.2;
}

.login-subtitle {
    font-size: .8rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

.login-form .form-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.login-form .form-control {
    height: 46px;
    font-size: .9rem;
    border-radius: 10px;
}

.login-form .btn-login {
    height: 48px;
    font-size: .9rem;
    font-weight: 700;
    width: 100%;
    justify-content: center;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: 0;
    letter-spacing: .2px;
    box-shadow: 0 4px 16px rgba(59,130,246,.4);
    transition: all .25s ease;
}

.login-form .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,.5);
}

.login-form .btn-login:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: .75rem;
    color: var(--text-muted);
}

/* ================================================================
   FOOTER
   ================================================================ */

.app-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: .75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* ================================================================
   UTILITARIOS
   ================================================================ */

.text-money { font-variant-numeric: tabular-nums; font-weight: 600; }
.text-primary-custom { color: var(--primary) !important; }
.text-success-custom { color: var(--success) !important; }
.text-danger-custom  { color: var(--danger) !important; }
.text-warning-custom { color: var(--warning) !important; }
.text-muted-custom   { color: var(--text-muted) !important; }

.avatar-sm {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: inline-flex; align-items: center; justify-content: center;
    color: white;
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i { font-size: 3rem; margin-bottom: 12px; color: #cbd5e1; }
.empty-state p { margin: 0; font-size: .9rem; }

/* Pipeline de estados */
.estado-timeline {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.estado-step {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    color: var(--text-muted);
}

.estado-step.active { color: var(--primary); font-weight: 600; }
.estado-step.done { color: var(--success); }
.estado-step-arrow { color: var(--border-color); font-size: .7rem; }

/* Indicador de saldo */
.saldo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

.saldo-ok      { background: #d1fae5; color: #065f46; }
.saldo-parcial { background: #fef3c7; color: #92400e; }
.saldo-deuda   { background: #fee2e2; color: #991b1b; }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 30px rgba(0,0,0,.5);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }

    .sidebar-overlay.show { display: block; }

    .navbar-search input { width: 180px; }
    .navbar-search input:focus { width: 220px; }
}

@media (max-width: 576px) {
    .page-content { padding: 16px; }
    .navbar-search { display: none; }
    .login-card { padding: 28px 20px; }
}

/* ================================================================
   ANIMACIONES
   ================================================================ */

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

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

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.animate-fadeInUp { animation: fadeInUp .4s ease both; }
.animate-fadeIn   { animation: fadeIn .3s ease both; }

/* Delay para cascada */
.delay-1 { animation-delay: .05s; }
.delay-2 { animation-delay: .1s; }
.delay-3 { animation-delay: .15s; }
.delay-4 { animation-delay: .2s; }
.delay-5 { animation-delay: .25s; }
.delay-6 { animation-delay: .3s; }
.delay-7 { animation-delay: .35s; }
.delay-8 { animation-delay: .4s; }

/* Punto activo pulsante */
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.active {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(16,185,129,.2);
    animation: pulse-dot 2s ease infinite;
}
