/* IMAS — tema compartido */
:root {
  --imas-cyan: #00a3e0;
  --imas-cyan-dark: #0087b8;
  --imas-cyan-light: #4dc4eb;
  --imas-teal: #00b6d7;
  --imas-black: #0a0a0a;
  --imas-ink: #102a3a;
  --imas-muted: #5a7384;
  --imas-surface: rgba(255, 255, 255, 0.92);
  --imas-surface-solid: #ffffff;
  --imas-border: rgba(0, 163, 224, 0.28);
  --imas-shadow: 0 18px 40px rgba(0, 40, 70, 0.28);
  --imas-radius: 16px;
  --imas-font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

img, svg, canvas {
  max-width: 100%;
  height: auto;
}

body.imas-body {
  font-family: var(--imas-font);
  color: var(--imas-ink);
  background-color: #e8eef2;
  background-image: none;
}

.imas-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 1rem 2.5rem;
  gap: 1rem;
}

.imas-card {
  width: min(440px, 100%);
  background: var(--imas-surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--imas-border);
  border-radius: var(--imas-radius);
  box-shadow: var(--imas-shadow);
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
}

.imas-card--wide {
  width: min(960px, 100%);
  text-align: left;
}

.imas-logo-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--imas-black);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 3px solid var(--imas-cyan);
}

.imas-logo-wrap img {
  width: 72%;
  height: auto;
  display: block;
}

.imas-banner {
  width: 100%;
  margin: 0 0 1.35rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 80, 130, 0.28);
  line-height: 0;
  background: #0088ce;
}

.imas-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.imas-conn-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.35rem;
}

.imas-conn {
  border: 1px solid var(--imas-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: rgba(0, 163, 224, 0.06);
}

.imas-conn h3 {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  color: var(--imas-cyan-dark);
}

.imas-conn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  font-size: 0.9rem;
}

.imas-conn-grid dt {
  color: var(--imas-muted);
}

.imas-conn-grid dd {
  margin: 0;
  font-weight: 600;
  color: var(--imas-ink);
  text-align: right;
}

.imas-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.imas-badge--ok {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.imas-badge--warn {
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}

.imas-badge--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.imas-chart-wrap {
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--imas-border);
  background: #fff;
  min-height: 280px;
}

.imas-brand {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--imas-cyan-dark);
  font-weight: 700;
}

.imas-card h1 {
  margin: 0 0 1.25rem;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--imas-ink);
}

.imas-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--imas-ink);
}

.imas-form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.imas-form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--imas-muted);
}

.imas-form-group input[type="text"],
.imas-form-group input[type="password"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid #c5d7e2;
  border-radius: 10px;
  font-size: 1rem;
  color: var(--imas-ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.imas-form-group input:focus {
  border-color: var(--imas-cyan);
  box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.2);
}

.imas-btn {
  display: inline-block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--imas-cyan-light), var(--imas-cyan));
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 135, 184, 0.35);
  transition: transform 0.12s, filter 0.12s, box-shadow 0.12s;
}

.imas-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 135, 184, 0.45);
}

.imas-btn:active {
  transform: translateY(0);
}

.imas-btn--ghost {
  background: transparent;
  color: var(--imas-cyan-dark);
  border: 1.5px solid var(--imas-cyan);
  box-shadow: none;
}

.imas-btn--ghost:hover {
  background: rgba(0, 163, 224, 0.08);
  filter: none;
}

