
@font-face {
  font-family: "Google Sans Flex";
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/google-sans-flex-latin.woff2") format("woff2");
}
:root {
  --white: #ffffff;
  --ink: #0d1b19;
  --muted: rgba(13,27,25,.66);
  --line: rgba(13,27,25,.12);
  --green-500: #246f65;
  --green-900: #054038;
  --mint-50: #eff4f2;
  --mint-100: #e5f1ed;
  --red-50: #fdf2f2;
  --red-100: #f5d6d8;
  --red-600: #b42330;
  --red-700: #941b26;
  --amber-50: #fff8e6;
  --amber-700: #7a4b00;
  --card: 20px;
  --font: "Google Sans Flex", ui-sans-serif, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--mint-50); font-size: 15px; line-height: 1.4; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red-600); outline-offset: 2px; }

.sample {
  position: sticky; top: 0; z-index: 20;
  background: repeating-linear-gradient(135deg, var(--amber-50) 0 14px, #fff1c9 14px 28px);
  color: var(--amber-700); border-bottom: 1px solid #ecd28a;
  font-weight: 500; text-align: center; padding: 8px 16px; font-size: 14px;
}

.shell { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 37px); }

.side { background: var(--green-900); color: var(--white); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand img { width: 40px; height: 40px; border-radius: 10px; background: var(--white); padding: 3px; }
.brand b { display: block; font-weight: 500; font-size: 15px; line-height: 1.15; }
.brand span { font-size: 12px; opacity: .75; }
.nav a { display: flex; justify-content: space-between; align-items: center; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-size: 15px; opacity: .88; }
.nav a:hover { background: rgba(255,255,255,.08); opacity: 1; }
.nav a[aria-current="page"] { background: var(--white); color: var(--green-900); font-weight: 500; opacity: 1; }
.nav .lock { font-size: 11px; background: rgba(255,255,255,.14); padding: 2px 8px; border-radius: 99px; }
.nav hr { border: 0; border-top: 1px solid rgba(255,255,255,.16); margin: 10px 4px; }
.side small { margin-top: auto; font-size: 12px; opacity: .7; padding: 8px; }

.main { padding: 24px 28px 40px; min-width: 0; }
.top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.top h1 { font-weight: 400; font-size: 28px; margin: 0; letter-spacing: -.01em; }
.top p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.period { display: flex; background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 3px; }
.period button { white-space: nowrap; border: 0; background: none; padding: 7px 12px; border-radius: 99px; font-size: 13px; cursor: pointer; }
.period button[aria-pressed="true"] { background: var(--green-500); color: var(--white); }
.user { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 4px; font-size: 13px; }
.user i { width: 28px; height: 28px; border-radius: 50%; background: var(--red-600); color: var(--white); display: grid; place-items: center; font-style: normal; font-weight: 500; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: var(--white); border-radius: var(--card); padding: 18px 18px 16px; border: 1px solid var(--line); position: relative; min-width: 0; }
.card h2 { font-size: 14px; font-weight: 400; color: var(--muted); margin: 0 0 8px; display: flex; gap: 6px; align-items: center; }
.big { font-size: 34px; font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }
.delta { font-size: 13px; margin-top: 6px; color: var(--muted); }
.delta b { font-weight: 500; color: var(--green-500); }
.tag { display: inline-block; font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 99px; background: var(--amber-50); color: var(--amber-700); border: 1px solid #ecd28a; margin-left: 4px; vertical-align: middle; }
.tag.ok { background: var(--mint-100); color: var(--green-900); border-color: #bfdcd3; }

details.info { display: inline-block; position: relative; }
details.info summary { list-style: none; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--muted); font-size: 11px; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-weight: 500; }
details.info summary::-webkit-details-marker { display: none; }
details.info[open] summary { background: var(--green-900); color: var(--white); border-color: var(--green-900); }
details.info div { position: absolute; z-index: 5; top: 24px; left: -8px; width: 260px; background: var(--green-900); color: var(--white); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 30px rgba(0,0,0,.18); }

.grid2 { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 16px; margin-bottom: 16px; }
.panel { background: var(--white); border-radius: var(--card); border: 1px solid var(--line); padding: 18px; min-width: 0; }
.panel header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.panel h2 { font-size: 17px; font-weight: 500; margin: 0; display: flex; gap: 6px; align-items: center; }
.note { font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; background: var(--c); }
.legend .dash::before { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); }
svg text { font-family: var(--font); }
.chart { width: 100%; height: auto; display: block; }

details.table { margin-top: 10px; font-size: 13px; }
details.table summary { cursor: pointer; color: var(--green-500); font-weight: 500; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); }
th { font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 6px; background: var(--mint-100); border-radius: 3px; margin-top: 5px; }
.bar i { display: block; height: 100%; background: var(--green-500); border-radius: 3px; }

