:root {
  --navy: #163028;
  --navy-deep: #10211a;
  --sidebar: #1a3328;
  --teal: #3f9d62;
  --teal-dark: #2f7a4b;
  --ink: #e7f2ea;
  --muted: #a9c4b4;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --ok: #3ecf8e;
  --warn: #e6b84d;
  --danger: #e85d5d;
  --sidebar-w: 260px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(165deg, var(--navy-deep), var(--navy) 55%, #1e4634);
}
a { color: var(--teal); }
.hub-banner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.1rem;
  background: #1a3328;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}
.hub-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
}
.hub-brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.hub-banner-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}
.hub-banner-email {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.hub-signout { padding: 0.4rem 0.8rem; white-space: nowrap; }
.layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 1.1rem 0.85rem;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
}
.brand {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 0 0.5rem;
}
.user-block {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0.35rem 1.25rem;
  padding: 0.65rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.avatar, .avatar-lg {
  border-radius: 50%;
  object-fit: cover;
  background: #1a3328;
  flex-shrink: 0;
}
.avatar { width: 42px; height: 42px; }
.avatar-lg { width: 88px; height: 88px; }
.avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--teal);
}
.user-meta { min-width: 0; }
.user-meta .name { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta .email { font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.nav button {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
}
.nav button:hover { background: rgba(63, 157, 98, 0.16); color: var(--ink); }
.nav button.active { background: rgba(63, 157, 98, 0.28); color: var(--teal); }
.sidebar-foot { padding: 0.5rem; }
.btn-logout {
  width: 100%;
  padding: 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
}
.btn-logout:hover { border-color: var(--danger); color: var(--danger); }
.main { flex: 1; padding: 1.1rem 1.75rem 2.5rem; min-width: 0; }
.main-head {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.75rem;
  position: sticky;
  top: 0;
  z-index: 12;
  background: linear-gradient(180deg, rgba(16, 33, 26, 0.96), rgba(16, 33, 26, 0.65) 70%, transparent);
  padding: 0.2rem 0 0.65rem;
}
.bell-wrap { position: relative; }
.bell-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bell-btn:hover, .bell-btn[aria-expanded="true"] { border-color: var(--teal); color: var(--teal); }
.bell-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bell-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: min(380px, 92vw);
  max-height: 70vh;
  overflow: auto;
  background: var(--navy);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  padding: 0.85rem;
}
.bell-drop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.bell-hint { margin: 0.45rem 0 0.7rem; color: var(--muted); font-size: 0.78rem; }
.alert-row {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: inherit;
  padding: 0.7rem 0.15rem;
  cursor: pointer;
}
.alert-row:last-child { border-bottom: none; }
.alert-row.unread { background: rgba(63, 157, 98, 0.12); border-radius: 8px; padding-left: 0.45rem; padding-right: 0.45rem; }
.alert-row .alert-title { font-weight: 600; font-size: 0.9rem; }
.alert-row .alert-meta { margin-top: 0.25rem; color: var(--muted); font-size: 0.75rem; }
.alerts-list .alert-row { padding: 0.75rem 0; }
.panel { display: none; }
.panel.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h1 { margin: 0 0 0.35rem; font-size: 1.55rem; }
.sub { color: var(--muted); margin: 0 0 1.25rem; font-size: 0.92rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat .label { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.stat .value { font-size: 1.25rem; font-weight: 700; margin-top: 0.35rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  background: var(--teal);
  color: #10211a;
  text-decoration: none;
  font-size: 0.9rem;
}
.btn:hover { background: var(--teal-dark); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
[hidden] { display: none !important; }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
label { display: block; font-size: 0.8rem; color: var(--muted); margin: 0.7rem 0 0.3rem; }
input, textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-size: 0.95rem;
}
input:disabled { opacity: 0.7; cursor: not-allowed; }
input:focus { outline: 2px solid rgba(63, 157, 98, 0.45); border-color: var(--teal); }
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge.ok { background: rgba(62, 207, 142, 0.2); color: var(--ok); }
.badge.warn { background: rgba(230, 184, 77, 0.2); color: var(--warn); }
.badge.danger { background: rgba(232, 93, 93, 0.2); color: var(--danger); }
.device-card { cursor: pointer; }
.device-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.device-title {
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.device-sub { margin-top: 0.3rem; color: var(--muted); font-size: 0.82rem; }
.device-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.device-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.65rem 1rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
}
.device-rows span { display: block; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.device-rows strong { font-weight: 600; }
.device-detail { margin-top: 0.85rem; padding-top: 0.85rem; border-top: 1px solid var(--line); }
.device-cams { margin: 0.85rem 0 0; color: var(--muted); font-size: 0.85rem; }
.device-empty .sub { max-width: 42rem; }
.presence-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: var(--muted);
}
.presence-dot.presence-live { background: var(--ok); box-shadow: 0 0 0 4px rgba(62, 207, 142, 0.18); }
.presence-dot.presence-seen { background: var(--warn); }
.presence-dot.presence-offline { background: var(--danger); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.7rem 0.55rem; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }
.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  background: #1a3328;
  border: 1px solid var(--teal);
  color: var(--ink);
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
  z-index: 50;
  display: none;
}
.toast.show { display: block; animation: fade .2s ease; }
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  display: none; align-items: center; justify-content: center; z-index: 40; padding: 1rem;
}
.modal-bg.show { display: flex; }
.modal {
  background: var(--navy);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  padding: 1.25rem;
}
.plan-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; align-items: center;
}
.pay-box { margin-top: 0.75rem; padding: 0.85rem; border-radius: 10px; background: rgba(0,0,0,.2); border: 1px dashed var(--line); }
.mobile-top { display: none; }
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: relative; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { margin-top: 0.5rem; }
  .mobile-top { display: block; margin-bottom: 0.5rem; }
}

