/* =========================================================
   NEWSON INTRANET · IDENTIDAD CORPORATIVA 2026
   Paleta: naranja, plomo, blanco y gris.
   ========================================================= */
:root {
  --ns-orange: #f5a000;
  --ns-orange-2: #ffb629;
  --ns-orange-dark: #d98500;
  --ns-plomo-950: #20262d;
  --ns-plomo-900: #2b323a;
  --ns-plomo-800: #3a424b;
  --ns-plomo-700: #535d68;
  --ns-gray-100: #f4f5f6;
  --ns-gray-150: #eef0f2;
  --ns-gray-200: #e1e5e9;
  --ns-gray-300: #cfd5db;
  --ns-white: #ffffff;
  --ns-text: #242c35;
  --ns-text-soft: #697480;
  --ns-muted: #8b949e;
  --ns-line: rgba(55, 64, 73, .12);
  --ns-line-strong: rgba(55, 64, 73, .22);
  --ns-navy: var(--ns-plomo-950);
  --ns-navy-2: var(--ns-plomo-900);
  --ns-blue: var(--ns-orange);
  --ns-blue-2: var(--ns-orange-2);
  --ns-cyan: #aab1b8;
  --ns-bg: #f1f3f5;
  --ns-bg-soft: #f7f8f9;
  --ns-surface-dark: var(--ns-plomo-950);
  --ns-shadow-sm: 0 8px 24px rgba(31, 38, 45, .07);
  --ns-shadow: 0 18px 48px rgba(31, 38, 45, .11);
  --ns-shadow-lg: 0 28px 80px rgba(31, 38, 45, .16);
}

