/* ==========================================================================
   OZ · Sistema visual (inspirado en Pulse Fit)
   Paleta oscura, acento naranja, tipografía deportiva Barlow / Barlow Condensed.
   Estructura y componentes compartidos. Lo específico de cada módulo está en app-extra.css.
   ========================================================================== */

/* Tipografías locales: funcionan sin internet (la app las guarda en caché). Licencia OFL. */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('/vendor/fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('/vendor/fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('/vendor/fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('/vendor/fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('/vendor/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('/vendor/fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url('/vendor/fonts/barlow-condensed-latin-800-normal.woff2') format('woff2'); }

:root {
    color-scheme: dark;

    /* Superficies */
    --bg: #0A0A0A;
    --bg-side: #0E0E0F;
    --surface: #141414;
    --surface-2: #1A1A1A;
    --surface-3: #222222;
    --field: #0F0F0F;
    --border: #262626;
    --border-strong: #363636;

    /* Texto */
    --text: #F5F5F5;
    --text-2: #A3A3A3;
    --text-3: #8A8A8A;

    /* Acento de marca */
    --accent: #FF6B35;
    --accent-hover: #FF8152;
    --accent-ink: #1A0A03;
    --accent-soft: rgba(255, 107, 53, 0.14);
    --accent-line: rgba(255, 107, 53, 0.38);

    /* Estados */
    --success: #22C55E;  --success-text: #4ADE80;  --success-soft: rgba(34, 197, 94, 0.13);  --success-line: rgba(34, 197, 94, 0.35);
    --warning: #F59E0B;  --warning-text: #FBBF24;  --warning-soft: rgba(245, 158, 11, 0.13); --warning-line: rgba(245, 158, 11, 0.35);
    --danger:  #EF4444;  --danger-text:  #F87171;  --danger-soft:  rgba(239, 68, 68, 0.13);  --danger-line:  rgba(239, 68, 68, 0.38);
    --info:    #3B82F6;  --info-text:    #60A5FA;  --info-soft:    rgba(59, 130, 246, 0.14); --info-line:    rgba(59, 130, 246, 0.35);

    /* Forma */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.55);
    --glow: 0 10px 28px rgba(255, 107, 53, 0.28);

    /* Tipografía */
    --font-display: 'Barlow Condensed', 'Arial Narrow', 'Roboto Condensed', sans-serif;
    --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --ease: cubic-bezier(.2, .7, .2, 1);
    --sidebar-w: 248px;
}

/* ============================================
   BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; background: var(--bg); }

body {
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

strong, b { font-weight: 600; color: var(--text); }
a { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }

* { scrollbar-width: thin; scrollbar-color: #3A3A3A transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Iconos SVG (sprite en index.html) */
.ico {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

/* ============================================
   MARCA
   ============================================ */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--glow);
    flex: 0 0 auto;
}
.brand-mark .ico { width: 22px; height: 22px; fill: var(--accent-ink); stroke: var(--accent-ink); stroke-width: 1.5; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}
.brand-name em { font-style: normal; color: var(--accent); }
.brand-sub {
    margin-top: 4px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text-3);
}
.brand-lg .brand-mark { width: 52px; height: 52px; border-radius: 14px; }
.brand-lg .brand-mark .ico { width: 28px; height: 28px; }
.brand-lg .brand-name { font-size: 32px; }

/* Etiqueta tipo "píldora" (estilo Pulse Fit) */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }

/* ============================================
   LOGIN Y PRIMER ARRANQUE
   ============================================ */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    background:
        radial-gradient(900px 520px at 85% -10%, rgba(255, 107, 53, 0.20), transparent 60%),
        radial-gradient(700px 480px at -10% 110%, rgba(59, 130, 246, 0.10), transparent 60%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 14px),
        var(--bg);
}

