/* RogsApps cockpit. Tokens from the admin (server/admin_assets/style.css), i.e. site.css light and DESIGN.md §2.3 dark.
   System font, no external resources, sizes in rem. Figures use tabular numerals so columns line up. */
:root { color-scheme: light dark; --paper: #f7f7f2; --card: #fff; --ink: #152c30; --muted: #5f6a66; --line: #dce0d9;
  --mint: #c4edd8; --accent: #23676d; --accent-hover: #185257; --on-accent: #fff; --focus: #3f947c; --field: #fffefa;
  --field-line: #7f897f; --quiet: #edf3f2; --track: #e9eee5; --warn: #7a2e12;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 100%; line-height: 1.55;
  -webkit-font-smoothing: antialiased; color: var(--ink); background: var(--paper); }
@media (prefers-color-scheme: dark) {
  :root { --paper: #07171c; --card: #13191c; --ink: #f4f7ef; --muted: #a5b8b3; --line: #2e3a3d;
    --accent: #8fd9c5; --accent-hover: #a7ddd1; --on-accent: #07171c; --focus: #a7ddd1; --field: #1b2427;
    --field-line: #5d6f6b; --quiet: #1b2427; --track: #24302f; --warn: #e08a63; }
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip { position: fixed; top: .5rem; left: .75rem; transform: translateY(-200%); background: var(--card); color: var(--ink);
  padding: .5rem .75rem; border-radius: 9px; z-index: 10; }
.skip:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Top bar: brand, the product switch (applies to every area), session */
.topbar { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between;
  padding: .75rem 1.5rem; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 600; letter-spacing: -.01em; }
.brand > span:not(.logo) { color: var(--muted); font-weight: 500; }
.logo { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 8px; background: var(--ink);
  color: var(--paper); font-size: .875rem; font-weight: 700; }
.session { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .875rem; }
.products { display: flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: 999px; background: var(--quiet); }
.products button, .segmented button { margin: 0; min-height: 2.25rem; border: 0; background: transparent; color: var(--muted); }
.products button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.segmented { display: inline-flex; gap: .25rem; padding: .25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.segmented button[aria-pressed="true"] { background: var(--mint); color: #152c30; }

main { max-width: 76rem; margin: 1.5rem auto 4rem; padding: 0 1.25rem; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.page-title { font-size: 2rem; letter-spacing: -.035em; margin: 0; }
h2 { font-size: 1.125rem; margin: 0 0 .5rem; }
h3 { font-size: .9375rem; margin: 1.5rem 0 .5rem; color: var(--muted); font-weight: 500; }
p { margin: .5rem 0; }
a { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.25rem 1.5rem; margin: 0 0 1rem; }
.hint, .sub { color: var(--muted); font-size: .875rem; }
.sub { display: block; font-size: .8125rem; }
.empty { color: var(--muted); padding: 2rem 0; text-align: center; }
.status:empty, [role="status"]:empty { display: none; }
.status { padding: .5rem .75rem; border-radius: 9px; background: var(--quiet); }
.panel-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin: 0 0 1rem; }

/* Login */
.login-card { max-width: 28rem; margin: 10vh auto 0; padding: 2rem; }
.login-card h1 { font-size: 2rem; margin: 0 0 .25rem; letter-spacing: -.035em; }
.lede { color: var(--muted); margin: 0 0 1.25rem; }
.login-card .primary { box-sizing: border-box; }
.login-card .primary { width: 100%; justify-content: center; margin-top: .5rem; }

/* Forms and buttons */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1.25rem; }
label { display: inline-flex; flex-direction: column; gap: .25rem; margin: .25rem 1rem .5rem 0; font-size: .8125rem; font-weight: 500; }
label.wide { display: flex; margin-right: 0; }
label.inline { flex-direction: row; align-items: center; gap: .5rem; margin: 0; }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-size: .9375rem; margin-top: .5rem; }
label.check input { width: 1.25rem; height: 1.25rem; min-height: 0; accent-color: var(--accent); }
input, select, textarea { font: inherit; font-size: 1rem; color: var(--ink); background: var(--field); border: 1px solid var(--field-line);
  border-radius: 9px; padding: .5rem .75rem; min-height: 2.75rem; }
textarea { resize: vertical; line-height: 1.5; }
button { display: inline-flex; align-items: center; font: inherit; font-size: .875rem; font-weight: 600; min-height: 2.75rem;
  padding: .5rem 1.1rem; margin: .25rem .5rem .25rem 0; border-radius: 999px; border: 1px solid var(--field-line);
  background: var(--card); color: var(--ink); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { cursor: not-allowed; opacity: .55; }
a.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .5rem 1.1rem;
  border-radius: 999px; font-weight: 600; font-size: .875rem; text-decoration: none; }
a.button.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.primary:hover:not(:disabled) { background: var(--accent-hover); }
button.quiet { border-color: transparent; background: transparent; color: var(--accent); padding: .5rem .75rem; }
button.link { border: 0; background: none; padding: 0; min-height: 0; margin: 0; color: var(--accent); text-decoration: underline;
  font-variant-numeric: tabular-nums; }
.actions { display: flex; flex-wrap: wrap; align-items: center; }

/* Tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin: 0 0 1.5rem; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; margin: 0; background: none; color: var(--muted); }
.tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Overview */
.overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.side .card { margin-bottom: 1rem; }
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin: .75rem 0; }
.figures.three { grid-template-columns: repeat(3, 1fr); }
.figures dt { color: var(--muted); font-size: .8125rem; }
.figures dd { margin: 0; font-size: 2rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.days { display: flex; align-items: flex-end; gap: 3px; height: 4rem; margin: .5rem 0 0; }
.days:empty { display: none; }
.days span { flex: 1; height: var(--h, 0); min-height: 2px; background: var(--mint); border-radius: 3px 3px 0 0; }
/* The funnel is a real sequence: each step is a bar against the visits on top, with the rate from the step before. */
.funnel { list-style: none; margin: 0; padding: 0; }
.funnel li { display: grid; grid-template-columns: 9rem 1fr 4.5rem 4rem; gap: .75rem; align-items: center; padding: .4rem 0;
  border-top: 1px solid var(--line); font-size: .9375rem; }
.funnel .bar { height: .75rem; width: var(--w, 0); background: var(--accent); border-radius: 999px; }
.funnel .value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.funnel .rate { text-align: right; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.top-ideas { list-style: none; margin: .5rem 0 0; padding: 0; }
.top-ideas li { display: flex; gap: .75rem; align-items: baseline; padding: .35rem 0; border-top: 1px solid var(--line); }
.top-ideas .votes { min-width: 2.5rem; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.progress { height: .75rem; background: var(--track); border-radius: 999px; overflow: hidden; margin: .5rem 0; }
.progress span { display: block; height: 100%; width: var(--w, 0); background: var(--accent); }

/* Support */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1rem; align-items: start; }
.list-card { padding: .5rem 0; overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.list th { text-align: left; font-size: .8125rem; font-weight: 500; color: var(--muted); padding: .5rem 1rem; }
.list td { padding: .6rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
.list tr[aria-current="true"] td { background: var(--quiet); }
.pill { white-space: nowrap; font-size: .8125rem; font-weight: 600; }
.pill.new { color: var(--warn); }
.pill.done { color: var(--muted); }
.case { position: sticky; top: 5rem; }
.case h2 { font-size: 1.375rem; margin: .25rem 0; }
.from { margin: 0 0 1rem; color: var(--muted); }
.message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; background: var(--quiet); border-radius: 12px; max-height: 24rem; overflow-y: auto; }
details { margin: .75rem 0 1rem; }
summary { cursor: pointer; color: var(--accent); font-size: .875rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8125rem; max-height: 18rem; overflow-y: auto; }

/* Ideas */
.ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ideas li { display: grid; grid-template-columns: 4.5rem 1fr; column-gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.ideas .votes { grid-row: span 3; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card); height: 4rem; font-size: .75rem; color: var(--muted); }
.ideas .votes strong { font-size: 1.5rem; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.1; }
.ideas h2 { font-size: 1.0625rem; margin: 0; }
.excerpt { margin: .25rem 0; max-width: 70ch; }

/* Roadmap */
.roadmap { list-style: none; margin: 0; padding: 0; }
.rm { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; padding: 1rem 0 1rem 1rem;
  border-top: 1px solid var(--line); border-left: 4px solid var(--line); }
.rm.in_progress { border-left-color: var(--accent); }
.rm.done { border-left-color: var(--mint); }
.rm.dropped .rm-text { opacity: .6; }
.rm h2 { font-size: 1.0625rem; margin: 0; }
.rm-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; }

/* Licenses */
.admin-note { border-left: 4px solid var(--accent); }
.steps { margin: .5rem 0; padding-left: 1.25rem; }
.steps li { margin: .25rem 0; }
code { font-size: .875rem; background: var(--quiet); padding: .1rem .35rem; border-radius: 6px; }
#licenses-products .list { margin-top: .75rem; }
.pill.locked, .pill.revoked { color: var(--warn); }

@media (max-width: 56rem) {
  .overview, .split { grid-template-columns: 1fr; }
  .case { position: static; }
  .funnel li { grid-template-columns: 7rem 1fr 4rem; }
  .funnel .rate { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
