:root {
  --navy-950: #0b1423;
  --navy-900: #101b2d;
  --navy-800: #17263c;
  --navy-700: #203653;
  --blue: #3074f0;
  --blue-dark: #1e58c2;
  --cyan: #35c8e8;
  --orange: #f28a34;
  --green: #22a06b;
  --red: #e85d68;
  --yellow: #e9a72f;
  --ink: #15243a;
  --muted: #708096;
  --line: #e4e9ef;
  --surface: #ffffff;
  --canvas: #f4f6f8;
  --shadow: 0 18px 50px rgba(15, 32, 54, 0.08);
  --radius: 18px;
}

/* Plan catalogue: keep commercial data legible instead of clipping it into fixed columns. */
#plansView .plan-grid {
  gap: 10px;
  overflow: visible;
  border: 0;
  background: transparent;
}

#plansView .plan-list-row {
  grid-template-columns: minmax(235px, 1.25fr) repeat(3, minmax(128px, .7fr)) minmax(165px, .8fr) auto;
  gap: 10px 16px;
  min-height: 0;
  padding: 14px 16px 14px 20px;
  border: 1px solid #e1e8f3;
  border-radius: 12px;
  background: linear-gradient(90deg, #ffffff 0%, #fbfcff 100%);
}

#plansView .plan-list-row > div:not(.plan-list-actions) {
  min-width: 0;
}

#plansView .plan-list-row strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

#plansView .plan-list-name {
  align-self: stretch;
  padding-right: 12px;
  border-right: 1px solid #edf1f6;
}

#plansView .plan-list-name strong {
  font-size: 15px;
}

#plansView .plan-list-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 6px;
  min-width: 204px;
  padding-left: 12px;
  border-left: 1px solid #edf1f6;
}

#plansView .plan-list-actions button {
  min-height: 31px;
  padding: 6px 8px;
  white-space: nowrap;
}

@media (max-width: 1500px) {
  #plansView .plan-list-row {
    grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(120px, .7fr)) auto;
  }

  #plansView .plan-list-row > div:nth-child(5) {
    grid-column: 1 / span 2;
    padding-top: 3px;
  }
}

@media (max-width: 1080px) {
  #plansView .plan-list-row {
    grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(135px, .7fr));
  }

  #plansView .plan-list-status {
    justify-items: start;
  }

  #plansView .plan-list-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    min-width: 0;
    padding: 10px 0 0;
    border-top: 1px solid #edf1f6;
    border-left: 0;
  }
}

@media (max-width: 680px) {
  #plansView .plan-list-row {
    grid-template-columns: 1fr 1fr;
    padding: 13px 14px 14px 18px;
  }

  #plansView .plan-list-name,
  #plansView .plan-list-row > div:nth-child(5) {
    grid-column: 1 / -1;
    padding-right: 0;
    border-right: 0;
  }

  #plansView .plan-list-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Portal operativo para cuentas técnicas */
.technician-portal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.technician-portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.technician-task-panel {
  min-width: 0;
}

.technician-task-list {
  display: grid;
  gap: 10px;
}

.technician-task-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid #e7ebf1;
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.task-button {
  cursor: pointer;
}

.task-button:hover,
.quick-installation-order:hover {
  border-color: #b9cdf7;
  box-shadow: 0 8px 22px rgba(48, 116, 240, 0.08);
}

.task-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eaf1ff;
  color: #3074f0;
}

.task-icon svg {
  width: 20px;
  height: 20px;
}

.task-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.task-copy strong,
.task-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy small {
  color: #738096;
}

.compact-button {
  min-height: 36px;
  padding: 8px 12px;
}

.quick-installation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.7fr);
  gap: 20px;
}

.quick-installation-list {
  display: grid;
  gap: 14px;
}

.quick-installation-order {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #e7ebf1;
  border-radius: 16px;
  transition: 160ms ease;
}

.quick-order-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.quick-order-head > div {
  display: grid;
  gap: 3px;
}

.quick-order-head small,
.quick-installation-order p {
  color: #738096;
}

.quick-order-data,
.activation-result-grid,
.quick-final-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-order-data span,
.activation-result-grid span,
.quick-final-review span {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f9fc;
}

.quick-order-data small,
.activation-result-grid small,
.quick-final-review small {
  color: #738096;
}

.quick-installation-help {
  align-self: start;
  position: sticky;
  top: 92px;
}

.quick-check-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.quick-check-list span {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #3e4b61;
}

.quick-check-list svg {
  width: 18px;
  color: #22a06b;
}

.quick-installation-result {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid #b9e4d1;
  border-radius: 18px;
  background: #f0fbf6;
}

.result-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #22a06b;
  color: #fff;
}

.result-icon svg {
  width: 26px;
}

.quick-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
}

.quick-wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}

.quick-wizard-progress > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: #f2f5f9;
  color: #7a8799;
}

.quick-wizard-progress b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #dfe5ed;
}

.quick-wizard-progress .active {
  background: #eaf1ff;
  color: #1d5fc7;
}

.quick-wizard-progress .active b {
  background: #3074f0;
  color: #fff;
}

.quick-wizard-progress .completed {
  background: #e8f7ef;
  color: #168258;
}

.quick-wizard-progress .completed b {
  background: #22a06b;
  color: #fff;
}

.quick-wizard-step {
  display: grid;
  gap: 18px;
}

.quick-step-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.quick-step-heading > span {
  font-size: 30px;
  font-weight: 800;
  color: #d3dbe7;
}

.quick-step-heading h3,
.quick-step-heading p {
  margin: 0;
}

.quick-step-heading p {
  margin-top: 4px;
  color: #738096;
}

.quick-step-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.quick-step-fields .full {
  grid-column: 1 / -1;
}

.quick-step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.technician-session #inventoryView .stock-policy-grid:empty {
  display: none;
}

@media (max-width: 1050px) {
  .technician-portal-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technician-portal-grid,
  .quick-installation-layout {
    grid-template-columns: 1fr;
  }

  .quick-installation-help {
    position: static;
  }
}

@media (max-width: 680px) {
  .technician-portal-summary,
  .quick-order-data,
  .activation-result-grid,
  .quick-final-review,
  .quick-step-fields {
    grid-template-columns: 1fr;
  }

  .quick-wizard-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .technician-task-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .technician-task-item > :last-child:not(.task-copy) {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .quick-installation-result {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "DM Sans", sans-serif;
}

.demo-banner {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 36px;
  padding: 7px 18px;
  color: #5d3d08;
  background: #fff0c7;
  border-bottom: 1px solid #efd187;
  font-size: 11px;
}

.demo-banner[hidden] {
  display: none;
}

.demo-banner a {
  color: #245fc7;
  font-weight: 800;
}

.demo-runtime {
  padding-top: 36px;
}

.demo-runtime .sidebar {
  top: 36px;
  height: calc(100vh - 36px);
}

.demo-access {
  border-color: #efd187;
  background: #fff8e5;
}

[hidden] {
  display: none !important;
}

body.auth-pending {
  overflow: hidden;
}

html.session-restoring .auth-screen {
  visibility: hidden;
  pointer-events: none;
}

/* Keep the access form visible while the CRM validates an existing session.
   The full application remains hidden until authentication is confirmed. */

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(430px, 1.2fr) minmax(390px, .8fr);
  min-height: 100vh;
  background: #fff;
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(30px, 5vw, 68px);
  color: #fff;
  background:
    radial-gradient(circle at 75% 18%, rgba(53, 200, 232, .22), transparent 27%),
    radial-gradient(circle at 12% 78%, rgba(48, 116, 240, .24), transparent 30%),
    linear-gradient(145deg, #0a1424 0%, #102139 58%, #122b48 100%);
}

.auth-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 13px;
}

.auth-brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-family: "Manrope", sans-serif;
  font-size: 21px;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(31, 104, 222, .28);
}

.auth-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
}

.auth-brand small {
  margin-top: 2px;
  color: #91a4bd;
  font-size: 10px;
  letter-spacing: .05em;
}

.auth-visual-content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding: 60px 0;
}

.auth-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 10px;
  border: 1px solid rgba(84, 203, 230, .25);
  border-radius: 999px;
  color: #7de0f2;
  background: rgba(53, 200, 232, .08);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
}

.auth-visual-content h1 {
  max-width: 560px;
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(34px, 4.5vw, 62px);
  line-height: 1.06;
  letter-spacing: -.04em;
}

.auth-visual-content > p {
  max-width: 540px;
  margin: 22px 0 30px;
  color: #9fb0c5;
  font-size: 14px;
  line-height: 1.7;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-feature-grid > span {
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  backdrop-filter: blur(8px);
}

.auth-feature-grid i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #72dcee;
  background: rgba(53, 200, 232, .1);
}

.auth-feature-grid svg {
  display: block;
  width: 14px;
  height: 14px;
}

.isp-logo-uses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.isp-logo-uses > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #e4eaf1;
  border-radius: 12px;
  background: #f8fafc;
}

.isp-logo-uses small {
  flex: 1;
  color: #526174;
  font-size: 11px;
  font-weight: 700;
}

.isp-logo-uses img,
.brand-logo-current img {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1px solid #e1e7ef;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.brand-logo-current {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0 10px;
  padding: 10px;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  color: #637084;
  background: #f8fafc;
  font-size: 12px;
  line-height: 1.45;
}

.auth-feature-grid strong {
  font-size: 10px;
}

.auth-feature-grid small {
  color: #8799b0;
  font-size: 8px;
}

.auth-visual-orbit {
  position: absolute;
  right: -190px;
  bottom: -240px;
  width: 560px;
  height: 560px;
  border: 1px solid rgba(53, 200, 232, .09);
  border-radius: 50%;
}

.auth-visual-orbit::before,
.auth-visual-orbit::after {
  position: absolute;
  inset: 70px;
  border: 1px solid rgba(48, 116, 240, .12);
  border-radius: inherit;
  content: "";
}

.auth-visual-orbit::after {
  inset: 150px;
}

.auth-visual-orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 22px rgba(53, 200, 232, .8);
}

.auth-visual-orbit span:nth-child(1) { top: 38px; left: 180px; }
.auth-visual-orbit span:nth-child(2) { top: 185px; left: 62px; }
.auth-visual-orbit span:nth-child(3) { top: 127px; right: 76px; }

.auth-form-side {
  display: grid;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 72px);
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, .92), rgba(255, 255, 255, .98)),
    radial-gradient(circle at 100% 0, #dfeaff, transparent 42%);
}

.login-card {
  width: min(390px, 100%);
}

.auth-mobile-intro {
  display: none;
}

.login-heading {
  margin-bottom: 26px;
}

.login-heading h2 {
  margin: 8px 0 6px;
  font-family: "Manrope", sans-serif;
  font-size: 30px;
  letter-spacing: -.03em;
}

.login-heading p,
.login-support {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.login-alert {
  margin-bottom: 16px;
  padding: 11px 12px;
  border: 1px solid #ffd0d4;
  border-radius: 10px;
  color: #a92c3a;
  background: #fff1f2;
  font-size: 10px;
  line-height: 1.45;
}

.login-alert.success {
  border-color: #b7e7d1;
  color: #116847;
  background: #eaf8f1;
}

.login-field {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.login-input-wrap {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbfd;
  transition: 160ms ease;
}

.login-input-wrap:focus-within {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(48, 116, 240, .1);
}

.login-input-wrap i {
  display: grid;
  color: #8291a7;
}

.login-input-wrap svg {
  width: 17px;
  height: 17px;
}

.login-input-wrap input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
}

.login-input-wrap input::placeholder {
  color: #a2adba;
}

.password-toggle {
  padding: 4px;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
}

.remember-session {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 18px;
  color: var(--muted);
  font-size: 10px;
}

.remember-session input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}

.forgot-password,
.recovery-back {
  display: block;
  width: fit-content;
  margin: -7px 0 15px auto;
  padding: 3px 0;
  border: 0;
  color: var(--blue);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.recovery-back {
  margin: 14px auto 0;
}

.recovery-hint {
  margin: -4px 0 15px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.smtp-policy-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.smtp-policy-list span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #52647b;
  background: #f0f4f9;
  font-size: 9px;
  font-weight: 700;
}

.smtp-policy-list span.enabled {
  color: #116847;
  background: #e4f6ee;
}

.smtp-checkbox-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.smtp-checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #f9fbfd;
  font-size: 10px;
}

.smtp-checkbox-grid input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}

.whatsapp-panel {
  position: relative;
  overflow: hidden;
}

.messaging-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.messaging-summary > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.messaging-summary small,
.message-table small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}

.messaging-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.messaging-layout {
  display: grid;
  grid-template-columns: minmax(260px, .7fr) minmax(0, 1.7fr);
  gap: 16px;
}

.message-compose-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.message-compose-panel label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
}

.message-preview {
  min-width: 220px;
  max-width: 420px;
  white-space: normal;
}

.message-preview details { cursor: pointer; }
.message-preview summary { color: var(--blue); font-weight: 700; }
.message-preview details p { margin: 8px 0 0; max-width: 420px; white-space: pre-wrap; line-height: 1.45; color: var(--ink); }
.message-broadcast-panel select[multiple] { min-height: 108px; padding: 7px; }
.message-broadcast-panel { border-top: 3px solid #8b5cf6; }

.status-pill.info { background: #e7f1ff; color: #1769aa; }
.status-pill.success { background: #e5f8ef; color: #167b54; }
.status-pill.warning { background: #fff3d7; color: #996100; }
.status-pill.danger { background: #fdeaea; color: #b42318; }
.status-pill.muted { background: #eef1f4; color: #667085; }

@media (max-width: 900px) {
  .messaging-layout { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .messaging-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Compact service catalogue: information first, without oversized plan cards. */
#plansView .plan-grid {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #e2e8f2;
  border-radius: 14px;
  background: #fff;
}

#plansView .plan-list-row {
  position: relative;
  grid-template-columns: minmax(210px, 1.3fr) minmax(145px, .85fr) minmax(145px, .8fr) minmax(115px, .7fr) minmax(135px, .85fr) auto minmax(240px, auto);
  gap: 12px;
  min-height: 74px;
  padding: 10px 14px 10px 18px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  border-radius: 0;
  box-shadow: none;
}

#plansView .plan-list-row:last-child { border-bottom: 0; }
#plansView .plan-list-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #3074f0; }
#plansView .plan-list-row.featured::before { background: #8b5cf6; }
#plansView .plan-list-row:hover { transform: none; border-color: #edf1f6; background: #f7faff; box-shadow: none; }
#plansView .plan-list-name strong { font-size: 14px; letter-spacing: -.01em; }
#plansView .plan-list-row > div:nth-child(3) strong { color: #167b54; font-size: 14px; }
#plansView .plan-list-actions { padding-left: 8px; border-left: 1px solid #edf1f6; }

@media (max-width: 1100px) {
  #plansView .plan-list-row { grid-template-columns: minmax(190px, 1fr) repeat(3, minmax(120px, .7fr)) auto; }
  #plansView .plan-list-row > div:nth-child(5) { display: none; }
}

.whatsapp-panel::after {
  position: absolute;
  right: -35px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 160, 107, .12), transparent 68%);
  pointer-events: none;
  content: "";
}

.whatsapp-icon {
  color: #168258;
  background: #e4f6ee;
}

.whatsapp-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid #d8ebe2;
  border-radius: 10px;
  color: #416052;
  background: #f5fbf8;
  font-size: 9px;
  line-height: 1.45;
}

.whatsapp-note svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: #168258;
}

.whatsapp-qr-box {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid #d8c9f2;
  border-radius: 12px;
  background: #faf7ff;
}

.whatsapp-qr-box img {
  display: block;
  width: 116px;
  height: 116px;
  padding: 5px;
  border: 1px solid #ded7e9;
  border-radius: 10px;
  background: #fff;
}

.whatsapp-qr-box div {
  display: grid;
  gap: 5px;
}

.whatsapp-qr-box strong {
  color: var(--ink);
  font-size: 11px;
}

.whatsapp-qr-box span,
.whatsapp-qr-box small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.whatsapp-bridge-error {
  margin: 0 0 12px;
  padding: 9px 10px;
  border: 1px solid #f1c9c9;
  border-radius: 9px;
  color: #9b2f2f;
  background: #fff4f4;
  font-size: 9px;
  line-height: 1.4;
}

.whatsapp-provider-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid #dce5ee;
  border-radius: 12px;
  background: #f8fafc;
}

.whatsapp-provider-fields[hidden] {
  display: none;
}

.whatsapp-web-help {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #d8ebe2;
  border-radius: 9px;
  color: #416052;
  background: #f5fbf8;
  font-size: 9px;
}

.danger-button {
  color: #a33232;
  border-color: #efcaca;
  background: #fff6f6;
}

.whatsapp-panel .integration-actions {
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.whatsapp-panel .integration-actions button > svg,
.whatsapp-panel .integration-title .help-icon > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.whatsapp-checkbox-grid {
  margin-bottom: 3px;
}

.whatsapp-variables {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 11px;
  border: 1px dashed #b9d7c8;
  border-radius: 11px;
  background: #f6fbf8;
}

.whatsapp-variables strong {
  width: 100%;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 9px;
}

.whatsapp-variables span {
  padding: 4px 7px;
  border-radius: 7px;
  color: #116847;
  background: #e4f6ee;
  font-family: monospace;
  font-size: 8px;
  font-weight: 700;
}

.modal-form textarea[name^="template"] {
  min-height: 86px;
}

@media (max-width: 680px) {
  .whatsapp-provider-fields,
  .whatsapp-qr-box {
    grid-template-columns: 1fr;
  }

  .whatsapp-qr-box img {
    width: 150px;
    height: 150px;
    margin: 0 auto;
  }
}

.login-submit {
  width: 100%;
  min-height: 48px;
  justify-content: center;
}

.initial-access {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 12px;
  margin-top: 18px;
  padding: 12px;
  border: 1px dashed #b8cae6;
  border-radius: 11px;
  color: #52647b;
  background: #f5f8fd;
  font-size: 9px;
}

.initial-access strong {
  grid-column: 1 / -1;
  color: var(--ink);
  font-size: 10px;
}

.initial-access code {
  color: var(--blue-dark);
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
}

.login-support {
  margin-top: 18px;
  text-align: center;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: .58;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(48, 116, 240, .28);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 258px;
  flex-direction: column;
  padding: 28px 18px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 0 0, rgba(53, 200, 232, 0.12), transparent 28%),
    var(--navy-950);
}

.sidebar-scrim {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 34px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-family: "Manrope", sans-serif;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(48, 116, 240, 0.3);
}

.brand-mark.has-logo {
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-family: "Manrope", sans-serif;
  font-size: 16px;
}

.brand span {
  margin-top: 2px;
  color: #8291a7;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.nav-list {
  display: grid;
  flex: 1;
  min-height: 0;
  gap: 6px;
  overflow-y: auto;
  padding-right: 3px;
}

.nav-section-label {
    display: block;
    margin: 14px 13px 2px;
    color: #65758b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .12em;
    text-transform: uppercase;
  }

  .nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: calc(100% - 26px);
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
  }

  .nav-group-toggle::after {
    content: "-";
    color: #8ea2ba;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
  }

  .nav-group-toggle[aria-expanded="false"]::after {
    content: "+";
  }

  .nav-section-label[hidden],
  .nav-item[hidden],
  .nav-item.nav-group-collapsed {
    display: none;
  }

.nav-section-label:first-of-type {
  margin-top: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  gap: 12px;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  color: #93a1b5;
  background: transparent;
  text-align: left;
  transition: 180ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(48, 116, 240, 0.22), rgba(48, 116, 240, 0.06));
  box-shadow: inset 3px 0 var(--cyan);
}

