/* PlaceReach portal. Colors and layout follow the supplied dark portal screenshots. */
:root {
  --bg: #171a22; --bg-top: #12141a; --rail: #1b1e27; --line: #2a2f3c;
  --card: #222634; --card-2: #272c3b; --card-line: #303647;
  --text: #e8eaf0; --text-2: #b4bac8; --muted: #828aa0;
  --mint: #b8ecd7; --mint-ink: #10281f; --mint-hover: #a3e3c9;
  --slate: #2b3a52; --slate-line: #3c4b67; --slate-hover: #34455f; --slate-ink: #e1e8f3;
  --input: #1c202b; --input-line: #363c4d; --focus: #8f80f2;
  --lav: #b6a5f3; --cyan: #7dd3e9; --green: #7fdfbf; --blue: #8fc2ea;
  --warn-bg: #463729; --warn-line: #5d4733; --warn-ink: #f0c58b;
  --danger-bg: #43272c; --danger-line: #633740; --danger-ink: #f3a9ae;
  --ok-ink: #8fe3c2; --radius: 12px; --radius-sm: 7px;
  --font: "Manrope", "Plus Jakarta Sans", "DM Sans", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--mint); color: var(--mint-ink); padding: 8px 12px; border-radius: 7px; font-weight: 700; }
