/* ═══════════════════════════════════════════════════════════════
   NEXORA PREMIUM — Tema global V2.7.1
   Aplica a TODA la app. Va DESPUÉS de site.css y MudBlazor.min.css.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Font override ─── */
html, body, .mud-typography, .mud-input, .mud-button, .mud-chip,
.mud-table, .mud-dialog, .mud-card, .mud-paper, .mud-select,
.mud-menu, .mud-list, .mud-tab, .mud-nav-link,
input, select, textarea, button {
    font-family: 'Outfit', 'Roboto', sans-serif !important;
}

/* ─── Ambient background glow ─── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 600px at 12% 8%, rgba(56,189,248,.035), transparent),
        radial-gradient(ellipse 600px 500px at 88% 55%, rgba(139,92,246,.025), transparent),
        radial-gradient(ellipse 500px 400px at 50% 95%, rgba(16,185,129,.02), transparent);
    pointer-events: none;
    z-index: 0;
}
.app-shell { position: relative; z-index: 1; }

/* ─── Sidebar premium ─── */
.sidebar {
    background: linear-gradient(180deg, #040a18 0%, #060e1e 55%, #081225 100%) !important;
    border-right: 1px solid rgba(148,163,184,.06) !important;
}
.brand { letter-spacing: -.3px !important; }
.menu-item, .submenu-item, .menu-group summary {
    border-radius: 12px !important;
    transition: all .25s !important;
}
.menu-item:hover, .submenu-item:hover, .menu-group summary:hover {
    background: rgba(56,189,248,.08) !important;
    transform: translateX(3px);
}

/* ─── Topbar premium ─── */
.topbar {
    background: rgba(6,9,15,.85) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(148,163,184,.06) !important;
}

/* ─── Content area ─── */
.content-area { position: relative; z-index: 1; }

/* ═══ MudCard → Glass ═══ */
.mud-card, .card, .dark-paper {
    background: rgba(17,24,39,.6) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(148,163,184,.07) !important;
    border-radius: 16px !important;
    box-shadow: 0 16px 40px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.03) !important;
    transition: all .3s !important;
}
.mud-card:hover { border-color: rgba(148,163,184,.12) !important; }

/* ═══ MudPaper → Glass ═══ */
.mud-paper:not(.mud-table):not(.mud-menu):not(.mud-popover-paper) {
    background: rgba(17,24,39,.5) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(148,163,184,.06) !important;
    border-radius: 14px !important;
}

/* ═══ MudTable → Premium ═══ */
.mud-table {
    background: transparent !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}
.mud-table .mud-table-container {
    background: transparent !important;
}
.mud-table .mud-table-head th,
.mud-table .mud-table-head .mud-table-cell {
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: .7px !important;
    text-transform: uppercase !important;
    color: #475569 !important;
    background: rgba(255,255,255,.02) !important;
    border-bottom: 1px solid rgba(148,163,184,.07) !important;
    padding: 12px 14px !important;
}
.mud-table .mud-table-body .mud-table-row {
    transition: all .2s !important;
}
.mud-table .mud-table-body .mud-table-row:hover {
    background: rgba(56,189,248,.025) !important;
}
.mud-table .mud-table-body .mud-table-cell {
    border-bottom: 1px solid rgba(148,163,184,.04) !important;
    padding: 14px !important;
}
.mud-table .mud-table-body .mud-table-row:hover .mud-table-cell:first-child {
    border-radius: 10px 0 0 10px;
}
.mud-table .mud-table-body .mud-table-row:hover .mud-table-cell:last-child {
    border-radius: 0 10px 10px 0;
}

/* ═══ MudChip → Premium ═══ */
.mud-chip {
    border-radius: 20px !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    letter-spacing: .3px !important;
    transition: all .2s !important;
}
.mud-chip:hover {
    transform: translateY(-1px) !important;
}