.nav-icon,
[data-icon] {
  display: inline-flex;
  flex: 0 0 auto;
}

[data-icon] svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.8;
}

.nav-item .nav-icon svg {
  width: 16px;
  height: 16px;
}

.primary-button [data-icon] svg,
.secondary-button [data-icon] svg,
.danger-button [data-icon] svg,
.customer-tool [data-icon] svg,
.plan-card-actions [data-icon] svg,
.network-card-actions [data-icon] svg,
.contract-detail-actions [data-icon] svg {
  width: 15px;
  height: 15px;
}

.global-search [data-icon] svg,
.table-search [data-icon] svg,
.login-input-wrap [data-icon] svg {
  width: 16px;
  height: 16px;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.row-action svg {
  width: 14px;
  height: 14px;
}

.nav-item.nav-subitem {
  margin-left: 16px;
  width: calc(100% - 16px);
  font-size: 12px;
}

.nav-item.nav-subitem .nav-icon {
  transform: scale(.82);
}

.view button:not(.icon-button):not(.row-action) > svg,
.view a:not(.icon-button):not(.row-action) > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.view .type-icon > svg,
.view .alert-icon > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.view .summary-card .metric-icon > svg {
  width: 16px;
  height: 16px;
}

.metric-icon svg,
.vital-alert-icon svg,
.help-icon svg,
.node-main svg,
.router-identity .metric-icon svg {
  width: 17px;
  height: 17px;
}

.nav-count {
  min-width: 24px;
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 20px;
  color: #dce8ff;
  background: rgba(48, 116, 240, 0.22);
  font-size: 11px;
  text-align: center;
}

.sidebar-bottom {
  display: grid;
  flex: 0 0 auto;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.sync-card,
.user-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
}

.sync-card {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) 28px;
  padding: 13px;
  text-align: left;
}

.sync-card-copy {
  min-width: 0;
}

.sync-card strong,
.sync-card small {
  display: block;
}

.sync-card strong {
  line-height: 1.25;
  font-size: 12px;
}

.sync-card small {
  overflow: hidden;
  margin-top: 3px;
  color: #7f8da1;
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-card > .nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  justify-self: end;
  border-radius: 8px;
  color: #8ea0b7;
  background: rgba(255, 255, 255, .045);
}

.sync-card > .nav-icon svg {
  width: 16px;
  height: 16px;
}

.sync-status {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(233, 167, 47, 0.12);
}

.sync-status.connected {
  background: #3bd092;
  box-shadow: 0 0 0 4px rgba(59, 208, 146, 0.12);
}

.user-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  padding: 11px;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.user-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  color: #dbe8ff;
  background: var(--navy-700);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-card-copy {
  min-width: 0;
}

.user-card strong,
.user-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card strong {
  line-height: 1.25;
  font-size: 11px;
}

.user-card span {
  margin-top: 3px;
  color: #748399;
  font-size: 10px;
  line-height: 1.25;
}

.crm-developer {
  padding: 2px 8px 0;
  text-align: center;
}

.crm-developer span,
.crm-developer strong {
  display: block;
}

.crm-developer span {
  color: #66778e;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.crm-developer strong {
  margin-top: 3px;
  color: #9caec4;
  font-size: 9px;
  font-weight: 600;
}

.sidebar-logout {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(232, 93, 104, .24);
  border-radius: 12px;
  color: #ffb9bf;
  background: rgba(232, 93, 104, .08);
  font-size: 11px;
  font-weight: 700;
  transition: 180ms ease;
}

.sidebar-logout:hover {
  color: #fff;
  border-color: rgba(232, 93, 104, .48);
  background: rgba(232, 93, 104, .2);
}

.sidebar-logout [data-icon] svg {
  width: 16px;
  height: 16px;
}

.main-content {
  min-height: 100vh;
  margin-left: 258px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 34px;
  border-bottom: 1px solid rgba(218, 224, 232, 0.8);
  background: rgba(244, 246, 248, 0.92);
  backdrop-filter: blur(14px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 12px;
}

.topbar-actions {
  gap: 10px;
}

.eyebrow,
.section-kicker,
.hero-label {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.topbar h1 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.035em;
}

.global-search,
.table-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.global-search {
  width: min(350px, 30vw);
  height: 44px;
  padding: 0 11px;
  position: relative;
}

.global-search-results {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  width: min(460px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 130px));
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 38, 62, 0.18);
}

.global-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 14px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.global-search-result:hover,
.global-search-result:focus-visible {
  outline: 0;
  background: #eef6ff;
}

.global-search-result strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.global-search-result small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.global-search-result .status-pill {
  align-self: center;
  grid-row: 1 / span 2;
}

.global-search-empty {
  padding: 13px 11px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.grafana-metrics-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.grafana-metric-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 102px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--grafana-color);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(20, 38, 62, .04);
}

.grafana-metric-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--grafana-color);
  background: color-mix(in srgb, var(--grafana-color) 12%, white);
}

.grafana-metric-icon svg {
  width: 17px;
  height: 17px;
}

.grafana-metric-card small,
.grafana-metric-card strong,
.grafana-metric-card em {
  display: block;
}

.grafana-metric-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.grafana-metric-card strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.1;
}

.grafana-metric-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.grafana-embed-panel {
  min-height: 610px;
  overflow: hidden;
}

.grafana-frame {
  display: block;
  width: 100%;
  min-height: 540px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.grafana-empty-state {
  display: grid;
  min-height: 360px;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.grafana-empty-state > svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
}

.split-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

@media (max-width: 900px) {
  .split-table-grid { grid-template-columns: 1fr; }
}

.grafana-empty-state strong {
  color: var(--ink);
  font-size: 15px;
}

.grafana-empty-state small {
  max-width: 480px;
  line-height: 1.5;
}

/* Centro de supervisión nativo, sin marcos ni credenciales de Grafana. */
.alert-center-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(460px, 1.4fr); gap: 18px; align-items: start; }
.alert-center-panel { min-height: 390px; }
.alert-center-total { padding: 7px 10px; border-radius: 999px; color: #a9424c; background: #ffeaec; font-size: 12px; font-weight: 800; }
.alert-priority-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 14px; }
.alert-priority { display: grid; gap: 2px; padding: 9px; border-radius: 10px; font-size: 11px; color: #6d7789; background: #f5f7fb; }
.alert-priority b { font-size: 18px; color: #24334d; }
.alert-priority.critica { background: #ffeaec; }.alert-priority.alta { background: #fff0e3; }.alert-priority.media { background: #fff9d9; }.alert-priority.baja { background: #eaf1ff; }
.alert-center-list { display: grid; gap: 8px; max-height: 430px; overflow: auto; }
.alert-center-item { width: 100%; display: grid; grid-template-columns: 32px 1fr auto; gap: 9px; align-items: center; padding: 10px; text-align: left; border: 1px solid #e6eaf1; border-left: 4px solid #b9c2d1; border-radius: 10px; background: #fff; cursor: default; }
button.alert-center-item[data-ping-monitor] { cursor: pointer; }.alert-center-item.critica { border-left-color: #e85d68; }.alert-center-item.alta { border-left-color: #f28a34; }.alert-center-item.media { border-left-color: #dfb430; }.alert-center-item.baja { border-left-color: #3074f0; }
.alert-center-item .event-icon { margin: 0; width: 28px; height: 28px; color: #e85d68; background: #ffeaec; }.alert-center-item strong,.alert-center-item small { display: block; }.alert-center-item small { margin-top: 2px; color: #718096; font-size: 11px; }.alert-center-item em { font-style: normal; font-size: 11px; font-weight: 800; color: #62708a; }

#plansView .plan-grid { display: grid; gap: 8px; grid-template-columns: 1fr; }
.plan-list-row { display: grid; grid-template-columns: minmax(190px, 1.3fr) minmax(150px, .9fr) minmax(145px, .8fr) minmax(105px, .65fr) minmax(130px, .8fr) auto minmax(280px, auto); gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid #e4e9f2; border-radius: 12px; background: #fff; }
.plan-list-row:hover { border-color: #bdd1f8; box-shadow: 0 5px 16px rgba(43, 94, 175, .08); }.plan-list-row > div:not(.plan-list-actions) { display: grid; gap: 3px; min-width: 0; }.plan-list-row small { color: #78859a; font-size: 11px; }.plan-list-row strong { color: #233451; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.plan-list-row strong em { color: #78859a; font-size: 11px; font-style: normal; font-weight: 600; }.plan-list-name strong { font-size: 14px; }.plan-list-name .plan-technology { font-size: 10px; }.plan-list-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }.plan-list-actions button { min-height: 30px; padding: 5px 8px; font-size: 11px; }.plan-list-status { justify-items: center; }

@media (max-width: 1320px) { .alert-center-layout { grid-template-columns: 1fr; }.plan-list-row { grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(130px, .7fr)) auto; }.plan-list-row > div:nth-child(5) { display: none; }.plan-list-actions { grid-column: 1 / -1; justify-content: flex-start; } }
@media (max-width: 760px) { .alert-priority-strip { grid-template-columns: repeat(2, 1fr); }.plan-list-row { grid-template-columns: 1fr 1fr; gap: 9px; }.plan-list-name,.plan-list-actions { grid-column: 1 / -1; }.plan-list-status { justify-items: start; } }

.form-field.disabled-field {
  opacity: 0.55;
}

.global-search input,
.table-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.global-search input::placeholder,
.table-search input::placeholder {
  color: #98a4b4;
}

kbd {
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #9aa5b3;
  background: #f6f7f9;
  font-family: inherit;
  font-size: 9px;
  white-space: nowrap;
}

.icon-button,
.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
}

.icon-button {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
}

.topbar .icon-button {
  border: 1px solid var(--line);
  background: #fff;
}

.notification-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--red);
}

.notification-panel {
  position: absolute;
  z-index: 130;
  top: 66px;
  right: 24px;
  width: min(410px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 90px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(20, 38, 62, 0.22);
}

.notification-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 15px 10px;
  border-bottom: 1px solid var(--line);
}

.notification-panel-head strong { font-size: 14px; }
.notification-panel-head small { display: block; margin-top: 2px; color: var(--muted); }

.notification-list { padding: 6px; }
.notification-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border-radius: 10px;
}
.notification-item + .notification-item { margin-top: 2px; }
.notification-item:hover { background: #f5f8fc; }
.notification-item .notification-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #b44952;
  background: #ffebed;
}
.notification-item.warning .notification-icon { color: #a86515; background: #fff1dd; }
.notification-item.info .notification-icon { color: #2468bf; background: #eaf2ff; }
.notification-item.success .notification-icon { color: #168258; background: #e4f6ee; }
.notification-item strong { display: block; font-size: 12px; }
.notification-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.notification-empty { padding: 24px 16px; color: var(--muted); text-align: center; font-size: 13px; }

.primary-button,
.secondary-button {
  min-height: 44px;
  gap: 8px;
  padding: 0 17px;
  border-radius: 11px;
  font-weight: 600;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 9px 20px rgba(48, 116, 240, 0.2);
}

.primary-button:hover {
  background: var(--blue-dark);
}

.secondary-button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #fff;
}

.text-button {
  gap: 6px;
  padding: 6px 0;
  color: var(--blue);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
}

.text-button svg {
  width: 15px;
}

.mobile-menu {
  display: none;
}

.view {
  display: none;
  padding: 28px 34px 50px;
}

.view.active {
  display: block;
  animation: view-in 240ms ease;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.hero-panel {
  position: relative;
  display: flex;
  min-height: 240px;
  align-items: center;
  overflow: hidden;
  padding: 38px 42px;
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(11, 20, 35, 0.98) 0%, rgba(18, 41, 70, 0.96) 55%, rgba(22, 62, 97, 0.9) 100%);
  box-shadow: var(--shadow);
}

.hero-panel::before {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  mask-image: linear-gradient(90deg, transparent, black);
}

.hero-panel > div:first-child {
  position: relative;
  z-index: 2;
  width: 62%;
}

.hero-label {
  color: var(--cyan);
}

.hero-panel h2 {
  margin: 10px 0 12px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(29px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-panel p {
  max-width: 590px;
  margin: 0;
  color: #a9b7c9;
  font-size: 14px;
  line-height: 1.7;
}

.hero-visual {
  position: absolute;
  top: 50%;
  right: 7%;
  width: 250px;
  height: 250px;
  transform: translateY(-50%);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(53, 200, 232, 0.2);
  border-radius: 50%;
}

.orbit-one {
  inset: 32px;
}

.orbit-two {
  inset: 70px;
  border-color: rgba(48, 116, 240, 0.35);
}

.signal-node {
  position: absolute;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 22px var(--cyan);
}

.node-main {
  top: 50%;
  left: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.node-main svg {
  width: 18px;
  height: 18px;
}

.node-one { top: 38px; left: 80px; }
.node-two { top: 98px; right: 22px; }
.node-three { bottom: 38px; left: 54px; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: 21px;
  border: 1px solid rgba(224, 229, 235, 0.8);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 35px rgba(26, 45, 70, 0.04);
}

.metric-card::after {
  display: none;
  content: none;
}

.metric-card > * {
  position: relative;
  z-index: 1;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--metric-color);
  background: var(--metric-soft);
}

.metric-trend {
  max-width: 60%;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-align: right;
}

.metric-value {
  display: block;
  margin-top: 18px;
  font-family: "Manrope", sans-serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-label {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dashboard-vital-grid {
  display: grid;
  grid-template-columns: 1.05fr .9fr 1.15fr;
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-vital-grid .panel {
  min-width: 0;
}

.dashboard-vital-grid .panel-header {
  margin-bottom: 15px;
}

.dashboard-vital-grid .panel-header h3 {
  font-size: 15px;
}

.vital-highlight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vital-highlight span {
  padding: 12px;
  border-radius: 11px;
  background: #f7f8fa;
}

.vital-highlight span:first-child {
  color: #9a5a00;
  background: #fff4df;
}

.vital-highlight span:last-child {
  color: #b72c3b;
  background: #fff0f2;
}

.vital-highlight small,
.vital-highlight strong,
.customer-vital-footer small,
.customer-vital-footer strong {
  display: block;
}

.vital-highlight small,
.customer-vital-footer small {
  font-size: 8px;
}

.vital-highlight strong {
  margin-top: 4px;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
}

.dashboard-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 8px;
}

.dashboard-progress-head strong {
  color: var(--ink);
}

.dashboard-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 8px;
  background: #e9edf2;
}

.dashboard-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22a06b, #35c8e8);
}

.vital-alert-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 10px;
  border-radius: 10px;
  background: #f4f7f9;
}

.vital-alert-row.danger {
  color: #a62d3b;
  background: #fff0f2;
}

.vital-alert-row.ok {
  color: #168258;
  background: #e4f6ee;
}

.vital-alert-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .75);
}

.vital-alert-row strong,
.vital-alert-row small {
  display: block;
}

.vital-alert-row strong {
  font-size: 9px;
}

.vital-alert-row small {
  margin-top: 3px;
  opacity: .75;
  font-size: 7px;
}

.customer-health-list {
  display: grid;
  gap: 8px;
}

.customer-health-list > div {
  display: grid;
  grid-template-columns: 9px 1fr;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f5f7f9;
}

.health-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--health-color);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--health-color) 14%, transparent);
}

.customer-health-list strong,
.customer-health-list small {
  display: inline;
}

.customer-health-list strong {
  margin-right: 5px;
  font-size: 13px;
}

.customer-health-list small {
  color: var(--muted);
  font-size: 8px;
}

.customer-vital-footer {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: 8px;
  margin-top: 12px;
}

.customer-vital-footer span {
  padding: 9px;
  border: 1px solid #dce8fa;
  border-radius: 9px;
  background: #f7faff;
}

.customer-vital-footer strong {
  margin-top: 4px;
  color: #245fae;
  font-size: 10px;
}

.dashboard-ticket-row {
  display: grid;
  width: 100%;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  text-align: left;
  border: 0;
  border-top: 1px solid #edf0f3;
  background: transparent;
  cursor: pointer;
}

.dashboard-ticket-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.dashboard-ticket-row:hover strong {
  color: var(--blue);
}

.dashboard-ticket-row strong,
.dashboard-ticket-row small {
  display: block;
}

.dashboard-ticket-row strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-ticket-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.ticket-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca7b5;
}

.priority-urgente {
  background: #e85d68;
  box-shadow: 0 0 0 4px #ffeaec;
}

.priority-alta {
  background: #f28a34;
  box-shadow: 0 0 0 4px #fff0e3;
}

.priority-media {
  background: #3074f0;
  box-shadow: 0 0 0 4px #eaf1ff;
}

.priority-baja {
  background: #22a06b;
  box-shadow: 0 0 0 4px #e4f6ee;
}

.dashboard-ticket-age {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.dashboard-section-label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 4px 0 12px;
}

.dashboard-section-label span {
  color: #6d7b8d;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.dashboard-section-label p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(310px, 0.8fr);
  gap: 18px;
}

.dashboard-server-panel {
  margin-top: 18px;
  padding: 16px 18px;
}

.dashboard-server-panel .panel-header {
  margin-bottom: 12px;
}

.server-metrics-grid {
  display: grid;
  gap: 9px;
}

.server-metrics-headline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.server-metrics-headline span {
  padding: 7px 9px;
  border-radius: 9px;
  background: #f4f7fa;
}

.server-metrics-headline small,
.server-metrics-headline strong {
  display: block;
}

.server-metrics-headline small {
  color: var(--muted);
  font-size: 8px;
}

.server-metrics-headline strong {
  overflow: hidden;
  margin-top: 2px;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-metrics-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.server-metric-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #e3e9f0;
  border-radius: 11px;
  background: #fbfcfd;
}

.server-metric-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  color: var(--server-color);
  background: color-mix(in srgb, var(--server-color) 12%, white);
}

.server-metric-row strong,
.server-metric-row small {
  display: block;
}

.server-metric-row strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-metric-row small {
  overflow: hidden;
  margin-top: 2px;
  color: #607086;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-percent {
  display: grid;
  position: relative;
  height: 15px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf4;
}

.server-percent i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #35c8e8, #3074f0);
}

.server-percent.cpu i {
  background: linear-gradient(90deg, #f7b24c, #f28a34);
}

.server-percent.disk i {
  background: linear-gradient(90deg, #ff7a88, #e85d68);
}

.server-percent strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #1c2b3d;
  font-size: 8px;
}

.server-metrics-error {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  color: #a42d3b;
  background: #fff0f2;
}

.panel,
.table-card {
  border: 1px solid rgba(224, 229, 235, 0.85);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(26, 45, 70, 0.045);
}

.panel {
  padding: 22px;
}

.panel-header,
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.panel-header {
  margin-bottom: 20px;
}

.panel-header h3,
.section-toolbar h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.035em;
}

.panel-header h3 {
  font-size: 17px;
}

.order-list,
.technician-list,
.timeline {
  display: grid;
}

.session-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid #edf0f3;
}

.session-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #1f5fc2;
  background: #eaf1ff;
  font-size: 9px;
  font-weight: 800;
}

.session-time {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.session-time strong {
  color: #168258;
  font-size: 8px;
}

.session-time small {
  max-width: 110px;
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-row {
  display: grid;
  grid-template-columns: 50px minmax(170px, 1.2fr) minmax(120px, .8fr) 105px 32px;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #edf0f3;
}

.order-row:first-child {
  border-top: 0;
}

.type-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--type-color);
  background: var(--type-soft);
}

