: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;
}

/* Dark mode high-specificity authority for module styles. */
html[data-theme="dark"] body .app-shell {
  --dark-canvas: #07111f;
  --dark-surface: #0f1b2c;
  --dark-surface-2: #142238;
  --dark-surface-3: #1a2a42;
  --dark-border: #2b3d57;
  --dark-text: #edf4fc;
  --dark-muted: #a7b6c9;
  color: var(--dark-text);
  background: var(--dark-canvas);
}

html[data-theme="dark"] body .app-shell .main-content,
html[data-theme="dark"] body .app-shell .view {
  color: var(--dark-text);
  background-color: var(--dark-canvas);
}

html[data-theme="dark"] body .app-shell .topbar {
  border-bottom-color: var(--dark-border);
  background: rgba(7, 17, 31, .94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] body .app-shell :is(
  .panel, .table-card, .panel-card, .summary-card, .customer-record-card,
  .customer-network-card, .customer-profile-panel, .settings-section,
  .integration-card, .message-compose-panel, .message-history-panel,
  .automation-card, .incident-card, .network-card, .plan-grid
) {
  color: var(--dark-text);
  border-color: var(--dark-border) !important;
  background: var(--dark-surface) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

html[data-theme="dark"] body .app-shell :is(
  .panel-header, .modal-header, .modal-footer, .section-toolbar,
  .customer-filter-bar, .customer-profile-head, .customer-profile-section,
  .customer-profile-tabs, .customer-invoice-filters, .customer-account-health,
  .customer-record-card-head, .customer-network-head, .notification-panel
) {
  color: var(--dark-text);
  border-color: var(--dark-border) !important;
  background: var(--dark-surface-2) !important;
}

html[data-theme="dark"] body .app-shell :is(
  h1, h2, h3, h4, h5, .page-title, .panel-header h3,
  .section-toolbar h2, .summary-card strong, .customer-profile-identity h3,
  .customer-record-card-head h4, .service-section-title
) {
  color: var(--dark-text) !important;
}

html[data-theme="dark"] body .app-shell :is(
  p, small, .muted, .form-hint, .cell-sub, .section-toolbar p,
  .summary-card > span:last-child > span, .customer-profile-identity p,
  .customer-record-card-head small, .customer-invoice-row small,
  .customer-timeline-row small, .customer-notes p
) {
  color: var(--dark-muted) !important;
}

html[data-theme="dark"] body .app-shell :is(
  input, select, textarea, .global-search, .table-search,
  .customer-column-filter, .customer-filter-bar select
) {
  color: var(--dark-text) !important;
  border-color: #344a67 !important;
  background: #0a1626 !important;
}

html[data-theme="dark"] body .app-shell :is(input, textarea)::placeholder {
  color: #7f91a8;
  opacity: 1;
}

html[data-theme="dark"] body .app-shell :is(.form-field label, .form-field > span:first-child) {
  color: #c7d4e4 !important;
}

html[data-theme="dark"] body .app-shell :is(
  .data-table, .customer-record-table, .table-row, .customer-table-row,
  .customer-invoice-row, .customer-timeline-row, .list-row
) {
  color: #dce7f5;
  border-color: var(--dark-border) !important;
  background-color: var(--dark-surface) !important;
}

html[data-theme="dark"] body .app-shell :is(
  .table-row.header, .customer-table-row.header, .customer-filter-row,
  .data-table thead, .customer-record-table th, .plan-table-header
) {
  color: #b8c6d8 !important;
  border-color: var(--dark-border) !important;
  background: #192940 !important;
}

html[data-theme="dark"] body .app-shell :is(
  .table-row:not(.header), .customer-table-row:not(.header),
  .customer-record-table tbody tr, .customer-invoice-row
):nth-child(even) {
  background-color: #111f32 !important;
}

html[data-theme="dark"] body .app-shell :is(
  .table-row:not(.header), .customer-table-row:not(.header),
  .customer-record-table tbody tr
):hover {
  background-color: #1a2d47 !important;
}

html[data-theme="dark"] body .app-shell :is(
  .customer-profile-tabs button, .customer-invoice-filters button,
  .secondary-button, .icon-button, .row-action, .customer-profile-close
) {
  color: #dce8f7;
  border-color: #38506f;
  background: #172840;
}

html[data-theme="dark"] body .app-shell :is(
  .customer-profile-tabs button.active, .customer-invoice-filters button.active
) {
  color: #ffffff;
  border-color: #3d83ed;
  background: #2368ca !important;
}

html[data-theme="dark"] body .app-shell :is(
  a, .customer-name-link, .customer-service-ip-link, .link-button
) {
  color: #70adff !important;
}

html[data-theme="dark"] body .app-shell #customersView .customer-name-link {
  color: #86bbff !important;
}

html[data-theme="dark"] body .app-shell #plansView .plan-grid,
html[data-theme="dark"] body .app-shell #plansView .plan-list-row {
  color: var(--dark-text);
  border-color: var(--dark-border);
  background: var(--dark-surface) !important;
}

html[data-theme="dark"] body .app-shell #plansView .plan-list-row:nth-child(odd) {
  background: #132137 !important;
}

html[data-theme="dark"] body .app-shell #plansView .plan-list-row:hover {
  background: #1a2d47 !important;
}

html[data-theme="dark"] body .app-shell #customersView .section-toolbar {
  background: radial-gradient(circle at 92% 10%, rgba(42, 130, 237, .14), transparent 28%), var(--dark-surface) !important;
}

html[data-theme="dark"] body .app-shell #customersView :is(
  .summary-card, .customer-filter-bar, .customer-table-row:not(.header),
  .customer-profile-section:not([hidden])
) {
  color: var(--dark-text);
  border-color: var(--dark-border);
  background: var(--dark-surface) !important;
}

html[data-theme="dark"] body .app-shell #customersView .customer-table-row:not(.header):nth-of-type(even) {
  background: #111f32 !important;
}

html[data-theme="dark"] body .modal-backdrop .modal {
  color: var(--dark-text);
  border-color: var(--dark-border);
  background: var(--dark-surface);
}

html[data-theme="dark"] body .modal-backdrop .modal :is(input, select, textarea) {
  color: var(--dark-text);
  border-color: #344a67;
  background: #0a1626;
}

html[data-theme="dark"] body .modal-backdrop .modal :is(
  .form-field label, .form-field > span:first-child, label, .modal-header h2
) {
  color: #d6e2f1 !important;
}

html[data-theme="dark"] body .app-shell .pagination button:not(.active),
html[data-theme="dark"] body .app-shell .customer-pagination button:not(.active) {
  color: #d5e2f2;
  border-color: #344a67;
  background: #14243a;
}

@media (max-width: 760px) {
  html[data-theme="dark"] body .app-shell #customersView .customer-table-row:not(.header):not(.customer-filter-row) > span {
    border-color: var(--dark-border);
  }

  html[data-theme="dark"] body .app-shell #customersView .customer-table-row:not(.header):not(.customer-filter-row) > span::before {
    color: #91a3ba;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --dark-canvas: #07111f;
  --dark-surface: #0f1b2c;
  --dark-surface-2: #142238;
  --dark-surface-3: #1a2a42;
  --dark-border: #2b3d57;
  --dark-text: #edf4fc;
  --dark-muted: #a7b6c9;
  --ink: #e5edf8;
  --muted: #91a2ba;
  --line: #25364d;
  --surface: #101b2b;
  --panel: #101b2b;
  --canvas: #07111f;
  --ink-950: #eef4fc;
  --ink-800: #d2deed;
  --ink-600: #91a2ba;
  --border: #25364d;
  --elevation-1: 0 1px 2px rgba(0, 0, 0, .25), 0 8px 24px rgba(0, 0, 0, .22);
  --elevation-2: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 45px rgba(0, 0, 0, .3);
}

:root[data-theme="dark"] body {
  background: radial-gradient(circle at 88% 0, rgba(43, 130, 237, .1), transparent 28%), var(--canvas);
}

:root[data-theme="dark"] .topbar {
  border-bottom-color: var(--border);
  background: rgba(7, 17, 31, .9);
}

:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .table-card,
:root[data-theme="dark"] .panel-card,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .quick-modal,
:root[data-theme="dark"] .metric-card,
:root[data-theme="dark"] .global-search,
:root[data-theme="dark"] .table-search,
:root[data-theme="dark"] .notification-panel,
:root[data-theme="dark"] .customer-profile-shell,
:root[data-theme="dark"] .customer-profile-section,
:root[data-theme="dark"] .integration-card {
  color: var(--ink-950);
  border-color: var(--border) !important;
  background-color: var(--panel) !important;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  color: var(--ink-950);
  border-color: #31445e;
  background: #0b1625;
}

:root[data-theme="dark"] .table-row.header,
:root[data-theme="dark"] .data-table thead,
:root[data-theme="dark"] .app-shell .table-row.header {
  color: #a9b8ca;
  background: #142238;
}

:root[data-theme="dark"] .table-row,
:root[data-theme="dark"] .data-table td,
:root[data-theme="dark"] .data-table th,
:root[data-theme="dark"] .list-row {
  border-color: var(--border);
}

:root[data-theme="dark"] .table-row:not(.header):hover,
:root[data-theme="dark"] .app-shell .table-row:not(.header):hover {
  background: #142238;
}

:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .row-action {
  color: #d8e4f3;
  border-color: #31445e;
  background: #132137;
}

.theme-toggle { flex: 0 0 auto; }

/* NetControl Enterprise UI 2.0: lenguaje visual unificado para todo el CRM. */
:root {
  --brand-700: #1559c6;
  --brand-600: #1f6fe5;
  --brand-500: #2b82ed;
  --accent-500: #22b8cf;
  --success-600: #14845b;
  --warning-600: #c66a16;
  --danger-600: #cc3f4d;
  --ink-950: #0d1b2d;
  --ink-800: #24354d;
  --ink-600: #5d6f87;
  --border: #dce5ef;
  --panel: #ffffff;
  --canvas: #f3f6fa;
  --focus-ring: 0 0 0 4px rgba(31, 111, 229, .13);
  --elevation-1: 0 1px 2px rgba(16, 39, 70, .04), 0 7px 22px rgba(16, 39, 70, .055);
  --elevation-2: 0 2px 4px rgba(16, 39, 70, .05), 0 18px 45px rgba(16, 39, 70, .1);
}

html { background: var(--canvas); }

body {
  color: var(--ink-950);
  background: radial-gradient(circle at 88% 0, rgba(54, 143, 235, .055), transparent 27%), var(--canvas);
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
}

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

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

/* Acceso empresarial. */
.auth-screen { isolation: isolate; }
.auth-visual { min-height: 100dvh; border-right: 1px solid rgba(255, 255, 255, .08); }
.auth-brand { position: relative; z-index: 2; gap: 14px; }
.auth-brand span:last-child, .auth-visual-content, .auth-feature-grid { position: relative; z-index: 2; }
.auth-brand small { margin-top: 3px; color: #94aac3; letter-spacing: .04em; }

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(99, 218, 238, .18);
  border-radius: 999px;
  color: #83e2f2;
  background: rgba(36, 184, 213, .08);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}

.auth-visual-content p { max-width: 660px; color: #b6c8dc; font-size: clamp(14px, 1.3vw, 17px); line-height: 1.7; }
.auth-form-side { align-items: center; }

.login-card {
  border-color: rgba(196, 211, 229, .9);
  box-shadow: 0 30px 80px rgba(22, 54, 92, .16), 0 2px 8px rgba(22, 54, 92, .05);
}

.login-card::after {
  position: absolute;
  right: -55px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(41, 132, 237, .08), transparent 68%);
  pointer-events: none;
  content: "";
}

.login-heading h2 { letter-spacing: -.035em; line-height: 1.08; }
.login-field > span:first-child { color: #31445e; font-weight: 700; }
.login-input-wrap { transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.login-input-wrap:focus-within { background: #fff; box-shadow: var(--focus-ring); }
.login-submit { transition: transform .16s ease, box-shadow .16s ease, filter .16s ease; }
.login-submit:active { transform: translateY(0) scale(.99); }

/* Navegacion y cabecera. */
.sidebar { z-index: 50; }
.brand strong { color: #f7fbff; font-family: Manrope, "DM Sans", sans-serif; font-size: 15px; letter-spacing: -.02em; }
.brand span { color: #7890aa; font-size: 9px; letter-spacing: .04em; }

.nav-section-label { position: relative; width: calc(100% - 18px); text-align: left; }
.nav-section-label::after {
  position: absolute;
  top: 50%;
  right: 1px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid #637a95;
  border-bottom: 1.5px solid #637a95;
  transform: translateY(-65%) rotate(45deg);
  transition: transform .16s ease;
  content: "";
}
.nav-section-label[aria-expanded="false"]::after { transform: translateY(-20%) rotate(-135deg); }

.nav-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}
.nav-item.active .nav-icon { background: rgba(75, 211, 235, .12); }
.nav-count { border-radius: 999px; font-variant-numeric: tabular-nums; }
.topbar { position: sticky; top: 0; z-index: 35; }
.eyebrow { margin-bottom: 3px; color: #71839a; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.topbar h1 { color: var(--ink-950); font-family: Manrope, "DM Sans", sans-serif; letter-spacing: -.035em; }
.global-search { background: rgba(255, 255, 255, .95); }
.global-search:focus-within { border-color: var(--brand-500); box-shadow: var(--focus-ring); }
.icon-button { border-color: #dce5ef; border-radius: 12px; background: #fff; box-shadow: 0 4px 12px rgba(19, 45, 77, .045); }

/* Componentes de contenido. */
.view { animation: enterprise-view-in .18s ease both; }
@keyframes enterprise-view-in { from { opacity: .2; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.panel, .table-card, .panel-card {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--elevation-1);
}

.panel-header { gap: 14px; min-height: 65px; padding: 16px 18px; border-bottom: 1px solid #e8eef5; }
.panel-header h3 { color: #172a43; font-family: Manrope, "DM Sans", sans-serif; letter-spacing: -.025em; }
.section-kicker { color: #71839a; font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.metric-grid { gap: 14px; }

.metric-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: linear-gradient(150deg, #fff, #f9fbfe);
  box-shadow: var(--elevation-1);
}

.metric-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-600), var(--accent-500));
  content: "";
}

.primary-button, .secondary-button, .ghost-button, .text-button {
  border-radius: 11px;
  font-weight: 700;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.primary-button { background: linear-gradient(135deg, var(--brand-700), var(--brand-500)); box-shadow: 0 9px 18px rgba(31, 111, 229, .18); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 12px 23px rgba(31, 111, 229, .24); }

.form-field input, .form-field select, .form-field textarea, .table-search input {
  border-color: #d9e3ee;
  border-radius: 11px;
  background: #fbfcfe;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .table-search input:focus {
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: var(--focus-ring);
}
.form-field label, .form-field > span:first-child { color: #3a4c64; font-weight: 700; }
.data-table { border-color: #e2e9f1; border-radius: 13px; }
.table-row.header { color: #61738b; background: #f5f8fb; font-size: 9px; letter-spacing: .08em; }
.table-row:not(.header) { border-bottom-color: #e9eef4; transition: background .12s ease; }
.table-row:not(.header):hover { background: #f5f9ff; }

.modal, .quick-modal {
  border: 1px solid rgba(211, 222, 235, .95);
  border-radius: 20px;
  box-shadow: 0 35px 100px rgba(10, 28, 52, .25);
}
.modal-overlay, .quick-modal-overlay { background: rgba(8, 20, 38, .54); backdrop-filter: blur(5px); }
.status-pill, .badge { font-weight: 800; letter-spacing: .025em; }

/* Perfil de cliente: legible, compacto y adaptable. */
#customersView .customer-profile-tabs {
  position: sticky;
  top: 92px;
  z-index: 12;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
#customersView .customer-profile-tabs button { min-height: 38px; border-radius: 9px; white-space: nowrap; }
#customersView .customer-profile-tabs button.active { color: #102642; background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .16); }

@media (max-width: 1180px) {
  .topbar { padding-right: 20px; padding-left: 20px; }
  .view { padding-right: 20px; padding-left: 20px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .auth-visual { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .auth-brand { justify-content: center; }
  .auth-brand span:last-child { text-align: left; }
  .login-card { border-radius: 18px; box-shadow: 0 18px 44px rgba(18, 45, 79, .13); }
  .topbar { position: sticky; display: grid; gap: 10px; }
  .topbar-left, .topbar-actions { min-width: 0; }
  .topbar-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
  .global-search { grid-column: 1; width: 100%; }
  .global-search kbd { display: none; }
  .topbar .primary-button { min-width: 42px; padding: 0 11px; }
  .topbar .primary-button > span:last-child { display: none; }
  .view { padding: 15px 10px 34px; }
  .metric-grid { grid-template-columns: 1fr; gap: 10px; }
  .panel, .table-card, .panel-card { border-radius: 14px; }
  .panel-header { min-height: 58px; padding: 13px 14px; }
  .data-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-row { min-width: max-content; }
  #customersView .customer-profile-tabs { top: 72px; margin-right: -4px; margin-left: -4px; border-radius: 12px; }
  .modal, .quick-modal { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 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));
  }
}

/* Catálogo compacto de planes: acciones visibles sin desplazamiento horizontal. */
#plansView .plan-filter-bar {
  align-items: center;
}

#plansView .plan-create-inline {
  min-height: 40px;
  white-space: nowrap;
}

#plansView .plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#plansView .plan-catalog-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #dfe7f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(30, 54, 87, .055);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#plansView .plan-catalog-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: #3074f0;
}

#plansView .plan-catalog-card.featured::before { background: #8b5cf6; }
#plansView .plan-catalog-card.plan-inactive { background: #f8fafc; opacity: .82; }
#plansView .plan-catalog-card:hover { transform: translateY(-1px); border-color: #c8d8ee; box-shadow: 0 12px 26px rgba(30, 54, 87, .09); }

#plansView .plan-catalog-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

#plansView .plan-catalog-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #2465d4;
  background: #eaf2ff;
}

#plansView .plan-catalog-icon svg { width: 20px; height: 20px; }
#plansView .plan-catalog-title { display: grid; min-width: 0; gap: 2px; }
#plansView .plan-catalog-title small { color: #4772ad; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
#plansView .plan-catalog-title strong { color: #17253a; font-size: 16px; line-height: 1.2; overflow-wrap: anywhere; }
#plansView .plan-catalog-title em { color: #78879a; font-size: 10px; font-style: normal; }

#plansView .plan-catalog-price { display: flex; align-items: baseline; gap: 7px; }
#plansView .plan-catalog-price strong { color: #17253a; font-size: 22px; letter-spacing: -.035em; }
#plansView .plan-catalog-price span { color: #7a8899; font-size: 11px; font-weight: 700; }

#plansView .plan-catalog-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

#plansView .plan-catalog-metrics > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f5f8fc;
}

#plansView .plan-catalog-metrics small { color: #7b899b; font-size: 9px; font-weight: 800; text-transform: uppercase; }
#plansView .plan-catalog-metrics strong { color: #26364b; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
#plansView .plan-catalog-profile { display: flex; flex-wrap: wrap; gap: 6px; color: #5d6f84; font-size: 10px; font-weight: 700; }
#plansView .plan-catalog-profile span { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid #e4ebf3; border-radius: 999px; }
#plansView .plan-catalog-profile svg { width: 12px; height: 12px; }

#plansView .plan-catalog-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding-top: 11px;
  border-top: 1px solid #edf1f6;
}

#plansView .plan-catalog-actions button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 33px;
  padding: 6px;
  font-size: 10px;
  white-space: nowrap;
}

#plansView .plan-catalog-actions button svg { width: 13px; height: 13px; }
#plansView .plan-delete-locked { color: #8c97a5; border-color: #dfe5ec; background: #f4f6f8; }

@media (max-width: 1180px) {
  #plansView .plan-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  #plansView .plan-create-inline { width: 100%; }
  #plansView .plan-catalog-card { padding: 14px 13px 13px 16px; }
  #plansView .plan-catalog-head { grid-template-columns: 38px minmax(0, 1fr); }
  #plansView .plan-catalog-head > .status-badge { grid-column: 2; justify-self: start; }
  #plansView .plan-catalog-icon { width: 38px; height: 38px; }
  #plansView .plan-catalog-metrics { grid-template-columns: 1fr 1fr; }
  #plansView .plan-catalog-metrics > span:last-child { grid-column: 1 / -1; }
  #plansView .plan-catalog-actions { grid-template-columns: 1fr 1fr; }
}

/* Planes y Servicios: catálogo desplegable compacto y usable en móvil. */
#plansView .plan-grid {
  display: grid;
  gap: 9px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#plansView .plan-accordion {
  overflow: hidden;
  border: 1px solid #dfe7f1;
  border-left: 4px solid #3074f0;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(30, 54, 87, .045);
}

#plansView .plan-accordion.featured { border-left-color: #8b5cf6; }
#plansView .plan-accordion.plan-inactive { opacity: .78; background: #f8fafc; }
#plansView .plan-accordion[open] { border-color: #bfd2ec; box-shadow: 0 10px 24px rgba(30, 54, 87, .08); }

#plansView .plan-accordion > summary {
  display: grid;
  grid-template-columns: 42px minmax(230px, 1.4fr) minmax(130px, .65fr) minmax(185px, .85fr) auto;
  gap: 13px;
  align-items: center;
  min-height: 72px;
  padding: 11px 15px;
  cursor: pointer;
  list-style: none;
}

#plansView .plan-accordion > summary::-webkit-details-marker { display: none; }
#plansView .plan-accordion > summary:hover { background: #f7faff; }
#plansView .plan-accordion-name,
#plansView .plan-accordion-value { display: grid; min-width: 0; gap: 2px; }
#plansView .plan-accordion-name small { color: #4772ad; font-size: 10px; font-weight: 800; text-transform: uppercase; }
#plansView .plan-accordion-name strong { color: #17253a; font-size: 15px; overflow-wrap: anywhere; }
#plansView .plan-accordion-name em,
#plansView .plan-accordion-value em { color: #78879a; font-size: 10px; font-style: normal; }
#plansView .plan-accordion-value small { color: #7b899b; font-size: 9px; font-weight: 800; text-transform: uppercase; }
#plansView .plan-accordion-value strong { color: #26364b; font-size: 13px; overflow-wrap: anywhere; }
#plansView .plan-accordion-status { display: flex; gap: 9px; align-items: center; justify-content: flex-end; }
#plansView .plan-accordion-status > svg { width: 17px; transition: transform .18s ease; }
#plansView .plan-accordion[open] .plan-accordion-status > svg { transform: rotate(180deg); }

#plansView .plan-accordion-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px;
  padding: 13px 15px 15px;
  border-top: 1px solid #edf1f6;
  background: #fbfcfe;
}

#plansView .plan-accordion-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

#plansView .plan-accordion-details > span { display: grid; gap: 3px; padding: 9px 10px; border-radius: 9px; background: #f1f5fa; }
#plansView .plan-accordion-details small { color: #7b899b; font-size: 9px; font-weight: 800; text-transform: uppercase; }
#plansView .plan-accordion-details strong { color: #26364b; font-size: 11px; overflow-wrap: anywhere; }
#plansView .plan-accordion-actions { display: grid; grid-template-columns: repeat(2, minmax(105px, 1fr)); gap: 7px; align-content: center; }
#plansView .plan-accordion-actions button { display: inline-flex; gap: 5px; align-items: center; justify-content: center; min-height: 34px; padding: 6px 9px; font-size: 10px; white-space: nowrap; }
#plansView .plan-accordion-actions button svg { width: 13px; }

html[data-theme="dark"] body .app-shell #plansView .plan-accordion { color: var(--dark-text); border-color: var(--dark-border); background: var(--dark-surface); }
html[data-theme="dark"] body .app-shell #plansView .plan-accordion > summary:hover,
html[data-theme="dark"] body .app-shell #plansView .plan-accordion-body { background: #132137; }
html[data-theme="dark"] body .app-shell #plansView .plan-accordion-name strong,
html[data-theme="dark"] body .app-shell #plansView .plan-accordion-value strong,
html[data-theme="dark"] body .app-shell #plansView .plan-accordion-details strong { color: var(--dark-text); }
html[data-theme="dark"] body .app-shell #plansView .plan-accordion-details > span { background: #182941; }

@media (max-width: 900px) {
  #plansView .plan-accordion > summary { grid-template-columns: 38px minmax(0, 1fr) auto; }
  #plansView .plan-accordion-value { display: none; }
  #plansView .plan-accordion-body { grid-template-columns: 1fr; }
  #plansView .plan-accordion-details { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  #plansView .plan-accordion > summary { gap: 9px; padding: 10px; }
  #plansView .plan-accordion-status .status-badge { display: none; }
  #plansView .plan-accordion-details { grid-template-columns: 1fr; }
  #plansView .plan-accordion-actions { grid-template-columns: 1fr 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;
}

body.session-checking {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 42%, rgba(48, 116, 240, .08), transparent 28%),
    #f7f9fc;
}

body.session-checking .auth-screen {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

body.session-checking::before,
body.session-checking::after {
  position: fixed;
  z-index: 120;
  left: 50%;
  content: "";
  transform: translateX(-50%);
}

body.session-checking::before {
  top: calc(50% - 28px);
  width: 42px;
  height: 42px;
  border: 4px solid #dce6f5;
  border-top-color: #3074f0;
  border-radius: 50%;
  animation: session-loader-spin .8s linear infinite;
}

body.session-checking::after {
  top: calc(50% + 31px);
  content: "Preparando NetControl...";
  color: #52647c;
  font: 600 12px/1.2 "DM Sans", sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
}

@keyframes session-loader-spin {
  to { transform: translateX(-50%) rotate(360deg); }
}

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

/* The access form appears only after the server confirms there is no active session. */

.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)); }
}