.devices .row { margin: 12px 0; }
.devices .row div:first-child { display: flex; justify-content: space-between; font-size: 14px; }
.devices .bar { height: 10px; }
.devices .bar i { background: var(--c); }

.health { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; }
.health > div { padding: 6px 16px; border-left: 1px solid var(--line); }
.health > div:first-child { border-left: 0; padding-left: 0; }
.health b { display: block; font-size: 22px; font-weight: 400; margin-top: 4px; }
.health .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green-500); margin-right: 6px; }
.health span { font-size: 13px; color: var(--muted); }

.locked { background: var(--red-50); border: 1px dashed var(--red-100); border-radius: var(--card); padding: 16px 18px; color: var(--red-700); font-size: 14px; margin-bottom: 16px; }
.locked b { font-weight: 500; }

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .health { grid-template-columns: repeat(2, minmax(0,1fr)); row-gap: 14px; }
  .health > div:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; padding: 10px 12px; gap: 6px; align-items: center; }
  .brand { padding: 0 8px 0 0; }
  .brand div, .side small, .nav hr { display: none; }
  .nav { display: flex; gap: 4px; }
  .nav a { white-space: nowrap; padding: 8px 12px; }
  .nav .lock { display: none; }
  .main { padding: 16px 16px 32px; }
  .cards { grid-template-columns: 1fr; }
  .top h1 { font-size: 24px; }
  .controls { width: 100%; }
  .period { width: 100%; overflow-x: auto; }
  .health { grid-template-columns: 1fr; }
  .health > div { border-left: 0; padding-left: 0; }
  details.info div { width: 220px; }
}

