/**
 * File:          /opt/cli-console/pages/assets/cp.css
 * Version:       0.1.1
 * Last Modified: 2026-10-30 05:05 PM ET
 * Changes:       [hidden] always hides (a hidden .cp-card showed because the card's display won).
 * Changes:       New. The CodePapi look for CodePapi Pages (served at /_cp/cp.css on the pages origin):
 *                the app's redesign tokens (accent #F5C542, near-black dark surfaces, Inter, thin type),
 *                light and dark, plain-element defaults and ready components (.cp-card, .cp-btn, .cp-radio-card,
 *                .cp-switch, .cp-input, .cp-textarea, .cp-table, .cp-badge, .cp-bar, .cp-status).
 */
@font-face { font-family: "CPInter"; src: url("/_cp/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --cp-bg: #fbfaf7; --cp-surface: #ffffff; --cp-surface-2: #f2f1ed; --cp-line: #e4e3de; --cp-line-2: #d6d5cf;
  --cp-text: #1b1b19; --cp-text-2: #33332f; --cp-muted: #6b6a64; --cp-dim: #8c8b85;
  --cp-accent: #F5C542; --cp-accent-ink: #1a1606; --cp-accent-text: #8a6a00; --cp-accent-soft: #fff4cc;
  --cp-ok: #1f9d4a; --cp-warn: #a87d00; --cp-error: #d93a2b; --cp-info: #1f6fe0;
  --cp-radius: 18px; --cp-radius-sm: 12px; --cp-shadow: 0 1px 2px rgba(0,0,0,.04);
  --cp-font: "CPInter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --cp-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cp-bg: #0a0a0a; --cp-surface: #1b1b1b; --cp-surface-2: #232323; --cp-line: #2a2a2a; --cp-line-2: #363636;
    --cp-text: #f2f1ec; --cp-text-2: #d9d8d2; --cp-muted: #9b9a94; --cp-dim: #6e6d68;
    --cp-accent-text: #F5C542; --cp-accent-soft: #2a2410;
    --cp-ok: #46d26f; --cp-warn: #f2c94c; --cp-error: #ff6a5c; --cp-info: #4da3ff; --cp-shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --cp-bg: #0a0a0a; --cp-surface: #1b1b1b; --cp-surface-2: #232323; --cp-line: #2a2a2a; --cp-line-2: #363636;
  --cp-text: #f2f1ec; --cp-text-2: #d9d8d2; --cp-muted: #9b9a94; --cp-dim: #6e6d68;
  --cp-accent-text: #F5C542; --cp-accent-soft: #2a2410;
  --cp-ok: #46d26f; --cp-warn: #f2c94c; --cp-error: #ff6a5c; --cp-info: #4da3ff; --cp-shadow: none;
  color-scheme: dark;
}

/* Plain elements look right with no classes. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cp-bg); color: var(--cp-text); font: 300 16px/1.55 var(--cp-font);
  padding: 24px max(16px, env(safe-area-inset-right, 0px)) 96px max(16px, env(safe-area-inset-left, 0px)); }
body > main, body > .cp-page { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.25; margin: 0 0 .4em; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin: 0 0 .8em; }
small, .cp-muted { color: var(--cp-muted); }
a { color: var(--cp-accent-text); text-underline-offset: 3px; }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--cp-line); margin: 16px 0; }
code, kbd, pre { font-family: var(--cp-mono); font-size: .9em; }
code { background: var(--cp-surface-2); border-radius: 6px; padding: .1em .35em; }
pre { background: var(--cp-surface-2); border: 1px solid var(--cp-line); border-radius: var(--cp-radius-sm); padding: 12px; overflow-x: auto; }
pre code { background: none; padding: 0; }
img, svg, video { max-width: 100%; height: auto; }
fieldset { border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 14px 16px; margin: 0; }
legend { font-weight: 500; padding: 0 6px; }
label { font-weight: 400; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 2px; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--cp-accent); width: 18px; height: 18px; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--cp-line); vertical-align: top; }
th { font-weight: 500; color: var(--cp-muted); font-size: 13px; }

/* Card */
.cp-card, section.card { background: var(--cp-surface); border: 1px solid var(--cp-line); border-radius: var(--cp-radius); padding: 18px; box-shadow: var(--cp-shadow);
  display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cp-card > :last-child { margin-bottom: 0; }

/* Buttons */
.cp-btn, button:not([class]), input[type="submit"], input[type="button"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 18px;
  border: 1px solid var(--cp-line-2); border-radius: 999px; background: var(--cp-surface); color: var(--cp-text);
  font-weight: 500; white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.cp-btn:hover, button:not([class]):hover { background: var(--cp-surface-2); }
.cp-btn.primary, button.primary { background: var(--cp-accent); border-color: var(--cp-accent); color: var(--cp-accent-ink); }
.cp-btn.primary:hover, button.primary:hover { filter: brightness(1.05); background: var(--cp-accent); }
.cp-btn.danger { color: var(--cp-error); }
.cp-btn:disabled, button:disabled { opacity: .5; cursor: default; }

/* Inputs */
.cp-input, .cp-textarea, input[type="text"], input[type="email"], input[type="number"], input[type="search"], input[type="url"],
input[type="date"], input[type="time"], input:not([type]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--cp-line-2); border-radius: var(--cp-radius-sm);
  background: var(--cp-bg); color: var(--cp-text); font-weight: 300; }
.cp-textarea, textarea { min-height: 88px; resize: vertical; line-height: 1.5; }

/* Radio / checkbox card: <label class="cp-radio-card"><input type="radio" name="q1"><span>Text</span></label> */
.cp-radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--cp-line); border-radius: 14px;
  background: var(--cp-surface); cursor: pointer; }
