:root {
  --brand: #213274;
  --brand-dark: #00031e;
  --surface: #ffffff;
  --ink: #243746;
  --muted: #71808c;
  --line: #e8edf1;
  --page: #f4f7f9;
}

body {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
.login-page {
  background: radial-gradient(
    circle at top left,
    #e8f1f5 0,
    #f5f7fa 48%,
    #e9eef3 100%
  );
}
.login-card {
  width: 100%;
  max-width: 440px;
  border-radius: 1.1rem;
}
.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  color: #fff;
  background: var(--brand);
  font-size: 1.7rem;
}
.btn-primary {
  background-color: var(--brand);
  border-color: var(--brand);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
}
.app-navbar {
  background: var(--brand-dark);
}

/* Interfaz principal del sistema */
.dashboard-page {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
}
.app-shell {
  min-height: 100vh;
}
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  width: 258px;
  padding: 25px 17px 18px;
  color: #dce7ed;
  background: var(--brand-dark);
  overflow-y: auto;
  transition: transform 0.25s ease;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 9px 27px;
  color: #fff;
  text-decoration: none;
}
.sidebar-brand-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 13px;
  color: #244357;
  background: #e8f2f5;
  font-size: 1.2rem;
}
.sidebar-brand strong,
.sidebar-brand small {
  display: block;
}
.sidebar-brand strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}
.sidebar-brand small {
  margin-top: 2px;
  color: #a9bfcc;
  font-size: 0.72rem;
}
.sidebar-section-label {
  padding: 0 11px 9px;
  color: #8fa9b8;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 43px;
  margin: 2px 0;
  padding: 9px 11px;
  border-radius: 9px;
  color: #d0dce3;
  font-size: 0.86rem;
  text-decoration: none;
}
.sidebar-link > i {
  width: 18px;
  color: var(--line);
  text-align: center;
}
.sidebar-link.active {
  color: #fff;
  background: var(--brand);
  box-shadow: inset 3px 0 #9bc4d2;
}
.sidebar-link.active > i {
  color: #d9edf3;
}
.sidebar-link-disabled {
  color: #a9bac4;
  cursor: default;
  font-size: 0.82rem;
}
.sidebar-link-disabled > i {
  color: #829ba9;
}
.sidebar-soon {
  margin-left: auto;
  color: #9fb5c1;
  font-size: 0.61rem;
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 15px 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.sidebar-footer-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #b9d8ca;
  background: rgba(185, 216, 202, 0.12);
}
.sidebar-footer strong,
.sidebar-footer small {
  display: block;
}
.sidebar-footer strong {
  color: #e4edf1;
  font-size: 0.74rem;
}
.sidebar-footer small {
  margin-top: 2px;
  color: #9fb3be;
  font-size: 0.64rem;
}
.app-main-wrap {
  min-height: 100vh;
  margin-left: 258px;
}
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 35px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}
.topbar-context {
  color: var(--ink);
  font-size: 0.8rem;
}
.context-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #65ad88;
  vertical-align: 1px;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar-user-avatar {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  color: var(--brand);
  background: #eaf1f5;
}
.topbar-user-data strong,
.topbar-user-data small {
  display: block;
}
.topbar-user-data strong {
  color: var(--brand-dark);
  font-size: 0.78rem;
}
.topbar-user-data small {
  max-width: 260px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-logout {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #71808c;
}
.btn-logout:hover {
  color: #a94442;
  background: #fff4f3;
}
.sidebar-toggle {
  display: none;
  color: var(--brand);
}
.dashboard-content {
  max-width: 1500px;
  margin: 0 auto;
  padding: 34px 35px 22px;
}
.welcome-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 190px;
  margin-bottom: 36px;
  padding: 32px 37px;
  overflow: hidden;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(112deg, var(--brand-dark) 0%, var(--brand) 100%);
  box-shadow: 0 10px 28px rgba(39, 75, 96, 0.12);
}
.welcome-panel > div:first-child {
  position: relative;
  z-index: 1;
}
.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: #8194a1;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}
.welcome-panel .eyebrow {
  color: #c1d7df;
}
.welcome-panel h1 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.welcome-panel p {
  margin: 0;
  color: #d4e1e6;
  font-size: 0.9rem;
}
.welcome-date {
  position: relative;
  z-index: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 9px;
  color: #f0f6f8;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  white-space: nowrap;
}
.welcome-decoration {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
}
.decoration-one {
  width: 260px;
  height: 260px;
  top: -140px;
  right: 10%;
}
.decoration-two {
  width: 360px;
  height: 360px;
  right: -80px;
  bottom: -280px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
}
.section-heading .eyebrow {
  margin-bottom: 4px;
}
.section-heading h2 {
  margin: 0;
  color: #304654;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-note {
  color: #8b98a1;
  font-size: 0.72rem;
}
.module-card {
  display: flex;
  flex-direction: column;
  min-height: 205px;
  padding: 21px;
  border: 1px solid #e9eef1;
  border-radius: 13px;
  background: #fff;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(38, 65, 82, 0.07);
}
.module-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}
.module-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 12px;
  font-size: 1.08rem;
}
.module-icon.blue {
  color: #477fa9;
  background: #eaf3fa;
}
.module-icon.teal {
  color: #398e89;
  background: #e8f5f3;
}
.module-icon.violet {
  color: #8171ad;
  background: #f0edfa;
}
.module-icon.orange {
  color: #bd8751;
  background: #fbf1e6;
}
.module-icon.green {
  color: #60916e;
  background: #edf5ed;
}
.module-icon.rose {
  color: #b66f83;
  background: #faedf1;
}
.module-status {
  padding: 5px 8px;
  border-radius: 20px;
  color: #87939b;
  background: #f3f5f6;
  font-size: 0.62rem;
  font-weight: 600;
}
.module-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
}
.module-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.77rem;
}
.module-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #f0f2f4;
  color: var(--muted);
  font-size: 0.68rem;
}
.module-card-bottom i {
  color: #9ab0bc;
}
.security-heading {
  margin-top: 38px;
}
.security-card {
  padding: 18px;
  border: 1px solid #e9eef1;
  border-radius: 12px;
  background: #fff;
}
.security-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 13px;
  border-radius: 10px;
  color: #527b91;
  background: #edf3f6;
}
.security-card h3 {
  margin: 0 0 5px;
  color: #3b505d;
  font-size: 0.84rem;
  font-weight: 700;
}
.security-card p {
  min-height: 34px;
  margin: 0 0 12px;
  color: #87939b;
  font-size: 0.7rem;
}
.security-coming {
  color: #9aa5ac;
  font-size: 0.65rem;
}
.dashboard-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 38px;
  padding-top: 17px;
  border-top: 1px solid #e5ebef;
  color: #9aa5ac;
  font-size: 0.67rem;
}
.sidebar-backdrop {
  display: none;
}
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
    box-shadow: 15px 0 35px rgba(20, 43, 57, 0.16);
  }
  .app-sidebar.is-open {
    transform: translateX(0);
  }
  .app-main-wrap {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .app-topbar {
    justify-content: flex-start;
    gap: 13px;
    padding: 0 20px;
  }
  .topbar-context {
    margin-right: auto;
  }
  .sidebar-backdrop.is-visible {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: block;
    background: rgba(20, 36, 46, 0.42);
  }
}
@media (max-width: 575.98px) {
  .app-topbar {
    min-height: 62px;
    padding: 0 13px;
  }
  .topbar-user-data {
    display: none;
  }
  .dashboard-content {
    padding: 22px 15px 18px;
  }
  .welcome-panel {
    display: block;
    min-height: 180px;
    margin-bottom: 28px;
    padding: 25px 22px;
  }
  .welcome-date {
    display: inline-block;
    margin-top: 20px;
  }
  .section-heading {
    align-items: start;
    flex-direction: column;
  }
  .section-note {
    margin-top: -8px;
  }
  .module-card {
    min-height: 190px;
  }
  .dashboard-footer {
    flex-direction: column;
  }
}

/* Tarjetas de módulos que ya cuentan con interfaz funcional. */
.module-card-link {
  color: inherit;
  display: block;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.module-card-link:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(27, 55, 72, 0.1);
}

/* Tarjetas de módulos que ya cuentan con interfaz funcional. */
.module-card-link {
  color: inherit;
  display: block;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.module-card-link:hover {
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(27, 55, 72, 0.1);
}

.security-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.security-card-link:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(28, 52, 68, 0.1);
}
.topbar-brand-mobile {
  color: #294456;
  font-weight: 750;
  text-decoration: none;
}

.detail-breadcrumb {
  margin: 0 0 16px;
}
.detail-breadcrumb a {
  color: #54758a;
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}
.detail-breadcrumb a:hover {
  color: #244357;
}
