/* Project Kit — ZenUX theme. Dark + light via [data-theme]. */

:root {
  --brand: #14797a;
  --brand-light: #2ba5a6;
  --brand-dark: #0d5657;
  --brand-text: #7fd4d5;
  --sky: #8fb5e6;
  --accent: #c17f24;
  --accent-light: #d99b44;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.18), 0 8px 24px rgba(0, 0, 0, 0.16);
  --font: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg-grad: radial-gradient(120% 80% at 85% -10%, rgba(20, 121, 122, 0.1), transparent 55%);
  --card: #18181b;
  --card-2: #1f1f23;
  --border: #27272a;
  --hover: #232327;
  --text: #f4f4f5;
  --text-2: #a1a1aa;
  --dim: #71717a;
  --brand-subtle: #0f3b3b;
  --accent-soft: rgba(193, 127, 36, 0.18);
}

[data-theme="light"] {
  --bg: #f2ede6;
  --bg-grad: radial-gradient(120% 80% at 85% -10%, rgba(20, 121, 122, 0.08), transparent 55%);
  --card: #fffdfa;
  --card-2: #f7f2ea;
  --border: #e4ddd1;
  --hover: #efe9df;
  --text: #1c1b19;
  --text-2: #57534e;
  --dim: #8a847b;
  --brand-subtle: #def0ef;
  --accent-soft: rgba(193, 127, 36, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.5;
}
.boot { display: grid; place-items: center; height: 100vh; color: var(--dim); }

a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); }
.eyebrow {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--dim);
}
.muted { color: var(--text-2); }
.dim { color: var(--dim); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  padding: 9px 15px; border-radius: var(--radius-sm); font: inherit;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.15s;
}
.btn:hover { background: var(--hover); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-light); border-color: var(--brand-light); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--sky); }
.btn-ghost:hover { background: var(--hover); text-decoration: none; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ── Forms ─────────────────────────────────────────────────── */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 5px; }
input, textarea, select {
  width: 100%; font: inherit; font-size: 14px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px; outline: none; transition: border 0.15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
textarea { resize: vertical; min-height: 84px; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 22px; }
.card h2 { margin: 0; font-size: 17px; font-weight: 600; }

/* ── Pills / badges ────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 9px; border-radius: 999px; font-weight: 500;
}
.pill-brand { background: var(--brand-subtle); color: var(--brand-text); }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-neutral { background: var(--hover); color: var(--text-2); }
.pill-open { background: var(--accent-soft); color: var(--accent); }
.pill-in_review { background: rgba(143, 181, 230, 0.18); color: var(--sky); }
.pill-resolved { background: rgba(34, 197, 94, 0.16); color: var(--success); }

/* ── Auth screens ──────────────────────────────────────────── */
.auth-wrap { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.auth-card { width: 100%; max-width: 400px; }
.brandmark {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.brandmark .logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--sky));
  color: #fff; font-family: var(--mono); font-weight: 700;
}
.brandmark .name { font-weight: 700; font-size: 16px; }
.auth-card h1 { font-size: 22px; margin: 16px 0 4px; }
.err { color: var(--error); font-size: 13px; margin: 8px 0 0; min-height: 16px; }

/* ── App layout ────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.topbar .spacer { flex: 1; }
.shell { max-width: 1080px; margin: 0 auto; padding: 26px 24px 60px; }
.grid { display: grid; gap: 18px; }
@media (min-width: 880px) { .grid-2 { grid-template-columns: 1.3fr 1fr; } }

.welcome h1 { font-size: 26px; margin: 0 0 4px; letter-spacing: -0.01em; }
.welcome p { margin: 0; color: var(--text-2); }

/* theme toggle */
.toggle {
  border: 1px solid var(--border); background: var(--card); color: var(--text-2);
  width: 36px; height: 34px; border-radius: 9px; cursor: pointer; font-size: 15px;
  display: grid; place-items: center;
}
.toggle:hover { background: var(--hover); }

/* phase stepper */
.stepper { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; }
.step {
  flex: 1; text-align: center; font-size: 12px; font-weight: 600; padding: 7px 6px;
  border-radius: 8px; color: var(--dim); background: transparent;
}
.step.passed { color: var(--brand-text); }
.step.current { background: var(--brand); color: #fff; }
.step-sep { width: 12px; height: 2px; background: var(--border); }
.step-sep.passed { background: var(--brand); }

.progress { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); border-radius: 999px; transition: width 0.4s; }

/* scope lists */
.scope-cols { display: grid; gap: 22px; }
@media (min-width: 620px) { .scope-cols { grid-template-columns: 1fr 1fr; } }
.scope-h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.scope-h .n { font-family: var(--mono); font-weight: 400; color: var(--dim); font-size: 13px; }
.scope-list { list-style: none; margin: 0; padding: 0; }
.scope-list li { display: flex; gap: 9px; padding: 6px 0; font-size: 14px; align-items: flex-start; }
.dot { width: 7px; height: 7px; border-radius: 999px; margin-top: 7px; flex: none; }
.dot.in { background: var(--brand); }
.dot.out { background: var(--error); opacity: 0.7; }
.out-text { color: var(--text-2); }

/* lists / rows */
.row { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: none; }
.row .meta { font-size: 12px; color: var(--dim); font-family: var(--mono); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 9px 0; font-size: 14px; align-items: baseline; }
.feed .when { font-family: var(--mono); font-size: 11px; color: var(--dim); flex: none; width: 92px; }

.req { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; background: var(--card-2); }
.req .top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.req .top .when { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }

.project-card { display: block; text-align: left; width: 100%; cursor: pointer; }
.project-card:hover { background: var(--hover); }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

.kv { display: flex; flex-wrap: wrap; gap: 20px 34px; }
.kv > div > .eyebrow { margin-bottom: 3px; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; box-shadow: var(--shadow); z-index: 60;
  opacity: 0; transition: opacity 0.2s, transform 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
/* hub launcher */
.kit-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.kit-card { transition: background 0.15s, transform 0.08s, border-color 0.15s; }
.kit-card:hover { background: var(--hover); border-color: var(--brand); }
.kit-card:active { transform: translateY(1px); }

/* access control */
.access-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.access-row:last-child { border-bottom: none; }
.kit-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggle-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; font-size: 12px; color: var(--text-2); cursor: pointer; user-select: none; transition: all 0.12s; }
.toggle-chip.on { background: var(--brand-subtle); border-color: var(--brand); color: var(--brand-text); }
.toggle-chip.coming { opacity: 0.6; }
.toggle-chip .sw { width: 26px; height: 15px; border-radius: 999px; background: var(--border); position: relative; transition: background 0.12s; flex: none; }
.toggle-chip.on .sw { background: var(--brand); }
.toggle-chip .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 999px; background: #fff; transition: left 0.12s; }
.toggle-chip.on .sw::after { left: 13px; }

.spacer-12 { height: 12px; }
.stack > * + * { margin-top: 18px; }
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