.row-primary,
.row-secondary {
  display: block;
}

.row-primary {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-secondary {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 20px;
  color: var(--status-color);
  background: var(--status-soft);
  font-size: 10px;
  font-weight: 700;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.mini-avatar {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--avatar-color, var(--blue));
  font-size: 9px;
  font-weight: 700;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 10px;
  font-weight: 600;
}

.live-indicator i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(34, 160, 107, 0.1);
}

.technician-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-top: 1px solid #edf0f3;
}

.technician-row:first-child {
  border-top: 0;
}

.technician-avatar {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--avatar-color);
  font-size: 11px;
  font-weight: 700;
}

.technician-avatar::after {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--availability-color);
  content: "";
}

.workload {
  width: 55px;
  height: 5px;
  overflow: hidden;
  border-radius: 10px;
  background: #edf1f5;
}

.workload span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.dashboard-payment-list {
  display: grid;
}

.dashboard-payment-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #edf0f3;
}

.dashboard-payment-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.dashboard-payment-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #168258;
  background: #e5f7ef;
}

.dashboard-payment-icon svg {
  width: 15px;
  height: 15px;
}

.dashboard-payment-customer,
.dashboard-payment-meta {
  min-width: 0;
}

.dashboard-payment-customer strong,
.dashboard-payment-customer small,
.dashboard-payment-meta strong,
.dashboard-payment-meta small {
  display: block;
}

.dashboard-payment-customer strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-payment-customer small,
.dashboard-payment-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.dashboard-payment-meta {
  text-align: right;
}

.dashboard-payment-meta strong {
  color: #168258;
  font-size: 10px;
}

.inventory-alert {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #edf0f3;
}

.inventory-alert:first-child {
  border-top: 0;
}

.alert-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: var(--orange);
  background: #fff3e7;
}

.stock-number {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 800;
}

.stock-number small {
  display: block;
  color: var(--muted);
  font-family: "DM Sans", sans-serif;
  font-size: 9px;
  font-weight: 500;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 11px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 17px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  position: absolute;
  top: 11px;
  bottom: 0;
  left: 5px;
  width: 1px;
  background: #e4e9ee;
  content: "";
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 3px solid #dce8ff;
  border-radius: 50%;
  background: var(--blue);
}

.timeline-item p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.timeline-item time {
  display: block;
  margin-top: 3px;
  color: #98a4b4;
  font-size: 9px;
}

.section-toolbar {
  margin-bottom: 22px;
}

.section-toolbar h2 {
  font-size: 27px;
}

.section-toolbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.table-search {
  width: min(380px, 100%);
  height: 44px;
  padding: 0 13px;
}

.filter-bar select,
.form-field select,
.form-field input,
.form-field textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  color: var(--ink);
  background: #fff;
}

.filter-bar select {
  padding: 0 34px 0 13px;
}

.table-card {
  overflow: hidden;
}

.data-table {
  width: 100%;
  overflow-x: auto;
}

.table-row {
  display: grid;
  min-width: 850px;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  border-top: 1px solid #edf0f3;
}

.table-row.header {
  min-height: 47px;
  border-top: 0;
  color: #8793a3;
  background: #fafbfc;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-row:not(.header):hover {
  background: #fbfcfe;
}

.orders-table-row {
  grid-template-columns: 90px 1.4fr .7fr .9fr .7fr .7fr 112px;
}

.order-row-actions {
  justify-content: flex-end;
}

.installations-table-row {
  grid-template-columns: 90px 1.25fr .9fr 1fr .75fr .7fr 78px;
}

.inventory-table-row {
  grid-template-columns: 1.1fr 1.2fr 1fr .8fr .9fr .8fr 108px;
}

.assignment-table-row {
  grid-template-columns: 1fr 1fr .8fr .7fr 78px;
  min-width: 720px;
}

.inventory-row-actions,
.assignment-row-actions {
  justify-content: flex-end;
}

.cell-main {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.customer-name-link {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.customer-name-link:hover,
.customer-name-link:focus-visible {
  color: var(--blue);
  text-decoration: underline;
  outline: none;
}

.customer-service-ip-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.cell-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.row-action {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: #f3f5f7;
  text-decoration: none;
  transition: 160ms ease;
}

.row-action:hover {
  color: var(--blue);
  background: #eaf1ff;
  transform: translateY(-1px);
}

.row-action.completed-action {
  cursor: default;
  color: var(--green);
}

.row-action.completed-action:hover {
  background: #e4f6ee;
  transform: none;
}

.row-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.empty-state {
  padding: 45px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.inventory-summary,
.crm-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.summary-card-action {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.summary-card-action:hover,
.summary-card-action:focus-visible {
  border-color: #a9c4f7;
  box-shadow: 0 9px 24px rgba(35, 80, 155, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.summary-card-action .summary-card-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  margin-left: auto;
  place-items: center;
  border-radius: 9px;
  color: #2462c5;
  background: #edf3ff;
}

.summary-card-action .summary-card-arrow svg {
  width: 14px;
  height: 14px;
}

.summary-card .metric-icon {
  flex: 0 0 auto;
}

.summary-card strong,
.summary-card span {
  display: block;
}

.summary-card strong {
  font-family: "Manrope", sans-serif;
  font-size: 21px;
}

.summary-card span {
  color: var(--muted);
  font-size: 10px;
}

.stock-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stock-policy-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.stock-policy-card.stock-policy-alert {
  border-color: #f4b8bf;
  box-shadow: inset 3px 0 #e85d68;
}

.stock-policy-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 11px;
}

.stock-policy-head strong,
.stock-policy-head small {
  display: block;
}

.stock-policy-head strong {
  font-size: 11px;
}

.stock-policy-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.stock-policy-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 14px;
}

.stock-policy-stats span {
  padding: 9px 7px;
  border-radius: 9px;
  background: #f6f8fa;
  text-align: center;
}

.stock-policy-stats strong,
.stock-policy-stats small {
  display: block;
}

.stock-policy-stats strong {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.stock-policy-stats small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
}

.stock-policy-card > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.crm-pipeline-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
}

.crm-pipeline {
  display: grid;
  min-width: 1320px;
  grid-template-columns: repeat(5, minmax(250px, 1fr));
  align-items: start;
  gap: 14px;
}

.crm-stage {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f6f8fb;
}

.crm-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 3px 11px;
}

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

.crm-stage-head strong {
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 11px;
}

.crm-stage-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.crm-stage-head b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: #eaf1ff;
  font-size: 10px;
}

.crm-stage-list {
  display: grid;
  gap: 10px;
}

.crm-stage-empty {
  margin: 0;
  padding: 25px 8px;
  color: var(--muted);
  text-align: center;
  font-size: 9px;
}

.crm-card {
  padding: 14px;
  border: 1px solid #e3e8ee;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(26, 45, 70, .04);
}

.crm-card.follow-up-overdue,
.crm-agenda-row.follow-up-overdue {
  border-color: #f4b8bf;
  box-shadow: inset 3px 0 #e85d68;
}

.crm-card.follow-up-today,
.crm-agenda-row.follow-up-today {
  border-color: #f3d39e;
  box-shadow: inset 3px 0 #f28a34;
}

.crm-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.crm-card-head strong,
.crm-card-head small {
  display: block;
}

.crm-card-head strong {
  color: var(--ink);
  font-size: 11px;
}

.crm-card-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.crm-card-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.crm-card-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #55657a;
  font-size: 8px;
}

.crm-card-meta svg,
.crm-follow-up svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.crm-card-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 13px;
}

.crm-card-value strong {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.crm-card-value span {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
}

.crm-progress {
  height: 5px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 10px;
  background: #edf1f5;
}

.crm-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.crm-follow-up {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.follow-up-overdue .crm-follow-up {
  color: #b72c3b;
  font-weight: 700;
}

.crm-card-actions {
  display: flex;
  margin-top: 12px;
}

.crm-card-actions button {
  width: 100%;
  min-height: 34px;
  justify-content: center;
  font-size: 9px;
}

.crm-card-actions button:disabled {
  cursor: default;
  opacity: .7;
}

.crm-agenda-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.crm-agenda-list {
  display: grid;
  gap: 8px;
}

.crm-agenda-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.crm-agenda-row strong,
.crm-agenda-row small {
  display: block;
}

.crm-agenda-row strong {
  font-size: 9px;
}

.crm-agenda-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.technician-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.technician-card {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(26, 45, 70, 0.04);
}

.technician-card-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.technician-card-head > div:last-child {
  min-width: 0;
  flex: 1;
}

.technician-card-actions {
  display: flex;
  gap: 7px;
  margin-top: 16px;
}

.technician-card-actions button {
  flex: 1;
  min-height: 36px;
  font-size: 10px;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #ffd2d7;
  border-radius: 10px;
  color: #b72c3b;
  background: #fff5f6;
  font-weight: 600;
}

.availability-label {
  display: inline-flex;
  margin-top: 4px;
  color: var(--availability-color);
  font-size: 10px;
  font-weight: 600;
}

.technician-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.technician-stat {
  padding: 10px 8px;
  border-radius: 11px;
  background: #f7f8fa;
  text-align: center;
}

.technician-stat strong,
.technician-stat span {
  display: block;
}

.technician-stat strong {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
}

.technician-stat span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 10px;
  background: #edf1f5;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.assignment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .6fr);
  gap: 18px;
}

.lifecycle-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.lifecycle-strip span {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.lifecycle-strip i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: #eaf1ff;
  font-style: normal;
}

.lifecycle-strip b {
  color: #bec7d2;
}

.lifecycle-strip b svg,
.lifecycle-strip i svg {
  width: 15px;
  height: 15px;
}

.log-layout {
  display: grid;
  grid-template-columns: minmax(280px, .65fr) minmax(0, 1.35fr);
  gap: 18px;
}

.equipment-index-panel,
.equipment-detail-panel {
  min-height: 550px;
}

.record-count {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: #eaf1ff;
  font-size: 11px;
  font-weight: 700;
}

.equipment-log-index {
  display: grid;
  gap: 8px;
}

.equipment-log-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  background: #f7f8fa;
  text-align: left;
}

.equipment-log-item:hover,
.equipment-log-item.active {
  border-color: #cddcff;
  background: #f1f5ff;
}

.equipment-log-item .type-icon {
  width: 34px;
  height: 34px;
}

.equipment-log-item .status-badge {
  padding: 5px 7px;
  font-size: 8px;
}

.equipment-identity {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.equipment-identity-main {
  display: flex;
  gap: 14px;
}

.equipment-identity .type-icon {
  width: 36px;
  height: 36px;
}

.equipment-identity h3 {
  margin: 1px 0 5px;
  font-family: "Manrope", sans-serif;
  font-size: 19px;
}

.equipment-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.equipment-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 22px;
}

.equipment-meta {
  padding: 11px;
  border-radius: 11px;
  background: #f7f8fa;
}

.equipment-meta span,
.equipment-meta strong {
  display: block;
}

.equipment-meta span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.equipment-meta strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-title {
  margin: 0 0 16px;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
}

.equipment-event-list {
  display: grid;
}

.equipment-event {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 20px;
}

.equipment-event::before {
  position: absolute;
  top: 34px;
  bottom: 0;
  left: 16px;
  width: 1px;
  background: #dfe5eb;
  content: "";
}

.equipment-event:last-child::before {
  display: none;
}

.event-icon {
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--event-soft);
  border-radius: 10px;
  color: var(--event-color);
  background: var(--event-soft);
}

.event-icon svg {
  width: 15px;
  height: 15px;
}

.event-card {
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.event-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.event-card h4 {
  margin: 0;
  font-size: 11px;
}

.event-card time {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.event-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.event-tags span {
  padding: 4px 7px;
  border-radius: 6px;
  color: #637187;
  background: #f3f5f7;
  font-size: 8px;
}

.detail-empty {
  display: grid;
  height: 100%;
  min-height: 450px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.detail-empty .help-icon {
  margin: 0 auto 14px;
  color: var(--blue);
  background: #eaf1ff;
}

.detail-empty h3 {
  margin: 0 0 5px;
  color: var(--ink);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr);
  gap: 18px;
}

.admin-secondary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.admin-data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 18px;
  margin-top: 18px;
}

.admin-update-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}

.migration-history-panel {
  margin-top: 18px;
}

.system-update-panel {
  min-width: 0;
  margin-top: 0;
}

.system-update-progress {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d9d3fb;
  border-radius: 12px;
  background: #faf9ff;
}

.system-update-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #41336f;
  font-size: 12px;
  font-weight: 700;
}

.system-update-progress-track {
  height: 8px;
  margin: 9px 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e2fa;
}

.system-update-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6954d6, #9a82ff);
  transition: width .35s ease;
}

.system-update-progress small {
  color: #6b6680;
  font-size: 11px;
}

/* Compact control panel: keep administration scannable without oversized cards. */
#controlPanelView .panel {
  padding: 15px;
  border-radius: 13px;
}

#controlPanelView .admin-metrics {
  gap: 10px;
  margin-bottom: 12px;
}

#controlPanelView .admin-metrics .metric-card {
  padding: 14px;
  border-radius: 13px;
}

#controlPanelView .admin-metrics .metric-icon {
  width: 31px;
  height: 31px;
}

#controlPanelView .admin-layout,
#controlPanelView .admin-data-grid,
#controlPanelView .admin-secondary-grid {
  gap: 12px;
}

#controlPanelView .admin-data-grid,
#controlPanelView .admin-secondary-grid,
#controlPanelView .migration-history-panel {
  margin-top: 12px;
}

#controlPanelView .panel-header {
  margin-bottom: 12px;
}

#controlPanelView .panel-header h3,
#controlPanelView .integration-title h3 {
  font-size: 13px;
}

#controlPanelView .integration-head {
  gap: 9px;
}

#controlPanelView .integration-title {
  gap: 9px;
}

#controlPanelView .integration-title .help-icon {
  width: 30px;
  height: 30px;
}

#controlPanelView .integration-title p {
  font-size: 8px;
  line-height: 1.35;
}

#controlPanelView .integration-status {
  padding: 5px 7px;
  font-size: 8px;
}

#controlPanelView .integration-grid {
  gap: 6px;
  margin: 10px 0;
}

#controlPanelView .update-version-grid {
  gap: 6px;
  margin: 10px 0 8px;
}

#controlPanelView .update-version-grid > span {
  padding: 8px;
  border-radius: 8px;
}

#controlPanelView .update-message {
  padding: 8px 9px;
  border-radius: 8px;
  font-size: 8px;
}

#controlPanelView .mobile-update-form {
  gap: 9px;
  margin-top: 10px;
}

#controlPanelView .mobile-update-form .form-field {
  gap: 5px;
}

#controlPanelView .mobile-update-form input,
#controlPanelView .mobile-update-form textarea {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 9px;
}

#controlPanelView .mobile-update-form textarea {
  min-height: 54px;
}

#controlPanelView .mobile-update-form label,
#controlPanelView .mobile-update-form .form-hint {
  font-size: 8px;
}

#controlPanelView .isp-logo-preview {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

#controlPanelView .isp-profile-head h3 {
  font-size: 16px;
}

#controlPanelView .isp-contact-list {
  gap: 7px;
  margin: 14px 0;
}

#controlPanelView .isp-contact-item {
  font-size: 9px;
}

#controlPanelView .admin-user-row {
  grid-template-columns: 34px minmax(140px, 1.2fr) minmax(100px, .8fr) minmax(100px, .8fr) auto;
  gap: 9px;
  padding: 9px 0;
}

#controlPanelView .admin-tool-list,
#controlPanelView .department-grid,
#controlPanelView .role-list {
  gap: 7px;
  margin-top: 10px;
}

#controlPanelView .admin-tool-button,
#controlPanelView .department-card,
#controlPanelView .role-card {
  padding: 9px;
  border-radius: 9px;
}

#controlPanelView .migration-history-row {
  padding: 8px 0;
}

.app-watermark {
  position: fixed;
  z-index: 11;
  right: 0;
  bottom: 9px;
  left: 258px;
  pointer-events: none;
  color: rgba(86, 105, 130, .42);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}

@media (max-width: 1500px) {
  .grafana-metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-update-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-update-grid > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .grafana-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grafana-embed-panel {
    min-height: 470px;
  }

  .grafana-frame {
    min-height: 420px;
  }

  .admin-update-grid {
    grid-template-columns: 1fr;
  }

  .admin-update-grid > :first-child {
    grid-column: auto;
  }
}

.update-version-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 17px 0 12px;
}

.update-version-grid > span {
  padding: 12px;
  border-radius: 11px;
  background: #f4f7fa;
}

.update-version-grid small,
.update-version-grid strong {
  display: block;
}

.update-version-grid small {
  color: var(--muted);
  font-size: 8px;
}

.update-version-grid strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 11px;
}

.update-message {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #dce5f3;
  border-radius: 11px;
  color: #40516a;
  background: #f7faff;
  font-size: 9px;
}

.update-message svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--blue);
}

.update-notes {
  display: grid;
  gap: 5px;
  margin: 12px 0 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

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

.database-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 17px;
}

.database-status-list > span {
  padding: 10px;
  border-radius: 10px;
  background: #f4f7fa;
}

.database-status-list strong,
.database-status-list small {
  display: block;
}

.database-status-list strong {
  color: var(--muted);
  font-size: 8px;
}

.database-status-list small {
  margin-top: 3px;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
}

.admin-tool-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.admin-tool-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 2px 9px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  transition: 160ms ease;
}

.admin-tool-button:hover {
  border-color: #b9cdf0;
  background: #f7faff;
  transform: translateY(-1px);
}

.admin-tool-button > span {
  display: grid;
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: #eaf1ff;
}

.admin-tool-button > span svg {
  width: 14px;
  height: 14px;
}

.admin-tool-button strong {
  font-size: 9px;
}

.admin-tool-button small {
  color: var(--muted);
  font-size: 7px;
  line-height: 1.4;
}

.migration-history-list {
  display: grid;
}

.migration-history-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 0;
  border-top: 1px solid #edf0f3;
}

.migration-history-row:first-child {
  border-top: 0;
}

.migration-history-row strong,
.migration-history-row small {
  display: block;
}

.migration-history-row strong {
  font-size: 10px;
}

.migration-history-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.migration-preview {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fafc;
}

.migration-preview .empty-state {
  padding: 25px 15px;
}

.migration-preview-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.migration-preview-head > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: var(--blue);
  background: #eaf1ff;
}

.migration-preview-head strong,
.migration-preview-head small {
  display: block;
}

.migration-preview-head strong {
  font-size: 10px;
}

.migration-preview-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.migration-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  padding: 12px;
}

.migration-preview-grid span {
  display: grid;
  min-width: 0;
  padding: 9px 6px;
  place-items: center;
  border-radius: 9px;
  background: #fff;
  text-align: center;
}

.migration-preview-grid svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
}

.migration-preview-grid strong,
.migration-preview-grid small {
  display: block;
}

