:root {
  --navy: #2c3e50;
  --blue: #0064c8;
  --blue-dark: #0349bb;
  --green: #1fb325;
  --green-dark: #449842;
  --red: #d9534f;
  --darkgray: #4c4b4b;
  --orange: #f7a127;
  --gray-bg: #f4f5f7;
  --border: #e3e6ea;
  --text: #2c3e50;
  --muted: #64748b;
  /* GUI audit tokens: measured on the real product (tools/gui-audit) */
  --so-link: #217dbb;
  --so-font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --so-fs: 15px;
  --so-btn-radius: 4px;
  --so-stripe: #f9f9f9;
  --so-input-border: #dce4ec;
}

* { box-sizing: border-box; }

body {
  margin: 0 0 25px;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.4286;
  background: #fafbfd;
  color: var(--text);
}

/* Page title heading used at the top of nearly every page (e.g. "Zones", "OLTs").
   Previously unstyled, falling back to the raw browser UA default (22.5px/margin
   18.675px top+bottom) instead of the real site's explicit look. */
h1, h2 {
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin: 0 0 8px;
}

/* ---- Login page ----
   Real site (bootstrap .row > .col-md-4.col-md-offset-4 > .login-panel) sits
   near the top third of the viewport (~14% from top at 900px viewport height),
   not vertically centered, and the card is ~500px wide (col-md-4 of a fluid
   container), not 450px. */
.login-page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding-top: calc(14vh + 2px);
  background-image: url('../img/login_bg_real.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-card {
  width: 460px;
  height: fit-content;
  background: #fff;
  border: 1px solid #ecf0f1;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
  overflow: hidden;
}

.login-card .brand {
  padding: 10px 15px;
  font-size: 19px;
  line-height: 21px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #2c3e50;
  background: #ecf0f1;
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}
.login-card .brand span { color: var(--blue); }

.login-card form { padding: 15px; }

.login-card input[type="email"],
.login-card input[type="password"],
.login-card input[type="text"] {
  width: 100%;
  padding: 10px 15px;
  margin-bottom: 15px;
  border: 2px solid #dce4ec;
  border-radius: 4px;
  background: #fff;
  font-size: 15px;
  line-height: 21px;
}

.login-card label.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 11px;
}

.login-card button.login-btn {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: 2px solid var(--blue);
  padding: 5px 15px;
  border-radius: 6px;
  font-size: 19px;
  line-height: 25px;
  box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
  cursor: pointer;
}
.login-card button.login-btn:hover { background: var(--blue-dark); }

.login-card .forgot {
  display: block;
  text-align: left;
  margin-top: 23px;
  color: #217dbb;
  text-decoration: none;
  font-size: 15px;
}

.login-error {
  color: var(--red);
  font-size: 13px;
  margin: -6px 0 12px;
  min-height: 16px;
}
.login-error:empty { display: none; }