.imas-btn--sm {
  width: auto;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.imas-error {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: #ffe8e8;
  color: #b42318;
  font-size: 0.9rem;
  border: 1px solid #f5c2c0;
}

.imas-meta {
  margin: 0.35rem 0;
  color: var(--imas-muted);
  font-size: 0.95rem;
}

.imas-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.imas-stat {
  background: linear-gradient(160deg, rgba(0, 163, 224, 0.12), rgba(0, 182, 215, 0.06));
  border: 1px solid var(--imas-border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.imas-stat span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--imas-muted);
  margin-bottom: 0.25rem;
}

.imas-stat strong {
  font-size: 1.25rem;
  color: var(--imas-cyan-dark);
}

.imas-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.imas-actions .imas-btn {
  width: auto;
  flex: 1 1 180px;
}

.imas-topbar {
  width: min(960px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: rgba(10, 10, 10, 0.88);
  color: #fff;
  border-radius: var(--imas-radius);
  padding: 0.85rem 1.1rem;
  border: 1px solid rgba(0, 163, 224, 0.45);
  box-shadow: var(--imas-shadow);
}

.imas-topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.imas-topbar-brand .imas-logo-wrap {
  width: 52px;
  height: 52px;
  margin: 0;
  border-width: 2px;
}

.imas-topbar-brand .imas-logo-wrap img {
  width: 70%;
}

.imas-topbar h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.imas-topbar p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
}

.imas-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid var(--imas-border);
}

.imas-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.92rem;
}

.imas-table th {
  background: var(--imas-ink);
  color: #fff;
  text-align: left;
  padding: 0.75rem 0.65rem;
  white-space: nowrap;
  font-weight: 600;
}

.imas-table th:first-child {
  border-radius: 11px 0 0 0;
}

.imas-table th:last-child {
  border-radius: 0 11px 0 0;
}

.imas-table td {
  padding: 0.65rem;
  border-bottom: 1px solid #e6eef3;
  color: var(--imas-ink);
}

.imas-table tr:nth-child(even) td {
  background: rgba(0, 163, 224, 0.05);
}

.imas-table tr:hover td {
  background: rgba(0, 163, 224, 0.12);
}

.imas-total {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(0, 163, 224, 0.1);
  border: 1px solid var(--imas-border);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--imas-cyan-dark);
}

.imas-footer-links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.imas-footer-links a {
  color: var(--imas-cyan-dark);
  font-weight: 600;
  text-decoration: none;
}

.imas-footer-links a:hover {
  text-decoration: underline;
}

.imas-pdf-cell {
  text-align: center !important;
  white-space: nowrap;
  vertical-align: middle;
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  line-height: 1;
}

.imas-pdf-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  line-height: 0;
  border-radius: 6px;
  transition: transform 0.12s, opacity 0.12s;
  background: transparent;
}

.imas-pdf-link:hover {
  transform: translateY(-1px) scale(1.06);
  opacity: 0.9;
}

.imas-pdf-icon {
  width: 28px;
  height: 28px;
  display: block;
}

.imas-pdf-cell .imas-badge {
  vertical-align: middle;
}

/* ——— Hero agua / gotas (post-login) ——— */
.hero-wrap {
  width: min(960px, 100%);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #014a6e 0%, #0578a8 48%, #0aa0c8 100%);
  box-shadow: 0 16px 36px rgba(1, 50, 80, 0.35);
  color: #fff;
  min-height: clamp(148px, 24vw, 198px);
}

.hero-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.1rem, 3vw, 1.75rem) clamp(1.15rem, 3.2vw, 2rem);
  min-height: inherit;
}

.hero-text {
  flex: 1 1 auto;
  min-width: 0;
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 30, 50, 0.25);
}

.hero-text .sub {
  margin: 0.45rem 0 0;
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.hero-contact {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
}

.hero-contact li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: clamp(0.72rem, 1.5vw, 0.84rem);
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.3;
}

.hero-contact-ico {
  width: 15px;
  height: 15px;
  color: #fff;
  flex: 0 0 auto;
  display: block;
  opacity: 0.95;
}

.brand-logo {
  flex: 0 0 auto;
  width: clamp(64px, 12vw, 96px);
  height: clamp(64px, 12vw, 96px);
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 6px 16px rgba(0, 20, 40, 0.35));
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  animation: hero-orb-drift ease-in-out infinite alternate;
}

