/* portal.hitdns.nl - the customer side, white and blue.
 *
 * Loaded ONLY by the pages a paying customer can reach. The admin panel keeps
 * its own colours: this file overrides the variables rather than editing
 * style.css, so recolouring the portal cannot recolour the back office.
 */

:root, [data-theme="light"], [data-theme="dark"] {
  --primary: #2563eb;
  --primary-hover: #1e40af;
  --primary-light: rgba(37, 99, 235, .09);
  /* The panel paints a few customer controls with --cyan directly. Left alone
     it puts a turquoise button on an otherwise blue-and-white page. */
  --cyan: #2563eb;
}

/* The customer pages are always light. A customer who once flipped the admin
   theme toggle should not land on a dark invoice page. */
[data-theme="dark"] {
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e5e9f0;
}

/* --------------------------------------------------------- shared shell */

.p-body {
  margin: 0; min-height: 100vh; background: #f6f8fc; color: #475569;
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.p-body * { box-sizing: border-box; }
.p-body h1, .p-body h2, .p-body h3 { color: #0f172a; margin: 0 0 10px; font-weight: 800; line-height: 1.25; }
.p-body h1 { font-size: 27px; letter-spacing: -.02em; }
.p-body h2 { font-size: 17px; }
.p-body a { color: #2563eb; text-decoration: none; }
.p-body a:hover { text-decoration: underline; }
.p-wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

.p-top {
  background: #fff; border-bottom: 1px solid #e5e9f0; padding: 15px 0;
  position: sticky; top: 0; z-index: 20;
}
.p-top .p-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.p-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: #0f172a; }
.p-logo:hover { text-decoration: none; }
.p-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #1e40af, #2563eb); color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
}
.p-logo b { font-weight: 800; }
.p-logo b span { color: #2563eb; }
.p-who { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13.5px; }
.p-who .name { font-weight: 700; color: #0f172a; }

.p-hero { padding: 34px 0 8px; }
.p-hero p { max-width: 62ch; margin: 0; }

.p-card {
  background: #fff; border: 1px solid #e5e9f0; border-radius: 16px; padding: 22px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .06); margin-bottom: 18px;
}
.p-card-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid #e5e9f0;
}
.p-card-head h2 { margin: 0; }
.p-card-head .right { margin-left: auto; }
.p-hint { font-size: 13px; color: #94a3b8; margin: -4px 0 14px; }

/* `.p-body a.p-btn` and not `.p-btn`: the generic `.p-body a { color: #2563eb }`
   above is one class plus one element, which outranks a lone class - a button
   written as a link came out blue-on-blue and all but unreadable. Found by
   looking at the rendered page; the rule itself reads perfectly fine. */
.p-btn, .p-body a.p-btn, .p-body button.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px;
  padding: 11px 22px; border-radius: 10px; color: #fff;
  background: linear-gradient(90deg, #1e40af, #2563eb);
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}
.p-body a.p-btn:hover { text-decoration: none; color: #fff; transform: translateY(-1px); }
.p-btn.ghost, .p-body a.p-btn.ghost, .p-body button.p-btn.ghost {
  background: #fff; color: #0f172a; border: 1px solid #e5e9f0; box-shadow: none;
}
.p-body a.p-btn.ghost:hover { border-color: #2563eb; color: #2563eb; }
.p-btn.sm { padding: 8px 15px; font-size: 13px; border-radius: 9px; }
.p-btn.off, .p-body span.p-btn.off {
  background: #f6f8fc; color: #94a3b8; border: 1px dashed #e5e9f0;
  box-shadow: none; cursor: default;
}
.p-btn.block { width: 100%; }

.p-field { display: block; margin-bottom: 15px; }
.p-field > span {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: #94a3b8; margin-bottom: 6px;
}
.p-body input[type=text], .p-body input[type=password], .p-body input[type=email] {
  width: 100%; padding: 11px 14px; border: 1px solid #e5e9f0; border-radius: 10px;
  font-size: 15px; font-family: inherit; color: #0f172a; background: #fff;
}
.p-body input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }

.p-note { border-left: 3px solid #2563eb; background: #f6f8fc; border-radius: 0 10px 10px 0;
  padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.p-note.bad { border-color: #ef4444; background: rgba(239, 68, 68, .07); color: #b91c1c; }

.p-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 18px; }
.p-tiles > * { min-width: 0; }
.p-tile { background: #fff; border: 1px solid #e5e9f0; border-radius: 14px; padding: 18px 20px; }
.p-tile .v { font-size: 28px; font-weight: 800; color: #0f172a; letter-spacing: -.02em; }
.p-tile .l { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #94a3b8; }

.p-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 15px 0; border-top: 1px solid #e5e9f0;
}
.p-row:first-of-type { border-top: 0; }
.p-row .grow { flex: 1 1 200px; min-width: 0; }
.p-row b { display: block; color: #0f172a; font-size: 15px; }
.p-row .sub { font-size: 12.5px; color: #94a3b8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.p-pill { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.p-pill.on  { background: rgba(16, 185, 129, .13); color: #047857; }
.p-pill.off { background: rgba(239, 68, 68, .11); color: #b91c1c; }

.p-empty { padding: 34px 20px; text-align: center; color: #94a3b8; }
.p-foot { text-align: center; font-size: 13px; color: #94a3b8; padding: 26px 0 34px; }

.p-mid { max-width: 520px; margin: 0 auto; padding: 56px 20px; }

@media (max-width: 620px) {
  .p-who { margin-left: 0; width: 100%; }
  .p-btn.block-sm { width: 100%; }
}

/* ------------------------------------------------------------- error pages */
.p-err { text-align: center; max-width: 620px; }
.p-errcode {
  font-size: 76px; line-height: 1; font-weight: 800; letter-spacing: -2px;
  color: #2563eb; margin-bottom: 8px;
}
.p-mid h1 + .p-errdetail, .p-errdetail {
  color: #64748b; font-size: 13.5px; margin: 0 0 6px; word-break: break-word;
}
.p-errlinks { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
@media (max-width: 560px) { .p-errcode { font-size: 58px; } }

/* An uploaded logo in the portal header. Kept the same height as the drawn
   mark it replaces so the bar does not change height when one is added. */
.p-logo-img { display: block; height: 30px; width: auto; max-width: 170px; object-fit: contain; }

/* ---- customer dashboard: subscription, locations, live devices ---------- */

.p-chip { display:inline-block; font-size:11.5px; font-weight:800; padding:3px 10px;
          border-radius:999px; letter-spacing:.02em; }
.p-chip.blue  { background:rgba(37,99,235,.11); color:#1d4ed8; }
.p-chip.green { background:rgba(16,185,129,.13); color:#047857; }
.p-chip.amber { background:rgba(245,158,11,.16); color:#b45309; }
.p-chip.red   { background:rgba(239,68,68,.11); color:#b91c1c; }
.p-chip.grey  { background:#eef2f7; color:#64748b; }

/* the four facts at the top of a service */
.p-kv { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:2px 22px;
        padding:4px 20px 18px; }
.p-kv > * { min-width:0; }
.p-kv dt { font-size:11px; font-weight:800; letter-spacing:.09em; text-transform:uppercase;
           color:#94a3b8; margin-top:12px; }
.p-kv dd { margin:3px 0 0; font-size:15px; font-weight:700; color:#0f172a; }
.p-kv dd .thin { font-weight:500; color:#64748b; font-size:13px; display:block; margin-top:2px; }

.p-acts { display:flex; flex-wrap:wrap; gap:9px; padding:0 20px 20px; }

/* one location, with its live devices underneath */
.p-loc { border-top:1px solid #eef1f6; padding:16px 20px; }
.p-loc:first-of-type { border-top:0; }
.p-loc-head { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.p-loc-head .grow { flex:1 1 220px; min-width:0; }
.p-loc-head b { display:block; color:#0f172a; font-size:15.5px; }
.p-loc-head .sub { font-size:12.5px; color:#94a3b8;
                   font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.p-flag { width:22px; height:16px; border-radius:3px; object-fit:cover; flex:0 0 auto;
          box-shadow:0 0 0 1px rgba(15,23,42,.08); }

.p-dev { margin-top:12px; border:1px solid #eef1f6; border-radius:11px; overflow:hidden; }
.p-dev-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap;
             padding:11px 14px; border-top:1px solid #eef1f6; font-size:13.5px; }
.p-dev-row:first-child { border-top:0; }
.p-dev-row .who { flex:1 1 170px; min-width:0; font-weight:700; color:#0f172a; }
.p-dev-row .who span { display:block; font-weight:500; color:#94a3b8; font-size:12px;
                       font-family:ui-monospace,SFMono-Regular,Menlo,monospace; }
.p-dev-row .m { flex:0 0 auto; color:#475569; }
.p-dev-row .m i { font-style:normal; color:#94a3b8; font-size:11px; font-weight:800;
                  letter-spacing:.08em; text-transform:uppercase; display:block; }
.p-dev-none { padding:13px 14px; font-size:13.5px; color:#94a3b8; }
.p-live { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:#94a3b8; }
.p-live i { width:7px; height:7px; border-radius:50%; background:#10b981; display:inline-block;
            animation:p-blink 2s ease-in-out infinite; }
@keyframes p-blink { 0%,100%{opacity:1} 50%{opacity:.35} }

.p-split { display:grid; grid-template-columns:1fr 300px; gap:18px; align-items:start; }
.p-split > * { min-width:0; }
@media (max-width:840px){ .p-split { grid-template-columns:1fr; } }