/* ═══ MudButton → Premium ═══ */
.mud-button {
    border-radius: 12px !important;
    font-weight: 700 !important;
    letter-spacing: .2px !important;
    transition: all .25s !important;
}
.mud-button-filled.mud-button-primary {
    background: linear-gradient(135deg, #0e7490, #0891b2) !important;
    box-shadow: 0 4px 14px rgba(8,145,178,.2) !important;
}
.mud-button-filled.mud-button-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(8,145,178,.3) !important;
}
.mud-button-outlined {
    border-color: rgba(148,163,184,.12) !important;
}
.mud-button-outlined:hover {
    border-color: rgba(56,189,248,.3) !important;
    background: rgba(56,189,248,.04) !important;
}

/* ═══ MudDialog → Premium ═══ */
.mud-dialog {
    background: rgba(11,17,32,.95) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(148,163,184,.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 32px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.04) !important;
}
.mud-dialog .mud-dialog-title {
    font-weight: 800 !important;
    letter-spacing: -.3px !important;
}

/* ═══ MudInput / MudTextField → Premium ═══ */
.mud-input.mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(148,163,184,.1) !important;
    border-radius: 12px !important;
    transition: all .25s !important;
}
.mud-input.mud-input-outlined:hover .mud-input-outlined-border,
.mud-input.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: rgba(56,189,248,.3) !important;
}
.mud-input.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    box-shadow: 0 0 0 3px rgba(56,189,248,.06) !important;
}
.mud-input-control .mud-input-label {
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    letter-spacing: .3px !important;
}

/* ═══ MudSelect → Premium ═══ */
.mud-select .mud-input-outlined .mud-input-outlined-border {
    border-radius: 12px !important;
}

/* ═══ MudNavLink → Premium ═══ */
.mud-nav-link { border-radius: 12px !important; transition: all .2s !important; }
.mud-nav-link:hover { transform: translateX(3px) !important; }

/* ═══ MudAlert → Premium ═══ */
.mud-alert {
    border-radius: 14px !important;
    backdrop-filter: blur(8px) !important;
}

/* ═══ MudTooltip → Premium ═══ */
.mud-tooltip {
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
}

/* ═══════════════════════════════════════════
   PREMIUM UTILITY CLASSES
   Usar en cualquier pantalla de Nexora
   ═══════════════════════════════════════════ */

/* ─── Premium KPI Card ─── */
.nx-kpi {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(148,163,184,.07);
    border-radius: 14px;
    padding: 18px;
    position: relative;
    overflow: hidden;
    transition: all .3s;
    cursor: default;
}
.nx-kpi:hover {
    border-color: rgba(148,163,184,.14);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0,0,0,.2);
}
.nx-kpi-glow {
    position: absolute;
    top: -25px;
    right: -25px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    filter: blur(28px);
    opacity: .12;
}
.nx-kpi-value {
    font-size: 34px;
    font-weight: 900;
    letter-spacing: -2px;
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}
.nx-kpi-label {
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
    margin-top: 4px;
    position: relative;
}
.nx-kpi-sub {
    font-size: 10px;
    color: #475569;
    margin-top: 1px;
    position: relative;
}