.hero-orb.a {
  width: 220px;
  height: 220px;
  top: -90px;
  right: -40px;
  animation-duration: 18s;
}

.hero-orb.b {
  width: 280px;
  height: 280px;
  bottom: -140px;
  right: 8%;
  animation-duration: 22s;
  animation-delay: -4s;
}

.hero-orb.c {
  width: 190px;
  height: 190px;
  bottom: -100px;
  left: -50px;
  animation-duration: 16s;
  animation-delay: -2s;
}

@keyframes hero-orb-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(14px, -12px); }
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  animation: hero-glow-pulse 7s ease-in-out infinite alternate;
}

.hero-glow.g1 {
  width: 260px;
  height: 260px;
  left: -80px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 70%);
}

.hero-glow.g2 {
  width: 220px;
  height: 220px;
  right: -40px;
  top: -90px;
  background: radial-gradient(circle, rgba(184, 232, 255, 0.35) 0%, rgba(184, 232, 255, 0) 70%);
  animation-delay: -3s;
}

@keyframes hero-glow-pulse {
  from { opacity: 0.45; }
  to { opacity: 0.95; }
}

.hero-drop {
  position: absolute;
  top: -28px;
  width: 10px;
  height: 14px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, #7fd4f5 0%, #00a3e0 55%, #0087b8 100%);
  opacity: 0.75;
  filter: drop-shadow(0 0 5px rgba(0, 163, 224, 0.65));
  animation-name: hero-drop-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  transform: rotate(180deg);
}

.hero-drop.d1  { left: 6%;  width: 7px;  height: 10px; opacity: 0.45; animation-duration: 3.2s; animation-delay: 0s; }
.hero-drop.d2  { left: 12%; width: 11px; height: 15px; opacity: 0.8;  animation-duration: 5.4s; animation-delay: -1.2s; }
.hero-drop.d3  { left: 18%; width: 6px;  height: 9px;  opacity: 0.4;  animation-duration: 2.8s; animation-delay: -0.6s; }
.hero-drop.d4  { left: 26%; width: 14px; height: 19px; opacity: 0.85; animation-duration: 7.2s; animation-delay: -2.4s; }
.hero-drop.d5  { left: 34%; width: 8px;  height: 11px; opacity: 0.55; animation-duration: 4.1s; animation-delay: -0.9s; }
.hero-drop.d6  { left: 42%; width: 10px; height: 14px; opacity: 0.7;  animation-duration: 5.8s; animation-delay: -3.1s; }
.hero-drop.d7  { left: 50%; width: 6px;  height: 8px;  opacity: 0.42; animation-duration: 3s;   animation-delay: -1.7s; }
.hero-drop.d8  { left: 58%; width: 13px; height: 18px; opacity: 0.78; animation-duration: 6.6s; animation-delay: -0.4s; }
.hero-drop.d9  { left: 66%; width: 7px;  height: 10px; opacity: 0.5;  animation-duration: 3.6s; animation-delay: -2.0s; }
.hero-drop.d10 { left: 74%; width: 9px;  height: 12px; opacity: 0.62; animation-duration: 4.8s; animation-delay: -1.1s; }
.hero-drop.d11 { left: 82%; width: 15px; height: 21px; opacity: 0.82; animation-duration: 7.8s; animation-delay: -3.5s; }
.hero-drop.d12 { left: 90%; width: 5px;  height: 7px;  opacity: 0.4;  animation-duration: 2.6s; animation-delay: -0.3s; }
.hero-drop.d13 { left: 22%; width: 8px;  height: 11px; opacity: 0.58; animation-duration: 4.4s; animation-delay: -2.8s; }
.hero-drop.d14 { left: 48%; width: 12px; height: 16px; opacity: 0.72; animation-duration: 6.1s; animation-delay: -1.5s; }
.hero-drop.d15 { left: 70%; width: 6px;  height: 9px;  opacity: 0.45; animation-duration: 3.4s; animation-delay: -0.8s; }
.hero-drop.d16 { left: 95%; width: 10px; height: 14px; opacity: 0.68; animation-duration: 5.2s; animation-delay: -2.2s; }

