/* =========================================================
   Customer portal (portal-home.html, portal-commercial.html)
   Dark dashboard matching the Boliq app. Everything is scoped
   under .portal so the marketing pages are untouched.
   ========================================================= */

.portal{
  --p-bg: #121215;
  --p-panel: #1a1a1f;
  --p-panel-2: #202027;
  --p-line: #2b2b33;
  --p-ink: #ffffff;
  --p-soft: #b8b8c2;
  --p-faint: #71717d;
  --p-amber: #f5a623;
  --p-amber-light: #ffcf7a;
  --p-amber-bg: rgba(245,166,35,0.16);
  --p-green: #57d9a4;
  --p-green-bg: rgba(53,192,138,0.16);
  --p-red: #f28a82;
  --p-red-bg: rgba(226,87,76,0.16);
  --p-grey-bg: rgba(184,184,194,0.12);
  --p-hivis: #d7f22e;
  --p-display: 'Archivo', 'Inter', system-ui, sans-serif;

  background: var(--p-bg);
  color: var(--p-ink);
  min-height: 100vh;
}
body.portal-body{ background: #121215; }
.portal *:focus-visible{ outline: 2px solid var(--p-amber); outline-offset: 2px; }
.portal button{ font-family: inherit; }

/* ---------- Top bar ---------- */
.p-top{
  position: sticky; top: 0; z-index: 50;
  background: rgba(18,18,21,0.88);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--p-line);
}
.p-top-row{ display: flex; align-items: center; gap: 28px; height: 68px; }
.p-nav{ display: flex; gap: 4px; margin-left: 12px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.p-nav::-webkit-scrollbar{ display: none; }
.p-nav a{
  color: var(--p-soft); font-weight: 600; font-size: 0.92rem; white-space: nowrap; flex: none;
  padding: 8px 12px; border-radius: 999px;
}
.p-nav a:hover{ color: var(--p-ink); background: var(--p-panel); }
.p-top-right{ margin-left: auto; display: flex; align-items: center; gap: 14px; }
.p-who{ display: flex; align-items: center; gap: 10px; color: var(--p-soft); font-size: 0.88rem; font-weight: 600; }
.p-avatar{
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--p-amber); color: #0a0a0c;
  display: grid; place-items: center;
  font-family: var(--p-display); font-weight: 800; font-size: 0.9rem;
}
.p-btn-ghost{
  background: transparent; color: var(--p-ink);
  border: 1px solid var(--p-line); border-radius: 999px;
  padding: 9px 16px; font-weight: 700; font-size: 0.85rem; cursor: pointer;
}
.p-btn-ghost:hover{ border-color: var(--p-amber); color: var(--p-amber-light); }

/* ---------- Hero ---------- */
.p-hero{
  position: relative;
  min-height: 300px;
  background-size: cover; background-position: center 55%;
  display: flex; align-items: flex-end;
}
.p-hero::after{
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,18,21,0.55) 0%, rgba(18,18,21,0.15) 40%, #121215 100%);
}
.p-hero .container{ position: relative; z-index: 1; width: 100%; padding-bottom: 26px; }
.p-greeting{ font-family: var(--p-display); font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; line-height: 1.05; }
.p-summary{ color: var(--p-soft); font-weight: 500; font-size: 1.05rem; margin-top: 8px; }