/* ---- Help requests (client) and ticket board (admin) ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 99px; padding: 10px 18px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--green-500); color: var(--white); }
.btn.ghost { background: var(--white); border: 1px solid var(--line); }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.form label span { font-weight: 400; color: var(--muted); font-size: 13px; }
.form input, .form select, .form textarea { font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid rgba(13,27,25,.28); border-radius: 10px; background: var(--white); width: 100%; }
.form textarea { min-height: 120px; resize: vertical; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.warn { background: var(--red-50); border: 1px solid var(--red-100); color: var(--red-700); border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.drop { border: 1.5px dashed rgba(13,27,25,.28); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); font-size: 13px; }
.status { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.s-new { background: #e8eefc; color: #1f3f8f; }
.s-triaged { background: var(--amber-50); color: var(--amber-700); }
.s-progress { background: var(--mint-100); color: var(--green-900); }
.s-waiting { background: var(--red-50); color: var(--red-700); }
.s-done { background: #eceeed; color: #3b4744; }
.prio { font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.prio::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.p-urgent { --c: #b42330; } .p-high { --c: #d9772b; } .p-normal { --c: #246f65; } .p-low { --c: #9aa5a2; }
.mono { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }

.board-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.board-tools input, .board-tools select { font: inherit; font-size: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); }
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 16px; padding: 10px; min-height: 300px; }
.col.over { outline: 2px dashed var(--green-500); }
.col h2 { font-size: 13px; font-weight: 500; margin: 4px 6px 10px; display: flex; justify-content: space-between; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.col h2 b { background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; font-weight: 500; color: var(--ink); }
.tcard { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.tcard:active { cursor: grabbing; }
.tcard.dragging { opacity: .5; }
.tcard .row1 { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.tcard h3 { font-size: 14px; font-weight: 500; margin: 0 0 10px; line-height: 1.3; }
.tcard .row2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.cat { font-size: 11px; background: var(--mint-50); border-radius: 6px; padding: 2px 7px; color: var(--green-900); }
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 500; color: var(--white); background: var(--green-900); }
.av.none { background: #cfd6d4; color: var(--ink); }
.overdue { color: var(--red-700); font-weight: 500; }

.detail { display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 16px; }
.thread { display: grid; gap: 12px; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.msg.internal { background: var(--amber-50); border-color: #ecd28a; }
.msg header { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.meta dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 13px; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.hist { font-size: 12px; color: var(--muted); padding-left: 16px; margin: 8px 0 0; }

@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .form .two { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, 82vw); scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
}

/* ---- Live app additions ---- */
.staging { position: sticky; top: 0; z-index: 20; background: #c2570c; color: #fff; text-align: center; font-weight: 500; font-size: 13px; padding: 6px 16px; letter-spacing: .04em; }
.shell { min-height: calc(100vh - 31px); }
.signout { margin-top: auto; padding: 0 8px; }
.signout button { background: rgba(255,255,255,.12); border: 0; color: var(--white); border-radius: 99px; padding: 8px 14px; cursor: pointer; font-size: 13px; }
.signout button:hover { background: rgba(255,255,255,.22); }
.side small { margin-top: 0; }
.plain-main { max-width: 520px; margin: 0 auto; padding: 40px 16px; }
.plain-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.plain-brand img { border-radius: 12px; background: var(--white); padding: 4px; border: 1px solid var(--line); }
.plain-brand b { display: block; font-weight: 500; font-size: 17px; }
.plain-brand span { color: var(--muted); font-size: 13px; }
.panel.narrow h1 { font-size: 24px; font-weight: 400; margin: 0 0 12px; }
.panel { margin-bottom: 16px; }
.flash, .error, .ok-box, .warn { border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 14px; }
.flash-ok, .ok-box { background: var(--mint-100); color: var(--green-900); border: 1px solid #bfdcd3; }
.flash-warn, .error { background: var(--red-50); color: var(--red-700); border: 1px solid var(--red-100); }
.warn { margin: 0; }
.linkbox { word-break: break-all; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.checks { list-style: none; padding: 0; margin: 0 0 16px; font-size: 14px; }
.checks li { padding: 4px 0; }
.checks .pass { color: var(--green-500); }
.checks .fail { color: var(--red-700); font-weight: 500; }
.steps { display: flex; gap: 8px; padding: 0; list-style: none; font-size: 13px; color: var(--muted); margin: 0 0 16px; flex-wrap: wrap; }
.steps li { background: var(--mint-50); padding: 4px 10px; border-radius: 99px; }
.steps li[aria-current] { background: var(--green-500); color: var(--white); }
.qr { width: 220px; max-width: 100%; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin: 4px 0 8px; }
.qr svg { display: block; width: 100%; height: auto; }
code.secret { display: inline-block; margin-top: 6px; font-size: 15px; letter-spacing: .08em; background: var(--mint-50); padding: 6px 10px; border-radius: 8px; word-break: break-all; }
.form input.code { font-size: 24px; letter-spacing: .3em; max-width: 220px; font-variant-numeric: tabular-nums; }
.form textarea.short { min-height: 90px; }
.form.compact { margin-top: 16px; gap: 10px; }
.form.compact select { padding: 8px 10px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn:hover { filter: brightness(.95); }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 2px 0; }
form.inline select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; }
td.actions { white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.nowrap { white-space: nowrap; }
.big.muted { font-size: 22px; color: var(--muted); padding: 6px 0; }
.event { font-size: 12px; color: var(--muted); margin: 0; padding-left: 12px; border-left: 2px solid var(--line); }
.msg .body { white-space: normal; overflow-wrap: anywhere; }
.att { margin: 8px 0 0; font-size: 13px; }
.crumb { margin: 0 0 10px; font-size: 14px; }
.crumb a, td a, .tcard h3 a, .delta a { color: var(--green-500); text-decoration: none; }
.crumb a:hover, td a:hover, .tcard h3 a:hover { text-decoration: underline; }
.tcard h3 a { color: var(--ink); }
.t-title { font-size: 19px; font-weight: 500; margin: 0; }
.board-msg { margin: 0 0 12px; }
.s-invited { background: var(--amber-50); color: var(--amber-700); }
.s-active { background: var(--mint-100); color: var(--green-900); }
.s-disabled { background: #eceeed; color: #3b4744; }
.roles { margin: 0; font-size: 14px; }
.roles dt { font-weight: 500; margin-top: 8px; }
.roles dd { margin: 2px 0 0; color: var(--muted); }
.overdue { color: var(--red-700); font-weight: 500; }
.nav a { color: var(--white); }
.nav a[aria-current="page"] { color: var(--green-900); }
@media (max-width: 760px) {
  .signout, .side small { display: none; }
  .side { flex-wrap: nowrap; }
}
.s-in_progress { background: var(--mint-100); color: var(--green-900); }
.form > button, .form > div > .btn { justify-self: start; }

/* ---- Phase 2: analytics and website health ---- */
.period a { white-space: nowrap; padding: 7px 12px; border-radius: 99px; font-size: 13px; text-decoration: none; }
.period a[aria-current="true"] { background: var(--green-500); color: var(--white); }
.cards.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.note-box { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 0 0 14px; }
.note-box a { color: var(--green-500); word-break: break-all; }
.empty { color: var(--muted); font-size: 14px; margin: 6px 0; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
h3.sub { font-size: 14px; font-weight: 500; margin: 18px 0 6px; }
.status.s-up { background: var(--mint-100); color: var(--green-900); }
.status.s-down { background: var(--red-50); color: var(--red-700); }
.legend .k-views { --c: var(--green-500); }
.legend .k-visitors { --c: var(--red-600); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart polyline { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.chart .l-views { stroke: var(--green-500); fill: none; }
.chart .l-visitors { stroke: var(--red-600); stroke-dasharray: 5 4; fill: none; }
.chart circle.l-views { fill: var(--green-500); stroke: none; }
.chart circle.l-visitors { fill: var(--red-600); stroke: none; }
svg.bar { display: block; width: 100%; height: 6px; margin-top: 5px; background: none; }
svg.bar .track { fill: var(--mint-100); }
svg.bar .fill { fill: var(--green-500); }
.devices svg.bar { height: 10px; }
.devices .d-desktop svg.bar .fill { fill: var(--red-600); }
.devices .d-tablet svg.bar .fill { fill: var(--green-900); }
.health .dot.down { background: var(--red-600); }
.health .dot.none { background: var(--line); }
.health b a { text-decoration: none; color: var(--green-500); }
details.limits { margin-bottom: 16px; }
details.limits summary { cursor: pointer; }
details.limits ol { margin: 10px 0 4px; padding-left: 20px; font-size: 14px; line-height: 1.5; }
@media (max-width: 1100px) { .cards.three { grid-template-columns: 1fr; } }
.chart { max-height: 300px; }
.main > .warn { margin: 0 0 14px; }

/* Inquiries (phase 4) */
.s-contacted { background: var(--amber-50); color: var(--amber-700); }
.s-consultation { background: var(--mint-100); color: var(--green-900); }
.s-client { background: var(--green-500); color: var(--white); }
.s-closed { background: #eceeed; color: #3b4744; }
.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; }
.inline-search { display: flex; gap: 8px; align-items: center; }
.inline-search input { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid rgba(13,27,25,.28); border-radius: 10px; width: 220px; max-width: 100%; }
.sub-h { font-size: 15px; font-weight: 500; margin: 18px 0 8px; }
.sub-h:first-child { margin-top: 0; }
dl.contact { margin: 0 0 8px; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 16px; }
dl.contact dt { color: var(--muted); font-size: 14px; }
dl.contact dd { margin: 0; word-break: break-word; }
dl.contact a { color: var(--green-500); }
.inq-message { white-space: pre-wrap; word-break: break-word; font-size: 15px; line-height: 1.5; margin: 0 0 8px; padding: 12px 14px; border-radius: 10px; background: var(--mint-50); border: 1px solid var(--line); }
details.danger-zone { margin-top: 18px; font-size: 13px; }
details.danger-zone summary { cursor: pointer; color: var(--red-700); }
.panel > header .inline-search { margin-left: auto; }
@media (max-width: 700px) { .inline-search input { width: 100%; } .panel > header { flex-wrap: wrap; } }
.big a { color: inherit; text-decoration: none; }