@keyframes hero-drop-fall {
  0%   { transform: rotate(180deg) translateY(0); opacity: 0; }
  10%  { opacity: 0.85; }
  80%  { opacity: 0.55; }
  100% { transform: rotate(180deg) translateY(260px); opacity: 0; }
}

.hero-pulse {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(184, 232, 255, 0.25);
  box-shadow: 0 0 0 0 rgba(184, 232, 255, 0.45);
  animation: hero-ripple 4.5s ease-out infinite;
}

.hero-pulse.p1 { left: 33%; bottom: 18%; animation-delay: 0s; }
.hero-pulse.p2 { left: 68%; bottom: 22%; animation-delay: 1.5s; }
.hero-pulse.p3 { left: 16%; bottom: 14%; animation-delay: 2.8s; }

@keyframes hero-ripple {
  0%   { transform: scale(0.4); box-shadow: 0 0 0 0 rgba(184, 232, 255, 0.5); opacity: 0.8; }
  70%  { transform: scale(2.4); box-shadow: 0 0 0 18px rgba(184, 232, 255, 0); opacity: 0.2; }
  100% { transform: scale(2.6); box-shadow: 0 0 0 22px rgba(184, 232, 255, 0); opacity: 0; }
}

.hero-waves {
  display: none;
}

.imas-toolbar {
  width: min(960px, 100%);
  display: flex;
  justify-content: flex-end;
  margin-top: -0.35rem;
}

.imas-toolbar .imas-btn {
  width: auto;
}

.imas-btn--logout {
  background: #dc2626 !important;
  color: #fff !important;
  border: none !important;
  box-shadow: none !important;
}

.imas-btn--logout:hover {
  background: #b91c1c !important;
  filter: none;
  transform: none;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .imas-shell {
    padding: 0.85rem 0.75rem 1.75rem;
    gap: 0.85rem;
  }

  .imas-stats {
    grid-template-columns: 1fr;
  }

  .imas-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .imas-card {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }

  .imas-card--wide {
    width: 100%;
  }

  .imas-conn-grid {
    grid-template-columns: 1fr;
  }

  .imas-conn-grid dd {
    text-align: left;
  }

  .imas-actions {
    flex-direction: column;
  }

  .imas-actions .imas-btn,
  .dash-actions .imas-btn {
    width: 100%;
    flex: 1 1 auto;
    min-height: 46px;
  }

  .imas-toolbar {
    width: 100%;
  }

  .imas-toolbar .imas-btn {
    width: 100%;
  }

  .imas-table {
    font-size: 0.82rem;
  }

  .imas-table th,
  .imas-table td {
    padding: 0.55rem 0.4rem;
  }

  .hero-wrap {
    width: 100%;
  }

  .hero {
    min-height: 0;
    border-radius: 14px;
  }

  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1rem 1.1rem;
  }

  .brand-logo {
    width: 56px;
    height: 56px;
    align-self: flex-end;
    margin-top: -3.2rem;
  }

  .hero-text h1 {
    font-size: 1.25rem;
    padding-right: 4rem;
  }

  .hero-text .sub {
    font-size: 0.86rem;
    padding-right: 4rem;
  }

  .hero-contact {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    width: 100%;
  }

  .hero-contact li {
    width: 100%;
    flex-wrap: wrap;
    font-size: 0.78rem;
  }

  .hero-contact a {
    word-break: break-word;
  }

  .hero-drop.d3,
  .hero-drop.d7,
  .hero-drop.d9,
  .hero-drop.d12,
  .hero-drop.d13,
  .hero-drop.d15,
  .hero-pulse.p3 {
    display: none;
  }

  .imas-chart-wrap {
    min-height: 220px;
    padding: 0.65rem;
  }
}

