
:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #182842;
  background: #f5f7fb;
  font-synthesis: none;
  --navy: #0b2652;
  --muted: #6c7a90;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #8bb7ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
button {
  min-height: 44px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  letter-spacing: -1.1px;
}
img {
  object-fit: contain;
}
.login {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.12fr 1fr;
}
.login-art {
  background: linear-gradient(145deg, #0a244c, #133f70);
  color: white;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-art:after {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border: 1px solid #ffffff17;
  border-radius: 50%;
  right: -240px;
  top: 100px;
  pointer-events: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 1px;
  font-size: 25px;
  font-weight: 800;
}
.brand img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: white;
  padding: 5px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  font-weight: 600;
  margin-top: 2px;
}
.art-copy {
  padding: 70px 0;
}
.kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #6181ac;
  margin-bottom: 17px;
}
.login-art .kicker {
  color: #a5d6ff;
}
.art-copy h1 {
  font-size: clamp(36px, 3.8vw, 58px);
  line-height: 1.12;
  margin-bottom: 24px;
}
.art-copy p {
  max-width: 370px;
  line-height: 1.75;
  color: #d1e0f5;
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.chips span {
  font-size: 10px;
  border: 1px solid #ffffff35;
  background: #ffffff0b;
  border-radius: 20px;
  padding: 9px 12px;
}
.login-art > small {
  color: #b1c6e3;
  font-size: 10px;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 48px 28px;
  background: white;
}
.login-panel form {
  width: 100%;
  max-width: 375px;
}
.login-panel h2 {
  font-size: 32px;
  letter-spacing: -0.7px;
  margin-bottom: 12px;
}
.login-panel p,
dialog p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin: 25px 0 9px;
}
input {
  width: 100%;
  min-height: 49px;
  border: 1px solid #dbe2ec;
  background: #fbfcff;
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 14px;
}
.password-wrap {
  position: relative;
}
.password-wrap input {
  padding-right: 65px;
}
.password-wrap button {
  position: absolute;
  right: 5px;
  top: 3px;
  background: none;
  border: 0;
  color: #607595;
  font-size: 12px;
}
.primary {
  background: var(--navy);
  color: white;
  border: 0;
  border-radius: 9px;
  padding: 14px 19px;
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  margin-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition:
    background 0.2s,
    transform 0.2s;
}
.primary:hover {
  background: #17427e;
}
.primary:active {
  transform: translateY(1px);
}
.hint {
  display: block;
  text-align: center;
  color: #97a2b4;
  font-size: 11px;
}
.portal {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}
aside {
  background: linear-gradient(180deg, #0a244c, #0d3164);
  color: white;
  position: sticky;
  top: 0;
  height: 100dvh;
  padding: 32px 23px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
aside .brand {
  font-size: 22px;
  margin-bottom: 47px;
}
aside .brand img {
  width: 43px;
  height: 43px;
}
aside .brand small {
  font-size: 8px;
}
.nav-caption {
  color: #839cbe;
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 700;
}
.nav-active {
  border: 1px solid #ffffff15;
  background: #ffffff12;
  color: white;
  border-radius: 8px;
  text-align: left;
  padding: 12px 15px;
  font-size: 12px;
  font-weight: 650;
}
.aside-bottom {
  margin-top: auto;
  font-size: 10px;
  color: #c2d3ec;
}
.aside-bottom small {
  display: block;
  margin-top: 14px;
  font-size: 8px;
  color: #7994b7;
  letter-spacing: 1.6px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #53dba9;
  margin-right: 6px;
}
.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
header {
  min-height: 83px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 35px;
  background: white;
  border-bottom: 1px solid #e7ecf3;
  font-size: 11px;
  color: #8b97a9;
}
header strong {
  color: #263955;
  font-weight: 600;
}
.slash {
  margin: 0 12px;
  color: #c0cad8;
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #54647c;
  min-width: 0;
}
#account-email {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  width: 33px;
  height: 33px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf2fb;
  color: #274c80;
  font-size: 13px;
  font-weight: 750;
}
.text-button {
  font-size: 10px;
  border: 0;
  background: transparent;
  color: #6b7c96;
  padding: 5px 8px;
}
main {
  max-width: 1550px;
  width: 100%;
  padding: 44px 35px;
  margin: 0 auto;
  flex: 1;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}
.intro .kicker {
  font-size: 9px;
  margin-bottom: 12px;
}
.intro h1 {
  font-size: 30px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.intro p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.date {
  font-size: 10px;
  color: #71819a;
  padding: 10px 13px;
  border: 1px solid #e0e7f0;
  border-radius: 8px;
  background: white;
  white-space: nowrap;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 21px;
  gap: 15px;
}
.section-heading h2 {
  font-size: 14px;
  margin: 0;
}
.section-heading > span {
  font-size: 10px;
  color: #7b8ba1;
}
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.module-card {
  --accent: #2264c8;
  --tint: #edf4ff;
  position: relative;
  background: white;
  border: 1px solid #e4eaf3;
  border-radius: 14px;
  padding: 25px 23px 22px;
  box-shadow: 0 5px 20px #152b4e03;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  animation: appear 0.4s both;
}
.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px #152b4e0c;
}
.purple {
  --accent: #7752c9;
  --tint: #f3effd;
  animation-delay: 0.06s;
}
.teal {
  --accent: #0f9489;
  --tint: #eaf8f5;
  animation-delay: 0.12s;
}
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 8px;
}
.module-icon {
  display: grid;
  place-items: center;
  width: 47px;
  height: 47px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--tint);
}
svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.module-tag {
  font-size: 8px;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: #91a0b4;
}
.module-card h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}
.module-card p {
  font-size: 11px;
  color: #7b889c;
  line-height: 1.85;
  min-height: 62px;
  margin-bottom: 20px;
}
.features {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.features span {
  font-size: 8px;
  border-radius: 4px;
  background: #f5f7fa;
  padding: 6px 7px;
  color: #76859c;
}
.card-access {
  font-size: 10px;
  color: #6f819a;
  min-height: 28px;
  margin-top: auto;
}
.card-access.ready {
  color: #17816b;
}
.module-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 650;
  border: 0;
  border-radius: 7px;
  padding: 12px 13px;
  gap: 8px;
}
.module-button:hover {
  filter: brightness(0.95);
}
.help-note {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  border: 1px solid #e4eaf3;
  border-radius: 10px;
  padding: 19px 21px;
  background: #f0f4fa;
  color: #59718f;
}
.help-note > span {
  color: #7294c0;
}
.help-note strong {
  display: block;
  font-size: 11px;
  margin-bottom: 5px;
}
.help-note p {
  font-size: 10px;
  line-height: 1.7;
  margin: 0;
  color: #8695aa;
}
footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 35px;
  color: #a3afc0;
  font-size: 8px;
  letter-spacing: 0.5px;
  border-top: 1px solid #e9edf4;
}
.module-toolbar {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 15px;
  background: white;
  border-bottom: 1px solid #dfe6ef;
  padding: 7px 18px;
}
.module-toolbar strong {
  font-size: 12px;
}
.module-toolbar > span {
  margin-left: auto;
  font-size: 9px;
  color: #8492a7;
}
.secondary {
  border: 1px solid #dbe4f0;
  background: #f6f8fc;
  color: #24446d;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 11px;
}
#module-view {
  flex: 1;
}
#frames {
  height: calc(100dvh - 143px);
}
iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: white;
}
body.in-module aside {
  display: none;
}
body.in-module .portal {
  grid-template-columns: 1fr;
}
body.in-module footer {
  display: none;
}
dialog {
  border: 1px solid #dde5f0;
  border-radius: 17px;
  padding: 34px;
  max-width: 420px;
  width: calc(100% - 30px);
  color: #182842;
  box-shadow: 0 25px 100px #081d4830;
}
dialog::backdrop {
  background: #071c4890;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
}
.close {
  position: absolute;
  top: 5px;
  right: 8px;
  background: none;
  border: 0;
  font-size: 24px;
  color: #71819a;
  min-width: 44px;
}
#login-status,
#access-status,
#portal-status {
  color: #9e4c37;
  font-size: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