/* —— Login hero —— */
body.login-page {
  background: #10211a;
  min-height: 100vh;
}
.login-hero {
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.login-hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
.login-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(16, 33, 26, 0.94) 0%, rgba(16, 33, 26, 0.72) 38%, rgba(16, 33, 26, 0.45) 100%),
    linear-gradient(0deg, rgba(16, 33, 26, 0.9) 0%, transparent 50%);
}
.login-scan {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(63, 157, 98, 0.05) 2px,
    rgba(63, 157, 98, 0.05) 3px
  );
}
.login-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
}
.login-panel {
  background: rgba(12, 18, 25, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.75rem;
  backdrop-filter: blur(10px);
  text-align: center;
}
.login-logo {
  display: block;
  height: 52px;
  width: auto;
  margin: 0 auto 1.15rem;
  object-fit: contain;
}
.login-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login-sub {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}
.login-cta {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  background: linear-gradient(135deg, #5cb87a, #3f9d62);
  color: #10211a;
}
.login-cta:hover {
  background: linear-gradient(135deg, #3f9d62, #2f7a4b);
  color: #e7f2ea;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.15rem 0.5rem 0.35rem;
}
.sidebar-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sidebar-brand-text .product {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.sidebar-brand-text .org {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}
.pay-waiting {
  font-weight: 600;
  color: var(--teal);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.confirm-panel {
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  margin-top: 1rem;
  border: 1px solid var(--line);
  text-align: center;
  background: rgba(0, 0, 0, 0.22);
}
.confirm-panel h2 { margin: 0.35rem 0 0.5rem; font-size: 1.45rem; }
.confirm-icon {
  width: 52px; height: 52px; margin: 0 auto;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
}
.confirm-ok .confirm-icon { background: rgba(62, 207, 142, 0.2); color: var(--ok); }
.confirm-fail .confirm-icon { background: rgba(232, 93, 93, 0.2); color: var(--danger); }
.confirm-ok { border-color: rgba(62, 207, 142, 0.35); }
.confirm-fail { border-color: rgba(232, 93, 93, 0.35); }
.confirm-details {
  text-align: left;
  margin: 1.15rem auto 1.35rem;
  max-width: 420px;
  display: grid;
  gap: 0.55rem;
}
.confirm-details > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.confirm-details span { color: var(--muted); }
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.admin-tab {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.admin-tab:hover { border-color: var(--teal); color: var(--ink); }
.admin-tab.active {
  background: rgba(63, 157, 98, 0.22);
  border-color: rgba(63, 157, 98, 0.45);
  color: var(--teal);
}
.admin-pane { display: none; }
.admin-pane.active { display: block; }
.enq-heading { margin: 1.25rem 0 0.5rem; font-size: 1.05rem; }
.enq-toolbar { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.enq-table-wrap { overflow-x: auto; }
.enq-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.enq-table th, .enq-table td {
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.enq-table th { color: var(--muted); font-weight: 600; }
.enq-message { white-space: pre-wrap; margin: 0; max-width: 22rem; }
.enq-date { background: transparent; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.5rem; }
.enq-due { color: var(--danger); font-weight: 700; }
.enq-tools { display: flex; gap: 0.35rem; margin: 0.75rem 0 0.4rem; }
.enq-tools button { background: transparent; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 0.25rem 0.55rem; cursor: pointer; }
.enq-editor {
  min-height: 8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
  margin-bottom: 0.75rem;
}
.enq-reply { border-top: 1px solid var(--line); margin-top: 0.6rem; padding-top: 0.6rem; }
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.btn-icon {
  padding: 0.35rem;
  min-width: 2.1rem;
}
.admin-refresh { margin-left: auto; }
.admin-refresh svg { display: block; }
.admin-refresh.busy svg { animation: admin-refresh-spin 0.7s linear infinite; }
@keyframes admin-refresh-spin { to { transform: rotate(360deg); } }
.admin-users-table { width: 100%; }
.admin-user-main { cursor: pointer; }
.admin-user-main:hover td { background: rgba(63, 157, 98, 0.1); }
.admin-expand-licenses {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.admin-expand-licenses::before {
  content: "▸";
  font-size: 0.75rem;
  color: var(--muted);
}
.admin-expand-licenses[aria-expanded="true"]::before { content: "▾"; color: var(--teal); }
.admin-expand-licenses:hover { border-color: var(--teal); color: var(--teal); }
.admin-user-licenses td { padding-top: 0; padding-bottom: 1rem; background: rgba(0,0,0,0.12); }
.admin-user-licenses[hidden] { display: none; }
.admin-nested { width: 100%; margin-top: 0.35rem; font-size: 0.82rem; }
.admin-nested th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.sys-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; margin-bottom: 0.85rem; }
.sys-card { border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.75rem; }
.sys-card span { display: block; font-size: 0.75rem; color: var(--muted); }
.sys-card strong { font-size: 1.35rem; }
.sys-toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sys-toolbar input[type="search"] { flex: 1; min-width: 200px; }
.sys-rules { margin: 0; padding-left: 1rem; }
.sys-rules li { margin: 0.1rem 0; }
.alr-toolbar > label { display: flex; flex-direction: column; font-size: 0.75rem; color: var(--muted); gap: 0.2rem; }
.alr-toolbar > button { align-self: flex-end; }
.alr-field { display: flex; flex-direction: column; font-size: 0.75rem; color: var(--muted); gap: 0.2rem; }
.alr-quick { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.25rem 0 0.85rem; font-size: 0.85rem; }
.alr-scope { margin-top: 0; }
.msel { position: relative; }
.msel-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 0.6rem;
  min-width: 220px; max-width: 320px; padding: 0.55rem 0.7rem; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, 0.25); color: inherit; font: inherit; font-size: 0.9rem; cursor: pointer;
}
.msel-btn .msel-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-btn:focus-visible, .msel-item input:focus-visible, .alr-quick .btn:focus-visible { outline: 2px solid var(--ok); outline-offset: 2px; }
.msel-pop {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; width: 340px; max-width: 90vw;
  background: #10241b; border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.msel-search { width: 100%; margin-bottom: 0.45rem; }
.msel-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.msel-actions .btn { font-size: 0.78rem; padding: 0.3rem 0.55rem; }
.msel-list { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.1rem; }
.msel-item { display: flex; gap: 0.55rem; align-items: flex-start; padding: 0.4rem 0.35rem; border-radius: 6px; cursor: pointer; font-size: 0.88rem; color: var(--text, #e8f5ee); }
.msel-item:hover { background: rgba(255, 255, 255, 0.06); }
.msel-item input { margin-top: 0.2rem; width: 1rem; height: 1rem; flex: none; }
.alr-chart { margin: 0.5rem 0 1rem; }
.alr-chart svg { width: 100%; height: 220px; display: block; }
.alr-legend { font-size: 0.8rem; color: var(--muted); display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.alr-key { display: inline-block; width: 0.75rem; height: 0.75rem; border-radius: 2px; margin-left: 0.6rem; }
.alr-bar-cap { fill: var(--muted); background: var(--muted); }
.alr-bar-email { fill: var(--ok); background: var(--ok); }
.alr-bar-wa { fill: var(--warn); background: var(--warn); }
.alr-bar-tg { fill: #5aa9e6; background: #5aa9e6; }
.alr-axis { fill: var(--muted); font-size: 11px; }
.alr-axis-line { stroke: var(--line); }
.log-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.grant-key-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  word-break: break-all;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0 1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.admin-plan-row {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.admin-plan-edit {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 160px;
}
.admin-plan-edit input { max-width: 140px; }
.muted { color: var(--muted); font-size: 0.75rem; }

/* —— Contact us / legal footer —— */
.nav-contact {
  margin-top: 0.35rem;
  border: 1px solid rgba(63, 157, 98, 0.5) !important;
  color: var(--teal) !important;
  background: rgba(63, 157, 98, 0.1);
}
.nav-contact.active {
  background: rgba(63, 157, 98, 0.28) !important;
  color: #fff !important;
}
.login-contact {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}
.login-contact-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e7f2ea;
  letter-spacing: 0.02em;
}
.login-contact-details {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
}
.login-contact-details a {
  color: var(--teal);
  text-decoration: none;
}
.login-contact-details a:hover { text-decoration: underline; }
.login-contact-details .sep { color: var(--muted); margin: 0 0.35rem; }
.login-contact-hint {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.login-contact-form label {
  display: block;
  margin: 0.45rem 0 0.2rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.login-contact-form .opt { opacity: 0.7; font-weight: 400; }
.login-contact-form input,
.login-contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
}
.login-contact-submit {
  width: 100%;
  margin-top: 0.85rem;
}
.login-contact-ok {
  margin: 0.75rem 0 0;
  color: var(--ok);
  font-size: 0.88rem;
  font-weight: 600;
}
.login-contact-err,
.contact-err {
  margin: 0.65rem 0 0;
  color: var(--danger);
  font-size: 0.85rem;
}
.contact-ok {
  margin: 0.75rem 0 0;
  color: var(--ok);
  font-weight: 600;
}
.contact-card form label { display: block; margin: 0.55rem 0 0.25rem; color: var(--muted); font-size: 0.8rem; }
.contact-card textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 110px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
  resize: vertical;
}
.contact-company {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.contact-company-label {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.contact-company a { color: var(--teal); text-decoration: none; }
.contact-company a:hover { text-decoration: underline; }
.contact-company .sep { color: var(--muted); margin: 0 0.4rem; }
.site-legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  padding: 0.85rem 1rem 1.25rem;
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(16, 33, 26, 0.92);
  position: relative;
  z-index: 2;
}
.site-legal-footer a {
  color: rgba(232, 244, 242, 0.82);
  text-decoration: none;
}
.site-legal-footer a:hover { color: var(--teal); text-decoration: underline; }
.site-legal-footer .legal-sep { color: rgba(255, 255, 255, 0.28); }
body.login-page .login-hero { min-height: calc(100vh - 56px - 3rem); }
.deploy-commit {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy-deep);
  background: var(--teal);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}
.deploy-commit[hidden] { display: none !important; }
.plan-banner {
  margin-bottom: 1.1rem;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(63, 157, 98, 0.28), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(63, 157, 98, 0.45);
}
.plan-banner h1 { margin-bottom: 0.4rem; }
.plan-banner p:last-child { margin: 0; color: var(--ink); }
.plan-kicker {
  margin: 0 0 0.25rem;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.offer-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.offer-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem 1.2rem 1.2rem;
}
.offer-card h2 { margin: 0.15rem 0 0.45rem; font-size: 1.35rem; }
.offer-summary { margin: 0 0 0.7rem; color: var(--muted); }
.device-once { margin: 0 0 0.85rem; font-weight: 600; }
.cycle-list { display: grid; gap: 0.55rem; }
.cycle-choice {
  display: grid;
  gap: 0.1rem;
  text-align: left;
  width: 100%;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
}
.cycle-choice:hover { border-color: var(--teal); }
.cycle-label { color: var(--muted); font-size: 0.78rem; }
.cycle-note { color: var(--muted); font-size: 0.75rem; }
.terms-text {
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.45;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.18);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin: 0.5rem 0 0.8rem;
}
.terms-agree { display: flex; gap: 0.5rem; align-items: center; justify-content: flex-start; color: var(--ink); font-size: 0.95rem; }
.terms-agree input { width: auto; flex: 0 0 auto; padding: 0; margin: 0; }
.address-grid {
  display: grid;
  gap: 0 0.75rem;
  grid-template-columns: 1fr 1fr;
  text-align: left;
}
.address-grid .full { grid-column: 1 / -1; }
.address-grid label { margin-top: 0.55rem; }
.address-preview {
  text-align: left;
  white-space: pre-wrap;
  line-height: 1.45;
  margin: 0;
}
.address-required { color: var(--warn); font-weight: 600; margin: 0 0 0.75rem; }
.address-err { color: var(--danger); font-size: 0.85rem; margin: 0.65rem 0 0; }
@media (max-width: 640px) {
  .address-grid { grid-template-columns: 1fr; }
}
.offer-edit { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.offer-edit label { display: grid; gap: 0.25rem; font-size: 0.78rem; color: var(--muted); }
.offer-edit input { min-width: 7rem; }
.muted-line { color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; }
@media (max-width: 720px) {
  .hub-banner-email { display: none; }
  .hub-banner { padding: 0 0.65rem; }
}