.login-box {
    width: 100%;
    max-width: 440px;
    padding: 36px 32px 32px;
    background: rgba(20, 20, 20, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
}

.login-header { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 28px; }
.login-header h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 40px;
    line-height: 0.98;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}
.login-header h1 em { font-style: normal; color: var(--accent); }
.login-header p { color: var(--text-2); font-size: 15px; margin-top: -8px; }

.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    background: var(--accent);
    color: var(--accent-ink);
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: var(--glow);
    transition: background 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-login:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.55; cursor: progress; }

/* ============================================
   ESTRUCTURA DE LA APP
   ============================================ */
.app-wrapper { display: flex; height: 100vh; height: 100dvh; background: var(--bg); }

/* Barra lateral (escritorio) */
.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    display: flex;
    flex-direction: column;
    padding: 22px 14px;
    overflow-y: auto;
    background: var(--bg-side);
    border-right: 1px solid var(--border);
}

.sidebar-header { padding: 0 8px; margin-bottom: 22px; }

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
}
.user-info-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-info-value { font-weight: 600; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-info-label { font-size: 12px; color: var(--text-2); }

.nav-section {
    padding: 0 12px 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-3);
}

.nav-menu { display: flex; flex-direction: column; gap: 4px; list-style: none; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text-2);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    user-select: none;
    transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); }
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}
.nav-item.disabled { opacity: 0.4; pointer-events: none; }
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; transition: background 0.18s var(--ease), color 0.18s var(--ease); }
.nav-icon .ico { width: 21px; height: 21px; }
.nav-item.active .nav-icon { background: var(--accent); color: var(--accent-ink); }
.nav-short { display: none; }

/* Área principal */
.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 32px;
    background: rgba(10, 10, 10, 0.86);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    z-index: 20;
}
.header-row { flex-wrap: wrap; }
.header-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.header-mark { display: none; }
.header-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}
.header-subtitle { margin-top: 2px; font-size: 14px; color: var(--text-2); }
.header-user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }

.content-area { flex: 1; overflow-y: auto; padding: 28px 32px 40px; }
.content-area > .view { max-width: 1440px; margin: 0 auto; }

.view { display: none; }
.view.active { display: block; animation: viewIn 0.28s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============================================
   TARJETAS E INDICADORES
   ============================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    line-height: 1.15;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
}
.card-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    flex: 0 0 auto;
    font-size: 18px;
}
.card-title-icon .ico { width: 19px; height: 19px; }
.card-title-icon.warn { background: var(--warning-soft); color: var(--warning-text); }
.card-title-icon.danger { background: var(--danger-soft); color: var(--danger-text); }
.card-title-icon.success { background: var(--success-soft); color: var(--success-text); }

.card.card-danger { border-color: var(--danger-line); box-shadow: inset 4px 0 0 var(--danger); }

.split-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    --tone: var(--accent);
    --tone-soft: var(--accent-soft);
    position: relative;
    overflow: hidden;
    padding: 20px 20px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
.stat-card::before {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--tone-soft) 0%, transparent 70%);
    pointer-events: none;
}
.stat-card.success { --tone: var(--success-text); --tone-soft: var(--success-soft); }
.stat-card.info { --tone: var(--info-text); --tone-soft: var(--info-soft); }
.stat-card.warning { --tone: var(--warning-text); --tone-soft: var(--warning-soft); }
.stat-card.danger { --tone: var(--danger-text); --tone-soft: var(--danger-soft); }

.stat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
}
.stat-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--tone-soft);
    color: var(--tone);
    flex: 0 0 auto;
}
.stat-ico .ico { width: 18px; height: 18px; }
.stat-value {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 42px;
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.stat-change { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--success-text); }
.stat-change.negative { color: var(--danger-text); }

