:root {
  --bg: #eef4f8;
  --panel: #ffffff;
  --panel-alt: #f7fafc;
  --text: #16243c;
  --muted: #5f7288;
  --line: #d4e1e8;
  --brand: #16447a;
  --brand-dark: #0b2d52;
  --accent: #9f3445;
  --accent-soft: #fff3f4;
  --success: #0b7a61;
  --warning: #a8741a;
  --danger: #a93440;
  --theme-teal: #0f6b70;
  --theme-teal-dark: #0a4f55;
  --theme-amber: #b98225;
  --brand-rgb: 22 68 122;
  --brand-dark-rgb: 11 45 82;
  --accent-rgb: 159 52 69;
  --theme-teal-rgb: 15 107 112;
  --theme-amber-rgb: 185 130 37;
  --shadow: 0 18px 40px rgba(12, 38, 72, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgb(var(--brand-rgb) / 0.11), transparent 24%),
    radial-gradient(circle at top right, rgb(var(--theme-teal-rgb) / 0.1), transparent 22%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 54%, #f8fcfb 100%);
  overflow-x: hidden;
}

body.auth-login {
  min-height: 100dvh;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

a {
  color: var(--brand);
}

code {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  border-radius: 0.4rem;
  background: #edf4ff;
  color: var(--brand-dark);
  word-break: break-all;
}

.hero {
  padding: 2rem 2.2rem 1.4rem;
}

.hero__content {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.8rem 2rem 2.15rem;
  border-radius: 1.6rem;
  color: white;
  background:
    linear-gradient(135deg, rgb(var(--brand-rgb) / 0.98), rgb(var(--brand-dark-rgb) / 0.96)),
    linear-gradient(90deg, rgb(var(--theme-teal-rgb) / 0.22), transparent);
  box-shadow: var(--shadow);
  position: relative;
  overflow: visible;
}

.hero__content::after {
  content: "";
  position: absolute;
  inset: auto -40px -40px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 0.18);
  filter: blur(2px);
  pointer-events: none;
}

.hero__identity {
  display: flex;
  align-items: stretch;
  gap: 1.25rem;
  min-width: 0;
}

.hero__home {
  color: inherit;
  text-decoration: none;
}

.hero__home:hover .hero__logo-wrap,
.hero__home:focus-visible .hero__logo-wrap {
  box-shadow: 0 14px 28px rgba(8, 29, 63, 0.2);
}

.hero__home:focus-visible {
  outline: none;
}

.hero__logo-wrap {
  min-width: 150px;
  padding: 0.32rem 0.42rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(8, 29, 63, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.hero__logo {
  display: block;
  width: 100%;
  max-width: 164px;
  height: auto;
  object-fit: contain;
}

.hero__ribbon {
  display: inline-block;
  margin-bottom: 1.1rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--theme-amber));
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__bar {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__copyblock {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.hero__content h1 {
  margin: 0.3rem 0 0.55rem;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.hero__copy {
  max-width: 58rem;
  margin: 0;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
}

.session-card,
.session-links {
  min-width: 220px;
  border-radius: 0.9rem;
}

.session-card {
  color: white;
  position: relative;
  z-index: 3;
}

.session-links {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.session-card form,
.session-menu form {
  margin: 0;
}

.session-menu {
  position: relative;
}

.session-menu__summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 4.1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  list-style: none;
  backdrop-filter: blur(10px);
}

.session-menu__summary::-webkit-details-marker {
  display: none;
}

.session-menu__summary:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.52);
  outline-offset: 3px;
}

.session-menu__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: #ffffff;
  color: var(--brand-dark);
  font-size: 1.05rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.session-menu__identity {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.session-menu__identity strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 1.02rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-menu__identity span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-menu__chevron {
  width: 0.62rem;
  height: 0.62rem;
  border-right: 2px solid rgba(255, 255, 255, 0.88);
  border-bottom: 2px solid rgba(255, 255, 255, 0.88);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.session-menu[open] .session-menu__chevron {
  transform: translateY(0.2rem) rotate(225deg);
}

.session-menu__panel {
  position: absolute;
  inset: calc(100% + 0.5rem) 0 auto auto;
  min-width: min(19rem, calc(100vw - 2rem));
  padding: 0.35rem;
  border: 1px solid rgba(215, 224, 239, 0.95);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 38px rgba(9, 41, 84, 0.16);
  color: var(--text);
}

.session-menu__profile {
  display: grid;
  gap: 0.12rem;
  padding: 0.75rem 0.8rem 0.7rem;
  border-bottom: 1px solid rgba(215, 224, 239, 0.86);
}

.session-menu__profile strong {
  color: var(--text);
  line-height: 1.2;
}

.session-menu__profile span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.session-menu__panel-label {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.session-menu__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.72rem 0.8rem;
  border: 0;
  border-radius: 0.58rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.session-menu__item:hover,
.session-menu__item:focus-visible {
  outline: none;
  background: #edf7f6;
  color: var(--brand-dark);
}

.session-card__button,
.tool-form button,
.role-form__button,
.inline-link-button,
.session-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.92rem 1rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--theme-teal) 58%, var(--accent));
}

.session-card__button {
  width: 100%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.session-links {
  display: grid;
  gap: 0.8rem;
}

.auth-register .session-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: min(30rem, 42vw);
  gap: 0.65rem;
}

.auth-register .session-link {
  padding: 0.82rem 0.85rem;
}

.session-card__actions {
  display: grid;
  gap: 0.72rem;
  margin-top: 0.85rem;
}

.session-card__button--link {
  text-decoration: none;
}

.session-link--secondary {
  background: rgba(255, 255, 255, 0.18);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  font-weight: 700;
  opacity: 0.82;
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  flex: 1 0 auto;
  padding: 0 2.2rem 3rem;
}

.auth-login .hero,
.auth-register .hero {
  padding: 0.72rem 2.2rem 0.52rem;
}

.auth-login .hero__content,
.auth-register .hero__content {
  max-width: none;
  padding: 0.95rem 1.1rem 1rem;
}

.auth-login .hero__logo-wrap,
.auth-register .hero__logo-wrap {
  min-width: 148px;
  padding: 0.3rem 0.38rem;
}

.auth-login .hero__ribbon {
  margin-bottom: 0.42rem;
  padding: 0.32rem 0.68rem;
  font-size: 0.72rem;
}

.auth-login .hero__content h1,
.auth-register .hero__content h1 {
  margin: 0.2rem 0 0.32rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.auth-login .hero__copy,
.auth-register .hero__copy {
  max-width: 40rem;
  font-size: 0.84rem;
  line-height: 1.25;
}

.auth-login .page-shell {
  flex: 0 0 auto;
  max-width: none;
  min-height: 0;
  padding: 0 2.2rem 0.12rem;
  overflow: visible;
}

.auth-register .page-shell {
  max-width: none;
  padding-left: 2.2rem;
  padding-right: 2.2rem;
}

.portal-home .hero {
  padding: 0.72rem 2.2rem 0.52rem;
}

.portal-home .hero__content {
  max-width: none;
  padding: 0.95rem 1.1rem 1rem;
}

.portal-home .hero__bar {
  gap: 1.1rem;
}

.portal-home .hero__logo-wrap {
  min-width: 148px;
  padding: 0.3rem 0.38rem;
}

.portal-home .hero__logo {
  max-width: 142px;
}

.portal-home .hero__content h1 {
  margin: 0.2rem 0 0.32rem;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.portal-home .hero__copy {
  max-width: 44rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.portal-home .session-card {
  padding: 0.82rem 0.9rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 28px rgba(8, 29, 63, 0.12);
}

.portal-home .session-card__actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
  margin-top: 0.62rem;
}

.portal-home .session-card__button {
  min-height: 3.05rem;
  padding: 0.76rem 0.82rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: none;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.portal-home .session-card__button:hover,
.portal-home .session-card__button:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.portal-home .page-shell {
  max-width: none;
  padding-top: 0;
  padding-left: 2.2rem;
  padding-right: 2.2rem;
}

.portal-home .portal-footer {
  padding-left: 2.2rem;
  padding-right: 2.2rem;
}

.portal-home .portal-footer__bar,
.auth-login .portal-footer__bar,
.auth-register .portal-footer__bar {
  max-width: none;
}

.flash-stack {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}

.flash {
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.flash--success {
  border-color: rgba(16, 116, 93, 0.22);
  color: var(--success);
}

.flash--error {
  border-color: rgba(165, 48, 48, 0.2);
  color: var(--danger);
}

.form-message {
  grid-column: 1 / -1;
  margin: 0;
}

.global-activity {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(229, 235, 246, 0.16);
}

.global-activity[hidden] {
  display: none;
}

.global-activity__card {
  display: inline-grid;
  justify-items: center;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
}

.global-activity__logo-ring {
  position: relative;
  width: 5.25rem;
  height: 5.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 0 18px 45px rgba(20, 36, 70, 0.16);
  animation: spin 1.1s linear infinite;
}

.global-activity__logo-ring::after {
  content: "";
  position: absolute;
  width: 5.55rem;
  height: 5.55rem;
  border: 3px solid rgba(10, 78, 161, 0.12);
  border-top-color: var(--brand);
  border-radius: 50%;
}

.global-activity__logo {
  width: 4.1rem;
  height: 4.1rem;
  object-fit: contain;
}

.global-activity [data-global-activity-text] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.form-loader {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(10, 78, 161, 0.18);
  border-radius: 0.85rem;
  background: #edf4ff;
  color: var(--brand);
  font-weight: 700;
}

.form-loader[hidden] {
  display: none;
}

.form-loader__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(10, 78, 161, 0.22);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.summary-grid,
.tool-grid,
.login-grid {
  display: grid;
  gap: 1.2rem;
  align-items: stretch;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 1.25rem;
}

.auth-login .summary-grid {
  display: none;
}

.summary-card,
.tool-card,
.history-card,
.result-card,
.login-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(215, 224, 239, 0.95);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
  min-width: 0;
}

.summary-card {
  padding: 1rem 1.15rem;
  position: relative;
  overflow: hidden;
}

.summary-grid--tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-grid--tabs-admin {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-grid--tabs-ba {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-grid--tabs-sla-only {
  grid-template-columns: minmax(250px, 420px);
}

.summary-card--nav {
  display: block;
  width: 100%;
  border: 1px solid rgba(215, 224, 239, 0.95);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.summary-card--nav:hover,
.summary-card--nav:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(10, 78, 161, 0.3);
  box-shadow: 0 22px 42px rgba(9, 41, 84, 0.14);
}

.summary-card--nav:focus-visible {
  outline: 2px solid rgba(10, 78, 161, 0.24);
  outline-offset: 2px;
}

.summary-card--nav.is-active {
  border-color: rgba(10, 78, 161, 0.35);
  background: linear-gradient(180deg, rgba(237, 244, 255, 0.98), rgba(255, 255, 255, 0.98));
  box-shadow: 0 22px 42px rgba(9, 41, 84, 0.14);
}

.auth-login .summary-card {
  padding: 0.78rem 0.88rem;
}

.auth-login .summary-card strong {
  font-size: 0.93rem;
}

.summary-card strong,
.summary-card--nav strong,
.service-selector-card strong,
.service-selector-card__copy,
.hero__copy,
.result-note,
.login-copy,
.tool-card__header p:last-child,
.service-selector-expanded-card__copy,
.service-note p,
.empty-state,
.portal-footer__brandline,
.audit-detail-grid span:not(.field-label) {
  overflow-wrap: anywhere;
}

.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand), var(--theme-teal), var(--accent));
}

.summary-label,
.field-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.field-label--stacked {
  line-height: 1.08;
}

.field-label--stacked span {
  display: block;
  white-space: nowrap;
}

.result-card,
.history-card {
  padding: 1.4rem;
  margin-bottom: 1.25rem;
}

.history-card--panel {
  display: none;
}

.history-card--panel.history-card--active {
  display: block;
}

.login-card,
.tool-card {
  padding: 1.35rem;
}

.result-card__header,
.history-card__header,
.tool-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.result-card__header h2,
.history-card__header h2,
.tool-card__header h2,
.login-card h2 {
  margin: 0.2rem 0 0.4rem;
}

.chip {
  align-self: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: #edf4ff;
  color: var(--brand);
  font-size: 0.83rem;
  font-weight: 700;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.result-grid__wide {
  grid-column: 1 / -1;
}

.speed-test-public {
  --speed-primary: #123f7a;
  --speed-primary-2: #1f5b9d;
  --speed-canvas: #eef4fb;
  --speed-card: rgba(255, 255, 255, 0.96);
  --speed-card-soft: #f7fafd;
  --speed-border: rgba(178, 196, 224, 0.68);
  --speed-shadow: 0 12px 26px rgba(15, 45, 88, 0.08);
  --metric-accent: #2f68c2;
  --metric-line: #2f68c2;
  --metric-fill: rgba(47, 104, 194, 0.1);
  background:
    linear-gradient(180deg, #f6f9fd 0%, var(--speed-canvas) 54%, #fbfdff 100%);
}

.speed-test-public .page-shell {
  max-width: none;
  display: grid;
  align-items: stretch;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: 0.42rem clamp(1rem, 3vw, 2.6rem);
}

.speed-page {
  width: min(100%, 1480px);
  height: calc(100dvh - 0.84rem);
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.46rem;
  overflow: hidden;
}

.speed-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, min(34%, 340px));
  grid-template-areas:
    "copy status"
    "tools tools";
  column-gap: 1.1rem;
  row-gap: 0.42rem;
  align-items: center;
  padding: 0.58rem 0.88rem;
  border-radius: 1.05rem;
  color: white;
  background:
    linear-gradient(135deg, rgba(13, 53, 103, 0.99), rgba(32, 86, 154, 0.94)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09), transparent);
  box-shadow: 0 14px 30px rgba(9, 41, 84, 0.14);
  position: relative;
  overflow: hidden;
}

.speed-hero-card::after {
  display: none;
}

.speed-hero-card__copy {
  grid-area: copy;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.speed-hero-card__status {
  grid-area: status;
  position: relative;
  z-index: 1;
  min-width: 236px;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  align-items: flex-end;
}

.speed-hero-card__tools {
  grid-area: tools;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, auto) minmax(12rem, 1fr);
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.speed-mode-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 235px;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
}

.speed-mode-toggle button {
  min-height: 2.15rem;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
}

.speed-mode-toggle button.is-active {
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(9, 41, 84, 0.18);
}

.speed-server-select {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, auto) auto;
  gap: 0.55rem;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 0.42rem 0.48rem 0.42rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.13);
}

.speed-server-select.is-disabled {
  opacity: 0.58;
}

.speed-server-select span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.speed-server-select select {
  appearance: none;
  min-width: 0;
  width: var(--speed-server-select-width, 26rem);
  max-width: min(52rem, 58vw);
  min-height: 2rem;
  border: 0;
  border-radius: 999px;
  color: var(--brand-dark);
  background-color: rgba(255, 255, 255, 0.96);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5 10 12.5 15 7.5' stroke='%230b3f7d' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 1.05rem 1.05rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  padding: 0 2.75rem 0 1rem;
  text-overflow: ellipsis;
}

.speed-server-select select::-ms-expand {
  display: none;
}

.speed-server-native-select {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

.speed-server-trigger {
  appearance: none;
  min-width: 0;
  width: var(--speed-server-select-width, 26rem);
  max-width: min(52rem, 58vw);
  min-height: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.96);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: left;
  padding: 0 0.95rem 0 1rem;
  cursor: pointer;
}

.speed-server-trigger::after {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  border-right: 3px solid var(--brand-dark);
  border-bottom: 3px solid var(--brand-dark);
  transform: translateY(-0.12rem) rotate(45deg);
}

.speed-server-trigger span {
  min-width: 0;
  overflow: hidden;
  color: var(--brand-dark);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-transform: none;
  text-overflow: ellipsis;
}

.speed-server-select.is-open .speed-server-trigger::after {
  transform: translateY(0.18rem) rotate(225deg);
}

.speed-server-trigger:disabled {
  cursor: wait;
  opacity: 0.78;
}

.speed-server-menu {
  position: fixed;
  z-index: 10000;
  width: var(--speed-server-select-width, 26rem);
  max-width: min(52rem, calc(100vw - 2rem));
  max-height: min(24rem, calc(100vh - 10rem));
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid rgba(184, 203, 230, 0.75);
  border-radius: 0.85rem;
  background: rgba(34, 43, 58, 0.96);
  box-shadow: 0 18px 34px rgba(7, 26, 55, 0.3);
}

.speed-server-menu[hidden] {
  display: none;
}

.speed-server-option {
  width: 100%;
  min-height: 2.25rem;
  display: block;
  align-items: center;
  border: 0;
  border-radius: 0.55rem;
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.speed-server-option.is-selected,
.speed-server-option:hover,
.speed-server-option:focus-visible {
  background: #2f7de1;
  outline: none;
}

.speed-server-option span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-transform: none;
  text-overflow: ellipsis;
}

.speed-server-select.is-loading select {
  cursor: wait;
}

.speed-server-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.speed-server-loading[hidden] {
  display: none;
}

.speed-server-loading::before {
  content: "";
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.26);
  border-top-color: rgba(255, 255, 255, 0.96);
  animation: speedSpin 0.9s linear infinite;
}

.speed-connection-health {
  justify-self: stretch;
  width: auto;
  max-width: 100%;
  min-height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.72rem;
  border: 1px solid rgba(184, 203, 230, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(7, 26, 55, 0.12);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speed-connection-health[data-state="running"] {
  border-color: rgba(184, 203, 230, 0.95);
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
}

.speed-connection-health[data-state="complete"] {
  border-color: rgba(184, 203, 230, 0.95);
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
}

.speed-connection-health[data-state="warning"] {
  border-color: rgba(251, 191, 36, 0.72);
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
}

.speed-connection-health[data-state="error"] {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
}

.speed-hero-card h2 {
  margin: 0.1rem 0 0.22rem;
  font-size: clamp(1.75rem, 3.1vw, 2.75rem);
  letter-spacing: 0;
}

.speed-hero-card__copy > p:not(.eyebrow) {
  margin: 0;
  max-width: 58rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.9);
}

.speed-status-pill {
  flex: 0 0 auto;
  min-width: 130px;
  padding: 0.66rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.14);
  text-align: center;
  font-weight: 800;
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.speed-result-meta {
  width: 100%;
  display: grid;
  gap: 0.38rem;
  padding: 0.72rem 0.92rem;
  border-radius: 1.4rem;
  border: 0;
  background: rgba(255, 255, 255, 0.96);
  color: var(--brand-dark);
  box-shadow: 0 10px 24px rgba(9, 41, 84, 0.18);
}

.speed-result-meta[hidden] {
  display: none;
}

.speed-result-meta div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.82rem;
  align-items: baseline;
}

.speed-result-meta span {
  color: var(--brand-dark);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.speed-result-meta strong {
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: right;
  overflow-wrap: anywhere;
}

.speed-hero-card__note {
  width: 100%;
  max-width: 20rem;
  margin: auto 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.98rem;
  line-height: 1.35;
  text-align: right;
}

.speed-hero-card__note a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.speed-dashboard {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
  gap: 0.58rem;
  align-items: stretch;
  min-height: 0;
}

.speed-gauge-card,
.speed-metric-card,
.speed-info-card,
.speed-stage-card {
  border: 1px solid var(--speed-border);
  background: var(--speed-card);
  box-shadow: var(--speed-shadow);
}

.speed-gauge-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 0.42rem;
  padding: 0.5rem;
  border-radius: 1rem;
  height: 100%;
  min-height: 0;
}

.speed-gauge-card__main {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.34rem;
  justify-self: center;
}

.speed-gauge-card__meta {
  width: min(100%, 260px);
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
  align-self: center;
  align-items: center;
  justify-self: center;
}

.speed-gauge {
  width: min(100%, clamp(148px, 19dvh, 188px));
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.speed-gauge__ring {
  --gauge-progress: 0%;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    conic-gradient(from 220deg, var(--speed-primary-2) 0 var(--gauge-progress), rgba(211, 222, 238, 0.88) var(--gauge-progress) 100%),
    linear-gradient(145deg, #ffffff, #eef5fb);
  box-shadow:
    inset 0 0 0 1px rgba(10, 78, 161, 0.08),
    0 24px 50px rgba(9, 41, 84, 0.12);
  padding: 0.72rem;
}

.speed-gauge__inner {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: inherit;
  background:
    radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96)),
    white;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(215, 224, 239, 0.9);
}

.speed-gauge__inner span {
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.speed-gauge__inner strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--brand-dark);
  font-size: clamp(1.82rem, 3.5vw, 2.95rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.speed-gauge__inner small {
  margin-top: 0.15rem;
  color: var(--muted);
  font-weight: 700;
}

.speed-start-button {
  width: min(100%, 260px);
  min-height: 2.3rem;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #1d57a3, #2e8a9a);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(10, 78, 161, 0.22);
}

.speed-start-button:disabled {
  cursor: wait;
  opacity: 0.75;
}

.speed-progress {
  width: min(100%, 260px);
  height: 0.42rem;
  border-radius: 999px;
  background: #e5edf8;
  overflow: hidden;
}

.speed-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1d57a3, #2e8a9a);
  transition: width 0.18s ease;
}

.speed-facts-card {
  width: 100%;
  max-width: 100%;
  display: grid;
  border: 1px solid rgba(215, 224, 239, 0.95);
  border-radius: 0.82rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.97), rgba(244, 248, 255, 0.96)),
    white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  justify-self: center;
}

.speed-fact-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: center;
  padding: 0.46rem 0.7rem;
}

.speed-fact-row + .speed-fact-row {
  border-top: 1px solid rgba(215, 224, 239, 0.88);
}

.speed-fact-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.speed-fact-row strong {
  color: var(--brand-dark);
  font-size: 0.95rem;
  font-weight: 900;
  text-align: right;
  overflow-wrap: anywhere;
}

.speed-fact-row[hidden] {
  display: none;
}

.speed-message {
  display: none;
}

.speed-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.52rem;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  align-items: stretch;
  align-content: stretch;
}

.speed-metric-card {
  min-height: 0;
  height: 100%;
  padding: 0.56rem 0.66rem 0.42rem;
  border-radius: 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(248, 251, 255, 0.96)),
    var(--speed-card);
}

.speed-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--metric-accent);
}

.speed-metric-card__header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.46rem;
  align-items: start;
}

.speed-metric-card__reading {
  display: inline-flex;
  align-items: flex-end;
  justify-self: end;
  gap: 0.34rem;
  min-width: 0;
  white-space: nowrap;
}

.speed-metric-card__peak {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28rem;
  color: rgba(72, 97, 139, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.speed-metric-card .speed-metric-card__peak strong {
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  align-self: baseline;
}

.speed-metric-card__peak-unit {
  color: rgba(72, 97, 139, 0.88);
  font-size: 0.66rem;
  font-weight: 800;
}

.speed-metric-card__support {
  color: rgba(72, 97, 139, 0.88);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.15;
  min-height: 0.78rem;
}

.speed-metric-card--compact {
  padding: 0.58rem 0.72rem 0.26rem;
  gap: 0.2rem;
}

.speed-metric-card--compact .speed-metric-card__header {
  gap: 0.44rem;
}

.speed-metric-card--compact strong {
  font-size: clamp(1.42rem, 2.2vw, 2.16rem);
}

.speed-metric-card--compact .speed-metric-unit {
  font-size: 0.78rem;
  padding-bottom: 0.08rem;
}

.speed-metric-card strong {
  align-self: start;
  color: var(--brand-dark);
  font-size: clamp(1.3rem, 1.85vw, 2.02rem);
  line-height: 0.98;
  font-variant-numeric: tabular-nums;
}

.speed-metric-unit {
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0;
  color: rgba(18, 67, 136, 0.92);
  line-height: 1;
  padding-bottom: 0.18rem;
}

.speed-metric-chart {
  --chart-axis-inset: 0.2rem;
  position: relative;
  min-height: 0;
  border-radius: 0.82rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.94));
  border: 1px solid rgba(174, 194, 224, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 10px 18px rgba(25, 62, 118, 0.06);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.82rem minmax(0, 1fr);
  gap: 0.03rem;
  padding: 0.16rem 0.22rem 0.01rem 0.1rem;
  flex: 1 1 auto;
}

.speed-metric-chart__plot {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding-right: 0.02rem;
  min-height: 0;
}

.speed-metric-chart__y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  min-width: 0;
  padding: 0.02rem 0.14rem 0.18rem 0;
}

.speed-metric-chart__axis-label,
.speed-metric-chart__x-axis span {
  color: rgba(72, 97, 139, 0.92);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.speed-metric-chart__axis-label--bottom {
  opacity: 0.64;
}

.speed-metric-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.speed-metric-chart__x-axis {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 0.22rem;
  line-height: 0.66;
  padding-top: 0;
  padding-left: var(--chart-axis-inset);
  padding-right: var(--chart-axis-inset);
}

.speed-metric-card--download .speed-metric-chart,
.speed-metric-card--upload .speed-metric-chart,
.speed-metric-card--download-data .speed-metric-chart,
.speed-metric-card--upload-data .speed-metric-chart {
  min-height: 3.65rem;
}

.speed-metric-card--compact .speed-metric-chart {
  min-height: 0;
  grid-template-columns: 1.48rem minmax(0, 1fr);
  padding: 0.12rem 0.14rem 0 0.09rem;
}

.speed-metric-card--compact .speed-metric-chart__y-axis {
  padding: 0.01rem 0.1rem 0.09rem 0;
}

.speed-metric-card--compact .speed-metric-chart__x-axis {
  min-height: 0.16rem;
}

.speed-metric-card--compact .speed-metric-chart__axis-label,
.speed-metric-card--compact .speed-metric-chart__x-axis span {
  font-size: 0.58rem;
}

.speed-metric-chart__grid {
  fill: none;
  stroke: rgba(70, 92, 124, 0.12);
  stroke-width: 1;
  stroke-dasharray: 3 4.2;
}

.speed-metric-chart__grid--base {
  stroke: rgba(70, 92, 124, 0.2);
  stroke-dasharray: none;
}

.speed-metric-chart__axis {
  fill: none;
  stroke: rgba(70, 92, 124, 0.18);
  stroke-width: 1;
}

.speed-metric-chart__fill {
  fill: var(--metric-fill);
}

.speed-metric-chart__line {
  fill: none;
  stroke: var(--metric-line);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0.5px 0.75px rgba(27, 94, 189, 0.08));
}

.speed-metric-chart__dot {
  fill: var(--metric-line);
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 0.8;
}

.speed-metric-chart__bars {
  fill: var(--metric-line);
}

.speed-metric-chart__bar {
  fill: var(--metric-line);
  filter: drop-shadow(0 0.4px 0.55px rgba(27, 94, 189, 0.05));
}

.speed-metric-chart--line {
  min-height: 5.15rem;
}

.speed-metric-chart--line .speed-metric-chart__fill {
  fill: rgba(50, 124, 230, 0.08);
}

.speed-metric-chart--bar {
  min-height: 3.65rem;
}

.speed-metric-chart--bar .speed-metric-chart__fill,
.speed-metric-chart--bar .speed-metric-chart__line,
.speed-metric-chart--bar .speed-metric-chart__dot {
  opacity: 0;
}

