/* NovaCore 10.0.0 · Fase 45 · Rediseño Visual Enterprise
   Capa visual transversal. No modifica contratos funcionales. */

:root {
  --navy: #07111f;
  --navy-2: #0d1a2f;
  --navy-3: #13233c;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-tint: #f2f5ff;
  --canvas: #f4f6fa;
  --border: #e4e9f1;
  --border-strong: #d4dce8;
  --text: #334155;
  --text-strong: #101828;
  --muted: #667085;
  --muted-soft: #98a2b3;
  --primary: #3530f2;
  --primary-dark: #2823c9;
  --primary-soft: #eeefff;
  --cyan: #00affb;
  --cyan-soft: #e7f8ff;
  --green: #168a5b;
  --amber: #c86c08;
  --red: #d92d3a;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .035);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .055);
  --shadow: 0 16px 42px rgba(15, 23, 42, .075);
  --shadow-lg: 0 26px 72px rgba(15, 23, 42, .14);
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --focus-ring: 0 0 0 4px rgba(53, 48, 242, .14);
  --sidebar-width: 272px;
  --topbar-height: 76px;
  --content-max: 1640px;
}

html { background: var(--canvas); }
body {
  background:
    radial-gradient(circle at 83% 0%, rgba(0, 175, 251, .045), transparent 24rem),
    linear-gradient(180deg, #f7f9fc 0, var(--canvas) 38rem);
  color: var(--text);
}

.skip-link {
  position: fixed;
  z-index: 9999;
  top: .75rem;
  left: .75rem;
  transform: translateY(-180%);
  padding: .7rem 1rem;
  border-radius: 10px;
  background: #fff;
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 800;
  box-shadow: var(--shadow-lg);
}
.skip-link:focus { transform: translateY(0); }

/* Estructura principal */
.sidebar {
  width: var(--sidebar-width);
  padding: 1rem .78rem .8rem;
  background:
    radial-gradient(circle at 12% 1%, rgba(0, 175, 251, .13), transparent 15rem),
    radial-gradient(circle at 110% 28%, rgba(53, 48, 242, .16), transparent 18rem),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 58%, #0b172a 100%);
  border-right: 1px solid rgba(255,255,255,.055);
  box-shadow: 12px 0 40px rgba(7,17,31,.06);
}
.brand-sidebar {
  height: 64px;
  padding: .2rem .62rem 1rem;
  border-bottom-color: rgba(255,255,255,.075);
}
.brand-sidebar img { width: 188px; max-height: 47px; }
.brand-compact { width: 40px !important; height: 40px; }
.nav-list {
  gap: .16rem;
  margin-top: .65rem;
  padding-right: .12rem;
}
.nav-list::-webkit-scrollbar { width: 5px; }
.nav-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 999px; }
.nav-section {
  margin: 1.05rem .7rem .32rem;
  color: #70809b;
  font-size: .59rem;
  font-weight: 850;
  letter-spacing: .145em;
}
.nav-section-first { margin-top: .72rem; }
.nav-item {
  min-height: 42px;
  grid-template-columns: 31px 1fr auto;
  gap: .46rem;
  padding: .55rem .67rem;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #b9c6db;
  font-size: .79rem;
  font-weight: 690;
  letter-spacing: -.005em;
}
.nav-icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  color: #91a3c1;
  background: rgba(255,255,255,.025);
}
.nav-item:hover {
  transform: none;
  border-color: rgba(255,255,255,.055);
  background: rgba(255,255,255,.055);
  color: #fff;
}
.nav-item:hover .nav-icon { color: #dce7fa; background: rgba(255,255,255,.055); }
.nav-item.active {
  border-color: rgba(125,132,255,.28);
  background: linear-gradient(135deg, rgba(53,48,242,.96), rgba(61,76,221,.9));
  box-shadow: 0 10px 24px rgba(22, 22, 121, .28), inset 0 1px rgba(255,255,255,.12);
}
.nav-item.active::before {
  left: -7px;
  width: 3px;
  height: 20px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0,175,251,.55);
}
.nav-item.active .nav-icon { color: #fff; background: rgba(255,255,255,.11); }
.nav-count {
  min-width: 20px;
  height: 20px;
  padding: 0 .32rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: .55rem;
}
.sidebar-user {
  min-height: 60px;
  margin-top: auto;
  padding: .78rem .55rem .18rem;
  border-top-color: rgba(255,255,255,.08);
  border-radius: 12px;
  color: #fff;
  transition: background .16s ease;
}
.sidebar-user:hover { background: rgba(255,255,255,.045); }
.sidebar-user-copy strong { font-size: .73rem; }
.sidebar-user-copy span { font-size: .6rem; color: #8393ae; }
.sidebar-user-chevron { margin-left: auto; color: #6f819f; display: grid; }
body.sidebar-collapsed .sidebar-user-chevron { display: none; }

.topbar {
  left: var(--sidebar-width);
  height: var(--topbar-height);
  padding: 0 clamp(1rem, 2.3vw, 2rem);
  background: rgba(255,255,255,.91);
  backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(218,225,235,.88);
  box-shadow: 0 1px 0 rgba(255,255,255,.8);
}
.menu-button {
  width: 38px;
  height: 38px;
  margin-right: .82rem;
  border-color: var(--border);
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.topbar-context { min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.topbar-title { color: var(--text-strong); font-size: .9rem; font-weight: 850; }
.topbar-organization {
  max-width: 320px;
  overflow: hidden;
  color: var(--muted);
  font-size: .63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-actions { gap: .56rem; }
.topbar .icon-button {
  width: 38px;
  height: 38px;
  border-color: transparent;
  color: #475467;
}
.topbar .icon-button:hover,
.topbar .icon-button.active {
  border-color: #dce3ed;
  background: #f8faff;
  color: var(--primary);
}
.enterprise-profile-trigger {
  min-height: 44px;
  max-width: 230px;
  padding: .26rem .4rem .26rem .3rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.enterprise-profile-trigger:hover,
.enterprise-profile-trigger.active { border-color: #cfd7e5; background: var(--surface-soft); }
.enterprise-profile-trigger .avatar { width: 34px; height: 34px; font-size: .68rem; }
.profile-trigger-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; text-align: left; }
.profile-trigger-copy strong,
.profile-trigger-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-trigger-copy strong { color: var(--text-strong); font-size: .7rem; }
.profile-trigger-copy small { color: var(--muted); font-size: .55rem; }
.profile-popover-head small { display: block; margin-top: .12rem; color: var(--primary); font-size: .55rem; font-weight: 750; }

.main-content {
  margin-left: var(--sidebar-width);
  padding: calc(var(--topbar-height) + 1.65rem) clamp(1rem,2.3vw,2rem) 5rem;
}
.main-content:focus { box-shadow: none; }
.page-stack { gap: 1.15rem; }

/* Componentes globales */
h1 { font-size: clamp(1.62rem, 2.3vw, 2.35rem); letter-spacing: -.04em; }
h2 { font-size: 1.04rem; }
.eyebrow {
  gap: .34rem;
  margin-bottom: .55rem;
  color: #a8bbd8;
  font-size: .59rem;
  letter-spacing: .135em;
}
.eyebrow.dark { color: var(--primary); }
.panel,
.panel-card,
.form-card,
.stat-card,
.module-card,
.admin-menu-card {
  border-color: var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.97);
  box-shadow: var(--shadow-xs);
}
.panel:hover,
.panel-card:hover { border-color: #d9e1ec; }
.panel-heading,
.panel-card-header {
  border-bottom-color: #edf0f5;
}
.panel-heading h2,
.panel-card-header h2 { color: var(--text-strong); }
.panel-heading p,
.panel-card-header p { color: var(--muted); }
.page-header,
.page-hero {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 5%, rgba(0,175,251,.08), transparent 17rem),
    linear-gradient(135deg, #fff 0%, #fafbff 100%);
  box-shadow: var(--shadow-xs);
}
.hero-symbol {
  background: linear-gradient(145deg, var(--primary), #554ff8);
  box-shadow: 0 12px 30px rgba(53,48,242,.18);
}
.button {
  min-height: 40px;
  border-radius: 10px;
  padding: .63rem .92rem;
  font-size: .75rem;
  font-weight: 800;
}
.button-primary {
  background: linear-gradient(135deg, var(--primary), #4641f6);
  box-shadow: 0 8px 19px rgba(53,48,242,.19);
}
.button-primary:hover { box-shadow: 0 11px 25px rgba(53,48,242,.26); }
.button-secondary { background: var(--primary-soft); border-color: #dcdfff; }
.button-outline { border-color: var(--border-strong); background: #fff; }
.button-glass {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.11);
  color: #fff;
  backdrop-filter: blur(10px);
}
.button-glass:hover { background: rgba(255,255,255,.18); }
.icon-button { border-radius: 10px; }
.status-pill,
.status-chip,
.badge,
.ticket-status,
.ticket-priority { border-radius: 999px; }

.stat-grid { gap: .85rem; }
.stat-card {
  min-height: 112px;
  padding: 1rem;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.stat-card:hover { transform: translateY(-2px); border-color: #d8e0eb; box-shadow: var(--shadow-sm); }
.stat-card small { color: var(--muted); font-size: .61rem; letter-spacing: .035em; text-transform: uppercase; }
.stat-card strong { color: var(--text-strong); font-size: 1.48rem; }
.stat-card p { margin: .14rem 0 0; font-size: .65rem; }
.stat-icon { border-radius: 13px; }

.form-label,
.field > span,
.field > label,
.field label { color: #344054; font-size: .68rem; }
.form-control,
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
  min-height: 43px;
  border-color: #d8e0eb;
  border-radius: 10px;
  background: #fff;
  font-size: .76rem;
}
.form-control:hover,
.field input:not([type="checkbox"]):not([type="radio"]):hover,
.field select:hover,
.field textarea:hover { border-color: #c8d2df; }
.form-control:focus,
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: #8e8af8; }
.form-actions { border-top-color: #edf0f5; }
.option-card { border-radius: 12px; }

.table-panel { border-radius: var(--radius-lg); overflow: hidden; }
.toolbar {
  padding: .85rem 1rem;
  border-bottom-color: var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #fafbfc;
}
table { min-width: 720px; }
th {
  padding: .68rem .9rem;
  background: #f8fafc;
  color: #667085;
  font-size: .59rem;
  letter-spacing: .08em;
}
td { padding: .78rem .9rem; border-bottom-color: #edf1f5; font-size: .72rem; }
tbody tr:hover td { background: #fafbff; }
.table-main { font-size: .74rem; font-weight: 720; }
.table-subtitle { color: var(--muted); }
.action-menu > div { border-radius: 12px; }
.empty-state { padding: 2.2rem 1.25rem; }
.empty-state > span:first-child { border-radius: 14px; }

.notification-popover,
.profile-popover {
  border-color: #dce3ec;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15,23,42,.18);
}
.notification-popover-head,
.profile-popover-head { background: linear-gradient(180deg,#fff,#fbfcff); }
.notification-popover-item:hover,
.profile-popover > a:hover,
.profile-popover form button:hover { background: #f7f8ff; }

/* Inicio Enterprise */
.enterprise-dashboard { gap: 1rem; }
.enterprise-welcome {
  position: relative;
  min-height: 235px;
  overflow: hidden;
  padding: clamp(1.5rem,3vw,2.35rem);
  display: grid;
  grid-template-columns: minmax(0,1fr) 240px;
  align-items: center;
  gap: 1.5rem;
  border: 1px solid rgba(85,105,255,.18);
  border-radius: 26px;
  background:
    radial-gradient(circle at 82% 20%, rgba(0,175,251,.32), transparent 16rem),
    radial-gradient(circle at 46% 130%, rgba(75,69,255,.34), transparent 25rem),
    linear-gradient(125deg, #0c1830 0%, #18285a 53%, #302dc6 100%);
  box-shadow: 0 24px 60px rgba(17,30,69,.18);
  color: #fff;
}
.enterprise-welcome-copy { position: relative; z-index: 2; max-width: 760px; }
.enterprise-welcome .eyebrow { color: #9ddfff; }
.enterprise-welcome h1 { margin-bottom: .55rem; color: #fff; font-size: clamp(1.9rem,3.5vw,3rem); }
.enterprise-welcome p { max-width: 620px; margin-bottom: 1.25rem; color: #c4d0e7; font-size: .88rem; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.welcome-status-card {
  position: relative;
  z-index: 2;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 17px;
  background: rgba(7,17,31,.28);
  backdrop-filter: blur(12px);
}
.welcome-status-label { display: block; color: #aebbd4; font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.welcome-status-card strong { display: flex; align-items: center; gap: .55rem; margin: .5rem 0 .32rem; color: #fff; font-size: 1rem; }
.welcome-status-card small { color: #aebbd4; font-size: .62rem; line-height: 1.5; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(59,207,147,.12); }
.status-dot.status-busy { background: #ff6773; box-shadow: 0 0 0 5px rgba(255,103,115,.12); }
.status-dot.status-away { background: #ffb24b; box-shadow: 0 0 0 5px rgba(255,178,75,.12); }
.status-dot.status-offline { background: #98a2b3; box-shadow: none; }
.welcome-orbit { position: absolute; right: -90px; top: -110px; width: 410px; height: 410px; opacity: .2; }
.welcome-orbit span,
.welcome-orbit i { position: absolute; inset: 50%; border: 1px solid rgba(255,255,255,.72); border-radius: 50%; transform: translate(-50%,-50%); }
.welcome-orbit span { width: 120px; height: 120px; border-width: 22px; border-color: rgba(0,175,251,.72); }
.welcome-orbit i:nth-child(2) { width: 230px; height: 230px; }
.welcome-orbit i:nth-child(3) { width: 330px; height: 330px; }
.welcome-orbit i:nth-child(4) { width: 410px; height: 410px; }
.enterprise-stat-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.dashboard-enterprise-grid { display: grid; grid-template-columns: minmax(0,1fr) 315px; gap: 1rem; align-items: start; }
.dashboard-modules-section {
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.85);
  box-shadow: var(--shadow-xs);
}
.enterprise-section-heading { margin-bottom: .95rem; }
.enterprise-section-heading h2 { margin: 0 0 .25rem; font-size: 1.12rem; }
.enterprise-section-heading p { margin: 0; font-size: .7rem; }
.enterprise-module-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.enterprise-module-card {
  min-width: 0;
  min-height: 94px;
  padding: .85rem;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  align-items: center;
  gap: .75rem;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.enterprise-module-card:hover { transform: translateY(-2px); border-color: #cfd8e5; box-shadow: var(--shadow-sm); }
.enterprise-module-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; color: var(--module-color,#3530f2); background: var(--module-soft,#eeefff); }
.enterprise-module-card strong { display: block; color: var(--text-strong); font-size: .78rem; }
.enterprise-module-card p { margin: .25rem 0 0; color: var(--muted); font-size: .63rem; line-height: 1.4; }
.enterprise-module-card > b { color: #98a2b3; font-size: .9rem; transition: transform .18s ease, color .18s ease; }
.enterprise-module-card:hover > b { transform: translateX(3px); color: var(--module-color,var(--primary)); }
.tone-indigo { --module-color:#3530f2; --module-soft:#eeefff; }
.tone-sky { --module-color:#087fb4; --module-soft:#e7f7ff; }
.tone-violet { --module-color:#7445c7; --module-soft:#f4edff; }
.tone-green { --module-color:#087a52; --module-soft:#e9f8f1; }
.tone-orange { --module-color:#b45b08; --module-soft:#fff3e6; }
.tone-rose { --module-color:#c23b55; --module-soft:#fff0f3; }
.tone-slate { --module-color:#40546f; --module-soft:#edf2f7; }
.tone-cyan { --module-color:#047b92; --module-soft:#e9fafd; }
.tone-ai { --module-color:#5a36c9; --module-soft:linear-gradient(135deg,#f1eeff,#e7f8ff); }
.tone-blue { --module-color:#245cbe; --module-soft:#eaf2ff; }
.dashboard-enterprise-rail { position: sticky; top: calc(var(--topbar-height) + 1rem); }
.enterprise-quick-panel { padding: 1rem; }
.enterprise-quick-panel .panel-heading { padding: 0 0 .65rem; }
.enterprise-quick-panel .panel-heading p { font-size: .65rem; }
.enterprise-quick-panel > a { padding: .72rem .1rem; }
.enterprise-quick-panel > a span { display: flex; align-items: center; gap: .55rem; color: var(--text); }
.enterprise-quick-panel > a b { color: #98a2b3; }
.enterprise-quick-panel > a:hover b { color: var(--primary); }
.enterprise-activity-panel { padding: 1rem; }
.enterprise-activity-panel .panel-heading { padding: 0 0 .65rem; }
.text-link { color: var(--primary); font-size: .68rem; font-weight: 800; }

/* Acceso Enterprise */
.enterprise-login { min-height: 100vh; grid-template-columns: minmax(500px,1.15fr) minmax(420px,.85fr); }
.enterprise-login .login-brand-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem,4vw,4.2rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 90% 8%, rgba(0,175,251,.22), transparent 23rem),
    radial-gradient(circle at 12% 92%, rgba(53,48,242,.25), transparent 24rem),
    linear-gradient(145deg,#07111f 0%,#0d1b36 58%,#1c2568 100%);
}
.login-brand-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.enterprise-login .login-logo { width: min(225px,48%); }
.login-version { padding: .38rem .62rem; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; color: #9eb0cb; font-size: .58rem; font-weight: 750; }
.enterprise-login .login-message { position: relative; z-index: 2; max-width: 690px; margin-block: auto; padding-block: 4rem; }
.enterprise-login .login-message h1 { max-width: 670px; margin-bottom: 1.25rem; font-size: clamp(2.6rem,5.2vw,5rem); }
.enterprise-login .login-message h1 em { background: linear-gradient(90deg,#70d8ff,#9fa2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.enterprise-login .login-message p { max-width: 560px; color: #b6c2d7; font-size: .96rem; }
.login-capabilities { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; }
.login-capabilities span { padding: .5rem .68rem; display: inline-flex; align-items: center; gap: .45rem; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; background: rgba(255,255,255,.055); color: #d7e0ef; font-size: .64rem; }
.login-trust { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: .7rem 1.2rem; color: #7385a2; font-size: .56rem; }
.login-trust span::before { content: "✓"; margin-right: .35rem; color: #49cfa0; }
.enterprise-network { right: -110px; bottom: 4%; opacity: .18; }
.enterprise-login .login-form-panel { position: relative; min-height: 100vh; padding: clamp(1.5rem,4vw,4rem); background: #fff; }
.enterprise-login .login-card { width: min(430px,100%); padding: clamp(1.2rem,2vw,1.7rem); border: 1px solid var(--border); border-radius: 21px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.085); }
.login-card-head { margin-bottom: 1.4rem; }
.enterprise-login .login-card h2 { margin-bottom: .45rem; color: var(--text-strong); font-size: 1.65rem; }
.login-card-head p { margin: 0; font-size: .75rem; }
.login-submit { justify-content: space-between; min-height: 46px; padding-inline: 1rem; }
.enterprise-login .secure-note { display: flex; align-items: center; justify-content: center; gap: .4rem; }
.login-copyright { position: absolute; bottom: 1.25rem; margin: 0; color: #98a2b3; font-size: .58rem; }

/* Módulos específicos: coherencia visual sin cambiar comportamiento */
.chat-shell,
.meet-shell,
.calendar-shell,
.ai-shell { border-color: var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); }
.chat-sidebar,
.meet-sidebar { background: #fbfcfe; }
.chat-header,
.meet-header { border-bottom-color: var(--border); background: rgba(255,255,255,.94); }
.message-bubble { border-radius: 15px; }
.call-stage,
.meeting-stage { background: #070d18; }
.crm-nav,
.assets-nav { border-color: var(--border); background: #fff; box-shadow: var(--shadow-xs); }

/* Responsive */
@media (max-width: 1240px) {
  .enterprise-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-enterprise-grid { grid-template-columns: minmax(0,1fr) 285px; }
}

@media (max-width: 1000px) {
  .enterprise-profile-trigger { width: 42px; min-width: 42px; padding: .25rem; border-radius: 50%; }
  .enterprise-profile-trigger .avatar { width: 34px; height: 34px; }
  .profile-trigger-copy,
  .enterprise-profile-trigger > .ui-icon { display: none; }
  .dashboard-enterprise-grid { grid-template-columns: 1fr; }
  .dashboard-enterprise-rail { position: static; }
  .enterprise-login { grid-template-columns: 1fr; }
  .enterprise-login .login-brand-panel { display: none; }
}

@media (max-width: 900px) {
  :root { --topbar-height: 64px; }
  .sidebar { width: min(292px,86vw); }
  .topbar { left: 0; }
  .topbar-organization { max-width: 180px; }
  .main-content { margin-left: 0; padding-bottom: 6.2rem; }
  .mobile-nav {
    left: .75rem;
    right: .75rem;
    bottom: calc(.65rem + env(safe-area-inset-bottom));
    height: 66px;
    grid-template-columns: repeat(5,1fr) !important;
    padding: .28rem;
    border-color: #dbe2ec;
    border-radius: 19px;
    background: rgba(255,255,255,.96);
  }
  .mobile-nav a,
  .mobile-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .12rem;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: #667085;
    font-size: .56rem;
  }
  .mobile-nav a span,
  .mobile-nav button span { display: grid; place-items: center; }
  .mobile-nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 800; }
  .mobile-nav b { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 16px; height: 16px; display: grid; place-items: center; border-radius: 999px; background: var(--red); color: #fff; font-size: .48rem; }
  .enterprise-login .login-form-panel { padding-bottom: 4rem; }
}

@media (max-width: 720px) {
  .enterprise-welcome { min-height: auto; grid-template-columns: 1fr; padding: 1.35rem; border-radius: 21px; }
  .enterprise-welcome h1 { font-size: 1.85rem; }
  .welcome-status-card { max-width: 320px; }
  .enterprise-stat-grid { grid-template-columns: 1fr 1fr; }
  .enterprise-module-grid { grid-template-columns: 1fr; }
  .dashboard-modules-section { padding: .9rem; border-radius: 19px; }
  .enterprise-module-card { min-height: 88px; }
  .login-copyright { bottom: .8rem; }
}

@media (max-width: 560px) {
  .topbar-context { max-width: 42vw; }
  .topbar-title { font-size: .78rem; }
  .topbar-organization { display: none; }
  .topbar-actions { gap: .2rem; }
  .topbar .icon-button { width: 35px; height: 35px; }
  .enterprise-stat-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 96px; }
  .enterprise-welcome p { font-size: .76rem; }
  .welcome-actions .button { flex: 1 1 100%; }
  .enterprise-login .login-card { padding: 1.05rem; border: 0; box-shadow: none; }
  .enterprise-login .login-form-panel { padding: 1.15rem; }
  .enterprise-login .login-mobile-logo { width: 190px; }
}

@media (prefers-contrast: more) {
  :root { --border:#c8d0dc; --text:#243044; --muted:#4c5b70; }
  .panel,.panel-card,.stat-card,.enterprise-module-card { border-width: 2px; }
}

@media print {
  .sidebar,.topbar,.mobile-nav,.sidebar-backdrop,.page-actions,.button,.icon-button { display: none !important; }
  .main-content { margin: 0; padding: 0; }
  body { background: #fff; }
  .panel,.panel-card,.stat-card { box-shadow: none; break-inside: avoid; }
}

/* NovaCore 12.0.0 · Fase 46 Hotfix2 · Gestión Empresarial */
.enterprise-management-page{--management-accent:#5f63e9}.enterprise-management-hero{overflow:hidden;position:relative;background:linear-gradient(135deg,#f7f7ff 0%,#eef8ff 55%,#f8fbff 100%);border:1px solid #dfe4f0}.enterprise-management-hero:after{content:"";position:absolute;right:-70px;top:-90px;width:280px;height:280px;border:45px solid rgba(95,99,233,.08);border-radius:50%}.enterprise-management-hero .page-hero-copy,.enterprise-management-hero .phase-badge{position:relative;z-index:1}.enterprise-tabs{display:flex;gap:.4rem;overflow:auto;padding:.25rem;border:1px solid var(--border);border-radius:14px;background:#fff}.enterprise-tabs a{padding:.65rem .9rem;border-radius:10px;color:var(--muted);font-size:.68rem;font-weight:800;text-decoration:none;white-space:nowrap}.enterprise-tabs a:hover,.enterprise-tabs a.active{background:#eef0ff;color:#4a4fd5}.enterprise-management-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}.enterprise-management-kpis.compact{grid-template-columns:repeat(4,minmax(0,1fr))}.enterprise-management-kpis article{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.75rem;min-height:96px;padding:1rem;border:1px solid var(--border);border-radius:16px;background:#fff;box-shadow:0 10px 28px rgba(30,41,59,.05)}.enterprise-management-kpis article>span{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#eef0ff;color:#555be1}.enterprise-management-kpis article>div{display:grid;gap:.12rem}.enterprise-management-kpis strong{font-size:1.25rem;letter-spacing:-.03em}.enterprise-management-kpis small{color:var(--muted);font-size:.62rem}.enterprise-management-kpis article>b{align-self:end;color:#667085;font-size:.58rem;font-weight:800}.enterprise-management-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(310px,.75fr);gap:1rem}.enterprise-domain-panel,.enterprise-procurement-panel{padding:1rem}.enterprise-domain-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.enterprise-domain-grid>a{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.7rem;padding:.82rem;border:1px solid var(--border);border-radius:13px;background:#fbfcff;color:var(--text);text-decoration:none;transition:.18s ease}.enterprise-domain-grid>a:hover{transform:translateY(-2px);border-color:#bec4ff;box-shadow:0 10px 20px rgba(61,67,164,.08)}.enterprise-domain-grid>a>span{width:38px;height:38px;display:grid;place-items:center;border-radius:11px;background:#edf0ff;color:#5056d8}.enterprise-domain-grid>a>div{display:grid;gap:.14rem}.enterprise-domain-grid strong{font-size:.7rem}.enterprise-domain-grid small{color:var(--muted);font-size:.58rem;line-height:1.35}.enterprise-domain-grid b{color:#6a70e8}.enterprise-compact-list{display:grid;gap:.5rem}.enterprise-compact-list>a{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.72rem;border:1px solid var(--border);border-radius:11px;color:var(--text);text-decoration:none}.enterprise-compact-list>a>div{display:grid;gap:.13rem;min-width:0}.enterprise-compact-list strong{font-size:.66rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.enterprise-compact-list small{color:var(--muted);font-size:.56rem}.enterprise-document-strip{padding:1rem}.enterprise-document-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}.enterprise-document-list>a{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.65rem;padding:.7rem;border:1px solid var(--border);border-radius:11px;color:var(--text);text-decoration:none}.enterprise-document-list>a>span{min-width:40px;padding:.35rem;border-radius:8px;background:#edf7ff;color:#266591;text-align:center;font-size:.52rem;font-weight:900}.enterprise-document-list>a>div{display:grid;gap:.1rem;min-width:0}.enterprise-document-list strong{font-size:.64rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.enterprise-document-list small,.enterprise-document-list time{color:var(--muted);font-size:.54rem}.enterprise-purchase-form{max-width:980px}.enterprise-form-notice{padding:.85rem;border:1px solid #cfd3ff;border-radius:12px;background:#f4f5ff}.enterprise-form-notice strong{display:block;font-size:.68rem;color:#4147c6}.enterprise-form-notice p{margin:.2rem 0 0;color:#606a7b;font-size:.62rem}.table-actions{display:flex;gap:.35rem;justify-content:flex-end;flex-wrap:wrap}
@media(max-width:1100px){.enterprise-management-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.enterprise-management-grid{grid-template-columns:1fr}.enterprise-management-kpis.compact{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.enterprise-management-kpis,.enterprise-management-kpis.compact,.enterprise-domain-grid,.enterprise-document-list{grid-template-columns:1fr}.enterprise-management-kpis article{min-height:82px}.enterprise-tabs{border-radius:12px}.enterprise-management-hero .phase-badge{display:none}}

/* Fase 49 · Seguridad + SaaS */
.saas-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px}.saas-grid.two{grid-template-columns:repeat(auto-fit,minmax(320px,1fr))}.module-link{display:block;color:inherit;text-decoration:none;transition:transform .16s ease,border-color .16s ease}.module-link:hover{transform:translateY(-2px);border-color:var(--tenant-accent)}.brand-preview,.portal-hero{border-top:4px solid var(--tenant-accent);}.tenant-logo-preview{display:block;max-width:220px;max-height:80px;object-fit:contain;margin:16px 0}.mfa-qr{width:220px;height:220px;image-rendering:auto;background:#fff;padding:12px;border-radius:16px}.recovery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:20px 0}.recovery-grid code{padding:12px;border:1px solid var(--border);border-radius:10px;text-align:center}.auth-simple{min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--surface-soft)}.auth-narrow{width:min(100%,460px)}.portal-hero{padding:30px;border-radius:18px;background:linear-gradient(135deg,var(--surface),color-mix(in srgb,var(--tenant-accent) 10%,white));margin-bottom:20px}.list-row{display:grid;gap:3px;padding:12px 0;border-bottom:1px solid var(--border);color:inherit;text-decoration:none}.list-row:last-child{border-bottom:0}.tenant-brand-logo{object-fit:contain}.button-primary{background:var(--tenant-accent)}