.migration-preview-grid strong {
  margin-top: 4px;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.migration-preview-grid small {
  color: var(--muted);
  font-size: 7px;
}

.migration-sql-summary {
  display: grid;
  gap: 4px;
  padding: 11px 13px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.migration-sql-summary strong {
  font-size: 9px;
}

.migration-sql-summary small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.migration-source {
  color: #2463c7 !important;
  font-weight: 700;
}

.migration-table-list {
  display: grid;
  gap: 6px;
  margin: 4px 0;
}

.migration-table-list > span {
  position: relative;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 74px 8px 9px;
  border: 1px solid #e4eaf1;
  border-radius: 9px;
  background: #f8fafc;
}

.migration-table-list > span > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.migration-confidence {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 3px 6px;
  border-radius: 999px;
  background: #edf1f6;
  color: #667486;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  transform: translateY(-50%);
}

.migration-confidence.high {
  color: #168258;
  background: #e4f6ee;
}

.migration-confidence.medium {
  color: #2463c7;
  background: #eaf1ff;
}

.migration-confidence.low {
  color: #9a610b;
  background: #fff3dc;
}

.migration-warning-list {
  display: grid;
  gap: 6px;
  padding: 11px 13px;
  border-top: 1px solid #f1d5a6;
  color: #795018;
  background: #fff8ea;
}

.migration-warning-list > strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
}

.migration-warning-list svg {
  width: 14px;
  height: 14px;
}

.migration-warning-list small {
  position: relative;
  padding-left: 10px;
  font-size: 8px;
  line-height: 1.45;
}

.migration-warning-list small::before {
  position: absolute;
  top: 5px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #d28a1c;
  content: "";
}

.migration-loading {
  padding: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
}

.migration-error,
.integrity-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
}

.migration-error {
  color: #b72c3b;
  background: #ffeaec;
}

.migration-error svg,
.integrity-summary > span svg {
  width: 18px;
  height: 18px;
}

.migration-error strong,
.migration-error small,
.integrity-summary strong,
.integrity-summary small {
  display: block;
}

.migration-error small,
.integrity-summary small {
  margin-top: 3px;
  font-size: 8px;
}

.integrity-summary {
  border-radius: 12px;
}

.integrity-summary.has-warnings {
  color: #7e4510;
  background: #fff0e3;
}

.integrity-summary.is-healthy {
  color: #126846;
  background: #e4f6ee;
}

.integrity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.integrity-grid article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 2px 8px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.integrity-grid article > span {
  display: grid;
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: #eaf1ff;
}

.integrity-grid article svg {
  width: 14px;
  height: 14px;
}

.integrity-grid strong {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.integrity-grid small {
  color: var(--muted);
  font-size: 7px;
}

.isp-profile-card {
  position: relative;
  overflow: hidden;
  color: #fff;
  border: 0;
  background: linear-gradient(145deg, var(--navy-950), #173b62);
}

.isp-profile-card::after {
  position: absolute;
  top: -70px;
  right: -60px;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(53, 200, 232, .18);
  border-radius: 50%;
  content: "";
}

.isp-profile-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 15px;
}

.isp-logo-preview {
  display: grid;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-family: "Manrope", sans-serif;
  font-size: 25px;
  font-weight: 800;
}

.isp-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.isp-profile-head h3 {
  margin: 0 0 4px;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
}

.isp-profile-head p {
  margin: 0;
  color: #91a5bc;
  font-size: 10px;
}

.isp-contact-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 24px 0;
}

.isp-contact-item {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #c6d3e0;
  font-size: 10px;
}

.isp-contact-item [data-icon],
.isp-contact-item > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--cyan);
}

.isp-profile-card .secondary-button > svg,
.smtp-panel .integration-actions button > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.smtp-panel .integration-title .help-icon > svg {
  width: 16px;
  height: 16px;
}

.isp-profile-card .secondary-button {
  position: relative;
  z-index: 1;
  width: 100%;
  color: #fff;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
}

.admin-user-list {
  display: grid;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 42px minmax(140px, 1.2fr) minmax(110px, .8fr) minmax(110px, .8fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid #edf0f3;
}

.admin-user-row:first-child {
  border-top: 0;
}

.user-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.user-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.user-status.inactive {
  color: #9ca7b5;
}

.department-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.department-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.department-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.department-card h4 {
  margin: 0;
  font-size: 11px;
}

.department-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.department-count {
  display: grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 8px;
  color: var(--blue);
  background: #eaf1ff;
  font-size: 9px;
  font-weight: 700;
}

.role-list {
  display: grid;
  gap: 10px;
}

.role-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.license-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 18px;
  align-items: start;
}

.license-status-panel,
.license-change-panel {
  min-height: 100%;
}

.license-state-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
}

.license-state-head h3,
.license-state-head p {
  margin: 0;
}

.license-state-head h3 {
  margin-top: 3px;
  font-family: "Manrope", sans-serif;
  font-size: 21px;
}

.license-state-head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.license-status-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: #6d7b8d;
  background: #eef1f5;
}

.license-status-icon svg {
  width: 23px;
  height: 23px;
}

.license-status-icon.active {
  color: #168258;
  background: #e4f6ee;
}

.license-status-icon.grace,
.license-status-icon.suspended {
  color: #b56c08;
  background: #fff3dc;
}

.license-status-icon.inactive {
  color: #c43f4f;
  background: #ffeaec;
}

.license-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.license-detail-grid > span {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.license-detail-grid small,
.license-detail-grid strong,
.license-detail-grid em {
  display: block;
}

.license-detail-grid small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.license-detail-grid strong {
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.license-detail-grid code {
  font-size: 9px;
}

.license-detail-grid em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}

.license-form {
  display: grid;
  gap: 10px;
}

.license-form label {
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.license-form input {
  width: 100%;
  min-height: 45px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font: 700 11px/1 monospace;
  text-transform: uppercase;
}

.license-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(48, 116, 240, .12);
}

.license-form p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.license-form .primary-button {
  width: 100%;
  justify-content: center;
  margin-top: 3px;
}

.license-action-message,
.license-inline-warning {
  margin-top: 13px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #168258;
  background: #e4f6ee;
  font-size: 9px;
  font-weight: 700;
}

.license-action-message.error,
.license-inline-warning {
  color: #b2404e;
  background: #ffeaec;
}

.license-inline-warning {
  display: flex;
  align-items: center;
  gap: 8px;
}

.license-inline-warning svg {
  width: 15px;
  height: 15px;
}

.license-policy-panel {
  margin-top: 18px;
}

.license-policy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.license-policy-grid > span {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.license-policy-grid strong,
.license-policy-grid small {
  display: block;
}

.license-policy-grid strong {
  color: var(--ink);
  font-size: 10px;
}

.license-policy-grid small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.license-loading {
  display: flex;
  min-height: 190px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.license-loading strong,
.license-loading small {
  display: block;
}

.license-loading small {
  margin-top: 3px;
}

.license-status-mark {
  width: 12px;
  height: 12px;
  border: 2px solid #cbd5e1;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: license-spin .8s linear infinite;
}

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

@media (max-width: 980px) {
  .license-layout {
    grid-template-columns: 1fr;
  }

  .license-policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .license-state-head {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .license-state-head .integration-status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .license-detail-grid,
  .license-policy-grid {
    grid-template-columns: 1fr;
  }
}

.role-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.role-level {
  padding: 4px 7px;
  border-radius: 7px;
  color: var(--blue);
  background: #eaf1ff;
  font-size: 8px;
  font-weight: 700;
}

.policy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.policy-tags span {
  padding: 4px 7px;
  border-radius: 6px;
  color: #66758a;
  background: #f3f5f7;
  font-size: 8px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.policy-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 10px;
}

.policy-check input {
  width: 15px;
  height: 15px;
}

.xtream-panel {
  grid-column: 1 / -1;
}

.xtream-icon {
  color: #7050c8 !important;
  background: #f0ebff !important;
}

.xtream-health-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr .6fr 1fr;
  gap: 9px;
  margin: 17px 0 10px;
}

.xtream-health-grid > span {
  min-width: 0;
  padding: 11px;
  border-radius: 11px;
  background: #f5f7fa;
}

.xtream-health-grid small,
.xtream-health-grid strong {
  display: block;
}

.xtream-health-grid small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.xtream-health-grid strong {
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xtream-policy-grid {
  margin-top: 9px;
}

.xtream-diagnostic {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 11px;
}

.xtream-diagnostic svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.xtream-diagnostic strong,
.xtream-diagnostic small {
  display: block;
}

.xtream-diagnostic strong {
  font-size: 9px;
}

.xtream-diagnostic small {
  margin-top: 2px;
  font-size: 8px;
  line-height: 1.4;
}

.xtream-diagnostic.success {
  color: #116847;
  border-color: #cce8da;
  background: #f1faf6;
}

.xtream-diagnostic.error {
  color: #a2323f;
  border-color: #f0cbd0;
  background: #fff5f6;
}

.xtream-panel .integration-actions button > svg,
.xtream-panel .integration-title .help-icon > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.xtream-checkbox-grid {
  grid-template-columns: 1fr;
}

.integration-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.integration-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.integration-title .help-icon {
  width: 34px;
  height: 34px;
  color: #8b5cf6;
  background: #f0ebff;
}

.integration-title h3,
.integration-title p {
  margin: 0;
}

.integration-title h3 {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.integration-title p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.integration-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 20px;
  color: var(--status-color);
  background: var(--status-soft);
  font-size: 9px;
  font-weight: 700;
}

.integration-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin: 17px 0;
}

.integration-grid .equipment-meta {
  min-width: 0;
}

.integration-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.service-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(26, 45, 70, .04);
}

.service-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-900), #1a426b);
}

.service-card-head h3 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.service-card-head p {
  margin: 4px 0 0;
  color: #9fb0c4;
  font-size: 9px;
}

.service-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64dfa9;
  font-size: 9px;
  font-weight: 700;
}

.service-active::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.service-active.inactive {
  color: #f5b15d;
}

.service-card-body {
  padding: 17px 20px 20px;
}

.network-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.network-detail {
  padding: 10px;
  border-radius: 10px;
  background: #f6f8fa;
}

.network-detail span,
.network-detail strong {
  display: block;
}

.network-detail span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.network-detail strong {
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-section-title {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.installed-equipment {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.installed-equipment span {
  padding: 5px 8px;
  border-radius: 7px;
  color: #54647a;
  background: #edf2f7;
  font-size: 8px;
}

.iptv-account-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 11px;
  border: 1px solid #d9e5ff;
  border-radius: 11px;
  background: #f5f8ff;
}

.iptv-account-box span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.iptv-account-box strong {
  display: block;
  margin-top: 3px;
  font-size: 10px;
}

.iptv-account-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.iptv-account-actions button > svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.activation-note {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 10px;
  color: #6b5a1c;
  background: #fff8db;
  font-size: 9px;
  line-height: 1.45;
}

.payment-customer-results,
.payment-selected-customer {
  grid-column: 1 / -1;
}

.payment-customer-results {
  display: grid;
  max-height: 235px;
  overflow-y: auto;
  gap: 7px;
  margin-top: -8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.payment-customer-results[hidden],
.payment-selected-customer[hidden] {
  display: none;
}

.payment-customer-results > .form-hint {
  margin: 0;
  padding: 10px;
}

.payment-customer-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.payment-customer-result:hover {
  border-color: #bfd1f8;
  background: #f2f6ff;
}

.payment-customer-result span,
.payment-selected-customer span {
  min-width: 0;
}

.payment-customer-result strong,
.payment-customer-result small,
.payment-selected-customer strong,
.payment-selected-customer small {
  display: block;
}

.payment-customer-result strong,
.payment-selected-customer strong {
  font-size: 11px;
}

.payment-customer-result small,
.payment-selected-customer small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-customer-result > span:last-child,
.payment-selected-customer > span:last-child {
  text-align: right;
}

.payment-selected-customer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid #badfcf;
  border-radius: 12px;
  background: #edf9f4;
}

.toolbar-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.network-summary,
.network-monitor-summary,
.customer-summary,
.customer-map-summary,
.installation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.network-monitor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .7fr);
  gap: 18px;
  margin-bottom: 18px;
}

.network-monitor-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.network-monitor-node {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: radial-gradient(circle at top right, rgba(48, 116, 240, .12), transparent 40%), #fff;
  box-shadow: 0 14px 32px rgba(26, 45, 70, .08);
}

.network-monitor-node.online {
  border-color: rgba(34, 160, 107, .35);
  background: radial-gradient(circle at top right, rgba(34, 160, 107, .16), transparent 42%), #fff;
}

.network-monitor-node.down {
  border-color: rgba(232, 93, 104, .45);
  background: radial-gradient(circle at top right, rgba(232, 93, 104, .18), transparent 42%), #fff;
}

.network-monitor-node.paused {
  opacity: .78;
}

.network-monitor-led {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3074f0;
  box-shadow: 0 0 0 5px rgba(48, 116, 240, .12);
}

.network-monitor-node.online .network-monitor-led {
  background: #22a06b;
  box-shadow: 0 0 0 5px rgba(34, 160, 107, .14);
}

.network-monitor-node.down .network-monitor-led {
  background: #e85d68;
  box-shadow: 0 0 0 5px rgba(232, 93, 104, .16);
}

.network-monitor-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #3074f0;
  background: #eaf1ff;
}

.network-monitor-node.online .network-monitor-icon {
  color: #168258;
  background: #e4f6ee;
}

.network-monitor-node.down .network-monitor-icon {
  color: #b42318;
  background: #ffeaec;
}

.network-monitor-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.network-monitor-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.network-monitor-copy small,
.network-monitor-latency {
  color: var(--muted);
  font-size: 10px;
}

.network-monitor-latency {
  grid-column: 1 / -1;
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f3f5f7;
  font-weight: 700;
}

.network-monitor-events {
  display: grid;
  gap: 10px;
}

.network-monitor-event {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}

.network-monitor-event strong,
.network-monitor-event small {
  display: block;
}

.network-monitor-event small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.network-monitor-table-row {
  grid-template-columns: 1.1fr .9fr .55fr .65fr .85fr 1fr 112px;
  min-width: 1040px;
}

.network-monitor-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 999px;
  color: #3568c9;
  background: #eaf1ff;
  font-size: 10px;
  font-weight: 800;
}

.network-monitor-badge.online {
  color: #168258;
  background: #e4f6ee;
}

.network-monitor-badge.down {
  color: #b42318;
  background: #ffeaec;
}

.network-monitor-badge.paused {
  color: #5f6b7a;
  background: #eef1f5;
}

.network-ping-panel {
  margin-top: 18px;
}

.ping-terminal {
  overflow: hidden;
  border: 1px solid #172130;
  border-radius: 14px;
  color: #dce8f8;
  background: #0d1522;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.ping-terminal-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(220, 232, 248, .12);
  background: rgba(255, 255, 255, .035);
}

.ping-terminal-summary strong,
.ping-terminal-summary span {
  display: block;
}

.ping-terminal-summary strong {
  color: #fff;
  font-size: 11px;
}

.ping-terminal-summary span {
  color: #8fb3d9;
  font-size: 10px;
  font-weight: 700;
}

.ping-terminal-lines {
  display: grid;
  gap: 1px;
  padding: 10px 0;
}

.ping-terminal-line {
  padding: 4px 14px;
}

.ping-terminal-line code {
  color: #dce8f8;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.ping-terminal-line.success code {
  color: #78e0a4;
}

.ping-terminal-line.lost code,
.ping-terminal-line.pending code {
  color: #ffb86b;
}

.customer-map-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 210px;
}

.customer-map-filter-bar .table-search {
  width: 100%;
}

.customer-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .6fr);
  gap: 18px;
  align-items: stretch;
}

.customer-map-panel {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.customer-map-canvas-wrap {
  position: relative;
  min-height: 590px;
}

.customer-map-canvas {
  width: 100%;
  min-height: 590px;
  background: #eaf0f5;
}

.customer-map-legend {
  position: absolute;
  top: 16px;
  left: 50px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid rgba(224, 229, 235, .95);
  border-radius: 11px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(26, 45, 70, .12);
  backdrop-filter: blur(8px);
}

.customer-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #53657a;
  font-size: 9px;
  font-weight: 700;
}

.customer-map-legend i {
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 1px rgba(34, 160, 107, .3);
}

.customer-map-legend i.suspended {
  background: #f28a34;
  box-shadow: 0 0 0 1px rgba(242, 138, 52, .3);
}

.customer-map-legend i.retired {
  background: #7b8798;
  box-shadow: 0 0 0 1px rgba(123, 135, 152, .3);
}

.customer-map-unavailable {
  position: absolute;
  inset: 0;
  z-index: 450;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 30px;
  color: var(--muted);
  background:
    linear-gradient(rgba(255, 255, 255, .8), rgba(255, 255, 255, .92)),
    repeating-linear-gradient(45deg, #eaf0f5 0, #eaf0f5 12px, #e3eaf1 12px, #e3eaf1 24px);
  text-align: center;
}

.customer-map-unavailable[hidden] {
  display: none;
}

.customer-map-unavailable > span {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: #eaf1ff;
}

.customer-map-unavailable svg {
  width: 22px;
  height: 22px;
}

.customer-map-unavailable strong {
  color: var(--ink);
}

.customer-map-unavailable small {
  max-width: 380px;
  line-height: 1.6;
}

.customer-map-directory {
  min-width: 0;
  max-height: 590px;
  overflow: hidden;
}

.customer-map-directory .panel-header {
  margin-bottom: 12px;
}

.customer-map-count {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--blue);
  background: #eaf1ff;
  font-family: "Manrope", sans-serif;
}

.customer-map-list {
  display: grid;
  max-height: 495px;
  gap: 7px;
  overflow-y: auto;
  padding-right: 4px;
}

.customer-map-list-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.customer-map-list-item:hover,
.customer-map-list-item.selected {
  border-color: #b9cdf7;
  background: #f5f8ff;
}

.customer-map-list-item strong,
.customer-map-list-item small {
  display: block;
}

.customer-map-list-item strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-map-list-item small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-map-list-pin {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #168258;
  background: #e4f6ee;
}

.customer-map-list-pin.suspended {
  color: #c05d12;
  background: #fff0e3;
}

.customer-map-list-pin.retired {
  color: #66758a;
  background: #eef1f4;
}

.customer-map-list-pin svg,
.customer-map-list-arrow svg {
  width: 14px;
  height: 14px;
}

.customer-map-list-arrow {
  color: #9aa8b8;
}

.customer-map-missing-panel {
  margin-top: 18px;
}

.customer-map-missing-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.customer-map-missing-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fafbfd;
}

.customer-map-missing-item strong,
.customer-map-missing-item small {
  display: block;
}

.customer-map-missing-item strong {
  font-size: 10px;
}

.customer-map-missing-item small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-map-div-icon {
  background: transparent;
  border: 0;
}

.customer-map-marker {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  color: #fff;
  background: #22a06b;
  box-shadow: 0 7px 18px rgba(26, 45, 70, .3);
  transform: rotate(-45deg);
}

.customer-map-marker svg {
  width: 14px;
  height: 14px;
  transform: rotate(45deg);
}

.customer-map-marker.suspended {
  background: #f28a34;
}

.customer-map-marker.retired {
  background: #7b8798;
}

.gps-privacy-panel {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  margin-top: 18px;
  padding: 18px 20px;
}

.gps-privacy-panel > svg {
  color: #3074f0;
  flex: 0 0 22px;
  height: 22px;
  width: 22px;
}

.gps-privacy-panel strong,
.gps-privacy-panel p {
  display: block;
}

.gps-privacy-panel p {
  color: var(--muted);
  margin: 5px 0 0;
}

.technician-route-panel {
  margin-top: 20px;
}

