:root { --bg:#020817; --text:#f8fafc; --muted:#94a3b8; --shadow:0 18px 45px rgba(0,0,0,.35); }
* { box-sizing:border-box; }
html, body { margin:0; padding:0; font-family:Roboto, Arial, Helvetica, sans-serif; background:#020817; color:var(--text); }
a { text-decoration:none; color:inherit; }
.app-shell { display:grid; grid-template-columns:300px 1fr; min-height:100vh; }
.sidebar { background:linear-gradient(180deg,#020C1B 0%,#030D1F 55%,#040F23 100%); color:#fff; padding:24px 18px; border-right:1px solid rgba(14,165,233,.1); }
.brand { font-size:1.55rem; font-weight:800; margin-bottom:24px; padding:10px 12px; color:#f8fafc; }
.menu { display:flex; flex-direction:column; gap:10px; }
.menu-item,.submenu-item,.menu-group summary { display:block; padding:12px 14px; border-radius:14px; color:#dbeafe; cursor:pointer; transition:all .18s ease; }
.menu-item:hover,.submenu-item:hover,.menu-group summary:hover { background:rgba(14,165,233,.1); color:#fff; }
.menu-group { border-radius:14px; overflow:hidden; background:rgba(255,255,255,.03); border:1px solid rgba(148,163,184,.06); }
.menu-group summary { list-style:none; font-weight:700; }
.menu-group summary::-webkit-details-marker { display:none; }
.submenu-item { margin-left:10px; color:#cbd5e1; }
.main-area { display:flex; flex-direction:column; min-width:0; }
.topbar { background:rgba(2,8,23,.88); backdrop-filter:blur(12px); border-bottom:1px solid rgba(14,165,233,.1); padding:18px 28px; display:flex; justify-content:flex-start; align-items:center; }
.topbar-title { font-size:1.15rem; font-weight:800; color:#f8fafc; }
.content-area { padding:28px; }
.page-shell { max-width:1300px; }
.card,.dark-paper { background:linear-gradient(180deg,#071428 0%,#050E1F 100%); border-radius:24px; padding:28px; box-shadow:var(--shadow); border:1px solid rgba(14,165,233,.1); }
.card h1,.card h2 { margin-top:0; margin-bottom:12px; color:#f8fafc; }
.card h1 { font-size:2rem; }
.card p { color:var(--muted); font-size:1rem; line-height:1.6; }
.hero-actions { display:flex; gap:12px; margin-top:20px; flex-wrap:wrap; }
.btn { display:inline-block; padding:12px 18px; border-radius:14px; font-weight:800; border:0; cursor:pointer; }
.btn-primary { background:linear-gradient(135deg,#0EA5E9,#0284C7); color:white; }
.mud-pilot-shell { padding:0 !important; }
.mud-pilot-card { border-radius:24px; background:linear-gradient(180deg,#071428 0%,#050E1F 100%); border:1px solid rgba(14,165,233,.1); }
.mud-button { border-radius:12px !important; font-weight:700 !important; }
.dark-panel { background:rgba(255,255,255,.03); border:1px solid rgba(14,165,233,.2); border-radius:16px; }
.usuario-input { min-width:280px; }
.refresh-note { color:#94a3b8; }
.tabla-supervisor .mud-table-container { overflow-x:auto; width:100%; }
.tabla-supervisor table { width:100%; min-width:900px; table-layout:fixed; }
.tabla-supervisor th, .tabla-supervisor td { vertical-align:top; }
.comentario-cell { min-width:260px; max-width:340px; white-space:normal; word-break:break-word; overflow-wrap:anywhere; }
.proyecto-click { cursor:pointer; }
.proyecto-click:hover { background:rgba(14,165,233,.08); }
.fila-seleccionada { background:rgba(14,165,233,.15) !important; }
.panel-title { margin-bottom:8px; color:#cbd5e1; font-weight:700; }
.supervisor-actions { gap:14px; flex-wrap:wrap; }
@media (max-width:900px){ .app-shell{grid-template-columns:1fr;} .sidebar{border-right:0;border-bottom:1px solid rgba(14,165,233,.1);} .content-area{padding:18px;} }

/* ===== Ajuste menú lateral completo con scroll interno ===== */
html, body {
    height: 100%;
    overflow: hidden;
}

.app-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100vh;
    min-height: 100vh;
}

.sidebar {
    height: 100vh;
    overflow: hidden;
    border-right: 1px solid rgba(148,163,184,.12);
}

.sidebar-inner {
    height: 100%;
    overflow-y: auto;
    padding: 24px 18px 32px 18px;
    scrollbar-width: thin;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 24px;
}

.menu-group {
    overflow: hidden;
}

.menu-group summary {
    user-select: none;
}

.submenu-item {
    display: block;
}

.disabled {
    opacity: .70;
    cursor: default;
}

.disabled:hover {
    background: rgba(255,255,255,.04);
    color: #cbd5e1;
}

.main-area {
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.content-area {
    overflow: auto;
    height: calc(100vh - 73px);
    padding: 28px;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 260px 1fr;
    }
}


/* ===== Captura de requerimiento real ===== */
.captura-shell {
    max-width: 1500px;
    margin: 0 auto;
}

.captura-top-grid {
    align-items: flex-start;
}

.form-panel {
    background: linear-gradient(180deg, rgba(15,23,42,.82) 0%, rgba(15,23,42,.62) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.form-panel-left,
.form-panel-right {
    min-height: auto;
}

.selected-project-panel {
    background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.02) 100%);
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,.12);
    transition: all .18s ease;
}

.selected-project-panel-empty {
    min-height: 84px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.selected-project-panel-filled {
    min-height: 178px;
}

.selected-project-panel .mud-typography-caption {
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.bom-preview,
.bom-cell {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.bom-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tabla-captura-proyectos .mud-table-container {
    overflow-x: auto;
}

.tabla-captura-proyectos table {
    min-width: 980px;
    table-layout: fixed;
}

.tabla-captura-proyectos th,
.tabla-captura-proyectos td {
    vertical-align: top;
}

.captura-actions-left {
    align-items: center;
    margin-top: 4px;
}

.captura-shell .mud-table-root {
    border-radius: 16px;
    overflow: hidden;
}

.captura-shell .mud-input-control {
    margin-top: 2px;
}

@media (max-width: 1200px) {
    .captura-shell {
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .tabla-captura-proyectos table {
        min-width: 780px;
    }

    .selected-project-panel-filled {
        min-height: auto;
    }
}



/* ===== Ajuste compacto de captura sin tocar lógica ===== */
.captura-top-grid {
    row-gap: 8px;
}

.captura-top-grid > .mud-grid-item {
    align-self: flex-start !important;
}

.form-panel-left {
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 14px !important;
}

.form-panel-right {
    height: auto !important;
}

.selected-project-panel-empty {
    min-height: 74px !important;
}

.selected-project-panel-filled {
    min-height: 150px !important;
}

.captura-actions-left {
    margin-top: 0 !important;
}

.captura-shell .mud-mt-4 {
    margin-top: 10px !important;
}

@media (max-width: 900px) {
    .captura-shell .mud-mt-4 {
        margin-top: 12px !important;
    }
}


/* ===== Ajuste visual comentarios izquierda + tabla vacía limpia ===== */
.tabla-vacia-captura {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #e2e8f0;
    border: 1px solid rgba(148,163,184,.10);
    border-radius: 14px;
    background: rgba(2,6,23,.18);
    padding: 18px;
}

/* fix header overlap */
.tabla-captura-proyectos thead th{
    position:relative;
    z-index:1;
}

.tabla-captura-proyectos{
    margin-top:8px;
}


/* ===== Vaquero modo premium: comentarios a la izquierda sin tocar lógica ===== */
.comentarios-left-field {
    margin-top: 6px !important;
}

.comentarios-left-field .mud-input-slot {
    min-height: 150px;
}

.form-panel-left {
    padding-bottom: 18px !important;
}

.tabla-captura-proyectos .mud-table-container:empty {
    display: none;
}

/* ===== Login pro + topbar usuario/rol ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background:
        radial-gradient(circle at top left, rgba(14,165,233,.15), transparent 28%),
        linear-gradient(180deg,#020617 0%,#0b1220 100%);
}

.login-card-pro {
    width: 100%;
    max-width: 460px;
    background: linear-gradient(180deg,#0b1630 0%,#071126 100%);
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    padding: 28px;
}

.login-header-pro h1 {
    margin: 0 0 8px 0;
    font-size: 2.2rem;
    font-weight: 700;
    color: #f8fafc;
}

.login-header-pro p {
    margin: 0 0 24px 0;
    color: #a8b7cf;
}

.login-form-pro {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.field-group-pro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-group-pro label {
    font-size: .95rem;
    font-weight: 600;
    color: #f8fafc;
}

.field-group-pro input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid rgba(148,163,184,.28);
    background: rgba(255,255,255,.02);
    color: #fff;
    padding: 14px 16px;
    font-size: 1.05rem;
    outline: none;
}

.field-group-pro input:focus {
    border-color: rgba(56,189,248,.65);
    box-shadow: 0 0 0 3px rgba(56,189,248,.12);
}

.remember-check-pro {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f8fafc;
    font-size: 1.05rem;
    margin-top: 4px;
}

.remember-check-pro input {
    width: 18px;
    height: 18px;
}

.login-btn-pro {
    margin-top: 2px;
    border: 0;
    border-radius: 14px;
    padding: 16px;
    font-size: 1.15rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(90deg,#2d8de0 0%,#2f7ed1 100%);
    cursor: pointer;
}

.login-alert-error {
    margin-bottom: 16px;
    border-radius: 12px;
    padding: 14px 16px;
    background: rgba(239,68,68,.16);
    border: 1px solid rgba(239,68,68,.34);
    color: #fecaca;
    font-weight: 600;
}

.topbar {
    justify-content: space-between;
    gap: 18px;
}

.topbar-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.topbar-subtitle {
    font-size: .88rem;
    color: #94a3b8;
}

.topbar-userbox {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-userline {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e5eefc;
    font-size: .95rem;
}

.topbar-kicker {
    color: #8cb7ea;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.logout-form-pro {
    margin: 0;
}

.logout-btn-pro {
    border: 1px solid rgba(248,250,252,.18);
    background: rgba(255,255,255,.04);
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 900px) {
    .topbar {
        align-items: flex-start;
    }

    .topbar-userbox {
        justify-content: flex-start;
    }

    .login-page {
        padding: 18px;
    }
}


/* ===== Compras PRO ===== */
.compras-shell .mud-tabs-toolbar {
    margin-bottom: 6px;
}

.tabla-compras-pro .mud-table-container {
    overflow-x: auto;
    width: 100%;
}

.tabla-compras-pro table {
    width: 100%;
    min-width: 800px;
    table-layout: fixed;
}

.tabla-compras-pro th,
.tabla-compras-pro td {
    white-space: nowrap;
    vertical-align: top;
}

.tabla-compras-pro .vendedor-cell {
    white-space: normal;
    min-width: 160px;
}

.tabla-compras-pro .icon-cell {
    width: 36px;
    text-align: center;
}

.comprar-detail-grid {
    align-items: stretch;
}

.comprar-detail-grid .mud-grid-item {
    display: flex;
    flex-direction: column;
}

.comprar-detail-grid .mud-input-control {
    margin-top: 4px;
}

.comprar-detail-grid .mud-input-slot textarea {
    min-height: 128px !important;
}

.comprar-actions-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
}

.comprar-action-btn {
    width: 100%;
}

@media (max-width: 1200px) {
    .tabla-compras-pro table {
        min-width: 1200px;
    }
}

/* ===== Completar compra estilo alineado a Comprar ===== */
.completar-btn-pro {
    min-width: 240px;
    max-width: 280px;
    margin-left: auto;
    border-radius: 12px !important;
    border: 1px solid rgba(0, 216, 255, .85) !important;
    color: #00d8ff !important;
    background: rgba(2, 132, 199, .08) !important;
    box-shadow: none !important;
    font-weight: 700 !important;
}

.completar-btn-pro:hover {
    background: rgba(2, 132, 199, .16) !important;
}


/* ===== Aprobación Dirección: pulido visual precio ===== */
.aprob-gerencia-shell .mud-alert {
    border-radius: 14px;
}

.tabla-gerencia-cotizar table {
    min-width: 1500px;
}

.tabla-gerencia-precio table {
    min-width: 1680px;
}

.tabla-gerencia-precio .mud-table-container,
.tabla-gerencia-cotizar .mud-table-container {
    border-radius: 16px;
    overflow-x: auto;
}

.aprob-gerencia-shell .fila-seleccionada {
    background: rgba(30, 136, 229, .14) !important;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .28);
}

.aprob-gerencia-shell tr.fila-seleccionada > td,
.compras-shell tr.fila-seleccionada > td {
    background: rgba(30, 136, 229, .18) !important;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, .28);
}

.detail-section {
    background: linear-gradient(180deg, rgba(255,255,255,.035) 0%, rgba(255,255,255,.018) 100%);
    border: 1px solid rgba(148,163,184,.10);
    border-radius: 18px;
}

.detail-section-left {
    min-height: 100%;
}

.decision-panel {
    min-height: 100%;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.compact-title {
    letter-spacing: .01em;
    margin-bottom: 10px;
}

.compact-field .mud-input-slot {
    min-height: 44px;
}

.metric-label {
    display: inline-block;
    margin-bottom: 6px;
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 700;
}

.metric-field input {
    font-weight: 700;
    color: #f8fafc !important;
}

.compact-radio-group {
    padding: 8px 0 0 2px;
}

.compact-radio-group .mud-radio {
    margin-right: 18px;
}

.decision-actions {
    gap: 12px;
    margin-top: 4px;
}

.primary-action-btn {
    min-width: 140px;
    box-shadow: 0 10px 24px rgba(30,136,229,.20);
}

.secondary-action-btn {
    min-width: 130px;
}

.precio-panel-grid {
    align-items: stretch;
}

@media (max-width: 1200px) {
    .tabla-gerencia-precio table {
        min-width: 1500px;
    }
}


/* ===== Drag & Drop piloto en captura ===== */
.upload-drop-zone {
    position: relative;
    min-height: 170px;
    border: 2px dashed rgba(96, 165, 250, .45);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(30,41,59,.72) 0%, rgba(15,23,42,.82) 100%);
    overflow: hidden;
    transition: all .18s ease;
}

.upload-drop-zone:hover,
.upload-drop-zone:focus-within {
    border-color: rgba(96, 165, 250, .90);
    box-shadow: 0 0 0 4px rgba(30,136,229,.12);
    transform: translateY(-1px);
}

.upload-drop-content {
    min-height: 170px;
    padding: 18px;
    text-align: center;
    pointer-events: none;
}

.upload-drop-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.upload-drop-zone .mud-chip {
    pointer-events: none;
}

.archivo-info-panel {
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(148,163,184,.14);
}

.upload-drop-zone-compact {
    min-height: 112px;
    border-radius: 16px;
}

.upload-drop-zone-compact .upload-drop-content {
    min-height: 112px;
    padding: 14px;
}


/* ===== Compras USA visual refresh ===== */
.compras-hero-shell {
    position: relative;
    overflow: hidden;
}

.stats-grid .mud-grid-item {
    display: flex;
}

.stats-card {
    width: 100%;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(96,165,250,.14);
    background: linear-gradient(180deg, rgba(15,23,42,.88) 0%, rgba(18,34,68,.88) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.stats-card-main {
    min-height: 116px;
}

.stats-number,
.stats-amount {
    color: #8fd4ff;
    font-weight: 800;
    letter-spacing: -.03em;
}


.stats-card .mud-typography-h5 {
    font-size: 1rem !important;
    line-height: 1.2 !important;
}

.stats-card .mud-typography-h3 {
    font-size: 2rem !important;
    line-height: 1.05 !important;
}

.stats-card .mud-stack {
    gap: 2px !important;
}

.stats-subtitle {
    color: #a9bdd8;
}

.stats-icon {
    font-size: 48px !important;
    opacity: .92;
}

.warm-icon { color: #f6c453; }
.cool-icon { color: #7dd3fc; }
.green-icon { color: #86efac; }

.toolbar-panel {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    border-radius: 18px;
    border: 1px solid rgba(96,165,250,.12);
    background: linear-gradient(180deg, rgba(15,23,42,.72) 0%, rgba(16,30,58,.78) 100%);
}

.search-toolbar {
    min-width: 360px;
    max-width: 620px;
    width: 100%;
}

.summary-chip {
    cursor: pointer;
    color: #c9d8f0 !important;
    background: rgba(51,65,85,.55) !important;
    border: 1px solid rgba(96,165,250,.12) !important;
    transition: all .18s ease;
}

.summary-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(125,211,252,.35) !important;
}

.summary-chip-active {
    color: #0b1220 !important;
    background: linear-gradient(180deg, #f8c84d 0%, #eab308 100%) !important;
    border-color: rgba(250,204,21,.65) !important;
}

.section-header {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(96,165,250,.08);
}

.section-subtitle {
    color: #9ab2d4;
}

.tabla-compras-pro .mud-table-container {
    border-radius: 18px;
    overflow-x: auto;
    width: 100%;
    border: 1px solid rgba(96,165,250,.10);
}

.tabla-compras-pro table {
    width: 100%;
    min-width: 800px;
    table-layout: fixed;
}

.tabla-compras-pro th {
    color: #eaf2ff;
    font-size: .95rem;
}

.tabla-compras-pro td {
    color: #e2ebfa;
}

.tabla-compras-pro .vendedor-cell {
    white-space: normal;
    min-width: 170px;
}

.tabla-compras-pro .comentario-cell {
    min-width: 260px;
    max-width: 320px;
    white-space: normal;
    line-height: 1.35;
}

.status-chip {
    font-weight: 800 !important;
    border-radius: 999px !important;
}

.status-chip-pendiente {
    color: #101828 !important;
    background: linear-gradient(180deg, #f6c453 0%, #fbbf24 100%) !important;
}

.status-chip-revision {
    color: #06131d !important;
    background: linear-gradient(180deg, #8fd4ff 0%, #38bdf8 100%) !important;
}

.status-chip-aprobado {
    color: #06210f !important;
    background: linear-gradient(180deg, #86efac 0%, #22c55e 100%) !important;
}

.detail-grid-pro .mud-grid-item {
    display: flex;
}

.detail-card-pro {
    width: 100%;
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(148,163,184,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.018) 100%);
}

.detail-card-title {
    margin-bottom: 14px;
}

.action-card-pro .mud-button-root {
    width: 100%;
}

.action-card-pro .upload-dragdrop-shell {
    margin-top: 2px;
}

.completar-btn-pro {
    min-width: 100% !important;
    max-width: 100% !important;
}

@media (max-width: 1200px) {
    .search-toolbar {
        min-width: 100%;
        max-width: 100%;
    }

    .tabla-compras-pro table {
        min-width: 1200px;
    }
}


.gerencia-stats-grid .mud-grid-item {
    display: flex;
}

.gerencia-stats-card {
    width: 100%;
}

.gerencia-toolbar-panel {
    margin-top: 2px;
}

.gerencia-section-header {
    margin-top: 2px;
}

.tabla-gerencia-cotizar .comentario-cell {
    min-width: 320px;
    max-width: 420px;
    white-space: normal;
    line-height: 1.35;
}


.confirm-action-dialog {
    background: linear-gradient(180deg, rgba(18, 27, 50, 0.98) 0%, rgba(12, 20, 40, 0.98) 100%) !important;
    border: 1px solid rgba(88, 132, 255, 0.18);
    border-radius: 22px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42) !important;
    overflow: hidden;
}

.confirm-action-dialog__body {
    padding: 2.1rem 1.9rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .85rem;
}

.confirm-action-dialog__icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: .4rem;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(0,0,0,.22);
}

.confirm-action-dialog__icon .mud-icon-root {
    font-size: 3rem !important;
}

.confirm-action-dialog__icon--success { background: linear-gradient(180deg, #44c850 0%, #2ca63b 100%); }
.confirm-action-dialog__icon--error { background: linear-gradient(180deg, #f05353 0%, #d63f3f 100%); }
.confirm-action-dialog__icon--warning { background: linear-gradient(180deg, #ffb347 0%, #f59e0b 100%); }
.confirm-action-dialog__icon--primary { background: linear-gradient(180deg, #2ea5ff 0%, #2477ff 100%); }

.confirm-action-dialog__title {
    color: #f5f8ff;
    font-weight: 700;
    margin-top: .2rem;
}

.confirm-action-dialog__message {
    color: #c9d8ff;
    max-width: 420px;
    line-height: 1.45;
}

.confirm-action-dialog__actions {
    width: 100%;
    padding: 1rem 1.4rem 1.35rem !important;
    border-top: 1px solid rgba(255,255,255,.08);
    justify-content: center !important;
    gap: .9rem;
}

.confirm-action-dialog__actions .mud-button-root {
    min-width: 180px;
    border-radius: 14px;
    font-weight: 700;
    text-transform: none;
    padding: .8rem 1.25rem;
}

.mud-overlay-dialog {
    backdrop-filter: blur(5px);
    background-color: rgba(5, 10, 22, 0.72) !important;
}

/* ===== Reportes > Comprados ===== */
.reportes-comprados-shell .mud-input-control,
.reportes-comprados-shell .mud-picker,
.reportes-comprados-shell .mud-select,
.reportes-comprados-shell .mud-autocomplete {
    width: 100%;
}

.tabla-reportes-comprados .mud-table-container {
    border-radius: 18px;
    overflow-x: auto;
    border: 1px solid rgba(96,165,250,.10);
}

.tabla-reportes-comprados table {
    min-width: 1180px;
    table-layout: fixed;
}

.tabla-reportes-comprados th,
.tabla-reportes-comprados td {
    white-space: nowrap;
    vertical-align: middle;
}

.empty-state-panel {
    padding: 28px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.025) 0%, rgba(255,255,255,.015) 100%);
    border: 1px dashed rgba(148,163,184,.18);
    text-align: center;
}

.compras-empty-state {
    color: #cbd5e1;
}


/* ===== Reportes > Dashboard Ejecutivo ===== */
.reportes-dashboard-shell .mud-input-control,
.reportes-dashboard-shell .mud-picker,
.reportes-dashboard-shell .mud-select,
.reportes-dashboard-shell .mud-autocomplete {
    width: 100%;
}

.dashboard-kpi-grid .mud-grid-item {
    display: flex;
}

.dashboard-kpi-card {
    width: 100%;
    min-height: 145px;
}

.dashboard-kpi-card-usd {
    border-color: rgba(34,197,94,.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 34px rgba(10, 58, 29, .18);
}

.dashboard-panel-full {
    min-height: 100%;
}

.dashboard-bar-row,
.dashboard-money-row {
    margin-bottom: 18px;
}

.dashboard-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: .95rem;
    color: #e2ebfa;
    margin-bottom: 8px;
}

.dashboard-progress {
    height: 10px !important;
    border-radius: 999px !important;
    background: rgba(148,163,184,.12) !important;
}

.dashboard-month-card {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(148,163,184,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.015) 100%);
    margin-bottom: 12px;
}

.dashboard-month-line {
    color: #d7e6ff;
    margin-top: 4px;
}

.dashboard-summary-table table {
    min-width: 920px;
}


/* ===== BI / Business Intelligence ===== */
.bi-shell .mud-input-control,
.bi-shell .mud-picker,
.bi-shell .mud-select,
.bi-shell .mud-autocomplete {
    width: 100%;
}

.bi-kpi-grid .mud-grid-item {
    display: flex;
}

.bi-kpi-card {
    width: 100%;
    min-height: 150px;
}

.bi-kpi-card-main {
    border-color: rgba(168,85,247,.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03), 0 16px 34px rgba(55, 22, 91, .18);
}

.bi-alert-panel {
    background: linear-gradient(180deg, rgba(89, 28, 135, .18) 0%, rgba(17,24,39,.72) 100%);
}

.bi-insight-card,
.bi-opportunity-card {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(168,85,247,.16);
    background: linear-gradient(180deg, rgba(255,255,255,.035) 0%, rgba(255,255,255,.02) 100%);
    margin-bottom: 12px;
}

.bi-insight-title,
.bi-opportunity-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
    color: #f3e8ff;
    margin-bottom: 6px;
}

.bi-insight-text,
.bi-opportunity-card .mud-typography-body2 {
    color: #e6f0ff;
}

.bi-project-row {
    margin-bottom: 18px;
}

.bi-table table {
    min-width: 960px;
}


.main-link {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(148,163,184,.06);
    font-weight: 700;
}

.menu-item.active,
.menu-item.active:hover,
.submenu-item.active,
.submenu-item.active:hover,
.summary-active {
    background: linear-gradient(90deg, rgba(30,136,229,.30) 0%, rgba(30,136,229,.12) 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(56,189,248,.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.group-active {
    border-color: rgba(56,189,248,.28);
    box-shadow: 0 0 0 1px rgba(56,189,248,.10);
}

.summary-active {
    border-radius: 14px;
}


/* ===== Nexora brand + admin users ===== */
.brand-block{display:flex;align-items:flex-start;gap:14px;margin-bottom:18px;padding:10px 6px 18px 6px;border-bottom:1px solid rgba(255,255,255,.06)}
.brand-avatar{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-weight:800;letter-spacing:.08em;color:#fff;background:linear-gradient(180deg,#35b6ff,#2563eb);box-shadow:0 10px 24px rgba(37,99,235,.35)}
.brand-subtitle{font-size:.93rem;line-height:1.4;color:#8ec7ff;max-width:180px;margin-top:6px}
.menu-sections .menu-section-label{margin:18px 12px 8px;color:#88a9dc;font-size:.78rem;font-weight:800;letter-spacing:.18em;text-transform:uppercase}
.topbar-pro{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:16px;align-items:center}
.topbar-active-module{justify-self:start;padding:10px 18px;border-radius:999px;border:1px solid rgba(68,174,255,.35);background:rgba(31,72,128,.28);color:#d9eeff;font-weight:700}
.topbar-userbox-pro{display:flex;align-items:center;gap:14px}
.topbar-avatar{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-weight:800;color:#fff;background:linear-gradient(180deg,#38bdf8,#2563eb)}
.nexora-home-shell .hero-panel{display:grid;grid-template-columns:1.6fr 1fr;gap:24px;margin-bottom:24px}
.hero-panel,.hero-status-card{background:linear-gradient(180deg,rgba(14,26,53,.92),rgba(12,22,43,.9));border:1px solid rgba(88,166,255,.15);border-radius:28px;box-shadow:0 24px 60px rgba(0,0,0,.22)}
.hero-panel{padding:28px}
.hero-status-card{padding:24px}
.hero-kicker,.login-brand-badge{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;background:rgba(35,101,172,.28);color:#8ed2ff;font-size:.84rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
.hero-copy h1{margin:18px 0 10px;font-size:2.25rem;line-height:1.1}
.hero-copy p,.hero-status-card p{color:#b7c9e5;max-width:780px}
.hero-chips{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}
.hero-chip{padding:8px 14px;border-radius:999px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);color:#eaf4ff;font-weight:600}
.nexora-home-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.stat-card{min-height:170px}
.users-admin-shell .users-table-card{overflow:auto}
.users-admin-shell .selected-row td{background:rgba(37,99,235,.08)!important}
@media (max-width: 1100px){.topbar-pro{grid-template-columns:1fr}.topbar-active-module{justify-self:flex-start}.nexora-home-shell .hero-panel,.nexora-home-grid{grid-template-columns:1fr}}


/* ===== Nexora SaaS polish ===== */
.page-breadcrumb {
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 12px;
    display: block;
}

.stat-card-full {
    width: 100%;
}

.stat-card-full h3 {
    margin-top: 8px;
    margin-bottom: 14px;
    color: #f8fafc;
    font-size: 1.45rem;
}

.stat-card-full p {
    max-width: 100%;
    margin-bottom: 12px;
}

.users-table-shell .mud-table-container {
    overflow-x: auto;
}



.users-actions-header {
    min-width: 260px;
    text-align: right;
}

.users-actions-cell {
    white-space: nowrap;
    text-align: right;
}

.users-actions-wrap {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}

.users-actions-wrap .mud-button-root {
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
}

@media (max-width: 1100px) {
    .users-actions-header {
        min-width: 220px;
    }

    .users-table-shell table {
        min-width: 920px;
    }
}


@media (max-width: 1100px) {
    

    
}



/* ===== Nexora CEO dashboard + responsive users ===== */
.nexora-home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.stat-card-full {
    width: 100%;
}

.stat-card-full h3 {
    margin-top: 8px;
    margin-bottom: 14px;
    color: #f8fafc;
    font-size: 1.55rem;
}

.stat-card-full p {
    max-width: 100%;
    margin-bottom: 12px;
}

.users-table-shell {
    overflow: hidden;
}

.users-table-shell .mud-table-container {
    overflow-x: hidden !important;
}

.users-table-shell table {
    width: 100% !important;
    table-layout: fixed;
}

.users-table-shell th,
.users-table-shell td {
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.users-table-shell th:nth-child(1),
.users-table-shell td:nth-child(1) {
    width: 33%;
}

.users-table-shell th:nth-child(2),
.users-table-shell td:nth-child(2) {
    width: 24%;
}

.users-table-shell th:nth-child(3),
.users-table-shell td:nth-child(3) {
    width: 16%;
}

.users-table-shell th:nth-child(4),
.users-table-shell td:nth-child(4) {
    width: 12%;
}

.users-table-shell th:nth-child(5),
.users-table-shell td:nth-child(5) {
    width: 15%;
}

.users-actions-header {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

.users-actions-cell {
    white-space: nowrap;
    text-align: center;
}

.users-actions-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 4px;
}

.users-action-btn {
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.users-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.18);
    background: rgba(30, 41, 59, 0.78);
}

.ceo-form-card {
    position: sticky;
    top: 16px;
}

.page-breadcrumb {
    color: #93c5fd;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 12px;
    display: block;
}

@media (max-width: 1400px) {
    .users-table-shell th:nth-child(1),
    .users-table-shell td:nth-child(1) { width: 31%; }

    .users-table-shell th:nth-child(2),
    .users-table-shell td:nth-child(2) { width: 22%; }

    .users-table-shell th:nth-child(3),
    .users-table-shell td:nth-child(3) { width: 16%; }

    .users-table-shell th:nth-child(4),
    .users-table-shell td:nth-child(4) { width: 12%; }

    .users-table-shell th:nth-child(5),
    .users-table-shell td:nth-child(5) { width: 19%; }
}

@media (max-width: 1100px) {
    .ceo-form-card {
        position: static;
    }

    .users-table-shell .mud-table-container {
        overflow-x: auto !important;
    }

    .users-table-shell table {
        min-width: 920px;
        table-layout: auto;
    }
}


/* ===== Nexora Finanzas / CXML ===== */
.nested-group {
    margin-top: 8px;
    margin-left: 8px;
    border-left: 1px solid rgba(148, 163, 184, 0.16);
    padding-left: 8px;
}

.finance-card-shell {
    min-height: 260px;
}

.finance-kpi-card {
    text-align: center;
}


.supervisor-alert-banner {
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(0,0,0,.18);
}

.topbar-inline-alert {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    border-radius: 18px;
    background: linear-gradient(180deg, #3eb4eb 0%, #39a9e0 100%);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(11, 34, 67, .18);
}

.topbar-inline-alert__icon {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.95);
}

.topbar-inline-alert__content {
    min-width: 0;
}

.topbar-inline-alert__title {
    font-size: .96rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 4px;
}

.topbar-inline-alert__message {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;
    word-break: break-word;
}

.topbar-inline-alert__date {
    font-size: .85rem;
    opacity: .95;
    font-weight: 500;
}

.topbar-inline-alert__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.topbar-inline-alert__actions .mud-button-root {
    min-width: 132px;
    border-radius: 14px;
    font-weight: 800;
}

.topbar-inline-alert__actions .mud-button-filled-success {
    box-shadow: none;
}

.topbar-inline-alert__actions .mud-button-outlined-info {
    background: transparent;
    border-color: rgba(10, 110, 163, .55);
    color: #1784a8;
}

@media (max-width: 1100px) {
    .topbar-inline-alert {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .topbar-inline-alert__icon {
        display: none;
    }

    .topbar-inline-alert__actions {
        justify-content: flex-start;
    }
}


/* ===== Anchos de columna por tabla — fix encimamiento ===== */

/* -- Supervisor (13 cols) -- */
.tabla-supervisor table {
    min-width: 1400px !important;
    table-layout: fixed !important;
}
.tabla-supervisor th:nth-child(1),  .tabla-supervisor td:nth-child(1)  { width: 80px; }   /* Solicitud */
.tabla-supervisor th:nth-child(2),  .tabla-supervisor td:nth-child(2)  { width: 110px; }  /* Proyecto */
.tabla-supervisor th:nth-child(3),  .tabla-supervisor td:nth-child(3)  { width: 140px; }  /* Solicita */
.tabla-supervisor th:nth-child(4),  .tabla-supervisor td:nth-child(4)  { width: 70px; }   /* Num req */
.tabla-supervisor th:nth-child(5),  .tabla-supervisor td:nth-child(5)  { width: 140px; }  /* Supervisor asignado */
.tabla-supervisor th:nth-child(6),  .tabla-supervisor td:nth-child(6)  { width: 105px; }  /* Fecha requerida */
.tabla-supervisor th:nth-child(7),  .tabla-supervisor td:nth-child(7)  { width: 105px; }  /* Fecha solicitud */
.tabla-supervisor th:nth-child(8),  .tabla-supervisor td:nth-child(8)  { width: 90px; }   /* Tipo de compra */
.tabla-supervisor th:nth-child(9),  .tabla-supervisor td:nth-child(9)  { width: 140px; }  /* Vendedor */
.tabla-supervisor th:nth-child(10), .tabla-supervisor td:nth-child(10) { width: 140px; }  /* Supervisor */
.tabla-supervisor th:nth-child(11), .tabla-supervisor td:nth-child(11) { width: 95px; }   /* Estatus sup */
.tabla-supervisor th:nth-child(12), .tabla-supervisor td:nth-child(12) { width: 110px; }  /* Estatus solicitud */
.tabla-supervisor th:nth-child(13), .tabla-supervisor td:nth-child(13) { width: auto; }   /* Comentario — toma el resto */
.tabla-supervisor th, .tabla-supervisor td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tabla-supervisor .comentario-cell {
    white-space: normal;
    word-break: break-word;
}

/* -- Gerencia cotizar (10 cols) -- */
.tabla-gerencia-cotizar table {
    min-width: 1200px !important;
    table-layout: fixed !important;
}
.tabla-gerencia-cotizar th:nth-child(1),  .tabla-gerencia-cotizar td:nth-child(1)  { width: 80px; }   /* Solicitud */
.tabla-gerencia-cotizar th:nth-child(2),  .tabla-gerencia-cotizar td:nth-child(2)  { width: 110px; }  /* Proyecto */
.tabla-gerencia-cotizar th:nth-child(3),  .tabla-gerencia-cotizar td:nth-child(3)  { width: 90px; }   /* TipoDeCompra */
.tabla-gerencia-cotizar th:nth-child(4),  .tabla-gerencia-cotizar td:nth-child(4)  { width: 80px; }   /* NumRequerimiento */
.tabla-gerencia-cotizar th:nth-child(5),  .tabla-gerencia-cotizar td:nth-child(5)  { width: 140px; }  /* SupervisorAsignado */
.tabla-gerencia-cotizar th:nth-child(6),  .tabla-gerencia-cotizar td:nth-child(6)  { width: 105px; }  /* FechaSolicitud */
.tabla-gerencia-cotizar th:nth-child(7),  .tabla-gerencia-cotizar td:nth-child(7)  { width: 105px; }  /* FechaRequerida */
.tabla-gerencia-cotizar th:nth-child(8),  .tabla-gerencia-cotizar td:nth-child(8)  { width: 140px; }  /* Vendedor */
.tabla-gerencia-cotizar th:nth-child(9),  .tabla-gerencia-cotizar td:nth-child(9)  { width: 110px; }  /* EstatusSolicitud */
.tabla-gerencia-cotizar th:nth-child(10), .tabla-gerencia-cotizar td:nth-child(10) { width: auto; }   /* Comentarios */
.tabla-gerencia-cotizar th, .tabla-gerencia-cotizar td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tabla-gerencia-cotizar .comentario-cell {
    white-space: normal;
    word-break: break-word;
}

/* -- Gerencia precio (12 cols) -- */
.tabla-gerencia-precio table {
    min-width: 1300px !important;
    table-layout: fixed !important;
}
.tabla-gerencia-precio th:nth-child(1),  .tabla-gerencia-precio td:nth-child(1)  { width: 80px; }   /* Solicitud */
.tabla-gerencia-precio th:nth-child(2),  .tabla-gerencia-precio td:nth-child(2)  { width: 90px; }   /* TipoDeCompra */
.tabla-gerencia-precio th:nth-child(3),  .tabla-gerencia-precio td:nth-child(3)  { width: 80px; }   /* NumRequerimiento */
.tabla-gerencia-precio th:nth-child(4),  .tabla-gerencia-precio td:nth-child(4)  { width: 110px; }  /* Proyecto */
.tabla-gerencia-precio th:nth-child(5),  .tabla-gerencia-precio td:nth-child(5)  { width: 140px; }  /* SupervisorAsignado */
.tabla-gerencia-precio th:nth-child(6),  .tabla-gerencia-precio td:nth-child(6)  { width: 110px; }  /* PrecioCotizado */
.tabla-gerencia-precio th:nth-child(7),  .tabla-gerencia-precio td:nth-child(7)  { width: 105px; }  /* FechaPrecioCotizado */
.tabla-gerencia-precio th:nth-child(8),  .tabla-gerencia-precio td:nth-child(8)  { width: 130px; }  /* Solicita */
.tabla-gerencia-precio th:nth-child(9),  .tabla-gerencia-precio td:nth-child(9)  { width: 105px; }  /* FechaRequerida */
.tabla-gerencia-precio th:nth-child(10), .tabla-gerencia-precio td:nth-child(10) { width: 105px; }  /* FechaSolicitud */
.tabla-gerencia-precio th:nth-child(11), .tabla-gerencia-precio td:nth-child(11) { width: auto; }   /* Vendedor */
.tabla-gerencia-precio th:nth-child(12), .tabla-gerencia-precio td:nth-child(12) { width: 110px; }  /* EstatusSolicitud */
.tabla-gerencia-precio th, .tabla-gerencia-precio td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* -- Compras PRO (11 cols) -- */
.tabla-compras-pro table {
    min-width: 1200px !important;
    table-layout: fixed !important;
}
.tabla-compras-pro th:nth-child(1),  .tabla-compras-pro td:nth-child(1)  { width: 36px; }   /* icono ▶ */
.tabla-compras-pro th:nth-child(2),  .tabla-compras-pro td:nth-child(2)  { width: 80px; }   /* Solicitud */
.tabla-compras-pro th:nth-child(3),  .tabla-compras-pro td:nth-child(3)  { width: 110px; }  /* Proyecto */
.tabla-compras-pro th:nth-child(4),  .tabla-compras-pro td:nth-child(4)  { width: 140px; }  /* Solicita */
.tabla-compras-pro th:nth-child(5),  .tabla-compras-pro td:nth-child(5)  { width: 60px; }   /* Req */
.tabla-compras-pro th:nth-child(6),  .tabla-compras-pro td:nth-child(6)  { width: 130px; }  /* Supervisor */
.tabla-compras-pro th:nth-child(7),  .tabla-compras-pro td:nth-child(7)  { width: 100px; }  /* Requerida */
.tabla-compras-pro th:nth-child(8),  .tabla-compras-pro td:nth-child(8)  { width: 100px; }  /* Solicitud fecha */
.tabla-compras-pro th:nth-child(9),  .tabla-compras-pro td:nth-child(9)  { width: 140px; }  /* Vendedor */
.tabla-compras-pro th:nth-child(10), .tabla-compras-pro td:nth-child(10) { width: 100px; }  /* Estatus */
.tabla-compras-pro th:nth-child(11), .tabla-compras-pro td:nth-child(11) { width: auto; }   /* Detalle */
.tabla-compras-pro th, .tabla-compras-pro td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tabla-compras-pro .vendedor-cell,
.tabla-compras-pro .comentario-cell {
    white-space: normal;
    word-break: break-word;
}


/* ===== Semáforo operativo ===== */
.semaforo-verde    { color: #4ade80; }
.semaforo-amarillo { color: #fbbf24; }
.semaforo-rojo     { color: #f87171; }


.login-captcha-box {
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 16px;
    padding: 16px;
}

.login-captcha-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #7dd3fc;
    margin-bottom: 6px;
}

.login-captcha-question {
    font-size: 1rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 10px;
}

/* ── CHIPS DE ESTATUS GLOBALES ── */
.nx-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    border: 1px solid;
    white-space: nowrap;
}
.nx-chip::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Por estatus */
.nx-chip-capturado   { background:rgba(148,163,184,.1); border-color:rgba(148,163,184,.25); color:#94A3B8; }
.nx-chip-capturado::before { background:#94A3B8; }

.nx-chip-espera      { background:rgba(245,158,11,.1); border-color:rgba(245,158,11,.25); color:#FCD34D; }
.nx-chip-espera::before { background:#F59E0B; }

.nx-chip-cotizar     { background:rgba(56,189,248,.1); border-color:rgba(56,189,248,.25); color:#7DD3FC; }
.nx-chip-cotizar::before { background:#38BDF8; }

.nx-chip-cotizado    { background:rgba(168,85,247,.1); border-color:rgba(168,85,247,.25); color:#C084FC; }
.nx-chip-cotizado::before { background:#A855F7; }

.nx-chip-aprobado    { background:rgba(34,197,94,.1); border-color:rgba(34,197,94,.25); color:#86EFAC; }
.nx-chip-aprobado::before { background:#22C55E; }

.nx-chip-transito    { background:rgba(251,191,36,.1); border-color:rgba(251,191,36,.25); color:#FDE047; }
.nx-chip-transito::before { background:#FBBF24; }

.nx-chip-recibido    { background:rgba(16,185,129,.1); border-color:rgba(16,185,129,.25); color:#6EE7B7; }
.nx-chip-recibido::before { background:#10B981; }

.nx-chip-cancelado   { background:rgba(239,68,68,.1); border-color:rgba(239,68,68,.25); color:#FCA5A5; }
.nx-chip-cancelado::before { background:#EF4444; }

.nx-chip-pendiente   { background:rgba(245,158,11,.1); border-color:rgba(245,158,11,.25); color:#FCD34D; }
.nx-chip-pendiente::before { background:#F59E0B; }

/* ── BARRA LATERAL EN FILAS POR ESTATUS ── */
.nx-row-capturado td:first-child { border-left: 3px solid #64748B !important; }
.nx-row-espera    td:first-child { border-left: 3px solid #F59E0B !important; }
.nx-row-cotizar   td:first-child { border-left: 3px solid #38BDF8 !important; }
.nx-row-cotizado  td:first-child { border-left: 3px solid #A855F7 !important; }
.nx-row-aprobado  td:first-child { border-left: 3px solid #22C55E !important; }
.nx-row-transito  td:first-child { border-left: 3px solid #FBBF24 !important; }
.nx-row-recibido  td:first-child { border-left: 3px solid #10B981 !important; }
.nx-row-cancelado td:first-child { border-left: 3px solid #EF4444 !important; }
.nx-row-pendiente td:first-child { border-left: 3px solid #F59E0B !important; }

/* ── HEADER DE TABLA DIFERENCIADO ── */
.mud-table-head .mud-table-cell {
    background: rgba(15, 23, 42, 0.8) !important;
    color: #64748B !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
    border-bottom: 1px solid rgba(30,136,229,.2) !important;
}

/* ── SKELETON LOADER ── */
.nx-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,.04) 25%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 75%);
    background-size: 200% 100%;
    animation: nx-skeleton-wave 1.4s ease-in-out infinite;
    border-radius: 4px;
    height: 14px;
}
@keyframes nx-skeleton-wave {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.nx-skeleton-row td { padding: 12px 16px; }

/* ── BOTONES CON ICONOS CONSISTENTES ── */
.nx-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    border: 1.5px solid;
}
.nx-btn-primary  { background:#0EA5E9; border-color:#0EA5E9; color:#fff; }
.nx-btn-primary:hover  { background:#0284C7; }
.nx-btn-success  { background:rgba(34,197,94,.12); border-color:rgba(34,197,94,.3); color:#86EFAC; }
.nx-btn-success:hover  { background:rgba(34,197,94,.2); }
.nx-btn-warning  { background:rgba(245,158,11,.12); border-color:rgba(245,158,11,.3); color:#FCD34D; }
.nx-btn-warning:hover  { background:rgba(245,158,11,.2); }
.nx-btn-danger   { background:rgba(239,68,68,.12); border-color:rgba(239,68,68,.3); color:#FCA5A5; }
.nx-btn-danger:hover   { background:rgba(239,68,68,.2); }
.nx-btn-default  { background:transparent; border-color:rgba(255,255,255,.15); color:#94A3B8; }
.nx-btn-default:hover  { background:rgba(255,255,255,.06); }

/* ── TEMA NEXORA v2 — Azul Profundo + Cyan ── */
:root {
    --nx-primary:   #0EA5E9;
    --nx-accent:    #38BDF8;
    --nx-bg:        #020817;
    --nx-surface:   rgba(14,165,233,.05);
    --nx-border:    rgba(14,165,233,.12);
}

html, body {
    background: #020817 !important;
}

/* Sidebar refinado */
.sidebar, .sidebar-inner {
    background: linear-gradient(180deg, #020C1B 0%, #030D1F 100%) !important;
}

.menu-item.active, .summary-active,
.menu-item:has(+ .active), .active-link {
    color: #38BDF8 !important;
    background: rgba(14,165,233,.1) !important;
    border-right: 2px solid #0EA5E9;
}

.menu-section-label {
    color: rgba(56,189,248,.5) !important;
    letter-spacing: .1em;
}

/* Topbar refinado */
.topbar {
    background: rgba(2,8,23,.92) !important;
    border-bottom: 1px solid rgba(14,165,233,.1) !important;
    backdrop-filter: blur(12px);
}

/* Cards refinadas */
.mud-pilot-card, .dark-paper, .card {
    background: linear-gradient(180deg, #071428 0%, #050E1F 100%) !important;
    border: 1px solid rgba(14,165,233,.1) !important;
}

/* Botón primario */
.mud-button-filled-primary, .mud-button-filled.mud-button-color-primary {
    background: linear-gradient(135deg, #0EA5E9, #0284C7) !important;
    box-shadow: 0 4px 14px rgba(14,165,233,.25) !important;
}

/* Focus rings */
.mud-input-control:focus-within .mud-input-outlined-border {
    border-color: #0EA5E9 !important;
    box-shadow: 0 0 0 3px rgba(14,165,233,.12) !important;
}

/* Chip primario MudBlazor */
.mud-chip-color-primary {
    background: rgba(14,165,233,.15) !important;
    color: #38BDF8 !important;
    border: 1px solid rgba(14,165,233,.25) !important;
}

/* Selected row refinada */
.fila-seleccionada {
    background: rgba(14,165,233,.1) !important;
    border-left: 3px solid #0EA5E9 !important;
}

/* Scrollbar con color del tema */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #020817; }
::-webkit-scrollbar-thumb { background: rgba(14,165,233,.2); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(14,165,233,.4); }

/* Notificación badge */
.nx-notif-badge {
    background: #0EA5E9 !important;
    box-shadow: 0 0 8px rgba(14,165,233,.5) !important;
}

/* Login page refinada */
.login-page { background: radial-gradient(circle at top left, rgba(14,165,233,.12), transparent 28%), #020817 !important; }
.login-card-pro { background: linear-gradient(180deg, #060F24 0%, #030812 100%) !important; border-color: rgba(14,165,233,.12) !important; }
.login-brand-badge { background: rgba(14,165,233,.12) !important; border-color: rgba(14,165,233,.25) !important; color: #38BDF8 !important; }
.login-btn-pro { background: linear-gradient(135deg, #0EA5E9, #0284C7) !important; box-shadow: 0 4px 20px rgba(14,165,233,.3) !important; }
.nx-login-btn { background: #0EA5E9 !important; box-shadow: 0 4px 20px rgba(14,165,233,.25) !important; }
.nx-login-btn:hover { background: #0284C7 !important; }
.nx-login-badge { background: rgba(14,165,233,.12) !important; border-color: rgba(14,165,233,.25) !important; color: #38BDF8 !important; }

/* BI Charts área */
.bi-chart-card { background: linear-gradient(180deg, #071428, #050E1F) !important; border-color: rgba(14,165,233,.12) !important; }
.bi-chart-badge { background: rgba(14,165,233,.1) !important; border-color: rgba(14,165,233,.18) !important; color: #38BDF8 !important; }

/* ── Tablas stretch — ocupar todo el ancho disponible ── */
.mud-table-root { width: 100% !important; }
.mud-table-container { width: 100% !important; }
.mud-table-container table { width: 100% !important; }
.tabla-supervisor table { width: 100% !important; min-width: 900px; }
.tabla-compras-pro table { width: 100% !important; min-width: 800px; }
.tabla-captura-proyectos table { width: 100% !important; }
.tabla-reportes-comprados table { width: 100% !important; min-width: 900px; }
.tabla-estatus-pro table { width: 100% !important; min-width: 900px; }

/* Eliminar outline amarillo del navegador en menu */
.menu-group, .menu-group summary, .menu-group summary:focus,
.menu-group summary:focus-visible, details, details summary,
details summary:focus, details summary:focus-visible,
.submenu-item:focus, .submenu-item:focus-visible,
.menu-item:focus, .menu-item:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Fila urgente - EN_TRANSITO vencida */
.fila-urgente { border-left: 3px solid #EF4444 !important; }
.fila-urgente td { color: #FCA5A5 !important; }




/* ══════════════════════════════════════════════════════════════
   NEXORA — TABLAS COMPACTAS GLOBALES v3 (Abril 2026)
   Filas delgadas. Sin cortes. Todo el texto visible.
   Aplica a TODAS las tablas del sistema.
   ══════════════════════════════════════════════════════════════ */

/* ── 1. CELDAS COMPACTAS — padding reducido, fila delgada ────── */
.mud-table-cell {
    padding-top:    4px !important;
    padding-bottom: 4px !important;
    padding-left:   10px !important;
    padding-right:  10px !important;
    line-height:    1.35 !important;
    font-size:      13px !important;
    white-space:    nowrap !important;
    vertical-align: middle !important;
    /* SIN overflow:hidden ni max-width — texto completo visible */
    overflow:       visible !important;
    text-overflow:  unset !important;
    max-width:      none !important;
}

.mud-table-head .mud-table-cell {
    padding-top:    5px !important;
    padding-bottom: 5px !important;
    padding-left:   10px !important;
    padding-right:  10px !important;
    font-size:      11px !important;
    line-height:    1.2  !important;
    white-space:    nowrap !important;
    overflow:       visible !important;
    text-overflow:  unset !important;
    max-width:      none !important;
}

.mud-table-row {
    height:     auto !important;
    min-height: 0    !important;
}

/* ── 2. ANULAR TRUNCADO EN TODAS LAS CLASES DE TABLA ─────────── */
/*    Supervisor, Compras, Gerencia, Reportes, Estatus,
      Captura, Usuarios, Proveedores, RH, Finanzas…
      Cualquier th/td del sistema queda sin corte.              */

.tabla-supervisor th,
.tabla-supervisor td,
.tabla-compras-pro th,
.tabla-compras-pro td,
.tabla-gerencia-cotizar th,
.tabla-gerencia-cotizar td,
.tabla-gerencia-precio th,
.tabla-gerencia-precio td,
.tabla-reportes-comprados th,
.tabla-reportes-comprados td,
.tabla-estatus-pro th,
.tabla-estatus-pro td,
.tabla-captura-proyectos th,
.tabla-captura-proyectos td,
.users-table-shell th,
.users-table-shell td,
.dark-table th,
.dark-table td {
    overflow:      visible !important;
    text-overflow: unset   !important;
    white-space:   nowrap  !important;
    max-width:     none    !important;
    width:         auto    !important;  /* anula anchos fijos por columna */
}

/* ── 3. ANCHOS FIJOS POR COLUMNA — anulados globalmente ──────── */
/*    El CSS original definía width:80px, 110px… en nth-child.
      Los anulamos para que cada columna tome el ancho del texto. */

.tabla-supervisor th:nth-child(n),  .tabla-supervisor td:nth-child(n),
.tabla-compras-pro th:nth-child(n), .tabla-compras-pro td:nth-child(n),
.tabla-gerencia-cotizar th:nth-child(n), .tabla-gerencia-cotizar td:nth-child(n),
.tabla-gerencia-precio th:nth-child(n),  .tabla-gerencia-precio td:nth-child(n),
.users-table-shell th:nth-child(n), .users-table-shell td:nth-child(n) {
    width:    auto !important;
    max-width: none !important;
}

/* ── 4. TABLE-LAYOUT AUTO — columnas al ancho del contenido ──── */
.tabla-supervisor table,
.tabla-compras-pro table,
.tabla-gerencia-cotizar table,
.tabla-gerencia-precio table,
.tabla-reportes-comprados table,
.tabla-estatus-pro table,
.tabla-captura-proyectos table,
.users-table-shell table,
.dark-table table,
.mud-table-root table {
    table-layout: auto !important;
    width:        auto !important;
    min-width:    100% !important;
}

/* ── 5. ELEMENTOS DENTRO DE CELDAS ───────────────────────────── */
.mud-table-cell .mud-icon-button {
    padding: 2px  !important;
    width:   28px !important;
    height:  28px !important;
}
.mud-table-cell .mud-chip {
    height:    20px !important;
    font-size: 11px !important;
    padding:   0 8px !important;
}
.mud-table-cell .nx-chip {
    padding:   2px 8px !important;
    font-size: 11px    !important;
}
.mud-table-cell .mud-button-root {
    padding:    3px 10px !important;
    min-height: 0        !important;
    font-size:  12px     !important;
}

/* ── 6. SIMPLE TABLE (artículos en Captura) ──────────────────── */
.mud-simple-table td,
.mud-simple-table th {
    padding-top:    4px !important;
    padding-bottom: 4px !important;
    padding-left:   8px !important;
    padding-right:  8px !important;
    font-size:      13px !important;
    line-height:    1.3  !important;
    white-space:    nowrap !important;
    overflow:       visible !important;
    text-overflow:  unset  !important;
    max-width:      none   !important;
}

/* ══ FIN tablas compactas v3 ═══════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   NEXORA — RESPONSIVE MÓVIL / TABLET  (Abril 2026)
   Solo breakpoints xs/sm. Desktop (>1024px) sin cambios.
   ══════════════════════════════════════════════════════════════ */

/* ── VARIABLES MÓVIL ─────────────────────────────────────────── */
:root {
    --sidebar-width: 300px;
    --topbar-height: 73px;
}

/* ── HAMBURGER BUTTON (solo visible en móvil) ────────────────── */
.nx-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(14,165,233,.25);
    background: rgba(14,165,233,.08);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}
.nx-hamburger:hover { background: rgba(14,165,233,.16); }
.nx-hamburger svg { display: block; }

/* ── OVERLAY MOBILE (cierra sidebar al tap fuera) ───────────── */
.nx-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2,6,20,.72);
    z-index: 199;
    backdrop-filter: blur(2px);
}
.nx-overlay.active { display: block; }

/* ══ BREAKPOINT PRINCIPAL ≤ 1024px ══════════════════════════════ */
@media (max-width: 1024px) {

    /* ── LAYOUT SHELL ─────────────────────────────────────────── */
    .app-shell {
        grid-template-columns: 1fr !important;
    }

    /* ── SIDEBAR: fuera de pantalla por defecto ───────────────── */
    .sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        width: var(--sidebar-width) !important;
        height: 100vh !important;
        z-index: 200;
        transform: translateX(-100%);
        transition: transform .26s cubic-bezier(.4,0,.2,1);
        border-right: 1px solid rgba(14,165,233,.18) !important;
        box-shadow: 12px 0 40px rgba(0,0,0,.45);
    }
    .sidebar.open {
        transform: translateX(0);
    }

    /* ── MAIN AREA ────────────────────────────────────────────── */
    .main-area {
        width: 100% !important;
        min-width: 0;
    }

    /* ── TOPBAR MÓVIL ─────────────────────────────────────────── */
    .topbar.topbar-pro {
        display: flex !important;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        padding: 10px 14px !important;
    }

    /* Mostrar hamburger */
    .nx-hamburger { display: flex; }

    /* Ocultar módulo activo en mobile (ahorra espacio) */
    .topbar-active-module { display: none !important; }

    /* Comprimir título */
    .topbar-title-wrap { flex: 1; min-width: 0; }
    .topbar-title { font-size: .95rem !important; }
    .topbar-subtitle { display: none !important; }

    /* Comprimir userbox */
    .topbar-userbox, .topbar-userbox-pro { gap: 6px !important; flex-wrap: nowrap !important; }

    /* Ocultar nombre de usuario en móvil, solo avatar + bell */
    .topbar-userline { display: none !important; }
    .logout-btn-pro { padding: 7px 10px !important; font-size: .8rem !important; }

    /* ── CONTENT AREA ─────────────────────────────────────────── */
    .content-area {
        padding: 12px !important;
        height: calc(100vh - 58px) !important;
    }

    /* ── BANNER DE ALERTA INLINE ──────────────────────────────── */
    .topbar-inline-alert {
        grid-template-columns: auto 1fr !important;
        gap: 10px !important;
        padding: 10px 12px !important;
        border-radius: 12px !important;
        margin-bottom: 12px !important;
    }
    .topbar-inline-alert__actions {
        grid-column: 1 / -1;
        justify-content: flex-start !important;
        gap: 6px !important;
    }
    .topbar-inline-alert__actions .mud-button-root {
        min-width: 100px !important;
        font-size: .8rem !important;
    }

    /* ── TABLAS: scroll horizontal en móvil ──────────────────── */
    .tabla-supervisor .mud-table-container,
    .tabla-compras-pro .mud-table-container,
    .tabla-gerencia-cotizar .mud-table-container,
    .tabla-gerencia-precio .mud-table-container,
    .tabla-reportes-comprados .mud-table-container,
    .tabla-estatus-pro .mud-table-container,
    .tabla-captura-proyectos .mud-table-container,
    .users-table-shell .mud-table-container,
    .dark-table .mud-table-container,
    .mud-table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* ── CARDS / PAPERS ───────────────────────────────────────── */
    .mud-pa-6 { padding: 14px !important; }
    .mud-pa-4 { padding: 12px !important; }
    .mud-pilot-card.dark-paper { border-radius: 14px !important; }

    /* ── STATS CARDS ──────────────────────────────────────────── */
    .stats-card { padding: 10px 12px !important; }
    .stats-card .mud-typography-h3 { font-size: 1.55rem !important; }
    .stats-card .mud-typography-h5 { font-size: .88rem !important; }
    .stats-icon { font-size: 32px !important; }

    /* ── CAPTURA REQUERIMIENTO ────────────────────────────────── */
    .captura-shell { padding: 0 !important; }
    .captura-top-grid { gap: 8px !important; }

    /* ── COMPRAS HERO ─────────────────────────────────────────── */
    .search-toolbar {
        min-width: 100% !important;
        max-width: 100% !important;
    }

    /* ── BOTONES DE ACCIÓN ────────────────────────────────────── */
    .comprar-actions-card { flex-direction: row !important; flex-wrap: wrap !important; gap: 6px !important; }
    .comprar-action-btn { flex: 1 1 auto !important; min-width: 100px !important; }

    /* ── DETALLE PANEL ────────────────────────────────────────── */
    .detail-section { border-radius: 12px !important; }
    .decision-panel { border-radius: 12px !important; }

    /* ── DASHBOARD CEO ────────────────────────────────────────── */
    .nexora-home-shell .hero-panel {
        grid-template-columns: 1fr !important;
    }
    .nexora-home-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    /* ── GERENCIA: panel de decisión en móvil ─────────────────── */
    .precio-panel-grid .mud-grid-item { padding: 6px !important; }

    /* ── NOTIF BELL ───────────────────────────────────────────── */
    .notification-bell-menu > div { width: min(92vw, 360px) !important; }
}

/* ══ BREAKPOINT MÁS PEQUEÑO ≤ 600px ═════════════════════════════ */
@media (max-width: 600px) {

    /* Panel Stats: 1 columna */
    .stats-card .mud-typography-h3 { font-size: 1.35rem !important; }

    /* Dashboard home: 1 col */
    .nexora-home-grid { grid-template-columns: 1fr !important; }

    /* Chips de resumen: wrap */
    .summary-chip { font-size: .78rem !important; padding: 2px 8px !important; }

    /* Ocultar avatar en topbar si no hay espacio */
    .topbar-avatar { display: none; }

    /* Reducir padding de tarjeta principal */
    .mud-pa-6 { padding: 10px !important; }

    /* Botones de acción en columna */
    .decision-actions { flex-direction: column !important; }
    .primary-action-btn, .secondary-action-btn { min-width: 100% !important; }
}

/* ══ TABLET PORTRAIT 601-1024px ══════════════════════════════════ */
@media (min-width: 601px) and (max-width: 1024px) {
    .nexora-home-grid { grid-template-columns: 1fr 1fr !important; }
    .stats-card .mud-typography-h3 { font-size: 1.6rem !important; }
}

/* ══ DESKTOP: sidebar siempre visible ════════════════════════════ */
@media (min-width: 1025px) {
    .nx-hamburger { display: none !important; }
    .nx-overlay   { display: none !important; }
    .sidebar {
        position: relative !important;
        transform: none !important;
        box-shadow: none !important;
    }
    .app-shell {
        grid-template-columns: var(--sidebar-width) 1fr !important;
    }
}


/* ══════════════════════════════════════════════════════════════
   NEXORA — NOTIFICACIONES MÓVIL v1
   Banner azul (compras) y morado (RH) en content-area.
   ══════════════════════════════════════════════════════════════ */

/* Banner base — ya existe .topbar-inline-alert, solo ajustes móvil */
@media (max-width: 1024px) {
    .topbar-inline-alert {
        margin-bottom: 12px !important;
        border-radius: 14px !important;
    }

    /* RH variant */
    .topbar-inline-alert--rh {
        border-radius: 14px !important;
    }

    /* Texto más compacto en mobile */
    .topbar-inline-alert__title  { font-size: .88rem !important; }
    .topbar-inline-alert__message { font-size: .84rem !important; }
    .topbar-inline-alert__date   { font-size: .78rem !important; }
}

/* ── Badge campanita RH ───────────────────────────────────────── */
.notification-bell-button--rh {
    border-radius: 10px;
}

/* ══ FIN responsive móvil ══════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   NEXORA — FIX MÓVIL v2 (Abril 2026)
   1. Cerrar sesión siempre visible
   2. Doble toque en menú eliminado
   3. Sidebar vía JS puro (instantáneo)
   ══════════════════════════════════════════════════════════════ */

/* ── 1. CERRAR SESIÓN — siempre visible en topbar ────────────── */
@media (max-width: 1024px) {

    /* Topbar: permitir wrap para que el botón no se corte */
    .topbar.topbar-pro {
        flex-wrap: wrap !important;
        row-gap: 6px !important;
    }

    /* Fila superior: hamburger + título + campana + avatar */
    .topbar-right-cluster {
        flex-wrap: nowrap !important;
        gap: 8px !important;
    }

    /* El botón de cerrar sesión: compacto pero siempre visible */
    .logout-form-pro { display: block !important; }
    .logout-btn-pro {
        padding: 6px 10px !important;
        font-size: .78rem !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
    }

    /* Avatar: visible en tablet, oculto solo en móvil pequeño */
    .topbar-avatar { width: 32px !important; height: 32px !important; font-size: .8rem !important; }
}

@media (max-width: 600px) {
    /* En pantallas muy pequeñas: topbar en 2 filas */
    .topbar.topbar-pro {
        flex-wrap: wrap !important;
        padding: 8px 12px !important;
        row-gap: 6px !important;
    }

    /* Fila 1: hamburger + título (flex:1) + campana */
    .nx-hamburger { order: 1; }
    .topbar-title-wrap { order: 2; flex: 1 !important; }
    .topbar-right-cluster { order: 3; }

    /* Cerrar sesión: siempre visible, texto corto */
    .logout-btn-pro {
        padding: 5px 8px !important;
        font-size: .74rem !important;
    }

    /* Ocultar avatar en pantallas muy pequeñas */
    .topbar-avatar { display: none !important; }

    /* Quitar labels usuario/rol pero NO el botón logout */
    .topbar-userline { display: none !important; }
}


/* ── 2. DOBLE TOQUE ELIMINADO — menú ─────────────────────────── */
@media (max-width: 1024px) {
    .menu-item,
    .submenu-item,
    .menu-group summary,
    .menu-group summary *,
    .logout-btn-pro,
    .nx-hamburger {
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        cursor: pointer !important;
    }

    /* NavLink dentro del menú: responde al primer toque */
    a.menu-item,
    a.submenu-item {
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
    }
}


/* ── 3. SIDEBAR JS PURO — clases controladas desde JS ────────── */
/* El sidebar.open ya está en el bloque anterior, solo nos aseguramos
   de que el overlay también responda a la clase .active vía JS       */
#nx-overlay.active { display: block !important; }
#nx-sidebar.open   { transform: translateX(0) !important; }

/* ══ FIN fix móvil v2 ══════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════════
   NEXORA — SIDEBAR USER BLOCK + LOGOUT MÓVIL (Abril 2026)
   ══════════════════════════════════════════════════════════════ */

/* ── Bloque usuario al fondo del sidebar ─────────────────────── */
.sidebar-user-block {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-top: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(14,165,233,.04);
    border-radius: 14px;
    flex-shrink: 0;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(180deg, #38bdf8, #2563eb);
    display: grid;
    place-items: center;
    font-size: .8rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-user-name {
    font-size: .82rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-rol {
    font-size: .74rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout-form { margin: 0; flex-shrink: 0; }

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(239,68,68,.3);
    background: rgba(239,68,68,.08);
    color: #f87171;
    cursor: pointer;
    transition: all .15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-logout-btn:hover,
.sidebar-logout-btn:active {
    background: rgba(239,68,68,.18);
    border-color: rgba(239,68,68,.5);
    color: #fca5a5;
}

/* ── Asegurar que sidebar-inner use flex column ───────────────── */
.sidebar-inner {
    display: flex !important;
    flex-direction: column !important;
}

.sidebar-inner .menu.menu-sections {
    flex: 1;
}

/* ── En DESKTOP: sidebar user block siempre visible ──────────── */
/* (no changes needed, visible by default) */

/* ── En MÓVIL: ocultar logout del topbar ─────────────────────── */
@media (max-width: 1024px) {
    /* Ocultar botón cerrar sesión del topbar en móvil */
    .topbar .logout-form-pro { display: none !important; }

    /* Ocultar nombre/rol del topbar en móvil (ya está en sidebar) */
    .topbar-userbox .topbar-userline { display: none !important; }
}

/* ── En DESKTOP: sidebar user block es más compacto ──────────── */
@media (min-width: 1025px) {
    .sidebar-user-block {
        margin-top: 12px;
    }
}

/* ══ FIN sidebar user block ════════════════════════════════════ */
