:root {
  --bg: #f5f7f6;
  --card: #ffffff;
  --ink: #17332e;
  --muted: #65746f;
  --line: #d7dfdc;
  --accent: #0b5640;
  --accent-2: #018d38;
  --gold: #b0942b;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; font-family: "Prompt", "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
.suite-body { min-height: 100vh; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.login-shell--public {
  grid-template-columns: minmax(280px, 460px);
  justify-content: center;
  align-content: center;
  padding: clamp(18px, 4vw, 54px);
  background:
    radial-gradient(800px 360px at 18% 16%, rgba(1, 141, 56, 0.13), transparent 58%),
    radial-gradient(700px 340px at 84% 86%, rgba(176, 148, 43, 0.14), transparent 62%),
    linear-gradient(135deg, #f6faf7 0%, #ffffff 50%, #edf5ea 100%);
}
.login-card, .frame-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(15, 36, 31, 0.08); }
.login-card { width: min(450px, 100%); padding: clamp(22px, 4vw, 32px); }
.login-shell--public .login-card {
  justify-self: center;
  border: 1px solid rgba(11, 86, 64, 0.14);
  box-shadow: 0 24px 52px rgba(15, 61, 26, 0.14);
  text-align: left;
}
.login-logo { display: block; width: min(250px, 82%); height: auto; margin: 0 auto 22px; }
.login-hero {
  width: 100%;
  min-height: min(680px, calc(100vh - 108px));
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(255,255,255,0.13), transparent 36%),
    linear-gradient(135deg, #0b5640 0%, #0f3d1a 54%, #018d38 100%);
  box-shadow: 0 24px 52px rgba(15, 61, 26, 0.20);
  position: relative;
  overflow: hidden;
}
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .55;
  pointer-events: none;
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}
.login-hero-brand img {
  width: min(220px, 38vw);
  max-width: 100%;
  height: auto;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 32px rgba(0,0,0,.16);
}
.login-hero-brand .eyebrow { color: rgba(255,255,255,.78); margin: 0 0 8px; }
.login-hero h1 {
  font-size: clamp(38px, 4.4vw, 54px);
  color: #fff;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.login-hero-lead {
  max-width: 760px;
  margin: 0;
  color: rgba(255,255,255,.88);
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.45;
}
.login-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.login-hero-metrics span,
.login-hero-modules span {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}
.login-hero-metrics span {
  display: grid;
  gap: 4px;
  padding: 15px 16px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.login-hero-metrics b {
  color: #f4d36f;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: 0;
}
.login-hero-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.login-hero-modules span {
  padding: 9px 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.eyebrow { margin: 0 0 8px; text-transform: uppercase; color: var(--gold); font-size: 12px; font-weight: 700; }
h1, h2 { margin: 0; line-height: 1.15; }
.muted { color: var(--muted); }
.compact-copy { margin: 0; font-size: 14px; line-height: 1.45; }
.stack { display: grid; gap: 12px; margin-top: 20px; }
.hidden { display: none !important; }
input, button { font: inherit; }
input { width: 100%; padding: 13px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; min-width: 0; }
select { width: 100%; padding: 13px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; min-width: 0; font: inherit; color: var(--ink); }
button { border: 0; border-radius: 8px; padding: 13px 14px; background: var(--accent); color: white; cursor: pointer; font-weight: 600; min-height: 46px; }
.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.danger { background: #a3342a; color: #fff; }
.menu-toggle-suite { display: none; background: #f3faf6; color: var(--accent); border: 1px solid var(--accent); min-height: 40px; padding: 9px 12px; }
.error-text { color: #b3261e; min-height: 20px; }
.success-text { color: #0b6b3a; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; gap: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.94); position: sticky; top: 0; z-index: 20; }
.brand-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-row img { width: 150px; height: auto; flex: 0 0 auto; }
.brand-row .brand-logo-ciaca { display: flex; align-items: center; gap: 10px; padding-left: 16px; margin-left: 2px; border-left: 1px solid var(--line); }
.brand-logo-ciaca .ciaca-map { width: auto; height: 58px; flex: 0 0 auto; }
.brand-logo-ciaca .ciaca-bar { width: 3px; align-self: stretch; margin: 4px 0; background: #1f8a3b; border-radius: 2px; flex: 0 0 auto; }
.brand-logo-ciaca .ciaca-text { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.brand-logo-ciaca .ciaca-title { font-weight: 800; color: #1f8a3b; font-size: 23px; letter-spacing: .4px; line-height: 1; }
.brand-logo-ciaca .ciaca-sub { font-size: 9px; font-weight: 600; color: #2f6b3a; line-height: 1.25; margin-top: 3px; letter-spacing: .1px; }
.brand-row h1 { font-size: clamp(26px, 4vw, 42px); }
.brand-row .suite-title-wrap { margin-left: clamp(16px, 3vw, 40px); }
.topbar-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
#welcomeText { overflow-wrap: anywhere; }
.suite-main { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 12px; min-height: calc(100vh - 78px); }
.module-rail { position: sticky; top: 90px; align-self: start; width: 48px; min-height: calc(100vh - 108px); border: 1px solid var(--line); border-left: 4px solid var(--accent); background: #fff; border-radius: 8px; box-shadow: 0 12px 32px rgba(15, 36, 31, 0.08); overflow: hidden; transition: width .22s ease; z-index: 12; }
.module-rail:hover, .module-rail:focus-within, .module-rail.open { width: min(320px, calc(100vw - 24px)); }
.rail-tab { position: absolute; inset: 0 auto 0 0; width: 44px; display: grid; place-items: center; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .18em; font-size: 11px; font-weight: 800; color: var(--accent); background: #f3faf6; border-right: 1px solid var(--line); }
.grid { display: grid; gap: 6px; align-content: start; }
.module-rail .grid { min-width: 252px; margin-left: 48px; padding: 10px; opacity: 0; transform: translateX(-10px); transition: opacity .16s ease, transform .16s ease; max-height: calc(100vh - 130px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.module-rail:hover .grid, .module-rail:focus-within .grid, .module-rail.open .grid { opacity: 1; transform: translateX(0); }
/* Cierre forzado desde el botón: anula la reapertura por :hover/:focus-within por 400ms */
.module-rail.force-close, .module-rail.force-close:hover, .module-rail.force-close:focus-within { width: 48px; }
.module-rail.force-close .grid, .module-rail.force-close:hover .grid, .module-rail.force-close:focus-within .grid { opacity: 0; transform: translateX(-10px); }
.module-card { border-radius: 8px; }
.module-link {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  font-weight: 700;
}
.module-link:hover { background: #f3faf6; border-color: #d7ebe2; }
.module-card.active > .module-link { background: var(--accent); color: #fff; border-color: var(--accent); }
.module-name-wrap { display: grid; gap: 4px; min-width: 0; }
.module-name { overflow-wrap: anywhere; line-height: 1.2; }
.module-status { width: fit-content; max-width: 100%; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.3; text-transform: uppercase; letter-spacing: 0; }
.module-status-active { color: #0b6b3a; background: #e2f3e9; }
.module-status-degraded { color: #7a5b00; background: #fff3cf; }
.module-status-down { color: #9f2d24; background: #ffe1dc; }
.module-card.active .module-status { background: rgba(255,255,255,0.18); color: #fff; }
.module-arrow { font-size: 22px; line-height: 1; opacity: .55; }
.module-card.active .module-arrow { opacity: .9; }
.module-home-card {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.module-home-card .module-link {
  background: #f3faf6;
  color: var(--accent);
}
.module-home-card .module-link:hover { background: #e8f4ee; border-color: #c9e5d8; }
.module-subnav { display: none; margin: 6px 0 4px 10px; padding: 2px 0 2px 10px; border-left: 2px solid #d7ebe2; gap: 4px; }
.module-card.active .module-subnav { display: grid; }
.module-subnav button {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 7px;
  text-align: left;
  font-size: 13px;
  font-weight: 650;
}
.module-subnav button:hover { background: #eef7f2; color: var(--accent); }
.module-subnav button.active { background: transparent; color: var(--accent); font-weight: 800; }
.module-subnav button.active::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 999px; background: var(--accent); vertical-align: middle; }
.frame-wrap { overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-height: calc(100vh - 100px); }
.frame-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.frame-head .ghost { min-height: 36px; padding: 8px 12px; white-space: nowrap; }
body.module-active .frame-head { display: none; }
body.module-active .frame-wrap { grid-template-rows: 1fr; border: 0; border-radius: 0; box-shadow: none; }
html:has(body.module-active) { height: 100%; overflow: hidden; }
body.module-active { overflow: hidden; height: 100svh; height: 100dvh; }
body.module-active > .topbar {
  position: fixed;
  inset: 0 0 auto;
  min-height: 0;
  padding: 8px 18px;
}
body.module-active .brand-row > img { width: 118px; }
body.module-active .brand-logo-ciaca .ciaca-map { height: 44px; }
body.module-active .brand-logo-ciaca .ciaca-title { font-size: 20px; }
body.module-active .brand-logo-ciaca .ciaca-sub { font-size: 8px; }
body.module-active .topbar-actions button { min-height: 38px; padding: 8px 12px; }
body.module-active .suite-main {
  position: fixed;
  inset: var(--topbar-h, 85px) 0 0 0;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
body.module-active .module-rail {
  top: 0;
  height: 100%;
  min-height: 0;
  border-radius: 0;
}
body.module-active .frame-wrap { height: 100%; min-height: 0; overflow: hidden; }
#moduleFrame { width: 100%; height: 100%; min-height: calc(100vh - 156px); border: 0; background: #060d07; }
body.module-active #moduleFrame { display: block; min-height: 0; height: 100%; }
.ciaca-intro { display: grid; align-content: center; justify-items: stretch; gap: 14px; min-height: calc(100vh - 156px); padding: clamp(24px, 4vw, 56px); text-align: center; background: linear-gradient(180deg, #ffffff 0%, #f4f8f6 100%); }
.ciaca-intro img { width: min(320px, 84%); height: auto; }
.ciaca-intro h2 { font-size: clamp(36px, 8vw, 84px); color: var(--accent); letter-spacing: 0; }
.ciaca-intro p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.55; font-size: clamp(15px, 2vw, 19px); }
.suite-hero {
  --suite-pointer-x: 50%;
  --suite-pointer-y: 42%;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 28px;
  align-items: center;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid rgba(11, 86, 64, 0.08);
  border-radius: 28px;
  background:
    radial-gradient(circle at var(--suite-pointer-x) var(--suite-pointer-y), rgba(2, 179, 68, 0.16), transparent 28%),
    radial-gradient(circle at 84% 14%, rgba(176, 148, 43, 0.18), transparent 23%),
    linear-gradient(135deg, #ffffff 0%, #f2f9f5 44%, #fbfdfc 100%);
  box-shadow: 0 24px 48px rgba(15, 36, 31, 0.08);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  justify-self: center;
}
.suite-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.72) 48%, rgba(255,255,255,0) 100%);
  transform: translateX(-55%);
  animation: suiteHeroSweep 8s ease-in-out infinite;
  pointer-events: none;
}
.suite-hero-copy {
  position: relative;
  z-index: 1;
  text-align: center;
  display: grid;
  justify-items: center;
}
.suite-hero-copy img { width: min(280px, 75%); margin-bottom: 8px; }
.suite-hero-lead {
  max-width: 56ch;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.7;
}
.suite-hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.suite-hero-pills span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(11, 86, 64, 0.12);
  color: #24493d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: capitalize;
}
.suite-hero-pills span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--gold));
  box-shadow: 0 0 0 5px rgba(2,179,68,.10);
}
.suite-hero-art {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  transform: translate3d(0,0,0);
}
.suite-hero-ring {
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(11, 86, 64, 0.12);
}
.suite-hero-ring--a { width: 318px; height: 318px; animation: suiteRingSpin 20s linear infinite; }
.suite-hero-ring--b { width: 252px; height: 252px; border-style: dashed; border-color: rgba(176,148,43,.26); animation: suiteRingSpinReverse 16s linear infinite; }
.suite-hero-ring--c { width: 182px; height: 182px; border-color: rgba(2,179,68,.24); animation: suiteRingPulse 5.8s ease-in-out infinite; }
.suite-hero-entity {
  position: relative;
  width: 236px;
  height: 236px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 24px 26px rgba(7, 35, 26, 0.18));
  transform: translate3d(calc((var(--suite-pointer-x) - 50%) / 16), calc((var(--suite-pointer-y) - 42%) / 20), 0);
  transition: transform 220ms ease-out;
}
.suite-hero-core {
  position: absolute;
  width: 88px;
  height: 88px;
  border-radius: 50% 44% 56% 42%;
  background: radial-gradient(circle at 35% 35%, #f6e2ad 0%, #dfbf55 24%, #0b5640 72%, #063a2c 100%);
  box-shadow: 0 0 0 10px rgba(2,179,68,.08), 0 0 38px rgba(2,179,68,.22);
  animation: suiteCoreFloat 4.8s ease-in-out infinite;
}
.suite-hero-wing, .suite-hero-tail {
  position: absolute;
  border-radius: 999px;
}
.suite-hero-wing {
  width: 122px;
  height: 50px;
  background: linear-gradient(90deg, rgba(2,179,68,0) 0%, rgba(2,179,68,.44) 42%, rgba(176,148,43,.92) 100%);
}
.suite-hero-wing--left {
  left: 15px;
  top: 72px;
  transform: rotate(-28deg);
  animation: suiteWingLeft 4.1s ease-in-out infinite;
}
.suite-hero-wing--right {
  right: 11px;
  top: 98px;
  width: 114px;
  background: linear-gradient(90deg, rgba(176,148,43,.95) 0%, rgba(2,179,68,.55) 56%, rgba(2,179,68,0) 100%);
  transform: rotate(28deg);
  animation: suiteWingRight 4.1s ease-in-out infinite;
}
.suite-hero-tail {
  width: 132px;
  height: 24px;
  left: 55px;
  bottom: 36px;
  background: linear-gradient(90deg, rgba(2,179,68,0), rgba(2,179,68,.68), rgba(255,255,255,0));
  transform: rotate(-26deg);
  opacity: .84;
  animation: suiteTailWave 4.8s ease-in-out infinite;
}
.suite-hero-spark {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f5d789;
  box-shadow: 0 0 16px rgba(245,215,137,.72);
}
.suite-hero-spark--a { top: 26px; right: 50px; animation: suiteSparkA 7s linear infinite; }
.suite-hero-spark--b { left: 34px; bottom: 66px; width: 8px; height: 8px; background: #02b344; box-shadow: 0 0 14px rgba(2,179,68,.66); animation: suiteSparkB 6s linear infinite; }
.suite-hero-spark--c { right: 24px; bottom: 24px; width: 7px; height: 7px; background: #0b5640; box-shadow: 0 0 12px rgba(11,86,64,.72); animation: suiteSparkC 8s linear infinite; }
.suite-hero-panel {
  position: absolute;
  right: 10px;
  bottom: 6px;
  min-width: 172px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(8, 41, 31, 0.9);
  color: #f8fbfa;
  box-shadow: 0 18px 35px rgba(5, 25, 19, 0.2);
  backdrop-filter: blur(10px);
  text-align: left;
}
.suite-hero-panel-label {
  display: block;
  color: rgba(245,215,137,.88);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.suite-hero-panel strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  letter-spacing: .04em;
}
.suite-hero-panel small {
  display: block;
  margin-top: 4px;
  color: rgba(232,242,237,.8);
  font-size: 12px;
}
.intro-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 18px;
  align-items: stretch;
}
.intro-actions button {
  position: relative;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(11, 86, 64, 0.18);
  background:
    linear-gradient(145deg, rgba(247, 252, 249, .98) 0%, rgba(222, 241, 231, .97) 48%, rgba(197, 227, 212, .96) 100%);
  color: #0b3e30;
  box-shadow:
    0 12px 26px rgba(11, 86, 64, 0.12),
    inset 0 1px 0 rgba(255,255,255,.9);
  overflow: hidden;
  isolation: isolate;
  text-transform: none;
  letter-spacing: .03em;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.2;
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    border-color .22s ease,
    color .22s ease,
    background .22s ease;
}
.intro-actions button::before,
.intro-actions button::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.intro-actions button::before {
  inset: 1px;
  border-radius: 13px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 34%, rgba(255,255,255,.44) 100%),
    radial-gradient(circle at 14% 18%, rgba(1, 141, 56, .18), transparent 34%);
  opacity: .9;
}
.intro-actions button::after {
  inset: auto -22% -55% 36%;
  height: 115%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(1, 141, 56, .28) 0%, rgba(1, 141, 56, 0) 68%);
  transform: translateY(22px) scale(.82);
  opacity: .72;
  transition: transform .22s ease, opacity .22s ease;
}
.intro-actions button:hover,
.intro-actions button:focus-visible {
  transform: translateY(-4px) scale(1.015);
  border-color: rgba(1, 141, 56, 0.48);
  color: #072f25;
  box-shadow:
    0 22px 42px rgba(8, 45, 34, 0.2),
    0 0 0 1px rgba(1, 141, 56, 0.22),
    0 0 26px rgba(1, 141, 56, 0.2);
  background:
    linear-gradient(145deg, rgba(248, 253, 249, .99) 0%, rgba(225, 246, 233, .99) 42%, rgba(187, 226, 205, .97) 100%);
}
.intro-actions button:hover::after,
.intro-actions button:focus-visible::after {
  transform: translateY(0) scale(1.08);
  opacity: 1;
}
.intro-actions button:focus-visible {
  outline: 0;
}
.intro-actions button:nth-child(3n + 1) {
  background:
    linear-gradient(145deg, rgba(246, 252, 248, .98) 0%, rgba(224, 242, 231, .97) 48%, rgba(188, 223, 204, .96) 100%);
}
.intro-actions button:nth-child(3n + 2) {
  background:
    linear-gradient(145deg, rgba(247, 252, 249, .98) 0%, rgba(220, 241, 228, .97) 48%, rgba(177, 217, 196, .96) 100%);
}
.intro-actions button:nth-child(3n) {
  background:
    linear-gradient(145deg, rgba(246, 251, 247, .98) 0%, rgba(215, 237, 223, .97) 46%, rgba(165, 209, 187, .96) 100%);
}
.intro-actions button:nth-child(3n)::after {
  background: radial-gradient(circle, rgba(11, 86, 64, .22) 0%, rgba(11, 86, 64, 0) 68%);
}
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(8, 30, 25, 0.45); }
.modal-card { width: min(430px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 20px 60px rgba(15, 36, 31, 0.18); padding: 18px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { font-size: 22px; }
.icon-button { width: 36px; min-height: 36px; padding: 0; display: inline-grid; place-items: center; background: #f3faf6; color: var(--accent); border: 1px solid var(--line); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }
.modal-actions button { min-width: 110px; }

@media (max-width: 960px) {
  .suite-main { grid-template-columns: 44px minmax(0, 1fr); }
  .module-link { min-height: 42px; }
  .suite-hero-copy { justify-items: center; }
}

@media (max-width: 680px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 10px 12px; gap: 10px; }
  .brand-row { gap: 10px; }
  .brand-row img { width: 104px; }
  .brand-row .brand-logo-ciaca { padding-left: 10px; gap: 7px; }
  .brand-logo-ciaca .ciaca-map { height: 40px; }
  .brand-logo-ciaca .ciaca-title { font-size: 17px; }
  .brand-logo-ciaca .ciaca-sub { font-size: 7px; }
  .brand-row h1 { font-size: 30px; line-height: 1.05; }
  .brand-row .suite-title-wrap { margin-left: 0; }
  .brand-row .eyebrow { font-size: 10px; margin-bottom: 4px; }
  .topbar-actions { width: 100%; justify-content: space-between; }
  .topbar-actions button { padding: 9px 10px; min-height: 40px; font-size: 13px; }
  #welcomeText { font-size: 13px; line-height: 1.2; }
  .menu-toggle-suite { display: inline-flex; align-items: center; justify-content: center; }
  .suite-main { padding: 10px; gap: 8px; grid-template-columns: 40px minmax(0, 1fr); }
  .module-rail { width: 40px; top: 126px; min-height: 66vh; }
  .module-rail:hover, .module-rail:focus-within, .module-rail.open { width: calc(100vw - 20px); }
  .rail-tab { width: 36px; }
  .module-rail .grid { margin-left: 40px; min-width: calc(100vw - 76px); overflow-y: auto; max-height: calc(100vh - 160px); }
  .module-link { min-height: 40px; padding: 9px 10px; }
  .module-subnav { margin-left: 8px; padding-left: 8px; }
  .frame-wrap { min-height: 66vh; }
  #moduleFrame, .ciaca-intro { min-height: 66vh; }
  .suite-hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px 16px;
    border-radius: 24px;
  }
  .suite-hero-copy { text-align: center; }
  .suite-hero-copy img { margin-inline: auto; width: min(220px, 78%); }
  .suite-hero-art { min-height: 278px; }
  .suite-hero-ring--a { width: 246px; height: 246px; }
  .suite-hero-ring--b { width: 194px; height: 194px; }
  .suite-hero-ring--c { width: 146px; height: 146px; }
  .suite-hero-entity { width: 194px; height: 194px; }
  .suite-hero-panel {
    right: 0;
    left: 0;
    bottom: 0;
    margin: 0 auto;
    max-width: 220px;
    min-width: 0;
    text-align: center;
  }
  .intro-actions {
    gap: 10px;
  }
  .intro-actions button {
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 11.5px;
  }
}

@media (max-width: 760px) {
  body.module-active { overflow: hidden; }
  body.module-active .suite-main { grid-template-columns: minmax(0, 1fr); }
  body.module-active .module-rail {
    position: fixed;
    top: calc(var(--topbar-h, 126px) + 8px);
    left: 10px;
    min-height: auto;
    height: auto;
    max-height: calc(100svh - var(--topbar-h, 126px) - 18px);
    max-height: calc(100dvh - var(--topbar-h, 126px) - 18px);
    z-index: 60;
    border-radius: 8px;
  }
  body.module-active .module-rail:not(.open) {
    width: 0;
    opacity: 0;
    transform: translateX(-110%);
    pointer-events: none;
  }
  body.module-active .module-rail.open {
    width: calc(100vw - 20px);
    opacity: 1;
    transform: translateX(0);
    overflow-y: auto;
  }
  body.module-active .frame-wrap { height: 100%; min-height: 0; }
  body.module-active #moduleFrame { height: 100%; min-height: 0; }
}

@media (hover: none) and (max-width: 760px) {
  .module-rail:hover { width: 40px; }
  .module-rail:hover .grid { opacity: 0; transform: translateX(-10px); }
  .module-rail.open { width: calc(100vw - 20px); }
  .module-rail.open .grid { opacity: 1; transform: translateX(0); }
}

@media (max-width: 980px) {
  .suite-hero {
    grid-template-columns: 1fr;
  }
  .suite-hero-copy {
    text-align: center;
  }
  .suite-hero-copy img {
    margin-inline: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .suite-hero::before,
  .suite-hero-ring,
  .suite-hero-core,
  .suite-hero-wing,
  .suite-hero-tail,
  .suite-hero-spark {
    animation: none !important;
  }
  .suite-hero-entity { transition: none; }
}

/* Pie de contacto CIACA (Sede Nodo Departamental) */
.ciaca-contact {
  margin: 22px auto 4px;
  padding-top: 12px;
  max-width: 520px;
  display: grid;
  gap: 2px;
  border-top: 1px solid #cfe0d7;
  color: #5b6b63;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}
.ciaca-contact strong { color: #0b5f43; font-size: 12px; }
.ciaca-contact a { color: #0b5f43; text-decoration: none; }
.ciaca-contact a:hover { text-decoration: underline; }

@keyframes suiteHeroSweep {
  0%, 100% { transform: translateX(-55%); opacity: 0; }
  24%, 60% { opacity: 1; }
  70% { transform: translateX(52%); opacity: 0; }
}
@keyframes suiteRingSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes suiteRingSpinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
@keyframes suiteRingPulse {
  0%, 100% { transform: scale(.98); opacity: .8; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes suiteCoreFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.04); }
}
@keyframes suiteWingLeft {
  0%, 100% { transform: rotate(-28deg) scaleX(1); opacity: .84; }
  50% { transform: rotate(-19deg) scaleX(1.08); opacity: 1; }
}
@keyframes suiteWingRight {
  0%, 100% { transform: rotate(28deg) scaleX(1); opacity: .86; }
  50% { transform: rotate(18deg) scaleX(1.06); opacity: 1; }
}
@keyframes suiteTailWave {
  0%, 100% { transform: rotate(-26deg) scaleX(1); opacity: .74; }
  50% { transform: rotate(-18deg) scaleX(1.08); opacity: .96; }
}
@keyframes suiteSparkA {
  0% { transform: translate3d(0,0,0); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translate3d(-22px,30px,0); opacity: 1; }
  100% { transform: translate3d(-42px,64px,0); opacity: 0; }
}
@keyframes suiteSparkB {
  0% { transform: translate3d(0,0,0); opacity: 0; }
  20% { opacity: 1; }
  60% { transform: translate3d(34px,-22px,0); opacity: 1; }
  100% { transform: translate3d(70px,-44px,0); opacity: 0; }
}
@keyframes suiteSparkC {
  0% { transform: translate3d(0,0,0) scale(.9); opacity: 0; }
  18% { opacity: 1; }
  56% { transform: translate3d(-28px,-28px,0) scale(1.1); opacity: 1; }
  100% { transform: translate3d(-54px,-48px,0) scale(.85); opacity: 0; }
}

@media (max-width: 860px) {
  .login-shell--public {
    grid-template-columns: 1fr;
    padding: 14px;
    align-content: center;
  }
  .login-hero {
    min-height: auto;
    padding: 22px;
  }
  .login-hero-brand {
    display: grid;
    gap: 14px;
  }
  .login-hero-brand img { width: min(210px, 72vw); }
  .login-hero-metrics { grid-template-columns: 1fr; }
}

.admin-users-body { min-height: 100vh; background: #f7faf8; }
.admin-users-shell { display: grid; gap: 14px; padding: 16px; }
.users-toolbar,
.user-editor,
.users-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 36, 31, 0.07);
}
.users-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.users-toolbar h1 { font-size: 26px; }
.users-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.user-editor { padding: 14px; }
.user-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.user-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.inline-check { align-self: center; display: flex !important; grid-auto-flow: column; justify-content: start; align-items: center; gap: 8px !important; color: var(--ink) !important; }
.inline-check input { width: auto; }
.module-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 16px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.module-checks legend { color: var(--muted); font-size: 13px; font-weight: 700; padding: 0 6px; }
.module-checks label { display: inline-flex; grid-auto-flow: column; align-items: center; gap: 6px; color: var(--ink); }
.module-checks input { width: auto; }
.user-form .error-text { grid-column: 1 / -1; margin: 0; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }
.users-table-wrap { overflow-x: auto; }
.users-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.users-table th,
.users-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.users-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0; background: #f4f8f6; }
.users-table td span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.status-pill { display: inline-flex !important; width: fit-content; border-radius: 999px; padding: 4px 9px; font-size: 12px !important; font-weight: 700; }
.status-pill.active { background: #e6f5ee; color: #075d39; }
.status-pill.inactive { background: #f6e6e4; color: #8c2b22; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions button { min-height: 34px; padding: 7px 10px; font-size: 12px; }

@media (max-width: 820px) {
  .users-toolbar { align-items: stretch; flex-direction: column; }
  .users-toolbar button { width: 100%; }
  .users-toolbar-actions { align-items: stretch; flex-direction: column; }
  .user-form { grid-template-columns: 1fr; }
  .form-actions { justify-content: stretch; flex-direction: column; }
}