#login-status {
  min-height: 24px;
  margin: 17px 0;
}
#portal-status {
  margin-top: 20px;
}
@keyframes appear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1550px) {
  main {
    padding-top: 60px;
  }
  .module-card {
    padding: 32px;
  }
  .module-card h3 {
    font-size: 21px;
  }
  .module-card p {
    font-size: 13px;
    min-height: 76px;
  }
  .features span {
    font-size: 10px;
  }
  .module-button {
    font-size: 13px;
  }
  .card-access {
    font-size: 11px;
  }
}
@media (max-width: 1100px) {
  .portal {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  aside {
    padding: 28px 17px;
  }
  main {
    padding: 30px 23px;
  }
  .module-grid {
    gap: 12px;
  }
  .module-card {
    padding: 20px 15px;
  }
  .module-card h3 {
    font-size: 15px;
  }
  .module-card p {
    min-height: 85px;
  }
  .features {
    min-height: 44px;
  }
  .intro h1 {
    font-size: 26px;
  }
  .intro {
    align-items: flex-start;
  }
  .date {
    max-width: 130px;
    white-space: normal;
    line-height: 1.5;
  }
  header {
    padding: 16px 23px;
  }
  header > span {
    display: none;
  }
  .account {
    width: 100%;
  }
  #logout {
    margin-left: auto;
  }
  .login-art {
    padding: 36px;
  }
  .login-art h1 {
    font-size: 40px;
  }
}
@media (max-width: 800px) {
  .portal {
    grid-template-columns: 1fr;
  }
  aside {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 15px 21px;
    gap: 10px;
  }
  aside .brand {
    margin: 0;
    font-size: 18px;
  }
  aside .brand img {
    width: 36px;
    height: 36px;
  }
  .nav-caption,
  .aside-bottom {
    display: none;
  }
  .nav-active {
    margin-left: auto;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 11px;
  }
  header {
    min-height: 65px;
  }
  .module-grid {
    grid-template-columns: 1fr;
  }
  .module-card {
    padding: 25px;
  }
  .module-card p {
    min-height: 0;
    max-width: 500px;
    font-size: 12px;
  }
  .module-card h3 {
    font-size: 20px;
  }
  .card-top {
    margin-bottom: 20px;
  }
  .features {
    min-height: 0;
    margin-bottom: 17px;
  }
  .features span {
    font-size: 9px;
  }
  .card-access {
    min-height: 27px;
  }
  .module-button {
    font-size: 12px;
  }
  .intro {
    margin-bottom: 30px;
  }
  .intro h1 {
    font-size: 28px;
  }
  .intro .kicker {
    font-size: 8px;
  }
  .section-heading {
    margin-bottom: 17px;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-art {
    padding: 24px 27px;
  }
  .art-copy {
    padding: 38px 0 15px;
  }
  .art-copy h1 {
    font-size: 34px;
    margin-bottom: 12px;
  }
  .art-copy p,
  .chips,
  .login-art > small {
    display: none;
  }
  .login-panel {
    padding: 35px 25px 50px;
  }
  .login-panel h2 {
    font-size: 28px;
  }
  .login-panel .kicker {
    font-size: 9px;
  }
  .brand img {
    width: 42px;
    height: 42px;
  }
  .brand {
    font-size: 22px;
  }
  .help-note p {
    font-size: 11px;
  }
  footer {
    padding: 18px 23px;
    font-size: 7px;
  }
  .date {
    font-size: 9px;
    max-width: 114px;
  }
  #frames {
    height: calc(100dvh - 125px);
  }
  .module-toolbar {
    gap: 10px;
    padding: 7px 12px;
  }
  .module-toolbar > span {
    display: none;
  }
}
@media (max-width: 380px) {
  main {
    padding: 27px 16px;
  }
  .intro {
    display: block;
  }
  .date {
    display: inline-block;
    max-width: none;
    margin-top: 16px;
  }
  .intro h1 {
    font-size: 26px;
  }
  header {
    padding: 12px 16px;
  }
  #account-email {
    max-width: 155px;
    font-size: 10px;
  }
  .account {
    gap: 7px;
  }
  #logout {
    font-size: 9px;
  }
  .avatar {
    width: 28px;
    height: 28px;
  }
  .module-card {
    padding: 22px;
  }
  .section-heading > span {
    font-size: 8px;
  }
  .section-heading h2 {
    font-size: 13px;
  }
  footer span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}