/* ---- App shell ---- */
.topbar {
  background-image: url('../img/smartolt_bg_real.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 20px 0 68px;
  height: 60px;
}
.topbar .logo { font-weight: 400; letter-spacing: normal; font-size: 19px; margin-right: 14px; }
.topbar nav { display: flex; gap: 1px; flex: none; align-items: center; }
.topbar nav a { color: #fff; text-decoration: none; font-size: 15px; padding: 19.5px 12px; display: inline-flex; align-items: center; gap: 4px; }
.topbar nav a:hover { color: #217dbb; }
.topbar nav a .caret { margin-left: 2px; }

.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: pointer; }
.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  padding: 6px 0;
  z-index: 200;
  list-style: none;
  margin: 0;
}
.nav-dropdown.open .dropdown-menu { display: block; }
.nav-dropdown .dropdown-menu li.divider { height: 1px; background: var(--border); margin: 6px 0; padding: 0; }
.nav-dropdown .dropdown-menu a {
  color: var(--text);
  font-size: 13px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.nav-dropdown .dropdown-menu a:hover { background: var(--gray-bg); color: var(--blue); }
.nav-dropdown .dropdown-menu i { width: 14px; text-align: center; color: var(--muted); }
.topbar .icons { display: flex; align-items: center; color: #fff; font-size: 15px; gap: 0; flex: 1 1 auto; min-width: 0; }
.topbar .icons a { color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 19.5px 12.7px; }
.topbar .icons .olt-pick { order: 99; margin-left: auto; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(255,255,255,.4); background: rgba(0,0,0,.4); color: #fff; max-width: 170px; font-size: 13px; }
.topbar .icons .olt-pick option { color: #2c3e50; background: #fff; }
.topbar .icons a i { font-size: 20px; }
.topbar .icons a:hover { color: #217dbb; }
.topbar .icons .user-email { font-size: 13px; color: #d7deea; }

.banner {
  background: var(--blue);
  color: #fff;
  padding: 15px 35px 15px 15px;
  font-size: 15px;
  margin: 18px 24px 0;
  border-radius: 4px;
}

.content { padding: 18px 24px 40px; max-width: 1400px; }

.btn-back {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  margin: 18px 0;
}
.btn-back:hover { background: var(--blue-dark); }

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #ecf0f1;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.tabs a {
  padding: 10px 15px;
  margin-right: 2px;
  margin-bottom: -1px;
  text-decoration: none;
  color: var(--blue);
  font-size: 15px;
  border: 1px solid transparent;
  border-radius: 4px 4px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs a:hover { border-color: #ecf0f1 #ecf0f1 #ecf0f1; }
.tabs a.active {
  color: var(--navy);
  font-weight: 600;
  background: #fff;
  border-color: #ddd #ddd #fff;
}

.action-row { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.btn {
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 5px 15px;
  font-size: 15px;
  cursor: pointer;
  color: #fff;
}
.btn-blue { background: var(--blue); border-color: var(--blue); }
.btn-blue:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-green { background: var(--green); border-color: var(--green); }
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-red { background: #d9534f; border-color: #d9534f; }
.btn-red:hover { background: #c9302c; border-color: #c9302c; }
.btn-sm { padding: 3px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.live-banner { padding: 10px 14px; border-radius: 6px; margin: 10px 0; font-size: 14px; }
.live-banner.live-ok { background: #eaf7ea; color: #1e7a33; border: 1px solid #9fd9a8; }
.live-banner.live-error { background: #fdecea; color: #b42318; border: 1px solid #f5a9a0; }
.live-fetch-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }

.panel {
  background: #fff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 2px 0 rgba(15,23,42,.04), 0 5px 14px 0 rgba(15,23,42,.07);
  overflow: hidden;
  display: flex;
}

.details-table { flex: 1; border-collapse: collapse; width: 100%; }
.details-table tr { border-bottom: 1px solid var(--border); }
.details-table tr:nth-child(odd) td { background: #f9f9f9; }
.details-table td { padding: 8px; font-size: 15px; line-height: 1.4286; vertical-align: top; }
.details-table td.label { width: 260px; font-weight: 700; font-size: 15px; color: var(--text); padding-left: 15px; }
.details-table td.value { color: var(--text); padding-right: 15px; }
.muted { color: var(--muted); font-size: 12px; }
.masked { letter-spacing: 2px; color: var(--muted); }
.tag-ok { color: var(--green); font-weight: 600; }

.sidecard {
  width: 280px;
  border-left: 1px solid var(--border);
  padding: 18px;
}
.sidecard .olt-img {
  width: 100%;
  height: 120px;
  background: #f4f5f7;
  border: 1px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
}
.sidecard .olt-img img { width: 90%; height: auto; }
.sidecard .stat { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.sidecard .stat:first-of-type { border-top: none; }

table.uplink-table { width: 100%; border-collapse: collapse; background: #fff; }
table.uplink-table th {
  text-align: left;
  font-size: 15px;
  font-weight: 700;
  padding: 8px 12px;
  background: transparent;
  border-bottom: none;
}
table.uplink-table td {
  padding: 8px 12px;
  font-size: 15px;
  line-height: 1.4286;
  border-bottom: none;
  vertical-align: top;
}
table.uplink-table tbody tr:nth-child(odd) td { background: #f9f9f9; }

/* Clickable sortable column headers (e.g. Zones) */
table.uplink-table th.sortable { cursor: pointer; user-select: none; }
table.uplink-table th.sortable .sort-indicator { margin-left: 6px; font-size: 12px; color: var(--muted); }
table.uplink-table th.sortable:hover .sort-indicator { color: var(--text); }
.status-up { color: var(--green); font-weight: 600; }
.status-down { color: var(--red); font-weight: 600; }
.link-action { display: block; color: var(--blue); text-decoration: none; font-size: 13px; margin-bottom: 6px; }
.link-action.icon-only {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--red);
  color: #fff;
  margin: 4px 0 0;
}
.link-action.icon-only:hover { background: #c9302c; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Edit OLT settings form ---- */
.edit-form { margin-top: 10px; }
.edit-form .field-row {
  display: flex;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.edit-form label:first-child {
  width: 220px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 15px;
  padding-top: 11px;
  text-align: right;
}
.edit-form input[type="text"],
.edit-form input[type="password"],
.edit-form input[type="number"],
.edit-form textarea,
.edit-form select {
  width: 100%;
  max-width: 480px;
  padding: 10px 15px;
  border: 2px solid #dce4ec;
  border-radius: 4px;
  font-size: 15px;
  background: #fff;
}
.edit-form .static-value { padding-top: 10px; font-size: 15px; }
.edit-form .inline-check { display: flex; align-items: center; gap: 8px; padding-top: 10px; font-size: 15px; }
.edit-form .radio-group { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.edit-form .radio-group label { display: flex; align-items: center; gap: 8px; font-weight: 400; width: auto; text-align: left; padding-top: 0; }
.edit-form .muted { max-width: 480px; margin-top: 8px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 26, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal-box {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  width: 640px;
  max-width: 92vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 3px 9px rgba(0,0,0,0.5);
}
.modal-box .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-box .modal-header h2 { margin: 0; font-size: 19px; font-weight: 400; }
.modal-box .modal-close { cursor: pointer; font-size: 22px; background: none; border: none; color: var(--muted); }
.modal-box .modal-body { padding: 20px; }
.modal-box .modal-footer {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.snmp-status-box {
  background: #eaf6ec;
  border: 1px solid #cdeacf;
  border-radius: 4px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 14px 0;
}
.history-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.history-table th { text-align: left; padding: 10px 14px; border-bottom: 2px solid var(--border); }
.history-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }

/* ---- Report filter bar (Reports / Tasks pages) ---- */
.filter-bar {
  background: #f7f9fc;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}
.filter-bar .field { display: flex; flex-direction: column; gap: 6px; }
.filter-bar .field label { font-size: 15px; font-weight: 700; color: var(--text); }
.filter-bar .field input,
.filter-bar .field select {
  padding: 10px 15px;
  border: 2px solid #dce4ec;
  border-radius: 4px;
  font-size: 15px;
  background: #fff;
  min-width: 160px;
}
.filter-bar .field-actions { margin-left: auto; display: flex; gap: 10px; align-self: flex-end; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); font-size: 15px; background: #fff; border: 1px solid var(--border); border-radius: 4px; }
.empty-state i { font-size: 32px; display: block; margin-bottom: 12px; color: #c7cdd4; }

/* ---- Toggle switch ---- */
.toggle-switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background-color: #ccc; border-radius: 24px; transition: 0.2s;
}
.toggle-slider::before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background-color: white; border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background-color: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ---- ONU view page: borderless key/value layout, status pill, signal gauges ---- */
.onu-view-panel {
  display: flex;
  gap: 28px;
  background: #fff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 2px 0 rgba(15,23,42,.04), 0 5px 14px 0 rgba(15,23,42,.07);
  padding: 22px 24px;
  flex-wrap: wrap;
}
.kv-plain { flex: 1; min-width: 320px; border-collapse: collapse; width: 100%; }
.kv-plain tr { border: none; }
.kv-plain tr td { background: transparent; border: none; padding: 6px 8px; font-size: 14px; line-height: 1.5; vertical-align: top; }
.kv-plain td.label { font-weight: 700; text-align: right; width: 180px; padding-right: 14px; color: var(--text); white-space: nowrap; }
.kv-plain td.value { color: var(--text); }
.kv-plain td.value a { color: var(--blue); text-decoration: none; }
.kv-plain td.value a:hover { text-decoration: underline; }

.onu-sidecard { width: 380px; flex-shrink: 0; }
.onu-photo { text-align: center; margin-bottom: 16px; }
.onu-photo img { max-width: 220px; width: 100%; height: auto; }

.onu-status-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.onu-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 3px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.onu-status-pill.is-online { background: var(--green); }
.onu-status-pill.is-offline { background: var(--darkgray); }
.onu-status-pill.is-los { background: var(--red); }
.onu-status-pill.is-powerfail { background: var(--blue); }
.onu-status-uptime { font-size: 13px; color: var(--muted); }
.onu-status-dist { margin-left: auto; font-size: 13px; color: var(--muted); }

.onu-gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.onu-gauge { border: 1px solid var(--border); border-radius: 4px; padding: 8px 10px 10px; background: #fff; }
.onu-gauge .gauge-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.onu-gauge .gauge-val { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.onu-gauge .gauge-val small { font-size: 11px; font-weight: 400; color: var(--muted); }
.onu-gauge .gauge-bar { position: relative; height: 5px; border-radius: 3px; background: #e5e7eb; overflow: hidden; }
.onu-gauge .gauge-bar-fill { position: absolute; top: 0; left: 0; bottom: 0; border-radius: 3px; }

/* ---- OLT details: masked credential reveal toggle ---- */
.cred-reveal-btn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 6px; font-size: 14px; vertical-align: middle; }
.cred-reveal-btn:hover { color: var(--blue); }

/* ---- Global toast ---- */
.global-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2d333a;
  color: #fff;
  padding: 12px 22px;
  border-radius: 6px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.global-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Small summary stat strip (used on listing pages like Splitters) ---- */
.mini-stats { display: flex; gap: 16px; margin: 18px 0; }
.mini-stat {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px 18px;
}
.mini-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  color: #fff;
}
.mini-stat-icon.navy { background: var(--navy); }
.mini-stat-icon.blue { background: var(--blue); }
.mini-stat-icon.green { background: var(--green); }
.mini-stat-icon.orange { background: var(--orange); }
.mini-stat-icon.red { background: #c0392b; }
.mini-stat-icon.ring {
  background: #fff;
  border: 3px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}
.mini-stat-label { font-size: 14px; color: var(--muted); margin-bottom: 2px; }
.mini-stat-num { font-size: 23px; font-weight: 700; line-height: 1.1; }

/* ---- Sub-nav tab strip (used across Map-group pages: saved area maps, cabinets, etc) ---- */
.subnav-tabs {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  padding-bottom: 10px;
}
.subnav-tabs a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.subnav-tabs a i { font-size: 13px; }
.subnav-tabs a.active, .subnav-tabs a:hover { color: var(--blue); }

/* ---- Secondary (gray) action button, matches real site's Export/Import buttons ---- */
.btn-gray {
  background: #e4e7ea;
  color: #5a6472;
  border: 1px solid #d3d8dc;
}
.btn-gray:hover { background: #d8dce0; }

/* Navbar: never let the menu run into the icons on narrower windows. */
.topbar nav { min-width: 0; }
.topbar .icons { flex-shrink: 1; }
.topbar .logo { flex-shrink: 0; }
@media (max-width: 1400px) {
  .topbar { gap: 12px; padding: 0 12px; }
  .topbar nav a { font-size: 14px; padding: 19.5px 8px; }
  .topbar .icons a { padding: 19.5px 8px; }
}
@media (max-width: 1150px) {
  .topbar { gap: 8px; padding: 0 8px; }
  .topbar .logo { font-size: 16px; margin-right: 4px; }
  .topbar nav { gap: 0; }
  .topbar nav a { font-size: 13px; padding: 19.5px 5px; gap: 2px; }
  .topbar .icons a { padding: 19.5px 6px; }
  .topbar .icons a i { font-size: 17px; }
}
@media (max-width: 900px) {
  .topbar { height: auto; flex-wrap: wrap; padding-bottom: 4px; }
  .topbar nav { order: 3; width: 100%; flex: 1 0 100%; flex-wrap: wrap; }
  .topbar nav a { padding: 8px 8px; }
}

/* Phones: wide report/list tables scroll sideways inside themselves instead of widening the whole page. */
@media (max-width: 700px) {
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  code, .masked, .static-value, .acs-val { word-break: break-all; overflow-wrap: anywhere; }
  .content, .panel { max-width: 100%; box-sizing: border-box; }
  select, input[type="text"], input[type="date"], input[type="search"] { max-width: 100%; }
}
@media (max-width: 700px) {
  .mini-stats { flex-wrap: wrap; }
  .mini-stat { flex: 1 1 140px; min-width: 0; }
  .onu-count { white-space: normal; }
  .diag-dates { flex-wrap: wrap; }
  input { min-width: 0; }
}
@media (max-width: 700px) {
  #cuPager { display: flex; flex-wrap: wrap; gap: 4px; }
  .link-action, #whUrl { max-width: 100%; word-break: break-all; }
  /* (the old overflow-x:hidden safety net was removed: wide content now scrolls inside its own wrapper, see css/mobile.css + nav.js) */
}
.topbar .icons a[title="Log out"] i { font-size: 16px; }
.topbar .icons a[title="Log out"] { padding-left: 11px; }

/* footer line (injected by nav.js on pages without their own) */
.so-footer { text-align: center; margin: 60px 0 0; padding: 0 0 26px; font-size: 14px; color: #2c3e50; clear: both; }
.so-footer a { color: var(--so-link); font-size: 15px; text-decoration: none; }
.so-footer .so-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2eb82e; margin: 0 6px 1px 3px; }

/* top bar: nav items, Diag badge and the OLT picker must not overlap or wrap (portal extras: Customers + picker) */
.topbar .icons a[title="Log out"] { white-space: nowrap; flex: none; }
.topbar nav a { white-space: nowrap; }
@media (min-width: 761px) and (max-width: 1320px) {
  .topbar { padding-left: 10px; padding-right: 8px; }
  .topbar .logo { margin-right: 8px; font-size: 18px; }
  .topbar nav { gap: 0; flex: 0 1 auto; }
  .topbar nav a { font-size: 14px; padding: 19.5px 7px; gap: 3px; }
  .topbar .icons { flex: 1 1 0; min-width: 0; justify-content: flex-end; }
  .topbar .icons a { padding: 19.5px 8px; flex: none; }
  .topbar .icons .olt-pick { order: 0; flex: 0 1 112px; min-width: 70px; max-width: 112px; margin: 0 6px 0 0; font-size: 12px; padding: 3px 4px; text-overflow: ellipsis; }
}
@media (min-width: 761px) and (max-width: 1180px) {
  .topbar nav a { font-size: 13px; padding: 19.5px 5px; }
  .topbar .icons a { padding: 19.5px 6px; }
  .topbar .icons .olt-pick { flex-basis: 96px; max-width: 96px; }
}
@media (min-width: 761px) and (max-width: 1020px) {
  .topbar nav a { font-size: 12.5px; padding: 19.5px 4px; }
  .topbar .icons a[title="Log out"] span, .topbar .icons .user-email { display: none; }
}

/* ---- GUI audit: global tokens applied to form controls / buttons / brand (real product: Inter 15px everywhere) ---- */
button, input, select, textarea { font-family: var(--so-font); font-size: var(--so-fs); }
button { border-radius: var(--so-btn-radius); }
.topbar .logo { display: inline-flex; align-items: center; height: 60px; line-height: 19px; }
.topbar nav a { line-height: 19px; }

/* ===== GUI audit round 2: unified look measured on the real product (tools/gui-audit, docs/gui-audit.md) =====
   Tokens (all measured computed styles of the real product). Page css may still tune layout, but colours/borders/radii of the shared
   control families below come from here. */
:root {
  --so-text: #2c3e50;
  --so-muted: #64748b;
  --so-muted-icon: #7b8794;
  --so-icon-x: #5d6d7e;
  --so-btn-green: #1fb325;
  --so-btn-blue: #0064c8;
  --so-btn-grey: #95a5a6;
  --so-btn-red: #e74c3c;
  --so-btn-orange: #f39c12;
  --so-btn-shadow: 0 2px 5px 0 rgba(0,0,0,.26);
  --so-th-bg: #f7f9fc;
  --so-td-border: #f0f3f7;
  --so-focus: 0 0 0 3px rgba(0,100,200,.18);
}
body { background: #fff; color: var(--so-text); }
a { color: var(--so-link); }
input, select, textarea { color: var(--so-text); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--so-btn-blue); box-shadow: var(--so-focus); }
button:focus-visible, a:focus-visible { outline: 2px solid rgba(0,100,200,.45); outline-offset: 1px; }
/* top-bar brand: 19.5px 15px padding like the real navbar-brand */
.topbar { padding-left: 53px; }
.topbar .logo { padding: 19.5px 15px; height: 60px; box-sizing: border-box; margin-right: -1px; text-decoration: none; color: #fff; }
/* footer links: 15px, 0 10px padding, 19px line */
.so-footer a, .so-footer a.so-version { padding: 0 10px; line-height: 19px; font-size: 15px; }
/* Buttons: real .btn = 2px border in the fill colour, 5px 15px, 15px/21.43px, radius 4px, soft shadow.
   Specificity is raised with [class][class] so page-specific button classes cannot drift away from it. */
:is(button, a)[class][class]:not(.login-btn):is([class*="btn"], .olt-top, .lf-save, .sbtn, .cc-green):not(:is(.btn-link, .icon-btn, .cred-reveal-btn, .cl-btn, .cl-letter, .gs-pbtn, .date-mode-btn, .olt-act, [class*="close"], [class*="x-btn"])) {
  border: 2px solid var(--so-btn-fill, var(--so-btn-green)); background-color: var(--so-btn-fill, var(--so-btn-green)); color: #fff;
  border-radius: 4px; padding: 5px 15px; font-size: 15px; line-height: 21.4286px; font-weight: 400; box-shadow: var(--so-btn-shadow);
  height: auto; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box;
}
:is(button, a)[class][class]:not(.login-btn):is([class*="green"], [class*="primary"]):is([class*="btn"], .olt-top, .lf-save, .sbtn, .cc-green):not(.btn-link) { --so-btn-fill: var(--so-btn-green); }
:is(button, a)[class][class]:not(.login-btn):is([class*="blue"], [class*="success"], .olt-view-btn, .cfg-view-btn, .btn-back):is([class*="btn"], .olt-top, .sbtn):not(.btn-link) { --so-btn-fill: var(--so-btn-blue); }
:is(button, a)[class][class]:not(.login-btn):is([class*="grey"], [class*="gray"], [class*="slate"], [class*="default"]):is([class*="btn"], .olt-top, .sbtn):not(.btn-link) { --so-btn-fill: var(--so-btn-grey); }
:is(button, a)[class][class]:not(.login-btn):is([class*="red"], [class*="salmon"], [class*="stop"], [class*="danger"]):is([class*="btn"], .olt-top, .sbtn):not(.btn-link) { --so-btn-fill: var(--so-btn-red); }
:is(button, a)[class][class]:not(.login-btn):is([class*="orange"], [class*="warning"]):is([class*="btn"], .sbtn):not(.btn-link) { --so-btn-fill: var(--so-btn-orange); }
:is(button, a)[class][class]:not(.login-btn):is([class*="btn"], .olt-top, .sbtn):not(.btn-link):hover:not(:disabled) { filter: brightness(.93); }
:is(button, a)[class][class]:not(.login-btn):is([class*="btn"], .olt-top, .sbtn):disabled { opacity: .6; }
:is(button, a)[class][class]:not(.login-btn):is([class*="btn"]):is([class*="-sm"], [class*="small"], .sm):not(.btn-link) { padding: 5px 10px; }
/* tables: th fill, 8px cells, hairline row borders, #f9f9f9 stripe */
table th { color: var(--so-text); font-weight: 700; }
/* labels and form controls */
label { color: var(--so-text); }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="url"], input[type="tel"], select, textarea { border-color: #dce4ec; }
/* muted/help text */
.muted, small, .help-block { color: var(--so-muted); }

/* top bar texture: the real navbar paints the 1920x340 photo at natural size from the top-left corner (matched by brute-force search, mse 171 vs 392 for cover) */
.topbar { background-size: auto; background-position: 0 0; background-repeat: repeat-x; }
:is(button, a)[class][class]:not(.login-btn):is([class*="btn"], .olt-top, .lf-save, .sbtn, .cc-green):not(.btn-link) { white-space: nowrap; }
/* real .form-control: 45px tall = 10px 15px padding + 2px border + 21.43px line (listing / filter / form pages) */
body:is(.pg-map, .pg-lf, .pg-zones, .pg-onutypes, .pg-presets, .rp-ref, .pg-gsettings, .pg-sysconfig, .gd)[class] :is(input:is([type="text"], [type="search"], [type="email"], [type="password"], [type="number"], [type="date"], [type="url"], [type="tel"], :not([type])), select):not(.olt-pick):not([class*="sm"]):not([class*="mini"]) {
  box-sizing: border-box; height: 45px; padding-top: 10px; padding-bottom: 10px; padding-right: 15px; font-size: 15px; border: 2px solid #dce4ec; border-radius: 4px; color: var(--so-text);
}