/* Centro multiagente de mensajería, integrado a la operación ISP. */
.wa-shell { display: grid; gap: 14px; min-width: 0; }
.wa-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border: 1px solid #dce6ef; border-radius: 18px; background: linear-gradient(135deg,#fff 0%,#f5fbfa 58%,#eef8f4 100%); box-shadow: 0 10px 30px rgba(24,54,74,.06); }
.wa-header h2 { margin: 3px 0 2px; font-size: 25px; }
.wa-header p { margin: 0; color: var(--muted); font-size: 11px; }
.wa-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.wa-header-actions button { min-height: 36px; padding: 7px 11px; font-size: 11px; }
.wa-live-state { display: inline-flex; align-items: center; gap: 7px; margin-right: 5px; color: #406052; font-size: 10px; font-weight: 750; }
.wa-live-state i { width: 8px; height: 8px; border-radius: 50%; background: #20b26b; box-shadow: 0 0 0 4px rgba(32,178,107,.12); }
.wa-tabs { display: flex; align-items: center; gap: 5px; padding: 5px; width: fit-content; border: 1px solid #dfe7ee; border-radius: 12px; background: #f4f7f9; }
.wa-tabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 12px; border: 0; border-radius: 8px; color: #607082; background: transparent; font-size: 11px; font-weight: 750; }
.wa-tabs button svg { width: 14px; height: 14px; }
.wa-tabs button b { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 9px; background: #dfe7ee; font-size: 9px; }
.wa-tabs button.active { color: #116149; background: #fff; box-shadow: 0 3px 10px rgba(29,55,75,.1); }
.wa-tabs button.active b { color: #fff; background: #20a66a; }
.wa-inbox-grid { display: grid; grid-template-columns: minmax(275px, .82fr) minmax(390px, 1.45fr) minmax(245px, .78fr); min-height: 670px; overflow: hidden; border: 1px solid #dbe5ed; border-radius: 18px; background: #fff; box-shadow: 0 14px 34px rgba(27,54,75,.07); }
.wa-conversation-panel { display: grid; grid-template-rows: auto auto auto minmax(0,1fr); min-width: 0; border-right: 1px solid #e2e9ef; background: #fbfcfd; }
.wa-search { display: flex; align-items: center; gap: 8px; margin: 13px 13px 9px; padding: 0 11px; border: 1px solid #dbe4eb; border-radius: 10px; background: #fff; }
.wa-search svg { width: 15px; color: #8290a0; }
.wa-search input { min-width: 0; width: 100%; height: 38px; padding: 0; border: 0; outline: 0; background: transparent; font-size: 11px; }
.wa-filter-strip { display: flex; gap: 5px; overflow-x: auto; padding: 0 13px 10px; scrollbar-width: thin; }
.wa-list-controls { padding: 0 13px 8px; }
.wa-list-controls select { width: 100%; min-height: 32px; padding: 5px 28px 5px 8px; font-size: 9px; }
.wa-filter-strip button { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 6px 8px; border: 1px solid #dde5eb; border-radius: 8px; color: #6b7887; background: #fff; font-size: 9px; font-weight: 750; }
.wa-filter-strip button b { color: #607082; font-size: 9px; }
.wa-filter-strip button.active { color: #087a56; border-color: #b7e4d2; background: #eaf8f2; }
.wa-conversation-list { min-height: 0; overflow-y: auto; border-top: 1px solid #edf1f4; }
.wa-conversation-row { position: relative; display: grid; grid-template-columns: 39px minmax(0,1fr) auto; align-items: center; gap: 9px; width: 100%; padding: 11px 12px; border: 0; border-bottom: 1px solid #edf1f4; text-align: left; background: transparent; }
.wa-conversation-row:hover { background: #f2f8f5; }
.wa-conversation-row.active { background: #e8f7f0; box-shadow: inset 3px 0 #20a66a; }
.wa-contact-avatar { display: grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#1ca86a,#43c59a); font-size: 11px; font-weight: 850; }
.wa-conversation-copy { display: grid; min-width: 0; gap: 3px; }
.wa-conversation-copy > span { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.wa-conversation-copy strong { overflow: hidden; color: #24364a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wa-conversation-copy time { flex: 0 0 auto; color: #8996a4; font-size: 8px; }
.wa-conversation-copy small { overflow: hidden; color: #657487; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wa-conversation-copy em { color: #8793a1; font-size: 8px; font-style: normal; }
.wa-row-tags { display: flex; gap: 4px; min-width: 0; }
.wa-row-tags i { overflow: hidden; max-width: 82px; padding: 2px 5px; border-radius: 6px; color: #0c7655; background: #e4f6ef; font-size: 7px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.wa-unread-count { display: grid; min-width: 19px; height: 19px; place-items: center; border-radius: 10px; color: #fff; background: #1eae6c; font-size: 9px; }
.wa-empty-list,.wa-chat-empty { display: grid; place-items: center; align-content: center; gap: 8px; min-height: 260px; padding: 28px; color: #8290a0; text-align: center; }
.wa-empty-list svg,.wa-chat-empty svg { width: 36px; height: 36px; color: #b1bdc7; }
.wa-empty-list strong,.wa-chat-empty h3 { margin: 0; color: #435368; }
.wa-empty-list span,.wa-chat-empty p { margin: 0; font-size: 10px; line-height: 1.5; }
.wa-chat-panel { display: grid; grid-template-rows: auto minmax(0,1fr) auto; min-width: 0; background: #f6f8f7; }
.wa-chat-head { display: grid; grid-template-columns: 39px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 65px; padding: 10px 15px; border-bottom: 1px solid #dfe7e5; background: #fff; }
.wa-chat-head > div { display: grid; gap: 2px; }
.wa-chat-head strong { color: #26374a; font-size: 12px; }
.wa-chat-head span { color: #748293; font-size: 9px; }
.wa-chat-head select { min-height: 32px; padding: 5px 28px 5px 9px; border-radius: 8px; font-size: 10px; }
.wa-chat-timeline { min-height: 0; overflow-y: auto; padding: 22px 24px; background-color: #eef3f0; background-image: radial-gradient(rgba(52,103,79,.07) .7px, transparent .7px); background-size: 13px 13px; }
.wa-message-line { display: flex; margin-bottom: 8px; }
.wa-message-line.outgoing { justify-content: flex-end; }
.wa-message-bubble { width: fit-content; max-width: min(76%,560px); padding: 9px 11px 6px; border-radius: 11px 11px 11px 3px; color: #24364a; background: #fff; box-shadow: 0 2px 5px rgba(32,56,70,.09); }
.wa-message-line.outgoing .wa-message-bubble { border-radius: 11px 11px 3px 11px; background: #dff6e9; }
.wa-message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.45; }
.wa-message-bubble span { display: block; margin-top: 4px; color: #788696; font-size: 8px; text-align: right; }
.wa-message-bubble span b { color: #258e70; }
.wa-message-bubble > small { display: block; margin-top: 4px; color: #bd3945; font-size: 8px; }
.wa-composer { display: grid; gap: 7px; padding: 10px 13px 12px; border-top: 1px solid #dfe7e5; background: #fff; }
.wa-quick-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wa-quick-row > span { display: flex; align-items: center; gap: 5px; }
.wa-quick-row select { min-height: 29px; padding: 4px 28px 4px 8px; font-size: 9px; }
.wa-quick-row .row-action { width: 29px; height: 29px; }
.wa-quick-row em { color: #8995a2; font-size: 8px; font-style: normal; }
.wa-more-wrap { position: relative; }
.wa-more-button { min-height: 29px !important; padding: 4px 9px !important; font-size: 9px !important; }
.wa-more-menu { position: absolute; z-index: 25; left: 0; bottom: calc(100% + 7px); display: grid; width: 235px; overflow: hidden; padding: 5px; border: 1px solid #dbe5ed; border-radius: 12px; background: #fff; box-shadow: 0 16px 42px rgba(26,48,68,.2); }
.wa-more-menu[hidden] { display: none; }
.wa-more-menu button { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 9px; border: 0; border-radius: 8px; color: #34475b; background: transparent; font-size: 9px; font-weight: 700; text-align: left; }
.wa-more-menu button:hover { color: #087a56; background: #eaf8f2; }
.wa-more-menu button svg { width: 14px; height: 14px; flex: 0 0 14px; }
.wa-message-schedule { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 9px; border: 1px solid #cce4da; border-radius: 9px; background: #eff9f5; }
.wa-message-schedule[hidden] { display: none; }
.wa-message-schedule label { display: flex; align-items: center; gap: 8px; color: #39705e; font-size: 9px; font-weight: 800; }
.wa-message-schedule input { min-height: 30px; padding: 4px 7px; font-size: 9px; }
.wa-message-schedule .row-action { width: 28px; height: 28px; }
.wa-composer > div:last-child { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 8px; }
.wa-composer textarea { min-height: 62px; max-height: 130px; resize: vertical; border-radius: 11px; font-size: 11px; }
.wa-composer button { min-height: 40px; }
.wa-ai-assistant { display: grid; gap: 7px; padding: 9px 13px; border-top: 1px solid #dfe7e5; background: linear-gradient(100deg,#f6f3ff,#f3f9ff); }
.wa-ai-assistant > div { display: grid; grid-template-columns: 27px auto 1fr; align-items: center; gap: 7px; }
.wa-ai-assistant > div > span { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: #fff; background: linear-gradient(135deg,#6d45d8,#4d8bea); }
.wa-ai-assistant > div svg { width: 14px; height: 14px; }
.wa-ai-assistant > div strong { color: #392b68; font-size: 10px; }
.wa-ai-assistant > div small { color: #7a7195; font-size: 8px; text-align: right; }
.wa-ai-assistant nav { display: flex; gap: 5px; overflow-x: auto; }
.wa-ai-assistant nav button { flex: 0 0 auto; min-height: 28px; padding: 5px 8px; border: 1px solid #d8d0f1; border-radius: 8px; color: #57448b; background: #fff; font-size: 8px; font-weight: 800; }
.wa-ai-assistant nav button:hover:not(:disabled) { border-color: #8971cf; background: #f0ebff; }
.wa-ai-assistant article { max-height: 118px; overflow-y: auto; padding: 8px 10px; border: 1px solid #ddd5f2; border-radius: 9px; background: rgba(255,255,255,.85); }
.wa-ai-assistant article.error { border-color: #f1c9ce; background: #fff2f3; }
.wa-ai-assistant article p { margin: 0; color: #3f355a; font-size: 9px; line-height: 1.5; white-space: pre-wrap; }
.wa-ai-assistant article small { display: block; margin-top: 5px; color: #8c82a7; font-size: 7px; }
.wa-conversation-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wa-conversation-controls label { display: grid; gap: 4px; color: #6d7987; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.wa-conversation-controls label.full { grid-column: 1 / -1; }
.wa-conversation-controls :is(input,select) { min-width: 0; min-height: 32px; padding: 5px 7px; font-size: 9px; text-transform: none; }
.wa-ai-config-intro { display: grid; gap: 4px; }
.wa-ai-config-intro span { font-size: 10px; line-height: 1.45; }
.wa-customer-panel { min-width: 0; overflow-y: auto; border-left: 1px solid #e2e9ef; background: #fff; }
.wa-customer-panel section { padding: 15px; border-bottom: 1px solid #edf1f4; }
.wa-customer-identity { display: grid; justify-items: center; gap: 6px; text-align: center; }
.wa-customer-identity .wa-contact-avatar { width: 52px; height: 52px; }
.wa-customer-identity h3 { margin: 2px 0 0; color: #24364a; font-size: 14px; }
.wa-customer-identity small { color: #7e8b99; font-size: 9px; }
.wa-assignment { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wa-assignment label { display: grid; gap: 4px; color: #6d7987; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.wa-assignment select { min-width: 0; min-height: 32px; padding: 5px 25px 5px 7px; font-size: 9px; text-transform: none; }
.wa-customer-facts h4,.wa-notes h4 { margin: 0 0 10px; color: #35465a; font-size: 11px; }
.wa-customer-facts > div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed #e7ebef; font-size: 9px; }
.wa-customer-facts > div span { color: #788696; }
.wa-customer-facts > div strong { color: #2c4055; text-align: right; }
.wa-customer-facts p { display: flex; gap: 6px; margin: 10px 0 0; color: #708091; font-size: 9px; line-height: 1.45; }
.wa-customer-facts p svg { width: 13px; flex: 0 0 13px; }
.wa-profile-button { width: calc(100% - 30px); min-height: 34px; margin: 12px 15px; font-size: 9px; }
.wa-notes h4 { display: flex; justify-content: space-between; }
.wa-notes h4 small { color: #8a96a3; font-size: 8px; font-weight: 500; }
.wa-notes textarea { min-height: 60px; font-size: 10px; }
.wa-notes > button { width: 100%; min-height: 31px; margin-top: 6px; font-size: 9px; }
.wa-notes > div { display: grid; gap: 7px; margin-top: 10px; }
.wa-notes article { padding: 8px; border: 1px solid #f0dfad; border-radius: 8px; background: #fff9e8; }
.wa-notes article p { margin: 0 0 4px; color: #564c2c; font-size: 9px; line-height: 1.4; }
.wa-notes article span { color: #928252; font-size: 7px; }
.wa-campaign-workspace { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 14px; }
.wa-campaign-compose,.wa-campaign-guide,.wa-history-panel { border-radius: 16px; }
.wa-campaign-compose { display: grid; gap: 12px; }
.wa-campaign-compose label { display: grid; gap: 5px; color: #4f6072; font-size: 10px; font-weight: 750; }
.wa-campaign-grid { display: grid; grid-template-columns: .7fr 1fr 1.3fr; gap: 10px; }
.wa-campaign-grid select[multiple] { min-height: 145px; padding: 6px; }
.wa-campaign-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wa-campaign-guide { align-content: start; display: grid; gap: 10px; background: linear-gradient(145deg,#133c35,#1f6653); color: #fff; }
.wa-campaign-guide h3 { margin: 0; color: #fff; }
.wa-campaign-guide > div { display: flex; align-items: baseline; gap: 7px; padding: 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; background: rgba(255,255,255,.06); }
.wa-campaign-guide > div strong { font-size: 22px; }
.wa-campaign-guide > div small,.wa-campaign-guide p { color: #d5ebe4; font-size: 9px; line-height: 1.5; }
.wa-campaign-guide button { margin-top: 6px; }
.wa-automation-workspace { display: grid; gap: 13px; }
.wa-automation-summary { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 18px; border-radius: 16px; }
.wa-automation-summary h3 { margin: 2px 0 3px; }
.wa-automation-summary p { margin: 0; color: #718093; font-size: 9px; }
.wa-automation-summary > div:nth-child(2) { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 7px; padding: 8px 12px; border-left: 1px solid #e3e9ef; }
.wa-automation-summary > div:nth-child(2) strong { color: #1c7c5b; font-size: 15px; }
.wa-automation-summary > div:nth-child(2) small { color: #7a8795; font-size: 8px; }
.wa-automation-summary > span { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.wa-automation-summary button { min-height: 34px; padding: 6px 9px; font-size: 9px; }
.wa-automation-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.wa-automation-card { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: start; gap: 10px; padding: 13px; border: 1px solid #dfe7ed; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(27,54,75,.05); }
.wa-automation-card.disabled { opacity: .62; }
.wa-automation-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #12845f; background: #e8f7f1; }
.wa-automation-icon svg { width: 18px; height: 18px; }
.wa-automation-card > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.wa-automation-card small { color: #16805e; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.wa-automation-card strong { color: #2b3d51; font-size: 11px; }
.wa-automation-card p { overflow: hidden; margin: 2px 0 0; color: #718092; font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.wa-automation-actions { display: flex; align-items: center; gap: 5px; }
.wa-automation-actions .automation-toggle { min-height: 29px; padding: 5px 8px; font-size: 8px; }

html[data-theme="dark"] body .app-shell .wa-header { border-color: var(--dark-border); background: linear-gradient(135deg,#172538,#17352f); }
html[data-theme="dark"] body .app-shell .wa-header :is(h2,p),html[data-theme="dark"] body .app-shell .wa-tabs button.active { color: var(--dark-text); }
html[data-theme="dark"] body .app-shell .wa-tabs,html[data-theme="dark"] body .app-shell .wa-inbox-grid,html[data-theme="dark"] body .app-shell :is(.wa-conversation-panel,.wa-chat-head,.wa-composer,.wa-customer-panel,.wa-search) { border-color: var(--dark-border); background: var(--dark-surface); }
html[data-theme="dark"] body .app-shell .wa-chat-panel,html[data-theme="dark"] body .app-shell .wa-chat-timeline { background-color: #111d2d; }
html[data-theme="dark"] body .app-shell :is(.wa-conversation-copy strong,.wa-chat-head strong,.wa-customer-identity h3,.wa-customer-facts h4,.wa-notes h4,.wa-customer-facts strong) { color: var(--dark-text); }
html[data-theme="dark"] body .app-shell .wa-conversation-row { border-color: var(--dark-border); }
html[data-theme="dark"] body .app-shell .wa-conversation-row:hover,html[data-theme="dark"] body .app-shell .wa-conversation-row.active { background: #18352f; }
html[data-theme="dark"] body .app-shell .wa-message-bubble { color: #e7eef7; background: #223349; }
html[data-theme="dark"] body .app-shell .wa-message-line.outgoing .wa-message-bubble { background: #1d4a3c; }
html[data-theme="dark"] body .app-shell .wa-ai-assistant { border-color: var(--dark-border); background: linear-gradient(100deg,#251f3e,#172d42); }
html[data-theme="dark"] body .app-shell .wa-ai-assistant > div strong,html[data-theme="dark"] body .app-shell .wa-ai-assistant article p { color: var(--dark-text); }
html[data-theme="dark"] body .app-shell .wa-ai-assistant nav button,html[data-theme="dark"] body .app-shell .wa-ai-assistant article { border-color: var(--dark-border); color: #d8cdfa; background: var(--dark-surface); }
html[data-theme="dark"] body .app-shell :is(.wa-more-menu,.wa-automation-card,.wa-automation-summary) { border-color: var(--dark-border); background: var(--dark-surface); }
html[data-theme="dark"] body .app-shell :is(.wa-more-menu button,.wa-automation-card strong,.wa-automation-summary h3) { color: var(--dark-text); }

@media (max-width: 1180px) {
  .wa-inbox-grid { grid-template-columns: minmax(260px,.8fr) minmax(380px,1.3fr); }
  .wa-customer-panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); max-height: 330px; border-top: 1px solid #e2e9ef; border-left: 0; }
  .wa-profile-button { align-self: start; }
}
@media (max-width: 780px) {
  .wa-header { align-items: flex-start; flex-direction: column; padding: 15px; }
  .wa-header-actions { justify-content: flex-start; width: 100%; }
  .wa-live-state { width: 100%; margin-bottom: 3px; }
  .wa-tabs { width: 100%; overflow-x: auto; }
  .wa-tabs button { flex: 1 0 auto; }
  .wa-inbox-grid { grid-template-columns: 1fr; min-height: 0; overflow: visible; }
  .wa-conversation-panel { max-height: 410px; border-right: 0; border-bottom: 1px solid #e2e9ef; }
  .wa-chat-panel { min-height: 580px; }
  .wa-customer-panel { display: block; max-height: none; }
  .wa-campaign-workspace,.wa-campaign-grid { grid-template-columns: 1fr; }
  .wa-campaign-guide { order: -1; }
  .wa-automation-summary { grid-template-columns: 1fr; }
  .wa-automation-summary > div:nth-child(2) { border-top: 1px solid #e3e9ef; border-left: 0; }
  .wa-automation-summary > span { justify-content: flex-start; }
  .wa-automation-list { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .wa-header-actions button { flex: 1 1 120px; }
  .wa-inbox-grid { margin: 0 -8px; border-radius: 12px; }
  .wa-chat-head { grid-template-columns: 36px minmax(0,1fr); }
  .wa-chat-head select { grid-column: 1 / -1; width: 100%; }
  .wa-chat-timeline { padding: 16px 10px; }
  .wa-message-bubble { max-width: 88%; }
  .wa-quick-row { align-items: stretch; flex-direction: column; }
  .wa-composer > div:last-child { grid-template-columns: 1fr; }
  .wa-assignment { grid-template-columns: 1fr; }
  .wa-campaign-footer { align-items: stretch; flex-direction: column; }
  .wa-more-menu { position: fixed; right: 12px; bottom: 12px; left: 12px; width: auto; }
}

/* 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(420px, 36vw);
  height: 44px;
  padding: 0 11px;
  position: relative;
}

.global-search-results {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 8px);
  right: 0;
  width: min(620px, 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);
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.global-search-results.is-open {
  display: grid;
  gap: 2px;
  visibility: visible;
  pointer-events: auto;
}

.global-search:focus-within {
  border-color: #8db4f6;
  box-shadow: 0 0 0 3px rgba(48, 116, 240, .12);
}

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

.global-search-result-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.global-search-result strong {
  display: block;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.global-search-result-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.global-search-result-meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result .global-search-address {
  display: block;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: #7d8999;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-result .status-pill {
  display: inline-flex;
  min-height: 22px;
  flex: 0 0 auto;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.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 {
  min-width: 0;
  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;
}

.view.module-data-loading::before {
  content: "Cargando información del módulo...";
  display: block;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid #cfe0f4;
  border-radius: 12px;
  color: #245b91;
  background: linear-gradient(90deg, #eef6ff, #f8fbff, #eef6ff);
  background-size: 220% 100%;
  animation: module-loading 1.2s linear infinite;
  font-size: 13px;
  font-weight: 700;
}

@keyframes module-loading {
  to { background-position: -220% 0; }
}

html[data-theme="dark"] .view.module-data-loading::before {
  border-color: #28486a;
  color: #b9dafb;
  background: linear-gradient(90deg, #12283f, #193552, #12283f);
  background-size: 220% 100%;
}

@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,
.vital-highlight .finance-drilldown {
  padding: 12px;
  border-radius: 11px;
  background: #f7f8fa;
}

.vital-highlight .finance-drilldown {
  width: 100%;
  border: 0;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.vital-highlight .finance-drilldown:hover,
.vital-highlight .finance-drilldown:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(30, 41, 59, 0.12);
  outline: 2px solid rgba(48, 116, 240, 0.32);
  outline-offset: 2px;
}

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

.vital-highlight span:last-child,
.vital-highlight .finance-drilldown: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;
}

.vital-highlight em {
  display: block;
  margin-top: 4px;
  color: currentColor;
  font-size: 8px;
  font-style: normal;
  opacity: 0.76;
}

.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;
}

.system-health-panel {
  margin-top: 12px;
}

.compact-toolbar {
  gap: 10px;
}

.system-health-panel .server-metric-row {
  min-height: 58px;
}

.server-maintenance-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #e2e9f1;
  border-radius: 12px;
  background: #f8fafc;
}

.server-maintenance-actions span,
.server-maintenance-actions small {
  display: block;
}

.server-maintenance-actions strong {
  color: #25364d;
  font-size: 12px;
}

.server-maintenance-actions small {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

.server-maintenance-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.network-range-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.network-range-chip .row-actions-inline {
  flex: 0 0 auto;
}

.inline-form-actions {
  display: flex;
  margin-top: 8px;
}

.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;
}

.inventory-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

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

.warehouse-summary-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce5f1;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff, #f6f9fe);
}

.warehouse-summary-card.delivery {
  border-color: #cce9e2;
  background: linear-gradient(135deg, #fff, #f1fbf8);
}

.warehouse-summary-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: #3074f0;
  background: #eaf1ff;
}

.warehouse-summary-card.delivery .warehouse-summary-icon {
  color: #168466;
  background: #e1f7ef;
}

.warehouse-summary-copy,
.warehouse-summary-copy small,
.warehouse-summary-copy strong,
.warehouse-summary-copy span {
  display: block;
  min-width: 0;
}

.warehouse-summary-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.warehouse-summary-copy strong {
  margin: 3px 0;
  color: var(--ink);
  font-family: "Manrope", sans-serif;
  font-size: 14px;
}

.warehouse-summary-copy span {
  color: var(--muted);
  font-size: 9px;
}

.batch-serial-field textarea {
  min-height: 180px;
  font-family: "DM Mono", "Consolas", monospace;
  line-height: 1.55;
}

.batch-serial-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.batch-serial-status strong {
  color: #3074f0;
}

.warehouse-transfer-list {
  display: grid;
  gap: 7px;
  max-height: 310px;
  overflow: auto;
  padding: 3px;
}

.warehouse-transfer-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f9fbfd;
  cursor: pointer;
}

.warehouse-transfer-item:has(input:checked) {
  border-color: #78a7f8;
  background: #edf4ff;
}

.warehouse-transfer-item strong,
.warehouse-transfer-item small {
  display: block;
}

.warehouse-transfer-item strong {
  font-size: 10px;
}

.warehouse-transfer-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.inventory-catalog-panel {
  min-width: 0;
  padding: 15px;
}

.inventory-catalog-panel .panel-header {
  margin-bottom: 10px;
}

.inventory-catalog-list {
  display: grid;
  gap: 6px;
  max-height: 246px;
  overflow: auto;
}

.inventory-catalog-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid #edf0f4;
  border-radius: 11px;
  background: #fbfcfd;
}

.inventory-catalog-row .type-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.inventory-catalog-row strong,
.inventory-catalog-row small {
  display: block;
}

.inventory-catalog-row strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-catalog-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

@media (max-width: 900px) {
  .warehouse-summary-grid,
  .inventory-catalog-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-summary-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .warehouse-summary-card .secondary-button {
    grid-column: 1 / -1;
  }
}

.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: 42px minmax(160px, 1.2fr) minmax(110px, .8fr) minmax(110px, .8fr);
  gap: 12px;
  padding: 14px;
}

#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;
  color: #ffffff;
}

.isp-profile-head p {
  margin: 0;
  color: #d5e2ef;
  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: #f0f6fc;
  font-size: 11px;
  font-weight: 650;
}

.isp-profile-card .isp-logo-uses small {
  color: #f2f7fc;
  font-size: 12px;
  line-height: 1.35;
}

.isp-profile-card .isp-logo-uses > span {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.09);
}

.isp-profile-card [aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .68;
}

.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);
}

html:not([data-theme="dark"]) body .app-shell #controlPanelView .isp-profile-card {
  color: #f7fbff;
  background: linear-gradient(145deg, #102b49, #1b4d78);
}

html:not([data-theme="dark"]) body .app-shell #controlPanelView .isp-profile-card .isp-profile-head h3,
html:not([data-theme="dark"]) body .app-shell #controlPanelView .isp-profile-card .isp-contact-item {
  color: #f7fbff;
}

html:not([data-theme="dark"]) body .app-shell #controlPanelView .isp-profile-card .isp-profile-head p,
html:not([data-theme="dark"]) body .app-shell #controlPanelView .isp-profile-card .isp-logo-uses small {
  color: #dceaf6;
}

html:not([data-theme="dark"]) body .app-shell #controlPanelView .isp-profile-card .secondary-button {
  color: #153b62;
  border-color: rgba(255,255,255,.85);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(4, 22, 41, .22);
}

html:not([data-theme="dark"]) body .app-shell #controlPanelView .isp-profile-card .secondary-button:hover {
  color: #0c3156;
  background: #eaf6ff;
}

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

.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: 14px;
  border: 1px solid #e5ebf2;
  border-radius: 13px;
  background: #fbfcfe;
}

.admin-user-row:first-child {
  border-top: 1px solid #e5ebf2;
}

.admin-user-row .row-primary { font-size: 12px; }
.admin-user-row .row-secondary,
.admin-user-row .cell-sub { font-size: 9px; line-height: 1.4; }
.admin-user-row .cell-main { font-size: 11px; }

.admin-user-actions {
  grid-column: 2 / -1;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 7px;
}

.admin-user-actions .row-action {
  width: auto;
  min-width: 86px;
  min-height: 35px;
  padding: 0 10px;
  gap: 6px;
  border-radius: 9px;
  color: #28435f;
  background: #fff;
  font-size: 9px;
  font-weight: 750;
}

.admin-user-actions .row-action > svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.admin-user-actions .user-status { font-size: 0; }

html[data-theme="dark"] body .app-shell .admin-user-row {
  border-color: var(--dark-border);
  background: var(--dark-surface-2);
}

html[data-theme="dark"] body .app-shell .admin-user-actions .row-action {
  color: var(--dark-text);
  border-color: var(--dark-border);
  background: var(--dark-surface);
}

.brand-logo-field > label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.brand-logo-current span {
  color: #405269;
  font-size: 11px;
  font-weight: 650;
}

html[data-theme="dark"] body .modal-backdrop .brand-logo-current {
  color: var(--dark-text);
  border-color: var(--dark-border);
  background: var(--dark-surface-2);
}

html[data-theme="dark"] body .modal-backdrop .brand-logo-field > label,
html[data-theme="dark"] body .modal-backdrop .brand-logo-current span {
  color: var(--dark-text);
}

.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;
}

.user-module-permissions,
.user-action-permissions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: 330px;
  padding: 4px;
  overflow-y: auto;
}

.user-permissions-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.user-permissions-heading,
.user-permissions-toolbar,
.user-permission-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-permissions-heading { padding: 16px 18px 12px; }
.user-permissions-heading h3,
.user-permissions-heading p { margin: 2px 0 0; }
.user-permissions-heading p { color: var(--muted); font-size: 11px; }
.user-permissions-heading > strong {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #1767b2;
  background: #e6f2ff;
  font-size: 10px;
}

.user-permissions-toolbar {
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.user-permissions-toolbar label {
  display: flex;
  align-items: center;
  flex: 1 1 240px;
  max-width: 360px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.user-permissions-toolbar label svg { width: 15px; color: var(--muted); }
.user-permissions-toolbar input { width: 100%; border: 0; background: transparent; }

.user-module-permissions {
  display: block;
  max-height: 390px;
  padding: 10px;
}

.user-permission-group {
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.user-permission-group:last-child { margin-bottom: 0; }
.user-permission-group > header { min-height: 45px; padding: 6px 10px; }
.user-permission-group-title {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 8px;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}
.user-permission-group-title span { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; color: #1767b2; background: #eaf4ff; }
.user-permission-group-title span svg { width: 13px; }
.user-permission-group-title small { color: var(--muted); font-size: 9px; font-weight: 600; }
.user-permission-group-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.user-permission-group-options[hidden] { display: none; }
.user-permission-group-options .policy-check { min-height: 36px; background: #fff; }
.user-permission-group-options .policy-check:has(input:checked) { border-color: #76b7ef; background: #edf7ff; }

.user-module-permissions .policy-check,
.user-action-permissions .policy-check {
  align-items: flex-start;
  min-width: 0;
  background: #fff;
}

.user-module-permissions .policy-check span,
.user-module-permissions .policy-check strong,
.user-module-permissions .policy-check small,
.user-action-permissions .policy-check span,
.user-action-permissions .policy-check strong,
.user-action-permissions .policy-check small {
  display: block;
  min-width: 0;
}

.user-module-permissions .policy-check strong,
.user-action-permissions .policy-check strong {
  color: var(--ink);
  font-size: 11px;
}

.user-module-permissions .policy-check small,
.user-action-permissions .policy-check small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.user-module-permissions .module-unavailable {
  opacity: .48;
  background: #f4f6f8;
}

html[data-theme="dark"] body .modal-backdrop .user-module-permissions .policy-check,
html[data-theme="dark"] body .modal-backdrop .user-action-permissions .policy-check {
  border-color: var(--dark-border);
  background: var(--dark-surface-2);
}

html[data-theme="dark"] body .modal-backdrop .user-module-permissions .policy-check strong,
html[data-theme="dark"] body .modal-backdrop .user-action-permissions .policy-check strong {
  color: var(--dark-text);
}

html[data-theme="dark"] body .modal-backdrop .user-module-permissions .module-unavailable {
  background: #101c2d;
}

html[data-theme="dark"] body .modal-backdrop .user-permissions-shell,
html[data-theme="dark"] body .modal-backdrop .user-permission-group-options { background: var(--dark-surface); border-color: var(--dark-border); }
html[data-theme="dark"] body .modal-backdrop .user-permissions-toolbar,
html[data-theme="dark"] body .modal-backdrop .user-permission-group { background: var(--dark-surface-2); border-color: var(--dark-border); }
html[data-theme="dark"] body .modal-backdrop .user-permission-group-title { color: var(--dark-text); }
html[data-theme="dark"] body .modal-backdrop .user-permission-group-options .policy-check:has(input:checked) { border-color: #4f93e2; background: #122b47; }

.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.5fr) minmax(290px, .72fr) minmax(260px, .62fr);
  gap: 18px;
  margin-bottom: 18px;
}

.network-monitor-filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(170px, 220px) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid #dce5ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(24, 47, 75, .055);
}

.network-monitor-filter-bar .table-search {
  width: 100%;
}

.network-monitor-result-count {
  justify-self: end;
  padding: 7px 10px;
  border-radius: 999px;
  color: #315b87;
  background: #edf4fb;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.network-monitor-map {
  display: grid;
  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);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.network-monitor-node:hover,
.network-monitor-node:focus-visible {
  border-color: #6d9df2;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(48, 116, 240, .1), 0 12px 26px rgba(24, 47, 75, .1);
  transform: translateY(-2px);
}

.network-monitor-node.selected {
  border-color: #3074f0;
  box-shadow: 0 0 0 3px rgba(48, 116, 240, .12), 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.condition-warning {
  border-color: rgba(242, 138, 52, .62);
  background: radial-gradient(circle at top right, rgba(242, 138, 52, .2), transparent 44%), #fffaf4;
}

.network-monitor-node.condition-critical {
  border-color: rgba(232, 93, 104, .68);
  box-shadow: 0 0 0 3px rgba(232, 93, 104, .08), 0 14px 32px rgba(26, 45, 70, .08);
}

.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 small {
  margin-left: 7px;
  padding-left: 7px;
  border-left: 1px solid currentColor;
}

.network-voltage.warning { color: #b96112; }
.network-voltage.critical { color: #b42318; }
.network-voltage.normal { color: #168258; }

.network-condition-badge {
  grid-column: 1 / -1;
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.network-condition-badge.normal { color: #168258; background: #e4f6ee; }
.network-condition-badge.warning { color: #a9540a; background: #fff0e3; }
.network-condition-badge.critical { color: #b42318; background: #ffeaec; }

.network-monitor-copy a,
.network-ip-link {
  color: #1c64c7;
  font-weight: 850;
  text-decoration: none;
}

.network-monitor-copy a:hover,
.network-ip-link:hover {
  color: #0d4fae;
  text-decoration: underline;
}

.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-operations-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  align-items: stretch;
  gap: 14px;
  margin-bottom: 18px;
}

.network-overview-live {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px -4px 0;
  padding: 8px 10px;
  border-radius: 10px;
  color: #315b87;
  background: #f1f6fb;
}

.network-overview-live > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.network-overview-live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20a36a;
  box-shadow: 0 0 0 4px rgba(32, 163, 106, .13);
}

.network-overview-live small {
  color: #61758c;
  font-size: 9px;
}

.network-history-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #dce5ef;
  border-radius: 9px;
  background: #fff;
}

.network-history-switch button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #526b86;
  background: transparent;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.network-history-switch button.active {
  color: #fff;
  background: #3074f0;
  box-shadow: 0 4px 10px rgba(48, 116, 240, .22);
}

.ospf-monitor-panel {
  margin-bottom: 18px;
  padding: 18px;
  overflow: hidden;
  border-color: #d7e4f1;
  background: linear-gradient(135deg, #f8fbff 0%, #edf5fd 58%, #e7f1fb 100%);
  color: #213b57;
}

.ospf-panel-head,
.ospf-panel-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ospf-panel-head h3,
.ospf-panel-empty h3 {
  margin: 3px 0;
  color: #183a5c;
}

.ospf-panel-head p,
.ospf-panel-empty p,
.ospf-monitor-panel .section-kicker {
  margin: 0;
  color: #617b95;
}

.ospf-panel-empty > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 13px;
  background: #dcecff;
  color: #286dc8;
}

.ospf-panel-error > span {
  color: #ff9da5;
  background: rgba(232, 93, 104, .18);
}

.ospf-health {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.ospf-health.healthy {
  color: #13754b;
  background: #dff5ea;
}

.ospf-health.warning {
  color: #b42332;
  background: #ffe7ea;
}

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

.ospf-summary-grid > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid #d9e5f1;
  border-radius: 12px;
  background: rgba(255, 255, 255, .82);
}

.ospf-summary-grid small,
.ospf-neighbor small,
.ospf-neighbor span small { color: #61768d !important; }
.ospf-summary-grid strong,
.ospf-neighbor strong,
.ospf-neighbor b { color: #1c3855 !important; }
.ospf-neighbor { border-color: #d7e3ef !important; background: rgba(255,255,255,.88) !important; }
.ospf-neighbor.full { border-left: 4px solid #37d58b !important; }
.ospf-neighbor.down { border-left: 4px solid #ff6b76 !important; }

.network-native-chart { position: relative; min-width: 0; margin-top: 8px; }
.network-native-chart svg { display: block; width: 100%; height: 72px; overflow: visible; }
.network-chart-axis { stroke: #dfe6ef; stroke-width: 1; }
.network-chart-line { fill: none; stroke: #3074f0; stroke-width: 3; vector-effect: non-scaling-stroke; }
.network-chart-line.green { stroke: #22a06b; }
.network-chart-line.red { stroke: #e85d68; }
.network-chart-line.violet { stroke: #8b5cf6; }
.network-chart-line.orange { stroke: #f28a34; }
.network-chart-area { fill: rgba(48, 116, 240, .1); stroke: none; }
.network-chart-area.green { fill: rgba(34, 160, 107, .11); }
.network-chart-area.red { fill: rgba(232, 93, 104, .11); }
.network-chart-area.violet { fill: rgba(139, 92, 246, .11); }
.network-chart-area.orange { fill: rgba(242, 138, 52, .12); }
.network-chart-point { fill: #fff; stroke: #3074f0; stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.network-chart-point.green { stroke: #22a06b; }
.network-chart-point.red { stroke: #e85d68; }
.network-chart-point.violet { stroke: #8b5cf6; }
.network-chart-point.orange { stroke: #f28a34; }
.network-chart-time-axis { display: flex; justify-content: space-between; gap: 4px; margin-top: 2px; color: #788ba0; font-size: 7px; font-weight: 700; }
.network-chart-reading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 3px; }
.network-chart-reading small { color: var(--ink); font-size: 11px; font-weight: 850; }
.network-chart-reading span,
.network-chart-range { color: var(--muted); font-size: 8px; }
.network-chart-range { display: flex; justify-content: space-between; margin-top: 3px; }
.network-chart-empty { display: grid; height: 72px; margin-top: 8px; place-items: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 10px; }
.network-overview-first { padding-left: 0; border-left: 0; }

.node-equipment-manager { display: grid; gap: 8px; max-height: 310px; overflow: auto; }
.node-equipment-item { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(130px, .65fr) minmax(130px, .65fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.node-equipment-item span strong,
.node-equipment-item span small { display: block; }
.node-equipment-item span small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.node-equipment-item input[type="text"] { min-width: 0; }
.network-equipment-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }

.ospf-summary-grid small,
.ospf-neighbor small {
  color: #61768d;
  font-size: 9px;
}

.ospf-summary-grid strong {
  color: #1c3855;
  font-size: 18px;
}

.ospf-neighbor-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-height: 360px;
  margin-top: 12px;
  overflow: auto;
}

.ospf-neighbor {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(4, 12, 24, .3);
}

.ospf-neighbor > strong {
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ospf-neighbor > span:not(.ospf-neighbor-state) {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.ospf-neighbor b {
  color: #fff;
  font-size: 10px;
}

.ospf-neighbor em {
  color: #ffb0b7;
  font-size: 9px;
  font-style: normal;
}

.ospf-neighbor-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a7f2cf;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.ospf-neighbor-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #37d58b;
  box-shadow: 0 0 0 4px rgba(55, 213, 139, .13);
}

.ospf-neighbor.down .ospf-neighbor-state {
  color: #ffb0b7;
}

.ospf-neighbor.down .ospf-neighbor-state i {
  background: #e85d68;
  box-shadow: 0 0 0 4px rgba(232, 93, 104, .15);
}

.ospf-no-neighbors {
  grid-column: 1 / -1;
  padding: 18px;
  color: #a9bfd8;
  text-align: center;
}

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

@media (max-width: 620px) {
  .ospf-monitor-panel {
    padding: 14px;
  }

  .ospf-panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ospf-summary-grid,
  .ospf-neighbor-list {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .ospf-summary-grid,
  .ospf-neighbor-list {
    grid-template-columns: 1fr;
  }
}

/* NetControl Ventas Android: shell comercial independiente. */
.sales-app-hero,
.sales-app-nav { display: none; }

.sales-mobile-app body {
  background: #eef3f8;
  color: #17243a;
}

.sales-mobile-app .sidebar,
.sales-mobile-app .sidebar-scrim,
.sales-mobile-app .topbar-left,
.sales-mobile-app .topbar-actions > :not(.account-menu) { display: none !important; }

.sales-mobile-app .app-shell { display: block; min-height: 100vh; }
.sales-mobile-app .main-content { width: 100%; margin: 0; padding: 0 0 92px; }
.sales-mobile-app .topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  min-height: 64px;
  justify-content: flex-end;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(20, 49, 80, .08);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
}
.sales-mobile-app .view { padding: 0 14px 24px; }
.sales-mobile-app #salesView { display: block; max-width: 840px; margin: 0 auto; }
.sales-mobile-app .sales-app-hero {
  display: block;
  margin: 0 -14px 18px;
  padding: 30px 22px 34px;
  border-radius: 0 0 30px 30px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 8%, rgba(41, 210, 167, .36), transparent 34%),
    linear-gradient(145deg, #0a1c34 0%, #103f62 55%, #0f766e 120%);
  box-shadow: 0 20px 40px rgba(16, 55, 85, .2);
}
.sales-mobile-app .sales-app-hero span { font-size: 10px; font-weight: 900; letter-spacing: .18em; color: #5eead4; }
.sales-mobile-app .sales-app-hero h1 { max-width: 520px; margin: 9px 0 8px; font-size: clamp(25px, 7vw, 38px); line-height: 1.08; }
.sales-mobile-app .sales-app-hero p { max-width: 560px; margin: 0; color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.55; }
.sales-mobile-app .sales-toolbar {
  display: grid;
  gap: 14px;
  padding: 0;
  background: transparent;
}
.sales-mobile-app .sales-toolbar h2 { font-size: 22px; }
.sales-mobile-app .sales-toolbar .toolbar-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.sales-mobile-app .sales-toolbar button { min-height: 46px; justify-content: center; border-radius: 13px; }
.sales-mobile-app .sales-filters { grid-template-columns: 1fr; }
.sales-mobile-app .sales-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sales-mobile-app .sales-summary > * { min-height: 108px; border: 0; border-radius: 18px; box-shadow: 0 8px 24px rgba(31, 56, 82, .08); }
.sales-mobile-app .sales-dashboard-grid,
.sales-mobile-app .sales-management-grid { grid-template-columns: 1fr; gap: 12px; }
.sales-mobile-app #salesView .panel { border: 0; border-radius: 20px; box-shadow: 0 10px 28px rgba(31, 56, 82, .08); }
.sales-mobile-app .sales-ranking-panel,
.sales-mobile-app .sales-coverage-panel { display: none; }
.sales-mobile-app .sales-orders-panel { overflow: hidden; }
.sales-mobile-app .sales-app-nav {
  position: fixed;
  z-index: 70;
  right: 10px;
  bottom: 10px;
  left: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  min-height: 68px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 22px;
  background: rgba(9, 27, 48, .96);
  box-shadow: 0 18px 45px rgba(3, 14, 28, .34);
  backdrop-filter: blur(18px);
}
.sales-mobile-app .sales-app-nav a,
.sales-mobile-app .sales-app-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  border: 0;
  color: #bdcddd;
  background: transparent;
  text-decoration: none;
}
.sales-mobile-app .sales-app-nav button { margin: -18px 2px 3px; border-radius: 18px; color: #052e2b; background: #5eead4; box-shadow: 0 8px 22px rgba(45, 212, 191, .32); }
.sales-mobile-app .sales-app-nav svg { width: 20px; height: 20px; }
.sales-mobile-app .sales-app-nav small { overflow: hidden; max-width: 100%; font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 480px) {
  .sales-mobile-app .sales-toolbar .toolbar-buttons { grid-template-columns: 1fr; }
  .sales-mobile-app .sales-summary { grid-template-columns: 1fr 1fr; }
  .sales-mobile-app .sales-pipeline-panel { display: none; }
  .sales-mobile-app .sales-lead-row { align-items: flex-start; grid-template-columns: 40px minmax(0, 1fr); }
  .sales-mobile-app .sales-lead-row .row-actions-inline { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Sales workspace */
.sales-toolbar { align-items: flex-end; }
.sales-filters {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin: 0 0 16px;
}
.sales-filters label { display: grid; gap: 6px; min-width: 210px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.sales-filters input, .sales-filters select { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); }
.sales-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.sales-metric { display: flex; align-items: center; gap: 13px; min-height: 104px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.sales-metric > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: #eaf1ff; color: var(--blue); }
.sales-metric > span svg { width: 22px; height: 22px; }
.sales-metric small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.sales-metric strong { display: block; margin-top: 5px; color: var(--ink); font-size: 23px; }
.sales-metric.orange > span { color: #d86c15; background: #fff0e3; }
.sales-metric.green > span { color: var(--green); background: #e4f6ee; }
.sales-metric.purple > span { color: #7c4fd6; background: #f0ebff; }
.sales-dashboard-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 16px; margin-bottom: 16px; }
.sales-goal-panel, .sales-pipeline-panel, .sales-orders-panel { padding: 20px; }
.sales-goal-panel .panel-header, .sales-pipeline-panel .panel-header, .sales-orders-panel .panel-header { padding: 0 0 16px; background: transparent; }
.sales-goal-panel .panel-header > strong { color: var(--blue); font-size: 28px; }
.sales-goal-number { display: flex; align-items: baseline; gap: 9px; margin: 10px 0 14px; }
.sales-goal-number strong { color: var(--ink); font-size: 44px; line-height: 1; }
.sales-goal-number span, .sales-goal-panel p { color: var(--muted); }
.sales-goal-track { height: 12px; overflow: hidden; border-radius: 99px; background: #e8edf4; }
.sales-goal-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3074f0, #35c8e8); }
.sales-product-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 4px; }
.sales-product-goals span { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #f8faff; }
.sales-product-goals small, .sales-product-goals strong { display: block; }
.sales-product-goals small { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.sales-product-goals strong { margin-top: 3px; color: var(--ink); font-size: 14px; }
.sales-pipeline-row { display: grid; grid-template-columns: 145px minmax(80px, 1fr) 35px; align-items: center; gap: 10px; padding: 8px 0; }
.sales-pipeline-row > span { color: var(--muted); font-size: 12px; font-weight: 700; }
.sales-pipeline-row > div { height: 9px; overflow: hidden; border-radius: 99px; background: #edf1f5; }
.sales-pipeline-row i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--blue); }
.sales-pipeline-row strong { color: var(--ink); text-align: right; }
.sales-table-row { grid-template-columns: .75fr 1.4fr 1.1fr 1.05fr .9fr auto; min-width: 920px; }
.sales-stage { display: inline-flex; padding: 6px 9px; border-radius: 99px; background: #eef2f7; color: #52647a; font-size: 10px; font-style: normal; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.sales-stage.pendiente-de-asignacion { color: #9c5a18; background: #fff0de; }
.sales-stage.asignada, .sales-stage.en-instalacion { color: #205fc8; background: #e6efff; }
.sales-stage.revision-final { color: #7344c2; background: #f0e8ff; }
.sales-stage.completada { color: #16784d; background: #def5e9; }
.sales-stage.cancelada { color: #b43843; background: #ffe8ea; }
.sales-orders-panel .data-table { overflow-x: auto; }
.sales-orders-panel .table-pagination { padding: 14px 0 0; }
.sales-management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.sales-followups-panel, .sales-ranking-panel, .sales-coverage-panel, .sales-commissions-panel { min-width: 0; padding: 18px; }
.sales-management-grid .panel-header { padding: 0 0 13px; background: transparent; }
.sales-lead-row, .sales-ranking-row, .sales-coverage-row, .sales-settlement-row, .sales-commission-balance { display: grid; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sales-lead-row { grid-template-columns: 36px minmax(0, 1fr) auto; }
.sales-lead-row.overdue { margin-inline: -8px; padding-inline: 8px; border-radius: 9px; background: #fff6eb; }
.sales-lead-row strong, .sales-lead-row small, .sales-lead-row em, .sales-ranking-row strong, .sales-ranking-row small, .sales-coverage-row strong, .sales-coverage-row small, .sales-settlement-row strong, .sales-settlement-row small { display: block; min-width: 0; }
.sales-lead-row small, .sales-ranking-row small, .sales-coverage-row small, .sales-settlement-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.sales-lead-row em { margin-top: 3px; color: #6c7d92; font-size: 9px; font-style: normal; }
.sales-ranking-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
.sales-ranking-row > b { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: #3157d5; background: #e9efff; font-size: 11px; }
.sales-ranking-row > em { color: var(--green); font-size: 10px; font-style: normal; font-weight: 800; }
.sales-coverage-row { grid-template-columns: minmax(0, 1fr) auto; }
.sales-coverage-row > em { padding: 5px 8px; border-radius: 99px; font-size: 9px; font-style: normal; font-weight: 900; }
.sales-coverage-row > em.available { color: #16784d; background: #def5e9; }
.sales-coverage-row > em.unavailable { color: #b43843; background: #ffe8ea; }
.sales-commission-balance { grid-template-columns: minmax(0, 1fr) auto; margin-bottom: 3px; padding: 13px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #edf3ff, #f4efff); }
.sales-commission-balance small, .sales-commission-balance strong { display: block; }
.sales-commission-balance small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.sales-commission-balance strong { margin-top: 4px; color: var(--ink); font-size: 19px; }
.sales-commission-balance em { color: #3157d5; font-size: 10px; font-style: normal; font-weight: 800; }
.sales-settlement-row { grid-template-columns: minmax(0, 1fr) auto 32px; }
.sales-document-fields { padding: 12px; border: 1px dashed var(--line); border-radius: 12px; background: #fafcff; }
.seller-user-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f7f9fc; }
.seller-user-settings[hidden] { display: none !important; }

html[data-theme="dark"] body .app-shell :is(.sales-metric, .sales-goal-panel, .sales-pipeline-panel, .sales-orders-panel, .sales-followups-panel, .sales-ranking-panel, .sales-coverage-panel, .sales-commissions-panel) { border-color: var(--dark-border); background: var(--dark-surface); }
html[data-theme="dark"] body .app-shell :is(.sales-metric strong, .sales-goal-number strong, .sales-pipeline-row strong) { color: var(--dark-text); }
html[data-theme="dark"] body .app-shell :is(.sales-filters input, .sales-filters select, .seller-user-settings) { border-color: var(--dark-border); background: var(--dark-surface-2); color: var(--dark-text); }
html[data-theme="dark"] body .app-shell :is(.sales-goal-track, .sales-pipeline-row > div) { background: #263750; }
html[data-theme="dark"] body .app-shell :is(.sales-product-goals span, .sales-document-fields) { border-color: var(--dark-border); background: var(--dark-surface-2); }
html[data-theme="dark"] body .app-shell :is(.sales-product-goals strong, .sales-lead-row strong, .sales-ranking-row strong, .sales-coverage-row strong, .sales-settlement-row strong, .sales-commission-balance strong) { color: var(--dark-text); }
html[data-theme="dark"] body .app-shell .sales-lead-row.overdue { background: #3b3024; }
html[data-theme="dark"] body .app-shell .sales-commission-balance { background: linear-gradient(135deg, #1f3151, #30284d); }

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

@media (max-width: 640px) {
  .sales-toolbar { align-items: stretch; }
  .sales-toolbar .primary-button { width: 100%; justify-content: center; }
  .sales-filters { display: grid; grid-template-columns: 1fr; }
  .sales-filters label { min-width: 0; }
  .sales-summary { grid-template-columns: 1fr; gap: 9px; }
  .sales-metric { min-height: 82px; padding: 13px; }
  .sales-metric strong { font-size: 20px; }
  .sales-goal-panel, .sales-pipeline-panel, .sales-orders-panel { padding: 14px; }
  .sales-pipeline-row { grid-template-columns: 118px minmax(60px, 1fr) 28px; }
  .sales-orders-panel .panel-header { align-items: stretch; flex-direction: column; gap: 10px; }
  .sales-orders-panel .table-search { width: 100%; }
  .seller-user-settings { grid-template-columns: 1fr; }
  .sales-product-goals { grid-template-columns: 1fr; }
  .sales-lead-row { grid-template-columns: 34px minmax(0, 1fr); }
  .sales-lead-row .row-actions-inline { grid-column: 1 / -1; justify-content: flex-end; }
}

.network-health-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.network-health-block h3,
.network-health-block p {
  margin: 3px 0 0;
}

.network-health-block h3 {
  font-size: 16px;
}

.network-health-block p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.network-health-ring {
  display: grid;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#22a06b var(--network-health), #e6ebf1 0);
}

.network-health-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
}

.network-health-ring span {
  z-index: 1;
  grid-area: 1 / 1;
  text-align: center;
}

.network-health-ring strong,
.network-health-ring small {
  display: block;
}

.network-health-ring strong {
  font-size: 20px;
}

.network-health-ring small {
  color: var(--muted);
  font-size: 9px;
}

.network-overview-section,
.network-capacity-block {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(24, 47, 75, .055);
}

.network-capacity-block.warning { border-color: #f2b37f; background: #fffaf4; }
.network-capacity-block.critical { border-color: #ef9aa2; background: #fff6f7; }

.network-chart-grid {
  fill: none;
  stroke: #e9eef4;
  stroke-width: .7;
  stroke-dasharray: 3 4;
}

.network-outage-timeline {
  display: grid;
  grid-template-columns: repeat(24, minmax(3px, 1fr));
  align-items: end;
  gap: 3px;
  height: 70px;
  margin-top: 10px;
}

.network-outage-timeline > span {
  display: grid;
  height: 70px;
  grid-template-rows: 52px 14px;
  align-items: end;
  text-align: center;
}

.network-outage-timeline i {
  display: block;
  min-height: 3px;
  border-radius: 3px 3px 1px 1px;
  background: linear-gradient(#f17a84, #c43f4c);
}

.network-outage-timeline small {
  color: var(--muted);
  font-size: 7px;
}

.network-device-distribution {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.network-device-distribution > span {
  display: grid;
  gap: 3px;
}

.network-device-distribution small {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.network-device-distribution i {
  overflow: hidden;
  height: 5px;
  border-radius: 99px;
  background: #e9eef5;
}

.network-device-distribution em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3074f0, #62a0ff);
}

.network-capacity-block > strong,
.network-capacity-block > small {
  display: block;
}

.network-capacity-block > strong {
  margin-top: 7px;
  font-size: 19px;
}

.network-capacity-block > small {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.network-active-alerts {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #168258;
  background: #e4f6ee;
  font-size: 9px;
  font-weight: 800;
}

.network-active-alerts.has-alerts {
  color: #b42318;
  background: #ffeaec;
}

.network-active-alerts svg {
  width: 13px;
  height: 13px;
}

.network-site-group {
  overflow: hidden;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  background: #f8fafc;
}

.network-site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #e4eaf1;
  background: #f1f5f9;
}

.network-site-head > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.network-site-head svg {
  width: 14px;
  color: #3074f0;
}

.network-site-head strong {
  font-size: 11px;
}

.network-site-head small {
  color: var(--muted);
  font-size: 9px;
}

.network-site-devices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 10px;
  padding: 10px;
}

.network-site-devices .network-monitor-node {
  min-height: 104px;
  padding: 13px;
  border-radius: 12px;
  box-shadow: none;
}

.network-detail-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
}

.network-detail-head h3,
.network-detail-head small {
  display: block;
  margin: 3px 0 0;
}

.network-detail-head h3 {
  font-size: 15px;
}

.network-detail-head small {
  color: var(--muted);
  font-size: 9px;
}

.network-detail-head .network-monitor-badge {
  grid-column: 1 / -1;
}

.network-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.network-detail-metrics span,
.network-detail-list span {
  padding: 9px;
  border: 1px solid #e3e9f0;
  border-radius: 9px;
  background: #f8fafc;
}

.network-detail-metrics small,
.network-detail-metrics strong,
.network-detail-list small,
.network-detail-list strong {
  display: block;
}

.network-detail-metrics small,
.network-detail-list small {
  color: var(--muted);
  font-size: 8px;
}

.network-detail-metrics strong,
.network-detail-list strong {
  margin-top: 3px;
  font-size: 11px;
}

.network-detail-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.network-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.network-device-access {
  text-decoration: none;
}

.network-detail-notes {
  margin: 10px 0 0;
  padding: 10px;
  border-left: 3px solid #6d9df2;
  border-radius: 8px;
  color: #52667d;
  background: #f3f7fc;
  font-size: 10px;
  line-height: 1.5;
}

html[data-theme="dark"] body .app-shell :is(.network-monitor-filter-bar, .network-site-group, .network-monitor-event, .network-detail-metrics span, .network-detail-list span) {
  border-color: var(--dark-border);
  background: var(--dark-surface);
}

html[data-theme="dark"] body .app-shell :is(.network-site-head, .network-overview-live, .network-detail-notes) {
  border-color: var(--dark-border);
  color: #c9daf0;
  background: #18283c;
}

html[data-theme="dark"] body .app-shell .network-monitor-node {
  border-color: #344961;
  color: var(--dark-text);
  background: radial-gradient(circle at top right, rgba(71, 130, 232, .18), transparent 42%), #172538;
}

html[data-theme="dark"] body .app-shell .network-monitor-node.online {
  border-color: rgba(58, 203, 139, .48);
  background: radial-gradient(circle at top right, rgba(45, 190, 125, .19), transparent 44%), #17283a;
}

html[data-theme="dark"] body .app-shell .network-monitor-node.down {
  border-color: rgba(255, 111, 122, .55);
  background: radial-gradient(circle at top right, rgba(238, 83, 97, .2), transparent 44%), #2b202c;
}

html[data-theme="dark"] body .app-shell .network-monitor-node.condition-warning {
  border-color: rgba(242, 176, 95, .64);
  background: radial-gradient(circle at top right, rgba(242, 138, 52, .2), transparent 44%), #2d281f;
}

html[data-theme="dark"] body .app-shell :is(.network-overview-section, .network-capacity-block) {
  border-color: var(--dark-border);
  background: var(--dark-surface);
}

html[data-theme="dark"] body .app-shell .network-chart-grid { stroke: #2d4058; }
html[data-theme="dark"] body .app-shell .network-history-switch { border-color: var(--dark-border); background: #142238; }
html[data-theme="dark"] body .app-shell .network-history-switch button { color: #b7c9dd; }
html[data-theme="dark"] body .app-shell .network-history-switch button.active { color: #fff; background: #3f7eea; }
html[data-theme="dark"] body .app-shell .network-chart-point { fill: #172538; }

@media (max-width: 820px) {
  .network-overview-live { align-items: stretch; flex-direction: column; }
  .network-history-switch { width: 100%; }
  .network-history-switch button { flex: 1; }
}

html[data-theme="dark"] body .app-shell :is(.network-monitor-copy strong, .network-detail-metrics strong, .network-detail-list strong, .network-chart-reading small) {
  color: var(--dark-text);
}

html[data-theme="dark"] body .app-shell :is(.network-monitor-copy small, .network-monitor-latency, .network-detail-head small, .network-chart-reading span, .network-chart-range, .network-overview-live small) {
  color: #a9bad0;
}

html[data-theme="dark"] body .app-shell .network-monitor-latency {
  background: #22344a;
}

html[data-theme="dark"] body .app-shell .network-chart-axis {
  stroke: #3a4d63;
}

html[data-theme="dark"] body .app-shell .network-monitor-result-count {
  color: #bcd7ff;
  background: #203652;
}

html[data-theme="dark"] body .app-shell .ospf-monitor-panel {
  border-color: #304a66;
  color: #e5eef9;
  background: linear-gradient(135deg, #13243a 0%, #172d48 58%, #1a3858 100%);
}

html[data-theme="dark"] body .app-shell :is(.ospf-panel-head h3, .ospf-panel-empty h3) {
  color: #f2f7ff;
}

html[data-theme="dark"] body .app-shell :is(.ospf-panel-head p, .ospf-panel-empty p, .ospf-monitor-panel .section-kicker, .ospf-summary-grid small, .ospf-neighbor small, .ospf-neighbor span small) {
  color: #b7c9dd !important;
}

html[data-theme="dark"] body .app-shell .ospf-summary-grid > span {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
}

html[data-theme="dark"] body .app-shell :is(.ospf-summary-grid strong, .ospf-neighbor strong, .ospf-neighbor b) {
  color: #fff !important;
}

html[data-theme="dark"] body .app-shell .ospf-neighbor {
  border-color: rgba(255, 255, 255, .16) !important;
  background: rgba(4, 15, 29, .42) !important;
}

#networkMonitoringView .network-monitor-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.operations-calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(180px, .65fr) minmax(190px, .7fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 11px;
  border: 1px solid #dfe6ef;
  border-radius: 14px;
  background: #fff;
}

.operations-calendar-toolbar select {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #d8e1ec;
  border-radius: 9px;
  background: #fff;
}

.calendar-period-navigation,
.calendar-view-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-period-navigation > span {
  min-width: 160px;
  text-align: center;
}

.calendar-period-navigation small,
.calendar-period-navigation strong {
  display: block;
}

.calendar-period-navigation small {
  color: var(--muted);
  font-size: 8px;
}

.calendar-period-navigation strong {
  margin-top: 2px;
  text-transform: capitalize;
}

.calendar-view-switch {
  padding: 4px;
  border-radius: 10px;
  background: #edf2f8;
}

.calendar-view-switch button {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.calendar-view-switch button.active {
  color: #245fbf;
  background: #fff;
  box-shadow: 0 3px 10px rgba(29, 54, 87, .09);
}

.operations-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, .55fr);
  gap: 16px;
}

.operations-calendar-panel,
.operations-calendar-agenda-panel {
  min-width: 0;
}

.calendar-weekdays,
.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  border: 1px solid #dfe6ee;
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: #f3f6fa;
}

.calendar-weekdays span {
  padding: 8px;
  color: #607086;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-days {
  overflow: hidden;
  border: 1px solid #dfe6ee;
  border-radius: 0 0 11px 11px;
}

.calendar-day {
  min-width: 0;
  min-height: 126px;
  padding: 7px;
  border-right: 1px solid #e8edf3;
  border-bottom: 1px solid #e8edf3;
  background: #fff;
}

.calendar-days.week .calendar-day {
  min-height: 430px;
}

.calendar-day.outside {
  background: #f7f9fb;
  opacity: .65;
}

.calendar-day.today {
  background: #f2f7ff;
  box-shadow: inset 0 0 0 2px #4d86e6;
}

.calendar-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.calendar-day header strong {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  font-size: 10px;
}

.calendar-day.today header strong {
  color: #fff;
  background: #3074f0;
}

.calendar-day header small {
  color: var(--muted);
  font-size: 8px;
  text-transform: capitalize;
}

.calendar-day > div {
  display: grid;
  gap: 4px;
}

.calendar-event {
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 27px;
  padding: 4px 6px;
  border: 0;
  border-left: 3px solid #3074f0;
  border-radius: 5px;
  color: #234878;
  background: #eaf1ff;
  text-align: left;
  cursor: pointer;
}

.calendar-event span {
  font-size: 7px;
  font-weight: 800;
}

.calendar-event strong {
  overflow: hidden;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event.installation,
.calendar-agenda-event.installation { border-color: #22a06b; background: #e9f8f1; color: #176d4b; }
.calendar-event.incident,
.calendar-agenda-event.incident { border-color: #e85d68; background: #fff0f1; color: #a4323e; }
.calendar-event.ticket,
.calendar-agenda-event.ticket { border-color: #8b5cf6; background: #f3efff; color: #6740b9; }
.calendar-more { padding-left: 5px; color: var(--muted); font-size: 8px; }

#operationsCalendarAgenda,
.calendar-agenda-full {
  display: grid;
  gap: 8px;
}

.calendar-agenda-event {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px;
  border: 1px solid #e0e6ee;
  border-left: 4px solid #3074f0;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.calendar-agenda-event strong,
.calendar-agenda-event small {
  display: block;
}

.calendar-agenda-event strong {
  font-size: 10px;
}

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

.calendar-agenda-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, .7);
}

.calendar-agenda-icon svg,
.calendar-agenda-event > svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 1100px) {
  .operations-calendar-toolbar,
  .operations-calendar-layout {
    grid-template-columns: 1fr;
  }

  .operations-calendar-agenda-panel {
    order: -1;
  }
}

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

  .operations-calendar-panel {
    overflow-x: auto;
  }

  .calendar-weekdays,
  .calendar-days {
    min-width: 760px;
  }
}

@media (max-width: 1320px) {
  .network-operations-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .network-overview-section,
  .network-capacity-block {
    padding: 12px 0 0;
    border-top: 1px solid #e4e9ef;
    border-left: 0;
  }

  .network-monitor-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .7fr);
  }

  .network-monitor-log-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  #networkMonitoringView .network-monitor-summary,
  .network-operations-overview,
  .network-monitor-layout {
    grid-template-columns: 1fr;
  }

  .network-monitor-log-panel {
    grid-column: auto;
  }

  .network-site-devices {
    grid-template-columns: 1fr;
  }

  .network-monitor-filter-bar {
    grid-template-columns: 1fr;
  }

  .network-monitor-result-count {
    justify-self: start;
  }

  .network-detail-actions {
    grid-template-columns: 1fr;
  }
}

.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.online {
  color: #168258;
  background: #e4f6ee;
}

.customer-map-list-pin.offline {
  color: #c93446;
  background: #ffeaec;
}

.customer-map-list-pin.checking,
.customer-map-list-pin.unknown {
  color: #66758a;
  background: #eef1f4;
}

.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-shell {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
}

.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.online {
  background: #22a06b;
  animation: customer-map-online-pulse 2s ease-in-out infinite;
}

.customer-map-marker.offline {
  background: #e24b5b;
}

.customer-map-marker.checking,
.customer-map-marker.unknown {
  background: #8b98aa;
}

@keyframes customer-map-online-pulse {
  0%, 100% { box-shadow: 0 7px 18px rgba(26, 45, 70, .3), 0 0 0 0 rgba(34, 160, 107, .35); }
  50% { box-shadow: 0 7px 18px rgba(26, 45, 70, .3), 0 0 0 8px rgba(34, 160, 107, 0); }
}

.customer-map-marker.retired {
  background: #7b8798;
}

.customer-map-connectivity-dot,
.customer-map-billing-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(26, 45, 70, .26);
}

.customer-map-connectivity-dot {
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  background: #8b98aa;
}

.customer-map-connectivity-dot.online {
  background: #17a568;
}

.customer-map-connectivity-dot.offline {
  background: #e24b5b;
}

.customer-map-connectivity-dot.suspended {
  background: #f28a34;
}

.customer-map-billing-badge {
  right: -2px;
  bottom: 1px;
  width: 20px;
  height: 20px;
  color: #fff;
  background: #7b8798;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.customer-map-billing-badge.paid {
  background: #168258;
}

.customer-map-billing-badge.due {
  background: #d83f50;
}

.customer-map-financial-label.paid {
  color: #168258;
}

.customer-map-financial-label.due {
  color: #c93446;
}

.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-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.customer-map-financial-status {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 20px;
  font-size: 8px;
  font-weight: 800;
}

.customer-map-financial-status.paid {
  color: #168258;
  background: #e4f6ee;
}

.customer-map-financial-status.due {
  color: #c93446;
  background: #ffeaec;
}

html[data-theme="dark"] body :is(.customer-map-connectivity-dot, .customer-map-billing-badge) {
  border-color: #122138;
}

html[data-theme="dark"] body .customer-map-financial-status.paid {
  color: #8ee1ba;
  background: #173728;
}

html[data-theme="dark"] body .customer-map-financial-status.due {
  color: #ffadb6;
  background: #3a2029;
}

.customer-map-popup-status.suspended {
  color: #c05d12;
  background: #fff0e3;
}

.customer-map-popup-status.online {
  color: #168258;
  background: #e4f6ee;
}

.customer-map-popup-status.offline {
  color: #c93446;
  background: #ffeaec;
}

.customer-map-popup-status.checking,
.customer-map-popup-status.unknown {
  color: #66758a;
  background: #eef1f4;
}

.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;
}

#networksView .node-row-actions .row-action {
  border-color: #d7e0ee;
  background: #fff;
}

#networksView .node-row-actions .node-action-add { color: #1769d1; background: #eaf2ff; border-color: #b8d4ff; }
#networksView .node-row-actions .node-action-incident { color: #a65705; background: #fff2df; border-color: #ffd29c; }
#networksView .node-row-actions .node-action-edit { color: #5d3ab8; background: #f0ebff; border-color: #d7cbff; }
#networksView .node-row-actions .node-action-repair { color: #167447; background: #e5f7ed; border-color: #a8e1c0; }
#networksView .node-row-actions .node-action-repair:disabled { color: #8a99aa; background: #f2f5f8; border-color: #dce3ea; }

.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-sort-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.customer-sort-header i {
  color: #8b99aa;
  font-size: 9px;
  font-style: normal;
}

.customer-sort-header.active,
.customer-sort-header.active i {
  color: var(--blue);
}

.customer-sort-header:focus-visible {
  border-radius: 5px;
  outline: 2px solid rgba(48, 116, 240, .35);
  outline-offset: 2px;
}

.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));
}

.finance-command-header {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1.25fr) minmax(220px, .7fr) auto;
  align-items: center;
  gap: 24px;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(95, 153, 255, .22);
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 0%, rgba(74, 161, 255, .28), transparent 34%),
    linear-gradient(125deg, #102c55 0%, #163f78 54%, #176c87 100%);
  box-shadow: 0 18px 42px rgba(19, 53, 99, .18);
}

.finance-command-header::after {
  position: absolute;
  right: -55px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  border: 30px solid rgba(255, 255, 255, .045);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.finance-command-copy,
.finance-command-balance,
.finance-command-actions {
  position: relative;
  z-index: 1;
}

.finance-command-copy .section-kicker {
  color: #77d9ee;
}

.finance-command-copy h2 {
  margin: 5px 0 7px;
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -.03em;
}

.finance-command-copy > p {
  max-width: 580px;
  margin: 0;
  color: #c9d9ee;
  font-size: 11px;
  line-height: 1.55;
}

.finance-command-status {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.finance-command-status > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  color: #d9e7f7;
  background: rgba(255, 255, 255, .08);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.finance-command-status svg {
  width: 11px;
  height: 11px;
}

.finance-command-status .healthy { color: #9af0c9; }
.finance-command-status .warning { color: #ffd77a; }
.finance-command-status .critical { color: #ffabb3; }

.finance-command-balance {
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 16px;
  background: rgba(5, 22, 48, .24);
  backdrop-filter: blur(8px);
}

.finance-command-balance small,
.finance-command-balance strong,
.finance-command-balance span {
  display: block;
}

.finance-command-balance small {
  color: #b9cce3;
  font-size: 9px;
  font-weight: 700;
}

.finance-command-balance strong {
  margin: 6px 0;
  color: #fff;
  font-size: clamp(22px, 2.2vw, 32px);
  letter-spacing: -.04em;
}

.finance-command-balance strong.negative,
.finance-command-balance span.negative { color: #ffabb3; }
.finance-command-balance span.positive { color: #91ecc3; }

.finance-command-balance span {
  font-size: 9px;
  font-weight: 700;
}

.finance-command-actions {
  display: grid;
  gap: 8px;
  min-width: 155px;
}

.finance-command-actions button {
  width: 100%;
  justify-content: flex-start;
}

.finance-command-actions .secondary-button {
  color: #eaf4ff;
  border-color: rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08);
}

.finance-command-actions .secondary-button:hover {
  background: rgba(255, 255, 255, .15);
}

.finance-kpi-card {
  --finance-tone: #3074f0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid #dfe7f0;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff 0%, #f8fbff 100%);
  box-shadow: 0 8px 22px rgba(23, 51, 85, .055);
}

.finance-kpi-card.income,
.finance-kpi-card.trend { --finance-tone: #168258; }
.finance-kpi-card.expense { --finance-tone: #c84554; }
.finance-kpi-card.average { --finance-tone: #7b55c7; }
.finance-kpi-card.receivable { --finance-tone: #d67825; }

.finance-kpi-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: var(--finance-tone);
  background: color-mix(in srgb, var(--finance-tone) 11%, white);
}

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

.finance-kpi-card small,
.finance-kpi-card strong,
.finance-kpi-card em {
  display: block;
}

.finance-kpi-card small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.finance-kpi-card strong {
  overflow: hidden;
  margin: 5px 0 4px;
  color: #19324f;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-kpi-card em {
  color: var(--finance-tone);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.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-period-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.finance-period-presets button {
  padding: 6px 9px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  color: #526174;
  background: #fff;
  font-size: 8px;
  font-weight: 750;
  cursor: pointer;
}

.finance-period-presets button:hover,
.finance-period-presets button.active {
  color: #1d62c7;
  border-color: #a9c8f5;
  background: #edf5ff;
}

.finance-ledger-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #dde5ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 49, 78, .045);
}

.finance-ledger-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.finance-ledger-heading h3 {
  margin: 4px 0;
  font-size: 15px;
}

.finance-ledger-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.finance-monthly-panel {
  margin-bottom: 18px;
}

.customer-profile-avatar {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #2d79ed, #1755b9);
  box-shadow: 0 10px 24px rgba(48, 116, 240, .22);
  font-size: 16px;
  font-weight: 900;
}

.customer-profile-identity {
  min-width: 0;
  margin-right: auto;
}

.customer-profile-identity p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.customer-profile-section {
  padding-top: 17px;
}

#customersView .customer-profile-tabs button {
  font-size: 12px;
}

.customer-document-summary,
.customer-network-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.customer-document-summary {
  margin-bottom: 14px;
}

.customer-document-summary > span {
  padding: 14px;
  border: 1px solid #dce7f4;
  border-radius: 13px;
  background: linear-gradient(145deg, #fff, #f6f9fd);
}

.customer-document-summary small,
.customer-document-summary strong {
  display: block;
}

.customer-document-summary small {
  color: var(--muted);
  font-size: 11px;
}

.customer-document-summary strong {
  margin-top: 5px;
  color: #183e72;
  font-size: 19px;
}

.customer-document-upload {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid #cfe0f5;
  border-radius: 14px;
  background: #f7fbff;
}

.customer-document-upload > div strong,
.customer-document-upload > div small,
.customer-document-upload label span {
  display: block;
}

.customer-document-upload > div small,
.customer-document-upload label span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.customer-document-upload input,
.customer-document-upload select {
  width: 100%;
  min-height: 40px;
  margin-top: 6px;
  padding: 0 10px;
  border: 1px solid #d5dfeb;
  border-radius: 9px;
  background: #fff;
}

.customer-document-file input {
  padding: 8px;
  font-size: 10px;
}

.customer-document-name {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.customer-document-name > svg {
  width: 19px;
  color: var(--blue);
}

.customer-document-name strong,
.customer-document-name small {
  display: block;
}

.customer-document-name small {
  margin-top: 3px;
  color: var(--muted);
}

.customer-traffic-history {
  margin-bottom: 16px;
  padding: 15px;
  border: 1px solid #dce7f4;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff, #f4f8fd);
}

.customer-traffic-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-traffic-history-head strong {
  display: block;
  font-size: 14px;
}

.traffic-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.traffic-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #3074f0;
}

.traffic-legend i.upload {
  margin-left: 5px;
  background: #25ad79;
}

.customer-traffic-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  align-items: end;
  gap: 12px;
  height: 170px;
  margin-top: 15px;
  padding-top: 10px;
  border-bottom: 1px solid #d7e1ed;
  background: repeating-linear-gradient(to top, transparent 0, transparent 39px, #e6edf5 40px);
}

.customer-traffic-bars > div {
  display: grid;
  grid-template-rows: 130px 20px;
  align-items: end;
  text-align: center;
}

.customer-traffic-bars > div > span {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 125px;
}

.customer-traffic-bars i {
  width: 14px;
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(#5292fa, #2364cf);
}

.customer-traffic-bars i.upload {
  background: linear-gradient(#50cc9d, #17835b);
}

.customer-traffic-bars small {
  color: var(--muted);
  text-transform: capitalize;
}

.customer-traffic-empty,
.comparison-empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.billing-month-comparison,
.finance-comparison-panel {
  margin: 15px 0 18px;
}

.month-comparison-grid {
  display: grid;
  gap: 13px;
}

.month-comparison-row {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.month-comparison-row > span,
.month-comparison-row > span strong,
.month-comparison-row > span small {
  display: block;
}

.month-comparison-row > span small,
.finance-comparison-change {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 800;
}

.positive { color: #168258; }
.negative { color: #bd3544; }

.comparison-bars {
  display: grid;
  gap: 6px;
}

.comparison-bars > span {
  position: relative;
  overflow: hidden;
  min-height: 25px;
  border-radius: 7px;
  background: #edf2f8;
}

.comparison-bars i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f75ed, #64a0ff);
}

.comparison-bars i.previous {
  background: linear-gradient(90deg, #aab6c6, #c8d1dc);
}

.comparison-bars small {
  position: relative;
  z-index: 1;
  display: block;
  padding: 6px 9px;
  color: #25364e;
  font-weight: 700;
}

.month-comparison-rate {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 3px;
}

.month-comparison-rate span {
  padding: 11px;
  border-radius: 10px;
  background: #f4f7fb;
}

.month-comparison-rate small,
.month-comparison-rate strong {
  display: block;
}

.month-comparison-rate small {
  color: var(--muted);
}

.month-comparison-rate strong {
  margin-top: 3px;
  font-size: 18px;
}

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

.finance-comparison-card {
  position: relative;
  padding: 14px;
  border: 1px solid #dce4ee;
  border-radius: 12px;
  background: #fff;
}

.finance-comparison-card > span:first-child small,
.finance-comparison-card > span:first-child strong {
  display: block;
}

.finance-comparison-card > span:first-child small,
.finance-comparison-card > small {
  color: var(--muted);
}

.finance-comparison-card > span:first-child strong {
  margin-top: 4px;
  font-size: 18px;
}

.finance-comparison-change {
  position: absolute;
  top: 14px;
  right: 14px;
}

.finance-comparison-bars {
  display: grid;
  gap: 5px;
  margin: 13px 0 8px;
}

.finance-comparison-bars i {
  display: block;
  height: 8px;
  border-radius: 5px;
  background: #2c75ed;
}

.finance-comparison-card.expense .finance-comparison-bars i {
  background: #e65f6c;
}

.finance-comparison-bars i.previous {
  height: 5px;
  background: #b5c0ce !important;
}

.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: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-queue { display: grid; gap: 8px; }
.ticket-queue-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.ticket-queue-head strong,
.ticket-queue-head small { display: block; }
.ticket-queue-head small,
.ticket-queue-head > span:last-child { color: var(--muted); font-size: 10px; }
.ticket-list-card { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(135px, .35fr) auto; align-items: center; gap: 12px; margin: 0; }
.ticket-list-card .ticket-card-foot { margin: 0; }
.ticket-select { display: grid; place-items: center; }
.ticket-select input { width: 17px; height: 17px; }
.ticket-list-main { min-width: 0; }
.ticket-list-main h4 { margin: 5px 0 3px; }
.ticket-list-main p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-list-meta { display: grid; gap: 4px; }
.ticket-list-meta strong { font-size: 10px; }
.ticket-list-meta small { color: var(--muted); font-size: 9px; }
.ticket-status-label { padding: 3px 7px; border-radius: 999px; color: #35506f; background: #edf3fa; font-size: 8px; font-weight: 800; }

@media (max-width: 720px) {
  .node-equipment-item { grid-template-columns: auto 1fr; }
  .node-equipment-item input[type="text"] { grid-column: 2; }
  .ticket-list-card { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .ticket-list-meta { grid-column: 2; grid-template-columns: 1fr 1fr; }
}

.support-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  grid-template-areas:
    "board detail"
    "pager detail";
  align-items: start;
  gap: 18px;
}

.support-board { grid-area: board; }
.ticket-detail-panel { grid-area: detail; }
.ticket-pagination { grid-area: pager; margin-top: 0; }

.ticket-column {
  min-height: 0;
  padding: 12px;
  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: 14px 15px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 4px 0 0 #93a4ba;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ticket-card[data-ticket-status-key="abierto"] { box-shadow: inset 4px 0 0 #e85d68; }
.ticket-card[data-ticket-status-key="en-proceso"] { box-shadow: inset 4px 0 0 #f28a34; }
.ticket-card[data-ticket-status-key="en-aprobacion"] { box-shadow: inset 4px 0 0 #8b5cf6; }
.ticket-card[data-ticket-status-key="resuelto"] { box-shadow: inset 4px 0 0 #22a06b; }

.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: 13px;
}

.ticket-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  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;
}

.network-repair-progress {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  width: min(390px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(56, 189, 248, .45);
  border-radius: 12px;
  background: #10243a;
  color: #f8fafc;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .28);
}
.network-repair-progress strong,
.network-repair-progress span { display: block; }
.network-repair-progress .network-repair-drag-handle { cursor: grab; touch-action: none; user-select: none; }
.network-repair-progress .network-repair-drag-handle:active { cursor: grabbing; }
.network-repair-progress span { margin-top: 5px; color: #cbd5e1; font-size: .82rem; }
.network-repair-progress i { display: block; height: 6px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, .28); }
.network-repair-progress b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bdf8, #34d399); transition: width .25s ease; }
.floating-ping-result { position: fixed; right: 24px; bottom: 24px; z-index: 1250; width: min(560px, calc(100vw - 32px)); max-height: 68vh; overflow: auto; box-shadow: 0 22px 55px rgba(15, 23, 42, .34); }
.customer-ping-window { border-color: rgba(56, 189, 248, .48); background: #10243a; color: #f8fafc; }
.customer-ping-window-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(148, 163, 184, .24); }
.customer-ping-window-head > strong { color: #f8fafc; font-size: 13px; }
.customer-ping-window-head .row-action { color: #f8fafc; border-color: rgba(148, 163, 184, .35); background: rgba(15, 23, 42, .3); }
.customer-ping-drag-handle { cursor: grab; touch-action: none; user-select: none; }
.customer-ping-drag-handle:active { cursor: grabbing; }
.customer-ping-window .ping-terminal-summary { padding: 10px 0 8px; }
.customer-ping-window .ping-terminal-lines { max-height: 320px; overflow: auto; padding: 10px; border-radius: 9px; background: #071523; }
.customer-online-pill.pending { color: #854d0e; background: #fef3c7; }

@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;
    grid-template-areas:
      "board"
      "pager"
      "detail";
  }

  .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 { width: min(360px, 38vw); }
}

@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 {
    flex-wrap: wrap;
    padding: 15px 20px;
  }

  .topbar-actions { width: 100%; }
  .global-search { display: flex; width: auto; min-width: 0; flex: 1 1 240px; }
  .global-search kbd { display: none; }
  .global-search-results {
    right: auto;
    left: 0;
    width: min(620px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
  }

  .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: 46px minmax(0, 1fr);
  }

  .admin-user-row > :nth-child(3),
  .admin-user-row > :nth-child(4) {
    display: none;
  }

  .admin-user-actions {
    grid-column: 1 / -1;
  }

  .admin-user-actions .row-action {
    flex: 1 1 110px;
    justify-content: center;
  }

  .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;
  }
}

/* Perfil de cliente moderno y realmente adaptable a teléfonos. */
@media (max-width: 720px) {
  #customersView .customer-profile-panel {
    width: 100%;
    padding: 14px;
    border-radius: 20px;
    overflow: visible;
  }

  #customersView .customer-profile-head {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px solid #dbe8f7;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fbff, #eef5ff);
  }

  #customersView .customer-profile-avatar {
    width: 48px;
    height: 48px;
  }

  #customersView .customer-profile-identity h3 {
    margin-top: 0;
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  #customersView .customer-profile-identity p {
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  #customersView .customer-profile-head .customer-online-pill {
    grid-column: 1 / -1;
    justify-self: start;
    margin: 0;
  }

  #customersView .customer-profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 0;
  }

  #customersView .customer-profile-actions > * {
    width: 100%;
    min-width: 0;
    justify-content: center;
    padding-inline: 8px;
  }

  #customersView .customer-profile-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: visible;
  }

  #customersView .customer-profile-tabs button {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
    font-size: 11px;
  }

  #customersView .customer-profile-section:not([hidden]) {
    margin-top: 12px;
    padding: 12px;
    overflow: visible;
  }

  #customersView .customer-document-summary,
  #customersView .customer-network-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  #customersView .customer-profile-actions {
    grid-template-columns: 1fr;
  }
}

.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; }
.network-down-duration {
  color: #c33e4b !important;
  font-weight: 750;
  white-space: nowrap;
}

/* 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) {
  .modal-backdrop {
    padding: 0;
    align-items: stretch;
  }

  .modal,
  .modal.quick-modal,
  .modal.evidence-modal {
    width: 100%;
    max-width: none;
    max-height: 100dvh;
    min-height: 100dvh;
    overflow-x: hidden;
    border-radius: 0;
  }

  .modal-header,
  .modal-footer,
  .quick-modal .modal-header,
  .quick-modal .modal-footer {
    padding: 13px 14px;
  }

  .modal-body,
  .quick-modal .modal-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 13px;
    padding: 14px;
  }

  .modal-body > *,
  .quick-step-fields > *,
  #customersView .customer-profile-panel > *,
  #customersView .customer-profile-section > * {
    min-width: 0;
    max-width: 100%;
  }

  .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;
  }

  #customersView .customer-profile-panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  #customersView .customer-profile-head,
  #customersView .customer-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #customersView .customer-profile-actions > * {
    width: 100%;
    justify-content: center;
  }

  #customersView .customer-profile-tabs {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  #customersView .customer-profile-tabs button {
    flex: 0 0 auto;
    min-width: 142px;
    scroll-snap-align: start;
  }

  #customersView .customer-profile-section:not([hidden]) {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    overflow-x: auto;
  }

  #customersView img,
  #customersView canvas,
  #customersView svg {
    max-width: 100%;
  }
}

@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;
  }

  .customer-profile-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .customer-profile-head .customer-online-pill {
    margin-left: 64px;
  }

  .customer-document-summary,
  .customer-network-kpis,
  .finance-comparison-grid,
  .month-comparison-rate {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-document-upload {
    grid-template-columns: 1fr;
  }

  .customer-traffic-history-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-traffic-bars {
    gap: 5px;
  }

  .month-comparison-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 601px) and (max-width: 1100px) {
  .customer-document-upload {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-document-upload > div {
    grid-column: 1 / -1;
  }
}

@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)); }
}

/* Catálogo profesional de Planes y Servicios. */
#plansView .plan-grid { gap: 0; overflow: hidden; border: 1px solid #dfe7f1; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(30,54,87,.05); }
#plansView .plan-table-header,
#plansView .plan-list-row { grid-template-columns: minmax(230px,1.3fr) minmax(125px,.75fr) minmax(125px,.7fr) minmax(100px,.55fr) minmax(145px,.8fr) 88px minmax(205px,auto); gap: 12px; }
#plansView .plan-table-header { display: grid; align-items: center; padding: 11px 14px 11px 18px; border-bottom: 1px solid #dfe7f1; background: #f4f7fb; color: #66758a; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
#plansView .plan-list-row { padding: 12px 14px 12px 18px; border: 0; border-bottom: 1px solid #edf1f6; border-radius: 0; background: #fff; }
#plansView .plan-list-row:last-child { border-bottom: 0; }
#plansView .plan-list-row:nth-child(odd) { background: #fbfcfe; }
#plansView .plan-list-row:hover { background: #f2f7ff; box-shadow: none; }
#plansView .plan-list-name { padding-right: 8px; border-right: 0; }
#plansView .plan-list-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 5px; min-width: 205px; padding-left: 8px; border-left: 1px solid #edf1f6; }
#plansView .plan-list-actions button { min-height: 30px; padding: 5px 7px; white-space: nowrap; font-size: 10px; }

.message-history-header { gap: 12px; align-items: flex-end; }
.message-bulk-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; }
.message-bulk-actions > span { color: var(--muted); font-size: 11px; font-weight: 700; }
.message-bulk-actions button { min-height: 31px; padding: 6px 9px; font-size: 11px; }
.message-select-cell { width: 34px; min-width: 34px; text-align: center; }
.message-select-cell input { width: 16px; height: 16px; accent-color: var(--blue); }
.automation-summary { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

@media (max-width: 1500px) {
  #plansView .plan-table-header,
  #plansView .plan-list-row { grid-template-columns: minmax(210px,1.2fr) minmax(115px,.7fr) minmax(115px,.65fr) minmax(90px,.5fr) 80px minmax(205px,auto); }
  #plansView .plan-table-header > span:nth-child(5),
  #plansView .plan-list-row > div:nth-child(5) { display: none; }
}

@media (max-width: 1080px) {
  #plansView .plan-table-header { display: none; }
  #plansView .plan-grid { gap: 10px; overflow: visible; border: 0; background: transparent; box-shadow: none; }
  #plansView .plan-list-row { grid-template-columns: minmax(220px,1fr) repeat(2,minmax(135px,.7fr)); border: 1px solid #dfe7f1; border-radius: 13px; box-shadow: 0 5px 16px rgba(30,54,87,.05); }
  #plansView .plan-list-actions { grid-column: 1 / -1; display: grid; 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) {
  .message-history-header { align-items: stretch; }
  .message-bulk-actions { justify-content: flex-start; }
  .message-bulk-actions button { flex: 1 1 145px; }
}

/* IPTV operativo: cuentas, proveedor y TV Box en un solo módulo. */
.iptv-account-panel { margin: 0 0 18px; }
.iptv-account-panel .panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.iptv-provider-dot { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #e85d68; }
.iptv-provider-dot.connected { background: #22a06b; box-shadow: 0 0 0 4px rgba(34,160,107,.12); }
.iptv-provider-dot.demo { background: #8b5cf6; }
.iptv-account-row { grid-template-columns: minmax(180px,1.15fr) minmax(150px,.9fr) minmax(135px,.8fr) minmax(145px,.85fr) 115px 90px 44px; }
.plan-list-name { display: flex; align-items: center; gap: 10px; }
.plan-list-name > span:last-child { display: grid; gap: 2px; min-width: 0; }
.plan-list-row > div:not(.plan-list-actions) small,
.plan-list-row > div:not(.plan-list-actions) em { display: block; color: var(--muted); font-size: 10px; font-style: normal; }
.plan-list-row > div:not(.plan-list-actions) strong { display: block; margin: 2px 0; }
#incidentsView #incidentPagination { margin-top: 10px; }

@media (max-width: 1050px) {
  .iptv-account-panel .data-table { overflow-x: auto; }
  .iptv-account-row { min-width: 900px; }
}

@media (max-width: 720px) {
  #operationsCalendarView .toolbar-buttons { width: 100%; }
  #operationsCalendarView .toolbar-buttons button { flex: 1 1 145px; }
  .incident-workspace { grid-template-columns: 1fr; }
  .incident-list { max-height: 480px; }
  .incident-detail-panel { position: static; padding: 15px; }
  .incident-info-grid { grid-template-columns: 1fr 1fr; }
  .plan-list-name { align-items: flex-start; }
}

/* 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; }
}
.automation-center-summary,
.automation-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.automation-center-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 16px;
  align-items: start;
}

.automation-rule-list,
.automation-run-history,
#automationRunHistory {
  display: grid;
  gap: 10px;
}

.automation-rule-card {
  display: grid;
  grid-template-columns: minmax(260px, 1.15fr) minmax(200px, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.automation-rule-card.disabled { opacity: .66; }
.automation-rule-flow { display: flex; align-items: center; gap: 9px; min-width: 0; }
.automation-step { min-width: 0; padding: 8px 10px; border-radius: 10px; background: #eef4ff; color: #2459ad; }
.automation-step.action { background: #e8f8f1; color: #187650; }
.automation-step small { display: block; margin-bottom: 2px; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.automation-step strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.automation-flow-arrow svg { width: 16px; height: 16px; color: var(--muted); }
.automation-rule-copy { min-width: 0; }
.automation-rule-copy strong, .automation-rule-copy small { display: block; }
.automation-rule-copy small { margin-top: 4px; color: var(--muted); line-height: 1.35; }
.automation-rule-stats { display: flex; gap: 18px; }
.automation-rule-stats span small, .automation-rule-stats span strong { display: block; white-space: nowrap; }
.automation-rule-stats small { color: var(--muted); font-size: 10px; }
.automation-rule-stats strong { margin-top: 3px; font-size: 12px; }
.automation-rule-actions { display: flex; align-items: center; gap: 6px; }

.automation-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 88px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f5f7fa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.automation-toggle i { width: 8px; height: 8px; border-radius: 50%; background: #98a2b3; }
.automation-toggle.active { border-color: #9edcc3; background: #e8f8f1; color: #187650; }
.automation-toggle.active i { background: #22a06b; box-shadow: 0 0 0 3px rgba(34,160,107,.13); }

.automation-run-row {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.automation-run-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #31506f;
  background: #edf3f8;
  font-size: 10px;
  font-weight: 800;
}
.automation-run-row .event-icon { color: #22a06b; }
.automation-run-row.error .event-icon { color: #e85d68; }
.automation-run-row strong, .automation-run-row small { display: block; }
.automation-run-row small { margin-top: 3px; color: var(--muted); line-height: 1.35; }
.automation-run-row em { color: #187650; font-size: 10px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.automation-run-row.error em { color: #c33d49; }

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 2px 2px;
  color: var(--muted);
  font-size: 11px;
}

.numbered-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.numbered-pagination em {
  padding: 0 2px;
  color: var(--muted);
  font-style: normal;
}

.page-number {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #42566c;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.page-number:hover { border-color: #7faee4; color: #176cc1; }
.page-number.active { border-color: #1d78d2; color: #fff; background: #1d78d2; }

.invoice-reverse-payment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 9px;
  color: #9a4e13;
  border-color: #edc79e;
  background: #fff8ef;
  white-space: nowrap;
}

.invoice-reverse-payment svg { width: 14px; height: 14px; }

html[data-theme="dark"] body .app-shell .invoice-reverse-payment {
  color: #ffd09e;
  border-color: #74512f;
  background: #342617;
}

html[data-theme="dark"] body .app-shell .automation-run-number {
  color: #c7dbef;
  background: #23364d;
}

html[data-theme="dark"] body .app-shell .page-number {
  border-color: var(--dark-border);
  color: #c7d5e5;
  background: var(--dark-surface-2);
}

html[data-theme="dark"] body .app-shell .page-number.active {
  border-color: #4f93e2;
  color: #fff;
  background: #367ecb;
}

@media (max-width: 1180px) {
  .automation-rule-card { grid-template-columns: 1fr 1fr; }
  .automation-rule-actions { justify-content: flex-end; }
}

@media (max-width: 800px) {
  .automation-center-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .automation-center-layout { grid-template-columns: 1fr; }
  .automation-rule-card { grid-template-columns: 1fr; gap: 11px; }
  .automation-rule-actions { justify-content: flex-start; flex-wrap: wrap; }
  .automation-run-row { grid-template-columns: 28px auto minmax(0, 1fr); }
  .automation-run-row > em { grid-column: 3; }
  .table-pagination { align-items: stretch; flex-direction: column; }
  .numbered-pagination { justify-content: flex-start; }
  .user-module-permissions,
  .user-action-permissions { grid-template-columns: 1fr; max-height: 44vh; }
  .user-permissions-heading,
  .user-permissions-toolbar { align-items: stretch; flex-direction: column; }
  .user-permissions-toolbar label { width: 100%; max-width: none; }
  .user-permission-group-options { grid-template-columns: 1fr; }
}

/* Identidad visual empresarial NetControl 2026. */
body {
  background: #f2f5f9;
}

.auth-screen {
  grid-template-columns: minmax(520px, 1.18fr) minmax(420px, .82fr);
  background: #edf2f8;
}

.auth-visual {
  padding: clamp(34px, 5vw, 72px);
  background:
    radial-gradient(circle at 82% 14%, rgba(52, 211, 235, .22), transparent 25%),
    radial-gradient(circle at 15% 88%, rgba(42, 105, 230, .3), transparent 32%),
    linear-gradient(145deg, #071426 0%, #0c213b 50%, #12345a 100%);
}

.auth-visual::before {
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom right, #000, transparent 75%);
}

.auth-brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .09);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .24);
  backdrop-filter: blur(12px);
}

.auth-brand strong {
  font-size: 19px;
  letter-spacing: -.02em;
}

.auth-visual-content h1 {
  font-size: clamp(40px, 4.4vw, 66px);
  line-height: 1.02;
}

.auth-feature-grid > span {
  min-height: 92px;
  padding: 17px;
  border-color: rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  box-shadow: inset 0 1px rgba(255,255,255,.06);
}

.auth-form-side {
  padding: clamp(28px, 5vw, 76px);
  background:
    radial-gradient(circle at 100% 0, rgba(67, 133, 246, .16), transparent 34%),
    linear-gradient(155deg, #f8fbff, #eaf0f7);
}

.login-card {
  width: min(440px, 100%);
  padding: 38px;
  border: 1px solid rgba(207, 219, 234, .9);
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 28px 70px rgba(18, 45, 79, .15), 0 4px 14px rgba(18, 45, 79, .06);
  backdrop-filter: blur(18px);
}

.login-heading h2 {
  font-size: 34px;
}

.login-input-wrap {
  min-height: 54px;
  border-color: #d9e3ef;
  border-radius: 14px;
  background: #f7faff;
}

.login-input-wrap:focus-within {
  border-color: #2f73ed;
  box-shadow: 0 0 0 4px rgba(47, 115, 237, .11);
}

.login-submit {
  min-height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2469df, #2a83ed 58%, #28a8cd);
  box-shadow: 0 14px 28px rgba(36, 105, 223, .24);
}

.sidebar {
  width: 270px;
  padding: 22px 15px 18px;
  border-right: 1px solid rgba(255,255,255,.06);
  background:
    radial-gradient(circle at 0 0, rgba(46, 197, 226, .13), transparent 26%),
    linear-gradient(180deg, #071426 0%, #0b1c31 58%, #0b192b 100%);
  box-shadow: 12px 0 34px rgba(11, 29, 50, .08);
}

.brand {
  margin-bottom: 8px;
  padding: 4px 10px 22px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 15px;
}

.nav-list {
  gap: 4px;
  padding: 4px 4px 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(142, 166, 196, .28) transparent;
}

.nav-section-label {
  margin: 13px 10px 4px;
  color: #6f829c;
  font-size: 8px;
  letter-spacing: .15em;
}

.nav-item {
  min-height: 43px;
  gap: 11px;
  padding: 0 12px;
  border-radius: 11px;
  color: #9aabc1;
  font-size: 12px;
}

.nav-item:hover {
  background: rgba(255,255,255,.065);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(45, 119, 238, .34), rgba(45, 119, 238, .09));
  box-shadow: inset 3px 0 #35c8e8, 0 8px 20px rgba(0,0,0,.08);
}

.nav-item.active .nav-icon {
  color: #61d7ed;
}

.sidebar-bottom {
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.sync-card,
.user-card {
  border-radius: 12px;
  background: rgba(255,255,255,.045);
}

.main-content {
  margin-left: 270px;
}

.topbar {
  min-height: 84px;
  padding: 14px 30px;
  border-bottom-color: #dce5f0;
  background: rgba(248, 250, 253, .9);
  box-shadow: 0 8px 24px rgba(22, 48, 80, .04);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  font-size: clamp(21px, 2vw, 27px);
}

.global-search {
  min-height: 44px;
  border-color: #dbe4ef;
  border-radius: 13px;
  box-shadow: 0 4px 14px rgba(27, 54, 88, .04);
}

.view {
  padding: 26px 30px 54px;
}

.panel,
.panel-card {
  border-color: #dde6f0;
  border-radius: 17px;
  box-shadow: 0 8px 24px rgba(23, 49, 79, .055);
}

#customersView .customer-profile-panel {
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  box-shadow: 0 18px 44px rgba(24, 54, 90, .09);
}

#customersView .customer-profile-head {
  padding: 17px;
  border: 1px solid #dce8f5;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(50, 143, 235, .12), transparent 34%),
    linear-gradient(145deg, #f9fcff, #eef5fd);
}

#customersView .customer-profile-tabs {
  padding: 6px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(135deg, #101d2d, #172b43);
  box-shadow: 0 10px 24px rgba(16, 35, 57, .12);
}

@media (max-width: 1180px) {
  .sidebar {
    width: min(300px, 88vw);
  }

  .main-content {
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .auth-screen {
    position: relative;
    display: grid;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .auth-visual {
    min-height: auto;
    padding: 18px 20px;
  }

  .auth-visual-content,
  .auth-visual-orbit {
    display: none;
  }

  .auth-brand-mark {
    width: 44px;
    height: 44px;
  }

  .auth-form-side {
    display: block;
    min-height: 0;
    padding: 24px 16px calc(28px + env(safe-area-inset-bottom));
  }

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

  .login-card {
    width: min(100%, 460px);
    margin: 0 auto;
    padding: 25px 20px;
    border-radius: 20px;
  }

  .login-heading h2 {
    font-size: 28px;
  }

  .topbar {
    min-height: 72px;
    align-items: flex-start;
    padding: 12px 15px;
  }

  .topbar-actions {
    width: 100%;
  }

  .global-search {
    min-width: 0;
    flex: 1;
  }

  .view {
    padding: 18px 12px 40px;
  }

  #customersView .customer-profile-panel {
    padding: 11px;
    border-radius: 17px;
  }

  #customersView .customer-profile-head {
    padding: 12px;
    border-radius: 14px;
  }
}

/* Prioridad final de la interfaz empresarial sobre estilos heredados. */
body:not(.auth-pending) { color: var(--ink-950); background-color: var(--canvas); }

.app-shell .sidebar {
  background: radial-gradient(circle at 0 0, rgba(46, 197, 226, .14), transparent 27%), linear-gradient(180deg, #071426, #0b1c31 58%, #091725);
}

.app-shell .topbar {
  border-bottom: 1px solid #dce5ef;
  background: rgba(248, 250, 253, .92);
  box-shadow: 0 8px 24px rgba(22, 48, 80, .045);
  backdrop-filter: blur(18px);
}

.app-shell .panel,
.app-shell .table-card,
.app-shell .panel-card {
  border-color: var(--border);
  border-radius: 17px;
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--elevation-1);
}

.app-shell .primary-button {
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  box-shadow: 0 9px 18px rgba(31, 111, 229, .18);
}

.app-shell .data-table { border-color: #e2e9f1; border-radius: 13px; }
.app-shell .table-row.header { color: #61738b; background: #f5f8fb; }
.app-shell .table-row:not(.header):hover { background: #f5f9ff; }

.auth-screen .login-card {
  border-color: rgba(196, 211, 229, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 30px 80px rgba(22, 54, 92, .16), 0 2px 8px rgba(22, 54, 92, .05);
}

.auth-screen .login-input-wrap {
  min-height: 54px;
  border-color: #d9e3ef;
  border-radius: 14px;
  background: #f7faff;
}

.auth-screen .login-input-wrap:focus-within {
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: var(--focus-ring);
}

@media (max-width: 700px) {
  .app-shell .panel,
  .app-shell .table-card,
  .app-shell .panel-card { border-radius: 14px; }

  .auth-screen .login-card {
    width: min(100%, 460px);
    padding: 25px 20px;
    border-radius: 18px;
  }

  .app-shell .topbar-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .app-shell .global-search { width: 100%; min-width: 0; }
  .app-shell .view { padding: 15px 10px 34px; }
}

/* Clientes 2.0: expediente amplio en escritorio y tarjetas operativas en movil. */
#customersView .section-toolbar {
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid #dce6f1;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 10%, rgba(42, 130, 237, .1), transparent 27%),
    linear-gradient(145deg, #ffffff, #f6f9fd);
  box-shadow: var(--elevation-1);
}

#customersView .section-toolbar h2 {
  margin-bottom: 5px;
  color: #11243c;
  font-family: Manrope, "DM Sans", sans-serif;
  font-size: clamp(24px, 2.2vw, 32px);
  letter-spacing: -.04em;
}

#customersView .section-toolbar p { max-width: 720px; color: #687b93; line-height: 1.55; }

#customersView .customer-summary {
  gap: 12px;
  margin-bottom: 14px;
}

#customersView .summary-card {
  position: relative;
  min-height: 86px;
  padding: 15px;
  border: 1px solid #dfe7f1;
  border-radius: 15px;
  background: linear-gradient(150deg, #fff, #f8fbfe);
  box-shadow: 0 5px 18px rgba(18, 46, 80, .045);
}

#customersView .summary-card strong { color: #172a43; font-size: clamp(17px, 1.45vw, 22px); letter-spacing: -.025em; }
#customersView .summary-card > span:last-child > span { margin-top: 4px; color: #71839a; font-weight: 700; }

#customersView .customer-filter-bar {
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dfe7f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(18, 46, 80, .04);
}

#customersView .customer-filter-bar select,
#customersView .customer-filter-bar .table-search {
  min-height: 42px;
  border-color: #dbe4ee;
  border-radius: 10px;
  background-color: #f8fafc;
}

#customersView .customer-management-layout > .table-card { overflow: hidden; }
#customersView .customer-management-layout > .table-card .data-table { overflow-x: auto; }

#customersView .customer-table-row:not(.header):not(.customer-filter-row) {
  min-height: 62px;
  background: #fff;
}

#customersView .customer-table-row:not(.header):not(.customer-filter-row):nth-of-type(even) { background: #fbfcfe; }
#customersView .customer-table-row > span { min-width: 0; }

#customersView .customer-name-link {
  color: #1559c6;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

#customersView .customer-name-link:hover { color: #0c438f; text-decoration: underline; text-underline-offset: 3px; }
#customersView .cell-sub { margin-top: 4px; color: #8290a2; line-height: 1.35; }

#customersView .customer-profile-panel {
  overflow: clip;
  padding: 18px;
  border-color: #d9e4f0;
}

#customersView .customer-profile-panel[hidden] { display: none !important; }

#customersView .customer-profile-head {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
}

#customersView .customer-profile-avatar { width: 58px; height: 58px; border-radius: 17px; font-size: 18px; }
#customersView .customer-profile-identity h3 { margin: 3px 0 0; color: #10243e; font-size: clamp(21px, 2vw, 28px); letter-spacing: -.035em; }
#customersView .customer-profile-identity p { max-width: 780px; color: #677a92; line-height: 1.5; }

.customer-profile-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d6e1ed;
  border-radius: 11px;
  color: #61758d;
  background: rgba(255, 255, 255, .86);
  cursor: pointer;
}

.customer-profile-close:hover { color: #153f73; border-color: #b9cce1; background: #fff; }
.customer-profile-close svg { width: 16px; height: 16px; }

#customersView .customer-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 13px 2px;
}

#customersView .customer-profile-actions button { min-height: 40px; }

#customersView .customer-account-health {
  margin: 0 0 13px;
  border-radius: 13px;
}

#customersView .customer-profile-tabs {
  top: 94px;
  margin-top: 0;
  border-radius: 13px;
}

#customersView .customer-profile-tabs button { flex: 0 0 auto; min-width: 126px; }

#customersView .customer-profile-section:not([hidden]) {
  margin-top: 13px;
  padding: 17px;
  border-color: #dfe7f0;
  border-radius: 14px;
  background: #f9fbfd;
}

@media (max-width: 1280px) {
  #customersView .customer-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #customersView .customer-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #customersView .customer-filter-bar .table-search { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  #customersView .section-toolbar {
    gap: 14px;
    margin-bottom: 11px;
    padding: 16px;
    border-radius: 15px;
  }

  #customersView .section-toolbar h2 { font-size: 24px; }
  #customersView .section-toolbar p { font-size: 12px; }
  #customersView .toolbar-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  #customersView .toolbar-buttons button { min-width: 0; padding-inline: 10px; font-size: 10px; }

  #customersView .customer-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #customersView .summary-card { min-height: 76px; padding: 11px; border-radius: 13px; }
  #customersView .summary-card:last-child { grid-column: 1 / -1; }
  #customersView .summary-card .metric-icon { width: 34px; height: 34px; }
  #customersView .summary-card strong { font-size: 17px; }

  #customersView .customer-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 13px;
  }

  #customersView .customer-filter-bar .table-search { grid-column: 1 / -1; }
  #customersView .customer-filter-bar select { width: 100%; min-width: 0; padding-inline: 8px; font-size: 10px; }

  #customersView .customer-management-layout > .table-card {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #customersView .customer-management-layout > .table-card .data-table {
    display: grid;
    gap: 10px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #customersView .customer-table-row.header,
  #customersView .customer-filter-row { display: none; }

  #customersView .customer-table-row:not(.header):not(.customer-filter-row) {
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    padding: 0;
    border: 1px solid #dce5ef;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(18, 46, 80, .06);
  }

  #customersView .customer-table-row:not(.header):not(.customer-filter-row) > span {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 61px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 20px 12px 9px;
    border-right: 1px solid #edf1f5;
    border-bottom: 1px solid #edf1f5;
    overflow-wrap: anywhere;
  }

  #customersView .customer-table-row:not(.header):not(.customer-filter-row) > span::before {
    position: absolute;
    top: 7px;
    left: 12px;
    color: #8795a6;
    content: attr(data-label);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  #customersView .customer-table-row > span:nth-child(2),
  #customersView .customer-table-row > span:nth-child(7),
  #customersView .customer-table-row > span:nth-child(9),
  #customersView .customer-table-row > span:nth-child(12) { grid-column: 1 / -1; }

  #customersView .customer-table-row > span:nth-child(8) { display: none; }
  #customersView .customer-name-link { font-size: 14px; }
  #customersView .customer-balance { font-size: 13px; }

  #customersView .customer-online-pill {
    min-height: 28px !important;
    align-self: stretch;
    justify-content: center !important;
    margin: 18px 10px 9px;
    padding: 0 10px !important;
  }

  #customersView .customer-online-pill::before { left: 2px !important; }

  #customersView .customer-row-actions {
    min-height: 58px !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-direction: row !important;
    gap: 7px;
    padding-top: 23px !important;
  }

  #customersView .customer-row-actions .row-action { width: 36px; height: 34px; }

  #customersView .customer-pagination {
    align-items: stretch;
    flex-direction: column;
    padding: 5px 2px 0;
  }

  #customersView .customer-pagination > span { justify-content: space-between; }

  #customersView .customer-profile-panel { padding: 10px; border-radius: 15px; }

  #customersView .customer-profile-head {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
  }

  #customersView .customer-profile-avatar { width: 50px; height: 50px; border-radius: 14px; font-size: 15px; }
  #customersView .customer-profile-identity h3 { font-size: 18px; line-height: 1.25; }
  #customersView .customer-profile-identity p { font-size: 10px; line-height: 1.45; }
  #customersView .customer-profile-head > .customer-online-pill { grid-column: 1 / 3; width: fit-content; margin: 0; }
  #customersView .customer-profile-close { grid-column: 3; grid-row: 1; width: 34px; height: 34px; }

  #customersView .customer-profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px 0;
  }

  #customersView .customer-profile-actions button { width: 100%; min-width: 0; justify-content: center; padding-inline: 7px; font-size: 10px; }

  #customersView .customer-account-health { align-items: flex-start; padding: 11px; }
  #customersView .customer-account-health small { line-height: 1.45; }

  #customersView .customer-profile-tabs {
    position: sticky;
    top: 72px;
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 5px;
    scroll-snap-type: x proximity;
  }

  #customersView .customer-profile-tabs button { flex: 0 0 auto; min-width: 118px; min-height: 38px; scroll-snap-align: start; font-size: 10px; }
  #customersView .customer-profile-section:not([hidden]) { padding: 10px; overflow: hidden; }
  #customersView .customer-record-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #customersView .customer-document-summary,
  #customersView .customer-network-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  #customersView .toolbar-buttons { grid-template-columns: 1fr; }
  #customersView .customer-filter-bar { grid-template-columns: 1fr; }
  #customersView .customer-filter-bar .table-search { grid-column: auto; }
  #customersView .customer-profile-actions { grid-template-columns: 1fr; }
  #customersView .customer-table-row:not(.header):not(.customer-filter-row) { grid-template-columns: 1fr; }
  #customersView .customer-table-row > span { grid-column: 1 !important; border-right: 0 !important; }
  #customersView .customer-table-row > span:nth-child(8) { display: none; }
}
.payment-report-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-report-actions .compact-date-field {
  min-width: 160px;
}

@media (max-width: 720px) {
  .payment-report-actions,
  .payment-report-actions > * {
    width: 100%;
  }
}

/* Final authority for the accordion catalogue after legacy plan layouts. */
#plansView .plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] body .app-shell #plansView .plan-grid {
  border: 0;
  background: transparent !important;
}
.fiscal-range-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 14px 0;
  padding: 13px 14px;
  border: 1px solid var(--line, #d9e2ef);
  border-radius: 14px;
  background: var(--surface-soft, #f7f9fc);
}

.fiscal-range-summary > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #fff;
  background: #667085;
}

.fiscal-range-summary.is-active > span { background: #16845b; }
.fiscal-range-summary svg { width: 21px; height: 21px; }
.fiscal-range-summary small,
.fiscal-range-summary strong,
.fiscal-range-summary p { display: block; }
.fiscal-range-summary small { color: var(--muted, #667085); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; }
.fiscal-range-summary strong { margin-top: 2px; color: var(--text, #172033); }
.fiscal-range-summary p { margin: 3px 0 0; color: var(--muted, #667085); font-size: 0.82rem; }

.fiscal-document-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, #16845b 30%, transparent);
  border-radius: 999px;
  color: #0d6845;
  background: color-mix(in srgb, #16845b 9%, transparent);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Dashboard ejecutivo: autoridad visual final para modo claro y oscuro. */
#dashboardView {
  --dashboard-panel-border: #dfe7f1;
  --dashboard-panel-soft: #f7f9fc;
}

#dashboardView .dashboard-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 108px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid #d8e5f5;
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 0, rgba(53, 200, 232, .16), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  box-shadow: 0 14px 34px rgba(30, 63, 105, .07);
}

#dashboardView .dashboard-overview-header h2 {
  margin: 4px 0 3px;
  color: #10243e;
  font-family: "Manrope", sans-serif;
  font-size: clamp(21px, 2vw, 28px);
  letter-spacing: -.04em;
}

#dashboardView .dashboard-overview-header p {
  margin: 0;
  color: #65778f;
  font-size: 12px;
}

.dashboard-overview-status {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 230px;
  padding: 11px 14px;
  border: 1px solid #cdebdc;
  border-radius: 13px;
  background: rgba(240, 251, 246, .9);
}

.dashboard-overview-status strong,
.dashboard-overview-status small {
  display: block;
}

.dashboard-overview-status strong {
  color: #116b49;
  font-size: 11px;
}

.dashboard-overview-status small {
  margin-top: 2px;
  color: #557166;
  font-size: 9px;
}

.dashboard-live-dot {
  width: 10px;
  height: 10px;
  border: 2px solid #d8f5e7;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 4px rgba(34, 160, 107, .12);
}

#dashboardView > .metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

#dashboardView .metric-card {
  min-height: 142px;
  padding: 18px;
  border-color: var(--dashboard-panel-border);
  border-radius: 16px;
  background: linear-gradient(155deg, #ffffff 0%, #f9fbfe 100%);
  box-shadow: 0 9px 25px rgba(31, 55, 86, .055), inset 0 3px 0 var(--metric-color);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

#dashboardView .metric-card[role="button"] {
  cursor: pointer;
}

#dashboardView .metric-card[role="button"]:hover,
#dashboardView .metric-card[role="button"]:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--metric-color) 35%, #dfe7f1);
  box-shadow: 0 14px 30px rgba(31, 55, 86, .1), inset 0 3px 0 var(--metric-color);
  outline: none;
}

#dashboardView .metric-card .metric-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

#dashboardView .metric-card .metric-value {
  margin-top: 15px;
  color: #12253e;
  font-size: clamp(21px, 2vw, 28px);
}

#dashboardView .metric-card .metric-label {
  color: #667991;
  font-size: 11px;
  font-weight: 700;
}

#dashboardView .metric-card .metric-trend {
  font-size: 9px;
  font-weight: 800;
}

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

.billing-period-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border: 1px solid #dfe7f1;
  border-radius: 14px;
  background: #f7f9fc;
}

.billing-period-total span { display: grid; gap: 3px; }
.billing-period-total small { color: #718198; }
.billing-period-total b { color: #1c5fd4; font-size: 24px; }
.billing-period-list { display: grid; gap: 8px; }

.billing-period-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(120px, .7fr));
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #e1e7ef;
  border-radius: 12px;
  color: #1d2e45;
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.billing-period-row:hover { border-color: #8eb3f4; background: #f7faff; }
.billing-period-row span { display: grid; gap: 3px; min-width: 0; }
.billing-period-row strong { overflow: hidden; text-overflow: ellipsis; }
.billing-period-row small { color: #718198; font-size: 11px; }
.billing-period-row .billing-period-missing strong { color: #b45309; }

html[data-theme="dark"] .billing-period-total,
html[data-theme="dark"] .billing-period-row { border-color: #33465f; color: #e7eef8; background: #172338; }
html[data-theme="dark"] .billing-period-row:hover { border-color: #527ec7; background: #1b2c46; }
html[data-theme="dark"] .billing-period-total small,
html[data-theme="dark"] .billing-period-row small { color: #9eb0c7; }

@media (max-width: 720px) {
  .modal.billing-period-modal { width: calc(100vw - 18px); }
  .billing-period-row { grid-template-columns: 1fr 1fr; }
  .billing-period-row > span:first-child { grid-column: 1 / -1; }
  .billing-period-total { align-items: flex-start; }
  .billing-period-total b { font-size: 20px; }
}

#dashboardView .dashboard-vital-grid,
#dashboardView .dashboard-grid {
  gap: 14px;
}

#dashboardView .panel {
  overflow: hidden;
  padding: 0 18px 18px;
  border-color: var(--dashboard-panel-border);
  border-radius: 17px;
  box-shadow: 0 10px 28px rgba(31, 55, 86, .055);
}

#dashboardView .panel-header {
  min-height: 68px;
  margin: 0 -18px 16px;
  padding: 13px 18px;
  border-bottom: 1px solid #e8eef5;
  background: linear-gradient(180deg, #fbfdff, #f7f9fc);
}

#dashboardView .panel-header h3 {
  color: #172a43;
  font-size: 14px;
}

#dashboardView .panel-header .text-button {
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 9px;
  color: #2668c8;
  font-size: 9px;
  font-weight: 800;
}

#dashboardView .panel-header .text-button:hover {
  background: #eaf2ff;
}

#dashboardView .vital-highlight .finance-drilldown,
#dashboardView .customer-health-list > div,
#dashboardView .customer-vital-footer span {
  border: 1px solid transparent;
}

#dashboardView .vital-highlight small,
#dashboardView .customer-vital-footer small,
#dashboardView .customer-health-list small,
#dashboardView .dashboard-ticket-row small,
#dashboardView .dashboard-ticket-age,
#dashboardView .dashboard-payment-customer small,
#dashboardView .dashboard-payment-meta small {
  font-size: 9px;
  line-height: 1.35;
}

#dashboardView .customer-health-list > div {
  min-height: 39px;
  background: #f7f9fc;
}

#dashboardView .dashboard-ticket-row,
#dashboardView .dashboard-payment-row,
#dashboardView .order-row,
#dashboardView .technician-row,
#dashboardView .timeline-item {
  border-color: #e8edf3;
}

#dashboardView .dashboard-ticket-row strong,
#dashboardView .dashboard-payment-customer strong {
  color: #223650;
  font-size: 10px;
}

#dashboardView .dashboard-section-label {
  margin: 8px 2px 12px;
}

#dashboardView .dashboard-section-label span {
  color: #385575;
}

html[data-theme="dark"] body .app-shell #dashboardView {
  --dashboard-panel-border: #2b3f59;
  --dashboard-panel-soft: #142238;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-overview-header {
  color: #edf4fc;
  border-color: #304765;
  background:
    radial-gradient(circle at 92% 0, rgba(53, 200, 232, .14), transparent 35%),
    linear-gradient(135deg, #122138 0%, #0d192a 100%);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-overview-header :is(h2, p, .section-kicker) {
  color: #edf4fc !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-overview-header p {
  color: #aebed1 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-overview-status {
  border-color: #285643;
  background: rgba(20, 58, 44, .72);
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-overview-status strong {
  color: #8ee1ba !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-overview-status small {
  color: #b8d8c9 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .metric-card {
  color: #edf4fc;
  border-color: var(--dashboard-panel-border) !important;
  background: linear-gradient(155deg, #132238 0%, #0f1b2c 100%) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22), inset 0 3px 0 var(--metric-color);
}

html[data-theme="dark"] body .app-shell #dashboardView .metric-card .metric-icon {
  color: color-mix(in srgb, var(--metric-color) 72%, #ffffff) !important;
  background: color-mix(in srgb, var(--metric-color) 18%, #142238) !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .metric-card :is(.metric-value, .metric-label) {
  color: #edf4fc !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .metric-card .metric-label {
  color: #b1c0d2 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .metric-card .metric-trend {
  color: color-mix(in srgb, var(--metric-color) 68%, #ffffff) !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .panel {
  border-color: var(--dashboard-panel-border) !important;
  background: #0f1b2c !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .2);
}

html[data-theme="dark"] body .app-shell #dashboardView .panel-header {
  border-color: #293d58 !important;
  background: linear-gradient(180deg, #17273e, #142238) !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .panel-header :is(h3, .section-kicker) {
  color: #eaf2fc !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .panel-header .section-kicker {
  color: #8fa8c5 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .panel-header .text-button {
  color: #86baff !important;
  background: transparent;
}

html[data-theme="dark"] body .app-shell #dashboardView .panel-header .text-button:hover {
  background: #203653;
}

html[data-theme="dark"] body .app-shell #dashboardView .vital-highlight .finance-drilldown:first-child {
  color: #ffd38a !important;
  border-color: #5e4724;
  background: #342819 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .vital-highlight .finance-drilldown:last-child {
  color: #ffadb6 !important;
  border-color: #633541;
  background: #351e27 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .vital-highlight .finance-drilldown :is(small, strong, em) {
  color: inherit !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-progress {
  background: #263850;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-progress-head,
html[data-theme="dark"] body .app-shell #dashboardView .dashboard-progress-head strong {
  color: #b4c3d5 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .vital-alert-row.danger {
  color: #ffb5bd;
  background: #351e27;
}

html[data-theme="dark"] body .app-shell #dashboardView .vital-alert-row.ok {
  color: #8ee1ba;
  background: #153426;
}

html[data-theme="dark"] body .app-shell #dashboardView .vital-alert-row :is(strong, small) {
  color: inherit !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .vital-alert-icon {
  background: rgba(255, 255, 255, .08);
}

html[data-theme="dark"] body .app-shell #dashboardView .customer-health-list > div,
html[data-theme="dark"] body .app-shell #dashboardView .customer-vital-footer span {
  color: #e4edf8;
  border-color: #2b405c;
  background: #142238;
}

html[data-theme="dark"] body .app-shell #dashboardView .customer-health-list :is(strong, small),
html[data-theme="dark"] body .app-shell #dashboardView .customer-vital-footer :is(strong, small) {
  color: #dce8f6 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .customer-vital-footer strong {
  color: #86baff !important;
}

html[data-theme="dark"] body .app-shell #dashboardView :is(
  .dashboard-ticket-row, .dashboard-payment-row, .order-row,
  .technician-row, .timeline-item, .session-row
) {
  color: #dce7f5;
  border-color: #293c55;
}

html[data-theme="dark"] body .app-shell #dashboardView :is(
  .dashboard-ticket-row strong, .dashboard-ticket-row small,
  .dashboard-ticket-age, .dashboard-payment-customer strong,
  .dashboard-payment-customer small, .dashboard-payment-meta small,
  .row-primary, .row-secondary
) {
  color: #dce7f5 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-payment-meta strong {
  color: #7edcb1 !important;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-payment-icon {
  color: #7edcb1;
  background: #173a2b;
}

html[data-theme="dark"] body .app-shell #dashboardView .dashboard-section-label :is(span, p) {
  color: #9fb1c7 !important;
}

@media (max-width: 1280px) {
  #dashboardView > .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  #dashboardView > .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #dashboardView .dashboard-overview-header {
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  #dashboardView .dashboard-overview-header {
    display: grid;
    min-height: 0;
    padding: 18px;
  }

  #dashboardView .dashboard-overview-status {
    width: 100%;
    min-width: 0;
  }

  #dashboardView > .metric-grid {
    grid-template-columns: 1fr;
  }

  #dashboardView .metric-card {
    min-height: 126px;
  }

  #dashboardView .panel-header {
    align-items: flex-start;
  }
}

.geolocation-status {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  line-height: 1.45;
}

.geolocation-status.is-working {
  color: #245b9f;
  border-color: #cfe0f8;
  background: #edf5ff;
}

.geolocation-status.is-success {
  color: #176943;
  border-color: #bfe8d3;
  background: #ecfbf4;
}

.geolocation-status.is-error {
  color: #a32d3d;
  border-color: #f3c3ca;
  background: #fff0f2;
}

html[data-theme="dark"] body .geolocation-status.is-working {
  color: #9bc8ff !important;
  border-color: #31557f;
  background: #172f4d;
}

html[data-theme="dark"] body .geolocation-status.is-success {
  color: #93e2bb !important;
  border-color: #2a6047;
  background: #173728;
}

html[data-theme="dark"] body .geolocation-status.is-error {
  color: #ffb2bd !important;
  border-color: #713846;
  background: #3a2029;
}

/* Acceso y permisos 2026: espacio real para administrar usuarios. */
.modal.user-access-modal {
  width: min(1080px, calc(100vw - 40px));
  max-width: 1080px;
}

.modal.user-access-modal .modal-body { padding: 24px 28px; }
.modal.user-access-modal .user-permissions-shell { border-radius: 16px; }
.modal.user-access-modal .user-module-permissions { max-height: 520px; }
.modal.user-access-modal .user-permission-group > header {
  min-height: 56px;
  padding: 10px 14px;
}
.modal.user-access-modal .user-permission-group-title { font-size: 14px; }
.modal.user-access-modal .user-permission-group-title small { font-size: 11px; }
.modal.user-access-modal .user-permission-group-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}
.modal.user-access-modal .policy-check {
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 11px;
}
.modal.user-access-modal .policy-check strong { font-size: 13px; line-height: 1.35; }
.modal.user-access-modal .policy-check small { font-size: 11px; line-height: 1.4; }
.modal.user-access-modal .user-action-permissions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
}

@media (max-width: 760px) {
  .modal.user-access-modal {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }
  .modal.user-access-modal .modal-body { padding: 16px 13px; }
  .modal.user-access-modal .user-permission-group-options,
  .modal.user-access-modal .user-action-permissions { grid-template-columns: 1fr; }
  .modal.user-access-modal .user-module-permissions { max-height: 55dvh; }
}

/* Identidad del ISP: contraste consistente en modo claro y oscuro. */
#controlPanelView .isp-profile-card .isp-logo-uses > span {
  min-height: 126px;
  padding: 16px;
  border: 1px solid #d8e3ef;
  background: #ffffff !important;
  box-shadow: 0 8px 22px rgba(20, 48, 80, .08);
}
#controlPanelView .isp-profile-card .isp-logo-uses small,
#controlPanelView .isp-profile-card .isp-logo-uses strong {
  color: #18334f !important;
  opacity: 1;
}
.modal.isp-brand-modal {
  width: min(820px, calc(100vw - 32px));
  max-width: 820px;
}
.modal.isp-brand-modal .field-group,
.modal.isp-brand-modal .logo-upload-field {
  padding: 13px;
  border: 1px solid #d9e4ef;
  border-radius: 12px;
  color: #19334e;
  background: #f8fbff;
}
.modal.isp-brand-modal label,
.modal.isp-brand-modal strong,
.modal.isp-brand-modal small { color: #19334e !important; opacity: 1; }
html[data-theme="dark"] body #controlPanelView .isp-profile-card .isp-logo-uses > span,
html[data-theme="dark"] body .modal.isp-brand-modal .field-group,
html[data-theme="dark"] body .modal.isp-brand-modal .logo-upload-field {
  border-color: #334a64;
  background: #17283b !important;
}
html[data-theme="dark"] body #controlPanelView .isp-profile-card .isp-logo-uses small,
html[data-theme="dark"] body #controlPanelView .isp-profile-card .isp-logo-uses strong,
html[data-theme="dark"] body .modal.isp-brand-modal label,
html[data-theme="dark"] body .modal.isp-brand-modal strong,
html[data-theme="dark"] body .modal.isp-brand-modal small { color: #e5eef8 !important; }

/* Login empresarial limpio y adaptable. */
.auth-screen {
  grid-template-columns: minmax(560px, 1.15fr) minmax(430px, .85fr);
  background: #eef3f8;
}
.auth-visual {
  isolation: isolate;
  background:
    radial-gradient(circle at 78% 20%, rgba(58, 203, 226, .2), transparent 26%),
    radial-gradient(circle at 12% 88%, rgba(40, 105, 230, .25), transparent 34%),
    linear-gradient(145deg, #061426 0%, #0b2644 56%, #123c62 100%);
}
.auth-visual-content { position: relative; z-index: 1; max-width: 720px; }
.auth-visual-content > p { max-width: 650px; color: #c8d7e8; font-size: 16px; }
.auth-feature-grid {
  display: grid;
  margin-top: 32px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.auth-feature-grid > span {
  display: grid;
  min-height: 0;
  padding: 14px 4px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, .2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.auth-feature-grid i { margin-bottom: 9px; color: #65d9ed; }
.auth-feature-grid strong { color: #fff; font-size: 13px; }
.auth-feature-grid small { color: #9fb3ca; font-size: 11px; }
.auth-form-side { padding: clamp(28px, 5vw, 72px); }
.auth-screen .login-card {
  width: min(470px, 100%);
  padding: 40px;
  border: 1px solid #d9e3ee;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(18, 45, 79, .14);
  backdrop-filter: none;
}
.auth-screen .login-heading { margin-bottom: 26px; }
.auth-screen .login-heading h2 { color: #10243d; font-size: 34px; }
.auth-screen .login-heading p { color: #64758a; }
.auth-screen .login-field > span:first-child { color: #263d57; font-size: 13px; font-weight: 750; }
.auth-screen .login-input-wrap { min-height: 56px; background: #f6f9fc; }
.auth-screen .login-submit { min-height: 56px; font-size: 14px; }

@media (max-width: 860px) {
  .auth-screen { display: block; min-height: 100dvh; overflow-y: auto; }
  .auth-screen .auth-visual { display: none; }
  .auth-screen .auth-form-side {
    display: grid;
    min-height: 100dvh;
    padding: 24px 16px;
    place-items: center;
    background:
      radial-gradient(circle at 100% 0, rgba(44, 125, 232, .13), transparent 34%),
      linear-gradient(155deg, #f8fbff, #e8eff7);
  }
  .auth-screen .login-card { padding: 28px 22px; border-radius: 19px; }
  .auth-screen .login-heading h2 { font-size: 29px; }
}

/* Centro financiero profesional y adaptable. */
html[data-theme="dark"] body #financesView .finance-kpi-card,
html[data-theme="dark"] body #financesView .finance-ledger-panel,
html[data-theme="dark"] body #financesView .finance-comparison-card {
  color: #e8f0fa;
  border-color: #2e455e;
  background: linear-gradient(145deg, #17283a, #132235);
  box-shadow: none;
}

html[data-theme="dark"] body #financesView .finance-kpi-card strong,
html[data-theme="dark"] body #financesView .finance-ledger-heading h3,
html[data-theme="dark"] body #financesView .finance-comparison-card strong {
  color: #f2f7fc;
}

html[data-theme="dark"] body #financesView .finance-kpi-icon {
  background: color-mix(in srgb, var(--finance-tone) 20%, #162639);
}

html[data-theme="dark"] body #financesView .finance-period-presets button {
  color: #bdcce0;
  border-color: #344b64;
  background: #192b3f;
}

html[data-theme="dark"] body #financesView .finance-period-presets button:hover,
html[data-theme="dark"] body #financesView .finance-period-presets button.active {
  color: #9cc9ff;
  border-color: #426b9b;
  background: #17385e;
}

@media (max-width: 1180px) {
  .finance-command-header {
    grid-template-columns: minmax(280px, 1fr) minmax(220px, .7fr);
  }

  .finance-command-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .finance-command-header {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 19px;
    border-radius: 17px;
  }

  .finance-command-copy > p {
    font-size: 10px;
  }

  .finance-command-actions {
    grid-column: auto;
    grid-template-columns: 1fr 1fr;
  }

  .finance-command-actions button:first-child {
    grid-column: 1 / -1;
  }

  #financesView .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .finance-kpi-card {
    grid-template-columns: 32px minmax(0, 1fr);
    min-height: 96px;
    padding: 11px;
  }

  .finance-kpi-icon {
    width: 32px;
    height: 32px;
  }

  .finance-kpi-card strong {
    font-size: 14px;
  }

  .finance-period-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 13px;
  }

  .finance-period-copy,
  .finance-period-filter .form-field:last-child {
    grid-column: 1 / -1;
  }

  .finance-period-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .finance-ledger-panel {
    padding: 13px;
  }

  .finance-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  #financesView .finance-ledger-row.header {
    display: none;
  }

  #financesView .finance-ledger-row:not(.header) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    margin: 9px 0;
    padding: 13px;
    border: 1px solid #dde6ef;
    border-radius: 12px;
    background: #fff;
  }

  #financesView .finance-ledger-row:not(.header) > span {
    min-width: 0;
  }

  #financesView .finance-ledger-row:not(.header) > span::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  #financesView .finance-ledger-row:not(.header) > span:nth-child(1)::before { content: "Fecha"; }
  #financesView .finance-ledger-row:not(.header) > span:nth-child(2)::before { content: "Movimiento"; }
  #financesView .finance-ledger-row:not(.header) > span:nth-child(3)::before { content: "Cliente / proveedor"; }
  #financesView .finance-ledger-row:not(.header) > span:nth-child(4)::before { content: "Método"; }
  #financesView .finance-ledger-row:not(.header) > span:nth-child(5)::before { content: "Categoría"; }
  #financesView .finance-ledger-row:not(.header) > span:nth-child(6)::before { content: "Monto"; }

  html[data-theme="dark"] body #financesView .finance-ledger-row:not(.header) {
    border-color: #30475f;
    background: #152639;
  }
}

@media (max-width: 420px) {
  #financesView .finance-summary,
  .finance-command-actions,
  .finance-period-filter,
  .finance-period-presets,
  #financesView .finance-ledger-row:not(.header) {
    grid-template-columns: 1fr;
  }

  .finance-command-actions button:first-child,
  .finance-period-copy,
  .finance-period-filter .form-field:last-child {
    grid-column: auto;
  }
}