.zone-management-layout {
  display: grid;
  grid-template-columns: minmax(320px, .75fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
}

.zone-operation-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.zone-node-table-row {
  grid-template-columns: minmax(170px, 1.2fr) minmax(130px, .8fr) minmax(150px, 1fr) 90px 54px;
}

.zone-node-checkboxes .policy-check {
  align-items: flex-start;
}

.zone-node-checkboxes .policy-check span,
.zone-node-checkboxes .policy-check strong,
.zone-node-checkboxes .policy-check small {
  display: block;
}

.zone-node-checkboxes .policy-check small {
  margin-top: 3px;
  color: var(--muted);
}

.tvbox-filter-bar {
  grid-template-columns: minmax(260px, 1fr) 220px;
}

.tvbox-list-item {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  cursor: pointer;
}

.tvbox-list-actions {
  display: flex;
  gap: 4px;
}

.tvbox-list-actions .row-action.danger {
  color: var(--red);
}

.technician-route-header {
  align-items: flex-end;
}

.technician-route-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
}

.technician-route-filters label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.technician-route-filters input,
.technician-route-filters select {
  min-width: 170px;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}

.technician-route-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, .7fr);
}

.technician-route-layout .customer-map-canvas-wrap,
.technician-route-layout .customer-map-canvas {
  min-height: 480px;
}

.technician-route-directory {
  max-height: 480px;
  overflow: hidden;
}

.technician-stop-item {
  border: 1px solid var(--line);
}

.technician-stop-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  color: #9a5c1f;
  background: #fff0e3;
  font-size: 10px;
}

.technician-overtime-panel {
  margin-bottom: 20px;
  border-color: #dce6f8;
  background: linear-gradient(135deg, #fff, #f7faff);
}

.overtime-panel-head,
.overtime-request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.overtime-panel-head h3,
.overtime-panel-head p {
  margin: 0;
}

.overtime-panel-head p {
  margin-top: 5px;
  color: var(--muted);
}

.overtime-waiting {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #9a5c1f;
  background: #fff0e3;
  font-weight: 700;
}

.overtime-waiting svg {
  width: 17px;
}

.overtime-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.overtime-summary-row span {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e9eef6;
}

.overtime-summary-row small,
.overtime-history-row span,
.overtime-history-row small,
.overtime-request-item small {
  color: var(--muted);
}

.overtime-history-row {
  display: grid;
  grid-template-columns: 150px 80px minmax(0, 1fr);
  gap: 10px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.overtime-approval-panel {
  margin-bottom: 20px;
}

.overtime-request-list,
.overtime-accounting {
  display: grid;
  gap: 10px;
}

.overtime-request-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.overtime-request-item p {
  margin: 5px 0 0;
}

.overtime-request-item small {
  display: block;
  margin-top: 3px;
}

.overtime-accounting {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.overtime-accounting > span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 90px;
  gap: 10px;
}

@media (max-width: 1000px) {
  .zone-management-layout {
    grid-template-columns: 1fr;
  }

  .technician-route-layout {
    grid-template-columns: 1fr;
  }

  .technician-route-directory {
    max-height: none;
  }
}

@media (max-width: 680px) {
  .tvbox-filter-bar {
    grid-template-columns: 1fr;
  }

  .zone-node-table-row {
    min-width: 780px;
  }

  .technician-route-header,
  .overtime-panel-head,
  .overtime-request-item {
    align-items: stretch;
    flex-direction: column;
  }

  .technician-route-filters,
  .technician-route-filters label,
  .technician-route-filters input,
  .technician-route-filters select,
  .technician-route-filters button {
    width: 100%;
  }

  .overtime-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overtime-history-row,
  .overtime-accounting > span {
    grid-template-columns: 1fr;
  }
}

.customer-map-popup {
  display: grid;
  min-width: 220px;
  gap: 5px;
  padding: 3px;
  font-family: "DM Sans", sans-serif;
}

.customer-map-popup > strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.customer-map-popup > small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.customer-map-popup-status {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 20px;
  color: #168258;
  background: #e4f6ee;
  font-size: 8px;
  font-weight: 800;
}

.customer-map-popup-status.suspended {
  color: #c05d12;
  background: #fff0e3;
}

.customer-map-popup-status.retired {
  color: #66758a;
  background: #eef1f4;
}

.customer-map-popup button {
  min-height: 34px;
  margin-top: 5px;
  border: 0;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.customer-map-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 13px;
}

.customer-map-leaflet-popup .leaflet-popup-content {
  margin: 13px;
}

#customerMapView .leaflet-control-zoom a {
  color: #334d6c;
  font-family: "DM Sans", sans-serif;
}

#customerMapView .leaflet-control-attribution {
  font-size: 8px;
}

.network-management-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.network-incidents-panel {
  grid-column: 1 / -1;
}

.network-ipv4-panel {
  grid-column: 1 / -1;
}

.network-routers-panel {
  grid-column: 1 / -1;
}

.compact-network-search {
  width: min(280px, 100%);
}

.ipv4-pool-table-row {
  grid-template-columns: minmax(160px, 1.1fr) minmax(150px, .85fr) minmax(150px, .85fr) minmax(150px, 1fr) minmax(150px, .95fr) 105px 86px 78px;
  min-width: 1120px;
}

.router-table-row {
  grid-template-columns: minmax(210px, 1.25fr) minmax(135px, .72fr) minmax(175px, .95fr) minmax(145px, .8fr) 92px 104px 164px;
  min-width: 1120px;
}

.network-subsection-head {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 18px 0 9px;
}

.network-subsection-head strong {
  color: var(--ink);
  font-size: 13px;
}

.node-table-row {
  grid-template-columns: minmax(170px, 1fr) minmax(165px, .9fr) minmax(220px, 1.35fr) minmax(180px, 1.05fr) minmax(115px, .65fr) 96px 154px;
  min-width: 1220px;
}

.node-table-capacity {
  display: block;
  height: 4px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e7edf5;
}

.node-table-capacity b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3074f0;
}

.router-client-count {
  display: inline-grid;
  min-width: 26px;
  min-height: 20px;
  place-items: center;
  border-radius: 99px;
  color: #fff;
  background: #66758a;
  font-size: 9px;
}

.router-row-actions {
  gap: 4px;
}

.router-row-actions .row-action {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.ipv4-usage strong,
.ipv4-usage small {
  display: block;
}

.ipv4-usage strong {
  color: var(--blue);
  font-size: 10px;
}

.ipv4-usage small {
  display: inline;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
}

.ipv4-usage i {
  display: block;
  height: 7px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: #e5eaf0;
}

.ipv4-usage i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.ipv4-type {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 5px;
  color: #15735b;
  background: #e4f6ee;
  font-size: 8px;
  text-transform: uppercase;
}

.node-pool-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid #dce8fa;
  border-radius: 8px;
  color: #31527a;
  background: #f4f8ff;
}

.node-pool-summary strong,
.node-pool-summary small {
  font-size: 8px;
}

.node-pool-summary small {
  color: var(--muted);
  text-align: right;
}

.gpon-panel {
  grid-column: 1 / -1;
}

.gpon-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.gpon-summary span {
  padding: 12px;
  border: 1px solid #dce8fa;
  border-radius: 11px;
  background: #f5f8ff;
}

.gpon-summary strong,
.gpon-summary small {
  display: block;
}

.gpon-summary strong {
  color: var(--blue);
  font-family: "Manrope", sans-serif;
  font-size: 20px;
}

.gpon-summary small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.gpon-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gpon-layout h4 {
  margin: 0 0 10px;
  font-size: 11px;
}

.gpon-list {
  display: grid;
  gap: 10px;
}

.gpon-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
}

.gpon-card-head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.gpon-card-head strong,
.gpon-card-head small {
  display: block;
}

.gpon-card-head strong {
  font-size: 10px;
}

.gpon-card-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.gpon-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #3074f0;
  border-radius: 9px;
  background: #eaf1ff;
}

.gpon-card-icon.nap {
  color: #8b5cf6;
  background: #f0ebff;
}

.gpon-card-icon.ont {
  color: #168258;
  background: #e4f6ee;
}

.gpon-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
}

.gpon-card-details span {
  padding: 7px;
  color: var(--muted);
  border-radius: 8px;
  background: #f0f3f6;
  font-size: 8px;
}

.gpon-card-details strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 9px;
}

.gpon-delete-button {
  width: 100%;
  min-height: 40px;
  margin-top: 11px;
}

.router-grid,
.node-list {
  display: grid;
  gap: 10px;
}

.router-card,
.node-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fafbfc;
}

.router-card-head,
.node-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.router-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.router-identity .metric-icon {
  width: 32px;
  height: 32px;
}

.router-details,
.node-details {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

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

.node-details {
  grid-template-columns: repeat(3, 1fr);
}

.router-details span,
.node-details span {
  padding: 7px;
  border-radius: 8px;
  color: var(--muted);
  background: #f0f3f6;
  font-size: 8px;
}

.router-details strong,
.node-details strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 9px;
}

.router-health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.router-health-grid span {
  padding: 8px;
  border: 1px solid #e4eaf1;
  border-radius: 9px;
  background: #fff;
}

.router-health-grid small,
.router-health-grid strong {
  display: block;
}

.router-health-grid small {
  color: var(--muted);
  font-size: 7px;
  text-transform: uppercase;
}

.router-health-grid strong {
  margin-top: 3px;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.router-diagnostic-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #dce4ee;
  border-radius: 10px;
  color: #596a80;
  background: #f4f7fa;
}

.router-diagnostic-status.healthy {
  color: #15735b;
  border-color: #bfe9dc;
  background: #effbf7;
}

.router-diagnostic-status.warning {
  color: #9a6418;
  border-color: #f1d5aa;
  background: #fff9ed;
}

.router-diagnostic-status strong,
.router-diagnostic-status small {
  display: block;
}

.router-diagnostic-status strong {
  font-size: 9px;
}

.router-diagnostic-status small {
  margin-top: 3px;
  color: currentColor;
  font-size: 8px;
  line-height: 1.4;
  opacity: .84;
}

.router-diagnostic-status .router-warning {
  color: #a8452e;
}

.router-automation-state {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 11px;
  padding: 10px;
  border: 1px solid #f1d5aa;
  border-radius: 10px;
  color: #9a6418;
  background: #fff9ed;
}

.router-automation-state.enabled {
  color: #15735b;
  border-color: #bfe9dc;
  background: #effbf7;
}

.router-automation-icon,
.router-automation-icon svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.router-automation-state strong,
.router-automation-state small {
  display: block;
}

.router-automation-state strong {
  font-size: 9px;
}

.router-automation-state small {
  margin-top: 3px;
  color: currentColor;
  font-size: 8px;
  opacity: .82;
}

.node-details .node-vlan-detail.has-vlan {
  color: #3074f0;
  background: #eaf1ff;
}

.node-details .node-vlan-detail.no-vlan {
  color: #68778a;
  background: #eef1f4;
}

.node-details .node-vlan-detail.has-vlan strong,
.node-details .node-vlan-detail.no-vlan strong {
  color: currentColor;
}

.node-capacity {
  height: 5px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 5px;
  background: #e5eaf0;
}

.node-capacity span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.node-access-state {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #e1e7ef;
  border-radius: 11px;
  color: #607087;
  background: #f7f9fc;
}

.node-access-state.enabled {
  border-color: #b9d6ff;
  color: #1f5fae;
  background: #edf5ff;
}

.node-access-state > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
}

.node-access-state strong,
.node-access-state small {
  display: block;
}

.node-access-state strong {
  color: var(--ink);
  font-size: 10px;
}

.node-access-state small {
  margin-top: 3px;
  font-size: 8px;
  line-height: 1.45;
}

.ip-pool-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.ip-pool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.ip-pool-row strong,
.ip-pool-row small {
  display: block;
}

.ip-pool-row strong {
  font-size: 10px;
}

.ip-pool-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.ip-pool-actions,
.network-card-actions,
.network-incident-row {
  display: flex;
  align-items: center;
}

.ip-pool-actions {
  gap: 8px;
}

.network-card-actions {
  gap: 8px;
  margin-top: 12px;
}

.network-card-actions .secondary-button,
.network-card-actions .primary-button,
.network-card-actions .danger-button {
  flex: 1;
  min-height: 44px;
}

.router-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.node-card .network-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.router-card-actions button {
  width: 100%;
}

.router-card-actions button:disabled {
  cursor: default;
  opacity: .45;
}

#networksView .network-card-actions button > svg,
#networksView .gpon-delete-button > svg,
#networksView .node-incident-alert > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

#networksView .gpon-card-icon > svg {
  width: 15px;
  height: 15px;
}

#networksView .event-icon > svg {
  width: 16px;
  height: 16px;
}

.danger-action {
  color: #b72c3b;
  background: #fff0f2;
}

.node-incident-alert {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  color: #b72c3b;
  background: #fff0f2;
  font-size: 9px;
  font-weight: 700;
}

.network-incident-list {
  display: grid;
}

.network-incident-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 32px;
  gap: 11px;
  padding: 12px 0;
  border-top: 1px solid #edf0f3;
}

.network-incident-row:first-child {
  border-top: 0;
}

.network-incident-row strong,
.network-incident-row small {
  display: block;
}

.network-incident-row strong {
  font-size: 11px;
}

.network-incident-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-filter-bar,
.customer-filter-bar {
  display: grid;
  grid-template-columns: minmax(250px, 1.4fr) repeat(4, minmax(150px, .65fr));
}

.customer-filter-bar {
  grid-template-columns: minmax(280px, 1.5fr) repeat(5, minmax(145px, .65fr));
}

.plan-filter-bar .table-search,
.customer-filter-bar .table-search {
  width: 100%;
}

.plan-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(26, 45, 70, .04);
}

.plan-card.featured {
  color: #fff;
  border: 0;
  background: linear-gradient(145deg, var(--navy-900), #1a426b);
}

.plan-card.plan-inactive {
  opacity: .78;
}

.plan-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-title-block {
  min-width: 0;
}

.plan-title-block h3 {
  margin: 5px 0 2px;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.plan-title-block small,
.plan-technology {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.plan-technology {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.plan-technology svg {
  width: 13px;
  height: 13px;
}

.featured .plan-title-block small,
.featured .plan-technology {
  color: #9fb0c4;
}

.plan-bandwidth,
.plan-commercial-data {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 17px;
}

.plan-bandwidth span,
.plan-commercial-data span {
  padding: 10px;
  border-radius: 11px;
  background: #f4f7fb;
}

.featured .plan-bandwidth span,
.featured .plan-commercial-data span {
  background: rgba(255, 255, 255, .08);
}

.plan-bandwidth small,
.plan-bandwidth strong,
.plan-commercial-data small,
.plan-commercial-data strong {
  display: block;
}

.plan-bandwidth small,
.plan-commercial-data small {
  color: var(--muted);
  font-size: 8px;
}

.featured .plan-bandwidth small,
.featured .plan-commercial-data small {
  color: #9fb0c4;
}

.plan-bandwidth strong {
  margin-top: 3px;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
}

.plan-commercial-data strong {
  margin-top: 3px;
  font-size: 10px;
}

.plan-performance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.plan-performance span {
  min-width: 0;
  padding: 8px;
  border: 1px solid #e7ecf3;
  border-radius: 9px;
  background: #fbfcfe;
}

.plan-performance small,
.plan-performance strong {
  display: block;
}

.plan-performance small {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-performance strong {
  margin-top: 3px;
  font-size: 9px;
}

.featured .plan-performance span {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .07);
}

.featured .plan-performance small {
  color: #9fb0c4;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 12px 0;
}

.plan-price strong {
  font-family: "Manrope", sans-serif;
  font-size: 25px;
}

.plan-price span,
.plan-description {
  color: var(--muted);
  font-size: 9px;
}

.featured .plan-price span,
.featured .plan-description {
  color: #9fb0c4;
}

.plan-features {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  font-size: 9px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.plan-features svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.plan-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.plan-card-actions button {
  min-height: 34px;
  justify-content: center;
  font-size: 9px;
}

.plan-compact-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  margin: 13px 0 10px;
}

.plan-compact-main strong {
  font-family: "Manrope", sans-serif;
  font-size: 22px;
}

.plan-compact-main span,
.plan-compact-meta {
  color: var(--muted);
  font-size: 9px;
}

.plan-compact-main b {
  width: 100%;
  color: var(--ink);
  font-size: 10px;
}

.featured .plan-compact-main span,
.featured .plan-compact-meta {
  color: #9fb0c4;
}

.featured .plan-compact-main b {
  color: #fff;
}

.plan-compact-meta,
.service-compact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.plan-compact-meta span,
.service-compact-details span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f4f7fb;
  font-size: 8px;
}

.featured .plan-compact-meta span {
  background: rgba(255, 255, 255, .09);
}

.plan-compact-meta svg,
.service-compact-details svg {
  width: 12px;
  height: 12px;
}

.service-card-compact {
  padding: 15px;
}

.service-card-compact .service-card-body {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}

.service-card-compact .iptv-account-actions {
  margin-top: 0;
}

.service-card-compact .iptv-account-actions button {
  min-height: 32px;
  font-size: 9px;
}

#plansView .plan-card-actions button > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.plan-delete-locked {
  opacity: .62;
}

#plansView .plan-technology > svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

#plansView .plan-features li > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

#plansView .metric-icon > svg,
#servicesView .metric-icon > svg {
  width: 16px;
  height: 16px;
}

.featured .plan-card-actions .secondary-button {
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
}

/* Compact operational catalogues: keep technical details visible without tall cards. */
#networksView .network-management-grid {
  gap: 12px;
}

#networksView .router-grid,
#networksView .node-list {
  gap: 8px;
}

#networksView .router-card,
#networksView .node-card {
  padding: 11px;
  border-radius: 10px;
  box-shadow: none;
}

#networksView .router-identity {
  gap: 8px;
}

#networksView .router-identity .metric-icon {
  width: 27px;
  height: 27px;
}

#networksView .router-details,
#networksView .node-details {
  gap: 5px;
  margin-top: 8px;
}

#networksView .router-details span,
#networksView .node-details span {
  padding: 5px 7px;
  border-radius: 7px;
}

#networksView .router-health-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

#networksView .router-health-grid span {
  padding: 5px 6px;
  border-radius: 7px;
}

#networksView .router-diagnostic-status,
#networksView .router-automation-state,
#networksView .node-access-state {
  gap: 7px;
  margin-top: 8px;
  padding: 7px 8px;
  border-radius: 8px;
}

#networksView .router-diagnostic-status small,
#networksView .router-automation-state small,
#networksView .node-access-state small {
  line-height: 1.3;
}

#networksView .ip-pool-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

#networksView .ip-pool-row {
  gap: 7px;
  padding: 7px 8px;
  border-radius: 8px;
}

#networksView .node-capacity {
  margin-top: 7px;
}

#networksView .node-add-pool-button {
  width: 100%;
  min-height: 30px;
  margin-top: 7px;
  padding: 5px 8px;
  font-size: 8px;
}

#networksView .node-incident-alert {
  margin-top: 8px;
  padding: 7px 8px;
}

#networksView .network-card-actions {
  gap: 6px;
  margin-top: 9px;
}

#networksView .router-card-actions {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#networksView .node-card .network-card-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#networksView .network-card-actions .secondary-button,
#networksView .network-card-actions .primary-button,
#networksView .network-card-actions .danger-button {
  min-height: 32px;
  padding: 6px;
  font-size: 8px;
}

/* Service plans use a compact catalogue row on desktop instead of tall tiles. */
#plansView .plan-grid {
  grid-template-columns: repeat(auto-fill, minmax(520px, 1fr));
  gap: 9px;
}

#plansView .plan-card {
  display: grid;
  grid-template-columns: minmax(185px, 1.1fr) minmax(160px, .8fr) minmax(165px, .9fr);
  align-items: center;
  gap: 7px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: none;
}

#plansView .plan-card-top {
  grid-row: 1 / span 2;
  align-self: center;
}

#plansView .plan-title-block h3 {
  margin: 3px 0 1px;
  font-size: 13px;
}