body.newson-app {
  background:
    radial-gradient(circle at 96% 2%, rgba(245,160,0,.09), transparent 25rem),
    radial-gradient(circle at 5% 100%, rgba(83,93,104,.08), transparent 30rem),
    var(--ns-bg) !important;
  color: var(--ns-text);
}
body.newson-app::before {
  background-image: linear-gradient(rgba(60,68,77,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(60,68,77,.03) 1px, transparent 1px) !important;
}
body.newson-app :focus-visible { outline-color: rgba(245,160,0,.35); }
body.newson-app ::selection { background: rgba(245,160,0,.25); color: var(--ns-plomo-950); }

body.newson-app .topbar.app-topbar {
  background: rgba(250,250,250,.90) !important;
  box-shadow: 0 1px 0 var(--ns-line), 0 12px 34px rgba(31,38,45,.05) !important;
}
body.newson-app .topbar.app-topbar::after { background: linear-gradient(90deg, var(--ns-orange), transparent 46%) !important; }
body.newson-app .topbar-left {
  background: linear-gradient(145deg, var(--ns-plomo-950), var(--ns-plomo-800)) !important;
}
body.newson-app .app-page-icon {
  color: var(--ns-orange) !important;
  border-color: rgba(245,160,0,.22) !important;
  background: linear-gradient(145deg, #fff, #fff6e6) !important;
  box-shadow: 0 8px 20px rgba(245,160,0,.12) !important;
}
body.newson-app .app-page-kicker { color: var(--ns-orange-dark) !important; }
body.newson-app .app-page-title,
body.newson-app .app-user-name { color: var(--ns-plomo-950) !important; }
body.newson-app .topbar-icon-btn:hover { color: var(--ns-orange-dark) !important; border-color: rgba(245,160,0,.38) !important; }
body.newson-app .widget-administrador {
  background: linear-gradient(145deg, var(--ns-orange-2), var(--ns-orange-dark)) !important;
  box-shadow: 0 10px 24px rgba(245,160,0,.28) !important;
  color: var(--ns-plomo-950) !important;
}
body.newson-app .topbar .dropdown-menu > li > a:hover { color: var(--ns-orange-dark) !important; background: #fff6e5 !important; }

body.newson-app .left.side-menu {
  background: radial-gradient(circle at 20% 100%, rgba(245,160,0,.13), transparent 22rem), linear-gradient(180deg, #303840 0%, #20262d 100%) !important;
  box-shadow: inset -1px 0 rgba(255,255,255,.05), 14px 0 42px rgba(31,38,45,.10) !important;
}
body.newson-app #sidebar-menu ul ul a::before { background: rgba(245,160,0,.66) !important; }
body.newson-app #sidebar-menu > ul > li > a:hover,
body.newson-app #sidebar-menu > ul > li > a.active,
body.newson-app #sidebar-menu > ul > li.nav-active > a {
  background: rgba(245,160,0,.13) !important;
  color: #fff !important;
}
body.newson-app #sidebar-menu > ul > li > a.active::before,
body.newson-app #sidebar-menu > ul > li.nav-active > a::before { background: var(--ns-orange) !important; }
body.newson-app #sidebar-menu > ul > li > a > i {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px;
  display: inline-grid !important;
  place-items: center;
  margin: 0 12px 0 0 !important;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  line-height: 1 !important;
  vertical-align: middle;
}
body.newson-app #sidebar-menu > ul > li > a.active > i,
body.newson-app #sidebar-menu > ul > li.nav-active > a > i { color: var(--ns-orange-2) !important; background: rgba(245,160,0,.14); }
body.newson-app .sidebar-readonly i { color: var(--ns-orange-2) !important; }

body.newson-app .page-heading-kicker,
body.newson-app .dashboard-eyebrow { color: var(--ns-orange-dark) !important; }
body.newson-app .connection-pill::before { background: var(--ns-orange) !important; box-shadow: 0 0 0 5px rgba(245,160,0,.13) !important; }
body.newson-app .dashboard-hero {
  background-color: var(--ns-plomo-950) !important;
  background-blend-mode: multiply;
}
body.newson-app .dashboard-hero::before {
  background: linear-gradient(90deg, rgba(32,38,45,.98) 0%, rgba(43,50,58,.92) 57%, rgba(43,50,58,.70) 100%) !important;
}
body.newson-app .dashboard-hero::after {
  border-color: rgba(245,160,0,.18) !important;
  box-shadow: 0 0 0 44px rgba(245,160,0,.035), 0 0 0 92px rgba(255,255,255,.025) !important;
}
body.newson-app .dashboard-primary-action,
body.newson-app .ns-btn-primary {
  color: var(--ns-plomo-950) !important;
  background: linear-gradient(135deg, var(--ns-orange-2), var(--ns-orange)) !important;
  box-shadow: 0 12px 28px rgba(245,160,0,.25) !important;
}
body.newson-app .dashboard-primary-action:hover,
body.newson-app .ns-btn-primary:hover { background: linear-gradient(135deg, #ffc452, var(--ns-orange-dark)) !important; }
body.newson-app .dashboard-stat-icon,
body.newson-app .module-launch-icon { color: var(--ns-orange-dark) !important; background: #fff4df !important; }
body.newson-app .module-launch-card:hover { border-color: rgba(245,160,0,.42) !important; box-shadow: 0 18px 42px rgba(31,38,45,.11) !important; }
body.newson-app .module-launch-arrow { color: var(--ns-orange-dark) !important; }
body.newson-app .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }

/* Botones, formularios y elementos heredados */
body.newson-app .btn-primary,
body.newson-app .k-primary,
body.newson-app .bg-custom,
body.newson-app .label-primary { background-color: var(--ns-orange) !important; border-color: var(--ns-orange-dark) !important; color: var(--ns-plomo-950) !important; }
body.newson-app input:focus,
body.newson-app select:focus,
body.newson-app textarea:focus,
body.newson-app .form-control:focus { border-color: rgba(245,160,0,.65) !important; box-shadow: 0 0 0 3px rgba(245,160,0,.12) !important; }

/* Seguridad: auditoría y sesiones */
.security-hero {
  margin: 0 0 20px;
  padding: clamp(24px, 3.5vw, 38px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--ns-line);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, #f7f7f7 72%, #fff5df 100%);
  box-shadow: var(--ns-shadow-sm);
}
.security-kicker { margin: 0 0 9px; color: var(--ns-orange-dark); font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.security-hero h1 { margin: 0; color: var(--ns-plomo-950); font-size: clamp(26px, 3vw, 38px); font-weight: 820; letter-spacing: -.035em; }
.security-hero p:not(.security-kicker) { max-width: 780px; margin: 8px 0 0; color: var(--ns-text-soft); font-size: 14px; line-height: 1.65; }
.ns-btn { min-height: 46px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 14px; font-size: 12px; font-weight: 780; white-space: nowrap; transition: .22s ease; cursor: pointer; }
.ns-btn:hover { transform: translateY(-1px); text-decoration: none; }
.ns-btn-secondary { color: var(--ns-plomo-900) !important; border-color: var(--ns-gray-300); background: #fff; }
.ns-btn-secondary:hover { border-color: var(--ns-orange); color: var(--ns-orange-dark) !important; }
.ns-btn-ghost { color: var(--ns-plomo-700) !important; border-color: transparent; background: var(--ns-gray-150); }
.ns-btn.is-loading i { animation: ns-spin .7s linear infinite; }
@keyframes ns-spin { to { transform: rotate(360deg); } }

.security-summary-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.security-summary-card { min-height: 106px; padding: 20px; display: flex; align-items: center; gap: 16px; border: 1px solid var(--ns-line); border-radius: 20px; background: #fff; box-shadow: var(--ns-shadow-sm); }
.security-summary-card > span { width: 52px; height: 52px; flex: 0 0 52px; display: grid; place-items: center; border-radius: 16px; color: var(--ns-orange-dark); background: #fff2d8; font-size: 19px; }
.security-summary-card strong { display: block; color: var(--ns-plomo-950); font-size: 25px; line-height: 1.1; }
.security-summary-card small { display: block; margin-top: 6px; color: var(--ns-text-soft); font-size: 11px; }
.security-card { margin-bottom: 20px; border: 1px solid var(--ns-line); border-radius: 22px; background: #fff; box-shadow: var(--ns-shadow-sm); overflow: hidden; }
.filter-card { padding: 20px; }
.audit-filter-grid { display: grid; grid-template-columns: minmax(240px,1.5fr) repeat(5,minmax(140px,1fr)); gap: 14px; align-items: end; }
.ns-field { min-width: 0; margin: 0; }
.ns-field > span { margin-bottom: 7px; display: block; color: var(--ns-plomo-700); font-size: 10px; font-weight: 780; text-transform: uppercase; letter-spacing: .05em; }
.ns-field input,
.ns-field select,
.session-device-select,
.session-search input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--ns-gray-300); border-radius: 12px; color: var(--ns-text); background: #fff; outline: 0; }
.ns-input-icon { position: relative; }
.ns-input-icon > i { position: absolute; top: 50%; left: 14px; z-index: 1; color: var(--ns-muted); transform: translateY(-50%); }
.ns-input-icon input { padding-left: 40px !important; }
.filter-actions { display: flex; gap: 8px; align-items: center; }
.security-card-header { padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--ns-line); }
.security-card-header h2 { margin: 0; color: var(--ns-plomo-950); font-size: 19px; font-weight: 800; }
.security-card-header p { margin: 6px 0 0; color: var(--ns-text-soft); font-size: 12px; }
.security-live-pill { padding: 8px 11px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; color: #496054; background: #eaf4ed; font-size: 10px; font-weight: 740; }
.security-live-pill i,
.status-badge i { width: 7px; height: 7px; border-radius: 50%; background: #35ad70; box-shadow: 0 0 0 4px rgba(53,173,112,.12); }
.security-table-wrap { width: 100%; overflow: auto; }
.security-table { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; }
.security-table th { padding: 14px 16px; color: var(--ns-plomo-700); background: #f3f4f5; border-bottom: 1px solid var(--ns-line); font-size: 9px; font-weight: 850; letter-spacing: .045em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.security-table td { padding: 15px 16px; border-bottom: 1px solid var(--ns-line); color: var(--ns-text-soft); font-size: 11px; vertical-align: middle; }
.security-table tbody tr:last-child td { border-bottom: 0; }
.security-table tbody tr:hover td { background: #fffaf1; }
.security-table td > strong { display: block; color: var(--ns-plomo-950); font-size: 11px; font-weight: 740; }
.security-table td > small,
.security-table td div > small { display: block; margin-top: 5px; color: var(--ns-muted); font-size: 10px; line-height: 1.4; }
.security-table code { padding: 6px 8px; border-radius: 8px; color: var(--ns-plomo-800); background: var(--ns-gray-150); font-size: 10px; }
.audit-user { min-width: 230px; display: flex; align-items: center; gap: 11px; }
.audit-user > span { width: 39px; height: 39px; flex: 0 0 39px; display: grid; place-items: center; border: 1px solid rgba(245,160,0,.45); border-radius: 50%; color: var(--ns-orange-dark); background: #fff7e8; font-size: 10px; font-weight: 850; }
.audit-user strong { max-width: 260px; display: block; overflow: hidden; color: var(--ns-plomo-950); font-size: 11px; font-weight: 780; text-overflow: ellipsis; white-space: nowrap; }
.event-badge,
.profile-badge,
.status-badge { padding: 7px 10px; display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.event-badge.neutral,.profile-badge { color: #59636d; background: #eef0f2; }
.event-badge.success { color: #22724d; background: #e5f5ec; }
.event-badge.warning { color: #976000; background: #fff1d2; }
.event-badge.danger { color: #af3e49; background: #ffe9eb; }
.status-badge.active { color: #23734e; background: #e5f5ec; }
.status-badge.protected { color: #925e00; background: #fff0cf; }
.status-badge.protected i { background: var(--ns-orange); box-shadow: 0 0 0 4px rgba(245,160,0,.13); }
.current-session-row td { background: #fffaf0; }
.session-actions { display: flex; gap: 7px; }
.session-close,.session-close-all { min-height: 34px; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e7b1b5; border-radius: 10px; color: #b4444d; background: #fff7f7; font-size: 9px; font-weight: 780; cursor: pointer; }
.session-close-all { color: var(--ns-plomo-700); border-color: var(--ns-gray-300); background: #fff; }
.protected-label { color: #85631e; font-size: 9px; font-weight: 780; white-space: nowrap; }
.security-empty { min-height: 180px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 9px; color: var(--ns-muted); text-align: center; }
.security-empty i { color: var(--ns-orange); font-size: 27px; }
.security-empty strong { color: var(--ns-plomo-900); font-size: 13px; }
.security-empty.danger i { color: #d64b57; }
.security-pagination { padding: 16px 22px; border-top: 1px solid var(--ns-line); }
.security-pagination .pagination { margin: 0; }
.security-pagination .pagination > .active > span { color: var(--ns-plomo-950); border-color: var(--ns-orange); background: var(--ns-orange); }
.session-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.session-search { width: min(360px, 32vw); }
.session-device-select { width: 190px; }
.session-footer { padding: 14px 22px; display: flex; justify-content: space-between; gap: 15px; color: var(--ns-muted); background: #fafafa; border-top: 1px solid var(--ns-line); font-size: 10px; }

/* Login corporativo NEWSON */
body.newson-login-page { --login-blue: var(--ns-orange); --login-cyan: #b4bac0; --login-orange: var(--ns-orange); --login-text: var(--ns-plomo-950); --login-muted: var(--ns-text-soft); --login-line: var(--ns-gray-300); }
body.newson-login-page .auth-visual { background-color: var(--ns-plomo-950) !important; }
body.newson-login-page .auth-visual::before { background: linear-gradient(115deg, rgba(32,38,45,.98), rgba(43,50,58,.92)), radial-gradient(circle at 78% 16%, rgba(245,160,0,.18), transparent 25rem) !important; }
body.newson-login-page .auth-visual::after { background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px) !important; }
body.newson-login-page .auth-orb { border-color: rgba(245,160,0,.22) !important; }
body.newson-login-page .auth-orb.one { box-shadow: 0 0 0 55px rgba(245,160,0,.035), 0 0 0 115px rgba(255,255,255,.02) !important; }
body.newson-login-page .auth-secure-pill i,
body.newson-login-page .auth-kicker { color: var(--ns-orange-2) !important; }
body.newson-login-page .auth-kicker::before { background: linear-gradient(90deg, var(--ns-orange), #c3c7cb) !important; }
body.newson-login-page .auth-message h1 span { background: linear-gradient(90deg, #fff, #d6d9dc 72%) !important; background-clip: text !important; -webkit-background-clip: text !important; }
body.newson-login-page .auth-form-side { background: radial-gradient(circle at 100% 0, rgba(245,160,0,.10), transparent 24rem), linear-gradient(155deg, #fafafa, #eceff1) !important; }
body.newson-login-page .auth-card-icon,
body.newson-login-page .auth-submit { color: var(--ns-plomo-950) !important; background: linear-gradient(145deg, var(--ns-orange-2), var(--ns-orange-dark)) !important; box-shadow: 0 13px 28px rgba(245,160,0,.24) !important; }
body.newson-login-page .auth-card h2,
body.newson-login-page .auth-field label { color: var(--ns-plomo-950) !important; }
body.newson-login-page .auth-input:focus { border-color: rgba(245,160,0,.62) !important; box-shadow: 0 0 0 4px rgba(245,160,0,.12), 0 10px 24px rgba(31,38,45,.06) !important; }
body.newson-login-page .auth-password-toggle:hover { color: var(--ns-orange-dark) !important; background: #fff4df !important; }
body.newson-login-page .auth-forgot,
body.newson-login-page .auth-back-link,
body.newson-login-page .auth-inline-action { color: var(--ns-orange-dark) !important; }
body.newson-login-page .auth-check input { accent-color: var(--ns-orange); }
body.newson-login-page .auth-card-footer i { color: var(--ns-orange-dark) !important; }
body.newson-login-page .auth-mobile-logo img { filter: none !important; }

@media (max-width: 1200px) {
  .security-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .audit-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .ns-field-wide { grid-column: span 2; }
  .filter-actions { grid-column: span 2; }
}
@media (max-width: 900px) {
  body.newson-app .dashboard-stat-grid { grid-template-columns: 1fr !important; }
  .security-hero { align-items: flex-start; flex-direction: column; }
  .security-hero .ns-btn { width: 100%; }
  .session-toolbar { align-items: stretch; flex-direction: column; }
  .session-toolbar-actions { width: 100%; }
  .session-search { width: 100%; }
}
@media (max-width: 767px) {
  body.newson-app .app-page-icon { width: 40px; height: 40px; border-radius: 12px; }
  body.newson-app .app-page-title { max-width: 52vw; font-size: 14px !important; }
  body.newson-app .app-page-kicker { font-size: 8px; }
  body.newson-app .widget-administrador { width: 40px !important; height: 40px !important; border-radius: 13px !important; }
  .security-summary-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .security-summary-card { min-height: 92px; padding: 14px; gap: 11px; }
  .security-summary-card > span { width: 43px; height: 43px; flex-basis: 43px; border-radius: 13px; }
  .security-summary-card strong { font-size: 20px; }
  .filter-card { padding: 15px; }
  .audit-filter-grid { grid-template-columns: 1fr; }
  .ns-field-wide,.filter-actions { grid-column: auto; }
  .filter-actions { flex-direction: column; }
  .filter-actions .ns-btn { width: 100%; }
  .security-card-header { padding: 18px; }
  .security-table { min-width: 0; display: block; }
  .security-table thead { display: none; }
  .security-table tbody,.security-table tr,.security-table td { display: block; width: 100%; }
  .security-table tr { padding: 14px 15px; border-bottom: 1px solid var(--ns-line); }
  .security-table td { position: relative; min-height: 34px; padding: 7px 0 7px 116px; border: 0; }
  .security-table td::before { content: attr(data-label); position: absolute; top: 9px; left: 0; width: 105px; color: var(--ns-muted); font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
  .audit-user { min-width: 0; }
  .audit-user strong { max-width: 58vw; }
  .session-actions { flex-wrap: wrap; }
  .session-toolbar-actions { align-items: stretch; flex-direction: column; }
  .session-device-select { width: 100%; }
  .session-footer { flex-direction: column; }
}
@media (max-width: 480px) {
  .security-summary-grid { grid-template-columns: 1fr; }
  .security-hero { padding: 21px 18px; border-radius: 19px; }
  .security-table td { padding-left: 98px; }
  .security-table td::before { width: 88px; }
}

/* =========================================================
   AJUSTES FINALES · PALETA E ICONOGRAFÍA NEWSON
   ========================================================= */
body.newson-app * { scrollbar-color: rgba(83,93,104,.38) transparent; }
body.newson-app *::-webkit-scrollbar-thumb { background: rgba(83,93,104,.32); background-clip: padding-box; }
body.newson-app *::-webkit-scrollbar-thumb:hover { background: rgba(83,93,104,.55); background-clip: padding-box; }

/* Iconos perfectamente centrados y sin saltos visuales */
body.newson-app i[class*="fa"],
body.newson-app .md { line-height: 1; }
body.newson-app .app-page-icon,
body.newson-app .topbar-icon-btn,
body.newson-app .widget-administrador,
body.newson-app .dashboard-stat-icon,
body.newson-app .module-launch-icon,
body.newson-app .folder-nav-icon,
body.newson-app .subfolder-card-icon,
body.newson-app .file-type-icon,
body.newson-app .file-action-btn { align-items: center; justify-content: center; }

/* Submódulos con icono fijo y texto alineado */
body.newson-app #sidebar-menu ul ul { padding-left: 42px !important; }
body.newson-app #sidebar-menu ul ul a {
  min-height: 40px;
  padding: 9px 11px !important;
  display: flex;
  align-items: center;
  gap: 10px;
}
body.newson-app #sidebar-menu ul ul a::before { display: none; }
body.newson-app #sidebar-menu ul ul a > i {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: rgba(255,182,41,.76);
  background: rgba(255,255,255,.055);
  font-size: 11px;
}
body.newson-app #sidebar-menu ul ul a > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.newson-app #sidebar-menu ul ul a.active > i,
body.newson-app #sidebar-menu ul ul a:hover > i {
  color: var(--ns-plomo-950);
  background: var(--ns-orange);
}
body.newson-app .sidebar-readonly {
  border-color: rgba(245,160,0,.17) !important;
  background: rgba(245,160,0,.08) !important;
}

/* Mensajes del sistema */
.ns-flash {
  margin: 0 0 18px;
  padding: 13px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ns-line);
  border-radius: 14px;
  color: var(--ns-plomo-800);
  background: #fff;
  box-shadow: var(--ns-shadow-sm);
  font-size: 12px;
  line-height: 1.5;
}
.ns-flash > i { color: var(--ns-orange-dark); font-size: 16px; }
.ns-flash-success { border-left: 4px solid var(--ns-orange); }
.ns-flash-warning { border-left: 4px solid var(--ns-orange-dark); background: #fffaf0; }
.ns-flash-info { border-left: 4px solid var(--ns-plomo-700); }

/* Componentes heredados sin azul */
body.newson-app .text-primary,
body.newson-app .text-custom { color: var(--ns-orange-dark) !important; }
body.newson-app .k-grid td { border-color: var(--ns-line) !important; color: var(--ns-plomo-800) !important; }
body.newson-app .k-grid tr:hover { background: #fffaf1 !important; }
body.newson-app .k-grid tr.k-state-selected { background: #fff2d6 !important; }
body.newson-app .k-pager-wrap { background: #fafafa !important; }
body.newson-app .k-window-titlebar { color: var(--ns-plomo-950) !important; background: linear-gradient(120deg, #fff, #f1f2f3) !important; }
body.newson-app .config-media-card { background: #fafafa !important; }
body.newson-app .config-preview { border-color: rgba(245,160,0,.38) !important; background: #f2f3f4 !important; }

/* Visor documental: naranja, plomo, blanco y gris */
body.newson-app .document-hub,
body.newson-app .folder-panel,
body.newson-app .document-workspace { border-color: var(--ns-line) !important; }
body.newson-app .folder-panel {
  background: linear-gradient(180deg, #f7f7f7 0%, #eceff1 100%) !important;
}
body.newson-app .folder-panel-title-icon,
body.newson-app .document-empty-icon {
  color: var(--ns-orange-dark) !important;
  background: #fff1d4 !important;
}
body.newson-app .folder-nav-item:hover {
  color: var(--ns-plomo-950) !important;
  background: rgba(255,255,255,.92) !important;
}
body.newson-app .folder-nav-item.is-active {
  color: var(--ns-plomo-950) !important;
  border-color: rgba(245,160,0,.36) !important;
  background: linear-gradient(90deg, #fff0cf, #fffaf0) !important;
  box-shadow: inset 4px 0 var(--ns-orange) !important;
}
body.newson-app .folder-nav-count,
body.newson-app .breadcrumb-node,
body.newson-app .result-pill {
  color: var(--ns-plomo-900) !important;
  background: #eceff1 !important;
}
body.newson-app .breadcrumb-node:hover { background: #fff1d4 !important; }
body.newson-app .breadcrumb-separator { color: var(--ns-gray-300) !important; }
body.newson-app .folder-panel-note {
  border-color: var(--ns-line) !important;
  background: rgba(255,255,255,.76) !important;
}
body.newson-app .folder-panel-note i,
body.newson-app .folder-mobile-trigger,
body.newson-app .document-search > i { color: var(--ns-orange-dark) !important; }
body.newson-app .document-location-badge {
  color: var(--ns-plomo-950) !important;
  background: linear-gradient(145deg, var(--ns-orange-2), var(--ns-orange-dark)) !important;
  box-shadow: 0 10px 23px rgba(245,160,0,.22) !important;
}
body.newson-app .document-search input {
  border-color: var(--ns-gray-300) !important;
  background: #fafafa !important;
  box-shadow: 0 8px 22px rgba(31,38,45,.05) !important;
}
body.newson-app .document-search input:focus {
  border-color: rgba(245,160,0,.60) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(245,160,0,.11), 0 10px 24px rgba(31,38,45,.07) !important;
}
body.newson-app .document-divider { background: linear-gradient(90deg, var(--ns-gray-300), transparent) !important; }
body.newson-app .subfolder-card:hover,
body.newson-app .file-card:hover { border-color: rgba(245,160,0,.42) !important; }
body.newson-app .file-type-icon,
body.newson-app .file-type-icon.type-doc,
body.newson-app .file-type-icon.type-xls,
body.newson-app .file-type-icon.type-ppt,
body.newson-app .file-type-icon.type-img,
body.newson-app .file-type-icon.type-vid,
body.newson-app .file-type-icon.type-aud {
  background: linear-gradient(145deg, var(--ns-plomo-700), var(--ns-plomo-950)) !important;
  box-shadow: 0 10px 22px rgba(31,38,45,.18) !important;
}
body.newson-app .file-type-icon.type-pdf {
  color: var(--ns-plomo-950) !important;
  background: linear-gradient(145deg, var(--ns-orange-2), var(--ns-orange-dark)) !important;
  box-shadow: 0 10px 22px rgba(245,160,0,.22) !important;
}
body.newson-app .file-card-actions { background: #f5f6f7 !important; }
body.newson-app .file-action-btn {
  color: var(--ns-plomo-800) !important;
  border-color: var(--ns-gray-300) !important;
  background: #fff !important;
}
body.newson-app .file-action-btn:hover,
body.newson-app .file-action-btn.is-primary {
  color: var(--ns-plomo-950) !important;
  border-color: var(--ns-orange) !important;
  background: var(--ns-orange) !important;
}
body.newson-app .document-empty { border-color: var(--ns-gray-300) !important; background: #f8f8f8 !important; }
body.newson-app .document-loader { border-color: rgba(83,93,104,.15) !important; border-top-color: var(--ns-orange) !important; }
body.newson-app .folder-drawer-backdrop,
body.newson-app .sidebar-backdrop { background: rgba(32,38,45,.58) !important; }

/* Auditoría y sesiones */
.audit-filter-grid { grid-template-columns: minmax(230px, 1.6fr) repeat(4, minmax(135px, 1fr)); }
.session-profile-select { width: 190px; height: 44px; padding: 0 13px; border: 1px solid var(--ns-gray-300); border-radius: 12px; color: var(--ns-text); background: #fff; outline: 0; }
.security-live-pill,
.status-badge.active { color: var(--ns-plomo-700); background: var(--ns-gray-150); }
.security-live-pill i,
.status-badge.active i { background: var(--ns-plomo-700); box-shadow: 0 0 0 4px rgba(83,93,104,.12); }

/* Login móvil: no dejar fondos azules heredados */
body.newson-login-page .auth-shell { background: var(--ns-plomo-950) !important; }
body.newson-login-page .auth-feature { color: rgba(255,255,255,.78) !important; }
body.newson-login-page .auth-feature i { color: var(--ns-orange-2) !important; }
body.newson-login-page .auth-input-icon { color: var(--ns-plomo-700) !important; }
body.newson-login-page .auth-submit:hover { box-shadow: 0 18px 36px rgba(245,160,0,.28) !important; }

@media (max-width: 991px) {
  body.newson-app .topbar.app-topbar {
    background: linear-gradient(100deg, var(--ns-plomo-950), var(--ns-plomo-800)) !important;
  }
  body.newson-app .topbar.app-topbar::after { background: linear-gradient(90deg, var(--ns-orange), transparent 50%) !important; }
  body.newson-app .topbar-left { background: transparent !important; }
  body.newson-app .app-page-kicker { color: var(--ns-orange-2) !important; }
  body.newson-app .app-page-title,
  body.newson-app .app-user-name { color: #fff !important; }
  body.newson-app .app-user-role { color: rgba(255,255,255,.62) !important; }
  body.newson-app .topbar-icon-btn { color: #fff !important; border-color: rgba(255,255,255,.14) !important; background: rgba(255,255,255,.07) !important; }
}

@media (max-width: 767px) {
  body.newson-app #sidebar-menu ul ul { padding-left: 30px !important; }
  .audit-filter-grid { grid-template-columns: 1fr; }
  .session-profile-select { width: 100%; }
  .ns-flash { margin-bottom: 13px; border-radius: 12px; }
  body.newson-app .dashboard-hero {
    min-height: 340px;
    padding: 24px 19px;
    align-items: flex-end;
    background-position: center;
  }
  body.newson-app .dashboard-hero::before {
    background: linear-gradient(180deg, rgba(32,38,45,.48), rgba(32,38,45,.97) 56%) !important;
  }
  body.newson-app .dashboard-hero h2 { font-size: clamp(27px, 9vw, 36px); }
  body.newson-app .dashboard-hero-actions { width: 100%; }
  body.newson-app .dashboard-primary-action,
  body.newson-app .dashboard-secondary-action { min-height: 48px; }
  body.newson-app .surface-card,
  body.newson-app .security-card { border-radius: 18px; }
}


/* =========================================================
   ESTABILIZACIÓN VISUAL Y RESPONSIVE FINAL
   ========================================================= */
/* El panel deja de depender de fondos azules cargados desde configuración. */
body.newson-app .dashboard-hero {
  background-image:
    radial-gradient(circle at 90% 4%, rgba(245,160,0,.20) 0 1px, transparent 2px),
    radial-gradient(circle at 94% 12%, rgba(245,160,0,.11), transparent 18rem),
    linear-gradient(118deg, #20262d 0%, #2b323a 60%, #3a424b 100%) !important;
  background-size: 22px 22px, auto, auto !important;
  background-blend-mode: normal !important;
}
body.newson-app .dashboard-hero::before {
  background: linear-gradient(90deg, rgba(32,38,45,.22), rgba(32,38,45,.06)) !important;
}
body.newson-app .dashboard-secondary-action {
  color: #fff !important;
  border-color: rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.075) !important;
}
body.newson-app .dashboard-secondary-action:hover {
  border-color: rgba(255,182,41,.50) !important;
  background: rgba(245,160,0,.12) !important;
}

/* Login: fondo corporativo neutro, sin dominante azul. */
body.newson-login-page .auth-visual {
  background-image:
    radial-gradient(circle at 86% 12%, rgba(245,160,0,.17), transparent 19rem),
    radial-gradient(circle at 8% 100%, rgba(255,255,255,.055), transparent 22rem),
    linear-gradient(132deg, #20262d 0%, #2b323a 68%, #3a424b 100%) !important;
}
body.newson-login-page .auth-visual::before {
  background: linear-gradient(112deg, rgba(32,38,45,.20), rgba(32,38,45,.08)) !important;
}

/* Todos los contenedores de iconos conservan una caja fija. */
body.newson-app .app-page-icon > i,
body.newson-app .topbar-icon-btn > i,
body.newson-app .widget-administrador > i,
body.newson-app .dashboard-stat-icon > i,
body.newson-app .module-launch-icon > i,
body.newson-app .security-summary-card > span > i,
body.newson-app .file-action-btn > i,
body.newson-app .folder-nav-icon > i {
  width: 1em;
  height: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1 !important;
  transform: none !important;
}
body.newson-app button,
body.newson-app a { -webkit-tap-highlight-color: transparent; }

/* Formularios de auditoría adaptables sin superposición. */
.audit-filter-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.audit-filter-grid .ns-field-wide { grid-column: span 2; }
.audit-filter-grid .filter-actions { grid-column: span 2; flex-wrap: wrap; }
.session-toolbar { align-items: flex-start; }
.session-toolbar-actions { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.session-search { flex: 1 1 300px; min-width: 230px; width: auto; }
.session-device-select,
.session-profile-select { flex: 0 1 190px; min-width: 170px; }

@media (max-width: 1399px) {
  .audit-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .session-toolbar { flex-direction: column; }
  .session-toolbar-actions { width: 100%; justify-content: flex-start; }
}

@media (max-width: 1099px) {
  .audit-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .security-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filter-grid .filter-actions { grid-column: span 1; }
}

@media (max-width: 991px) {
  body.newson-app .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .security-hero { align-items: flex-start; flex-direction: column; }
  .security-hero .ns-btn { width: auto; }
}

@media (max-width: 767px) {
  /* Cabecera móvil: logo, menú y perfil ya no compiten por el mismo ancho. */
  body.newson-app .topbar-left {
    width: 100% !important;
    max-width: none !important;
    padding: 0 62px 0 12px !important;
  }
  body.newson-app .brand-wrap {
    width: auto !important;
    justify-content: flex-start !important;
    gap: 10px !important;
  }
  body.newson-app .button-menu-mobile {
    order: -1;
    flex: 0 0 40px;
    width: 40px !important;
    height: 40px !important;
  }
  body.newson-app .logo.app-logo,
  body.newson-app .logo.app-logo img {
    width: 118px !important;
    max-width: 118px !important;
  }
  body.newson-app .topbar .navbar.navbar-default {
    position: absolute !important;
    top: 0;
    right: 0;
    width: auto !important;
    margin-left: 0 !important;
  }
  body.newson-app .topbar .navbar .container-fluid { padding: 0 10px !important; }
  body.newson-app .app-topbar-actions { gap: 6px; }

  .audit-filter-grid,
  .audit-filter-grid .ns-field-wide,
  .audit-filter-grid .filter-actions { grid-template-columns: 1fr; grid-column: auto; }
  .filter-actions { width: 100%; }
  .filter-actions .ns-btn { flex: 1 1 150px; }
  .session-toolbar-actions { display: grid; grid-template-columns: 1fr; }
  .session-search,
  .session-device-select,
  .session-profile-select { width: 100%; min-width: 0; }
  .security-summary-grid { grid-template-columns: 1fr; gap: 12px; }
  .security-summary-card { min-height: 90px; padding: 16px; }
  .security-hero { padding: 21px 18px; border-radius: 18px; }
  .security-hero .ns-btn { width: 100%; }
  .security-card-header { padding: 18px 16px; }
  .session-footer { align-items: flex-start; flex-direction: column; padding: 13px 16px; }

  /* Tablas convertidas en tarjetas legibles. */
  .security-table-wrap { padding: 12px; overflow: visible; }
  .security-table { min-width: 0; display: block; }
  .security-table thead { display: none; }
  .security-table tbody { display: grid; gap: 12px; }
  .security-table tr { display: block; border: 1px solid var(--ns-line); border-radius: 16px; background: #fff; box-shadow: var(--ns-shadow-sm); overflow: hidden; }
  .security-table td {
    min-height: 46px;
    padding: 12px 13px 12px 112px !important;
    display: block;
    position: relative;
    border-bottom: 1px solid var(--ns-line);
    overflow-wrap: anywhere;
  }
  .security-table td:last-child { border-bottom: 0; }
  .security-table td::before {
    content: attr(data-label);
    position: absolute;
    top: 13px;
    left: 13px;
    width: 88px;
    color: var(--ns-muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  .audit-user { min-width: 0; }
  .audit-user strong { max-width: calc(100vw - 190px); white-space: normal; }
  .session-actions { flex-wrap: wrap; }
}

@media (max-width: 420px) {
  body.newson-app .logo.app-logo,
  body.newson-app .logo.app-logo img { width: 105px !important; max-width: 105px !important; }
  .security-table td { padding-left: 98px !important; }
  .security-table td::before { width: 75px; }
  body.newson-app .dashboard-hero { min-height: 355px; }
}

/* Interacciones sobrias: los iconos permanecen en su eje. */
body.newson-app #sidebar-menu > ul > li > a:hover,
body.newson-app #sidebar-menu > ul > li > a.active,
body.newson-app #sidebar-menu > ul > li.nav-active > a,
body.newson-app .module-launch-card:hover,
body.newson-app .dashboard-stat:hover { transform: none !important; }
body.newson-app .module-launch-card:hover .module-launch-icon,
body.newson-app #sidebar-menu a:hover > i { transform: none !important; }

@media (max-width: 860px) {
  body.newson-login-page .auth-shell {
    background: linear-gradient(145deg, var(--ns-plomo-950), var(--ns-plomo-800)) !important;
  }
  body.newson-login-page .auth-form-side {
    background: rgba(32,38,45,.30) !important;
  }
  body.newson-login-page .auth-card {
    border-color: rgba(255,255,255,.82) !important;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 0 28px 70px rgba(19,23,28,.30) !important;
  }
}
.ns-flash-error { border-left: 4px solid #b64b53; background: #fff7f7; }
.ns-flash-error > i { color: #b64b53; }

/* =========================================================
   CORRECCIÓN 2026-08-05 · MENÚ, PERMISOS E ICONOS DEL PANEL
   ========================================================= */
body.newson-app #sidebar-menu .has_sub > .submenu-list[hidden] {
  display: none !important;
}
body.newson-app #sidebar-menu .has_sub.is-open > .submenu-list {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  overflow: visible !important;
}
body.newson-app #sidebar-menu .submenu-trigger {
  cursor: pointer;
}
body.newson-app #sidebar-menu .has_sub.is-open > .submenu-trigger .menu-arrow {
  transform: rotate(90deg) !important;
}

body.newson-app .dashboard-stat {
  min-width: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 16px !important;
}
body.newson-app .dashboard-stat-icon {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  flex: 0 0 50px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
  transform: none !important;
  line-height: 1 !important;
}
body.newson-app .dashboard-stat-icon > i {
  width: 18px !important;
  height: 18px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  position: static !important;
  transform: none !important;
  font-size: 16px !important;
  line-height: 1 !important;
}
body.newson-app .dashboard-stat-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
body.newson-app .dashboard-stat-copy strong,
body.newson-app .dashboard-stat-copy span {
  margin: 0 !important;
  transform: none !important;
}
body.newson-app .dashboard-hero-actions .action-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
}
body.newson-app .dashboard-hero-actions .action-icon > i {
  margin: 0 !important;
  transform: none !important;
  line-height: 1 !important;
}

@media (max-width: 560px) {
  body.newson-app .dashboard-stat-grid {
    grid-template-columns: 1fr !important;
  }
  body.newson-app .dashboard-stat {
    min-height: 92px !important;
    padding: 18px !important;
  }
}

/* Auditoría documental detallada */
.audit-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.audit-filter-grid-extended {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.audit-resource {
  min-width: 210px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.audit-resource > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--ns-orange-dark);
  background: #fff2d8;
}
.audit-resource strong,
.audit-resource small {
  display: block;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-path {
  max-width: 300px;
  margin-top: 7px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ns-plomo-700);
  background: var(--ns-gray-150);
}
.audit-no-resource {
  color: var(--ns-muted);
  font-size: 11px;
}

@media (max-width: 1499px) {
  .audit-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .audit-filter-grid-extended { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .audit-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filter-grid-extended { grid-template-columns: 1fr; }
  .audit-filter-grid-extended .ns-field-wide,
  .audit-filter-grid-extended .filter-actions { grid-column: auto; }
  .audit-resource { min-width: 0; }
  .audit-resource strong,
  .audit-resource small,
  .audit-path { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  .audit-summary-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   Gestión de usuarios: renderizado nativo y resistente a fallos JS
   ================================================================ */
.users-management-card { overflow: hidden; }
.users-management-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
}
.users-header-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.users-management-body { padding: 0 !important; }
.ns-btn {
  min-height: 42px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.ns-btn:hover { transform: translateY(-1px); }
.ns-btn-primary {
  color: #20262d !important;
  background: linear-gradient(135deg, #ffb629, #f5a000);
  box-shadow: 0 10px 22px rgba(245,160,0,.18);
}
.ns-btn-secondary { color: #2b323a !important; border-color: #d8dde3; background: #fff; }
.ns-btn-ghost { color: #5c6672 !important; border-color: #e1e5e9; background: #f7f8f9; }
.users-filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(180px, .7fr) minmax(150px, .55fr) auto;
  gap: 14px;
  align-items: end;
  padding: 20px 24px;
  border-top: 1px solid #edf0f2;
  border-bottom: 1px solid #edf0f2;
  background: #fafbfc;
}
.users-filter-form label,
.form-field label {
  display: block;
  margin: 0 0 7px;
  color: #39424c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}
.users-filter-form input,
.users-filter-form select,
.form-field input,
.form-field select {
  width: 100%;
  min-height: 43px;
  padding: 9px 12px;
  border: 1px solid #d8dde3;
  border-radius: 11px;
  color: #20262d;
  background: #fff;
  font-size: 13px;
  outline: none;
}
.users-filter-form input:focus,
.users-filter-form select:focus,
.form-field input:focus,
.form-field select:focus {
  border-color: #f5a000;
  box-shadow: 0 0 0 3px rgba(245,160,0,.12);
}
.ns-input-icon { position: relative; }
.ns-input-icon > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9aa3ad; }
.ns-input-icon input { padding-left: 37px; }
.users-filter-actions { display: flex; gap: 8px; }
.users-results-summary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 16px 24px;
  color: #69737e;
  font-size: 12px;
}
.users-results-summary strong { color: #20262d; font-size: 18px; }
.users-table-wrap { width: 100%; overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.users-table th {
  padding: 13px 18px;
  text-align: left;
  color: #56616d;
  background: #f2f4f6;
  border-top: 1px solid #e3e7ea;
  border-bottom: 1px solid #e3e7ea;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.users-table td { padding: 14px 18px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
.users-table tbody tr:hover { background: #fffaf0; }
.user-cell { display: flex; align-items: center; gap: 12px; min-width: 270px; }
.user-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245,160,0,.45);
  border-radius: 50%;
  color: #bd7300;
  background: #fff5df;
  font-size: 11px;
  font-weight: 900;
}
.user-cell strong { display: block; color: #20262d; font-size: 12px; line-height: 1.35; }
.user-cell a { display: block; margin-top: 4px; color: #75808b; font-size: 11px; overflow-wrap: anywhere; }
.user-profile-pill {
  display: inline-flex;
  max-width: 220px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #44505c;
  background: #edf1f4;
  font-size: 10px;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.user-position strong { display: block; color: #39424c; font-size: 11px; }
.user-position span { display: block; margin-top: 4px; color: #87909a; font-size: 10px; }
.user-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.user-status i { font-size: 7px; }
.user-status.is-enabled { color: #08765a; background: #e4f6f0; }
.user-status.is-disabled { color: #a14141; background: #fdecec; }
.users-actions-column { text-align: right !important; }
.users-row-actions { display: flex; justify-content: flex-end; gap: 7px; }
.inline-action-form { display: inline-flex; margin: 0; }
.icon-action {
  width: 37px;
  height: 37px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #dfe4e8;
  border-radius: 10px;
  color: #596572;
  background: #fff;
  cursor: pointer;
}
.icon-action:hover { color: #b76f00; border-color: #f5b73f; background: #fff8e9; }
.icon-action.is-danger:hover { color: #b73434; border-color: #efb7b7; background: #fff1f1; }
.users-empty-state { padding: 54px 20px; text-align: center; color: #79838d; }
.users-empty-state i { margin-bottom: 14px; color: #f5a000; font-size: 34px; }
.users-empty-state h3 { margin: 0 0 6px; color: #20262d; font-size: 17px; }
.users-empty-state p { margin: 0; }
.users-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 20px; }
.users-pagination a,
.users-pagination > span:not(.users-page-current) { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #dfe4e8; border-radius: 10px; color: #48535f; background: #fff; }
.users-pagination .is-disabled { opacity: .4; }
.users-page-current { color: #64707b; font-size: 11px; font-weight: 700; }
.ns-modal-content { border: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 25px 70px rgba(32,38,45,.22); }
.ns-modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 23px; border-bottom: 1px solid #edf0f2; background: #fff; }
.ns-modal-header .close { margin-top: 0; }
.ns-modal-kicker { display: block; margin-bottom: 4px; color: #d58200; font-size: 9px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.ns-modal-header h4 { color: #20262d; font-size: 19px; font-weight: 900; }
.ns-modal-body { padding: 23px; }
.ns-modal-footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 23px; border-top: 1px solid #edf0f2; background: #fafbfc; }
.user-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-field-wide { grid-column: 1 / -1; }
.form-field small { display: block; margin-top: 6px; color: #818a94; font-size: 10px; }
.form-field select[multiple] { min-height: 220px; padding: 8px; }
.credentials-explanation { margin: 0 0 18px; padding: 13px 15px; border-left: 3px solid #f5a000; border-radius: 9px; color: #5f6974; background: #fff8e9; font-size: 12px; line-height: 1.55; }

@media (max-width: 1050px) {
  .users-filter-form { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .users-filter-actions { align-self: end; }
}
@media (max-width: 767px) {
  .users-management-header { align-items: stretch; flex-direction: column; padding: 19px; }
  .users-header-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .users-filter-form { grid-template-columns: 1fr; padding: 17px; }
  .users-filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .users-results-summary { padding: 14px 17px; }
  .users-table { min-width: 0; }
  .users-table thead { display: none; }
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; width: 100%; }
  .users-table tr { padding: 14px 16px; border-top: 1px solid #edf0f2; }
  .users-table td { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 12px; padding: 8px 0; border: 0; text-align: left !important; }
  .users-table td::before { content: attr(data-label); color: #8a939d; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
  .user-cell { min-width: 0; }
  .users-row-actions { justify-content: flex-start; }
  .user-form-grid { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
}
@media (max-width: 430px) {
  .users-header-actions { grid-template-columns: 1fr; }
  .users-table td { grid-template-columns: 86px minmax(0,1fr); }
}

/* =========================================================
   NEWSON 2.9 · FIX VISOR DOCUMENTAL
   Evita que nombres extensos y contadores del panel de carpetas
   invadan el área de documentos. Todos los estilos están
   limitados al visor para no alterar otros módulos.
   ========================================================= */
body.newson-app.document-viewer-page .document-hub {
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr) !important;
  isolation: isolate;
}

body.newson-app.document-viewer-page .folder-panel,
body.newson-app.document-viewer-page .document-workspace,
body.newson-app.document-viewer-page .folder-list,
body.newson-app.document-viewer-page .folder-subsection,
body.newson-app.document-viewer-page .folder-nav-item,
body.newson-app.document-viewer-page .folder-nav-copy,
body.newson-app.document-viewer-page .document-location,
body.newson-app.document-viewer-page .document-section-title,
body.newson-app.document-viewer-page .subfolder-card,
body.newson-app.document-viewer-page .subfolder-card-copy,
body.newson-app.document-viewer-page .file-card,
body.newson-app.document-viewer-page .file-card-body {
  min-width: 0 !important;
}

body.newson-app.document-viewer-page .folder-panel {
  width: 100% !important;
  max-width: 300px !important;
  overflow-x: hidden !important;
}

body.newson-app.document-viewer-page .folder-list,
body.newson-app.document-viewer-page .folder-subsection {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body.newson-app.document-viewer-page .folder-nav-item {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

body.newson-app.document-viewer-page .folder-nav-copy {
  flex: 1 1 0 !important;
  width: 0 !important;
  overflow: hidden !important;
}

body.newson-app.document-viewer-page .folder-nav-name {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.newson-app.document-viewer-page .folder-nav-count {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 0 0 auto !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  max-width: 58px !important;
  min-height: 28px !important;
  padding: 4px 8px !important;
  overflow: hidden !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  z-index: 1 !important;
}

body.newson-app.document-viewer-page .document-workspace {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body.newson-app.document-viewer-page .document-breadcrumb,
body.newson-app.document-viewer-page .document-hero-row,
body.newson-app.document-viewer-page .document-section-head,
body.newson-app.document-viewer-page .subfolder-grid,
body.newson-app.document-viewer-page .file-grid {
  min-width: 0 !important;
  max-width: 100% !important;
}

body.newson-app.document-viewer-page .result-pill {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin-left: auto !important;
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
}

body.newson-app.document-viewer-page .subfolder-card,
body.newson-app.document-viewer-page .file-card {
  max-width: 100% !important;
  overflow: hidden !important;
}

/* Tarjetas documentales corporativas con identidad visual NEWSON. */
body.newson-app.document-viewer-page .file-card {
  position: relative;
  border: 1px solid #e0e4e7 !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, #fff 0%, #fcfcfc 100%) !important;
  box-shadow: 0 12px 32px rgba(31,38,45,.07) !important;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease !important;
}
body.newson-app.document-viewer-page .file-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 18px 42px rgba(31,38,45,.12) !important;
}
body.newson-app.document-viewer-page .file-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #606b76;
}
body.newson-app.document-viewer-page .file-card-pdf::before { background: #f5a000; }
body.newson-app.document-viewer-page .file-card-doc::before { background: #2f69b1; }
body.newson-app.document-viewer-page .file-card-xls::before { background: #27845b; }
body.newson-app.document-viewer-page .file-card-ppt::before { background: #c95a32; }
body.newson-app.document-viewer-page .file-card-brand {
  min-height: 46px;
  padding: 10px 15px 7px 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eef0f2;
}
body.newson-app.document-viewer-page .file-card-brand img {
  width: 88px;
  height: 25px;
  object-fit: contain;
  object-position: left center;
}
body.newson-app.document-viewer-page .file-extension-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: #59636e;
  background: #f0f2f4;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
}
body.newson-app.document-viewer-page .file-card-body { padding-top: 16px !important; }
body.newson-app.document-viewer-page .file-card-presentation { display: flex; align-items: center; gap: 12px; }
body.newson-app.document-viewer-page .file-card-presentation .file-type-icon { width: 46px; height: 46px; margin: 0; border-radius: 13px; font-size: 17px; }
body.newson-app.document-viewer-page .file-type-copy { min-width: 0; }
body.newson-app.document-viewer-page .file-type-copy strong,
body.newson-app.document-viewer-page .file-type-copy span { display: block; }
body.newson-app.document-viewer-page .file-type-copy strong { color: #303943; font-size: 11px; font-weight: 900; letter-spacing: .06em; }
body.newson-app.document-viewer-page .file-type-copy span { margin-top: 3px; color: #929aa2; font-size: 9px; }
body.newson-app.document-viewer-page .file-card-name { min-height: 57px !important; margin-top: 15px !important; color: #20262d !important; font-size: 13px !important; line-height: 1.45 !important; }
body.newson-app.document-viewer-page .file-card-meta { padding-top: 10px; border-top: 1px dashed #e3e6e8; }
body.newson-app.document-viewer-page .file-card-actions { justify-content: flex-end !important; padding-left: 17px !important; }
body.newson-app.document-viewer-page .file-permission-label { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; color: #727c86; font-size: 9px; font-weight: 800; }
body.newson-app.document-viewer-page .file-card.is-view-only .file-permission-label { color: #9a6200; }

body.newson-app.document-viewer-page .subfolder-card-name,
body.newson-app.document-viewer-page .file-card-name,
body.newson-app.document-viewer-page .file-card-path {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Pantallas intermedias: mantiene una columna lateral proporcionada. */
@media (max-width: 1199px) and (min-width: 992px) {
  body.newson-app.document-viewer-page .document-hub {
    grid-template-columns: minmax(0, 276px) minmax(0, 1fr) !important;
  }
  body.newson-app.document-viewer-page .folder-panel {
    max-width: 276px !important;
  }
}

/* En móvil el panel vuelve a funcionar como drawer y no queda limitado a 300 px. */
@media (max-width: 991px) {
  body.newson-app.document-viewer-page .document-hub {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.newson-app.document-viewer-page .folder-panel {
    width: min(330px, 88vw) !important;
    max-width: min(330px, 88vw) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}

@media (max-width: 420px) {
  body.newson-app.document-viewer-page .folder-panel {
    width: 92vw !important;
    max-width: 92vw !important;
  }
}

/* =========================================================
   NEWSON 2.9 · LOGIN: mensaje único de credenciales
   ========================================================= */
body.newson-login-page .auth-login-error {
  margin: -8px 0 20px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(190, 64, 64, .22);
  border-left: 4px solid #d95050;
  border-radius: 13px;
  color: #963535;
  background: #fff5f4;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
}
body.newson-login-page .auth-login-error i {
  margin-top: 2px;
  flex: 0 0 auto;
  color: #d95050;
}