/* ============================================
   FORMULARIOS
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.form-row .form-group { margin-bottom: 0; }

.form-group label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-2);
}

.form-group input,
.form-group select,
.form-group textarea,
.wide-input {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    background: var(--field);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.form-group input::placeholder, .wide-input::placeholder, textarea::placeholder { color: var(--text-3); }
.form-group input:hover, .form-group select:hover, .wide-input:hover { border-color: #474747; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.wide-input:focus {
    outline: none;
    border-color: var(--accent);
    background: #121212;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.22);
}
.form-group input:disabled, .form-group select:disabled { opacity: 0.55; cursor: not-allowed; }

select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A3A3A3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    cursor: pointer;
}
select option { background: #161616; color: var(--text); }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(0.8); cursor: pointer; }

/* Campo con icono a la izquierda */
.input-ico, .search-field { position: relative; display: flex; align-items: center; }
.input-ico > .ico, .search-field > .ico {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-3);
    pointer-events: none;
}
.input-ico input, .search-field input { padding-left: 44px !important; }
.search-field { flex: 1; min-width: 200px; }

.error { min-height: 18px; margin-bottom: 10px; color: var(--danger-text); font-size: 13px; font-weight: 600; }

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.1;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn .ico { width: 18px; height: 18px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(255, 107, 53, 0.22); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: var(--glow); }

.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); border-color: #4A4A4A; }

.btn-success { background: var(--success); color: #04210F; }
.btn-success:hover:not(:disabled) { background: #34D46C; }

.btn-danger { background: var(--danger-soft); color: var(--danger-text); border-color: var(--danger-line); }
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.22); color: #FCA5A5; }

.btn-small { min-height: 36px; padding: 6px 12px; font-size: 13.5px; }
.btn-small .ico { width: 16px; height: 16px; }
.btn-block { flex: 1; }

.btn-group { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ============================================
   VENTANAS (MODALES)
   ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(6px);
}
.modal.active { display: flex; animation: fadeIn 0.18s ease-out; }
.modal.active .modal-content { animation: popIn 0.24s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-content {
    position: relative;
    width: 100%;
    max-width: min(680px, 94vw);
    max-height: 92vh;
    overflow-y: auto;
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    margin-bottom: 18px;
    padding-right: 48px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 16px;
    cursor: pointer;
    transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }

/* ============================================
   TABLAS
   ============================================ */
.table-responsive { overflow-x: auto; border-radius: var(--radius); }

table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
thead { background: var(--surface-2); }
th {
    padding: 12px 14px;
    text-align: left;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
th:first-child { border-top-left-radius: var(--radius-sm); }
th:last-child { border-top-right-radius: var(--radius-sm); }
td {
    padding: 13px 14px;
    color: #D4D4D4;
    border-bottom: 1px solid #1F1F1F;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
tbody tr { transition: background 0.15s var(--ease); }
tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
tbody tr:last-child td { border-bottom: none; }
td strong { color: var(--text); }

/* ============================================
   INSIGNIAS DE ESTADO
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.badge-success { background: var(--success-soft); border-color: var(--success-line); color: var(--success-text); }
.badge-warning { background: var(--warning-soft); border-color: var(--warning-line); color: var(--warning-text); }
.badge-danger  { background: var(--danger-soft);  border-color: var(--danger-line);  color: var(--danger-text); }
.badge-info    { background: var(--info-soft);    border-color: var(--info-line);    color: var(--info-text); }

/* ============================================
   AVISO EMERGENTE (TOAST)
   ============================================ */
.toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 380px;
    padding: 14px 18px;
    background: #1C1C1C;
    border: 1px solid var(--border-strong);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    color: var(--text);
    font-weight: 600;
    font-size: 14.5px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok { border-left-color: var(--success); }
.toast.bad { border-left-color: var(--danger); }

/* ============================================
   PANTALLAS MEDIANAS (tableta horizontal)
   ============================================ */
@media (max-width: 1180px) {
    :root { --sidebar-w: 220px; }
    .content-area { padding: 24px; }
    .header { padding: 18px 24px; }
}

@media (max-width: 1024px) {
    .split-2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .dashboard-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