#plansView .plan-compact-main {
  margin: 0;
  gap: 3px;
}

#plansView .plan-compact-main strong {
  font-size: 18px;
}

#plansView .plan-compact-main b {
  width: auto;
  font-size: 9px;
}

#plansView .plan-compact-meta {
  gap: 5px;
}

#plansView .plan-compact-meta span {
  padding: 4px 6px;
  font-size: 7px;
}

#plansView .plan-card-actions {
  grid-column: 3;
  grid-row: 1 / span 2;
  gap: 5px;
  margin: 0;
}

#plansView .plan-card-actions button {
  min-height: 28px;
  padding: 5px;
  font-size: 8px;
}

@media (max-width: 1250px) {
  #networksView .router-card-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #plansView .plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #networksView .router-health-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #networksView .ip-pool-list {
    grid-template-columns: 1fr;
  }

  #networksView .router-card-actions,
  #networksView .node-card .network-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #plansView .plan-card {
    display: block;
  }

  #plansView .plan-compact-main {
    margin: 10px 0 8px;
  }

  #plansView .plan-compact-main b {
    width: 100%;
  }

  #plansView .plan-card-actions {
    margin-top: 9px;
  }
}

.customer-table-row {
  grid-template-columns: 92px minmax(210px, 1.3fr) 132px 76px 126px 118px minmax(210px, 1.25fr) 118px minmax(170px, .95fr) minmax(130px, .8fr) 88px 118px;
  min-width: 1580px;
}

.customer-table-row:not(.header):not(.customer-filter-row) {
  min-height: 48px;
}

.customer-table-row.selected:not(.header) {
  box-shadow: inset 3px 0 0 var(--blue);
  background: #f7faff;
}

.customer-filter-row {
  min-height: 42px;
  background: #fff;
  border-bottom: 1px solid #e5edf6;
}

.customer-filter-row span {
  padding: 0;
}

.customer-column-filter {
  width: 100%;
  min-height: 32px;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  padding: 0 9px;
  color: var(--ink);
  background: #fbfdff;
  font-size: 10px;
  outline: none;
}

.customer-column-filter:focus {
  border-color: rgba(48, 116, 240, .55);
  box-shadow: 0 0 0 3px rgba(48, 116, 240, .1);
}

.customer-balance {
  display: block;
  font-size: 10px;
}

.customer-balance.clear {
  color: #168258;
}

.customer-balance.pending {
  color: #a76a00;
}

.customer-balance.overdue {
  color: #b72c3b;
}

.customer-online-pill {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
}

.customer-online-pill.online {
  color: #05724d;
  background: #dff8ec;
}

.customer-online-pill.offline {
  color: #b72c3b;
  background: #ffe6e9;
}

.customer-online-pill.retired {
  color: #5d6775;
  background: #eef2f6;
}

.customer-row-actions {
  justify-content: flex-end;
}

.customer-quick-suspend { color: #b57200; background: #fff4dc; border-color: #f5d58d; }
.customer-quick-activate { color: #167b54; background: #e5f8ef; border-color: #bde8d2; }

.customer-management-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr);
  gap: 16px;
  align-items: start;
}

.customer-management-layout > .table-card {
  overflow-x: auto;
}

.customer-profile-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  scroll-margin-top: 92px;
  border: 1px solid #dbe7f7;
  box-shadow: 0 18px 42px rgba(26, 45, 70, .08);
}

/* El perfil se muestra completo antes de la lista para evitar recortes. */
#customersView .customer-management-layout {
  grid-template-columns: minmax(0, 1fr);
}

#customersView .customer-profile-panel {
  position: static;
  order: -1;
  max-height: none;
  overflow: visible;
  min-width: 0;
}

#customersView .customer-profile-tabs {
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

#customersView .customer-profile-tabs button {
  min-width: 0;
  flex: 1 1 132px;
}

.customer-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 2px 2px;
  color: var(--muted);
  font-size: 12px;
}

.customer-pagination > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.customer-pagination strong {
  color: var(--ink);
  font-size: 10px;
}

@media (max-width: 1180px) {
  .customer-management-layout {
    grid-template-columns: 1fr;
  }

  .customer-profile-panel {
    position: static;
    max-height: none;
  }
}

.customer-profile-head,
.customer-profile-actions,
.customer-invoice-head,
.customer-invoice-row {
  display: flex;
  align-items: center;
}

.customer-profile-head,
.customer-invoice-head,
.customer-invoice-row {
  justify-content: space-between;
  gap: 12px;
}

.customer-profile-head h3 {
  margin: 4px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 24px;
}

.customer-profile-tabs,
.customer-invoice-filters {
  display: flex;
  gap: 7px;
}

.customer-profile-tabs {
  margin-top: 17px;
  padding: 7px;
  border-radius: 15px;
  overflow-x: auto;
  background: #141d27;
}

.customer-profile-tabs button,
.customer-invoice-filters button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
}

.customer-profile-tabs button {
  flex: 0 0 auto;
  gap: 8px;
  justify-content: center;
  min-width: 126px;
  padding: 0 10px;
  color: #c8d2df;
}

.customer-profile-tabs button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.customer-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.customer-contact-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid #d9e2ef;
  border-radius: 11px;
  color: #35506f;
  background: #f8fbff;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.customer-contact-button.whatsapp {
  color: #167b54;
  border-color: #cde9dd;
  background: #effaf5;
}

.customer-contact-button svg {
  width: 13px;
  height: 13px;
}

.customer-account-health {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid #cfe8dc;
  border-radius: 11px;
  color: #176948;
  background: #eff9f4;
}

.customer-account-health.warning {
  color: #95600b;
  border-color: #f0d8aa;
  background: #fff8eb;
}

.customer-account-health.danger {
  color: #a42d3b;
  border-color: #f3cbd0;
  background: #fff3f4;
}

.customer-account-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .7);
}

.customer-account-icon svg {
  width: 16px;
  height: 16px;
}

.customer-account-health strong,
.customer-account-health small {
  display: block;
}

.customer-account-health strong {
  font-size: 11px;
}

.customer-account-health small {
  margin-top: 3px;
  color: inherit;
  font-size: 10px;
  opacity: .8;
}

.customer-profile-tabs button.active,
.customer-invoice-filters button.active {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 4px 14px rgba(26, 45, 70, .08);
}

.customer-record-card {
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #dce4ec;
  border-radius: 12px;
  background: #fff;
}

.customer-record-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #e3e9f0;
  background: #f5f7fa;
}

.customer-record-card-head h4 {
  margin: 0;
  font-size: 15px;
}

.customer-record-card-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.customer-record-table-wrap {
  overflow-x: auto;
}

.customer-record-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: 13px;
}

.customer-record-table th,
.customer-record-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  vertical-align: middle;
}

.customer-record-table th {
  color: #607086;
  background: #fbfcfe;
  font-size: 11px;
  text-transform: uppercase;
}

.customer-record-table tbody tr:nth-child(odd) {
  background: #fbfcfd;
}

.customer-record-table .empty-row td {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.customer-record-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce8fa;
  border-radius: 12px;
  background: #f8fbff;
}

.customer-record-message strong,
.customer-record-message small {
  display: block;
}

.customer-record-message small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.customer-tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.customer-network-result {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #dce8fa;
  border-radius: 12px;
  background: #f8fbff;
}

.customer-network-result strong,
.customer-network-result span {
  display: block;
}

.customer-network-result strong {
  font-size: 10px;
}

.customer-network-result span {
  color: var(--muted);
  font-size: 9px;
}

.customer-network-result .ping-terminal-summary span {
  color: #8fb3d9;
  font-size: 10px;
}

.customer-network-result .ping-terminal-line code {
  color: #dce8f8;
  font-size: 11px;
}

.customer-network-result .ping-terminal-line.success code {
  color: #78e0a4;
}

.customer-network-result .ping-terminal-line.lost code,
.customer-network-result .ping-terminal-line.pending code {
  color: #ffb86b;
}

.customer-network-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.customer-network-kpis span {
  padding: 12px;
  border: 1px solid #dce4ec;
  border-radius: 12px;
  background: #fff;
}

.customer-network-kpis small,
.customer-network-kpis strong {
  display: block;
}

.customer-network-kpis small {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.customer-network-kpis strong {
  margin-top: 4px;
  font-size: 15px;
}

.customer-profile-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.customer-profile-actions {
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.customer-tool {
  min-height: 40px;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}

.customer-tool svg {
  flex: 0 0 auto;
}

.customer-tool:disabled {
  cursor: default;
  opacity: .45;
}

.customer-tool.danger {
  color: #b72c3b;
  border-color: #ffd2d7;
  background: #fff5f6;
}

.customer-tool.primary-tool {
  color: #245fc7;
  border-color: #cddcff;
  background: #f1f5ff;
}

.customer-tool.payment-notice-tool {
  color: #966018;
  border-color: #f2d7ac;
  background: #fff8eb;
}

.customer-status-actions {
  padding-top: 12px;
}

.customer-tool.map-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.customer-profile-section[hidden] {
  display: none;
}

.customer-profile-section:not([hidden]) {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: #fbfdff;
}

.customer-invoices {
  display: grid;
  gap: 9px;
  margin-top: 17px;
}

.customer-invoice-filters {
  flex-wrap: wrap;
  margin: 2px 0 4px;
}

.customer-invoice-filters button {
  background: #f3f5f7;
}

.customer-invoice-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.field-visit-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field-visit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #f7f8fa;
}

.field-visit-row strong,
.field-visit-row small {
  display: block;
}

.field-visit-row strong {
  font-size: 10px;
}

.field-visit-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.coordinate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr .7fr auto;
  gap: 8px;
  align-items: center;
}

.customer-invoice-head h4 {
  margin: 0;
  font-size: 12px;
}

.customer-invoice-row {
  padding: 10px;
  border-radius: 10px;
  background: #f7f8fa;
}

.customer-invoice-row strong,
.customer-invoice-row small {
  display: block;
}

.customer-invoice-row strong {
  font-size: 10px;
}

.customer-invoice-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.customer-activity-section {
  margin-top: 17px;
}

.customer-timeline {
  display: grid;
  margin-top: 10px;
}

.customer-timeline-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid #edf0f3;
}

.customer-timeline-row:first-child {
  border-top: 0;
}

.customer-timeline-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--blue);
  background: #edf4ff;
}

.customer-timeline-icon svg {
  width: 14px;
  height: 14px;
}

.customer-timeline-row strong,
.customer-timeline-row small {
  display: block;
}

.customer-timeline-row strong {
  font-size: 9px;
}

.customer-timeline-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.customer-timeline-row time {
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.customer-notes {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: #fff8eb;
}

.customer-notes strong {
  font-size: 9px;
}

.customer-notes p {
  margin: 5px 0 0;
  color: #6c5a3c;
  font-size: 8px;
  line-height: 1.5;
}

.ping-result {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 9px;
  color: #54647a;
  background: #edf2f7;
  font-size: 9px;
  line-height: 1.5;
}

.customer-network-section {
  display: grid;
  gap: 12px;
  margin-top: 17px;
}

.customer-network-head,
.customer-network-state,
.customer-network-tools,
.customer-domain-row,
.customer-block-row,
.customer-network-warning {
  display: flex;
  align-items: center;
}

.customer-network-head,
.customer-domain-row,
.customer-block-row {
  justify-content: space-between;
  gap: 10px;
}

.customer-network-head .service-section-title {
  margin: 0;
}

.customer-network-head > span > small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.customer-network-state {
  gap: 10px;
  padding: 11px;
  border: 1px solid #e0e6ed;
  border-radius: 11px;
  color: #68778a;
  background: #f6f8fa;
}

.customer-network-state.online {
  color: #176948;
  border-color: #cfe8dc;
  background: #eff9f4;
}

.customer-network-state strong,
.customer-network-state small {
  display: block;
}

.customer-network-state strong {
  font-size: 9px;
}

.customer-network-state small {
  margin-top: 3px;
  font-size: 8px;
  opacity: .82;
}

.customer-traffic-grid,
.customer-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.customer-traffic-grid > span,
.customer-session-grid > span {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e6ebf1;
  border-radius: 10px;
  background: #f8fafc;
}

.customer-traffic-grid small,
.customer-traffic-grid strong,
.customer-traffic-grid em,
.customer-session-grid small,
.customer-session-grid strong {
  display: block;
}

.customer-traffic-grid small,
.customer-session-grid small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.customer-traffic-grid strong {
  margin-top: 4px;
  color: #1f5fc2;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
}

.customer-traffic-grid em {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-session-grid strong {
  overflow: hidden;
  margin-top: 4px;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-network-tools {
  flex-wrap: wrap;
  gap: 7px;
}

.customer-network-columns {
  display: grid;
  gap: 10px;
}

.customer-network-card {
  min-width: 0;
  padding: 11px;
  border: 1px solid #e4e9ef;
  border-radius: 11px;
  background: #fff;
}

.customer-network-disclaimer {
  margin: 6px 0 9px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.customer-domain-list,
.customer-block-list {
  display: grid;
}

.customer-domain-row,
.customer-block-row {
  min-width: 0;
  padding: 9px 0;
  border-top: 1px solid #edf0f3;
}

.customer-domain-row:first-child,
.customer-block-row:first-child {
  border-top: 0;
}

.customer-domain-row > span,
.customer-block-row > span {
  min-width: 0;
}

.customer-domain-row strong,
.customer-domain-row small,
.customer-domain-row time,
.customer-block-row strong,
.customer-block-row small {
  display: block;
}

.customer-domain-row strong,
.customer-block-row strong {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-domain-row small,
.customer-block-row small,
.customer-domain-row time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.customer-domain-row > span:last-child {
  flex: 0 0 auto;
  text-align: right;
}

.customer-network-warning {
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid #f0d8aa;
  border-radius: 10px;
  color: #865710;
  background: #fff8eb;
}

.customer-network-warning > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.customer-network-warning strong,
.customer-network-warning small {
  display: block;
}

.customer-network-warning strong {
  font-size: 8px;
}

.customer-network-warning small {
  margin-top: 3px;
  font-size: 7px;
  line-height: 1.45;
}

.billing-summary,
.ticket-summary,
.finance-summary,
.report-summary,
.contract-summary,
.plan-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

#customersView .customer-summary,
#plansView .plan-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#financesView .finance-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.payment-promises-panel {
  margin-top: 18px;
}

.payment-promise-list {
  display: grid;
}

.payment-promise-row {
  display: grid;
  grid-template-columns: 38px minmax(180px, 1fr) 125px auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #edf0f3;
}

.payment-promise-row:first-child {
  border-top: 0;
}

.payment-promise-main {
  min-width: 0;
}

.payment-promise-main strong,
.payment-promise-main small,
.payment-promise-compact strong,
.payment-promise-compact small {
  display: block;
}

.payment-promise-main strong,
.payment-promise-compact strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-promise-main small,
.payment-promise-compact small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.customer-promise-history {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.payment-promise-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  border-radius: 9px;
  background: #f7f8fa;
}

.contract-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr);
  align-items: start;
  gap: 18px;
}

.contract-table-row {
  grid-template-columns: .75fr 1.2fr 1fr .7fr .7fr .7fr .75fr 38px;
}

.contract-table-row.selected:not(.header) {
  background: #f7faff;
}

.contract-time {
  color: #168258;
  font-size: 10px;
  font-weight: 800;
}

.contract-time.warning {
  color: #b57200;
}

.contract-time.expired {
  color: #b72c3b;
}

.contract-detail-panel {
  position: sticky;
  top: 92px;
}

.contract-detail-head,
.customer-contract-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.contract-detail-head h3,
.customer-contract-card h4 {
  margin: 4px 0;
  font-size: 16px;
}

.contract-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.contract-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.contract-date-grid,
.customer-contract-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contract-date-grid span,
.customer-contract-meta span {
  padding: 9px;
  border-radius: 9px;
  background: #f2f5f8;
}

.contract-date-grid small,
.contract-date-grid strong,
.customer-contract-meta small,
.customer-contract-meta strong {
  display: block;
}

.contract-date-grid small,
.customer-contract-meta small {
  color: var(--muted);
  font-size: 8px;
}

.contract-date-grid strong,
.customer-contract-meta strong {
  margin-top: 3px;
  font-size: 9px;
}

.contract-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 8px;
}

.contract-progress-label strong {
  color: var(--ink);
}

.contract-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 8px;
  background: #e5eaf0;
}

.contract-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3074f0, #35c8e8);
}

.contract-party-list,
.contract-equipment-box,
.contract-terms-preview,
.contract-renewal-history {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.contract-party-list p,
.contract-equipment-box small,
.contract-terms-preview p,
.contract-renewal-history p {
  margin: 0 0 7px;
  color: #526174;
  font-size: 8px;
  line-height: 1.5;
}

.contract-installed-equipment {
  margin-bottom: 8px;
}

.contract-terms-preview p + p {
  margin-top: 6px;
}

.contract-renewal-history h4 {
  margin: 0 0 8px;
  font-size: 11px;
}

.customer-contract-card {
  padding: 12px;
  border: 1px solid #dce8fa;
  border-radius: 12px;
  background: #f7faff;
}

.customer-contract-meta {
  margin: 12px 0;
}

.invoice-table-row {
  grid-template-columns: .8fr 1.3fr .8fr .8fr .8fr .7fr 38px;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.finance-period-filter {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(145px, .65fr));
  align-items: end;
  margin-bottom: 18px;
}

.finance-period-filter .form-field {
  margin: 0;
}

.finance-period-filter .form-field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.finance-period-copy strong {
  display: block;
  font-size: 13px;
}

.finance-monthly-panel {
  margin-bottom: 18px;
}

.finance-chart-period {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.finance-chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 9px;
}

.finance-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.finance-chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #22a06b;
}

.finance-chart-legend .expense {
  background: #e85d68;
}

.finance-monthly-scroll {
  overflow-x: auto;
  padding: 4px 0 2px;
}

.finance-monthly-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(54px, 1fr));
  align-items: end;
  gap: 10px;
  min-width: 760px;
  height: 250px;
  padding: 14px 6px 0;
  border-bottom: 1px solid #dfe5eb;
  background: repeating-linear-gradient(to top, transparent 0, transparent 54px, #edf1f5 55px);
}

.finance-month-column {
  display: grid;
  grid-template-rows: 190px auto auto;
  align-items: end;
  gap: 5px;
  height: 100%;
  text-align: center;
}

.finance-month-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 190px;
}

.finance-month-pair i {
  width: 14px;
  min-height: 0;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #35bd87, #168258);
}

.finance-month-pair i.expense {
  background: linear-gradient(180deg, #f17a84, #b72c3b);
}

.finance-month-column strong {
  color: #445267;
  font-size: 9px;
  text-transform: capitalize;
}

.finance-month-column small {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-month-column small.positive {
  color: #168258;
}

.finance-month-column small.negative {
  color: #b72c3b;
}

.finance-bar-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #edf0f3;
}

.finance-bar-row:first-child {
  border-top: 0;
}

.finance-bar-row strong,
.finance-bar-row small {
  display: block;
}

.finance-bar-row strong {
  font-size: 9px;
}

.finance-bar-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.finance-bar-row > div {
  height: 8px;
  overflow: hidden;
  border-radius: 8px;
  background: #e9edf2;
}

.finance-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3074f0, #35c8e8);
}

.finance-expense-row i {
  background: linear-gradient(90deg, #f28a34, #e85d68);
}

.aging-row,
.aging-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid #edf0f3;
  font-size: 9px;
}

.aging-row:first-child {
  border-top: 0;
}