.speed-metric-card--download {
  --metric-accent: #2f68c2;
  --metric-line: #356fd0;
  --metric-fill: rgba(53, 111, 208, 0.11);
  background: linear-gradient(145deg, rgba(245, 249, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.speed-metric-card--upload {
  --metric-accent: #238393;
  --metric-line: #238393;
  --metric-fill: rgba(35, 131, 147, 0.1);
  background: linear-gradient(145deg, rgba(243, 250, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.speed-metric-card--latency {
  --metric-accent: #536da8;
  --metric-line: #536da8;
  --metric-fill: rgba(83, 109, 168, 0.1);
  background: linear-gradient(145deg, rgba(246, 248, 253, 0.98), rgba(255, 255, 255, 0.98));
}

.speed-metric-card--download-data {
  --metric-accent: #348367;
  --metric-line: #348367;
  --metric-fill: rgba(52, 131, 103, 0.1);
  background: linear-gradient(145deg, rgba(244, 251, 248, 0.98), rgba(255, 255, 255, 0.98));
}

.speed-metric-card--upload-data {
  --metric-accent: #b7832f;
  --metric-line: #b7832f;
  --metric-fill: rgba(183, 131, 47, 0.11);
  background: linear-gradient(145deg, rgba(255, 250, 240, 0.98), rgba(255, 255, 255, 0.98));
}

.speed-metric-card--jitter {
  --metric-accent: #755aa9;
  --metric-line: #755aa9;
  --metric-fill: rgba(117, 90, 169, 0.1);
  background: linear-gradient(145deg, rgba(248, 246, 252, 0.98), rgba(255, 255, 255, 0.98));
}

.speed-metric-card--download-data::before {
  background: linear-gradient(180deg, #348367, #71b49b);
}

.speed-metric-card--upload-data::before {
  background: linear-gradient(180deg, #b7832f, #d8b96d);
}

.speed-metric-card--latency::before {
  background: linear-gradient(180deg, #536da8, #8b9cc7);
}

.speed-metric-card--jitter::before {
  background: linear-gradient(180deg, #755aa9, #ac91c0);
}

.speed-info-card {
  grid-column: 1 / -1;
  min-height: 0;
  padding: 0.48rem 0.64rem;
  border-radius: 0.92rem;
  display: grid;
  grid-template-columns: minmax(130px, 0.82fr) minmax(300px, 1.95fr) minmax(136px, 0.9fr) minmax(120px, 0.7fr);
  gap: 0.5rem;
  align-items: center;
}

.speed-info-card div {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.speed-info-card div[hidden] {
  display: none;
}

.speed-info-card strong {
  color: var(--brand-dark);
  font-size: 0.82rem;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.speed-info-card__note {
  grid-column: 1 / -1;
  margin: 0.08rem 0 0;
  color: rgba(77, 95, 126, 0.9);
  font-size: 0.74rem;
  line-height: 1.28;
}

.speed-stage-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.46rem;
  padding: 0.42rem;
  border-radius: 1rem;
  min-height: 0;
}

.speed-stage {
  min-width: 0;
  display: block;
  padding: 0.44rem 0.6rem;
  border-radius: 0.78rem;
  background: rgba(248, 251, 255, 0.86);
  border: 1px solid rgba(178, 196, 224, 0.62);
}

.speed-stage strong,
.speed-stage small {
  display: block;
}

.speed-stage strong {
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.15;
}

.speed-stage small {
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.22;
}

.speed-stage.is-running {
  border-color: rgba(31, 91, 157, 0.34);
  background: rgba(236, 244, 255, 0.88);
}

.speed-stage.is-running span {
  color: white;
  background: var(--brand);
}

.speed-stage.is-complete {
  border-color: rgba(52, 131, 103, 0.28);
  background: rgba(52, 131, 103, 0.07);
}

.speed-stage.is-complete span {
  color: white;
  background: var(--success);
}

.speed-stage.is-error {
  border-color: rgba(158, 70, 80, 0.3);
  background: rgba(158, 70, 80, 0.07);
}

.speed-stage.is-error span {
  color: white;
  background: var(--danger);
}

@keyframes speedSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 981px) {
  body.speed-test-public {
    overflow-x: hidden;
    overflow-y: hidden;
  }
}

@media (min-width: 981px) and (max-width: 1240px) {
  .speed-dashboard {
    grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  }
}

@media (min-width: 981px) and (max-height: 650px) {
  .speed-test-public .page-shell {
    padding-top: 0.18rem;
    padding-bottom: 0.18rem;
  }

  .speed-page {
    min-height: calc(100dvh - 0.36rem);
    gap: 0.14rem;
  }

  .speed-hero-card {
    padding: 0.36rem 0.72rem;
    border-radius: 0.86rem;
  }

  .speed-hero-card .eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
  }

  .speed-hero-card h2 {
    margin: 0.05rem 0 0.14rem;
    font-size: clamp(1.34rem, 2.45vw, 1.96rem);
  }

  .speed-hero-card__copy > p:not(.eyebrow) {
    font-size: 0.8rem;
    line-height: 1.14;
  }

  .speed-hero-card__tools {
    margin-top: 0.36rem;
    gap: 0.38rem;
    grid-template-columns: auto minmax(0, auto) minmax(9rem, 1fr);
  }

  .speed-mode-toggle {
    min-width: 205px;
    padding: 0.16rem;
  }

  .speed-mode-toggle button {
    min-height: 1.74rem;
    font-size: 0.76rem;
  }

  .speed-server-select {
    padding: 0.22rem 0.32rem 0.22rem 0.52rem;
    gap: 0.38rem;
  }

  .speed-server-select span {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  .speed-server-select select,
  .speed-server-trigger {
    min-height: 1.66rem;
    font-size: 0.74rem;
  }

  .speed-server-trigger {
    padding: 0 0.72rem;
    gap: 0.52rem;
  }

  .speed-server-loading {
    font-size: 0.58rem;
    gap: 0.22rem;
  }

  .speed-server-loading::before {
    width: 0.66rem;
    height: 0.66rem;
  }

  .speed-connection-health {
    min-height: 1.12rem;
    padding: 0.18rem 0.52rem;
    font-size: 0.62rem;
  }

  .speed-status-pill {
    min-width: 112px;
    padding: 0.46rem 0.72rem;
  }

  .speed-hero-card__status {
    gap: 0.28rem;
    flex-basis: min(36%, 360px);
  }

  .speed-hero-card__note {
    max-width: 15rem;
    font-size: 0.62rem;
    line-height: 1.2;
  }

  .speed-result-meta {
    gap: 0.2rem;
    padding: 0.36rem 0.54rem;
    border-radius: 0.62rem;
  }

  .speed-result-meta div {
    gap: 0.48rem;
  }

  .speed-result-meta span {
    font-size: 0.58rem;
    letter-spacing: 0.06em;
  }

  .speed-result-meta strong {
    font-size: 0.76rem;
  }

  .speed-dashboard {
    gap: 0.42rem;
  }

  .speed-gauge-card {
    gap: 0.22rem;
    padding: 0.26rem;
    border-radius: 0.82rem;
  }

  .speed-gauge-card__main {
    gap: 0.22rem;
  }

  .speed-gauge-card__meta {
    gap: 0.22rem;
  }

  .speed-gauge {
    width: min(100%, clamp(128px, 21dvh, 168px));
  }

  .speed-gauge__ring {
    padding: 0.58rem;
  }

  .speed-gauge__inner span {
    font-size: 0.7rem;
  }

  .speed-gauge__inner strong {
    font-size: clamp(1.9rem, 3.5vw, 2.9rem);
  }

  .speed-start-button {
    min-height: 1.86rem;
  }

  .speed-progress {
    height: 0.26rem;
  }

  .speed-facts-card {
    border-radius: 0.6rem;
  }

  .speed-fact-row {
    padding: 0.18rem 0.42rem;
  }

  .speed-fact-row span {
    font-size: 0.68rem;
  }

  .speed-fact-row strong {
    font-size: 0.84rem;
  }

  .speed-message {
    min-height: 0;
    font-size: 0.72rem;
    line-height: 1.08;
    display: none;
  }

  .speed-metric-grid {
    gap: 0.42rem;
  }

  .speed-metric-card {
    padding: 0.46rem 0.62rem 0.44rem;
    border-radius: 0.76rem;
    gap: 0.32rem;
  }

  .speed-metric-card strong {
    font-size: clamp(1.18rem, 2.2vw, 1.76rem);
  }

  .speed-metric-card__header {
    gap: 0.42rem;
  }

  .speed-metric-card__reading {
    gap: 0.24rem;
  }

  .speed-metric-card__peak {
    gap: 0.18rem;
    font-size: 0.56rem;
  }

  .speed-metric-card .speed-metric-card__peak strong {
    font-size: 0.72rem;
  }

  .speed-metric-card__peak-unit {
    font-size: 0.52rem;
  }

  .speed-metric-unit {
    font-size: 0.64rem;
    padding-bottom: 0.1rem;
  }

  .speed-metric-chart {
    min-height: 3.45rem;
    border-radius: 0.56rem;
    grid-template-columns: 1.46rem minmax(0, 1fr);
    padding: 0.22rem 0.24rem 0.18rem 0.12rem;
  }

  .speed-metric-chart--line {
    min-height: 2.95rem;
  }

  .speed-metric-chart__axis-label,
  .speed-metric-chart__x-axis span {
    font-size: 0.46rem;
  }

  .speed-info-card {
    grid-template-columns: minmax(112px, 0.82fr) minmax(235px, 1.85fr) minmax(120px, 0.88fr) minmax(92px, 0.62fr);
    padding: 0.26rem 0.42rem;
    gap: 0.28rem;
    border-radius: 0.72rem;
  }

  .speed-info-card strong {
    font-size: 0.68rem;
    line-height: 1.06;
  }

  .speed-info-card__note {
    margin-top: 0.02rem;
    font-size: 0.6rem;
    line-height: 1.16;
  }

  .speed-stage-card {
    gap: 0.24rem;
    padding: 0.18rem;
    border-radius: 0.62rem;
  }

  .speed-stage {
    padding: 0.3rem 0.36rem;
    border-radius: 0.52rem;
  }

  .speed-stage strong {
    font-size: 0.76rem;
  }

  .speed-stage small {
    margin-top: 0.12rem;
    font-size: 0.58rem;
    line-height: 1.2;
  }
}

.tool-grid,
.login-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 1.5rem;
}

.service-workbench {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.service-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-top: 1.15rem;
  align-items: stretch;
  grid-auto-rows: 1fr;
}

.service-selector-slot {
  min-width: 0;
}

@media (min-width: 1180px) {
  .service-selector-grid.service-selector-grid--sla {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .service-selector-grid.service-selector-grid--recalculator {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .service-selector-grid.service-selector-grid--tip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-selector-grid--sla .service-selector-card {
    min-height: 10.4rem;
    padding: 1.15rem;
  }

  .service-selector-grid--sla .service-selector-card strong {
    font-size: 1.18rem;
    line-height: 1.2;
  }

  .service-selector-grid--sla .service-selector-card__copy {
    font-size: 0.96rem;
    line-height: 1.42;
  }
}

.service-selector-card,
.service-detail-card {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(215, 224, 239, 0.95);
  border-radius: 1.25rem;
  box-shadow: var(--shadow);
}

.service-selector-card {
  width: 100%;
  min-height: 11.25rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  justify-content: flex-start;
  align-items: stretch;
}

.service-selector-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--brand), var(--theme-teal), var(--accent));
}

.service-selector-card:hover,
.service-selector-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgb(var(--theme-teal-rgb) / 0.28);
  box-shadow: 0 22px 42px rgba(12, 38, 72, 0.13);
}

.service-selector-card:focus-visible {
  outline: 2px solid rgb(var(--theme-teal-rgb) / 0.24);
  outline-offset: 2px;
}

.service-selector-card.is-active {
  border-color: rgb(var(--theme-teal-rgb) / 0.36);
  background: linear-gradient(180deg, rgb(var(--theme-teal-rgb) / 0.08), rgba(255, 255, 255, 0.98));
  box-shadow: 0 22px 42px rgba(12, 38, 72, 0.13);
}

.service-selector-card strong {
  display: block;
  margin-top: 0.16rem;
  font-size: 1.15rem;
  line-height: 1.24;
}

.service-selector-card__eyebrow {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.service-selector-card__copy {
  display: block;
  margin-top: 0.72rem;
  flex: 1 1 auto;
  color: var(--muted);
  line-height: 1.55;
  text-align: justify;
  text-align-last: left;
}

.service-selector-expanded-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.service-selector-expanded-card__header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.service-selector-expanded-card__header h2 {
  margin: 0.2rem 0 0.3rem;
}

.service-selector-expanded-card__copy {
  margin: 0.2rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.service-selector-expanded-card__close {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(10, 78, 161, 0.18);
  border-radius: 999px;
  background: #edf4ff;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.service-detail-stack {
  display: grid;
  gap: 1.25rem;
}

.service-detail-card {
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(10, 78, 161, 0.18);
  border-radius: 1.25rem;
  box-shadow: 0 22px 42px rgba(9, 41, 84, 0.12);
  min-width: 0;
}

.service-detail-card:focus {
  outline: none;
}

.service-detail-card:focus-visible {
  outline: 2px solid rgb(var(--theme-teal-rgb) / 0.28);
  outline-offset: 3px;
}

.service-detail-card--placeholder {
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.service-note {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel-alt);
}

.service-note p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.split-input-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.9fr) auto minmax(0, 1.8fr);
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
}

.split-input-row--mobile {
  grid-template-columns: 88px minmax(0, 1fr);
}

.split-input-row__part {
  width: 100%;
}

.split-input-row__part--prefix {
  text-align: center;
  font-weight: 700;
  color: #7b879d;
  background: #e7edf7;
  border-color: #d1dced;
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: #7b879d;
}

.split-input-row__part--prefix:disabled,
.split-input-row__part--prefix[readonly] {
  color: #7b879d;
  background: #e7edf7;
  border-color: #d1dced;
  opacity: 1;
  -webkit-text-fill-color: #7b879d;
}

.split-input-row__part--mobile {
  min-width: 0;
}

.split-input-row__divider {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}

.service-result-card {
  margin-bottom: 0;
  margin-top: 0.35rem;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 0.95rem 1rem 0.88rem;
}

.service-result-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
  gap: 1.25rem;
  align-items: start;
}

.service-result-card__header {
  align-items: flex-start;
  margin-bottom: 0.45rem;
}

.service-result-card__header h2 {
  margin: 0.1rem 0 0;
}

.service-result-card__chip {
  align-self: flex-start;
  padding: 0.42rem 0.84rem;
  font-size: 1.02rem;
}

.service-result-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.service-result-card__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  align-items: flex-start;
}

.service-result-card__summary-item {
  min-width: 0;
}

.service-result-card__summary-item .field-label,
.service-result-card__actions .field-label,
.service-result-card__creator .field-label {
  margin-bottom: 0.14rem;
  font-size: 0.86rem;
}

.service-result-card__summary-item code,
.service-result-card__creator code {
  display: inline-block;
  padding: 0.14rem 0.42rem;
  border-radius: 0.7rem;
  background: #edf4ff;
  color: var(--brand-dark);
  font-size: 1.02rem;
  font-weight: 700;
  word-break: break-word;
}

.service-result-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.service-result-card__action-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.service-result-card__creator {
  text-align: right;
  margin-left: auto;
}

.auth-login .login-grid {
  grid-template-columns: minmax(0, 1.28fr) minmax(320px, 0.92fr);
  gap: 0.7rem;
  margin-bottom: 0.3rem;
  align-items: stretch;
}

@media (min-width: 900px) and (min-height: 640px) {
  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-grid {
    min-height: clamp(31rem, calc(100dvh - 15rem), 47rem);
    margin-bottom: clamp(2rem, 6vh, 5rem);
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card {
    padding: 1.05rem 1.05rem 1.15rem;
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card:first-child .tool-form {
    gap: clamp(0.72rem, 1.75vh, 1.24rem);
    margin-top: clamp(0.72rem, 1.45vh, 1.16rem);
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card:first-child .auth-support-links {
    margin-top: auto;
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card:nth-child(2) {
    gap: clamp(0.28rem, 0.9vh, 0.72rem);
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card:nth-child(2) .inline-link-button {
    margin-top: clamp(1.05rem, 2.4vh, 1.8rem);
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card:nth-child(2) .download-box {
    margin-top: clamp(1.05rem, 2.3vh, 1.75rem);
    padding-top: clamp(0.9rem, 1.8vh, 1.36rem);
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card:nth-child(2) .login-setup-note {
    margin-top: auto;
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card:nth-child(2) .qr-setup-box {
    margin-top: clamp(0.62rem, 1.2vh, 0.9rem);
  }
}

.login-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-login .login-card {
  padding: 0.88rem 0.95rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.auth-login .login-card h2 {
  margin: 0.16rem 0 0.3rem;
}

.auth-login .login-copy {
  font-size: 0.86rem;
  line-height: 1.3;
}

.tool-card__header p:last-child {
  margin: 0.2rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.tool-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.1rem;
}

.auth-login .tool-form {
  gap: 0.52rem;
  margin-top: 0.62rem;
}

.tool-form label {
  font-weight: 700;
}

.tool-form input,
.tool-form select {
  width: 100%;
  padding: 0.92rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--panel-alt);
  font: inherit;
}

.tool-form select {
  appearance: none;
}

.upload-form input[type="file"] {
  padding: 0.75rem 0.85rem;
  background: white;
}

.auth-login .tool-form input,
.auth-login .tool-form select {
  padding: 0.72rem 0.8rem;
}

.tool-form input:focus,
.tool-form select:focus {
  outline: 2px solid rgba(10, 78, 161, 0.16);
  border-color: var(--brand);
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.2rem;
  align-items: end;
}

.filter-form > div,
.result-grid > div,
.audit-detail-grid > div,
.service-log-input-grid > div {
  min-width: 0;
}

.filter-form label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.filter-form input,
.filter-form select {
  width: 100%;
  padding: 0.88rem 0.95rem;
  min-height: 3.45rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--panel-alt);
  font: inherit;
}

.filter-form select {
  appearance: none;
}

.filter-form button,
.upload-form button {
  width: 100%;
  min-height: 3.45rem;
  border-radius: 0.9rem;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.45rem;
  margin: 0;
  padding: 0.88rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--panel-alt);
}

.checkbox-field input {
  width: auto;
  min-height: 0;
}

.history-card__header--compact {
  margin-top: 1.25rem;
}

.service-selector-expanded-card__header--compact {
  align-items: flex-start;
  margin-top: 1rem;
}

.sla-audit-status-panel {
  margin-top: 1.2rem;
}

.muted-inline {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.sla-status-row--done {
  background: rgba(38, 127, 85, 0.08);
}

.sla-status-row--pending,
.sla-status-row--running {
  background: rgba(216, 150, 39, 0.1);
}

.sla-status-row--failed {
  background: rgba(168, 61, 70, 0.1);
}

.sla-audit-summary-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.sla-audit-summary-toggle__text {
  min-width: 0;
}

.sla-audit-summary-toggle strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.05rem;
}

.sla-audit-summary-toggle__icon {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(10, 78, 161, 0.18);
  border-radius: 999px;
  background: #edf4ff;
  color: var(--brand-dark);
  font-weight: 700;
  line-height: 1;
}

.sla-audit-summary-toggle:hover,
.sla-audit-summary-toggle:focus-visible {
  color: var(--brand-dark);
}

.sla-audit-month-heading td {
  padding: 0.95rem 1rem;
  border-top: 2px solid rgba(10, 78, 161, 0.18);
  border-bottom: 1px solid rgba(10, 78, 161, 0.16);
  background: linear-gradient(90deg, rgba(10, 78, 161, 0.14), rgba(10, 78, 161, 0.04));
  color: var(--brand-dark);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
}

.sla-audit-month-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.sla-audit-month-line span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

#sla-audit-summary-table .sla-report-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  width: 100%;
  min-width: 58rem;
}

#sla-audit-summary-table .sla-audit-col--column {
  width: 29%;
}

#sla-audit-summary-table .sla-audit-col--from {
  width: 20%;
}

#sla-audit-summary-table .sla-audit-col--number {
  width: 11%;
}

#sla-audit-summary-table .sla-audit-col--errors {
  width: 10%;
}

#sla-audit-summary-table .sla-audit-col--status {
  width: 19%;
}

#sla-audit-summary-table .sla-report-table th,
#sla-audit-summary-table .sla-report-table td {
  padding-right: 0.8rem;
  padding-left: 0.8rem;
}

#sla-audit-summary-table .sla-audit-column-heading th:nth-child(3),
#sla-audit-summary-table .sla-audit-column-heading th:nth-child(4),
#sla-audit-summary-table .sla-audit-column-heading th:nth-child(5),
#sla-audit-summary-table .sla-audit-result-row td:nth-child(3),
#sla-audit-summary-table .sla-audit-result-row td:nth-child(4),
#sla-audit-summary-table .sla-audit-result-row td:nth-child(5) {
  text-align: center;
}

#sla-audit-summary-table .sla-audit-column-heading th:last-child,
#sla-audit-summary-table .sla-audit-result-row td:last-child {
  text-align: left;
}

#sla-audit-summary-table .sla-audit-status-cell {
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

#sla-audit-summary-table .sla-audit-status-value {
  display: block;
  font-weight: 700;
}

#sla-audit-summary-table .sla-audit-status-note {
  display: block;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.22;
}

.sla-audit-table-heading td {
  padding: 1rem 1rem 0.75rem;
  border: 1px solid rgba(10, 78, 161, 0.16);
  border-bottom: 0;
  border-radius: 0.75rem 0.75rem 0 0;
}

.sla-audit-table-line {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 100%;
}

.sla-audit-table-line span,
.sla-audit-table-line strong {
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
}

.sla-audit-table-line span {
  font-weight: 700;
}

.sla-audit-table-line strong {
  font-weight: 850;
}

.sla-audit-column-heading th {
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  border-top: 0;
}

#sla-audit-summary-table .sla-audit-column-heading th:first-child,
#sla-audit-summary-table .sla-audit-result-row td:first-child {
  text-align: left !important;
  padding-left: 1rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#sla-audit-summary-table .sla-audit-column-heading th:nth-child(2),
#sla-audit-summary-table .sla-audit-result-row td:nth-child(2) {
  text-align: center;
}

.sla-audit-block--base td,
.sla-audit-block--base th {
  background-color: #f3f7ff !important;
}

.sla-audit-block--alt td,
.sla-audit-block--alt th {
  background-color: #f0faf7 !important;
}

.sla-audit-table-heading.sla-audit-block--base td {
  background-color: #dce8ff !important;
}

.sla-audit-table-heading.sla-audit-block--alt td {
  background-color: #d6efe7 !important;
}

#sla-audit-summary-table .sla-audit-block--base .sla-error-detail,
#sla-audit-summary-table .sla-audit-block--base .sla-error-detail__panel {
  background-color: #f3f7ff;
}

#sla-audit-summary-table .sla-audit-block--alt .sla-error-detail,
#sla-audit-summary-table .sla-audit-block--alt .sla-error-detail__panel {
  background-color: #f0faf7;
}

.sla-audit-column-heading th:first-child,
.sla-audit-result-row td:first-child {
  border-left: 1px solid rgba(10, 78, 161, 0.16);
}

.sla-audit-column-heading th:last-child,
.sla-audit-result-row td:last-child {
  border-right: 1px solid rgba(10, 78, 161, 0.16);
}

.sla-audit-result-row td {
  border-top: 1px solid rgba(110, 132, 164, 0.18);
}

.sla-audit-block-tail td {
  border-bottom: 1px solid rgba(10, 78, 161, 0.16);
}

.sla-audit-result-row.sla-audit-block-tail td:first-child {
  border-bottom-left-radius: 0.75rem;
}

.sla-audit-result-row.sla-audit-block-tail td:last-child {
  border-bottom-right-radius: 0.75rem;
}

.audit-detail-row.sla-audit-block-tail td {
  border-right: 1px solid rgba(10, 78, 161, 0.16);
  border-left: 1px solid rgba(10, 78, 161, 0.16);
  border-radius: 0 0 0.75rem 0.75rem;
}

.sla-audit-table-heading + .sla-audit-column-heading th:first-child {
  border-left: 1px solid rgba(10, 78, 161, 0.16);
}

.sla-audit-table-heading + .sla-audit-column-heading th:last-child {
  border-right: 1px solid rgba(10, 78, 161, 0.16);
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.table-scroll--no-x {
  overflow-x: visible;
}

.sla-penalty-report-table {
  width: 100%;
  table-layout: fixed;
}

.sla-penalty-report-table th,
.sla-penalty-report-table td {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  font-size: 0.9rem;
}

.sla-penalty-report-table th {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  line-height: 1.18;
  vertical-align: middle;
}

.sla-penalty-report-table td {
  white-space: nowrap;
}

.sla-penalty-report-table .sla-report-col--action {
  width: 3.6rem;
  min-width: 3.6rem;
}

.sla-penalty-report-table .sla-report-col--serial {
  width: 2.8rem;
}

.sla-penalty-report-table .sla-report-col--month {
  width: 5.9rem;
}

.sla-penalty-report-table .sla-report-col--ssa {
  width: 4.4rem;
}

.sla-penalty-report-table .sla-report-col--org {
  width: 20%;
}

.sla-penalty-report-table .sla-report-col--amount {
  width: auto;
}

.sla-report-table th,
.sla-report-table td {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  overflow: hidden;
}

.sla-report-table th:nth-child(2),
.sla-report-table td:nth-child(2) {
  min-width: 4rem;
  text-align: center;
}

.sla-report-table th:nth-child(3),
.sla-report-table td:nth-child(3) {
  min-width: 5.8rem;
  font-variant-numeric: tabular-nums;
}

.sla-report-table th:first-child,
.sla-report-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 3.2rem;
  text-align: center;
  background: #fff;
}

.sla-report-table thead th:first-child {
  z-index: 3;
}

.sla-report-table .report-total-row td:first-child {
  background: #f8fbff;
}

.sla-report-table .audit-detail-row td:first-child {
  position: static;
  text-align: left;
}

.sla-penalty-report-table th:first-child,
.sla-penalty-report-table td:first-child {
  position: static;
  width: 3.6rem;
  min-width: 3.6rem;
  max-width: 3.6rem;
  text-align: center;
  overflow: visible;
}

.sla-report-table .sla-report-table__expand {
  overflow: visible;
}

.sla-penalty-report-table th:last-child,
.sla-penalty-report-table td:last-child {
  text-align: center;
}

.sla-report-table__org {
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  overflow: hidden;
  line-height: 1.28;
}