@media (max-width: 420px) {
  .hero-text h1 {
    font-size: 1.12rem;
  }

  .dash-id {
    padding: 1rem;
  }

  .dash-kpi {
    min-height: 92px;
    padding: 0.85rem 0.9rem;
  }

  .dash-kpi-value {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .hero-glow,
  .hero-drop,
  .hero-pulse,
  .hero-waves .dash {
    animation: none !important;
  }

  .hero-drop {
    opacity: 0.35;
    top: 40%;
  }
}

/* ——— Dashboard menú ——— */
.dash {
  width: min(960px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-id {
  background: #fff;
  border: 1px solid var(--imas-border);
  border-radius: 16px;
  box-shadow: var(--imas-shadow);
  padding: 1.25rem 1.35rem;
}

.dash-id-meta {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--imas-muted);
  font-weight: 600;
}

.dash-id-name {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--imas-ink);
  line-height: 1.2;
}

.dash-id-line {
  margin: 0.35rem 0 0;
  color: var(--imas-cyan-dark);
  font-weight: 700;
  font-size: 0.98rem;
}

.dash-id-addr {
  margin: 0.55rem 0 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--imas-muted);
  font-size: 0.95rem;
}

.dash-pin {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  background: var(--imas-cyan);
  transform: rotate(-45deg);
  box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.18);
  flex: 0 0 auto;
}

.dash-section-title {
  margin: 0.85rem 0 0.15rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 800;
  color: var(--imas-ink);
}

.dash-section-title::before {
  content: "";
  width: 4px;
  height: 1.15em;
  border-radius: 999px;
  background: linear-gradient(180deg, #4dc4eb, #0087b8);
  flex: 0 0 auto;
}

.dash-section-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 163, 224, 0.35), rgba(0, 163, 224, 0));
}

.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.dash-kpi {
  background: #fff;
  border: 1px solid var(--imas-border);
  border-radius: 14px;
  padding: 1rem 1.05rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgba(0, 40, 70, 0.08);
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.12s, border-color 0.12s;
}

a.dash-kpi:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 163, 224, 0.55);
}

.dash-kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--imas-muted);
  line-height: 1.3;
}

.dash-kpi-value {
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  font-weight: 800;
  color: var(--imas-cyan-dark);
  letter-spacing: -0.02em;
}

.dash-kpi-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.15rem;
  font-weight: 800;
}

.dash-kpi-status .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dash-kpi-status.danger {
  color: #b91c1c;
}

.dash-kpi-status.danger .dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.dash-kpi-status.ok {
  color: #15803d;
}

.dash-kpi-status.ok .dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.dash-panel {
  background: #fff;
  border: 1px solid var(--imas-border);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 40, 70, 0.08);
  padding: 1rem 1.15rem 0.85rem;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.dash-panel-head h2,
.dash-conn-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--imas-ink);
}