.aging-row span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.aging-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a06b;
}

.aging-1 { background: #f2b134; }
.aging-2 { background: #f28a34; }
.aging-3 { background: #e85d68; }

.aging-total {
  margin-top: 4px;
  color: #b72c3b;
  border-top-color: #f2cdd2;
  font-weight: 800;
}

.finance-filter-bar {
  margin-top: 4px;
}

.finance-ledger-row {
  grid-template-columns: .75fr 1.25fr 1fr .75fr .85fr .8fr;
}

.finance-amount {
  font-size: 10px;
  font-weight: 800;
}

.finance-amount.income {
  color: #168258;
}

.finance-amount.expense {
  color: #b72c3b;
}

.report-controls {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(150px, .7fr));
  gap: 12px;
  margin: 18px 0;
}

.report-controls .form-field {
  margin: 0;
}

.report-table-row {
  grid-template-columns: repeat(7, minmax(110px, 1fr));
}

.report-payments {
  grid-template-columns: .7fr .75fr 1.2fr .8fr .8fr .9fr .75fr;
}

.report-installations {
  grid-template-columns: .7fr 1.2fr .9fr .9fr 1fr .8fr .8fr;
}

.report-tickets {
  grid-template-columns: .7fr 1.2fr .9fr .7fr 1fr .8fr .8fr;
}

.report-inventory {
  grid-template-columns: 1fr 1.25fr 1fr .75fr 1.2fr 1.1fr 1.1fr;
}

.report-dynamic {
  grid-template-columns: repeat(var(--report-columns, 7), minmax(110px, 1fr));
}

.report-controls input:disabled {
  background: #eef1f4;
  color: #8c98a8;
  cursor: not-allowed;
}

.support-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.support-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, .85fr);
  align-items: start;
  gap: 18px;
}

.ticket-column {
  min-height: 350px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafb;
}

.ticket-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ticket-column-head h3 {
  margin: 0;
  font-size: 12px;
}

.ticket-card {
  cursor: pointer;
  margin-bottom: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ticket-card:hover,
.ticket-card.selected {
  border-color: #9bbcf7;
  box-shadow: 0 8px 22px rgba(37, 91, 170, .1);
  transform: translateY(-1px);
}

.ticket-card.selected {
  background: #f7faff;
}

.ticket-card h4 {
  margin: 8px 0 5px;
  font-size: 11px;
}

.ticket-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.ticket-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
}

.ticket-card-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.ticket-category {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.ticket-diagnostic-ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  padding: 5px 7px;
  color: #168258;
  border-radius: 7px;
  background: #e4f6ee;
  font-size: 8px;
  font-weight: 700;
}

.ticket-approval-ready {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 5px 7px;
  color: #6e52c7;
  border-radius: 7px;
  background: #f0ebff;
  font-size: 8px;
  font-weight: 700;
}

.ticket-diagnostic-ready svg,
.ticket-approval-ready svg {
  width: 13px;
  height: 13px;
}

.ticket-detail-panel {
  position: sticky;
  top: 92px;
}