.skip:focus { left: 12px; }
.progress { height: 8px; border-radius: 999px; background: #1c202b; overflow: hidden; margin-top: 10px; }
.progress > div { height: 100%; background: var(--green); width: 0; transition: width .15s; }
.pager { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--card-line); border-radius: 10px; font-size: 13px; color: var(--text-2); }
.pager select { width: auto; padding: 6px 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* frame */
.shell { display: grid; grid-template-columns: 76px 1fr; grid-template-rows: 28px 1fr; height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 22px; background: var(--bg-top); border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.brand { letter-spacing: .14em; font-weight: 700; color: var(--text-2); }
.topbar .spacer { flex: 1; }
.topbar button { background: none; border: 0; color: var(--muted); font-size: 11px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.rail { background: var(--rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 18px 0 14px; gap: 6px; overflow-y: auto; }
.rail .logo { width: 48px; height: 46px; border-radius: 10px; background: #f2f3f5 center/cover no-repeat url(/logo-mark.png); margin-bottom: 18px; display: block; }
.rail a.nav { width: 48px; height: 46px; display: grid; place-items: center; border-radius: 9px; color: var(--text-2); border: 1px solid transparent; text-decoration: none; position: relative; }
.rail a.nav:hover { background: #222634; color: var(--text); }
.rail a.nav.active { background: #272c3d; border-color: #6c60c4; color: var(--text); }
.rail a.nav .tip { position: absolute; left: 58px; white-space: nowrap; background: #0f1116; border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 5; }
.rail a.nav:hover .tip, .rail a.nav:focus-visible .tip { opacity: 1; }
.rail .grow { flex: 1; }
.rail hr { width: 48px; border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #3a3f53; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text-2); border: 0; cursor: pointer; }
.main { overflow-y: auto; display: flex; flex-direction: column; }
.content { padding: 18px 26px 36px; flex: 1; width: 100%; max-width: 1280px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs strong { color: var(--text); font-weight: 700; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.sections-btn { display: flex; align-items: center; gap: 12px; min-width: 200px; padding: 8px 10px 8px 14px; background: var(--slate); border: 1px solid var(--slate-line); border-radius: 8px; color: var(--slate-ink); cursor: pointer; font-size: 13px; }
.sections-btn span.lbl { flex: 1; text-align: left; }
kbd { font: 10px var(--font); background: #3a465d; color: var(--text-2); border-radius: 5px; padding: 2px 6px; }
.eyebrow { margin: 34px 0 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
h1 { font-size: 34px; line-height: 1.15; margin: 0 0 22px; font-weight: 800; letter-spacing: -.01em; }
.eyebrow + h1 { margin-top: 0; }
.no-eyebrow { margin-top: 36px; }
h2 { font-size: 19px; margin: 0; font-weight: 700; }
h3 { font-size: 15px; margin: 0 0 10px; font-weight: 700; }
.footer { display: flex; justify-content: space-between; padding: 12px 26px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.footer .brand { font-weight: 600; letter-spacing: .08em; color: var(--muted); }

/* cards & layout */
.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 22px; }
.card + .card, .stack > * + * { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid > *, .split > *, .row > * { margin-top: 0 !important; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.inset { background: var(--card-2); border: 1px solid var(--card-line); border-radius: 10px; padding: 16px 18px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--slate-line); background: var(--slate); color: var(--slate-ink); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--slate-hover); }
.btn.primary { background: var(--mint); border-color: var(--mint); color: var(--mint-ink); }
.btn.primary:hover { background: var(--mint-hover); }
.btn.danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.lg { padding: 13px 18px; font-size: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; background: #2f3a4f; border: 1px solid var(--slate-line); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }

/* forms */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; background: var(--input); border: 1px solid var(--input-line); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--text); }
textarea { min-height: 80px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #6f7689; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px rgba(143, 128, 242, .18); }
.search { position: relative; max-width: 380px; flex: 1; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 36px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--input-line); border-radius: 7px; background: var(--input); cursor: pointer; font-size: 13px; }
.days input { accent-color: var(--green); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* tables & lists */
.table-wrap { overflow-x: auto; border-top: 1px solid var(--card-line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--text-2); padding: 12px; background: #20242f; white-space: nowrap; }
td { padding: 12px; border-top: 1px solid var(--card-line); vertical-align: middle; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: #262b39; }
dl.facts { display: grid; grid-template-columns: 170px 1fr; gap: 10px 20px; margin: 0; }
dl.facts dt { color: var(--text-2); } dl.facts dd { margin: 0; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain > li + li { margin-top: 8px; }
ul.dots { margin: 12px 0 0; padding-left: 18px; } ul.dots li + li { margin-top: 6px; }

/* status */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #2c3242; color: var(--text-2); white-space: nowrap; }
.tag.ok { background: #1f3a33; color: var(--ok-ink); }
.tag.warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag.danger { background: var(--danger-bg); color: var(--danger-ink); }
.tag.info { background: #2a2c4a; color: #c3b8ff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.banner { border-radius: 10px; padding: 14px 18px; font-weight: 600; font-size: 13px; border: 1px solid; }
.banner.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.banner.danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger-ink); }
.banner.ok { background: #1d332e; border-color: #2c5248; color: var(--ok-ink); }
.banner.info { background: #25283f; border-color: #3a3d63; color: #cfc7ff; }
.empty { padding: 28px; text-align: center; color: var(--text-2); }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--card-line); }
.checklist li:first-child { border-top: 0; }
.checklist .mark { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.checklist .mark.ok { background: #1f3a33; color: var(--ok-ink); }
.checklist .mark.no { background: var(--danger-bg); color: var(--danger-ink); }

/* overview & dashboard */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { display: flex; gap: 16px; align-items: flex-start; text-decoration: none; }
.tile:hover { border-color: #3d4560; }
.tile .ic { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; color: #15202a; flex: none; }
.tile h2 { margin: 6px 0 12px; font-size: 20px; }
.tile .sub { color: var(--text-2); font-size: 12px; }
.tile h2 a { color: inherit; text-decoration: none; }
.tile .sub a { color: var(--text-2); text-decoration: none; padding: 4px 0; }
.tile h2 a:hover, .tile .sub a:hover, .tile .sub a:focus-visible { color: var(--text); text-decoration: underline; }
.ic.cyan { background: var(--cyan); } .ic.green { background: var(--green); } .ic.lav { background: var(--lav); } .ic.blue { background: var(--blue); }
.status-list > li { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--card-line); }
.status-list > li:first-child { border-top: 0; padding-top: 6px; }
.num { width: 28px; height: 28px; border-radius: 50%; background: #393552; color: #cfc6f7; font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: none; }
.stat .label { display: flex; justify-content: space-between; color: var(--text-2); font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 800; margin: 14px 0 6px; }
.donut { width: 176px; height: 176px; margin: 18px auto; display: block; }
.legend li { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 0; }
.legend li span:first-child { display: flex; gap: 10px; align-items: center; }

/* overlays */
.overlay { position: fixed; inset: 0; background: rgba(6, 8, 12, .62); display: grid; place-items: start center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { width: 100%; max-width: 640px; background: var(--card); border: 1px solid var(--card-line); border-radius: 14px; padding: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.palette { max-width: 520px; padding: 10px; }
.palette input { border: 0; background: transparent; font-size: 16px; padding: 12px; box-shadow: none !important; }
.palette ul { list-style: none; margin: 4px 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.palette li a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text-2); }
.palette li a.sel, .palette li a:hover { background: #2b3142; color: var(--text); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 60; max-width: 420px; }
.toast .banner { box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
video.preview { width: 100%; border-radius: 10px; background: #000; max-height: 60vh; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: 100%; max-width: 420px; padding: 30px; }
.login .plate { background: #f2f3f5; border-radius: 12px; padding: 14px 18px; margin-bottom: 24px; display: flex; justify-content: center; }
.login .plate img { max-width: 100%; height: 64px; object-fit: contain; }

/* help */
.help-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.help-steps > li { counter-increment: s; display: flex; gap: 12px; padding: 10px 0; }
.help-steps > li::before { content: counter(s, decimal-leading-zero); width: 28px; height: 28px; border-radius: 50%; background: #393552; color: #cfc6f7; font-size: 10px; font-weight: 700; display: grid; place-items: center; flex: none; }
.callout { border-left: 3px solid var(--green); padding: 4px 0 4px 14px; color: var(--text-2); margin: 14px 0; }

@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 28px auto 1fr; }
  .rail { flex-direction: row; padding: 8px 10px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .logo { margin: 0 8px 0 0; width: 40px; height: 38px; flex: none; }
  .rail { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .topbar { padding: 0 16px; gap: 10px; }
  .topbar .env { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .rail .grow, .rail hr { display: none; }
  .rail a.nav { width: 42px; height: 40px; flex: none; }
  .rail a.nav .tip { display: none; }
  .content { padding: 14px 16px 28px; }
  .g2, .g3, .g4, .quick { grid-template-columns: 1fr; }
  dl.facts { grid-template-columns: 1fr; gap: 2px 0; } dl.facts dd { margin-bottom: 10px; }
  .sections-btn { min-width: 0; } .sections-btn kbd, .sections-btn .lbl { display: none; }
  h1 { font-size: 28px; }
  .head { flex-wrap: wrap; }
}