.dash-table-wrap {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.dash-table th {
  text-align: left;
  color: var(--imas-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid #e6eef3;
}

.dash-table td {
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid #eef3f7;
  color: var(--imas-ink);
  vertical-align: middle;
}

.dash-table tr:last-child td {
  border-bottom: none;
}

.dash-panel-foot {
  display: flex;
  justify-content: flex-end;
  padding: 0.55rem 0.15rem 0.35rem;
  border-top: 1px solid #eef3f7;
  margin-top: 0.25rem;
}

.dash-panel-foot a {
  color: var(--imas-cyan-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.92rem;
}

.dash-panel-foot a:hover {
  text-decoration: underline;
}

.dash-empty {
  margin: 0.4rem 0 0.6rem;
  color: var(--imas-muted);
}

.dash-conn-list {
  display: grid;
  gap: 0.75rem;
}

.dash-conn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dash-conn-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1.25rem;
  margin: 0;
  font-size: 0.92rem;
}

.dash-conn-grid dt {
  color: var(--imas-muted);
  font-weight: 600;
}

.dash-conn-grid dd {
  margin: 0;
  color: var(--imas-ink);
  font-weight: 700;
  text-align: right;
}

.dash-actions {
  margin-top: 0.35rem;
}

.dash-actions .imas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  line-height: 1.2;
}

.dash-actions .imas-btn--logout {
  flex: 1 1 180px;
}

/* ——— Login split-screen ——— */
body.imas-body--login {
  background: #edf3f7;
}

.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(2rem, 5vw, 4rem);
  color: #fff;
  background: linear-gradient(145deg, #014a6e 0%, #0578a8 52%, #0aa0c8 100%);
}

.login-brand-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-brand-orb {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.login-brand-orb--a {
  width: 280px;
  height: 280px;
  top: -90px;
  right: -70px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
}

.login-brand-orb--b {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(184, 232, 255, 0.14) 0%, rgba(184, 232, 255, 0) 72%);
}

.login-brand-ring {
  position: absolute;
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  right: -12%;
  bottom: -18%;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.login-brand-inner {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.login-brand-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem;
  box-shadow: 0 10px 28px rgba(0, 25, 45, 0.28);
}

.login-brand-mark-fallback {
  display: none;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid rgba(255, 255, 255, 0.35);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.login-brand-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.login-brand-name {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.login-brand-title {
  margin: 0;
  max-width: 16ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.login-brand-desc {
  margin: 1.35rem 0 0;
  max-width: 42ch;
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.login-brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 2rem;
}

.login-brand-tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(circle at top right, rgba(0, 163, 224, 0.08), transparent 38%),
    #edf3f7;
}

.login-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid rgba(0, 163, 224, 0.14);
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 40, 70, 0.12);
  padding: clamp(1.75rem, 4vw, 2.35rem);
}

.login-card-logo {
  margin-bottom: 1.25rem;
  border-radius: 14px;
  overflow: hidden;
  line-height: 0;
  background: linear-gradient(135deg, #0578a8, #00a3e0);
}

.login-card-logo img {
  width: 100%;
  display: block;
}

.login-card-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.85rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--imas-ink);
  letter-spacing: -0.03em;
}

.login-card-sub {
  margin: 0.55rem 0 1.5rem;
  color: var(--imas-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.login-form .imas-btn.login-btn {
  margin-top: 0.5rem;
  border-radius: 12px;
  background: linear-gradient(180deg, #0578a8, #014a6e);
  box-shadow: 0 10px 22px rgba(1, 74, 110, 0.28);
}

.login-form .imas-btn.login-btn:hover {
  box-shadow: 0 12px 26px rgba(1, 74, 110, 0.36);
}

@media (max-width: 900px) {
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: auto;
    padding: 2rem 1.5rem 2.25rem;
  }

  .login-brand-title {
    max-width: none;
    font-size: clamp(1.75rem, 6vw, 2.35rem);
  }

  .login-brand-desc {
    max-width: none;
  }

  .login-main {
    padding: 1.25rem 1rem 2rem;
  }

  .login-card {
    border-radius: 18px;
  }
}

@media (max-width: 720px) {
  .dash {
    width: 100%;
    gap: 0.85rem;
  }

  .dash-kpis {
    grid-template-columns: 1fr;
  }

  .dash-conn-grid {
    grid-template-columns: 1fr;
  }

  .dash-conn-grid dd {
    text-align: left;
    margin-bottom: 0.35rem;
  }

  .dash-section-title {
    font-size: 1.05rem;
    gap: 0.55rem;
  }

  .dash-table {
    font-size: 0.84rem;
  }

  .dash-table th,
  .dash-table td {
    padding: 0.55rem 0.3rem;
  }

  .dash-panel {
    padding: 0.9rem 0.85rem 0.75rem;
  }

  .dash-panel-foot {
    justify-content: stretch;
  }

  .dash-panel-foot a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.65rem 0.5rem;
    border-radius: 10px;
    background: rgba(0, 163, 224, 0.08);
  }
}