/* KPI color variants */
.nx-kpi.cyan .nx-kpi-glow { background: #38bdf8; }
.nx-kpi.cyan .nx-kpi-value { color: #38bdf8; }
.nx-kpi.green .nx-kpi-glow { background: #10b981; }
.nx-kpi.green .nx-kpi-value { color: #10b981; }
.nx-kpi.amber .nx-kpi-glow { background: #f59e0b; }
.nx-kpi.amber .nx-kpi-value { color: #f59e0b; }
.nx-kpi.red .nx-kpi-glow { background: #ef4444; }
.nx-kpi.red .nx-kpi-value { color: #ef4444; }
.nx-kpi.purple .nx-kpi-glow { background: #8b5cf6; }
.nx-kpi.purple .nx-kpi-value { color: #8b5cf6; }

/* ─── Premium Alert Banner ─── */
.nx-alert {
    background: linear-gradient(135deg, rgba(245,158,11,.06), rgba(245,158,11,.02));
    border: 1px solid rgba(245,158,11,.1);
    border-radius: 14px;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all .3s;
}
.nx-alert:hover {
    border-color: rgba(245,158,11,.22);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245,158,11,.06);
}

/* ─── Premium Chip/Badge ─── */
.nx-chip {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .3px;
}
.nx-chip.cyan { background: rgba(56,189,248,.08); color: #38bdf8; border: 1px solid rgba(56,189,248,.12); }
.nx-chip.green { background: rgba(16,185,129,.08); color: #10b981; border: 1px solid rgba(16,185,129,.12); }
.nx-chip.amber { background: rgba(245,158,11,.08); color: #f59e0b; border: 1px solid rgba(245,158,11,.12); }
.nx-chip.red { background: rgba(239,68,68,.08); color: #fca5a5; border: 1px solid rgba(239,68,68,.12); }
.nx-chip.purple { background: rgba(139,92,246,.08); color: #c4b5fd; border: 1px solid rgba(139,92,246,.12); }

/* ─── Glass panel ─── */
.nx-glass {
    background: rgba(17,24,39,.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(148,163,184,.07);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.03);
}

/* ─── Monospace numbers ─── */
.nx-mono {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

/* ─── Hover lift ─── */
.nx-lift {
    transition: all .3s;
}
.nx-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
}

/* ─── Gradient text ─── */
.nx-gradient-text {
    background: linear-gradient(135deg, #f1f5f9 30%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Premium search input ─── */
.nx-search {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(148,163,184,.08);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    color: #f1f5f9;
    outline: none;
    font-family: 'Outfit', sans-serif;
    transition: all .25s;
}
.nx-search::placeholder { color: #475569; }
.nx-search:focus {
    border-color: rgba(56,189,248,.25);
    box-shadow: 0 0 0 3px rgba(56,189,248,.06);
    background: rgba(255,255,255,.06);
}

/* ─── Premium filter input ─── */
.nx-filter {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(148,163,184,.07);
    border-radius: 9px;
    padding: 7px 12px;
    font-size: 11px;
    color: #94a3b8;
    outline: none;
    font-family: 'Outfit', sans-serif;
    transition: all .2s;
}
.nx-filter:focus { border-color: rgba(56,189,248,.2); background: rgba(255,255,255,.05); }

/* ─── Premium divider ─── */
.nx-div {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148,163,184,.1), transparent);
    margin: 16px 0;
}

/* ─── Section label ─── */
.nx-label {
    font-size: 9px;
    font-weight: 700;
    color: #475569;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ─── Page title gradient ─── */
.nx-page-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
    background: linear-gradient(135deg, #f1f5f9, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ─── Version pill ─── */
.nx-ver {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #38bdf8;
    background: rgba(56,189,248,.08);
    border: 1px solid rgba(56,189,248,.12);
    padding: 3px 9px;
    border-radius: 20px;
    display: inline-block;
}

/* ─── Responsive mobile ─── */
@media (max-width: 768px) {
    .nx-kpi { padding: 14px; }
    .nx-kpi-value { font-size: 26px; }
}

/* ─── V2.7.2 · Chip slate (tipo SD/Invoice) ─── */
.nx-chip.slate { background: rgba(148,163,184,.08); color: #cbd5e1; border: 1px solid rgba(148,163,184,.14); }

/* ─── V2.7.2 · Card de empresa real de la PO ─── */
.nx-company {
    display: flex; align-items: center; gap: 12px;
    border-radius: 14px; padding: 13px 16px; border: 1px solid;
}
.nx-company.mx     { background: linear-gradient(135deg, rgba(16,185,129,.07), rgba(16,185,129,.02)); border-color: rgba(16,185,129,.18); }
.nx-company.border { background: linear-gradient(135deg, rgba(139,92,246,.07), rgba(139,92,246,.02)); border-color: rgba(139,92,246,.18); }
.nx-company-flag   { font-size: 24px; }
.nx-company-nm     { font-weight: 800; font-size: 14px; letter-spacing: -.2px; }
.nx-company.mx     .nx-company-nm { color: #6ee7b7; }
.nx-company.border .nx-company-nm { color: #c4b5fd; }
.nx-company-db     { font-size: 10px; color: #475569; font-family: 'JetBrains Mono', monospace; margin-top: 1px; }