/* Una única barra integrada; cada módulo usa el resto de la ventana. */
body.in-module {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #071c33;
}
body.in-module .portal {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
}
body.in-module .workspace {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #071c33;
}
body.in-module .workspace > header {
  display: none;
}
body.in-module #module-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
body.in-module #frames {
  height: auto;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #071c33;
}
body.in-module #frames iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #071c33;
}
body.in-module #frames iframe[hidden] {
  display: none !important;
}
.module-toolbar {
  height: auto;
  min-height: 54px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 5px 20px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
  padding-top: max(5px, env(safe-area-inset-top));
  background: linear-gradient(100deg, #0c2949, #102f51);
  color: #dcedfc;
  border-bottom: 1px solid #47749a55;
  box-shadow: 0 2px 9px #020d1c24;
  position: relative;
  z-index: 5;
}
.module-toolbar .secondary {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  border: 1px solid #87b4dd38;
  background: #ffffff07;
  color: #e5f1ff;
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 650;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.module-toolbar .secondary:hover {
  background: #7ebaff18;
  border-color: #8cbaea66;
}
.module-toolbar .secondary > span {
  font-size: 17px;
  line-height: 1;
  color: #9acbff;
}
.module-toolbar .module-separator {
  display: block;
  width: 1px;
  height: 20px;
  background: #769ec63d;
  flex-shrink: 0;
  margin: 0;
}
.module-toolbar #module-title {
  font-size: 12px;
  letter-spacing: 0.1px;
  font-weight: 650;
  color: #c2d8ed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.module-toolbar-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}
.portal-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8eaecb;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.portal-brand i {
  width: 5px;
  height: 5px;
  background: #52d4ac;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #52d4ac12;
}
.module-exit {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 10px;
  color: #b8ccdf;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 10px;
  transition:
    background 0.15s,
    color 0.15s;
}
.module-exit:hover {
  color: #fff;
  background: #ffffff0b;
  border-color: #c6ddf51c;
}
.module-exit svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}
.module-toolbar :is(button):focus-visible {
  outline: 2px solid #a5d3ff;
  outline-offset: 1px;
}
@media (max-width: 800px) {
  .module-toolbar {
    min-height: 52px;
    gap: 11px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .module-toolbar .secondary {
    font-size: 11px;
    padding: 8px 10px;
  }
  .module-toolbar #module-title {
    font-size: 11px;
  }
  .module-toolbar-end {
    gap: 8px;
  }
  .portal-brand {
    display: none;
  }
  .module-exit {
    font-size: 10px;
    padding: 8px;
    gap: 5px;
  }
}
@media (max-width: 480px) {
  .module-toolbar {
    gap: 9px;
  }
  .module-toolbar .module-separator {
    display: none;
  }
  .module-toolbar #module-title {
    font-size: 10px;
  }
  .module-toolbar .secondary {
    font-size: 10px;
    padding: 8px 9px;
    gap: 6px;
  }
  .module-exit {
    min-width: 42px;
    justify-content: center;
  }
  .module-exit span {
    display: none;
  }
  .module-exit svg {
    width: 18px;
    height: 18px;
  }
  .module-toolbar-end {
    margin-left: auto;
  }
}