.sla-penalty-report-table .sla-report-table__org {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.inline-link-button {
  margin-top: 1rem;
}

.inline-link-button--secondary {
  background: linear-gradient(180deg, rgb(var(--theme-teal-rgb) / 0.08), rgba(255, 255, 255, 0.98));
  color: var(--brand-dark);
  border: 1px solid rgb(var(--theme-teal-rgb) / 0.18);
}

.inline-link-button--small {
  margin-top: 0;
  min-height: 2.35rem;
  padding: 0.52rem 0.9rem;
  font-size: 0.86rem;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  min-width: 0;
}

.result-actions[hidden] {
  display: none;
}

.result-actions .inline-link-button {
  margin-top: 0;
}

.sla-report-actions {
  margin: 0.8rem 0 0.9rem;
}

.result-note {
  margin: 0.3rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.text-link {
  display: inline-block;
  margin-top: 0.9rem;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.auth-support-link {
  margin-top: 0.85rem;
}

.auth-support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  align-items: center;
}

.auth-login .inline-link-button,
.auth-login .tool-form button {
  padding: 0.8rem 0.88rem;
}

.role-form {
  margin: 0;
}

.role-form__button--secondary {
  background: linear-gradient(135deg, #8d2835, var(--accent));
}

.role-form__button--quiet {
  border: 1px solid rgb(var(--theme-teal-rgb) / 0.18);
  background: #eef8f7;
  color: var(--brand-dark);
}

.role-form__button--danger-soft {
  border: 1px solid rgba(172, 48, 58, 0.2);
  background: #fff3f4;
  color: #9b2f3a;
}

.role-form__button--compact {
  padding: 0.52rem 0.78rem;
  border-radius: 0.72rem;
  font-size: 0.9rem;
  line-height: 1.12;
  min-width: 7rem;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.audit-expand {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(10, 78, 161, 0.18);
  border-radius: 999px;
  background: #edf4ff;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.audit-expand:disabled {
  cursor: wait;
  opacity: 0.72;
}

.audit-expand--inline {
  width: 1.55rem;
  height: 1.55rem;
  margin-left: 0.45rem;
  vertical-align: middle;
}

.audit-expand:hover,
.audit-expand:focus-visible {
  background: #dfeeff;
}

.audit-detail-row td {
  background: #f8fbff;
}

.sla-error-detail {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(10, 78, 161, 0.14);
}

.sla-error-detail:last-child {
  border-bottom: 0;
}

.sla-error-detail__header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: center;
  color: var(--text);
}

.sla-error-detail__header span {
  color: var(--muted);
}

.sla-error-detail__grid {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(20rem, 1.2fr);
  gap: 1rem;
  margin-top: 0.9rem;
}

.sla-error-detail__parameters {
  margin-top: 0.85rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
}

.sla-error-detail__parameters .audit-detail-list {
  margin-top: 0.4rem;
}

.sla-error-detail__parameters .audit-detail-list:first-of-type {
  margin-top: 0;
}

.sla-error-detail__parameter-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sla-error-detail__parameter-row--org {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sla-error-detail__parameters .audit-detail-list div {
  min-width: 0;
  max-width: 100%;
}

.sla-error-detail__parameters .audit-detail-list dd {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sla-error-detail__comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.sla-error-detail__calculated-block {
  margin-top: 0.9rem;
}

.sla-error-detail__panel {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.75rem;
}

.sla-error-detail__panel--actual {
  border-left: 0.42rem solid #c97343;
  background: linear-gradient(90deg, #fff5f0 0%, rgba(255, 250, 247, 0.98) 100%);
}

.sla-error-detail__panel--calculated {
  border-left: 0.42rem solid #2f68c2;
  background: linear-gradient(90deg, #edf4ff 0%, rgba(247, 250, 255, 0.98) 100%);
}

.sla-error-detail__panel dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sla-error-detail__audit-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.sla-error-detail__audit-summary div:nth-child(5) {
  grid-column: 1 / -1;
  margin-top: 0.45rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(10, 78, 161, 0.12);
}

.sla-error-detail__audit-summary div:nth-child(5) dd {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sla-error-detail__value {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 900;
}

.sla-error-detail__wide {
  margin-top: 0.9rem;
}

.sla-error-detail h4 {
  margin: 0 0 0.65rem;
  color: var(--text);
}

.sla-error-detail h5 {
  margin: 0.75rem 0 0.45rem;
  color: var(--text);
}

.sla-report-detail {
  padding: 0.35rem 0;
  min-width: 0;
  overflow: hidden;
}

.sla-report-component-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding: 0.75rem 0;
}

.sla-report-component-card {
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.7rem;
  background: #fff;
  overflow: hidden;
  min-width: 0;
}

.sla-report-component-card h4 {
  margin: 0;
  padding: 0.7rem 0.85rem;
  text-align: center;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--text);
}

.sla-report-component-card--enhancement {
  border-color: rgba(60, 155, 105, 0.24);
  background: linear-gradient(90deg, #f1fbf5 0%, rgba(255, 255, 255, 0.98) 100%);
}

.sla-report-component-card--enhancement h4 {
  background: rgba(60, 155, 105, 0.12);
}

.sla-report-component-card--penalty {
  border-color: rgba(201, 115, 67, 0.24);
  background: linear-gradient(90deg, #fff5f0 0%, rgba(255, 255, 255, 0.98) 100%);
}

.sla-report-component-card--penalty h4 {
  background: rgba(201, 115, 67, 0.12);
}

.sla-report-component-table {
  width: 100%;
  border-collapse: collapse;
}

.sla-report-component-table th,
.sla-report-component-table td {
  padding: 0.58rem 0.85rem;
  border-top: 1px solid rgba(10, 78, 161, 0.1);
}

.sla-report-component-table th {
  text-align: left;
  font-weight: 900;
  color: var(--text);
  overflow-wrap: anywhere;
}

.sla-report-component-table td {
  text-align: right;
  font-weight: 900;
  color: var(--text);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .sla-report-component-summary {
    grid-template-columns: 1fr;
  }

  .sla-report-component-table th,
  .sla-report-component-table td {
    padding: 0.5rem 0.65rem;
  }
}

.sla-report-section-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.95rem;
}

.sla-report-section {
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.7rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.85rem;
  min-width: 0;
  overflow: hidden;
}

.sla-report-section--tone-fault {
  border-color: rgba(201, 115, 67, 0.32);
  border-left: 0.42rem solid #c97343;
  background: linear-gradient(90deg, #fff5f0 0%, rgba(255, 250, 247, 0.96) 100%);
}

.sla-report-section--tone-lc {
  border-color: rgba(77, 139, 197, 0.3);
  border-left: 0.42rem solid #4d8bc5;
  background: linear-gradient(90deg, #f1f8ff 0%, rgba(248, 252, 255, 0.96) 100%);
}

.sla-report-section--tone-olt {
  border-color: rgba(62, 155, 154, 0.3);
  border-left: 0.42rem solid #3e9b9a;
  background: linear-gradient(90deg, #f2fbfb 0%, rgba(248, 253, 253, 0.96) 100%);
}

.sla-report-section--tone-total {
  border-color: rgba(200, 146, 47, 0.34);
  border-left: 0.42rem solid #c8922f;
  background: linear-gradient(90deg, #fff9e8 0%, rgba(255, 253, 246, 0.98) 100%);
}

.sla-report-section--tone-enhancement {
  border-color: rgba(60, 155, 105, 0.3);
  border-left: 0.42rem solid #3c9b69;
  background: linear-gradient(90deg, #f1fbf5 0%, rgba(248, 253, 250, 0.98) 100%);
}

.sla-report-section--tone-gross {
  border-color: rgba(47, 104, 194, 0.34);
  border-left: 0.42rem solid #2f68c2;
  background: linear-gradient(90deg, #edf4ff 0%, rgba(247, 250, 255, 0.98) 100%);
}

.sla-report-section--tone-total .sla-report-section__heading h4,
.sla-report-section--tone-total .sla-report-section__heading span,
.sla-report-section--tone-gross .sla-report-section__heading h4,
.sla-report-section--tone-gross .sla-report-section__heading span,
.tip-metric-card--total strong,
.tip-metric-card--gross strong {
  font-weight: 900;
}

.sla-report-section__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sla-report-section__heading > div {
  min-width: 0;
}

.sla-report-section__toggle,
.sla-report-section__empty {
  margin-left: auto;
  flex: 0 0 auto;
}

.sla-report-section__heading h4 {
  margin: 0 0 0.2rem;
}

.sla-report-section__heading span,
.sla-report-section__empty {
  color: var(--muted);
}

.sla-report-section__body {
  margin-top: 0.85rem;
  min-width: 0;
}

.sla-report-calculation {
  margin: 0 0 0.85rem;
  padding: 0.62rem 0.75rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.55rem;
  background: rgba(237, 244, 255, 0.58);
  color: var(--text);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.sla-row-formula {
  display: grid;
  gap: 0.35rem;
  padding: 0.68rem 0.8rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.55rem;
  background: rgba(237, 244, 255, 0.52);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.sla-detail-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.sla-detail-source-table {
  min-width: max-content;
}

.sla-detail-source-table th,
.sla-detail-source-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 18rem;
}

.sla-detail-source-table td.sla-duration-cell {
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(10, 78, 161, 0.16);
  font-weight: 800;
}

.sla-detail-source-table td.sla-duration-cell--start {
  background: rgba(219, 234, 254, 0.92);
}

.sla-detail-source-table td.sla-duration-cell--end {
  background: rgba(220, 252, 231, 0.92);
}

.tip-account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.tip-account-summary > div,
.tip-metric-card {
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.85rem 0.95rem;
  min-width: 0;
}

.tip-account-summary--misc > .tip-account-summary__card {
  position: relative;
  overflow: hidden;
  border-color: rgba(10, 78, 161, 0.16);
  box-shadow: 0 0.55rem 1.1rem rgba(25, 57, 106, 0.05);
}

.tip-account-summary--misc > .tip-account-summary__card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.52) 100%);
}

.tip-account-summary__card--span {
  border-left: 0.35rem solid #2f68c2;
  background: linear-gradient(90deg, #edf4ff 0%, #ffffff 100%);
}

.tip-account-summary__card--rank {
  border-left: 0.35rem solid #0f9f6e;
  background: linear-gradient(90deg, #ecfdf5 0%, #ffffff 100%);
}

.tip-account-summary__card--type {
  border-left: 0.35rem solid #b7606c;
  background: linear-gradient(90deg, #fff4f1 0%, #ffffff 100%);
}

.tip-account-summary strong {
  display: block;
  margin-top: 0.2rem;
  overflow-wrap: anywhere;
}

.sla-tip-misc-table {
  width: 100%;
  table-layout: fixed;
  margin-top: 1rem;
  border: 1px solid rgba(10, 78, 161, 0.1);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 0.8rem 1.6rem rgba(25, 57, 106, 0.05);
  overflow: hidden;
}

.sla-tip-misc-table th,
.sla-tip-misc-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.sla-tip-misc-table th {
  background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 100%);
  color: #60708a;
}

.sla-tip-misc-table tbody tr:not(.audit-detail-row):not(.report-total-row):nth-of-type(4n + 1) td {
  background: #fbfdff;
}

.sla-tip-misc-table tbody tr:not(.audit-detail-row):not(.report-total-row):hover td {
  background: #f2f7ff;
}

.sla-tip-misc-table .report-total-row td {
  background: linear-gradient(90deg, #eef6ff 0%, #f8fbff 100%);
  border-top: 2px solid rgba(10, 78, 161, 0.18);
  font-weight: 900;
}

.sla-tip-misc-table th:first-child,
.sla-tip-misc-table td:first-child {
  width: 3.5rem;
  min-width: 3.5rem;
}

.sla-tip-misc-table th:nth-child(2),
.sla-tip-misc-table td:nth-child(2) {
  width: 4.2rem;
  min-width: 4.2rem;
  text-align: center;
}

.sla-tip-misc-table th:nth-child(3),
.sla-tip-misc-table td:nth-child(3) {
  width: 18%;
  min-width: 0;
  text-align: left;
}

.sla-tip-misc-table th:nth-child(4),
.sla-tip-misc-table td:nth-child(4) {
  width: 24%;
  min-width: 0;
  text-align: left;
}

.sla-tip-misc-detail-row > td {
  padding: 0.75rem 1.05rem 1.05rem;
  background: #fbfdff;
}

.sla-tip-misc-monthly {
  display: grid;
  gap: 0.85rem;
  width: min(58rem, 100%);
  padding: 0;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 0.8rem 1.7rem rgba(25, 57, 106, 0.06);
  overflow: hidden;
}

.sla-tip-misc-monthly--direct {
  width: 100%;
  margin-top: 1rem;
}

.sla-tip-misc-monthly__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(10, 78, 161, 0.12);
  background: linear-gradient(90deg, #edf4ff 0%, #f8fbff 58%, #fff6f3 100%);
}

.sla-tip-misc-monthly__eyebrow {
  display: block;
  margin-bottom: 0.2rem;
  color: #60708a;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sla-tip-misc-monthly__title {
  color: var(--text);
  font-weight: 800;
  line-height: 1.2;
}

.sla-tip-misc-monthly__code {
  flex: 0 1 auto;
  max-width: 22rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(47, 104, 194, 0.18);
  border-radius: 999px;
  background: rgba(237, 244, 255, 0.9);
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.sla-tip-misc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0.95rem 1.15rem 0;
}

.sla-tip-misc-kpi {
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.72rem;
  background: #f8fbff;
}

.sla-tip-misc-kpi span {
  display: block;
  color: #60708a;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.sla-tip-misc-kpi strong {
  display: block;
  margin-top: 0.22rem;
  font-size: 1.05rem;
}

.sla-tip-misc-kpi--penalty {
  border-left: 0.35rem solid #b7606c;
  background: linear-gradient(90deg, #fff1f1 0%, #fff 100%);
}

.sla-tip-misc-kpi--enhancement {
  border-left: 0.35rem solid #0f9f6e;
  background: linear-gradient(90deg, #ecfdf5 0%, #fff 100%);
}

.sla-tip-misc-kpi--gross {
  border-left: 0.35rem solid #2f68c2;
  background: linear-gradient(90deg, #edf4ff 0%, #fff 100%);
}

.sla-tip-misc-monthly .table-scroll {
  padding: 0 1.15rem 1rem;
  max-width: 100%;
  overflow-x: auto;
}

.sla-tip-misc-monthly-table {
  width: 100%;
  min-width: 72rem;
  table-layout: fixed;
  border: 1px solid rgba(10, 78, 161, 0.1);
  border-radius: 0.65rem;
  overflow: hidden;
}

.sla-tip-misc-monthly-table th,
.sla-tip-misc-monthly-table td {
  white-space: nowrap;
  text-align: right;
}

.sla-tip-misc-monthly-table th {
  background: #f1f6ff;
}

.sla-tip-misc-monthly-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.sla-tip-misc-monthly-table tbody tr:hover td {
  background: #f4f8ff;
}

.sla-tip-misc-monthly-table .report-total-row td {
  background: #eef6ff;
  border-top: 2px solid rgba(10, 78, 161, 0.18);
  font-weight: 900;
}

.sla-tip-misc-monthly-table th:first-child,
.sla-tip-misc-monthly-table td:first-child {
  width: 8rem;
  text-align: center;
}

.sla-tip-misc-monthly-table th:nth-child(2),
.sla-tip-misc-monthly-table td:nth-child(2) {
  width: 14rem;
  text-align: left;
}

.sla-tip-gross-count-summary {
  margin-top: 1rem;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: 0 0.9rem 1.8rem rgba(25, 57, 106, 0.06);
  overflow: hidden;
}

.sla-tip-gross-count-summary__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid rgba(10, 78, 161, 0.1);
  background: linear-gradient(90deg, #edf4ff 0%, #ffffff 58%, #f6fbf8 100%);
}

.sla-tip-gross-count-summary__header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
}

.sla-tip-gross-count-summary__header > span {
  flex: 0 0 auto;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(47, 104, 194, 0.16);
  border-radius: 999px;
  background: rgba(237, 244, 255, 0.9);
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 850;
}

.sla-tip-gross-count-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem 1.15rem 1.1rem;
}

.sla-tip-gross-count-overview__item {
  min-height: 5.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 0.7rem 1.4rem rgba(25, 57, 106, 0.05);
}

.sla-tip-gross-count-overview__item span {
  display: block;
  color: #60708a;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sla-tip-gross-count-overview__item strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1;
}

.sla-tip-gross-count-overview__item--positive {
  border-left: 0.42rem solid #0f9f6e;
  background: linear-gradient(90deg, #ecfdf5 0%, #ffffff 100%);
}

.sla-tip-gross-count-overview__item--negative {
  border-left: 0.42rem solid #b7606c;
  background: linear-gradient(90deg, #fff1f1 0%, #ffffff 100%);
}

.sla-tip-gross-count-overview__item--zero {
  border-left: 0.42rem solid #64748b;
  background: linear-gradient(90deg, #f1f5f9 0%, #ffffff 100%);
}

.sla-tip-gross-count-overview__item--total {
  border-left: 0.42rem solid #2f68c2;
  background: linear-gradient(90deg, #edf4ff 0%, #ffffff 100%);
}

.sla-tip-gross-count-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.sla-tip-gross-count-card {
  border: 1px solid rgba(10, 78, 161, 0.13);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 0.9rem 1.8rem rgba(25, 57, 106, 0.06);
  overflow: hidden;
}

.sla-tip-gross-count-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(10, 78, 161, 0.1);
  background: linear-gradient(90deg, #edf4ff 0%, #ffffff 58%, #fff7f2 100%);
}

.sla-tip-gross-count-card__header h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
}

.sla-tip-gross-count-card__total {
  min-width: 7rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(47, 104, 194, 0.16);
  border-radius: 0.75rem;
  background: rgba(237, 244, 255, 0.85);
  text-align: right;
}

.sla-tip-gross-count-card__total span {
  display: block;
  color: #60708a;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sla-tip-gross-count-card__total strong {
  display: block;
  color: var(--brand-dark);
  font-size: 1.2rem;
  line-height: 1.05;
}

.sla-tip-gross-count-card__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem 1.15rem;
}

.sla-tip-gross-count-tile {
  display: grid;
  position: relative;
  gap: 0.18rem;
  min-height: 6.2rem;
  padding: 0.9rem 3rem 0.9rem 1rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.85rem;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: 0 0.55rem 1.15rem rgba(25, 57, 106, 0.04);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sla-tip-gross-count-tile[aria-busy="true"] {
  cursor: progress;
  pointer-events: none;
}

.sla-tip-gross-count-tile.is-loading {
  opacity: 0.82;
}

.sla-tip-gross-count-tile.is-loading::after {
  content: "";
  position: absolute;
  right: 0.85rem;
  bottom: 0.8rem;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(10, 78, 161, 0.18);
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.sla-tip-gross-count-tile:hover,
.sla-tip-gross-count-tile:focus-visible,
.sla-tip-gross-count-tile.is-active {
  border-color: rgba(47, 104, 194, 0.36);
  box-shadow: 0 0.85rem 1.55rem rgba(25, 57, 106, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.sla-tip-gross-count-tile span {
  color: #60708a;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sla-tip-gross-count-tile strong {
  font-size: 1.8rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sla-tip-gross-count-tile small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.sla-tip-gross-count-tile__sign {
  position: absolute;
  top: 0.75rem;
  right: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(47, 104, 194, 0.22);
  border-radius: 999px;
  background: rgba(237, 244, 255, 0.92);
  color: var(--brand-dark);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.sla-tip-gross-count-tile:focus-visible .sla-tip-gross-count-tile__sign,
.sla-tip-gross-count-tile.is-toggle-focused .sla-tip-gross-count-tile__sign {
  outline: 2px solid rgba(47, 104, 194, 0.52);
  outline-offset: 2px;
  box-shadow: 0 0 0 0.24rem rgba(47, 104, 194, 0.12);
}

.sla-tip-gross-count-tile.is-active .sla-tip-gross-count-tile__sign {
  border-color: rgba(47, 104, 194, 0.42);
  background: #dbeafe;
}

.sla-tip-gross-count-tile--positive {
  border-left: 0.45rem solid #0f9f6e;
  background: linear-gradient(90deg, #ecfdf5 0%, #ffffff 82%);
}

.sla-tip-gross-count-tile--negative {
  border-left: 0.45rem solid #b7606c;
  background: linear-gradient(90deg, #fff1f1 0%, #ffffff 82%);
}

.sla-tip-gross-count-tile--zero {
  border-left: 0.45rem solid #64748b;
  background: linear-gradient(90deg, #f1f5f9 0%, #ffffff 82%);
}

.sla-tip-gross-count-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  padding: 0 1.15rem 1rem;
  color: #60708a;
  font-size: 0.82rem;
  font-weight: 850;
}

.sla-tip-gross-count-card__footer strong {
  margin-left: 0.22rem;
}

.sla-tip-gross-count-detail {
  margin: 0 1.15rem 1.15rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  overflow: hidden;
}

.sla-tip-gross-count-detail__header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(10, 78, 161, 0.1);
  background: #f8fbff;
}

.sla-tip-gross-count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sla-tip-gross-count-badge--positive {
  background: #d1fae5;
  color: #0f6f4f;
}

.sla-tip-gross-count-badge--negative {
  background: #fee2e2;
  color: #9f2d20;
}

.sla-tip-gross-count-badge--zero {
  background: #e2e8f0;
  color: #475569;
}

.sla-tip-gross-count-table {
  width: 100%;
  table-layout: fixed;
}

.sla-tip-gross-count-table th {
  background: #f1f6ff;
}

.sla-tip-gross-count-table th:first-child,
.sla-tip-gross-count-table td:first-child {
  width: 18rem;
  text-align: left;
}

.sla-tip-gross-count-table th:nth-child(2),
.sla-tip-gross-count-table td:nth-child(2) {
  text-align: left;
}

.sla-tip-gross-count-table th:nth-child(n + 3),
.sla-tip-gross-count-table td:nth-child(n + 3) {
  text-align: right;
}

.sla-tip-misc-month-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: stretch;
}

.sla-tip-misc-month-add {
  min-width: 7.2rem;
  border: 1px solid rgba(10, 78, 161, 0.18);
  background: linear-gradient(135deg, #edf4ff, #ecfdf5);
  color: var(--brand-dark);
  font-weight: 900;
}

.sla-bulk-edit-form {
  grid-template-columns:
    minmax(12rem, 1fr)
    minmax(14rem, 0.9fr)
    minmax(15.5rem, 1.05fr)
    minmax(7.2rem, 0.35fr)
    minmax(11rem, 0.72fr);
}

.sla-bulk-edit-form > div:first-child {
  grid-column: 1;
  grid-row: 1;
}

.sla-bulk-edit-form .sla-bulk-edit-month-field {
  grid-column: 2;
  grid-row: 1;
}

.sla-bulk-edit-form .sla-bulk-edit-gross-field {
  grid-column: 3;
  grid-row: 1;
}

.sla-bulk-edit-form .sla-bulk-edit-amount-field {
  grid-column: 4;
  grid-row: 1;
}

.sla-bulk-edit-form .sla-bulk-edit-amount-field input {
  max-width: 7.2rem;
}

.sla-bulk-edit-form > [data-sla-bulk-submit] {
  grid-column: 5;
  grid-row: 1;
}

.sla-bulk-edit-form .sla-bulk-selected-month-row {
  grid-column: 1 / -1;
  grid-row: 2;
}

.sla-bulk-edit-form .form-loader {
  grid-column: 1 / -1;
  grid-row: 3;
}

.sla-tip-misc-selected-months {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  min-height: 3.45rem;
  margin-top: 0.7rem;
  padding: 0.4rem 0.45rem;
  border: 1px dashed rgba(47, 104, 194, 0.24);
  border-radius: 0.9rem;
  background:
    linear-gradient(135deg, rgba(47, 104, 194, 0.05), rgba(47, 160, 112, 0.04)),
    #fff;
}

.sla-tip-misc-selected-months.is-empty {
  background: var(--panel-alt);
}

.sla-tip-misc-selected-month {
  display: inline-grid;
  grid-template-columns: auto 1.7rem;
  align-items: center;
  gap: 0.35rem;
  min-width: 8.9rem;
  min-height: 2.35rem;
  padding: 0.32rem 0.32rem 0.32rem 0.78rem;
  border: 1px solid rgba(47, 104, 194, 0.22);
  border-radius: 999px;
  background: #edf4ff;
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 850;
  box-shadow: 0 0.35rem 0.8rem rgba(25, 57, 106, 0.06);
}

.sla-tip-misc-selected-month button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(25, 57, 106, 0.1);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.sla-tip-misc-selected-month button:hover {
  background: rgba(25, 57, 106, 0.18);
}

.sla-bulk-edit-month-field {
  grid-column: span 1;
}

.sla-bulk-edit-month-select {
  grid-template-columns: minmax(0, 1fr) auto;
}

.sla-bulk-selected-month-row {
  grid-column: 1 / -1;
}

.sla-bulk-edit-results {
  margin-top: 1rem;
}

.sla-bulk-edit-summary {
  margin-bottom: 1rem;
}

.sla-bulk-edit-table {
  width: 100%;
  table-layout: fixed;
}

.sla-bulk-edit-table th {
  background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 100%);
}

.sla-bulk-edit-table th:first-child,
.sla-bulk-edit-table td:first-child {
  width: 3.4rem;
  text-align: center;
}

.sla-bulk-edit-table th:nth-child(2),
.sla-bulk-edit-table td:nth-child(2) {
  width: 16rem;
  text-align: left;
}

.sla-bulk-edit-table th:nth-child(3),
.sla-bulk-edit-table td:nth-child(3) {
  text-align: left;
}

.sla-bulk-edit-table th:nth-child(4),
.sla-bulk-edit-table td:nth-child(4),
.sla-bulk-edit-table th:nth-child(5),
.sla-bulk-edit-table td:nth-child(5) {
  width: 7rem;
  text-align: center;
}

.sla-bulk-edit-table th:nth-child(n + 6),
.sla-bulk-edit-table td:nth-child(n + 6) {
  width: 10rem;
  text-align: right;
}

.sla-bulk-edit-org-detail > td,
.sla-bulk-edit-detail-row > td {
  padding: 0.8rem 1rem 1rem;
  background: #fbfdff;
}

.sla-bulk-edit-month-table th:first-child,
.sla-bulk-edit-month-table td:first-child {
  width: 4rem;
}

.sla-bulk-edit-month-table th:nth-child(2),
.sla-bulk-edit-month-table td:nth-child(2),
.sla-bulk-edit-month-table th:nth-child(3),
.sla-bulk-edit-month-table td:nth-child(3),
.sla-bulk-edit-month-table th:nth-child(4),
.sla-bulk-edit-month-table td:nth-child(4) {
  width: 8rem;
}

.sla-bulk-edit-detail {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.sla-tip-combined-months {
  margin-top: 1rem;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 0.8rem 1.6rem rgba(25, 57, 106, 0.05);
  overflow: hidden;
}

.sla-tip-combined-months__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid rgba(10, 78, 161, 0.1);
  background: linear-gradient(90deg, #edf4ff 0%, #ffffff 58%, #ecfdf5 100%);
}

.sla-tip-combined-months__header strong {
  color: var(--brand-dark);
  font-weight: 900;
}

.sla-tip-combined-months__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.95rem 1.15rem 1.05rem;
}

.sla-tip-combined-months__chips span {
  display: inline-flex;
  align-items: center;
  min-height: 2.05rem;
  padding: 0.36rem 0.68rem;
  border: 1px solid rgba(47, 104, 194, 0.16);
  border-radius: 999px;
  background: #f8fbff;
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 850;
}

.sla-tip-combined-status-grid {
  align-items: stretch;
}

.sla-tip-combined-status-tile {
  min-height: 5.2rem;
}

.sla-tip-combined-panels {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.sla-tip-combined-panel {
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 0.9rem 1.8rem rgba(25, 57, 106, 0.06);
  overflow: hidden;
}

.sla-tip-combined-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(10, 78, 161, 0.1);
  background: linear-gradient(90deg, #f8fbff 0%, #ffffff 58%, #fff7f2 100%);
}

.sla-tip-combined-panel__header h3 {
  margin: 0.45rem 0 0;
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 900;
}

.sla-tip-combined-panel__totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem 0.8rem;
  color: #60708a;
  font-size: 0.82rem;
  font-weight: 850;
  text-align: right;
}

.sla-tip-combined-panel__totals strong {
  margin-left: 0.22rem;
}

.sla-tip-combined-table {
  width: 100%;
  table-layout: fixed;
}

.sla-tip-combined-table th {
  background: linear-gradient(180deg, #edf4ff 0%, #f8fbff 100%);
}

.sla-tip-combined-table th:first-child,
.sla-tip-combined-table td:first-child {
  width: 3.5rem;
  text-align: center;
}

.sla-tip-combined-table th:nth-child(2),
.sla-tip-combined-table td:nth-child(2) {
  width: 18rem;
  text-align: left;
}

.sla-tip-combined-table th:nth-child(3),
.sla-tip-combined-table td:nth-child(3) {
  text-align: left;
}

.sla-tip-combined-table th:nth-child(4),
.sla-tip-combined-table td:nth-child(4) {
  width: 5rem;
  text-align: center;
}

.sla-tip-combined-table th:nth-child(n + 5),
.sla-tip-combined-table td:nth-child(n + 5) {
  width: 10rem;
  text-align: right;
}

.sla-tip-combined-table tbody tr:not(.audit-detail-row):hover td {
  background: #f4f8ff;
}

.sla-tip-combined-month-detail {
  width: 100%;
  max-width: none;
}

.sla-tip-combined-month-detail .table-scroll {
  overflow-x: auto;
}

.sla-tip-combined-month-detail .sla-tip-misc-monthly-table {
  min-width: 720px;
}

.sla-tip-combined-month-detail .sla-tip-misc-monthly-table th,
.sla-tip-combined-month-detail .sla-tip-misc-monthly-table td {
  overflow-wrap: normal;
  white-space: nowrap;
}

.sla-tip-combined-month-detail .sla-tip-misc-monthly-table th {
  white-space: normal;
}

.sla-tip-combined-month-detail .sla-tip-misc-monthly-table th:first-child,
.sla-tip-combined-month-detail .sla-tip-misc-monthly-table td:first-child {
  width: 6rem;
}

.sla-tip-combined-month-detail .sla-tip-misc-monthly-table th:nth-child(2),
.sla-tip-combined-month-detail .sla-tip-misc-monthly-table td:nth-child(2) {
  width: 12rem;
}

.sla-tip-combined-month-detail .sla-tip-misc-monthly-table th:nth-child(n + 3),
.sla-tip-combined-month-detail .sla-tip-misc-monthly-table td:nth-child(n + 3) {
  width: auto;
  text-align: right;
}

.sla-tip-combined-month-row--empty td {
  color: #7b8798;
  background: #f8fafc;
}

.empty-state--compact {
  margin: 0;
  padding: 1rem;
  font-size: 0.92rem;
}

.sla-money {
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.sla-money--negative {
  color: #9f2d20;
}

.sla-money--positive {
  color: #0f6f4f;
}

.sla-money--zero {
  color: #64748b;
}

.tip-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.95rem;
}

.tip-metric-card {
  display: grid;
  gap: 0.35rem;
  color: inherit;
  font: inherit;
  text-align: left;
}

.tip-metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tip-metric-card strong {
  font-size: 1.18rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.tip-metric-card small {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.tip-metric-card--button {
  appearance: none;
  cursor: pointer;
}

.tip-metric-card--button:hover,
.tip-metric-card--button:focus-visible,
.tip-metric-card--button.is-active {
  border-color: rgba(10, 78, 161, 0.36);
  box-shadow: 0 12px 24px rgba(10, 78, 161, 0.11);
}

.tip-metric-card--button.is-active {
  outline: 2px solid rgba(47, 104, 194, 0.18);
  outline-offset: 2px;
}

.tip-metric-card--disabled {
  opacity: 0.72;
}

.tip-metric-card--fault {
  border-color: rgba(201, 115, 67, 0.32);
  border-left: 0.42rem solid #c97343;
  background: linear-gradient(90deg, #fff5f0 0%, rgba(255, 250, 247, 0.96) 100%);
}

.tip-metric-card--lc {
  border-color: rgba(77, 139, 197, 0.3);
  border-left: 0.42rem solid #4d8bc5;
  background: linear-gradient(90deg, #f1f8ff 0%, rgba(248, 252, 255, 0.96) 100%);
}

.tip-metric-card--olt {
  border-color: rgba(62, 155, 154, 0.3);
  border-left: 0.42rem solid #3e9b9a;
  background: linear-gradient(90deg, #f2fbfb 0%, rgba(248, 253, 253, 0.96) 100%);
}

.tip-metric-card--total {
  border-color: rgba(200, 146, 47, 0.34);
  border-left: 0.42rem solid #c8922f;
  background: linear-gradient(90deg, #fff9e8 0%, rgba(255, 253, 246, 0.98) 100%);
}

.tip-metric-card--enhancement {
  border-color: rgba(60, 155, 105, 0.3);
  border-left: 0.42rem solid #3c9b69;
  background: linear-gradient(90deg, #f1fbf5 0%, rgba(248, 253, 250, 0.98) 100%);
}

.tip-metric-card--gross {
  border-color: rgba(47, 104, 194, 0.34);
  border-left: 0.42rem solid #2f68c2;
  background: linear-gradient(90deg, #edf4ff 0%, rgba(247, 250, 255, 0.98) 100%);
}

.tip-detail-panel {
  margin-top: 1rem;
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.95rem;
}

.sla-detail-source-table tr.sla-row--violation > td {
  background: rgba(180, 35, 24, 0.08);
  color: #7a271a;
  font-weight: 800;
}

.sla-detail-source-table tr.sla-row--penalty-imposed > td {
  background: rgba(180, 83, 9, 0.1);
  color: #7c2d12;
  font-weight: 800;
}

.sla-detail-source-table tr.sla-row--edit-excluded > td {
  background: #f3f4f8;
  color: #7c879b;
  text-decoration: line-through;
}

.sla-detail-source-table tr.sla-row--edit-moved > td {
  background: rgba(31, 122, 84, 0.1);
  color: #166534;
  font-weight: 800;
}

.sla-edit-action-cell {
  min-width: 12rem;
  white-space: normal;
}

.sla-edit-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.sla-edit-row-button {
  justify-content: center;
  min-width: 5.7rem;
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
}

.sla-edit-row-button--edit,
.sla-edit-row-button--unedit {
  border-color: rgba(46, 125, 89, 0.28);
  background: #f4fbf6;
  color: #1f6a4b;
}

[data-sla-edit-download],
.sla-edit-save-button,
.sla-ai-recalculator-button {
  min-width: 11rem;
  min-height: 3.2rem;
}

.sla-edit-actions {
  margin-top: 1rem;
}

.sla-edit-actions .inline-link-button {
  margin-top: 0;
}

.sla-ai-recalculator-panel {
  margin: 0.9rem 0 1rem;
}

.sla-ai-recalculator-panel[hidden] {
  display: none;
}

.sla-ai-recalculator-card {
  border: 1px solid rgba(190, 211, 240, 0.95);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(244, 248, 255, 0.96), rgba(250, 255, 252, 0.96));
  box-shadow: 0 0.8rem 2rem rgba(35, 56, 96, 0.08);
  padding: 1rem;
}

.sla-ai-recalculator-card--empty {
  background: linear-gradient(135deg, rgba(255, 250, 246, 0.97), rgba(247, 250, 255, 0.97));
}

.sla-ai-recalculator-card__header,
.sla-ai-recalculator-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.sla-ai-recalculator-card__header h4 {
  margin: 0.1rem 0 0;
  color: #17243a;
  font-size: 1.05rem;
}

.sla-ai-recalculator-target {
  border: 1px solid rgba(57, 102, 178, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #173d76;
  font-weight: 900;
  padding: 0.55rem 0.85rem;
}

.sla-ai-recalculator-stats {
  margin-top: 0.9rem;
}

.sla-ai-recalculator-stats > div {
  min-width: 11rem;
  flex: 1 1 11rem;
  border: 1px solid rgba(190, 211, 240, 0.9);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.68);
  padding: 0.75rem 0.9rem;
}

.sla-ai-recalculator-stats span {
  display: block;
  color: #66748d;
  font-size: 0.8rem;
  font-weight: 800;
}

.sla-ai-recalculator-stats strong {
  display: block;
  margin-top: 0.2rem;
  color: #173d76;
  font-size: 1.2rem;
}

.sla-ai-recalculator-message {
  margin: 0.85rem 0;
  color: #5c6a82;
  font-weight: 800;
}

.sla-ai-recalculator-table td span {
  display: block;
  margin-top: 0.15rem;
  color: #65738c;
  font-size: 0.82rem;
  line-height: 1.35;
}

.sla-ai-recalculator-apply {
  margin-top: 0.9rem;
  min-width: 13rem;
}

.sla-edit-record-note {
  display: block;
  margin-top: 0.35rem;
  color: #69758c;
  font-size: 0.78rem;
  line-height: 1.35;
  text-decoration: none;
}

.sla-edit-record-note--time {
  color: #1f6a4b;
  font-weight: 800;
}

.sla-edit-record-note--error {
  color: #a13a2f;
  font-weight: 900;
}

.sla-edit-time-panel {
  margin-top: 0.55rem;
  padding: 0.7rem;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(47, 104, 194, 0.2);
  border-radius: 0.7rem;
  background: linear-gradient(135deg, rgba(237, 244, 255, 0.92), rgba(246, 253, 249, 0.92));
  box-shadow: 0 10px 22px rgba(27, 44, 70, 0.06);
}

.sla-edit-time-panel label {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.55rem;
  color: #60708a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sla-edit-time-panel select,
.sla-edit-time-panel input {
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid rgba(190, 205, 228, 0.88);
  border-radius: 0.55rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 0.45rem 0.6rem;
}

.sla-edit-time-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.sla-edit-panel-button {
  justify-content: center;
  min-width: 7.25rem;
  min-height: 3rem;
  border-radius: 999px;
}

.sla-edit-time-panel .sla-edit-record-note {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sla-report-section--edit {
  border-color: rgba(42, 91, 176, 0.32);
  background: #f8fbff;
}

.sla-report-section--edit .sla-edit-recalc-table {
  border-collapse: separate;
  border-spacing: 0 0.42rem;
}

.sla-report-section--edit .sla-edit-recalc-table thead th {
  border-bottom: 0;
}

.sla-report-section--edit .sla-edit-recalc-row > td {
  border-top: 1px solid rgba(190, 205, 228, 0.68);
  border-bottom: 1px solid rgba(190, 205, 228, 0.68);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(27, 44, 70, 0.04);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sla-report-section--edit .sla-edit-recalc-row > td:first-child {
  border-left: 0.42rem solid #8aa3c6;
  border-top: 1px solid rgba(190, 205, 228, 0.68);
  border-bottom: 1px solid rgba(190, 205, 228, 0.68);
  border-radius: 0.55rem 0 0 0.55rem;
  font-weight: 900;
}

.sla-report-section--edit .sla-edit-recalc-row:hover > td,
.sla-report-section--edit .sla-edit-recalc-row.is-active > td {
  border-top-color: rgba(47, 104, 194, 0.34);
  border-bottom-color: rgba(47, 104, 194, 0.34);
  box-shadow: 0 12px 24px rgba(27, 44, 70, 0.08);
}

.sla-report-section--edit .sla-edit-recalc-row.is-active > td {
  transform: translateY(-1px);
}

.sla-report-section--edit .sla-edit-recalc-row > td:last-child {
  border-right: 1px solid rgba(190, 205, 228, 0.68);
  border-radius: 0 0.55rem 0.55rem 0;
}

.sla-edit-recalc-button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.sla-edit-recalc-button__sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.8rem;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid rgba(47, 104, 194, 0.24);
  border-radius: 999px;
  background: rgba(237, 244, 255, 0.92);
  color: var(--brand-dark);
  line-height: 1;
}

.sla-report-section--edit .sla-edit-recalc-row--fault-penalty > td {
  background: #fff5f0;
}

.sla-report-section--edit .sla-edit-recalc-row--fault-penalty > td:first-child {
  border-left-color: #c97343;
}

.sla-report-section--edit .sla-edit-recalc-row--lc-penalty > td {
  background: #f1f8ff;
}

.sla-report-section--edit .sla-edit-recalc-row--lc-penalty > td:first-child {
  border-left-color: #4d8bc5;
}

.sla-report-section--edit .sla-edit-recalc-row--olt-penalty > td {
  background: #f2fbfb;
}

.sla-report-section--edit .sla-edit-recalc-row--olt-penalty > td:first-child {
  border-left-color: #3e9b9a;
}

.sla-report-section--edit .sla-edit-recalc-row--total-penalty > td {
  background: #fff9e8;
  font-weight: 800;
}

.sla-report-section--edit .sla-edit-recalc-row--total-penalty > td:first-child {
  border-left-color: #c8922f;
}

.sla-report-section--edit .sla-edit-recalc-row--enhancement > td {
  background: #f1fbf5;
}

.sla-report-section--edit .sla-edit-recalc-row--enhancement > td:first-child {
  border-left-color: #3c9b69;
}

.sla-report-section--edit .sla-edit-recalc-row--gross-sla > td {
  background: #edf4ff;
  color: #142947;
  font-weight: 900;
}

.sla-report-section--edit .sla-edit-recalc-row--gross-sla > td:first-child {
  border-left-color: #2f68c2;
}

.sla-edit-report-table {
  width: max-content;
  min-width: 82rem;
  table-layout: auto;
}

.sla-edit-report-table td,
.sla-edit-report-table th {
  white-space: nowrap;
  overflow: visible;
  overflow-wrap: normal;
  word-break: normal;
}

.sla-edit-report-table td:nth-child(1),
.sla-edit-report-table th:nth-child(1) {
  width: 3rem;
  text-align: center;
}

.sla-edit-report-table td:nth-child(2),
.sla-edit-report-table th:nth-child(2) {
  width: 7rem;
}

.sla-edit-report-table td:nth-child(3),
.sla-edit-report-table th:nth-child(3) {
  width: 5rem;
}

.sla-edit-report-table td:nth-child(4),
.sla-edit-report-table th:nth-child(4) {
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  width: 25rem;
  min-width: 25rem;
}

.sla-edit-report-table td:nth-child(5),
.sla-edit-report-table th:nth-child(5) {
  width: 14rem;
}

.sla-edit-report-table td:nth-child(6),
.sla-edit-report-table th:nth-child(6) {
  width: 10rem;
}

.sla-edit-report-table td:nth-child(7),
.sla-edit-report-table th:nth-child(7) {
  width: 7rem;
}

.sla-edit-report-table td:nth-child(8),
.sla-edit-report-table th:nth-child(8) {
  width: 8.5rem;
  min-width: 8.5rem;
  text-align: center;
}

.sla-edit-report-table td:nth-child(9),
.sla-edit-report-table th:nth-child(9) {
  width: 9rem;
  min-width: 9rem;
}

.sla-edit-report-org-code {
  display: block;
  margin-top: 0.16rem;
  color: #69758c;
  font-size: 0.82rem;
  white-space: nowrap;
}

.sla-edit-report-detail-row > td {
  background: #ffffff;
  padding: 0.65rem 0 0.8rem;
}

.sla-edit-report-detail-box {
  margin: 0;
  max-width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.sla-edit-report-value-table {
  width: max-content;
  min-width: 76rem;
  table-layout: auto;
}

.sla-edit-report-value-table td,
.sla-edit-report-value-table th {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.sla-edit-report-value-table td:nth-child(1),
.sla-edit-report-value-table th:nth-child(1) {
  min-width: 3.25rem;
  text-align: center;
}

.sla-edit-report-value-table td:nth-child(2),
.sla-edit-report-value-table th:nth-child(2) {
  min-width: 7.5rem;
}

.sla-edit-report-value-table td:nth-child(3),
.sla-edit-report-value-table th:nth-child(3),
.sla-edit-report-value-table td:nth-child(4),
.sla-edit-report-value-table th:nth-child(4) {
  min-width: 8.5rem;
  text-align: center;
}

.sla-edit-report-value-table td:nth-child(n + 5),
.sla-edit-report-value-table th:nth-child(n + 5) {
  min-width: 11.5rem;
}

.sla-edit-report-record-detail-row > td {
  background: #ffffff;
  padding: 0.55rem 0 0.75rem;
}

.sla-edit-report-record-table {
  min-width: 210rem;
  width: max-content;
  table-layout: auto;
}

.sla-edit-report-record-table td,
.sla-edit-report-record-table th {
  max-width: none;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

.sla-edit-report-record-table td:nth-child(1),
.sla-edit-report-record-table th:nth-child(1) {
  min-width: 9rem;
}

.sla-edit-report-record-table td:nth-child(2),
.sla-edit-report-record-table th:nth-child(2) {
  min-width: 14rem;
}

.sla-edit-report-record-table td:nth-child(3),
.sla-edit-report-record-table th:nth-child(3) {
  min-width: 5rem;
}

.sla-edit-report-record-table td:nth-child(4),
.sla-edit-report-record-table th:nth-child(4),
.sla-edit-report-record-table td:nth-child(5),
.sla-edit-report-record-table th:nth-child(5) {
  min-width: 11rem;
}

.sla-edit-report-record-table td:nth-child(6),
.sla-edit-report-record-table th:nth-child(6) {
  min-width: 5rem;
}

.sla-edit-report-record-table td:nth-child(7),
.sla-edit-report-record-table th:nth-child(7),
.sla-edit-report-record-table td:nth-child(8),
.sla-edit-report-record-table th:nth-child(8),
.sla-edit-report-record-table td:nth-child(9),
.sla-edit-report-record-table th:nth-child(9),
.sla-edit-report-record-table td:nth-child(10),
.sla-edit-report-record-table th:nth-child(10),
.sla-edit-report-record-table td:nth-child(11),
.sla-edit-report-record-table th:nth-child(11),
.sla-edit-report-record-table td:nth-child(12),
.sla-edit-report-record-table th:nth-child(12),
.sla-edit-report-record-table td:nth-child(13),
.sla-edit-report-record-table th:nth-child(13),
.sla-edit-report-record-table td:nth-child(14),
.sla-edit-report-record-table th:nth-child(14) {
  min-width: 8rem;
}

.sla-edit-report-record-table td:nth-child(15),
.sla-edit-report-record-table th:nth-child(15),
.sla-edit-report-record-table td:nth-child(16),
.sla-edit-report-record-table th:nth-child(16),
.sla-edit-report-record-table td:nth-child(17),
.sla-edit-report-record-table th:nth-child(17),
.sla-edit-report-record-table td:nth-child(18),
.sla-edit-report-record-table th:nth-child(18),
.sla-edit-report-record-table td:nth-child(19),
.sla-edit-report-record-table th:nth-child(19),
.sla-edit-report-record-table td:nth-child(20),
.sla-edit-report-record-table th:nth-child(20),
.sla-edit-report-record-table td:nth-child(21),
.sla-edit-report-record-table th:nth-child(21) {
  min-width: 18rem;
}

.sla-edit-report-record-table td:nth-child(21),
.sla-edit-report-record-table th:nth-child(21) {
  min-width: 24rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.sla-edit-report-record-row--disabled > td {
  background: #fff1e8;
  color: #7e3825;
  font-weight: 800;
}

.sla-edit-report-record-row--modified > td {
  background: #eefbf3;
  color: #176c48;
  font-weight: 800;
}

.sla-edit-report-row--original > td {
  background: #fff9e8;
}

.sla-edit-report-value-table .sla-edit-report-row--original > td {
  background: #fff9e8;
}

.sla-edit-report-row--summary > td {
  background: #f7faff;
  font-weight: 800;
}

.sla-edit-report-row--edited > td {
  background: #f1fbf5;
}

.sla-edit-report-value-table .sla-edit-report-row--edited > td {
  background: #f1fbf5;
}

.sla-edit-report-row--original + .sla-edit-report-row--edited > td {
  border-bottom: 0.42rem solid rgba(190, 205, 228, 0.42);
}

.sla-report-section__body h5 {
  margin: 0.85rem 0 0.45rem;
  color: var(--text);
}

.sla-report-section__body h5:first-child {
  margin-top: 0;
}

.audit-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.8rem;
  margin: 0;
}

.audit-detail-list div {
  min-width: 0;
}

.audit-detail-list dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.audit-detail-list dd {
  margin: 0.12rem 0 0;
  overflow-wrap: anywhere;
}

.sla-error-detail,
.sla-error-detail__parameters,
.sla-error-detail__wide,
.sla-error-detail__calculated-block,
.sla-error-detail__panel {
  max-width: 100%;
  min-width: 0;
}

.sla-error-detail {
  overflow-x: hidden;
}

.sla-error-detail .table-scroll {
  max-width: 100%;
  overflow-x: auto;
}

.sla-error-detail__parameters .sla-error-detail__parameter-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.sla-error-detail__parameters .sla-error-detail__parameter-row--org {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sla-error-detail__panel .sla-error-detail__audit-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.audit-detail-list--single {
  grid-template-columns: minmax(0, 1fr);
}

.history-table--compact th,
.history-table--compact td {
  padding: 0.6rem 0.7rem;
  font-size: 0.88rem;
  white-space: nowrap;
}

.sla-audit-source-table th,
.sla-audit-source-table td {
  max-width: 18rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.audit-detail-list--math {
  margin-bottom: 0.9rem;
}

.audit-detail-list--wide {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.audit-detail-list__bold dt,
.audit-detail-list__bold dd {
  color: var(--text);
  font-weight: 800;
}

.audit-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.9rem 1rem;
  padding: 0.4rem 0;
}

.audit-detail-grid__wide {
  grid-column: 1 / -1;
}

.audit-detail-grid span:not(.field-label) {
  color: var(--muted);
  word-break: break-word;
}

.service-log-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem 1rem;
}

.service-log-input-grid code {
  word-break: break-word;
}

.service-log-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #edf4ff;
  border: 1px solid rgba(10, 78, 161, 0.14);
  font-weight: 800;
  line-height: 1.2;
}

.report-expand,
.report-metric-button,
.report-detail-card__close {
  font: inherit;
  font-weight: 700;
}

.report-expand,
.report-detail-card__close {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(10, 78, 161, 0.18);
  border-radius: 999px;
  background: #edf4ff;
  color: var(--brand-dark);
  cursor: pointer;
}

.report-expand:hover,
.report-expand:focus-visible,
.report-detail-card__close:hover,
.report-detail-card__close:focus-visible,
.report-metric-button:hover,
.report-metric-button:focus-visible {
  background: #dfeeff;
}

.report-metric-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 5.25rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(10, 78, 161, 0.18);
  border-radius: 999px;
  background: #edf4ff;
  color: var(--brand-dark);
  cursor: pointer;
}

.report-metric-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
}

.report-detail-row td {
  background: #f8fbff;
}

.report-detail-card {
  display: grid;
  gap: 1rem;
  padding: 0.4rem 0;
}

.report-detail-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.report-detail-card__header h3 {
  margin: 0.1rem 0 0;
  font-size: 1.02rem;
}

.report-detail-view {
  display: grid;
  gap: 0.75rem;
}

.report-detail-view__title {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.status-pill--approved {
  background: #e9f8f3;
  color: var(--success);
}

.status-pill--pending {
  background: #fff5e8;
  color: var(--warning);
}

.status-pill--disabled {
  background: #f8e9ea;
  color: var(--danger);
}

.status-pill--info {
  background: #edf4ff;
  color: var(--brand);
}

.setup-block {
  margin-top: 0.95rem;
}

.registration-submitted-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.72fr) minmax(260px, 0.72fr);
  align-items: stretch;
}

.registration-submitted-grid--single {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

.registration-submitted-grid--single .registration-submitted-card {
  width: 100%;
}

.registration-submitted-grid--single .inline-link-button {
  width: fit-content;
}

.registration-submitted-card,
.registration-qr-card {
  min-height: 100%;
}

.registration-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem 0.9rem;
  margin-top: 0.4rem;
}

.registration-profile-grid code,
.qr-display-card code {
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.registration-install-box {
  border: 1px solid rgba(10, 78, 161, 0.12);
  border-radius: 1rem;
  padding: 0.85rem;
  background: linear-gradient(180deg, rgba(237, 244, 255, 0.82), rgba(255, 255, 255, 0.9));
}

.qr-display-card {
  display: grid;
  gap: 0.8rem;
  justify-items: start;
  margin-top: 1rem;
}

.qr-block {
  display: grid;
  gap: 0.55rem;
}

.qr-image {
  width: 180px;
  max-width: 100%;
  padding: 0.6rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 10px 24px rgba(9, 41, 84, 0.08);
}

.qr-image--large {
  width: 220px;
}

@media (max-width: 1080px) {
  .registration-submitted-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .registration-profile-grid {
    grid-template-columns: 1fr;
  }

  .qr-display-card {
    justify-items: stretch;
  }

  .qr-image--large {
    width: 190px;
  }
}

.recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.hint-text {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.download-box {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
}

.ad-panel {
  margin-bottom: 0.55rem;
  padding: 1rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(215, 224, 239, 0.95);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.ad-panel__header {
  margin-bottom: 0.75rem;
}

.ad-panel__header h2 {
  margin: 0.2rem 0 0;
}

@keyframes keralaDriftLeft {
  0% {
    transform: translateY(0) translateX(0) rotate(-0.2deg);
    opacity: 0.26;
  }

  50% {
    transform: translateY(-4px) translateX(2px) rotate(0.15deg);
    opacity: 0.4;
  }

  100% {
    transform: translateY(3px) translateX(-2px) rotate(-0.15deg);
    opacity: 0.3;
  }
}

@keyframes keralaDriftRight {
  0% {
    transform: translateY(2px) translateX(0) rotate(0.15deg);
    opacity: 0.24;
  }

  50% {
    transform: translateY(-4px) translateX(-2px) rotate(-0.2deg);
    opacity: 0.38;
  }

  100% {
    transform: translateY(3px) translateX(2px) rotate(0.12deg);
    opacity: 0.28;
  }
}

.ad-carousel {
  --kerala-side-space: clamp(72px, 10vw, 122px);
  position: relative;
  display: grid;
  min-height: 0;
  padding: 0.55rem;
  border-radius: 1rem;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(10, 78, 161, 0.06), rgba(209, 59, 76, 0.05)),
    #f7fafe;
}

.ad-carousel::before,
.ad-carousel::after {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  width: calc(var(--kerala-side-space) - 0.55rem);
  border-radius: 0.95rem;
  pointer-events: none;
  opacity: 0.3;
  z-index: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 94%;
  mix-blend-mode: multiply;
}

.ad-carousel::before {
  left: 0.7rem;
  animation: keralaDriftLeft 18s ease-in-out infinite alternate;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(240, 246, 255, 0.18)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 420' fill='none'%3E%3Cpath d='M90 386V192' stroke='%232c5d97' stroke-width='2.4' stroke-linecap='round' stroke-opacity='.42'/%3E%3Cpath d='M90 194C68 168 54 138 48 106' stroke='%232c5d97' stroke-width='2.4' stroke-linecap='round' stroke-opacity='.38'/%3E%3Cpath d='M90 194C112 168 128 140 138 104' stroke='%232c5d97' stroke-width='2.4' stroke-linecap='round' stroke-opacity='.38'/%3E%3Cpath d='M92 186C58 182 34 170 18 150' stroke='%232c5d97' stroke-width='2.1' stroke-linecap='round' stroke-opacity='.34'/%3E%3Cpath d='M92 186C122 184 144 174 164 154' stroke='%232c5d97' stroke-width='2.1' stroke-linecap='round' stroke-opacity='.34'/%3E%3Cpath d='M86 214C58 230 44 252 34 284' stroke='%23b7606c' stroke-width='2' stroke-linecap='round' stroke-opacity='.3'/%3E%3Cpath d='M94 232C66 248 54 268 46 298' stroke='%23b7606c' stroke-width='2' stroke-linecap='round' stroke-opacity='.26'/%3E%3Cpath d='M24 350C56 340 92 340 120 350' stroke='%232c5d97' stroke-width='1.8' stroke-linecap='round' stroke-opacity='.22'/%3E%3Cpath d='M18 372C54 362 94 362 124 372' stroke='%23b7606c' stroke-width='1.8' stroke-linecap='round' stroke-opacity='.2'/%3E%3C/svg%3E");
}

.ad-carousel::after {
  right: 0.7rem;
  animation: keralaDriftRight 19s ease-in-out infinite alternate;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 244, 246, 0.18)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 420' fill='none'%3E%3Cpath d='M46 300H148C164 300 178 310 190 326H82C64 326 52 318 46 300Z' stroke='%232c5d97' stroke-width='2.4' stroke-linejoin='round' stroke-opacity='.38'/%3E%3Cpath d='M96 300V228C96 192 114 170 138 170C160 170 178 194 178 228V300' stroke='%232c5d97' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' stroke-opacity='.36'/%3E%3Cpath d='M114 214H162' stroke='%232c5d97' stroke-width='2.1' stroke-linecap='round' stroke-opacity='.32'/%3E%3Cpath d='M128 254V300' stroke='%232c5d97' stroke-width='2' stroke-linecap='round' stroke-opacity='.28'/%3E%3Cpath d='M154 254V300' stroke='%232c5d97' stroke-width='2' stroke-linecap='round' stroke-opacity='.28'/%3E%3Cpath d='M30 348C62 338 96 338 126 348C150 356 176 356 198 348' stroke='%23b7606c' stroke-width='1.9' stroke-linecap='round' stroke-opacity='.24'/%3E%3Cpath d='M42 372C72 364 106 364 136 372C158 378 182 378 200 372' stroke='%232c5d97' stroke-width='1.8' stroke-linecap='round' stroke-opacity='.2'/%3E%3C/svg%3E");
}

.ad-slide {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  position: relative;
  z-index: 1;
  width: 100%;
  padding-inline: var(--kerala-side-space);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.992);
  transition:
    opacity 700ms ease,
    transform 900ms ease,
    visibility 0s linear 700ms;
}

.ad-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition:
    opacity 700ms ease,
    transform 900ms ease,
    visibility 0s linear 0s;
}

.ad-slide img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(72vh, 820px);
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 14px 24px rgba(9, 41, 84, 0.08));
}

.download-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.store-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.78rem 0.9rem;
  border-radius: 0.9rem;
  background: #eef5ff;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
}

.store-link--apple {
  background: #fff1f3;
  color: var(--accent);
}

.qr-setup-box {
  margin-top: 0.8rem;
  padding: 0.95rem;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(238, 245, 255, 0.9), rgba(255, 241, 243, 0.72));
}

.qr-setup-link {
  width: 100%;
  background: linear-gradient(135deg, rgba(10, 78, 161, 0.12), rgba(209, 59, 76, 0.12));
  color: var(--brand-dark);
}

.qr-setup-box .hint-text {
  margin-top: 0;
}

.ad-library {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.ad-library__item {
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel-alt);
}

.ad-library__item img {
  display: block;
  width: 100%;
  height: 150px;
  border-radius: 0.8rem;
  object-fit: cover;
}

.portal-footer {
  width: 100%;
  padding: 0 2.2rem 1.1rem;
}

.portal-footer__bar {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
  padding: 0.9rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid rgba(130, 182, 255, 0.22);
  background:
    linear-gradient(135deg, rgb(var(--brand-rgb) / 0.97), rgb(var(--theme-teal-rgb) / 0.94)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  box-shadow: 0 16px 34px rgba(12, 38, 72, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem;
}

.portal-footer__brandline {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  justify-content: center;
  color: rgba(255, 255, 255, 0.96);
  font-weight: 700;
  text-align: center;
  min-width: 0;
}

.portal-footer__logo {
  width: 54px;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
  padding: 0.2rem 0.45rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 20px rgba(8, 29, 63, 0.16);
}

.auth-login .portal-footer {
  margin-top: 0;
  padding: 0 2.2rem 0.45rem;
}

.auth-login .portal-footer__logo {
  width: 38px;
}

.auth-login .portal-footer__bar {
  padding: 0.52rem 0.8rem;
  font-size: 0.74rem;
}

.auth-login .download-box {
  margin-top: 0.72rem;
  padding-top: 0.72rem;
  gap: 0.55rem;
}

.auth-login .qr-setup-box {
  margin-top: 0.72rem;
  padding: 0.8rem;
}

.auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-card:nth-child(2) .download-box > .field-label {
  color: var(--text);
  font-weight: 800;
}

.auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-setup-note {
  margin: 0.5rem 0 0;
  padding: 0.58rem 0.72rem;
  border-radius: 0.75rem;
  background: rgba(238, 245, 255, 0.72);
  color: var(--brand-dark);
  font-weight: 700;
  text-align: center;
}

.auth-login .store-link {
  min-height: 2.65rem;
  padding: 0.62rem 0.7rem;
  font-size: 0.84rem;
}

.auth-login .flash-stack {
  margin-bottom: 0.65rem;
}

.auth-login .ad-panel {
  width: 100%;
  max-width: none;
  position: static;
  margin-bottom: 0.35rem;
  padding: 0.82rem;
}

.auth-login .ad-panel__header {
  margin-bottom: 0.55rem;
}

.auth-login .ad-carousel {
  padding: 0.45rem;
}

.auth-login .ad-carousel::before,
.auth-login .ad-carousel::after {
  top: 0.55rem;
  bottom: 0.55rem;
}

.auth-login .ad-slide img {
  max-height: min(72vh, 760px);
}

.auth-forgot-page .forgot-password-grid {
  grid-template-columns: minmax(0, 1fr);
}

.auth-login.auth-forgot-page .forgot-password-grid {
  margin-bottom: 0;
}

.auth-forgot-page .forgot-password-card {
  display: flex;
  flex-direction: column;
}

.auth-forgot-page .portal-footer {
  margin-top: auto;
}

.auth-forgot-page .session-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: min(30rem, 42vw);
  gap: 0.65rem;
}

.auth-forgot-page .session-link {
  padding: 0.82rem 0.85rem;
}

.forgot-password-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.forgot-password-field {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.forgot-password-submit {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: min(18rem, 100%);
  align-self: center;
}

.auth-forgot-page .auth-support-links {
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  margin-top: 0.35rem;
  text-align: center;
}

.auth-forgot-page .auth-support-link {
  margin-top: 0;
}

.forgot-password-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.55rem;
  padding: 0.62rem;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(10, 78, 161, 0.06), rgba(243, 169, 31, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.forgot-password-rules .download-box {
  margin-top: 0;
  padding: 0.52rem 0.58rem;
  border: 1px solid rgba(215, 224, 239, 0.86);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

body.auth-register-page:not(.auth-register-page--setup) {
  height: 100dvh;
  overflow: hidden;
}

.auth-register-page:not(.auth-register-page--setup) .summary-grid {
  display: none;
}

.auth-register-page:not(.auth-register-page--setup) .page-shell {
  flex: 1 1 auto;
  max-width: none;
  min-height: 0;
  padding: 0 2.2rem 0.35rem;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.auth-register-page:not(.auth-register-page--setup) .portal-footer {
  margin-top: 0;
}

.register-grid {
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 0;
}

.register-grid--setup {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.68fr);
}

.register-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.9rem 0.95rem;
}

.auth-register-page:not(.auth-register-page--setup) .login-copy {
  font-size: 0.86rem;
  line-height: 1.28;
}

.register-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem 0.62rem;
  margin-top: 0.58rem;
  align-items: end;
}

.register-field {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.register-field label {
  line-height: 1.16;
}

.register-submit {
  align-self: end;
}

.register-support-row {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 0.68rem;
  margin-top: auto;
  align-items: stretch;
}

.register-rule-card,
.register-download {
  min-width: 0;
  padding: 0.62rem;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(10, 78, 161, 0.06), rgba(243, 169, 31, 0.07));
}

.register-rule-card .hint-text {
  margin-top: 0.25rem;
}

.register-download {
  margin-top: 0;
  border-top: 1px solid rgba(10, 78, 161, 0.14);
  gap: 0.42rem;
}

.register-download .download-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.register-download .store-link {
  min-height: 2.25rem;
  padding: 0.48rem 0.58rem;
}

body.lost-authenticator-page {
  height: 100dvh;
  overflow: hidden;
}

.lost-authenticator-page .summary-grid {
  display: none;
}

.lost-authenticator-page .page-shell {
  flex: 0 0 auto;
  max-width: none;
  min-height: 0;
  padding: 0 2.2rem 0.35rem;
  overflow: visible;
}

.lost-authenticator-page .portal-footer {
  margin-top: auto;
}

.lost-auth-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.72fr);
  gap: 0.7rem;
  margin-bottom: 0;
  align-items: stretch;
}

.lost-auth-card {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 0.95rem;
}

.lost-authenticator-page .login-copy {
  font-size: 0.86rem;
  line-height: 1.28;
}

.lost-auth-step-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.62rem;
}

.lost-auth-step-grid--admin {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lost-auth-step {
  margin-top: 0;
  padding: 0.58rem;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.82rem;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(10, 78, 161, 0.06), rgba(243, 169, 31, 0.07));
}

.lost-authenticator-page .auth-support-links {
  margin-top: 0.68rem;
  gap: 0.5rem 0.9rem;
}

.lost-authenticator-page .inline-link-button {
  margin-top: 0;
}

.lost-authenticator-page .auth-support-link {
  margin-top: 0;
}

body.auth-setup-page:not(.auth-setup-page--qr) {
  height: 100dvh;
  overflow: hidden;
}

.auth-setup-page:not(.auth-setup-page--qr) .summary-grid {
  display: none;
}

.auth-setup-page:not(.auth-setup-page--qr) .page-shell {
  flex: 0 0 auto;
  max-width: none;
  min-height: 0;
  padding: 0 2.2rem 0.35rem;
  overflow: visible;
}

.auth-setup-page:not(.auth-setup-page--qr) .portal-footer {
  margin-top: auto;
}

.setup-auth-grid {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 0;
}

.setup-auth-grid--qr {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
}

.setup-auth-card {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 0.95rem;
}

.auth-setup-page:not(.auth-setup-page--qr) .login-copy {
  font-size: 0.86rem;
  line-height: 1.28;
}

.setup-auth-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(12rem, 0.42fr);
  gap: 0.52rem 0.62rem;
  margin-top: 0.58rem;
  align-items: end;
}

.setup-auth-field {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.setup-auth-submit {
  align-self: end;
}

.setup-auth-download {
  width: min(100%, 42rem);
  margin-top: 0.7rem;
  padding: 0.62rem;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(10, 78, 161, 0.06), rgba(243, 169, 31, 0.07));
}

.setup-auth-download .download-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.setup-auth-download .store-link {
  min-height: 2.25rem;
  padding: 0.48rem 0.58rem;
}

.auth-flow-page .hero__content::after {
  display: none;
}

@media (min-width: 900px) and (min-height: 640px) {
  body.auth-flow-page {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .auth-flow-page .hero {
    flex: 0 0 auto;
    padding: 0.45rem 1.1rem 0.35rem;
  }

  .auth-flow-page .hero__content {
    max-width: none;
    padding: 0.62rem 0.85rem 0.68rem;
    border-radius: 1.05rem;
  }

  .auth-flow-page .hero__bar {
    gap: 0.8rem;
  }

  .auth-flow-page .hero__identity {
    gap: 0.8rem;
  }

  .auth-flow-page .hero__logo-wrap {
    min-width: 104px;
    width: 104px;
    padding: 0.22rem 0.3rem;
    border-radius: 0.85rem;
  }

  .auth-flow-page .hero__logo {
    max-width: 96px;
  }

  .auth-flow-page .hero__content h1 {
    margin: 0.05rem 0 0.15rem;
    font-size: clamp(1.45rem, 2.45vw, 2.05rem);
    line-height: 1.05;
  }

  .auth-flow-page .hero__copy {
    max-width: 34rem;
    font-size: 0.78rem;
    line-height: 1.16;
  }

  .auth-flow-page .session-links {
    gap: 0.5rem;
  }

  .auth-flow-page .session-link {
    min-height: 2.3rem;
    padding: 0.5rem 0.78rem;
    border-radius: 0.68rem;
    font-size: 0.84rem;
  }

  .auth-flow-page .page-shell {
    flex: 1 1 auto;
    min-height: 0;
    max-width: none;
    padding: 0 1.1rem 0.35rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .auth-flow-page .flash-stack {
    flex: 0 0 auto;
    margin-bottom: 0.38rem;
  }

  .auth-flow-page .flash {
    padding: 0.5rem 0.72rem;
    border-radius: 0.72rem;
    font-size: 0.82rem;
  }

  .auth-flow-page .summary-grid {
    display: none;
  }

  .auth-flow-page .login-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: minmax(0, 1.05fr) minmax(230px, 0.82fr);
    gap: 0.65rem;
    margin-bottom: 0;
    align-items: stretch;
  }

  .auth-flow-page .login-grid--with-notice {
    grid-template-columns: minmax(0, 1.05fr) minmax(230px, 0.72fr) minmax(250px, 0.82fr);
  }

  .auth-flow-page .login-card,
  .auth-flow-page .ad-panel {
    min-height: 0;
    height: 100%;
    padding: 0.68rem 0.78rem;
    border-radius: 0.92rem;
    overflow: hidden;
  }

  .auth-change-page .login-grid,
  .auth-setup-page .login-grid {
    flex: 0 0 auto;
    align-items: start;
  }

  .auth-change-page .login-card,
  .auth-setup-page .login-card {
    height: auto;
  }

  .auth-login.auth-flow-page .login-grid {
    flex: 0 0 auto;
    align-items: start;
  }

  .auth-login.auth-flow-page .login-card,
  .auth-login.auth-flow-page .ad-panel {
    height: auto;
  }

  .auth-login.auth-flow-page .ad-carousel {
    height: auto;
    max-height: min(50vh, 520px);
  }

  .auth-login.auth-flow-page .ad-slide,
  .auth-login.auth-flow-page .ad-slide.is-active {
    height: auto;
  }

  .auth-login.auth-flow-page .ad-slide img {
    height: auto;
    max-height: min(48vh, 500px);
  }

  .auth-flow-page .login-card h2,
  .auth-flow-page .ad-panel__header h2 {
    margin: 0.05rem 0 0.18rem;
    font-size: 1.16rem;
    line-height: 1.08;
  }

  .auth-flow-page .eyebrow {
    font-size: 0.66rem;
    line-height: 1.1;
  }

  .auth-flow-page .login-copy {
    font-size: 0.77rem;
    line-height: 1.22;
  }

  .auth-flow-page .tool-form {
    gap: 0.34rem;
    margin-top: 0.45rem;
  }

  .auth-flow-page .tool-form label {
    font-size: 0.78rem;
  }

  .auth-flow-page .tool-form input,
  .auth-flow-page .tool-form select {
    min-height: 2.32rem;
    padding: 0.46rem 0.62rem;
    border-radius: 0.64rem;
    font-size: 0.88rem;
  }

  .auth-flow-page .tool-form button,
  .auth-flow-page .inline-link-button {
    min-height: 2.28rem;
    margin-top: 0.45rem;
    padding: 0.5rem 0.66rem;
    border-radius: 0.68rem;
    font-size: 0.84rem;
  }

  .auth-flow-page .text-link,
  .auth-flow-page .auth-support-link {
    margin-top: 0.36rem;
    font-size: 0.82rem;
  }

  .auth-flow-page .auth-support-links {
    gap: 0.35rem 0.85rem;
  }

  .auth-flow-page .download-box {
    margin-top: 0.46rem;
    padding-top: 0.46rem;
    gap: 0.28rem;
  }

  .auth-flow-page .field-label {
    margin-bottom: 0.16rem;
    font-size: 0.76rem;
  }

  .auth-flow-page .hint-text {
    margin-top: 0.18rem;
    font-size: 0.74rem;
    line-height: 1.22;
  }

  .auth-flow-page .store-link {
    min-height: 2.2rem;
    padding: 0.48rem 0.58rem;
    border-radius: 0.64rem;
    font-size: 0.76rem;
  }

  .auth-flow-page .download-links {
    gap: 0.4rem;
  }

  .auth-flow-page .setup-block {
    margin-top: 0.48rem;
  }

  .auth-flow-page .qr-image {
    width: 132px;
    padding: 0.38rem;
    border-radius: 0.72rem;
  }

  .auth-flow-page .recovery-grid {
    gap: 0.34rem;
    margin-top: 0.34rem;
  }

  .auth-flow-page .recovery-grid code {
    font-size: 0.74rem;
  }

  .auth-flow-page .ad-panel {
    margin: 0;
  }

  .auth-flow-page .ad-panel__header {
    margin-bottom: 0.35rem;
  }

  .auth-flow-page .ad-carousel {
    height: calc(100% - 1.85rem);
    min-height: 0;
    padding: 0.3rem;
  }

  .auth-flow-page .ad-slide,
  .auth-flow-page .ad-slide.is-active {
    height: 100%;
    padding-inline: 0;
  }

  .auth-flow-page .ad-slide img,
  .auth-login.auth-flow-page .ad-slide img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
  }

  .auth-login.auth-flow-page .login-grid {
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    align-items: start;
  }

  .auth-login.auth-flow-page .login-card {
    height: auto;
  }

  .auth-login.auth-flow-page .ad-panel {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    margin: 0.62rem 0 0;
    padding: 0.82rem;
    display: flex;
    flex-direction: column;
  }

  .auth-login.auth-flow-page .ad-carousel {
    --kerala-side-space: clamp(72px, 10vw, 122px);
    flex: 1 1 auto;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    height: 100%;
    min-height: 0;
    max-height: none;
    padding: 0.45rem;
  }

  .auth-login.auth-flow-page .ad-carousel::before,
  .auth-login.auth-flow-page .ad-carousel::after {
    display: block;
    top: 0.55rem;
    bottom: 0.55rem;
  }

  .auth-login.auth-flow-page .ad-slide,
  .auth-login.auth-flow-page .ad-slide.is-active {
    height: 100%;
    min-height: 0;
    padding-inline: var(--kerala-side-space);
  }

  .auth-login.auth-flow-page .ad-slide img {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .auth-register-page .login-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.68fr);
  }

  .auth-register-page .download-box:not(:first-of-type) {
    display: none;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-download {
    display: grid;
  }

  .auth-register-page:not(.auth-register-page--setup) .login-grid {
    flex: 1 1 auto;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .auth-register-page:not(.auth-register-page--setup) .login-card {
    height: auto;
    overflow: visible;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-form {
    gap: 0.46rem 0.58rem;
    margin-top: 0.46rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-support-row {
    gap: 0.55rem;
    margin-top: auto;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-rule-card,
  .auth-register-page:not(.auth-register-page--setup) .register-download {
    padding: 0.52rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .login-grid {
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .login-card {
    height: auto;
    overflow: visible;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-form {
    gap: 0.46rem 0.58rem;
    margin-top: 0.46rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-download {
    margin-top: 0.52rem;
    padding: 0.52rem;
  }

  .auth-forgot-page .login-grid {
    flex: 0 0 auto;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .auth-forgot-page .login-card {
    height: auto;
    overflow: visible;
  }

  .auth-forgot-page .forgot-password-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 0.62rem;
    margin-top: 0.42rem;
  }

  .auth-forgot-page .forgot-password-rules {
    gap: 0.5rem;
    margin-top: 0.45rem;
    padding: 0.54rem;
  }

  .auth-forgot-page .forgot-password-rules .hint-text {
    line-height: 1.18;
  }

  .auth-flow-page .portal-footer {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 0 2.2rem 1.1rem;
  }

  .auth-flow-page .portal-footer__bar {
    padding: 0.35rem 0.7rem;
    border-radius: 0.72rem;
    font-size: 0.68rem;
  }

  .auth-change-page .portal-footer__bar,
  .auth-setup-page .portal-footer__bar {
    padding: 0.9rem 1.15rem;
    border-radius: 1rem;
    font-size: 0.84rem;
  }

  .auth-flow-page .portal-footer__logo {
    width: 30px;
    padding: 0.12rem 0.28rem;
  }

  .auth-change-page .portal-footer__logo,
  .auth-setup-page .portal-footer__logo {
    width: 54px;
    padding: 0.2rem 0.45rem;
  }
}

@media (min-width: 900px) and (max-height: 780px), (min-width: 900px) and (max-width: 1100px) {
  .auth-register-page:not(.auth-register-page--setup) .login-copy {
    display: none;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-card {
    padding: 0.76rem 0.85rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem 0.52rem;
    margin-top: 0.4rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-support-row {
    gap: 0.45rem;
    margin-top: auto;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-rule-card,
  .auth-register-page:not(.auth-register-page--setup) .register-download {
    padding: 0.44rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-download .store-link {
    min-height: 2rem;
    padding: 0.4rem 0.5rem;
  }
}

@media (max-width: 899px) {
  body.auth-flow-page {
    min-height: 100dvh;
    overflow-x: hidden;
  }

  .auth-flow-page .hero {
    padding: 0.42rem 0.55rem 0.28rem;
  }

  .auth-flow-page .hero__content {
    padding: 0.5rem 0.58rem;
    border-radius: 0.85rem;
  }

  .auth-flow-page .hero__bar {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    align-items: center;
  }

  .auth-flow-page .hero__identity {
    gap: 0.5rem;
    align-items: center;
  }

  .auth-flow-page .hero__logo-wrap {
    min-width: 72px;
    width: 72px;
    padding: 0.14rem 0.2rem;
    border-radius: 0.72rem;
  }

  .auth-flow-page .hero__logo {
    max-width: 64px;
  }

  .auth-flow-page .hero__content h1 {
    margin: 0;
    font-size: 1.18rem;
    line-height: 1.02;
  }

  .auth-flow-page .hero__copy,
  .auth-flow-page .hero__copyblock .eyebrow {
    display: none;
  }

  .auth-flow-page .session-links {
    gap: 0.32rem;
  }

  .auth-flow-page .session-link {
    min-height: 2rem;
    padding: 0.36rem 0.54rem;
    border-radius: 0.6rem;
    font-size: 0.74rem;
  }

  .auth-flow-page .page-shell {
    padding: 0 0.55rem 0.35rem;
  }

  .auth-flow-page .summary-grid {
    display: none;
  }

  .auth-flow-page .login-grid {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    margin-bottom: 0;
  }

  .auth-flow-page .login-grid > .login-card:not(:first-child) {
    display: none;
  }

  body.auth-register-page:not(.auth-register-page--setup) {
    height: 100dvh;
    overflow: hidden;
  }

  .auth-register-page:not(.auth-register-page--setup) .hero {
    padding: 0.46rem 0.55rem 0.26rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .hero__content {
    padding: 0.58rem 0.62rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .hero__bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
    align-items: start;
  }

  .auth-register-page:not(.auth-register-page--setup) .hero__identity {
    gap: 0.58rem;
    align-items: center;
  }

  .auth-register-page:not(.auth-register-page--setup) .hero__logo-wrap {
    min-width: 92px;
    width: 92px;
    padding: 0.2rem 0.3rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .hero__logo {
    max-width: 84px;
  }

  .auth-register-page:not(.auth-register-page--setup) .hero__content h1 {
    font-size: 1.12rem;
    line-height: 1.04;
  }

  .auth-register-page:not(.auth-register-page--setup) .hero__copy,
  .auth-register-page:not(.auth-register-page--setup) .hero__copyblock .eyebrow,
  .auth-register-page:not(.auth-register-page--setup) .login-copy {
    display: none;
  }

  .auth-register-page:not(.auth-register-page--setup) .session-links {
    width: 100%;
    min-width: 0;
    padding: 0.34rem;
    gap: 0.3rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .session-link {
    min-height: 1.8rem;
    padding: 0.3rem 0.45rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .page-shell {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0.55rem 0.28rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-grid {
    gap: 0.42rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-card {
    padding: 0.54rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-card h2 {
    margin-bottom: 0.16rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.24rem 0.38rem;
    margin-top: 0.35rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-field {
    gap: 0.2rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .tool-form input,
  .auth-register-page:not(.auth-register-page--setup) .tool-form select,
  .auth-register-page:not(.auth-register-page--setup) .tool-form button {
    padding: 0.42rem 0.52rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-support-row {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 0.32rem;
    margin-top: 0.32rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-rule-card,
  .auth-register-page:not(.auth-register-page--setup) .register-download {
    padding: 0.34rem;
    border-radius: 0.72rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .field-label {
    font-size: 0.62rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-rule-card .hint-text {
    font-size: 0.68rem;
    line-height: 1.12;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-download .download-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .auth-register-page:not(.auth-register-page--setup) .register-download .store-link {
    min-height: 1.72rem;
    padding: 0.28rem 0.32rem;
    font-size: 0.66rem;
  }

  body.auth-setup-page:not(.auth-setup-page--qr) {
    height: 100dvh;
    overflow: hidden;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .hero {
    padding: 0.46rem 0.55rem 0.26rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .hero__content {
    padding: 0.58rem 0.62rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .hero__bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
    align-items: start;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .hero__identity {
    gap: 0.58rem;
    align-items: center;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .hero__logo-wrap {
    min-width: 92px;
    width: 92px;
    padding: 0.2rem 0.3rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .hero__logo {
    max-width: 84px;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .hero__content h1 {
    font-size: 1.12rem;
    line-height: 1.04;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .hero__copy,
  .auth-setup-page:not(.auth-setup-page--qr) .hero__copyblock .eyebrow,
  .auth-setup-page:not(.auth-setup-page--qr) .login-copy {
    display: none;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .session-links {
    width: 100%;
    min-width: 0;
    padding: 0.34rem;
    gap: 0.3rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .session-link {
    min-height: 1.8rem;
    padding: 0.3rem 0.45rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .page-shell {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0.55rem 0.28rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-grid {
    gap: 0.42rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-card {
    padding: 0.54rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-card h2 {
    margin-bottom: 0.16rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.24rem 0.38rem;
    margin-top: 0.35rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-field {
    gap: 0.2rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-submit {
    grid-column: 1 / -1;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .tool-form input,
  .auth-setup-page:not(.auth-setup-page--qr) .tool-form button {
    padding: 0.42rem 0.52rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-download {
    width: 100%;
    margin-top: 0.32rem;
    padding: 0.34rem;
    border-radius: 0.72rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-download .field-label {
    font-size: 0.62rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-download .download-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-download .store-link {
    min-height: 1.72rem;
    padding: 0.28rem 0.32rem;
    font-size: 0.66rem;
  }

  body.lost-authenticator-page {
    height: 100dvh;
    overflow: hidden;
  }

  .lost-authenticator-page .hero {
    padding: 0.46rem 0.55rem 0.26rem;
  }

  .lost-authenticator-page .hero__content {
    padding: 0.58rem 0.62rem;
  }

  .lost-authenticator-page .hero__bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
    align-items: start;
  }

  .lost-authenticator-page .hero__identity {
    gap: 0.58rem;
    align-items: center;
  }

  .lost-authenticator-page .hero__logo-wrap {
    min-width: 92px;
    width: 92px;
    padding: 0.2rem 0.3rem;
  }

  .lost-authenticator-page .hero__logo {
    max-width: 84px;
  }

  .lost-authenticator-page .hero__content h1 {
    font-size: 1.12rem;
    line-height: 1.04;
  }

  .lost-authenticator-page .hero__copy,
  .lost-authenticator-page .hero__copyblock .eyebrow,
  .lost-authenticator-page .login-copy {
    display: none;
  }

  .lost-authenticator-page .session-links {
    width: 100%;
    min-width: 0;
    padding: 0.34rem;
    gap: 0.3rem;
  }

  .lost-authenticator-page .session-link {
    min-height: 1.8rem;
    padding: 0.3rem 0.45rem;
  }

  .lost-authenticator-page .page-shell {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0.55rem 0.28rem;
  }

  .lost-auth-grid {
    grid-template-columns: 1fr;
    gap: 0.36rem;
  }

  .lost-auth-card {
    padding: 0.54rem;
  }

  .lost-auth-card h2 {
    margin-bottom: 0.16rem;
  }

  .lost-auth-step-grid {
    gap: 0.28rem;
    margin-top: 0.34rem;
  }

  .lost-auth-step {
    padding: 0.3rem;
    border-radius: 0.68rem;
  }

  .lost-auth-step .field-label {
    font-size: 0.62rem;
  }

  .lost-auth-step .hint-text {
    font-size: 0.68rem;
    line-height: 1.12;
  }

  .lost-authenticator-page .auth-support-links {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.28rem;
    margin-top: 0.34rem;
  }

  .lost-authenticator-page .inline-link-button {
    min-height: 1.82rem;
    padding: 0.34rem 0.4rem;
    font-size: 0.72rem;
  }

  .lost-authenticator-page .auth-support-link {
    align-self: center;
    text-align: center;
    font-size: 0.72rem;
  }

  .auth-forgot-page .login-grid > .login-card:not(:first-child) {
    display: flex;
  }

  .auth-forgot-page .forgot-password-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 0.45rem;
  }

  .auth-forgot-page .forgot-password-submit {
    grid-column: 1 / -1;
    justify-self: center;
  }

  .auth-forgot-page .forgot-password-rules {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.38rem;
    padding: 0.42rem;
  }

  .auth-forgot-page .forgot-password-rules .download-box {
    padding: 0.42rem;
    border: 1px solid rgba(215, 224, 239, 0.85);
    border-radius: 0.62rem;
    background: rgba(248, 251, 255, 0.82);
  }

  .auth-login.auth-flow-page .ad-panel {
    display: none;
  }

  .auth-flow-page .login-card {
    padding: 0.62rem;
    border-radius: 0.82rem;
  }

  .auth-flow-page .login-card h2 {
    margin: 0.02rem 0 0.12rem;
    font-size: 1.08rem;
    line-height: 1.08;
  }

  .auth-flow-page .eyebrow {
    font-size: 0.62rem;
    line-height: 1.05;
  }

  .auth-flow-page .login-copy {
    font-size: 0.74rem;
    line-height: 1.18;
  }

  .auth-flow-page .tool-form {
    gap: 0.22rem;
    margin-top: 0.32rem;
  }

  .auth-flow-page .tool-form label {
    font-size: 0.7rem;
    line-height: 1.08;
  }

  .auth-flow-page .tool-form input,
  .auth-flow-page .tool-form select {
    min-height: 2rem;
    padding: 0.34rem 0.48rem;
    border-radius: 0.58rem;
    font-size: 0.82rem;
  }

  .auth-flow-page .tool-form button,
  .auth-flow-page .inline-link-button {
    min-height: 2.08rem;
    margin-top: 0.34rem;
    padding: 0.42rem 0.54rem;
    border-radius: 0.6rem;
    font-size: 0.8rem;
  }

  .auth-flow-page .text-link,
  .auth-flow-page .auth-support-link {
    margin-top: 0.3rem;
    font-size: 0.78rem;
  }

  .auth-flow-page .auth-support-links {
    gap: 0.28rem 0.7rem;
  }

  .auth-flow-page .download-box {
    margin-top: 0.36rem;
    padding-top: 0.36rem;
    gap: 0.2rem;
  }

  .auth-setup-page .login-card > .download-box,
  .auth-register-page .login-card > .download-box {
    display: none;
  }

  .auth-setup-page:not(.auth-setup-page--qr) .setup-auth-download {
    display: grid;
  }

  .auth-flow-page .field-label {
    margin-bottom: 0.1rem;
    font-size: 0.68rem;
  }

  .auth-flow-page .hint-text {
    margin-top: 0.12rem;
    font-size: 0.68rem;
    line-height: 1.14;
  }

  .lost-authenticator-page .download-box {
    margin-top: 0.28rem;
    padding-top: 0.28rem;
  }

  .auth-flow-page .portal-footer {
    display: none;
  }
}

@media (max-width: 380px) and (max-height: 760px) {
  .auth-flow-page .hero {
    padding: 0.34rem 0.46rem 0.22rem;
  }

  .auth-flow-page .hero__content {
    padding: 0.42rem 0.5rem;
  }

  .auth-flow-page .hero__logo-wrap {
    min-width: 64px;
    width: 64px;
  }

  .auth-flow-page .hero__logo {
    max-width: 56px;
  }

  .auth-flow-page .hero__content h1 {
    font-size: 1.08rem;
  }

  .auth-flow-page .page-shell {
    padding: 0 0.46rem 0.26rem;
  }

  .auth-flow-page .login-card {
    padding: 0.52rem;
  }

  .auth-flow-page .login-card h2 {
    font-size: 1rem;
  }

  .auth-flow-page .login-copy {
    font-size: 0.69rem;
    line-height: 1.12;
  }

  .auth-register-page .login-copy,
  .auth-register-page .eyebrow {
    display: none;
  }

  .auth-flow-page .tool-form {
    gap: 0.16rem;
    margin-top: 0.22rem;
  }

  .auth-flow-page .tool-form label {
    font-size: 0.66rem;
  }

  .auth-flow-page .tool-form input,
  .auth-flow-page .tool-form select {
    min-height: 1.86rem;
    padding: 0.3rem 0.42rem;
    font-size: 0.78rem;
  }

  .auth-flow-page .tool-form button,
  .auth-flow-page .inline-link-button {
    min-height: 1.94rem;
    margin-top: 0.24rem;
    padding: 0.34rem 0.48rem;
    font-size: 0.76rem;
  }

  .auth-flow-page .auth-support-links {
    gap: 0.18rem 0.58rem;
  }

  .auth-flow-page .hint-text {
    font-size: 0.64rem;
  }
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

th,
td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.user-admin-table {
  min-width: 1040px;
  table-layout: fixed;
}

.user-admin-table th,
.user-admin-table td {
  padding: 0.72rem 0.62rem;
  vertical-align: middle;
  overflow-wrap: normal;
  word-break: normal;
}

.user-admin-table th {
  line-height: 1.2;
  white-space: normal;
}

.user-admin-table td {
  color: var(--text);
}

.user-admin-table th:nth-child(1),
.user-admin-table td:nth-child(1) {
  width: 8.5rem;
}

.user-admin-table th:nth-child(2),
.user-admin-table td:nth-child(2) {
  width: 8rem;
}

.user-admin-table th:nth-child(3),
.user-admin-table td:nth-child(3) {
  width: 8.5rem;
}

.user-admin-table th:nth-child(4),
.user-admin-table td:nth-child(4) {
  width: 7.8rem;
}

.user-admin-table th:nth-child(5),
.user-admin-table td:nth-child(5) {
  width: 8.2rem;
}

.user-admin-table th:nth-child(6),
.user-admin-table td:nth-child(6) {
  width: 7.5rem;
}

.user-admin-table th:nth-child(7),
.user-admin-table td:nth-child(7) {
  width: 7.6rem;
}

.user-admin-table th:nth-child(8),
.user-admin-table td:nth-child(8) {
  width: 9rem;
}

.user-admin-table td:nth-child(4) code {
  display: inline-block;
  padding: 0.28rem 0.46rem;
  border-radius: 0.45rem;
  background: #eef4ff;
  color: var(--brand-dark);
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.user-admin-table .empty-state {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: #66748a;
}

.user-admin-main-row td {
  border-top: 4px solid #c1d2ea;
}

.user-admin-main-row:first-child td {
  border-top-width: 1px;
}

.user-admin-actions-row td {
  padding-top: 0.35rem;
  padding-bottom: 1rem;
  border-bottom: 4px solid #c1d2ea;
}

.user-admin-row--odd td {
  background: #ffffff;
}

.user-admin-row--even td {
  background: #eaf3ff;
}

.user-admin-actions-row.user-admin-row--odd td {
  background: #f7fbff;
}

.user-admin-actions-row.user-admin-row--even td {
  background: #d9eaff;
}

.user-admin-link-row.user-admin-row--odd td {
  background: #f7fbff;
}

.user-admin-link-row.user-admin-row--even td {
  background: #d9eaff;
}

.user-admin-table tbody tr:hover td {
  background: #e5efff;
}

.user-admin-main-row td:first-child,
.user-admin-actions-row td:first-child,
.user-admin-link-row td:first-child {
  box-shadow: inset 0.35rem 0 0 #2f5aa8;
}

.user-admin-main-row.user-admin-row--even td:first-child,
.user-admin-actions-row.user-admin-row--even td:first-child,
.user-admin-link-row.user-admin-row--even td:first-child {
  box-shadow: inset 0.35rem 0 0 #4f9b9a;
}

.user-admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.user-admin-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3.1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cad9ee;
  border-radius: 0.75rem;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(18, 48, 88, 0.04);
}

.user-admin-action .field-label {
  margin: 0;
  color: #66748a;
  white-space: nowrap;
}

.user-admin-action .role-form {
  margin-left: auto;
}

.sla-inline-linking {
  display: grid;
  gap: 1rem;
  padding: 0.35rem 0;
}

.sla-inline-linking .filter-form {
  margin: 0;
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #f8fbff;
}

.empty-state {
  color: var(--muted);
  margin: 0;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pagination-bar[hidden] {
  display: none;
}

.pagination-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.pagination-links {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(10, 78, 161, 0.16);
  background: #edf4ff;
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.pagination-link:hover,
.pagination-link:focus-visible {
  background: #dfeeff;
}

.pagination-link--disabled {
  opacity: 0.55;
  pointer-events: none;
  background: #f3f6fb;
}

.pagination-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
}

.pagination-jump__label {
  color: var(--muted);
  font-weight: 700;
}

.pagination-jump__input {
  width: 5.6rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-alt);
  font: inherit;
  text-align: center;
}

.pagination-jump__button {
  min-width: 4.6rem;
  padding: 0.65rem 0.95rem;
  border: 1px solid rgb(var(--theme-teal-rgb) / 0.16);
  border-radius: 999px;
  background: #eef8f7;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pagination-jump__button:hover,
.pagination-jump__button:focus-visible {
  background: #def1ef;
}

.olt-map-panel {
  display: grid;
  gap: 1rem;
}

.olt-map-header {
  align-items: center;
}

.olt-map-header > div:first-child {
  flex: 0 0 auto;
}

.olt-map-legend--header {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.olt-map-toolbar {
  display: grid;
  grid-template-columns: minmax(18rem, 1.55fr) minmax(10rem, 0.8fr) minmax(11rem, 0.85fr) minmax(13rem, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
}

.olt-map-toolbar > div {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.olt-map-toolbar label {
  color: var(--text);
  font-weight: 800;
}

.olt-map-toolbar input,
.olt-map-toolbar select {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--panel-alt);
  color: var(--text);
  font: inherit;
  padding: 0.74rem 0.85rem;
}

.olt-map-reset {
  min-height: 3rem;
  padding: 0.72rem 1.05rem;
  border: 1px solid rgb(var(--theme-teal-rgb) / 0.18);
  border-radius: 999px;
  background: #eef8f7;
  color: var(--brand-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.olt-map-reset:hover,
.olt-map-reset:focus-visible {
  background: #def1ef;
}

.olt-map-meta,
.olt-map-legend {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.olt-map-meta span,
.olt-map-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.2rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgb(var(--theme-teal-rgb) / 0.14);
  border-radius: 999px;
  background: #f7fbfc;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.olt-map-meta strong,
.olt-map-legend__item strong {
  color: var(--text);
}

.olt-map-legend__swatch {
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 50%;
  background: var(--olt-map-color, #64748b);
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 3px rgba(27, 44, 70, 0.16);
  flex: 0 0 auto;
}

.olt-map-canvas {
  position: relative;
  height: clamp(32rem, calc(100dvh - 24rem), 58rem);
  min-height: 28rem;
  overflow: hidden;
  border: 1px solid rgba(154, 174, 208, 0.68);
  border-radius: 1rem;
  background:
    linear-gradient(135deg, rgb(var(--brand-rgb) / 0.07), rgb(var(--theme-teal-rgb) / 0.07), rgb(var(--accent-rgb) / 0.04)),
    #e9f1fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), 0 12px 28px rgba(12, 38, 72, 0.08);
}

.olt-map-canvas .maplibregl-canvas {
  outline: none;
}

.olt-map-loading {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-dark);
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(9, 41, 84, 0.12);
}

.olt-map-loading[hidden] {
  display: none;
}

.olt-map-popup {
  display: grid;
  gap: 0.18rem;
  min-width: 13rem;
  max-width: 18rem;
  color: var(--text);
}

.olt-map-popup strong {
  color: var(--brand-dark);
  font-size: 1rem;
}

.olt-map-popup span,
.olt-map-popup small {
  color: var(--muted);
  line-height: 1.28;
}

.olt-map-popup a {
  margin-top: 0.32rem;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.olt-map-canvas .maplibregl-popup-content,
.olt-map-canvas .mapboxgl-popup-content {
  border: 1px solid rgba(154, 174, 208, 0.72);
  border-radius: 0.85rem;
  box-shadow: 0 12px 28px rgba(9, 41, 84, 0.16);
}

.olt-map-details {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
}

.olt-map-details[hidden] {
  display: none;
}

.olt-map-details__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.olt-map-details__header h3 {
  margin: 0.15rem 0 0;
  font-size: 1.28rem;
}

.olt-map-details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}

.olt-map-details__grid > div {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid rgba(215, 224, 239, 0.9);
  border-radius: 0.8rem;
  background: #f8fbff;
}

.olt-map-details__grid strong {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.history-card--map {
  overflow: visible;
}

.olt-master-upload-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid rgba(202, 215, 226, 0.92);
  border-left: 4px solid var(--theme-teal);
  border-radius: 8px;
  background: #f8fbfd;
}

.olt-master-upload-band--sla {
  margin-top: 0.25rem;
}

.olt-master-upload-form {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) auto auto;
  gap: 0.65rem;
  align-items: end;
  min-width: 0;
}

.olt-master-file-field,
.olt-master-replace-field {
  display: grid;
  gap: 0.32rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.olt-master-file-field input[type="file"] {
  width: 100%;
  min-height: 2.5rem;
  padding: 0.42rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.olt-master-replace-field {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  white-space: nowrap;
}

.olt-master-replace-field input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--theme-teal);
}

.olt-master-upload-form .primary-page-action {
  min-height: 2.5rem;
  margin: 0;
  white-space: nowrap;
}

.olt-master-import-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem 0.55rem;
  max-width: 30rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.olt-master-import-status strong,
.olt-master-import-status small {
  flex-basis: 100%;
  text-align: right;
}

.olt-master-import-status strong {
  color: var(--text);
  font-size: 0.86rem;
}

.olt-master-import-status small {
  overflow-wrap: anywhere;
}

.olt-geo-panel {
  --olt-geo-height: clamp(32rem, calc(100svh - 10rem), 66rem);
  --olt-map-floating-card-width: clamp(17rem, 24vw, 21rem);
  grid-template-rows: auto auto minmax(28rem, var(--olt-geo-height)) auto;
  align-content: start;
  gap: 0.62rem;
  min-height: min(100svh, calc(100dvh - 0.75rem));
  overflow: visible;
}

.olt-geo-title-row {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0;
  padding-bottom: 0;
}

.olt-geo-title-row h2 {
  color: #2b6662;
  font-size: 0.88rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  line-height: 1.2;
  margin: 0;
  text-transform: uppercase;
}

.olt-geo-meta {
  display: flex;
  flex: 0 1 auto;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 0.42rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.olt-geo-meta span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-width: max-content;
  min-height: 2.62rem;
  line-height: 1.1;
  white-space: nowrap;
}

.olt-geo-meta strong {
  flex: 0 0 auto;
  line-height: 1;
}

.olt-geo-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
  min-width: 0;
}

.olt-geo-layer-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}

.olt-geo-layer-controls--primary {
  justify-content: flex-start;
}

.olt-geo-layer-controls--overlays {
  justify-content: flex-end;
  margin-left: auto;
}

.secondary-page-action.olt-geo-toggle,
.secondary-page-action.olt-geo-reset,
.secondary-page-action.olt-geo-info-action {
  min-height: 2.08rem;
  padding: 0.34rem 0.58rem;
  border: 1px solid rgba(202, 215, 226, 0.92);
  border-left: 4px solid var(--theme-teal);
  border-radius: 8px;
  background: #f8fbfd;
  color: #155b58;
  font-size: 0.76rem;
  font-weight: 920;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: 0 0.35rem 0.9rem rgba(15, 43, 75, 0.04);
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="district"] {
  border-left-color: var(--brand);
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="subdistrict"],
.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="olts"] {
  border-left-color: var(--theme-teal);
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="village"] {
  border-left-color: var(--accent);
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="aerial"],
.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="population"] {
  border-left-color: #1d4ed8;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="roads"] {
  border-left-color: #dc2626;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="roadLocal"] {
  border-left-color: #0f766e;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="rail"] {
  border-left-color: #27272a;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="water"] {
  border-left-color: #0284c7;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="measure"] {
  border-left-color: #b45309;
}

.secondary-page-action.olt-geo-toggle[aria-pressed="true"],
.secondary-page-action.olt-geo-toggle.is-active {
  border-color: #0b5ed7;
  border-left-color: #0b5ed7;
  background: #0b5ed7;
  color: #ffffff;
  box-shadow: 0 0.58rem 1.25rem rgba(11, 94, 215, 0.22);
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="olts"][aria-pressed="true"],
.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="roadLocal"][aria-pressed="true"] {
  border-color: #0f766e;
  border-left-color: #0f766e;
  background: #0f766e;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="roads"][aria-pressed="true"] {
  border-color: #dc2626;
  border-left-color: #dc2626;
  background: #dc2626;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="rail"][aria-pressed="true"] {
  border-color: #27272a;
  border-left-color: #27272a;
  background: #27272a;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="water"][aria-pressed="true"] {
  border-color: #0284c7;
  border-left-color: #0284c7;
  background: #0284c7;
}

.secondary-page-action.olt-geo-toggle[data-olt-map-layer-toggle="measure"][aria-pressed="true"] {
  border-color: #b45309;
  border-left-color: #b45309;
  background: #b45309;
}

.secondary-page-action.olt-geo-toggle:disabled,
.secondary-page-action.olt-geo-toggle.is-disabled,
.secondary-page-action.olt-geo-reset:disabled,
.secondary-page-action.olt-geo-reset.is-disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.28);
  box-shadow: none;
}

.olt-geo-canvas {
  height: var(--olt-geo-height);
  min-height: clamp(25rem, 58svh, 34rem);
  border: 1px solid rgba(202, 215, 226, 0.95);
  border-radius: 8px;
  background: #eef5f3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.76);
}

.olt-geo-context {
  position: absolute;
  top: 0.72rem;
  left: 0.72rem;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: min(40rem, calc(100% - 6.8rem));
  gap: 0.22rem;
  padding: 0.34rem 0.46rem;
  border: 1px solid rgba(190, 205, 218, 0.92);
  border-left: 4px solid #155b58;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #10233f;
  font-size: 0.72rem;
  font-weight: 920;
  line-height: 1.15;
  box-shadow: 0 0.52rem 1.25rem rgba(17, 27, 46, 0.12);
  pointer-events: none;
}

.olt-geo-context span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 12rem;
  overflow-wrap: anywhere;
}

.olt-geo-context span + span::before {
  content: "›";
  margin: 0 0.24rem 0 0.02rem;
  color: #78909c;
}

.olt-geo-context span[aria-current="location"] {
  color: #155b58;
}

.olt-geo-callout-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.olt-geo-callout-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.olt-geo-callout-lines line {
  stroke: rgba(33, 77, 130, 0.58);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.olt-geo-callout-label {
  position: absolute;
  min-height: 1.28rem;
  padding: 0.08rem 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  color: #1b4674;
  font: inherit;
  font-size: 0.58rem;
  font-weight: 950;
  line-height: 1.02;
  overflow-wrap: anywhere;
  white-space: nowrap;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #fff;
  box-shadow: 0 0.22rem 0.7rem rgba(17, 27, 46, 0.1);
  cursor: pointer;
  pointer-events: auto;
}

.olt-geo-callout-label:hover,
.olt-geo-callout-label:focus-visible {
  border-color: rgba(33, 77, 130, 0.42);
  background: #fff;
  outline: none;
  box-shadow: 0 0.3rem 0.9rem rgba(17, 27, 46, 0.16);
}

.olt-geo-search {
  position: absolute;
  top: 0.72rem;
  right: 3.9rem;
  z-index: 18;
  width: min(19rem, calc(100% - 8rem));
  padding: 0.5rem;
  border: 1px solid rgba(190, 205, 218, 0.94);
  border-left: 5px solid #0f766e;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #10233f;
  box-shadow: 0 0.65rem 1.55rem rgba(17, 27, 46, 0.16);
  backdrop-filter: blur(8px);
}

.olt-geo-search[hidden] {
  display: none;
}

.olt-geo-search label {
  display: grid;
  gap: 0.25rem;
}

.olt-geo-search label span {
  color: #155b58;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.olt-geo-search input {
  min-height: 2.15rem;
  width: 100%;
  border: 1px solid rgba(202, 215, 226, 0.95);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  background: rgba(248, 251, 253, 0.96);
  color: #10233f;
  font: inherit;
  font-size: 0.82rem;
}

.olt-geo-search p {
  margin: 0.32rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 760;
}

.olt-geo-search-results {
  display: grid;
  gap: 0.3rem;
  max-height: 16rem;
  margin-top: 0.42rem;
  overflow-y: auto;
}

.olt-geo-search-results[hidden] {
  display: none;
}

.olt-geo-search-results button {
  display: grid;
  gap: 0.12rem;
  width: 100%;
  border: 1px solid rgba(202, 215, 226, 0.88);
  border-radius: 8px;
  padding: 0.44rem 0.5rem;
  background: #ffffff;
  color: #10233f;
  text-align: left;
  cursor: pointer;
}

.olt-geo-search-results button span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 760;
}

.olt-geo-info-card {
  position: absolute;
  top: 3.35rem;
  right: auto;
  bottom: auto;
  left: 0.72rem;
  z-index: 16;
  display: grid;
  gap: 0.58rem;
  width: min(16rem, calc(100% - 4.5rem));
  max-width: calc(100% - 4.5rem);
  max-height: calc(100% - 4.6rem);
  overflow: auto;
  padding: 0.72rem;
  border: 1px solid rgba(190, 205, 218, 0.95);
  border-left: 5px solid #64748b;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #10233f;
  box-shadow: 0 0.9rem 2rem rgba(17, 27, 46, 0.18);
  backdrop-filter: blur(8px);
}

.olt-geo-info-card[hidden] {
  display: none;
}

.olt-geo-info-card--district {
  border-left-color: #2563eb;
}

.olt-geo-info-card--subdistrict {
  border-left-color: #155b58;
}

.olt-geo-info-card--village {
  border-left-color: #b45309;
}

.olt-geo-info-card--olt {
  border-left-color: #0f766e;
  display: flex;
  flex-direction: column;
  height: min(calc(100% - 4.1rem), calc(100dvh - 6.2rem));
  max-height: min(calc(100% - 4.1rem), calc(100dvh - 6.2rem));
  overflow: hidden;
  padding: 0.52rem;
}

.olt-geo-info-card:not(.olt-geo-info-card--olt) {
  width: min(13rem, calc(100% - 4.4rem));
  max-height: min(24rem, calc(50% - 0.75rem));
  padding: 0.48rem 0.6rem;
}

.olt-geo-info-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: start;
}

.olt-geo-info-kicker {
  color: #64748b;
  font-size: 0.66rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.olt-geo-info-head h3 {
  margin: 0.12rem 0 0;
  color: #10233f;
  font-size: 1.16rem;
  line-height: 1.08;
}

.olt-geo-info-head p {
  margin: 0.22rem 0 0;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 760;
  line-height: 1.28;
}

.olt-geo-info-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(202, 215, 226, 0.9);
  border-radius: 50%;
  background: #f8fbfd;
  color: #10233f;
  font-weight: 950;
  cursor: pointer;
}

.olt-geo-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.22rem;
  margin: 0;
}

.olt-geo-info-card--olt .olt-geo-info-grid {
  overflow: auto;
}

.olt-geo-info-grid div {
  display: grid;
  grid-template-columns: minmax(4.6rem, 0.42fr) minmax(0, 1fr);
  gap: 0.42rem;
  align-items: baseline;
  min-width: 0;
  padding: 0.24rem 0;
  border: 0;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 0;
  background: transparent;
}

.olt-geo-info-grid dt {
  margin: 0 0 0.12rem;
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.olt-geo-info-grid dd {
  margin: 0;
  color: #10233f;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: right;
}

.olt-geo-info-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.olt-geo-info-card:not(.olt-geo-info-card--olt) .olt-geo-info-actions {
  display: none;
}

.olt-geo-road-legend {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 15;
  display: grid;
  gap: 0.3rem;
  padding: 0.48rem 0.54rem;
  border: 1px solid rgba(190, 205, 218, 0.94);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #10233f;
  font-size: 0.72rem;
  font-weight: 820;
  box-shadow: 0 0.65rem 1.55rem rgba(17, 27, 46, 0.12);
}

.olt-geo-road-legend[hidden] {
  display: none;
}

.olt-geo-road-legend div {
  display: grid;
  grid-template-columns: 2.8rem 1fr;
  align-items: center;
  gap: 0.52rem;
  white-space: nowrap;
}

.olt-geo-road-legend-line {
  display: block;
  width: auto;
  height: 0;
  border-top: 4px solid #334155;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.olt-geo-road-legend-line.is-national {
  border-color: #dc2626;
  border-top-width: 5px;
}

.olt-geo-road-legend-line.is-state {
  border-color: #2563eb;
  border-top-width: 4px;
}

.olt-geo-road-legend-line.is-district {
  border-color: #7c3aed;
  border-top-width: 3px;
}

.olt-geo-road-legend-line.is-local {
  border-color: #334155;
  border-top-width: 2px;
}

.olt-geo-population-result,
.olt-geo-measure-card {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  bottom: auto;
  transform: translateY(-50%);
  z-index: 18;
  width: min(19rem, calc(100% - 5.2rem));
  padding: 0.62rem 0.68rem;
  border: 1px solid rgba(190, 205, 218, 0.94);
  border-left: 5px solid #1d4ed8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #10233f;
  box-shadow: 0 0.7rem 1.6rem rgba(17, 27, 46, 0.15);
  backdrop-filter: blur(8px);
}

.olt-geo-population-result[hidden],
.olt-geo-measure-card[hidden] {
  display: none;
}

.olt-geo-population-head,
.olt-geo-measure-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
}

.olt-geo-population-head span,
.olt-geo-measure-card span {
  display: block;
  color: #155b58;
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  line-height: 1.1;
  text-transform: uppercase;
}

.olt-geo-population-head strong,
.olt-geo-measure-card strong {
  display: block;
  margin-top: 0.1rem;
  color: #10233f;
  font-size: 0.95rem;
  line-height: 1.12;
}

.olt-geo-population-result dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0.55rem 0 0;
}

.olt-geo-population-result dl.is-instruction {
  grid-template-columns: 1fr;
}

.olt-geo-population-result dl div {
  min-width: 0;
  padding: 0.42rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #f8fbfd;
}

.olt-geo-population-result dt {
  margin: 0;
  color: #64748b;
  font-size: 0.58rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.olt-geo-population-result dd {
  margin: 0.16rem 0 0;
  color: #10233f;
  font-size: 0.86rem;
  font-weight: 940;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.olt-geo-population-result p {
  margin: 0.48rem 0 0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 760;
  line-height: 1.25;
}

.olt-geo-measure-card {
  border-left-color: #b45309;
}

.olt-geo-measure-card .olt-geo-info-action {
  align-self: center;
  min-height: 1.86rem;
  padding-inline: 0.55rem;
}

.olt-population-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.58rem;
  height: 1.58rem;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: #1d4ed8;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 0.38rem 0.9rem rgba(15, 23, 42, 0.28);
}

.olt-population-marker--handle {
  background: #b45309;
  cursor: grab;
}

.olt-population-marker--handle:active {
  cursor: grabbing;
}

.olt-geo-canvas.is-population-selecting .maplibregl-canvas,
.olt-geo-canvas.is-measuring .maplibregl-canvas {
  cursor: crosshair;
}

.olt-geo-loader {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transform: translate(-50%, -50%);
  min-width: 13rem;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(202, 215, 226, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #10233f;
  box-shadow: 0 0.75rem 1.6rem rgba(17, 27, 46, 0.14);
}

.olt-geo-loader[hidden] {
  display: none;
}

.olt-geo-loader strong,
.olt-geo-loader small {
  display: block;
  line-height: 1.15;
}

.olt-geo-loader small {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 760;
}

.olt-geo-loader-spinner {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(21, 91, 88, 0.2);
  border-top-color: #155b58;
  border-radius: 50%;
  animation: portal-spin 0.75s linear infinite;
}

@keyframes portal-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1080px) {
  .olt-geo-title-row,
  .olt-geo-toolbar {
    grid-template-columns: 1fr;
  }

  .olt-geo-meta,
  .olt-geo-layer-controls--overlays {
    justify-content: flex-start;
  }

  .olt-geo-search {
    top: 0.72rem;
    right: 3.65rem;
    bottom: auto;
    left: auto;
    width: min(19rem, calc(100% - 8rem));
  }

  .olt-geo-info-card {
    top: 3.35rem;
    right: auto;
    bottom: auto;
    left: 0.72rem;
    width: min(16rem, calc(100% - 4.5rem));
    max-width: calc(100% - 3.9rem);
    max-height: calc(100% - 3.4rem);
  }

  .olt-geo-canvas.has-olt-search .olt-geo-info-card {
    top: 6.95rem;
    max-height: calc(100% - 7.5rem);
  }

  .olt-geo-road-legend {
    display: none;
  }

  .olt-geo-population-result,
  .olt-geo-measure-card {
    right: 0.58rem;
    bottom: auto;
    width: min(18rem, calc(100% - 4.4rem));
  }
}

@media (max-width: 720px) {
  .olt-master-upload-band,
  .olt-master-upload-form {
    grid-template-columns: 1fr;
  }

  .olt-master-import-status,
  .olt-master-import-status strong,
  .olt-master-import-status small {
    justify-content: flex-start;
    text-align: left;
  }

  .olt-master-replace-field {
    white-space: normal;
  }

  .olt-geo-panel {
    --olt-geo-height: clamp(25rem, calc(100svh - 11.5rem), 44rem);
    --olt-map-floating-card-width: min(18.5rem, calc(100% - 0.8rem));
    gap: 0.48rem;
  }

  .olt-geo-meta {
    gap: 0.32rem;
  }

  .secondary-page-action.olt-geo-toggle,
  .secondary-page-action.olt-geo-reset,
  .secondary-page-action.olt-geo-info-action {
    min-height: 1.95rem;
    padding: 0.32rem 0.5rem;
    font-size: 0.72rem;
  }

  .olt-geo-canvas {
    min-height: 24rem;
  }

  .olt-geo-context {
    top: 0.5rem;
    left: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .olt-geo-search {
    top: 2.85rem;
    right: 3.25rem;
    bottom: auto;
    left: auto;
    width: min(15rem, calc(100% - 6.6rem));
    padding: 0.42rem;
  }

  .olt-geo-info-card {
    top: 2.85rem;
    right: auto;
    bottom: auto;
    left: 0.42rem;
    width: min(16.25rem, calc(100% - 3.55rem));
    max-width: calc(100% - 3.55rem);
    max-height: calc(100% - 3.4rem);
    padding: 0.6rem;
  }

  .olt-geo-canvas.has-olt-search .olt-geo-info-card {
    top: 8.2rem;
    max-height: calc(100% - 8.75rem);
  }

  .olt-geo-population-result,
  .olt-geo-measure-card {
    top: 42%;
    right: 0.45rem;
    bottom: auto;
    width: min(17rem, calc(100% - 1rem));
    max-height: min(18rem, calc(100% - 1rem));
    overflow: auto;
  }

  .olt-geo-population-result dl {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1440px) {
  .summary-grid--tabs-admin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-grid--tabs-ba {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portal-home .hero__bar {
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
  }

  .portal-home .hero__identity {
    flex: 1 1 700px;
  }

  .portal-home .session-card {
    flex: 0 1 270px;
    min-width: 270px;
    width: auto;
    margin-left: auto;
  }

  .portal-home .session-links {
    flex: 0 1 270px;
    min-width: 270px;
    width: auto;
    margin-left: auto;
  }

  .portal-home .filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tip-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1240px) {
  .hero__bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .auth-forgot-page .hero__bar {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .auth-forgot-page .hero__identity {
    flex: 1 1 auto;
  }

  .speed-dashboard {
    grid-template-columns: 1fr;
  }

  .speed-gauge-card {
    min-height: 0;
  }

  .summary-grid--tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-selector-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tip-account-summary,
  .tip-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sla-tip-gross-count-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-login .login-grid {
    grid-template-columns: 1fr;
  }

  .olt-map-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .olt-map-reset {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (min-width: 981px) and (max-width: 1240px) and (min-height: 640px) {
  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .hero__bar {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .hero__identity {
    flex: 1 1 auto;
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .session-links {
    flex: 0 0 min(18rem, 32vw);
    min-width: 16rem;
    width: min(18rem, 32vw);
    margin-left: auto;
  }

  .auth-login:not(.auth-flow-page):not(.auth-forgot-page) .login-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.86fr);
    min-height: clamp(24rem, calc(100dvh - 21.5rem), 32rem);
    margin-bottom: clamp(3rem, 9vh, 6rem);
    align-items: stretch;
  }
}

@media (min-width: 1320px) {
  .service-selector-grid {
    gap: 1.35rem;
  }

  .service-selector-card {
    min-height: 12rem;
    padding: 1.5rem;
  }

  .service-selector-card strong {
    font-size: 1.32rem;
    line-height: 1.22;
  }

  .service-selector-card__copy {
    font-size: 1.04rem;
    line-height: 1.58;
  }

  .summary-card {
    padding: 1.06rem 1.2rem;
  }

  .summary-card strong {
    font-size: 1.06rem;
  }

  .service-result-card__header h2 {
    font-size: 1.5rem;
  }

  .service-result-card__chip {
    font-size: 1.16rem;
    padding: 0.52rem 1rem;
  }

  .service-result-card__summary-item .field-label,
  .service-result-card__actions .field-label,
  .service-result-card__creator .field-label {
    font-size: 0.94rem;
  }

  .service-result-card__summary-item code,
  .service-result-card__creator code {
    font-size: 1.16rem;
  }

  .service-result-card__actions .inline-link-button {
    padding: 0.96rem 1.36rem;
    font-size: 1.05rem;
  }
}

@media (min-width: 2200px) {
  :root {
    font-size: 17px;
  }

  .portal-home .page-shell,
  .portal-home .portal-footer,
  .auth-login .page-shell,
  .auth-login .portal-footer,
  .auth-register .page-shell {
    padding-left: 2.6rem;
    padding-right: 2.6rem;
  }

  .service-workbench,
  .summary-grid,
  .service-result-list {
    gap: 1.5rem;
  }

  .service-selector-card {
    min-height: 13rem;
    padding: 1.7rem;
  }

  .service-selector-card strong {
    font-size: 1.38rem;
  }

  .service-selector-card__copy {
    font-size: 1.08rem;
  }

  .service-result-card {
    max-width: none;
    padding: 1.18rem 1.28rem 1.08rem;
  }

  .service-result-card__header h2 {
    font-size: 1.52rem;
  }

  .service-result-card__chip {
    font-size: 1.18rem;
  }
}

@media (max-width: 1120px) {
  .service-result-list {
    grid-template-columns: 1fr;
  }

  .service-result-card {
    max-width: none;
  }

  .service-result-card__action-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-result-card__creator {
    margin-left: 0;
    text-align: left;
  }
}

@media (max-width: 980px) {
  .speed-test-public {
    overflow-y: auto;
  }

  .speed-test-public .page-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .hero {
    padding: 1.25rem 1rem 1rem;
  }

  .hero__content {
    padding: 1.35rem 1.3rem 1.45rem;
    overflow: hidden;
  }

  .hero__bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .hero__identity {
    width: 100%;
  }

  .session-card,
  .session-links {
    min-width: 0;
    width: 100%;
  }

  .page-shell {
    padding: 0 1rem 2rem;
  }

  .login-grid,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid--tabs,
  .summary-grid--tabs-admin,
  .summary-grid--tabs-ba {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

  .speed-hero-card,
  .speed-stage-card {
    grid-template-columns: 1fr;
  }

  .speed-hero-card {
    display: grid;
    grid-template-areas:
      "copy"
      "status"
      "tools";
    align-items: flex-start;
  }

  .speed-hero-card__status {
    width: 100%;
    min-width: 0;
    align-items: stretch;
  }

  .speed-hero-card__note {
    max-width: none;
    text-align: left;
  }

  .speed-test-public .speed-hero-card__tools,
  .speed-test-public .speed-server-select {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .speed-test-public .speed-mode-toggle {
    width: 100%;
    min-width: 0;
  }

  .speed-test-public .speed-server-select select,
  .speed-test-public .speed-server-trigger {
    width: 100%;
    max-width: 100%;
  }

  .speed-status-pill {
    width: 100%;
  }

  .speed-page {
    min-height: auto;
    grid-template-rows: none;
  }

  .portal-footer {
    padding: 0 1rem 1rem;
  }

  .portal-footer__bar {
    flex-wrap: wrap;
    padding: 0.8rem 0.9rem;
  }

  .service-result-list {
    grid-template-columns: 1fr;
  }

  .service-selector-grid {
    grid-template-columns: 1fr;
  }

  .portal-home .hero {
    padding: 0.75rem 0.75rem 0.6rem;
  }

  .portal-home .hero__content {
    min-height: 0;
    padding: 1rem 1rem 1.1rem;
    display: flex;
  }

  .portal-home .hero__bar {
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 0;
    gap: 0.85rem;
  }

  .portal-home .hero__identity {
    width: 100%;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .portal-home .hero__copyblock {
    width: 100%;
    justify-items: center;
  }

  .portal-home .hero__logo-wrap {
    min-width: 0;
    width: min(100%, 170px);
    padding: 0.34rem 0.42rem;
  }

  .portal-home .hero__logo {
    max-width: 140px;
  }

  .portal-home .hero__content h1 {
    margin: 0.08rem 0 0.25rem;
    font-size: clamp(1.85rem, 7vw, 2.45rem);
  }

  .portal-home .hero__copy {
    max-width: 18rem;
    font-size: 0.95rem;
    line-height: 1.42;
    text-align: center;
  }

  .portal-home .session-card {
    width: min(100%, 320px);
    margin-top: 0.35rem;
    margin-left: 0;
    align-self: center;
  }

  .portal-home .session-card__actions {
    grid-template-columns: 1fr;
  }

  .olt-map-toolbar {
    grid-template-columns: 1fr;
  }

  .olt-map-reset {
    width: 100%;
    justify-self: stretch;
  }

  .olt-map-canvas {
    height: 30rem;
    min-height: 24rem;
  }

  .olt-map-details__header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 1.2rem 1rem 1rem;
  }

  .hero__bar,
  .result-card__header,
  .history-card__header,
  .tool-card__header {
    flex-direction: column;
  }

  .hero__content,
  .result-card,
  .history-card,
  .tool-card,
  .login-card {
    padding: 1.1rem;
  }

  .tip-account-summary,
  .tip-metric-grid {
    grid-template-columns: 1fr;
  }

  .sla-tip-gross-count-overview,
  .sla-tip-gross-count-card__tiles {
    grid-template-columns: 1fr;
  }

  .sla-tip-gross-count-card__header,
  .sla-tip-gross-count-summary__header,
  .sla-tip-combined-months__header,
  .sla-tip-combined-panel__header,
  .sla-tip-gross-count-detail__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .sla-tip-gross-count-card__total {
    width: 100%;
    text-align: left;
  }

  .sla-tip-gross-count-summary__header > span {
    width: 100%;
    border-radius: 0.7rem;
    text-align: center;
  }

  .sla-tip-misc-month-select {
    grid-template-columns: 1fr;
  }

  .sla-bulk-edit-form > div:first-child,
  .sla-bulk-edit-form .sla-bulk-edit-month-field,
  .sla-bulk-edit-form .sla-bulk-edit-gross-field,
  .sla-bulk-edit-form .sla-bulk-edit-amount-field,
  .sla-bulk-edit-form > [data-sla-bulk-submit],
  .sla-bulk-edit-form .sla-bulk-selected-month-row,
  .sla-bulk-edit-form .form-loader {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .sla-tip-misc-month-add {
    min-width: 0;
  }

  .sla-tip-gross-count-table {
    min-width: 680px;
  }

  .sla-tip-combined-panel__totals {
    justify-content: flex-start;
    text-align: left;
  }

  .sla-tip-combined-table {
    min-width: 780px;
  }

  .speed-test-public .hero {
    padding: 0.9rem 0.75rem 0.6rem;
  }

  .speed-test-public .page-shell {
    padding: 0.75rem 0.75rem 1.4rem;
  }

  .speed-page {
    height: auto;
    min-height: 0;
    overflow: visible;
    gap: 0.72rem;
  }

  .speed-hero-card {
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 0.95rem;
  }

  .speed-hero-card::after {
    width: 190px;
    height: 190px;
    right: -90px;
    bottom: -110px;
  }

  .speed-hero-card .eyebrow {
    font-size: 0.7rem;
  }

  .speed-hero-card h2 {
    font-size: clamp(1.65rem, 8vw, 2.25rem);
    line-height: 1.05;
  }

  .speed-hero-card__copy > p:not(.eyebrow) {
    font-size: 0.92rem;
    line-height: 1.35;
  }

  .speed-hero-card__tools,
  .speed-server-select {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    width: 100%;
  }

  .speed-mode-toggle {
    width: 100%;
    min-width: 0;
    border-radius: 0.72rem;
  }

  .speed-mode-toggle button {
    min-height: 2.35rem;
    border-radius: 0.58rem;
    font-size: 0.84rem;
  }

  .speed-server-select {
    border-radius: 0.72rem;
    padding: 0.5rem;
  }

  .speed-server-loading {
    justify-self: start;
  }

  .speed-server-select select,
  .speed-server-trigger {
    min-height: 2.36rem;
    border-radius: 0.58rem;
    width: 100%;
    max-width: 100%;
  }

  .speed-server-menu {
    left: 0.5rem;
    right: 0.5rem;
    width: auto;
    max-width: none;
  }

  .speed-connection-health {
    width: 100%;
    max-width: 100%;
    border-radius: 0.72rem;
    white-space: normal;
  }

  .speed-dashboard {
    gap: 0.72rem;
  }

  .speed-gauge-card {
    padding: 0.9rem;
    gap: 0.62rem;
    border-radius: 0.95rem;
  }

  .speed-gauge {
    width: min(72vw, 250px);
  }

  .speed-start-button,
  .speed-progress {
    width: 100%;
  }

  .speed-facts-card {
    width: min(100%, 282px);
  }

  .speed-fact-row {
    grid-template-columns: 1fr;
    gap: 0.22rem;
    align-items: start;
  }

  .speed-fact-row strong {
    text-align: left;
  }

  .speed-message {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .speed-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .speed-info-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .speed-info-card__note {
    font-size: 0.72rem;
    line-height: 1.22;
  }

  .speed-metric-card {
    min-height: 132px;
    padding: 0.82rem 0.9rem 0.78rem;
  }

  .speed-metric-card strong {
    font-size: clamp(1.42rem, 7vw, 2.1rem);
  }

  .speed-metric-card__header {
    gap: 0.46rem;
  }

  .speed-metric-card__reading {
    gap: 0.28rem;
  }

  .speed-metric-card__peak {
    font-size: 0.66rem;
  }

  .speed-metric-card .speed-metric-card__peak strong {
    font-size: 0.84rem;
  }

  .speed-metric-unit {
    font-size: 0.76rem;
    padding-bottom: 0.12rem;
  }

  .speed-metric-chart {
    min-height: 4.05rem;
    grid-template-columns: 1.62rem minmax(0, 1fr);
  }

  .speed-metric-chart--line {
    min-height: 3.55rem;
  }

  .speed-stage-card {
    gap: 0.55rem;
    padding: 0.65rem;
    border-radius: 0.95rem;
  }

  .speed-stage {
    padding: 0.62rem;
  }

  body.auth-login,
  body.auth-register {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .auth-login .hero,
  .auth-register .hero {
    padding: 0.65rem 0.65rem 0.45rem;
  }

  .auth-login .hero__content,
  .auth-register .hero__content {
    padding: 0.9rem 0.95rem 0.92rem;
  }

  .auth-login .hero__ribbon {
    margin-bottom: 0.4rem;
    font-size: 0.66rem;
  }

  .auth-login .hero__logo,
  .auth-register .hero__logo {
    max-width: 120px;
  }

  .auth-login .hero__logo-wrap,
  .auth-register .hero__logo-wrap {
    min-width: 118px;
    padding: 0.34rem 0.46rem;
  }

  .auth-login .summary-grid {
    display: none;
  }

  .auth-login .page-shell {
    min-height: 0;
    padding: 0 0.65rem 0.45rem;
  }

  .auth-login .login-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .auth-login .login-card {
    padding: 0.92rem;
  }

  .auth-login .login-copy {
    font-size: 0.89rem;
    line-height: 1.32;
  }

  .auth-login .tool-form {
    gap: 0.5rem;
    margin-top: 0.58rem;
  }

  .auth-login .tool-form input,
  .auth-login .tool-form select,
  .auth-login .tool-form button,
  .auth-login .inline-link-button {
    padding: 0.72rem 0.8rem;
  }

  body.auth-forgot-page {
    height: 100dvh;
    overflow: hidden;
  }

  .auth-forgot-page .hero {
    padding: 0.46rem 0.55rem 0.26rem;
  }

  .auth-forgot-page .hero__content {
    padding: 0.58rem 0.62rem;
  }

  .auth-forgot-page .hero__bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
    align-items: start;
  }

  .auth-forgot-page .hero__identity {
    gap: 0.58rem;
    align-items: center;
  }

  .auth-forgot-page .hero__logo-wrap {
    min-width: 92px;
    width: 92px;
    padding: 0.2rem 0.3rem;
  }

  .auth-forgot-page .hero__logo {
    max-width: 84px;
  }

  .auth-forgot-page .hero__content h1 {
    font-size: 1.12rem;
    line-height: 1.04;
  }

  .auth-forgot-page .hero__copy,
  .auth-forgot-page .hero__copyblock .eyebrow {
    display: none;
  }

  .auth-forgot-page .session-links {
    width: 100%;
    min-width: 0;
    padding: 0.34rem;
    gap: 0.3rem;
  }

  .auth-forgot-page .session-link {
    min-height: 1.8rem;
    padding: 0.3rem 0.45rem;
  }

  .auth-forgot-page .page-shell {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0.55rem 0.28rem;
  }

  .auth-forgot-page .login-grid {
    gap: 0.42rem;
  }

  .auth-forgot-page .login-card {
    padding: 0.54rem;
  }

  .auth-forgot-page .login-card h2 {
    margin-bottom: 0.16rem;
  }

  .auth-forgot-page .login-copy {
    display: none;
  }

  .auth-forgot-page .tool-form input,
  .auth-forgot-page .tool-form select,
  .auth-forgot-page .tool-form button,
  .auth-forgot-page .inline-link-button {
    padding: 0.42rem 0.52rem;
  }

  .auth-forgot-page .forgot-password-form {
    gap: 0.24rem 0.38rem;
    margin-top: 0.35rem;
  }

  .auth-forgot-page .forgot-password-field {
    gap: 0.2rem;
  }

  .auth-forgot-page .auth-support-links {
    margin-top: 0.28rem;
  }

  .auth-forgot-page .forgot-password-rules {
    gap: 0.28rem;
    margin-top: 0.28rem;
    padding: 0.35rem;
  }

  .auth-forgot-page .forgot-password-rules .download-box {
    padding: 0.28rem;
  }

  .auth-forgot-page .forgot-password-rules .field-label {
    font-size: 0.62rem;
  }

  .auth-forgot-page .forgot-password-rules .hint-text {
    font-size: 0.68rem;
    line-height: 1.12;
  }

  .download-links {
    grid-template-columns: 1fr;
  }

  .ad-carousel {
    --kerala-side-space: 0px;
    padding: 0.35rem;
  }

  .ad-carousel::before,
  .ad-carousel::after {
    display: none;
  }

  .ad-slide img,
  .auth-login .ad-slide img {
    max-height: min(52vh, 460px);
  }

  .ad-slide.is-active {
    padding-inline: 0;
  }

  .auth-login .ad-panel {
    width: 100%;
    max-width: none;
  }

  .portal-footer {
    padding: 0 0.75rem 1rem;
  }

  .portal-footer__brandline {
    width: 100%;
  }

  .portal-footer__bar {
    flex-wrap: wrap;
    padding: 0.7rem 0.8rem;
    font-size: 0.78rem;
  }

  .recovery-grid {
    grid-template-columns: 1fr;
  }

  .service-selector-grid,
  .result-grid,
  .audit-detail-grid,
  .service-log-input-grid {
    grid-template-columns: 1fr;
  }

  .split-input-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .split-input-row--mobile {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .split-input-row__divider {
    justify-self: center;
  }

  .table-wrap {
    overflow: visible;
  }

  .responsive-report-table {
    display: block;
    width: 100%;
  }

  .responsive-report-table.user-admin-table {
    min-width: 0;
    table-layout: auto;
  }

  .responsive-report-table.user-admin-table th,
  .responsive-report-table.user-admin-table td {
    width: auto;
    min-width: 0;
  }

  .responsive-report-table thead {
    display: none;
  }

  .responsive-report-table tbody {
    display: block;
  }

  .responsive-report-table tbody tr:not(.audit-detail-row):not(.report-detail-row):not(.user-admin-actions-row) {
    display: block;
    margin-bottom: 0.95rem;
    padding: 0.9rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: rgba(248, 251, 255, 0.95);
    box-shadow: 0 10px 24px rgba(9, 41, 84, 0.08);
  }

  .responsive-report-table tbody tr:not(.audit-detail-row):not(.report-detail-row):not(.user-admin-actions-row) td {
    display: grid;
    grid-template-columns: minmax(92px, 120px) minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    padding: 0.42rem 0;
    border-bottom: 0;
  }

  .responsive-report-table tbody tr:not(.audit-detail-row):not(.report-detail-row):not(.user-admin-actions-row) td::before {
    content: attr(data-label);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    overflow-wrap: normal;
    word-break: normal;
  }

  .responsive-report-table tbody tr:not(.audit-detail-row):not(.report-detail-row):not(.user-admin-actions-row) td[data-label="Expand"] {
    grid-template-columns: 1fr;
    padding-top: 0;
    padding-bottom: 0.2rem;
  }

  .responsive-report-table tbody tr:not(.audit-detail-row):not(.report-detail-row):not(.user-admin-actions-row) td.sla-report-table__expand {
    display: flex;
    justify-content: flex-start;
    width: auto;
    min-width: 0;
    max-width: none;
    overflow: visible;
  }

  .responsive-report-table tbody tr:not(.audit-detail-row):not(.report-detail-row):not(.user-admin-actions-row) td[data-label="Expand"]::before {
    display: none;
  }

  .responsive-report-table .audit-expand,
  .responsive-report-table .report-expand {
    width: 2.1rem;
    height: 2.1rem;
  }

  .responsive-report-table .report-metric-button {
    justify-content: flex-start;
    width: fit-content;
    min-width: 0;
  }

  .responsive-report-table .role-form {
    width: 100%;
  }

  .responsive-report-table .role-form__button {
    width: 100%;
  }

  .responsive-report-table .user-admin-actions-row {
    display: block;
    margin: -0.35rem 0 0.95rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .responsive-report-table .user-admin-actions-row td {
    display: block;
    padding: 0;
    background: transparent;
  }

  .user-admin-actions {
    grid-template-columns: 1fr;
  }

  .user-admin-action {
    align-items: stretch;
    flex-direction: column;
  }

  .user-admin-action .role-form {
    width: 100%;
    margin-left: 0;
  }

  .responsive-report-table .audit-detail-row td,
  .responsive-report-table .report-detail-row td {
    display: block;
    padding: 0.8rem 0 0.1rem;
    border-bottom: 0;
    background: transparent;
  }

  .responsive-report-table .audit-detail-row td::before,
  .responsive-report-table .report-detail-row td::before {
    display: none;
  }
}

@media (max-width: 560px) {
  .speed-test-public .page-shell {
    padding: 0.62rem 0.62rem 1.2rem;
  }

  .speed-page {
    gap: 0.62rem;
  }

  .speed-hero-card {
    padding: 0.85rem;
  }

  .speed-hero-card h2 {
    font-size: clamp(1.55rem, 9vw, 2rem);
  }

  .speed-hero-card__copy > p:not(.eyebrow) {
    font-size: 0.86rem;
  }

  .speed-server-select span {
    font-size: 0.66rem;
  }

  .speed-server-select select,
  .speed-server-trigger {
    font-size: 0.8rem;
  }

  .speed-server-trigger {
    padding: 0 0.78rem;
  }

  .speed-server-loading {
    font-size: 0.7rem;
  }

  .speed-gauge {
    width: min(68vw, 218px);
  }

  .speed-gauge-card {
    padding: 0.78rem;
  }

  .speed-gauge__ring {
    padding: 0.72rem;
  }

  .speed-gauge__inner strong {
    font-size: clamp(2rem, 13vw, 2.9rem);
  }

  .speed-metric-grid {
    grid-template-columns: 1fr;
    gap: 0.62rem;
  }

  .speed-info-card {
    grid-template-columns: 1fr;
  }

  .speed-info-card__note {
    font-size: 0.74rem;
    line-height: 1.26;
  }

  .speed-metric-card {
    min-height: 118px;
    padding: 0.78rem 0.9rem;
  }

  .speed-metric-card strong {
    font-size: clamp(1.56rem, 10vw, 2.18rem);
  }

  .speed-metric-card__header {
    gap: 0.4rem;
  }

  .speed-metric-card__peak {
    font-size: 0.64rem;
  }

  .speed-metric-card .speed-metric-card__peak strong {
    font-size: 0.82rem;
  }

  .speed-metric-unit {
    font-size: 0.72rem;
    padding-bottom: 0.12rem;
  }

  .speed-metric-chart {
    min-height: 3.85rem;
    grid-template-columns: 1.56rem minmax(0, 1fr);
  }

  .speed-metric-chart--line {
    min-height: 3.3rem;
  }

  .speed-stage-card {
    grid-template-columns: 1fr;
    padding: 0.58rem;
  }

  .speed-stage {
    gap: 0.5rem;
  }

  .speed-result-meta div {
    grid-template-columns: 1fr;
    gap: 0.12rem;
  }

  .speed-result-meta strong {
    text-align: left;
  }

  .hero__identity {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero__copyblock {
    width: 100%;
    justify-items: center;
  }

  .hero__copy {
    max-width: 100%;
  }

  .hero__logo-wrap {
    min-width: 0;
    width: min(100%, 160px);
  }

  .hero__content h1 {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .summary-grid--tabs,
  .summary-grid--tabs-admin,
  .summary-grid--tabs-ba {
    grid-template-columns: 1fr;
  }

  .session-links,
  .session-card__actions {
    gap: 0.65rem;
  }

  .portal-home .session-card__actions {
    grid-template-columns: 1fr;
  }

  .session-link,
  .session-card__button,
  .inline-link-button,
  .tool-form button,
  .role-form__button {
    width: 100%;
  }

  .login-card,
  .tool-card,
  .history-card,
  .result-card {
    padding: 0.95rem;
  }

  .download-box {
    gap: 0.55rem;
  }

  .portal-footer__brandline {
    flex-direction: column;
    gap: 0.4rem;
  }

  .pagination-links,
  .pagination-jump {
    width: 100%;
  }

  .pagination-link,
  .pagination-jump__input,
  .pagination-jump__button {
    width: 100%;
  }
}

/* Final mobile polish for the expanded portal modules. */
@media (max-width: 820px) {
  .page-shell,
  .portal-home .page-shell {
    width: 100%;
    padding-inline: 0.75rem;
  }

  .portal-home .hero__content {
    border-radius: 1rem;
  }

  .portal-home .hero__content h1 {
    line-height: 1.08;
  }

  .summary-card {
    min-height: 6rem;
    padding: 0.95rem 1rem;
  }

  .summary-card strong {
    font-size: 1rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .history-card,
  .result-card,
  .service-detail-card,
  .sla-report-section {
    border-radius: 0.95rem;
  }

  .history-card__header,
  .service-selector-expanded-card__header,
  .sla-report-section__heading {
    align-items: flex-start;
    gap: 0.7rem;
  }

  .history-card__header p,
  .service-selector-expanded-card__copy,
  .result-note {
    max-width: 100%;
  }

  .filter-form {
    gap: 0.75rem;
  }

  .filter-form input,
  .filter-form select,
  .filter-form button,
  .upload-form button {
    min-height: 3.15rem;
    border-radius: 0.75rem;
  }

  .service-selector-card {
    min-height: 0;
    padding: 0.95rem;
  }

  .service-selector-card strong {
    font-size: 1.02rem;
  }

  .table-scroll,
  .sla-detail-table-scroll {
    border: 1px solid rgba(215, 224, 239, 0.88);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.72);
    overflow-x: auto !important;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }

  .table-scroll--no-x {
    overflow-x: auto !important;
  }

  .table-scroll > table,
  .sla-detail-table-scroll > table {
    width: max-content;
    min-width: 100%;
  }

  .history-table,
  .sla-detail-source-table {
    min-width: 640px;
  }

  .history-table.sla-tip-misc-monthly-table {
    min-width: 68rem;
  }

  .history-table.sla-tip-misc-table,
  .history-table.sla-penalty-report-table {
    min-width: 62rem;
  }

  .history-table.sla-tip-combined-table,
  .history-table.sla-bulk-edit-table,
  .history-table.sla-edit-report-table {
    min-width: 72rem;
  }

  .history-table.sla-tip-gross-count-table {
    min-width: 54rem;
  }

  .history-table.sla-bulk-edit-month-table,
  .history-table.sla-edit-recalc-table {
    min-width: 42rem;
  }

  .history-table--compact,
  .history-table--compact.sla-detail-source-table {
    min-width: 520px;
  }

  th,
  td {
    padding: 0.68rem 0.58rem;
  }

  .sla-error-detail__grid {
    grid-template-columns: 1fr;
  }

  .sla-error-detail__comparison {
    grid-template-columns: 1fr;
  }

  .sla-report-section__heading {
    flex-direction: column;
  }

  .sla-report-section__toggle,
  .sla-report-section__empty {
    margin-left: 0;
  }

  .sla-report-calculation,
  .sla-row-formula {
    font-size: 0.92rem;
  }

  .tip-account-summary,
  .tip-metric-grid {
    gap: 0.65rem;
  }

  .tip-metric-card {
    min-height: 0;
  }

  .pagination-bar {
    grid-template-columns: 1fr;
    gap: 0.7rem;
    align-items: stretch;
  }

  .pagination-links {
    justify-content: stretch;
  }

  .pagination-jump {
    flex: 1 1 100%;
  }

  .form-loader {
    align-items: flex-start;
    line-height: 1.35;
  }
}

@media (max-width: 560px) {
  .portal-home .hero {
    padding: 0.55rem 0.55rem 0.45rem;
  }

  .portal-home .hero__content {
    padding: 0.85rem;
  }

  .portal-home .hero__logo-wrap {
    width: min(100%, 132px);
  }

  .portal-home .hero__content h1 {
    font-size: clamp(1.35rem, 8vw, 1.9rem);
  }

  .portal-home .hero__copy {
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .session-card {
    padding: 0;
    border-radius: 0.82rem;
  }

  .session-menu__summary {
    min-height: 3.65rem;
    border-radius: 0.78rem;
    background: rgba(255, 255, 255, 0.16);
  }

  .session-menu__avatar {
    width: 2.15rem;
    height: 2.15rem;
  }

  .session-menu__identity strong {
    font-size: 0.98rem;
  }

  .session-menu__identity span {
    font-size: 0.78rem;
  }

  .session-menu__panel {
    min-width: 100%;
    border-radius: 0.72rem;
  }

  .summary-card {
    min-height: 5.2rem;
    border-radius: 0.92rem;
  }

  .summary-label,
  .eyebrow,
  th {
    letter-spacing: 0.06em;
  }

  .history-card,
  .result-card,
  .login-card,
  .tool-card {
    padding: 0.82rem;
  }

  .history-card__header h2,
  .service-selector-expanded-card__header h2 {
    font-size: 1.35rem;
    line-height: 1.15;
  }

  .filter-form {
    margin-block: 0.75rem 0.9rem;
  }

  .checkbox-field {
    min-height: 3.15rem;
    border-radius: 0.75rem;
  }

  .audit-detail-grid,
  .service-log-input-grid,
  .tip-account-summary,
  .tip-metric-grid,
  .user-admin-actions {
    grid-template-columns: 1fr;
  }

  .user-admin-action {
    align-items: stretch;
    flex-direction: column;
    gap: 0.5rem;
  }

  .user-admin-action .field-label {
    white-space: normal;
  }

  .role-form__button--compact {
    min-width: 0;
    width: 100%;
    white-space: normal;
  }

  .sla-inline-linking .filter-form {
    padding: 0.75rem;
  }

  .sla-report-section {
    padding: 0.7rem;
  }

  .sla-report-section__body {
    margin-top: 0.65rem;
  }

  .sla-report-calculation,
  .sla-row-formula {
    padding: 0.58rem 0.65rem;
    font-size: 0.86rem;
  }

  .table-scroll,
  .sla-detail-table-scroll {
    margin-inline: -0.15rem;
  }

  .history-table,
  .sla-detail-source-table {
    min-width: 560px;
  }

  .history-table--compact,
  .history-table--compact.sla-detail-source-table {
    min-width: 480px;
  }

  th,
  td {
    padding: 0.58rem 0.48rem;
    font-size: 0.88rem;
  }

  code {
    max-width: 100%;
  }

  .audit-expand {
    width: 2.25rem;
    height: 2.25rem;
  }

  .olt-map-meta,
  .olt-map-legend {
    align-items: stretch;
    flex-direction: column;
  }

  .olt-map-legend--header {
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
  }

  .olt-map-meta span,
  .olt-map-legend__item {
    width: 100%;
    justify-content: space-between;
  }

  .olt-map-legend--header .olt-map-legend__item {
    flex: 1 1 calc(50% - 0.4rem);
    width: auto;
    min-width: 6.4rem;
  }

  .olt-map-canvas {
    height: 24rem;
  }
}

/* Keep saved edit report tables readable on low-resolution screens. */
.table-scroll > table.history-table.sla-edit-report-table {
  width: max-content !important;
  min-width: 82rem !important;
}

.table-scroll > table.history-table.sla-edit-report-value-table {
  width: max-content !important;
  min-width: 76rem !important;
}

.table-scroll > table.history-table.sla-edit-report-record-table {
  width: max-content !important;
  min-width: 210rem !important;
}

table.history-table.sla-edit-report-table th,
table.history-table.sla-edit-report-table td,
table.history-table.sla-edit-report-value-table th,
table.history-table.sla-edit-report-value-table td,
table.history-table.sla-edit-report-record-table th,
table.history-table.sla-edit-report-record-table td {
  word-break: normal;
}

/* Compact authenticated password and SLA panel layouts. */
body.auth-change-page {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.auth-change-page .summary-grid {
  display: none;
}

.auth-change-page .page-shell {
  flex: 1 1 auto;
  max-width: none;
  min-height: 0;
  padding: 0 2.2rem 0.35rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-change-page .portal-footer {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0 2.2rem 0.45rem;
}

.change-password-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 0;
  align-items: stretch;
}

.change-password-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.9rem 0.95rem;
  overflow: hidden;
}

.auth-change-page .login-copy {
  font-size: 0.86rem;
  line-height: 1.28;
}

.change-password-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.52rem 0.62rem;
  margin-top: 0.58rem;
  align-items: end;
}

.change-password-field {
  display: grid;
  gap: 0.32rem;
  min-width: 0;
}

.change-password-submit {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: min(18rem, 100%);
  align-self: center;
}

.auth-change-page .auth-support-links {
  flex-direction: column;
  justify-content: center;
  gap: 0.18rem;
  margin-top: 0.35rem;
  text-align: center;
}

.auth-change-page .auth-support-link {
  margin-top: 0;
}

.change-password-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: auto;
  padding: 0.62rem;
  border: 1px solid rgba(10, 78, 161, 0.14);
  border-radius: 0.9rem;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.98)),
    linear-gradient(135deg, rgba(10, 78, 161, 0.06), rgba(243, 169, 31, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.change-password-rules .download-box {
  margin-top: 0;
  padding: 0.52rem 0.58rem;
  border: 1px solid rgba(215, 224, 239, 0.86);
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: none;
}

@media (min-width: 721px) and (max-width: 1240px) {
  .auth-change-page .hero__bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
  }

  .auth-change-page .hero__identity {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    width: auto;
    text-align: left;
  }

  .auth-change-page .hero__copyblock {
    justify-items: start;
  }

  .auth-change-page .session-card {
    flex: 0 0 min(18rem, 31vw);
    min-width: 16rem;
    width: min(18rem, 31vw);
    margin-left: auto;
    align-self: center;
  }
}

@media (max-width: 720px) {
  body.auth-change-page {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .auth-change-page .hero {
    padding: 0.46rem 0.55rem 0.26rem;
  }

  .auth-change-page .hero__content {
    padding: 0.58rem 0.62rem;
    border-radius: 0.86rem;
  }

  .auth-change-page .hero__bar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.42rem;
    align-items: start;
  }

  .auth-change-page .hero__identity {
    gap: 0.58rem;
    align-items: center;
  }

  .auth-change-page .hero__logo-wrap {
    min-width: 92px;
    width: 92px;
    padding: 0.2rem 0.3rem;
  }

  .auth-change-page .hero__logo {
    max-width: 84px;
  }

  .auth-change-page .hero__content h1 {
    font-size: 1.12rem;
    line-height: 1.04;
  }

  .auth-change-page .hero__copy,
  .auth-change-page .hero__copyblock .eyebrow {
    display: none;
  }

  .auth-change-page .session-card {
    width: 100%;
    min-width: 0;
  }

  .auth-change-page .session-menu__summary {
    min-height: 2.35rem;
    padding: 0.36rem 0.48rem;
    gap: 0.5rem;
  }

  .auth-change-page .session-menu__avatar {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.86rem;
  }

  .auth-change-page .session-menu__identity strong {
    font-size: 0.86rem;
  }

  .auth-change-page .session-menu__identity span {
    font-size: 0.68rem;
  }

  .auth-change-page .page-shell {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 0.55rem 0.28rem;
  }

  .change-password-grid {
    gap: 0.42rem;
  }

  .change-password-card {
    padding: 0.54rem;
  }

  .auth-change-page .login-card h2 {
    margin-bottom: 0.16rem;
    font-size: 1.08rem;
  }

  .auth-change-page .login-copy {
    display: none;
  }

  .auth-change-page .tool-form input,
  .auth-change-page .tool-form select,
  .auth-change-page .tool-form button,
  .auth-change-page .inline-link-button {
    padding: 0.42rem 0.52rem;
  }

  .change-password-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.24rem 0.38rem;
    margin-top: 0.35rem;
  }

  .change-password-field {
    gap: 0.2rem;
  }

  .auth-change-page .auth-support-links {
    margin-top: 0.28rem;
  }

  .change-password-rules {
    gap: 0.28rem;
    margin-top: auto;
    padding: 0.35rem;
  }

  .change-password-rules .download-box {
    padding: 0.28rem;
  }

  .change-password-rules .field-label {
    font-size: 0.62rem;
  }

  .change-password-rules .hint-text {
    font-size: 0.68rem;
    line-height: 1.12;
  }

  .auth-change-page .portal-footer {
    padding: 0 0.55rem 0.25rem;
  }
}

/* Dashboard header, footer, and card rhythm aligned with the mobile portal. */
body.portal-home {
  --portal-sticky-header-height: 5.1rem;
  --portal-sticky-footer-height: 2.1rem;
  padding-top: var(--portal-sticky-header-height);
  padding-bottom: var(--portal-sticky-footer-height);
}

body.portal-home .hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  padding: 0.58rem clamp(0.8rem, 3vw, 1.8rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, #0b2d52 0%, #123f67 66%, #0e5960 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  box-shadow: 0 10px 28px rgba(12, 38, 72, 0.16);
  backdrop-filter: blur(10px);
}

body.portal-home .hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #7ea6cf, #2f8d8a);
}

body.portal-home .hero__content {
  max-width: none;
  min-height: auto;
  margin: 0;
  padding: 0;
  border-radius: 0;
  color: #fff;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

body.portal-home .hero__content::after {
  display: none;
}

body.portal-home .hero__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.25rem);
  min-height: auto;
}

body.portal-home .hero__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: fit-content;
  max-width: 100%;
  gap: 0.62rem;
}

body.portal-home .hero__logo-wrap {
  width: 4.85rem;
  min-width: 0;
  height: 3.55rem;
  padding: 0.14rem 0.22rem;
  border: 1px solid rgba(202, 215, 226, 0.86);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 32, 51, 0.075);
}

body.portal-home .hero__logo {
  max-width: 100%;
  max-height: 100%;
}

body.portal-home .hero__copyblock {
  align-self: stretch;
  align-content: space-between;
  gap: 0.08rem;
  padding-block: 0.05rem 0.08rem;
}

body.portal-home .hero__copyblock .eyebrow {
  margin: 0 0 0.08rem;
  color: #d7e7f4;
  font-size: clamp(0.8rem, 1.02vw, 0.96rem);
  font-weight: 950;
  letter-spacing: 0.07em;
  line-height: 1.24;
  white-space: nowrap;
}

body.portal-home .hero__content h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.7rem, 2.45vw, 2.1rem);
  line-height: 1;
  white-space: nowrap;
}

body.portal-home .hero__copy {
  display: none;
}

body.portal-home .session-card {
  justify-self: end;
  width: min(19rem, 30vw);
  min-width: 14rem;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.16);
}

body.portal-home .session-menu__summary {
  min-height: 2.45rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(202, 215, 226, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 6px 16px rgba(17, 27, 46, 0.045);
}

body.portal-home .session-menu__avatar {
  width: 2.15rem;
  height: 2.15rem;
  background: var(--brand-dark);
  color: #fff;
}

body.portal-home .session-menu__identity strong {
  color: var(--text);
  font-size: 0.88rem;
}

body.portal-home .session-menu__identity span {
  color: var(--muted);
  font-size: 0.68rem;
}

body.portal-home .session-menu__chevron {
  border-color: var(--muted);
}

body.portal-home {
  --portal-card-min-height: 6.35rem;
}

body.portal-home .page-shell {
  width: min(1500px, calc(100% - 2rem));
  max-width: calc(100vw - 2rem);
  min-height: calc(100dvh - var(--portal-sticky-header-height) - var(--portal-sticky-footer-height));
  padding: 0.18rem 0 2.55rem;
}

body.portal-home.portal-detail-focus .page-shell {
  padding-bottom: calc(var(--portal-sticky-footer-height) + 7rem);
}

body.portal-home .hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  background:
    linear-gradient(135deg, #0b2d52 0%, #123f67 66%, #0e5960 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  backdrop-filter: blur(10px);
}

body.portal-home [data-panel-id],
body.portal-home .service-detail-card {
  scroll-margin-top: var(--portal-sticky-header-height);
  scroll-margin-bottom: 3.25rem;
}

body.portal-home .summary-grid {
  grid-auto-rows: minmax(var(--portal-card-min-height), auto);
  gap: 0.78rem;
  margin: 0.18rem 0 0.64rem;
}

body.portal-home .summary-grid--section-mode {
  margin-bottom: 0.58rem;
}

body.portal-home .summary-grid--map-mode {
  margin-bottom: 0.58rem;
}

body.portal-home .summary-card {
  display: grid;
  align-content: center;
  min-height: var(--portal-card-min-height);
  padding: 0.94rem 1.02rem 0.94rem 1.18rem;
  border-color: rgba(191, 208, 222, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 252, 0.98)),
    linear-gradient(90deg, rgb(var(--brand-rgb) / 0.03), rgb(var(--theme-teal-rgb) / 0.035));
  box-shadow: 0 12px 28px rgba(17, 27, 46, 0.075);
}

body.portal-home.portal-map-focus .page-shell {
  width: calc(100vw - 0.7rem);
  max-width: none;
  min-height: calc(100dvh - var(--portal-sticky-footer-height));
  padding: 0.35rem 0 calc(var(--portal-sticky-footer-height) + 0.45rem);
}

body.portal-home.portal-map-focus #olt-geo-map-panel {
  width: 100%;
  max-width: none;
  margin-bottom: calc(var(--portal-sticky-footer-height) + 0.45rem);
  padding: 0.52rem 0.64rem 0.56rem;
  border-color: rgba(202, 215, 226, 0.82);
  border-radius: 16px;
  box-shadow: 0 12px 26px rgba(17, 27, 46, 0.08);
}

body.portal-home.portal-map-focus .olt-map-panel {
  gap: 0.5rem;
}

body.portal-home.portal-map-focus .olt-map-header {
  padding-bottom: 0;
  border-bottom: 0;
}

body.portal-home.portal-map-focus .olt-map-canvas {
  height: var(--olt-geo-height);
  min-height: clamp(31rem, calc(100svh - 11.8rem), 60rem);
}

body.portal-home.portal-map-focus .olt-geo-panel {
  --olt-geo-height: clamp(32rem, calc(100svh - 12rem), 74rem);
  min-height: calc(100svh - var(--portal-sticky-footer-height) - 0.4rem);
}

body.portal-home.portal-map-focus .secondary-page-action.olt-geo-toggle,
body.portal-home.portal-map-focus .secondary-page-action.olt-geo-reset,
body.portal-home.portal-map-focus .secondary-page-action.olt-geo-info-action {
  min-height: 1.92rem;
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
}

@media (min-width: 1081px) {
  body.portal-home.portal-map-focus .olt-geo-title-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.72rem;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
  }

  body.portal-home.portal-map-focus .olt-geo-title-row h2 {
    flex: 0 0 auto;
    font-size: 0.86rem;
    letter-spacing: 0.18em;
    white-space: nowrap;
  }

  body.portal-home.portal-map-focus .olt-geo-meta {
    flex: 1 1 auto;
    flex-direction: row;
    justify-content: flex-end;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  body.portal-home.portal-map-focus .olt-geo-meta span {
    flex: 0 0 auto;
    width: auto;
    min-height: 2.08rem;
    padding: 0.34rem 0.62rem;
    font-size: 0.78rem;
  }

  body.portal-home.portal-map-focus .olt-geo-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.52rem;
    align-items: center;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  body.portal-home.portal-map-focus .olt-geo-layer-controls {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  body.portal-home.portal-map-focus .olt-geo-layer-controls--primary {
    margin-right: auto;
  }

  body.portal-home.portal-map-focus .olt-geo-layer-controls--overlays {
    margin-left: auto;
  }
}

body.portal-home .summary-card--nav,
body.portal-home .service-selector-card {
  --active-card-border: rgb(var(--theme-teal-rgb) / 0.7);
  --active-card-bg: linear-gradient(135deg, rgb(var(--brand-rgb) / 0.16), rgba(255, 255, 255, 0.98) 48%, rgb(var(--theme-teal-rgb) / 0.15));
  --active-card-shadow: inset 0 0 0 1px rgb(var(--theme-teal-rgb) / 0.12), 0 16px 36px rgba(9, 41, 84, 0.14);
  --active-card-rail: linear-gradient(180deg, var(--brand-dark), var(--theme-teal), var(--accent));
}

body.portal-home .summary-label {
  margin-bottom: 0.24rem;
  font-size: 0.86rem;
  line-height: 1.12;
}

body.portal-home .summary-card strong,
body.portal-home .summary-card--nav strong {
  font-size: 1.12rem;
  line-height: 1.16;
}

body.portal-home .summary-card::before {
  width: 4px;
}

body.portal-home .summary-card--nav:hover,
body.portal-home .summary-card--nav:focus-visible {
  transform: translateY(-1px);
  border-color: rgb(var(--theme-teal-rgb) / 0.24);
  box-shadow: 0 16px 36px rgba(17, 27, 46, 0.1);
}

body.portal-home .summary-card--nav.is-active {
  border-color: var(--active-card-border);
  background: var(--active-card-bg);
  box-shadow: var(--active-card-shadow);
}

body.portal-home .summary-card--nav.is-active::before {
  width: 8px;
  background: var(--active-card-rail);
}

body.portal-home .summary-card--nav.is-active strong {
  color: var(--brand-dark);
}

body.portal-home .summary-card--nav.is-active .summary-label {
  color: var(--theme-teal-dark);
  font-weight: 820;
}

@media (min-width: 641px) {
  body.portal-home .summary-grid {
    gap: 0.82rem;
    margin: 0.2rem 0 0.66rem;
  }

  body.portal-home .summary-card {
    min-height: var(--portal-card-min-height);
    padding: 1rem 1.14rem 1rem 1.32rem;
  }

  body.portal-home .summary-label {
    font-size: 0.92rem;
  }

  body.portal-home .summary-card strong,
  body.portal-home .summary-card--nav strong {
    font-size: 1.2rem;
  }
}

body.portal-home .service-selector-grid {
  gap: 0.68rem;
  margin-top: 0.58rem;
}

body.portal-home #sla-panel.history-card--panel,
body.portal-home #services-panel.history-card--panel,
body.portal-home #user-control-panel.history-card--panel {
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body.portal-home #user-control-panel.history-card--panel {
  margin-bottom: 0.72rem;
}

body.portal-home #sla-panel.history-card--panel > .history-card__header,
body.portal-home #services-panel.history-card--panel > .history-card__header,
body.portal-home #user-control-panel.history-card--panel > .history-card__header,
body.portal-home #user-control-panel.history-card--panel > .service-selector-grid,
body.portal-home .service-selector-workbench > .service-selector-grid,
body.portal-home .service-detail-card > .service-selector-grid {
  padding: 0.9rem;
  border: 1px solid rgba(191, 208, 222, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 252, 0.97)),
    linear-gradient(90deg, rgb(var(--brand-rgb) / 0.035), rgb(var(--theme-teal-rgb) / 0.035));
  box-shadow: 0 14px 34px rgba(17, 27, 46, 0.075);
}

body.portal-home #sla-panel.history-card--panel > .history-card__header,
body.portal-home #services-panel.history-card--panel > .history-card__header,
body.portal-home #user-control-panel.history-card--panel > .history-card__header {
  margin-bottom: 0.74rem;
}

body.portal-home #user-control-panel .service-selector-grid--user-control {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  gap: 0.72rem;
  margin-top: 0;
}

body.portal-home #user-control-panel .service-selector-grid--user-control .service-selector-card {
  min-height: var(--portal-card-min-height);
}

@media (min-width: 980px) {
  body.portal-home .service-selector-grid--sla {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.72rem;
  }

  body.portal-home .service-selector-grid--sla > .service-selector-slot {
    grid-column: span 2;
  }

  body.portal-home .service-selector-grid--sla > .service-selector-slot:nth-child(4) {
    grid-column: 1 / span 3;
  }

  body.portal-home .service-selector-grid--sla > .service-selector-slot:nth-child(5) {
    grid-column: 4 / span 3;
  }

  body.portal-home #user-control-panel .service-selector-grid--user-control {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.portal-home .service-selector-card {
  min-height: var(--portal-card-min-height);
  padding: 0.82rem 1rem 0.82rem 1.14rem;
  border-radius: 8px;
  border-color: rgba(191, 208, 222, 0.95);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 252, 0.98)),
    linear-gradient(90deg, rgb(var(--brand-rgb) / 0.025), rgb(var(--theme-teal-rgb) / 0.03));
  box-shadow: 0 12px 30px rgba(17, 27, 46, 0.07);
}

body.portal-home .service-selector-card::before {
  width: 4px;
}

body.portal-home .service-selector-card.is-active::before {
  width: 8px;
  background: var(--active-card-rail);
}

body.portal-home .service-selector-card.is-active {
  border-color: var(--active-card-border);
  background: var(--active-card-bg);
  box-shadow: var(--active-card-shadow);
}

body.portal-home .service-selector-card.is-active strong {
  color: var(--brand-dark);
}

body.portal-home .service-selector-card.is-active .service-selector-card__eyebrow {
  color: var(--theme-teal-dark);
  font-weight: 860;
}

body.portal-home .service-selector-card.is-active .service-selector-card__copy {
  color: #344b63;
}

body.portal-home .service-selector-card strong {
  margin-top: 0.12rem;
  font-size: 1.06rem;
  line-height: 1.16;
}

body.portal-home .service-selector-card__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  line-height: 1.12;
}

body.portal-home .service-selector-card__copy {
  margin-top: 0.28rem;
  font-size: 0.82rem;
  line-height: 1.28;
  text-align: left;
}

body.portal-home .service-detail-stack {
  gap: 0.72rem;
  margin-top: 0.82rem;
}

body.portal-home .service-detail-card {
  padding: 0.9rem 1rem 1rem;
  border-radius: 8px;
}

body.portal-home .service-selector-expanded-card__header {
  gap: 0.75rem;
}

body.portal-home .service-selector-expanded-card__header h2 {
  margin: 0.12rem 0 0.18rem;
  font-size: clamp(1.26rem, 1.9vw, 1.55rem);
  line-height: 1.08;
}

body.portal-home .service-selector-expanded-card__copy {
  line-height: 1.35;
}

body.portal-home .service-selector-expanded-card__close {
  width: 1.9rem;
  height: 1.9rem;
}

body.portal-home .history-card--panel {
  margin-bottom: calc(var(--portal-sticky-footer-height) + 0.8rem);
  padding: 1.05rem 1.2rem 1.2rem;
}

body.portal-home .history-card--panel > .history-card__header {
  padding-bottom: 0.58rem;
  border-bottom: 1px solid rgba(202, 215, 226, 0.68);
}

@media (min-width: 1180px) {
  body.portal-home .service-selector-grid--sla .service-selector-card {
    min-height: var(--portal-card-min-height);
    padding: 0.9rem 1.08rem 0.9rem 1.22rem;
  }

  body.portal-home .service-selector-grid--sla .service-selector-card strong {
    font-size: 1.16rem;
  }

  body.portal-home .service-selector-grid--sla .service-selector-card__copy {
    font-size: 0.84rem;
    line-height: 1.3;
  }
}

@media (min-width: 900px) {
  body.portal-home .history-card--panel {
    min-height: 0;
  }
}

body.portal-home .filter-form,
body.portal-home .olt-map-toolbar {
  gap: 0.58rem;
}

body.portal-home .filter-form {
  margin: 0.72rem 0 0.86rem;
}

body.portal-home .filter-form label,
body.portal-home .tool-form label,
body.portal-home .olt-map-toolbar label {
  margin-bottom: 0.28rem;
  font-size: 0.82rem;
  line-height: 1.12;
}

body.portal-home .filter-form input,
body.portal-home .filter-form select,
body.portal-home .filter-form button,
body.portal-home .tool-form input,
body.portal-home .tool-form select,
body.portal-home .tool-form button,
body.portal-home .olt-map-toolbar input,
body.portal-home .olt-map-toolbar select,
body.portal-home .olt-map-reset {
  min-height: 2.5rem;
  padding: 0.55rem 0.66rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.2;
}

body.portal-home .filter-form button,
body.portal-home .tool-form button,
body.portal-home .olt-map-reset {
  border-radius: 999px;
}

body.portal-home .olt-map-meta,
body.portal-home .olt-map-legend {
  gap: 0.45rem;
}

body.portal-home .olt-map-meta span,
body.portal-home .olt-map-legend__item {
  min-height: 1.9rem;
  padding: 0.32rem 0.56rem;
  font-size: 0.8rem;
}

body.portal-home .portal-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: none;
  min-height: 1.9rem;
  margin: 0 auto;
  padding: 0.22rem 0.5rem max(0.28rem, calc(0.18rem + env(safe-area-inset-bottom)));
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(135deg, #0b2d52 0%, #123f67 66%, #0e5960 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

body.portal-home .portal-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #7ea6cf, #2f8d8a);
}

body.portal-home .portal-footer__bar {
  max-width: none;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.62rem;
  line-height: 1.2;
}

body.portal-home .portal-footer__brandline {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 760;
  letter-spacing: 0.02em;
}

body.portal-home .portal-footer__brandline span {
  color: inherit;
}

body.portal-home .portal-footer__logo {
  display: block;
  width: 1.9rem;
  height: auto;
  padding: 0.08rem 0.18rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 6px 14px rgba(5, 20, 40, 0.18);
}

@media (max-width: 900px) {
  body.portal-home {
    --portal-sticky-header-height: 9.35rem;
  }

  body.portal-home .hero__bar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body.portal-home .session-card {
    justify-self: stretch;
    width: 100%;
    min-width: 0;
  }

  body.portal-home .page-shell,
  body.portal-home .portal-footer {
    width: min(100% - 1rem, 720px);
    max-width: calc(100vw - 1rem);
  }

  body.portal-home .portal-footer {
    width: 100%;
    max-width: none;
  }

  body.portal-home .summary-grid,
  body.portal-home .summary-grid--tabs,
  body.portal-home .summary-grid--tabs-admin,
  body.portal-home .summary-grid--tabs-ba {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 640px) {
  body.portal-home .page-shell {
    width: 100%;
    max-width: 100%;
    padding-inline: 0.5rem;
  }

  body.portal-home {
    --portal-sticky-header-height: 9.35rem;
    --portal-sticky-footer-height: 2.1rem;
    --portal-card-min-height: 4.25rem;
  }

  body.portal-home [data-panel-id],
  body.portal-home .service-detail-card {
    scroll-margin-top: var(--portal-sticky-header-height);
  }

  body.portal-home .portal-footer {
    width: 100%;
    max-width: none;
  }

  body.portal-home .summary-grid,
  body.portal-home .summary-grid--tabs,
  body.portal-home .summary-grid--tabs-admin,
  body.portal-home .summary-grid--tabs-ba {
    grid-template-columns: 1fr;
  }

  body.portal-home .summary-card {
    min-height: var(--portal-card-min-height);
    padding: 0.68rem 0.76rem 0.68rem 0.9rem;
  }

  body.portal-home .service-selector-card {
    min-height: var(--portal-card-min-height);
    padding: 0.66rem 0.72rem 0.66rem 0.88rem;
  }

  body.portal-home .service-selector-card__copy {
    display: none;
  }

  body.portal-home .filter-form input,
  body.portal-home .filter-form select,
  body.portal-home .filter-form button,
  body.portal-home .tool-form input,
  body.portal-home .tool-form select,
  body.portal-home .tool-form button,
  body.portal-home .olt-map-toolbar input,
  body.portal-home .olt-map-toolbar select,
  body.portal-home .olt-map-reset {
    min-height: 2.32rem;
    padding: 0.48rem 0.58rem;
    font-size: 0.86rem;
  }
}