.incident-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.incident-workspace {
  display: grid;
  grid-template-columns: minmax(285px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.incident-list {
  display: grid;
  gap: 10px;
  max-height: 760px;
  overflow-y: auto;
  padding-right: 4px;
}

.incident-card {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: inherit;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.incident-card:hover,
.incident-card.selected {
  border-color: #8fb4f3;
  box-shadow: 0 9px 24px rgba(35, 80, 155, 0.1);
  transform: translateY(-1px);
}

.incident-card.selected { background: #f8fbff; }

.incident-card-head,
.incident-card-foot,
.incident-update-head,
.incident-detail-head,
.incident-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.incident-card > strong,
.incident-card > span,
.incident-card > small,
.incident-card time { overflow-wrap: anywhere; }

.incident-card > span,
.incident-card > small,
.incident-card time {
  color: var(--muted);
  font-size: 11px;
}

.incident-detail-panel {
  min-width: 0;
  padding: 20px;
}

.incident-detail-head { align-items: flex-start; }

.incident-detail-head h3,
.incident-detail-head p {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.incident-detail-head p {
  color: var(--muted);
  line-height: 1.55;
}

.incident-detail-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 18px 0;
}

.incident-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.incident-info-grid span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: #f7f9fc;
}

.incident-info-grid small { color: var(--muted); }
.incident-info-grid strong { overflow-wrap: anywhere; }

.incident-timeline-section,
.incident-evidence-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.incident-timeline {
  display: grid;
  margin-top: 12px;
}

.incident-timeline > article {
  position: relative;
  display: grid;
  gap: 7px;
  margin-left: 8px;
  padding: 0 0 20px 24px;
  border-left: 2px solid #dce7f8;
}

.incident-timeline-dot {
  position: absolute;
  top: 2px;
  left: -7px;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #3074f0;
  box-shadow: 0 0 0 1px #9ebdf3;
}

.incident-timeline p {
  margin: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.incident-timeline time,
.incident-timeline article > small {
  color: var(--muted);
  font-size: 11px;
}

.incident-inline-photos,
.incident-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.incident-inline-photos a,
.incident-photo-gallery a {
  display: grid;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.incident-inline-photos img,
.incident-photo-gallery img {
  width: 100%;
  height: 105px;
  border-radius: 11px;
  object-fit: cover;
  background: #edf1f6;
}

.incident-photo-gallery small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.incident-photo-upload input[type="file"] {
  padding: 10px;
  border: 1px dashed #a9bedc;
  border-radius: 12px;
  background: #f8fbff;
}

.ticket-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.ticket-detail-head h3 {
  margin: 4px 0;
  font-size: 16px;
}

.ticket-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.ticket-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 17px 0;
}

.ticket-detail-actions button {
  min-height: 42px;
}

.ticket-service-grid,
.fiber-test-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ticket-service-grid span,
.fiber-test-grid span {
  padding: 9px;
  border-radius: 9px;
  background: #f2f5f8;
}

.ticket-service-grid small,
.ticket-service-grid strong,
.fiber-test-grid small,
.fiber-test-grid strong {
  display: block;
}

.ticket-service-grid small,
.fiber-test-grid small {
  color: var(--muted);
  font-size: 8px;
}

.ticket-service-grid strong,
.fiber-test-grid strong {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 9px;
}

.ticket-diagnostic-section,
.ticket-approval-section,
.ticket-history-section {
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.ticket-approval-copy {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #ded5fa;
  border-radius: 11px;
  background: #faf8ff;
}

.ticket-approval-copy p {
  margin: 0;
  color: #526174;
  font-size: 9px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ticket-evidence-link,
.ticket-evidence-preview {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #dce3ec;
  border-radius: 12px;
  background: #fff;
  color: #3568c9;
  text-decoration: none;
}

.ticket-evidence-link img,
.ticket-evidence-preview img {
  width: 100%;
  max-height: 260px;
  border-radius: 9px;
  object-fit: cover;
}

.ticket-evidence-link span,
.ticket-evidence-preview span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
}

.ticket-evidence-link svg {
  width: 15px;
}

.ticket-review-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid #ded5fa;
  border-radius: 12px;
  background: #f7f3ff;
}

.ticket-review-summary > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #6e52c7;
  color: #fff;
}

.ticket-review-summary svg {
  width: 20px;
}

.ticket-review-summary div {
  display: grid;
  gap: 3px;
}

.ticket-review-summary small {
  color: var(--muted);
}

.ticket-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.ticket-section-title h4 {
  margin: 0;
  font-size: 11px;
}

.ticket-section-title span {
  color: var(--muted);
  font-size: 8px;
}

.ticket-diagnostic-copy {
  margin-top: 10px;
  padding: 10px 11px;
  border: 1px solid #dce8fa;
  border-radius: 10px;
  background: #f7faff;
}

.ticket-diagnostic-copy p {
  margin: 0 0 7px;
  color: #526174;
  font-size: 8px;
  line-height: 1.5;
}

.ticket-diagnostic-copy p:last-child {
  margin-bottom: 0;
}

.ticket-history-list > div {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid #edf0f3;
}

.ticket-history-list > div:first-child {
  border-top: 0;
}

.ticket-history-list p,
.ticket-history-list strong,
.ticket-history-list small {
  display: block;
  margin: 0;
}

.ticket-history-list strong {
  font-size: 8px;
}

.ticket-history-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
}

.event-dot {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border: 2px solid #b8cdf4;
  border-radius: 50%;
  background: #3074f0;
}

.assignment-help {
  align-self: start;
  padding: 30px;
  color: #fff;
  border: 0;
  background: linear-gradient(145deg, var(--navy-900), #193b60);
}

.help-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  color: var(--cyan);
  background: rgba(53, 200, 232, 0.12);
}

.assignment-help h3 {
  margin: 20px 0 8px;
  font-family: "Manrope", sans-serif;
}

.assignment-help p {
  color: #9fb0c4;
  font-size: 12px;
  line-height: 1.65;
}

.assignment-help ul {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: #d8e2ed;
  font-size: 11px;
}

.assignment-help li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assignment-help li [data-icon] {
  color: var(--cyan);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(7, 15, 26, 0.65);
  backdrop-filter: blur(7px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(3, 12, 25, .3);
  animation: modal-in 220ms ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-family: "Manrope", sans-serif;
  font-size: 22px;
}

.modal-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-section-title {
  grid-column: 1 / -1;
  margin-top: 5px;
  padding: 10px 0 2px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.form-field label {
  font-size: 11px;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
}

.form-field textarea {
  min-height: 88px;
  resize: vertical;
}

.form-hint {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.modal-footer {
  justify-content: flex-end;
  gap: 10px;
  padding: 17px 24px;
  border-top: 1px solid var(--line);
  background: #fafbfc;
}

.toast-container {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 280px;
  padding: 14px 16px;
  border-left: 4px solid var(--green);
  border-radius: 11px;
  color: #fff;
  background: var(--navy-900);
  box-shadow: 0 15px 40px rgba(8, 20, 36, .24);
  font-size: 12px;
  animation: toast-in 200ms ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1120px) {
  .auth-screen {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .auth-visual,
  .auth-form-side {
    min-height: auto;
  }

  .auth-visual {
    padding-bottom: 34px;
  }

  .auth-visual-content {
    padding: 50px 0 0;
  }

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

  .dashboard-vital-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .server-metrics-headline,
  .server-metrics-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-ticket-panel {
    grid-column: 1 / -1;
  }

  .dashboard-grid,
  .assignment-layout,
  .log-layout,
  .admin-layout,
  .admin-data-grid,
  .admin-secondary-grid,
  .finance-grid {
    grid-template-columns: 1fr;
  }

  .report-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integration-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .xtream-health-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .migration-preview-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .network-management-grid {
    grid-template-columns: 1fr;
  }

  .network-monitor-layout {
    grid-template-columns: 1fr;
  }

  .contract-workspace {
    grid-template-columns: 1fr;
  }

  .contract-detail-panel {
    position: static;
  }

  .support-workspace {
    grid-template-columns: 1fr;
  }

  .crm-agenda-grid {
    grid-template-columns: 1fr;
  }

  .ticket-detail-panel {
    position: static;
  }

  .gpon-layout {
    grid-template-columns: 1fr;
  }

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

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

  .global-search {
    display: none;
  }
}

@media (max-width: 820px) {
  body.auth-pending {
    overflow: auto;
  }

  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .payment-promise-row {
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
  }

  .payment-promise-row > :nth-child(3) {
    display: none;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 220ms ease;
  }

  .sidebar.open {
    transform: none;
    box-shadow: 20px 0 60px rgba(7, 15, 26, .3);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 15;
    display: block;
    border: 0;
    background: rgba(7, 15, 26, .46);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    margin-left: 0;
  }

  .app-watermark {
    left: 0;
    bottom: 7px;
    font-size: 9px;
  }

  .mobile-menu {
    display: inline-flex;
  }

  .topbar {
    padding: 15px 20px;
  }

  .view {
    padding: 22px 20px 40px;
  }

  .hero-visual {
    opacity: .5;
    right: -30px;
  }

  .hero-panel > div:first-child {
    width: 78%;
  }

  .inventory-summary,
  .crm-summary,
  .network-monitor-summary,
  .plan-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  body.auth-pending {
    overflow: auto;
    background: #f6f8fc;
  }

  .auth-screen {
    position: relative;
    min-height: 100dvh;
    overflow: visible;
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-visual,
  .auth-form-side {
    min-height: auto;
    padding: 20px;
  }

  .auth-visual {
    display: block;
    overflow: visible;
    padding-bottom: 18px;
    background:
      radial-gradient(circle at 88% 0, rgba(53, 200, 232, .2), transparent 44%),
      linear-gradient(145deg, #0a1424, #122b48);
  }

  .auth-visual-content,
  .auth-visual-orbit {
    display: none;
  }

  .auth-brand {
    gap: 11px;
  }

  .auth-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .auth-brand strong {
    font-size: 16px;
  }

  .auth-form-side {
    display: block;
    padding: 28px 20px calc(32px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 100% 0, #e1edff, transparent 40%),
      #f8fafc;
  }

  .auth-mobile-intro {
    display: flex;
    width: min(100%, 420px);
    align-items: center;
    gap: 10px;
    margin: 0 auto 14px;
    color: #233553;
  }

  .auth-mobile-intro-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #1775f2, #2dbbd3);
    box-shadow: 0 8px 18px rgba(23, 117, 242, .24);
    font-family: "Manrope", sans-serif;
    font-size: 12px;
    font-weight: 800;
  }

  .auth-mobile-intro > span:last-child {
    display: grid;
    gap: 1px;
  }

  .auth-mobile-intro strong {
    font-family: "Manrope", sans-serif;
    font-size: 13px;
  }

  .auth-mobile-intro small {
    color: #718098;
    font-size: 10px;
  }

  .login-card {
    width: min(100%, 420px);
    margin: 0 auto;
    padding: 22px;
    border: 1px solid #e1e8f2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(19, 45, 82, .1);
  }

  .login-heading {
    margin-bottom: 22px;
  }

  .login-heading h2 {
    font-size: 26px;
  }

  .login-heading p,
  .login-support {
    font-size: 12px;
  }

  .login-field {
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
  }

  .login-input-wrap {
    min-height: 52px;
    padding: 0 13px;
    border-radius: 13px;
  }

  .login-input-wrap input {
    font-size: 16px;
  }

  .password-toggle {
    min-height: 36px;
    padding: 6px;
    font-size: 10px;
  }

  .remember-session {
    margin-bottom: 16px;
    font-size: 11px;
  }

  .forgot-password {
    min-height: 32px;
    font-size: 11px;
  }

  .login-submit {
    min-height: 52px;
    font-size: 13px;
  }

  .auth-visual-content h1 {
    font-size: 32px;
  }

  .initial-access {
    grid-template-columns: 1fr;
  }

  .payment-promise-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .payment-promise-row > :nth-child(4) {
    display: none;
  }

  .payment-promise-compact {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions .primary-button {
    width: 44px;
    padding: 0;
    font-size: 0;
  }

  .notification-button {
    display: none;
  }

  .hero-panel {
    min-height: 300px;
    align-items: flex-start;
    padding: 30px 25px;
  }

  .hero-panel > div:first-child {
    width: 100%;
  }

  .hero-panel h2 br {
    display: none;
  }

  .hero-visual {
    top: auto;
    right: -55px;
    bottom: -110px;
    transform: none;
  }

  .metric-grid,
  .inventory-summary,
  .crm-summary,
  .technician-grid,
  .admin-metrics,
  .service-metrics,
  .network-summary,
  .network-monitor-summary,
  .customer-summary,
  .installation-summary,
  .billing-summary,
  .ticket-summary,
  .finance-summary,
  .report-summary,
  .contract-summary,
  .plan-summary,
  .plan-grid,
  .department-grid {
    grid-template-columns: 1fr;
  }

  .update-version-grid {
    grid-template-columns: 1fr;
  }

  .stock-policy-grid {
    grid-template-columns: 1fr;
  }

  .stock-policy-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .database-status-list,
  .admin-tool-list,
  .integrity-grid,
  .migration-preview-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-vital-grid {
    grid-template-columns: 1fr;
  }

  .server-metrics-headline,
  .server-metrics-list {
    grid-template-columns: 1fr;
  }

  .dashboard-ticket-panel {
    grid-column: auto;
  }

  .vital-highlight,
  .customer-vital-footer {
    grid-template-columns: 1fr;
  }

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

  .toolbar-buttons {
    width: 100%;
    flex-direction: column;
  }

  .toolbar-buttons button {
    width: 100%;
  }

  .support-board {
    grid-template-columns: 1fr;
  }

  .ticket-detail-actions,
  .ticket-service-grid,
  .fiber-test-grid,
  .contract-detail-actions,
  .contract-date-grid,
  .customer-contract-meta {
    grid-template-columns: 1fr;
  }

  .network-management-grid {
    grid-template-columns: 1fr;
  }

  .customer-management-layout {
    grid-template-columns: 1fr;
  }

  .customer-profile-panel {
    position: static;
  }

  .coordinate-grid {
    grid-template-columns: 1fr;
  }

  .admin-user-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .admin-user-row > :nth-child(3),
  .admin-user-row > :nth-child(4) {
    display: none;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .integration-grid {
    grid-template-columns: 1fr;
  }

  .order-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .order-row > :nth-child(3),
  .order-row > :nth-child(5) {
    display: none;
  }

  .filter-bar {
    flex-direction: column;
  }

  .filter-bar select,
  .table-search {
    width: 100%;
  }

  .report-controls {
    grid-template-columns: 1fr;
  }

  .finance-bar-row {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .section-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-toolbar .primary-button {
    width: 100%;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .form-field.full {
    grid-column: auto;
  }
}

.system-access-panel { margin: 18px 0; }

.monitor-dashboard-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.monitor-dashboard-summary span {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.monitor-dashboard-summary .online { color: #0c7a50; background: #e4f6ee; }
.monitor-dashboard-summary .down { color: #b22d3c; background: #ffeaec; }
.monitor-dashboard-summary small { margin-left: auto; color: #77869a; font-size: 10px; }
.monitor-status-row .session-avatar { color: #fff; }
.monitor-status-row .session-avatar.is-online { background: #20a66d; }
.monitor-status-row .session-avatar.is-down { background: #df5c69; }
.status-online { color: #168257; }
.status-down { color: #c33e4b; }

/* Alta técnica y evidencia: estas reglas se mantienen al final para ganar a la base del modal. */
.modal.quick-modal,
.modal.evidence-modal {
  width: min(980px, calc(100vw - 32px));
  max-width: 980px;
}

.installation-photo-field {
  gap: 10px;
}

.installation-photo-inputs,
.installation-evidence-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.installation-photo-input {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  background: #f8fafc;
}

.installation-photo-input > span:first-child {
  color: #34445b;
  font-weight: 700;
}

.installation-photo-input input[type="file"] {
  width: 100%;
  min-width: 0;
  padding: 9px;
  border: 1px dashed #b7c7da;
  border-radius: 10px;
  background: #fff;
}

.installation-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  border-radius: 10px;
  color: #5f6f84;
  background: #eaf1ff;
}

.installation-photo-placeholder svg {
  width: 24px;
  height: 24px;
  color: #3074f0;
}

.installation-photo-input img {
  display: block;
  width: 100%;
  height: 190px;
  border-radius: 10px;
  object-fit: cover;
  background: #e9eef5;
}

.installation-photo-input img[hidden],
.installation-photo-placeholder[hidden] {
  display: none;
}

.installation-evidence-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #e1e7ef;
  border-radius: 16px;
  background: #fff;
}

.installation-evidence-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.installation-evidence-heading h3 {
  margin: 3px 0 0;
}

.installation-evidence-heading > strong {
  padding: 6px 10px;
  border-radius: 999px;
  color: #1d5fc7;
  background: #eaf1ff;
}

.installation-evidence-card {
  display: grid;
  overflow: hidden;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.installation-evidence-card img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: #111827;
}

.installation-evidence-card span {
  display: grid;
  gap: 3px;
  padding: 12px;
}

.installation-evidence-card small {
  color: #738096;
}

.evidence-action {
  color: #1d5fc7;
  background: #eaf1ff;
}

@media (max-width: 900px) {
  .modal-backdrop {
    padding: 8px;
  }

  .modal.quick-modal,
  .modal.evidence-modal {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 14px;
  }

  .quick-modal .modal-header,
  .quick-modal .modal-footer {
    padding: 14px 16px;
  }

  .quick-modal .modal-body,
  .quick-step-fields {
    grid-template-columns: 1fr;
  }

  .quick-modal .modal-body {
    padding: 16px;
  }

  .quick-wizard-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-step-fields .full,
  .installation-photo-field {
    grid-column: auto;
  }

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

  .coordinate-grid .secondary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .installation-photo-inputs,
  .installation-evidence-gallery,
  .coordinate-grid {
    grid-template-columns: 1fr;
  }

  .quick-step-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .quick-step-actions button {
    width: 100%;
  }

  .installation-evidence-card img {
    height: 220px;
  }
}

@media (max-width: 1450px) {
  #financesView .finance-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .finance-period-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-period-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  #financesView .finance-summary,
  .finance-period-filter,
  .router-health-grid {
    grid-template-columns: 1fr;
  }
}

#billingView .billing-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.billing-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, .45fr) minmax(145px, .42fr) minmax(145px, .42fr);
  align-items: end;
}

.billing-filter-bar .table-search,
.billing-filter-bar select {
  width: 100%;
}

.compact-date-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.compact-date-field input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.payment-gateway-panel {
  margin-top: 18px;
}

.payment-gateway-panel .panel-header select {
  min-width: 210px;
}

.payment-gateway-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.payment-channel-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafb;
}

.payment-channel-card strong,
.payment-channel-card small {
  display: block;
}

.payment-channel-card strong {
  font-size: 10px;
}

.payment-channel-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.embedded-table {
  box-shadow: none;
}

.payment-transaction-row {
  grid-template-columns: .8fr 1.15fr .7fr .9fr 1fr .8fr .8fr minmax(150px, 1fr);
}

.payment-transaction-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.payment-print-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.payment-print-summary.full,
.payment-print-format-grid.full {
  grid-column: 1 / -1;
}

.payment-print-summary > span {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fafc;
}

.payment-print-summary small,
.payment-print-summary strong,
.payment-print-summary em {
  display: block;
}

.payment-print-summary small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.payment-print-summary strong {
  margin-top: 5px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-print-summary em {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-print-format-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.payment-print-format-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.payment-print-format-grid article > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 10px;
  color: var(--blue);
  background: #eaf1ff;
}

.payment-print-format-grid article:nth-child(2) > span {
  color: #168258;
  background: #e4f6ee;
}

.payment-print-format-grid article:nth-child(3) > span {
  color: #7a4ac7;
  background: #f0ebff;
}

.payment-print-format-grid svg {
  width: 15px;
  height: 15px;
}

.payment-print-format-grid strong,
.payment-print-format-grid small {
  display: block;
}

.payment-print-format-grid strong {
  font-size: 10px;
}

.payment-print-format-grid small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
}

.activity-log-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.activity-log-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(150px, .48fr)) repeat(2, minmax(140px, .42fr));
  align-items: end;
}

.activity-log-filters .table-search,
.activity-log-filters select {
  width: 100%;
}

.activity-log-row {
  grid-template-columns: .9fr 1fr minmax(220px, 1.7fr) 1fr .8fr .65fr;
}

.activity-module-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.activity-module-cell .event-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.activity-module-cell .event-icon svg {
  width: 14px;
  height: 14px;
}

.activity-module-cell strong,
.activity-module-cell small {
  display: block;
}

.activity-module-cell strong {
  font-size: 9px;
}

.activity-module-cell small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1450px) {
  #billingView .billing-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #customersView .customer-summary,
  #customerMapView .customer-map-summary,
  #plansView .plan-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plan-filter-bar,
  .customer-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plan-filter-bar .table-search,
  .customer-filter-bar .table-search {
    grid-column: 1 / -1;
  }

  .activity-log-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .activity-log-filters .table-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1000px) {
  .billing-filter-bar,
  .payment-gateway-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #customersView .customer-summary,
  #customerMapView .customer-map-summary,
  #plansView .plan-summary,
  .plan-filter-bar,
  .customer-filter-bar,
  .customer-map-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-map-filter-bar .table-search {
    grid-column: 1 / -1;
  }

  .customer-management-layout {
    grid-template-columns: 1fr;
  }

  .customer-profile-panel {
    position: static;
  }

  .customer-profile-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-network-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-map-layout {
    grid-template-columns: 1fr;
  }

  .customer-map-directory {
    max-height: none;
  }

  .customer-map-list {
    max-height: 420px;
  }
}

@media (max-width: 600px) {
  #billingView .billing-summary,
  #customersView .customer-summary,
  #customerMapView .customer-map-summary,
  #plansView .plan-summary,
  .billing-filter-bar,
  .payment-gateway-summary,
  .payment-print-summary,
  .payment-print-format-grid,
  .activity-log-summary,
  .activity-log-filters,
  .plan-filter-bar,
  .customer-filter-bar,
  .customer-map-filter-bar,
  .customer-map-missing-list,
  .plan-performance {
    grid-template-columns: 1fr;
  }

  .plan-filter-bar .table-search,
  .customer-filter-bar .table-search,
  .customer-map-filter-bar .table-search {
    grid-column: auto;
  }

  .customer-map-canvas-wrap,
  .customer-map-canvas {
    min-height: 460px;
  }

  .customer-map-legend {
    top: 10px;
    right: 10px;
    left: 10px;
    justify-content: center;
  }

  .customer-map-missing-item {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-profile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-profile-meta {
    grid-template-columns: 1fr;
  }

  .customer-timeline-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .customer-timeline-row time {
    grid-column: 2;
  }

  .activity-log-filters .table-search {
    grid-column: auto;
  }

  .payment-gateway-panel .panel-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .incident-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .incident-workspace {
    grid-template-columns: 1fr;
  }

  .incident-list {
    max-height: none;
  }
}

@media (max-width: 620px) {
  .incident-summary,
  .incident-info-grid {
    grid-template-columns: 1fr;
  }

  .incident-detail-head,
  .incident-update-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
.ai-panel textarea {
  width: 100%;
  margin-top: 14px;
  resize: vertical;
}

.ai-chat-output {
  min-height: 88px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface-alt, #f5f7fb);
  color: var(--text, #223047);
  line-height: 1.5;
  white-space: pre-wrap;
}
.network-range-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  align-items: center;
}

.network-range-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid #cfe0fb;
  border-radius: 8px;
  background: #f5f9ff;
  color: #244b78;
  font-size: 0.82rem;
}

.gpon-live-readings { display: grid; gap: 7px; margin-top: 12px; padding: 10px; border: 1px solid #dbe6f4; border-radius: 10px; background: #f8fbff; font-size: 10px; }
.gpon-live-readings > div { display: flex; flex-wrap: wrap; gap: 6px; }
.gpon-live-readings span { padding: 5px 7px; border-radius: 7px; background: #fff; color: #395271; }

/* Mobile layout guardrails: preserve each module inside the viewport. */
@media (max-width: 700px) {
  body:not(.auth-pending) {
    overflow-x: clip;
  }

  .app-shell,
  .main-content,
  .view,
  .panel,
  .section-toolbar,
  .topbar,
  .topbar-left,
  .topbar-actions,
  .table-card,
  .filter-bar {
    min-width: 0;
    max-width: 100%;
  }

  .view {
    padding: 16px 14px 32px;
  }

  .topbar {
    min-height: 64px;
    gap: 8px;
    padding: 12px 14px;
  }

  .topbar-left {
    overflow: hidden;
  }

  .topbar h1,
  .topbar .page-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel {
    padding: 15px;
    border-radius: 14px;
  }

  .section-toolbar,
  .panel-header {
    gap: 10px;
  }

  .filter-bar,
  .plan-filter-bar,
  .customer-filter-bar,
  .billing-filter-bar,
  .customer-map-filter-bar,
  .tvbox-filter-bar,
  .activity-log-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .filter-bar > *,
  .plan-filter-bar > *,
  .customer-filter-bar > *,
  .billing-filter-bar > *,
  .customer-map-filter-bar > *,
  .tvbox-filter-bar > *,
  .activity-log-filters > * {
    min-width: 0;
    width: 100%;
  }

  .data-table {
    max-width: 100%;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  .table-card {
    overflow: hidden;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 8px);
    margin: 0;
    border-radius: 18px 18px 0 0;
  }

  .modal-header,
  .modal-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-footer {
    display: flex;
    flex-wrap: wrap;
  }

  .modal-footer button {
    min-width: 0;
    flex: 1 1 130px;
  }
}

/* Final plan catalogue layout: overrides legacy plan-card sizing rules. */
#plansView .plan-grid {
  display: grid;
  gap: 10px;
  overflow: visible;
  border: 0;
  background: transparent;
}

#plansView .plan-list-row {
  display: grid;
  grid-template-columns: minmax(235px, 1.25fr) repeat(3, minmax(128px, .7fr) ) minmax(165px, .8fr) auto;
  gap: 10px 16px;
  min-height: 0;
  padding: 14px 16px 14px 20px;
  border: 1px solid #e1e8f3;
  border-radius: 12px;
  background: linear-gradient(90deg, #ffffff 0%, #fbfcff 100%);
}

#plansView .plan-list-row > div:not(.plan-list-actions) { min-width: 0; }
#plansView .plan-list-row strong { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
#plansView .plan-list-name { align-self: stretch; padding-right: 12px; border-right: 1px solid #edf1f6; }
#plansView .plan-list-name strong { font-size: 15px; }
#plansView .plan-list-actions { display: grid; grid-template-columns: repeat(2, minmax(92px, 1fr)); gap: 6px; min-width: 204px; padding-left: 12px; border-left: 1px solid #edf1f6; }
#plansView .plan-list-actions button { min-height: 31px; padding: 6px 8px; white-space: nowrap; }

@media (max-width: 1500px) {
  #plansView .plan-list-row { grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(120px, .7fr)) auto; }
  #plansView .plan-list-row > div:nth-child(5) { grid-column: 1 / span 2; padding-top: 3px; }
}

@media (max-width: 1080px) {
  #plansView .plan-list-row { grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(135px, .7fr)); }
  #plansView .plan-list-status { justify-items: start; }
  #plansView .plan-list-actions { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(110px, 1fr)); min-width: 0; padding: 10px 0 0; border-top: 1px solid #edf1f6; border-left: 0; }
}

@media (max-width: 680px) {
  #plansView .plan-list-row { grid-template-columns: 1fr 1fr; padding: 13px 14px 14px 18px; }
  #plansView .plan-list-name, #plansView .plan-list-row > div:nth-child(5) { grid-column: 1 / -1; padding-right: 0; border-right: 0; }
  #plansView .plan-list-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Provisionamiento Inteligente: estado de preparación antes de la alta guiada. */
.ztp-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ztp-capability {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #e2e9f4;
  border-radius: 12px;
  background: #fbfcff;
}

.ztp-capability strong,
.ztp-capability small { display: block; }
.ztp-capability strong { font-size: 13px; color: #253550; }
.ztp-capability small { margin-top: 3px; color: #72819a; font-size: 11px; line-height: 1.35; }
.ztp-capability b { padding: 4px 7px; border-radius: 999px; font-size: 10px; white-space: nowrap; }
.ztp-capability.ready b { color: #14734d; background: #e5f7ee; }
.ztp-capability.pending b { color: #a45713; background: #fff0df; }
.ztp-table-row { grid-template-columns: minmax(185px, 1fr) minmax(145px, .8fr) minmax(145px, .8fr) minmax(180px, 1fr) auto; }

@media (max-width: 1060px) {
  .ztp-capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .ztp-capability-grid { grid-template-columns: 1fr; }
  .ztp-table-row { min-width: 770px; }
}

/* GIS operativo: capas y ficha resumida dentro del mapa de red. */
#customerMapView .customer-map-filter-bar {
  grid-template-columns: minmax(250px, 1fr) 170px 200px;
}

.gis-layer-controls {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gis-layer-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid #dce5f0;
  border-radius: 999px;
  color: #50627a;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.gis-layer-controls input { accent-color: #3074f0; }
.gis-map-marker {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  color: #fff;
  background: #4d6e96;
  box-shadow: 0 5px 14px rgba(30, 54, 83, .28);
  transform: rotate(-45deg);
}
.gis-map-marker svg { width: 16px; height: 16px; transform: rotate(45deg); }
.gis-map-marker.nap { background: #0ea5a4; }
.gis-map-marker.olt { background: #6941c6; }
.gis-map-marker.node { background: #3074f0; }
.gis-map-marker.radio { background: #e77c30; }
.gis-map-marker.technician { background: #15945f; }

.gis-customer-detail {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #dce7f5;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7faff, #fff);
}
.gis-detail-head { display: flex; align-items: center; justify-content: space-between; }
.gis-customer-detail > strong { color: #243650; font-size: 14px; }
.gis-customer-detail > small { color: #71819a; font-size: 11px; }
.gis-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.gis-detail-grid span { min-width: 0; padding: 8px; border-radius: 8px; background: #eef4fb; }
.gis-detail-grid small, .gis-detail-grid b { display: block; }
.gis-detail-grid small { color: #71819a; font-size: 10px; }
.gis-detail-grid b { margin-top: 2px; overflow: hidden; color: #30445f; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.gis-detail-history { display: grid; gap: 4px; padding-top: 3px; border-top: 1px solid #e5edf7; }
.gis-detail-history small { color: #61738d; font-weight: 800; }
.gis-detail-history span, .gis-detail-no-photo { color: #71819a; font-size: 10px; line-height: 1.35; }
.gis-detail-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.gis-detail-photos img { width: 100%; height: 54px; object-fit: cover; border-radius: 7px; }
.gis-detail-empty { padding: 8px; color: #71819a; font-size: 11px; line-height: 1.45; }

@media (max-width: 780px) {
  #customerMapView .customer-map-filter-bar { grid-template-columns: 1fr; }
  .gis-layer-controls { grid-column: auto; }
}

/* Modern access interface overrides. */
.auth-screen {
  grid-template-columns: minmax(0, 1.16fr) minmax(420px, .84fr);
  background: #eef4fb;
}

.auth-visual {
  isolation: isolate;
  padding: clamp(32px, 5.8vw, 82px);
  background:
    radial-gradient(circle at 74% 19%, rgba(40, 201, 226, .28), transparent 24%),
    radial-gradient(circle at 8% 88%, rgba(80, 105, 255, .34), transparent 34%),
    linear-gradient(145deg, #071421 0%, #0b2946 52%, #123a62 100%);
}

.auth-visual::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(155, 225, 255, .18) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(135deg, rgba(0, 0, 0, .82), transparent 78%);
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, .82), transparent 78%);
  content: "";
}

.auth-brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  box-shadow: 0 18px 38px rgba(14, 130, 255, .32);
}

.auth-brand strong { font-size: 18px; letter-spacing: -.02em; }
.auth-visual-content { max-width: 650px; padding: 74px 0; }

.auth-kicker {
  padding: 8px 12px;
  border-color: rgba(123, 232, 251, .32);
  color: #a9f4ff;
  background: rgba(43, 177, 219, .12);
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.auth-visual-content h1 {
  max-width: 610px;
  font-size: clamp(38px, 4.4vw, 66px);
  line-height: 1.03;
}

.auth-visual-content > p { max-width: 570px; color: #c3d5e8; font-size: 15px; }
.auth-feature-grid { max-width: 620px; gap: 12px; }

.auth-feature-grid > span {
  min-height: 114px;
  padding: 17px;
  border-color: rgba(176, 225, 255, .15);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.auth-feature-grid i {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: #b4f4ff;
  background: rgba(65, 207, 232, .16);
}

.auth-feature-grid strong { font-size: 11px; }
.auth-feature-grid small { color: #aec2d8; font-size: 9px; }

.auth-form-side {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 76px);
  background:
    radial-gradient(circle at 100% 0, rgba(89, 159, 255, .18), transparent 37%),
    radial-gradient(circle at 0 100%, rgba(78, 207, 230, .1), transparent 32%),
    #f7faff;
}

.auth-form-side::before {
  position: absolute;
  top: 9%;
  right: -130px;
  width: 310px;
  height: 310px;
  border: 1px solid rgba(45, 116, 238, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 45px rgba(45, 116, 238, .025), 0 0 0 90px rgba(45, 116, 238, .018);
  content: "";
}

.login-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: min(430px, 100%);
  padding: clamp(28px, 3vw, 42px);
  border: 1px solid rgba(202, 216, 234, .9);
  border-radius: 26px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 28px 65px rgba(26, 64, 113, .14), inset 0 1px rgba(255, 255, 255, .85);
  backdrop-filter: blur(16px);
}

.login-card::before {
  position: absolute;
  top: 0;
  right: 30px;
  left: 30px;
  height: 3px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #2875ef, #35c8e8);
  content: "";
}

.login-heading { margin-bottom: 30px; }
.login-heading .section-kicker { color: #2675d8; letter-spacing: .13em; }
.login-heading h2 { margin-top: 10px; font-size: 34px; color: #122642; }
.login-heading p, .login-support { color: #667892; font-size: 12px; }
.login-field { gap: 8px; margin-bottom: 18px; color: #31445f; font-size: 12px; }

.login-input-wrap {
  min-height: 54px;
  padding: 0 15px;
  border-color: #dbe5f0;
  border-radius: 15px;
  background: rgba(248, 251, 255, .95);
}

.login-input-wrap:hover { border-color: #b9cce5; }
.login-input-wrap:focus-within { box-shadow: 0 0 0 4px rgba(43, 121, 232, .12); }
.login-input-wrap input { font-size: 14px; }

.login-submit {
  min-height: 54px;
  border-radius: 15px;
  background: linear-gradient(135deg, #1676ed, #2458d7);
  box-shadow: 0 14px 24px rgba(29, 96, 218, .24);
  font-size: 13px;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(29, 96, 218, .3);
}

.remember-session { margin-top: 2px; font-size: 11px; }
.forgot-password { margin-bottom: 18px; font-size: 11px; }
.initial-access { margin-top: 21px; border-radius: 14px; }
.login-support { margin-top: 18px; text-align: center; }

@media (max-width: 1120px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual { min-height: 420px; }
  .auth-visual-content { padding: 44px 0; }
  .auth-form-side { min-height: auto; }
}

@media (max-width: 600px) {
  .auth-visual { min-height: auto; padding: 20px; }
  .auth-form-side { padding: 24px 16px calc(28px + env(safe-area-inset-bottom)); }
  .auth-form-side::before { display: none; }
  .login-card {
    padding: 24px 20px;
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(26, 64, 113, .12);
  }
  .login-heading { margin-bottom: 24px; }
  .login-heading h2 { font-size: 29px; }
  .isp-logo-uses { grid-template-columns: 1fr; }
  .login-input-wrap { min-height: 54px; }
  .auth-mobile-intro { margin-bottom: 16px; }
}