.cp-radio-card input { margin-top: 3px; flex-shrink: 0; }
.cp-radio-card > span { min-width: 0; }
.cp-radio-card small { display: block; }
.cp-radio-card:has(input:checked) { border-color: var(--cp-accent); background: var(--cp-accent-soft); }

/* Switch: <label class="cp-switch"><input type="checkbox"><span>Label</span></label> */
.cp-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.cp-switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 999px; margin: 0; flex-shrink: 0;
  background: var(--cp-line-2); position: relative; transition: background .15s; }
.cp-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; }
.cp-switch input:checked { background: var(--cp-accent); }
.cp-switch input:checked::after { transform: translateX(18px); }

/* Table wrapper keeps wide tables scrolling inside the card. */
.cp-table { width: 100%; overflow-x: auto; border: 1px solid var(--cp-line); border-radius: var(--cp-radius-sm); }
.cp-table table th, .cp-table table td { white-space: nowrap; }
table.cp-table { display: table; border: 0; }

/* Badge and status */
.cp-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--cp-surface-2); color: var(--cp-text-2); border: 1px solid var(--cp-line); white-space: nowrap; }
.cp-badge.accent { background: var(--cp-accent-soft); color: var(--cp-accent-text); border-color: transparent; }
.cp-badge.ok { color: var(--cp-ok); } .cp-badge.warn { color: var(--cp-warn); } .cp-badge.error { color: var(--cp-error); }
.cp-status { color: var(--cp-muted); font-size: 14px; }
.cp-status.ok { color: var(--cp-ok); font-weight: 500; }
.cp-status.warn { color: var(--cp-warn); font-weight: 500; }
.cp-status.error { color: var(--cp-error); font-weight: 500; }

/* Sticky save bar: <div class="cp-bar"><span class="cp-status"></span><button class="cp-btn primary">Save</button></div> */
.cp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  background: var(--cp-surface); border-top: 1px solid var(--cp-line);
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.cp-bar > .cp-status { flex: 1; min-width: 0; }

/* Small layout helpers */
.cp-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cp-stack { display: flex; flex-direction: column; gap: 8px; }
.cp-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
/* === END OF FILE (FILENAME: /opt/cli-console/pages/assets/cp.css) === */
