/* Potoo Platform — design system (ported from Potoo Workflows).
   Monochrome neutral scale, single accent Potoo Yellow #ffcc67; semantic color = DATA.
   Montserrat display, Geist body, Geist Mono figures. Radius 6px / 4px. */

@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/fonts/Montserrat.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --canvas: #191919; --surface: #1e1e1f; --surface-2: #262628;
  --border: #3a3a3d; --border-strong: #4a4a4e;
  --text: #ededed; --text-2: #b1b1b4; --text-3: #74747a;
  --accent: #ffcc67; --accent-dim: rgba(255, 204, 103, 0.14); --on-accent: #191919;
  --ok: #4cc38a; --ok-dim: rgba(76, 195, 138, 0.14);
  --red: #e5564d; --red-dim: rgba(229, 86, 77, 0.13);
  --amber: #d9a23d; --amber-dim: rgba(217, 162, 61, 0.13);
  --blue: #6ea8e8; --blue-dim: rgba(110, 168, 232, 0.13);
  --display: "Montserrat", "Geist", -apple-system, "Segoe UI", sans-serif;
  --sans: "Geist", -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r-box: 6px; --r-ctl: 4px; --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { color-scheme: dark; }
body { background: var(--canvas); color: var(--text); font-family: var(--sans); font-size: 13.5px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.015em; }
.muted { color: var(--text-2); }
a { color: var(--text); text-decoration: none; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

.lockup { display: flex; align-items: center; gap: 10px; user-select: none; }
.lockup img { height: 26px; width: auto; display: block; }
.lockup .bar { width: 1px; height: 18px; background: var(--border-strong); }
.lockup span { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.lockup.large { gap: 14px; }
.lockup.large img { height: 44px; }
.lockup.large .bar { height: 30px; }
.lockup.large span { font-size: 19px; color: var(--text); font-weight: 450; }
.lockup.side { padding: 26px 26px 30px; }
.lockup.side img { height: 28px; }
.lockup.side span { color: var(--text); }

.layout { display: flex; min-height: 100dvh; }
.sidebar { width: 236px; flex-shrink: 0; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; height: 100dvh; overflow: hidden; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 10px 26px; color: var(--text-2); font-size: 13.5px; border-left: 1px solid transparent; white-space: nowrap; cursor: pointer; transition: color 0.15s var(--ease), background 0.15s var(--ease); }
.sidebar nav a:hover { color: var(--text); }
.sidebar nav a.active { color: var(--text); border-left-color: var(--accent); background: linear-gradient(90deg, rgba(255, 204, 103, 0.08), transparent 70%); }
.sidebar nav a.disabled { color: var(--text-3); opacity: 0.5; cursor: default; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-label { overflow: hidden; }
.sidebar .spacer { flex: 1; }
.side-foot { display: flex; align-items: center; gap: 10px; padding: 14px 26px 22px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; }
.side-foot .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.layout main { flex: 1; min-width: 0; padding: 56px 44px 100px; }
.page { width: 100%; }
@media (max-width: 1280px) { .layout main { padding: 44px 30px 80px; } }

h1 { font-size: 21px; font-weight: 550; letter-spacing: -0.01em; margin: 0 0 6px; }
h2 { font-size: 12px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; margin: 44px 0 16px; }
.sub { color: var(--text-2); margin: 0 0 32px; font-size: 13.5px; }

table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: var(--r-box); overflow: hidden; font-size: 13px; }
th { text-align: left; padding: 11px 16px; color: var(--text-3); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; border-bottom: 1px solid var(--border); background: var(--surface); }
td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; white-space: nowrap; max-width: 380px; overflow: hidden; text-overflow: ellipsis; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 1.5px 7px; border: 1px solid var(--border-strong); border-radius: var(--r-ctl); font-family: var(--mono); font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); white-space: nowrap; }
.badge.accent { color: var(--accent); border-color: rgba(255, 204, 103, 0.4); background: var(--accent-dim); }
.badge.ok, .badge.active { color: var(--ok); border-color: rgba(76, 195, 138, 0.35); background: var(--ok-dim); }
.badge.paused { color: var(--amber); border-color: rgba(217, 162, 61, 0.35); background: var(--amber-dim); }
.badge.blue { color: var(--blue); border-color: rgba(110, 168, 232, 0.35); background: var(--blue-dim); }

.btn { appearance: none; background: transparent; color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r-ctl); padding: 7px 14px; font: 500 13px var(--sans); cursor: pointer; transition: border-color 0.15s var(--ease), background 0.15s var(--ease), color 0.15s var(--ease); }
.btn:hover { border-color: var(--text-3); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--text); color: var(--canvas); border-color: var(--text); }
.btn.primary:hover { opacity: 0.88; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: default; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-box); padding: 22px 24px; }
label { display: block; color: var(--text-2); font-size: 12.5px; margin: 16px 0 6px; }
input, select, textarea { background: var(--canvas); border: 1px solid var(--border-strong); border-radius: var(--r-ctl); padding: 8px 11px; color: var(--text); font: 400 13.5px var(--sans); width: 100%; transition: border-color 0.15s var(--ease); }
select[multiple] { padding: 4px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text-2); }
input::placeholder { color: var(--text-3); }
.error { color: var(--red); }
.ok { color: var(--ok); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 9px 22px; margin: 0; font-size: 13px; }
.kv dt { color: var(--text-3); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.kv dd { margin: 0; }
.chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--text-2); }
.chip.accent { color: var(--accent); border-color: rgba(255, 204, 103, 0.4); background: var(--accent-dim); }

.login-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; gap: 34px; }
.login-hint { color: var(--text-3); font-size: 12.5px; }

.loadbar { position: fixed; top: 0; left: 0; right: 0; height: 2.5px; z-index: 2000; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 0.2s var(--ease); }
.loadbar.active { opacity: 1; }
.loadbar::before { content: ""; position: absolute; top: 0; height: 100%; width: 35%; left: -35%; background: var(--accent); border-radius: 2px; animation: loadbar-slide 1.05s var(--ease) infinite; }
@keyframes loadbar-slide { 0% { left: -35%; } 60% { left: 100%; } 100% { left: 100%; } }

.toast { position: fixed; bottom: 24px; right: 24px; background: var(--surface-2); border: 1px solid var(--border-strong); border-left: 2px solid var(--accent); color: var(--text); border-radius: var(--r-ctl); padding: 11px 16px; font-size: 13px; z-index: 50; }
.toast.error { border-left-color: var(--red); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid var(--canvas); }
::-webkit-scrollbar-track { background: transparent; }