/* ---------- Layout ---------- */
.p-main{ padding: 8px 0 110px; }
.p-grid{ display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.p-side{ position: sticky; top: 92px; display: flex; flex-direction: column; gap: 20px; }
.p-section{ margin-top: 30px; }
.p-section:first-child{ margin-top: 0; }
.p-sec-head{ display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.p-sec-title{ font-family: var(--p-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.01em; }
.p-link{ background: none; border: 0; padding: 0; color: var(--p-amber); font-weight: 600; font-size: 0.92rem; cursor: pointer; }
.p-link:hover{ color: var(--p-amber-light); }
.p-muted{ color: var(--p-faint); font-size: 0.9rem; }
.p-panel{ background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 20px; }

/* ---------- Stats ---------- */
.p-stats{ display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 14px; }
.p-stat{ padding: 16px; }
.p-stat-icon{ width: 28px; height: 28px; border-radius: 50%; background: var(--p-amber-bg); color: var(--p-amber); display: grid; place-items: center; margin-bottom: 14px; }
.p-stat-icon svg{ width: 15px; height: 15px; }
.p-stat-value{ font-family: var(--p-display); font-weight: 700; font-size: 1.35rem; }
.p-stat-label{ color: var(--p-faint); font-size: 0.86rem; margin-top: 2px; }

/* ---------- Alerts ---------- */
.p-alert{
  display: flex; align-items: center; gap: 14px;
  background: var(--p-red-bg); border-radius: 16px; padding: 14px 16px;
  margin-top: 14px; cursor: pointer; border: 0; width: 100%; text-align: left; color: var(--p-ink);
}
.p-alert svg{ color: var(--p-red); width: 20px; height: 20px; flex: none; }
.p-alert b{ display: block; font-size: 0.95rem; }
.p-alert span{ color: var(--p-soft); font-size: 0.85rem; }

/* ---------- Groups ---------- */
.p-groups{ display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.p-group{ padding: 16px; }
.p-group-head{ display: flex; align-items: center; gap: 12px; background: none; border: 0; color: inherit; width: 100%; text-align: left; cursor: pointer; padding: 0; }
.p-group-icon{ width: 38px; height: 38px; border-radius: 50%; background: var(--p-amber-bg); color: var(--p-amber); display: grid; place-items: center; flex: none; }
.p-group-icon svg{ width: 17px; height: 17px; }
.p-group-name{ font-family: var(--p-display); font-weight: 700; font-size: 1.05rem; }
.p-group-meta{ color: var(--p-faint); font-size: 0.84rem; margin-top: 2px; }
.p-group-more{ margin-left: auto; color: var(--p-faint); }
.p-btn-row{ display: flex; gap: 10px; margin-top: 14px; }
.p-btn{
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; border-radius: 999px; font-weight: 700; font-size: 0.92rem; cursor: pointer;
  border: 1px solid transparent; transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.p-btn svg{ width: 16px; height: 16px; }
.p-btn:active{ transform: scale(0.98); }
.p-btn[disabled]{ opacity: 0.4; cursor: not-allowed; }
.p-btn-raise{ background: var(--p-amber); color: #0a0a0c; }
.p-btn-raise:hover:not([disabled]){ background: var(--p-amber-light); }
.p-btn-lower{ background: var(--p-panel-2); color: var(--p-ink); border-color: var(--p-line); }
.p-btn-lower:hover:not([disabled]){ border-color: var(--p-soft); }
.p-dashed{
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px dashed var(--p-line); border-radius: 18px; padding: 18px;
  color: var(--p-faint); font-weight: 700; font-size: 0.92rem;
  background: none; cursor: pointer; width: 100%;
}
.p-dashed:hover{ color: var(--p-amber-light); border-color: var(--p-amber); }

/* ---------- Bollard tiles ---------- */
.p-hint{ display: flex; justify-content: space-between; align-items: center; margin: -4px 0 14px; color: var(--p-faint); font-size: 0.88rem; }
.p-tiles{ display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.p-tile{
  position: relative; background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 20px;
  overflow: hidden; cursor: pointer; text-align: left; color: inherit; padding: 0;
  transition: transform .15s ease, border-color .15s ease;
}
.p-tile:hover{ transform: translateY(-2px); border-color: #3a3a44; }
.p-tile.is-selected{ border: 2px solid var(--p-amber); }
.p-tile.is-disabled{ opacity: 0.4; cursor: not-allowed; }
.p-tile-stage{ height: 190px; background: var(--p-panel-2); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; position: relative; }
.p-tile-pos{ position: absolute; top: 12px; left: 14px; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--p-soft); }
.p-tile-pos.is-raised{ color: var(--p-amber); }
.p-check{
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--p-soft); display: grid; place-items: center; color: #0a0a0c;
}
.p-tile.is-selected .p-check{ background: var(--p-amber); border-color: var(--p-amber); }
.p-check svg{ width: 15px; height: 15px; }
.p-tile-foot{ padding: 14px; }
.p-tile-name{ font-family: var(--p-display); font-weight: 700; font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-tile-meta{ display: flex; align-items: center; justify-content: space-between; margin-top: 10px; gap: 8px; }

.p-pill{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.p-pill::before{ content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-pill.online{ color: var(--p-green); background: var(--p-green-bg); }
.p-pill.offline, .p-pill.fault{ color: var(--p-red); background: var(--p-red-bg); }
.p-pill.awaiting_install{ color: var(--p-amber-light); background: var(--p-amber-bg); }
.p-battery{ display: inline-flex; align-items: center; gap: 5px; color: var(--p-soft); font-weight: 600; font-size: 0.82rem; }
.p-battery.low{ color: var(--p-red); }
.p-battery svg{ width: 18px; height: 18px; }

/* ---------- Bollard drawing ---------- */
.bollard{ --h: 96px; --w: calc(var(--h) * 0.36); display: flex; flex-direction: column; align-items: center; }
.bollard.is-unknown{ opacity: 0.35; }
.bollard-well{ width: var(--w); height: var(--h); overflow: hidden; }
.bollard-body{
  width: 100%; height: 100%;
  border-radius: calc(var(--w) * 0.12) calc(var(--w) * 0.12) 0 0;
  background: linear-gradient(90deg, #6c6c74 0%, #d9d9de 28%, #f4f4f6 45%, #a9a9b1 72%, #5e5e66 100%);
  position: relative;
  transition: transform .9s cubic-bezier(.3,.8,.3,1);
}
.bollard.is-lowered .bollard-body{ transform: translateY(calc(var(--h) * 0.94)); }
.bollard-cap{ height: calc(var(--h) * 0.06); min-height: 4px; background: #8e8e96; border-bottom: 1px solid rgba(0,0,0,0.25); display: grid; place-items: center; }
.bollard-led{ width: 50%; height: 2px; border-radius: 1px; background: var(--p-amber, #f5a623); }
.bollard.is-lowered .bollard-led{ opacity: 0.35; }
.bollard.is-moving .bollard-led{ animation: bollard-pulse 1.2s ease-in-out infinite; }
@keyframes bollard-pulse{ 0%,100%{ opacity: .35 } 50%{ opacity: 1 } }
.bollard-band{ position: absolute; left: 0; right: 0; top: calc(var(--h) * 0.13); height: calc(var(--h) * 0.1); min-height: 5px; background: var(--p-hivis, #d7f22e); opacity: .92; }
.bollard-flange{ width: calc(var(--w) * 1.7); height: calc(var(--h) * 0.07); min-height: 5px; margin-top: -2px; border-radius: 99px; background: #26262c; border: 1px solid #3a3a42; }

/* ---------- Side cards ---------- */
.p-next{ display: flex; align-items: center; gap: 14px; padding: 16px; }
.p-next-icon{ width: 48px; height: 48px; border-radius: 50%; background: var(--p-amber); color: #0a0a0c; display: grid; place-items: center; flex: none; }
.p-next-icon svg{ width: 22px; height: 22px; }
.p-eyebrow{ font-weight: 700; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-amber); }
.p-next-title{ font-family: var(--p-display); font-weight: 700; font-size: 1.1rem; margin-top: 3px; }
.p-feed{ padding: 4px 16px; }
.p-feed-day{ font-weight: 700; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-faint); margin: 16px 0 2px; }
.p-event{ display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--p-line); }
.p-event:last-child{ border-bottom: 0; }
.p-event-icon{ width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.p-event-icon svg{ width: 15px; height: 15px; }
.p-event-title{ font-weight: 600; font-size: 0.9rem; }
.p-event-sub{ color: var(--p-faint); font-size: 0.8rem; margin-top: 1px; }
.p-event-time{ margin-left: auto; color: var(--p-faint); font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.tone-amber{ color: var(--p-amber-light); background: var(--p-amber-bg); }
.tone-green{ color: var(--p-green); background: var(--p-green-bg); }
.tone-red{ color: var(--p-red); background: var(--p-red-bg); }
.tone-grey{ color: var(--p-soft); background: var(--p-grey-bg); }

/* ---------- Schedule overview ---------- */
.p-sched-dev{ margin-top: 18px; }
.p-sched-add{ display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.p-sched-add select{ flex: 1 1 220px; min-width: 0; background: var(--p-panel); color: var(--p-ink); border: 1px solid var(--p-line); border-radius: 12px; padding: 11px 12px; font: inherit; }
.p-sched-add .p-dashed{ flex: 1 1 200px; margin: 0; }
/* Compact tiles once a customer has more than six bollards */
.p-tiles.is-compact{ grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.p-tiles.is-compact .p-tile-stage{ height: 104px; padding-bottom: 8px; }
.p-sched-dev h4{ font-family: var(--p-display); font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.p-slot{ display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px; }
.p-slot.is-off{ opacity: 0.55; }
.p-slot-title{ font-weight: 700; font-size: 0.95rem; }
.p-slot-pills{ display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.p-tag{ display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.04em; }
.p-tag svg{ width: 11px; height: 11px; }
.p-toggle{ width: 46px; height: 28px; border-radius: 14px; background: #34343c; border: 0; padding: 3px; cursor: pointer; display: flex; flex: none; }
.p-toggle span{ width: 22px; height: 22px; border-radius: 50%; background: var(--p-soft); transition: transform .15s ease; }
.p-toggle.on{ background: var(--p-amber); }
.p-toggle.on span{ background: #0a0a0c; transform: translateX(18px); }
.p-icon-btn{ background: none; border: 0; color: var(--p-red); cursor: pointer; padding: 6px; display: grid; place-items: center; }
.p-icon-btn svg{ width: 17px; height: 17px; }

/* ---------- Orders and quotes ---------- */
.p-cards{ display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.p-card{ padding: 18px; }
.p-card h3{ font-family: var(--p-display); font-weight: 700; font-size: 1.05rem; }
.p-kv{ display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--p-line); font-size: 0.88rem; }
.p-kv:last-of-type{ border-bottom: 0; }
.p-kv span{ color: var(--p-faint); }
.p-kv b{ text-align: right; font-weight: 600; }
.p-card-head{ display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.p-status{ font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; color: var(--p-amber-light); background: var(--p-amber-bg); white-space: nowrap; }
.p-card .p-btn{ flex: none; padding: 0 18px; height: 40px; margin-top: 14px; text-decoration: none; }

/* ---------- Select bar ---------- */
.p-bar{
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px)); z-index: 60;
  background: var(--p-panel-2); border: 1px solid var(--p-line); border-radius: 22px;
  padding: 14px; box-shadow: 0 20px 50px rgba(0,0,0,0.55);
}
.p-bar-top{ display: flex; justify-content: space-between; align-items: center; padding: 0 4px 10px; color: var(--p-soft); font-weight: 600; font-size: 0.88rem; }
.p-bar-msg{ color: var(--p-red); font-size: 0.85rem; padding: 0 4px 10px; }
.p-bar .p-btn{ height: 50px; font-size: 1rem; }

/* ---------- Drawer ---------- */
.p-scrim{ position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.p-scrim.open{ opacity: 1; pointer-events: auto; }
.p-drawer{
  position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); z-index: 71;
  background: var(--p-bg); border-left: 1px solid var(--p-line);
  transform: translateX(100%); transition: transform .25s ease;
  overflow-y: auto; padding: 20px 22px 40px;
}
.p-drawer.open{ transform: none; }
.p-drawer-top{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.p-round{ width: 38px; height: 38px; border-radius: 50%; background: var(--p-panel); border: 1px solid var(--p-line); color: var(--p-ink); display: grid; place-items: center; cursor: pointer; }
.p-round svg{ width: 18px; height: 18px; }
.p-dhero{ position: relative; overflow: hidden; background: var(--p-bg); border: 1px solid var(--p-line); border-radius: 28px; padding: 20px; }
.p-dhero::before{ content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(184,184,194,0.08), transparent 60%); pointer-events: none; }
.p-dhero.is-raised::before{ background: linear-gradient(180deg, rgba(245,166,35,0.16), transparent 60%); }
.p-dhead{ display: flex; align-items: flex-start; gap: 12px; position: relative; }
.p-dname{ font-family: var(--p-display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; letter-spacing: -0.01em; }
.p-edit{ width: 28px; height: 28px; border-radius: 50%; background: var(--p-grey-bg); border: 0; color: var(--p-soft); display: inline-grid; place-items: center; cursor: pointer; vertical-align: middle; margin-left: 8px; }
.p-edit svg{ width: 13px; height: 13px; }
.p-dsite{ color: var(--p-faint); font-size: 0.88rem; margin-top: 3px; }
.p-dstage{ height: 210px; display: flex; align-items: flex-end; justify-content: center; position: relative; margin-top: 6px; }
.p-glow{ position: absolute; bottom: 26px; width: 180px; height: 180px; border-radius: 50%; background: rgba(184,184,194,0.05); }
.p-dhero.is-raised .p-glow{ background: rgba(245,166,35,0.12); }
.p-dpos{ font-family: var(--p-display); font-weight: 800; font-size: 2.2rem; text-align: center; margin-top: 16px; }
.p-dhero.is-raised .p-dpos{ color: var(--p-amber); }
.p-dnote{ text-align: center; color: var(--p-soft); font-size: 0.9rem; margin-top: 4px; }
.p-bigbtn{ width: 100%; height: 56px; margin-top: 20px; font-size: 1.05rem; box-shadow: 0 10px 24px rgba(245,166,35,0.3); }
.p-dhint{ text-align: center; color: var(--p-faint); font-size: 0.8rem; margin-top: 12px; }
.p-dstats{ display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.p-dstat{ padding: 14px; min-height: 118px; display: flex; flex-direction: column; }
.p-dstat .p-stat-icon{ margin-bottom: auto; }
.p-dstat-value{ font-family: var(--p-display); font-weight: 700; font-size: 1.05rem; margin-top: 12px; }
.p-meter{ height: 4px; border-radius: 2px; background: var(--p-panel-2); margin-top: 8px; overflow: hidden; }
.p-meter i{ display: block; height: 100%; background: var(--p-amber); border-radius: 2px; }
.p-dsec{ margin-top: 22px; }
.p-dsec h3{ font-family: var(--p-display); font-weight: 700; font-size: 1.15rem; margin-bottom: 10px; }
.p-days{ display: flex; justify-content: space-between; gap: 6px; margin: 10px 0 14px; }
.p-day{ width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--p-line); background: none; color: var(--p-ink); font-weight: 700; cursor: pointer; }
.p-day.on{ background: var(--p-amber); border-color: var(--p-amber); color: #0a0a0c; }
.p-times{ display: flex; gap: 10px; }
.p-field{ flex: 1; }
.p-field label{ display: block; font-weight: 700; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-faint); margin-bottom: 6px; }
.p-input{
  width: 100%; background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 12px;
  color: var(--p-ink); padding: 12px 14px; font: inherit; font-weight: 600; color-scheme: dark;
}
.p-input:focus{ outline: none; border-color: var(--p-amber); }
.p-form-error{ color: var(--p-red); font-size: 0.85rem; margin-top: 10px; }

/* ---------- Modal ---------- */
.p-modal-wrap{ position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.6); display: none; align-items: center; justify-content: center; padding: 20px; }
.p-modal-wrap.open{ display: flex; }
.p-modal{ width: min(420px, 100%); background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 26px; padding: 22px; }
.p-modal h3{ font-family: var(--p-display); font-weight: 700; font-size: 1.25rem; }
.p-modal p{ color: var(--p-soft); font-size: 0.92rem; margin-top: 6px; line-height: 1.45; }
.p-modal .p-input{ margin-top: 16px; border: 1.5px solid var(--p-amber); background: var(--p-bg); }
.p-modal-list{ display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.p-modal-list .p-btn{ flex: none; }
.p-btn-danger{ background: var(--p-red-bg); color: var(--p-red); }

.p-empty{ padding: 28px; text-align: center; }
.p-empty h3{ font-family: var(--p-display); font-weight: 700; font-size: 1.15rem; margin-top: 16px; }
.p-empty p{ color: var(--p-soft); margin-top: 6px; font-size: 0.92rem; }
.p-loading{ color: var(--p-faint); padding: 40px 0; }

.p-footer{ border-top: 1px solid var(--p-line); padding: 26px 0; color: var(--p-faint); font-size: 0.82rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px){
  .p-grid{ grid-template-columns: 1fr; }
  .p-side{ position: static; }
}
@media (max-width: 760px){
  /* The menu moves under the logo as a strip that scrolls sideways, so
     Connected apps and API keys can still be reached on a phone. */
  .p-top-row{ flex-wrap: wrap; height: auto; padding: 10px 0 0; row-gap: 8px; }
  .p-nav{ order: 3; flex: 1 1 100%; margin: 0; padding-bottom: 8px; }
  .p-nav a{ font-size: 0.86rem; padding: 7px 12px; }
  .p-who-name{ display: none; }
  .p-hero{ min-height: 240px; }
  .p-stats{ grid-template-columns: 1fr 1fr; }
  .p-stats .p-stat:last-child{ grid-column: 1 / -1; }
  .p-tiles{ grid-template-columns: 1fr 1fr; gap: 12px; }
  .p-tile-stage{ height: 160px; }
  .p-tiles.is-compact .p-tile-stage{ height: 92px; }
  .p-groups{ grid-template-columns: 1fr; }
  .p-day{ width: 36px; height: 36px; }
}

/* ---------- Number plates (ANPR) ----------
   Shown only to customers with a plate-reading camera. */
.plates-intro{ margin: -6px 0 14px; }
.plates-list{ display: flex; flex-direction: column; gap: 10px; }
.plates-row{ display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 12px; }
.plates-row.is-off{ opacity: 0.55; }
.plates-open{
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px;
  background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer;
}
.plates-plate{
  flex: none; min-width: 112px; padding: 7px 10px; border-radius: 6px;
  background: #f7d117; color: #0a0a0c; box-shadow: inset 0 0 0 1.5px rgba(0,0,0,0.35);
  font-family: var(--p-display); font-weight: 800; font-size: 1.02rem; letter-spacing: 0.06em;
  text-align: center; white-space: nowrap;
}
.plates-info{ display: block; min-width: 0; }
/* One line with an ellipsis, without nowrap: below 1000px the page grid
   column grows to fit unbreakable text, so long names would widen the page. */
.plates-name{
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;
  overflow-wrap: anywhere; font-weight: 700; font-size: 0.95rem;
}
.plates-meta{ display: block; color: var(--p-faint); font-size: 0.82rem; margin-top: 2px; }
.plates-meta.is-warn{ color: var(--p-red); }
.plates-open:hover .plates-name{ color: var(--p-amber-light); }
.plates-sub{ font-family: var(--p-display); font-weight: 700; font-size: 1.05rem; margin: 22px 0 10px; }
.plates-feed .p-event-title, .plates-feed .p-event-sub{ overflow-wrap: anywhere; }
.plates-note{ margin-top: 10px; font-size: 0.8rem; }
.plates-field{ margin-top: 14px; }
.p-modal .plates-field .p-input{ margin-top: 0; }
.p-modal .plates-hint{ font-size: 0.82rem; color: var(--p-faint); margin-top: 8px; }
.plates-plate-input{ text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--p-display); font-weight: 800; }
.plates-plate-input::placeholder{ text-transform: none; letter-spacing: normal; font-weight: 600; }
@media (max-width: 760px){
  .plates-row{ gap: 8px; padding: 10px 10px 10px 10px; }
  .plates-open{ gap: 10px; }
  .plates-plate{ min-width: 90px; padding: 6px 8px; font-size: 0.9rem; }
}
