/* Steward — extracted + responsive rework of the designer's inline styles */

:root {
  --bg: #1b1e23;
  --panel: #22262c;
  --panel-2: #1f2228;
  --panel-3: #191c21;
  --panel-4: #282c33;
  --canvas: #1a1d22;
  --line: #383d46;
  --line-2: #2b2f37;
  --ink: #ece7db;
  --ink-2: #9a9488;
  --ink-3: #6c7078;
  --ink-4: #54585f;
  --gold: #c9a86a;
  --gold-2: #e0c088;
  --gold-dim: #8a7550;
  --red: #b1655a;
  --red-line: #6b3f3a;
  --red-ink: #c9a3a0;
  --green: #7fa88a;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --serif: 'Source Serif 4', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}
input, textarea, select, button { font-family: var(--mono); }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
a { color: var(--gold); }
a:hover { color: var(--gold-2); }

@keyframes pulseDot { 0%,100% { opacity:.25 } 50% { opacity:1 } }
@keyframes shimmer { 0% { opacity:.35 } 50% { opacity:.9 } 100% { opacity:.35 } }
.pulse-dot { animation: pulseDot 1.2s ease-in-out infinite; }
.shimmer { animation: shimmer 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .pulse-dot, .shimmer { animation: none !important; opacity: .7 !important; }
}

.app-root { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- shared bits ---------- */

.serif { font-family: var(--serif); }

.btn {
  border-radius: 4px; cursor: pointer; font-family: var(--mono);
  letter-spacing: .06em; border: none;
}
.btn:disabled { cursor: default; }
.btn-gold { background: var(--gold); color: var(--bg); font-weight: 600; font-size: 12px; padding: 12px 24px; }
.btn-gold:hover:not(:disabled) { background: var(--gold-2); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; padding: 12px 24px; }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-outline-gold { background: transparent; border: 1px solid var(--gold); color: var(--gold); font-size: 12px; padding: 11px 20px; }
.btn-outline-gold:hover { background: rgba(201,168,106,.08); }
.btn-outline-red { background: transparent; border: 1px solid var(--red); color: var(--red); font-size: 11.5px; padding: 10px 18px; }
.btn-red { background: var(--red); color: var(--bg); font-weight: 600; font-size: 11.5px; padding: 10px 18px; }
.btn-sm { padding: 8px 14px; font-size: 11px; }
.btn-window { background: var(--panel-4); border: 1px solid #4a4f58; color: var(--ink); font-size: 12px; padding: 12px 24px; }
.btn-window:hover { border-color: var(--gold); color: var(--gold); }

.todo-x { opacity: 0; transition: opacity .12s; }
.todo-row:hover .todo-x { opacity: 1; }
@media (hover: none) { .todo-x { opacity: .6; } }

.field {
  width: 100%; padding: 11px 12px; background: var(--panel-3);
  border: 1px solid var(--line); border-radius: 4px; color: var(--ink);
  font-size: 13px; outline: none;
}
.field:focus { border-color: var(--gold-dim); }
textarea.field { resize: vertical; }

.label { display: block; font-size: 10px; letter-spacing: .14em; color: var(--ink-2); margin-bottom: 6px; }

.chip {
  font-size: 10px; letter-spacing: .08em; color: var(--ink-2);
  background: var(--panel-4); border: 1px solid var(--line); border-radius: 3px; padding: 3px 8px;
}

.menu {
  position: absolute; right: 0; background: var(--panel-4); border: 1px solid var(--line);
  border-radius: 4px; z-index: 60; overflow: hidden; min-width: 170px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.menu-item { padding: 11px 14px; font-size: 12px; color: var(--ink); cursor: pointer; }
.menu-item + .menu-item { border-top: 1px solid var(--line); }
.menu-item:hover { background: #2e333b; }

/* ---------- auth ---------- */

.auth-wrap { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: auto; }
.auth-card { width: 400px; max-width: 100%; padding: 48px 40px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
@media (max-width: 480px) { .auth-card { padding: 36px 24px; } }
.auth-flash { margin-bottom: 20px; padding: 10px 14px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; font-size: 12px; color: var(--ink-2); text-align: center; }
.auth-error { margin-bottom: 20px; padding: 10px 14px; background: #241d1c; border: 1px solid var(--red-line); border-radius: 4px; font-size: 12px; color: var(--red-ink); text-align: center; }

/* ---------- header ---------- */

.topbar {
  height: 60px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; border-bottom: 1px solid var(--line-2); background: var(--panel);
  position: sticky; top: 0; z-index: 70;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-crumb { display: flex; align-items: center; gap: 7px; min-width: 0; }
.topbar-crumb .name { font-family: var(--serif); font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 22px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--panel-4); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--ink-2);
  cursor: pointer; text-transform: uppercase; user-select: none;
}
@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .topbar-right { gap: 14px; }
  .topbar .wordmark-label { display: none; }
}

.tabs {
  display: flex; gap: 28px; padding: 0 32px; border-bottom: 1px solid var(--line-2);
  background: var(--panel-2); flex-shrink: 0; overflow-x: auto;
}
.tabs a { padding: 13px 0; font-size: 11px; letter-spacing: .1em; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; color: var(--ink-2); }
.tabs a.active { color: var(--gold); border-bottom-color: var(--gold); }
@media (max-width: 640px) { .tabs { padding: 0 16px; gap: 20px; } }

.main-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; }

.page { margin: 0 auto; width: 100%; padding: 44px 32px 60px; }
@media (max-width: 640px) { .page { padding: 28px 16px 48px; } }

/* ---------- home ---------- */

.home-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; gap: 20px; flex-wrap: wrap; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.project-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px;
  padding: 22px 24px; cursor: pointer; border-left-width: 3px; border-left-style: solid;
}
.project-card:hover { background: #262a31; }
.new-card {
  border: 1px dashed var(--line); border-radius: 4px; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; color: var(--ink-3);
}
.new-card:hover { color: var(--ink-2); border-color: var(--ink-3); }

/* ---------- board ---------- */

.board-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .kanban { grid-template-columns: 1fr; } }
.kanban-col { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; min-height: 120px; }
.kanban-col.drop-hover { border-color: var(--gold-dim); }
.kanban-card {
  background: var(--panel-4); border: 1px solid var(--line); border-radius: 4px;
  padding: 13px 14px; cursor: grab; touch-action: pan-y;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: .45; }

.list-table { border: 1px solid var(--line-2); border-radius: 5px; overflow: hidden; }
.list-head, .list-row { display: grid; grid-template-columns: 2.4fr 1fr 1fr 1fr 1fr 2fr auto; gap: 12px; padding: 13px 16px; align-items: center; }
.list-head { padding: 11px 16px; background: var(--panel-2); font-size: 10px; letter-spacing: .08em; color: var(--ink-3); border-bottom: 1px solid var(--line-2); }
.list-row { border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: none; }
.list-row .notes { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .list-head { display: none; }
  .list-row { display: block; padding: 14px 16px; }
  .list-row > * { display: inline-block; margin-right: 12px; margin-bottom: 4px; }
  .list-row .title { display: block; margin-bottom: 6px; }
  .list-row .notes { display: block; white-space: normal; margin: 4px 0 8px; }
}

/* ---------- workspace ---------- */

.ws { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.ws-head { padding: 20px 32px 0; }
.ws-body { flex: 1; display: flex; gap: 20px; padding: 20px 32px 32px; min-height: 0; }
.ws-chat { width: 440px; flex-shrink: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; display: flex; flex-direction: column; min-height: 0; }
.ws-canvas { flex: 1; position: relative; background: var(--canvas); border: 1px solid var(--line-2); border-radius: 5px; overflow: auto; min-height: 0; }
@media (max-width: 1000px) {
  .ws { display: block; }
  .ws-head { padding: 16px 16px 0; }
  .ws-body { display: flex; flex-direction: column; padding: 16px 16px 24px; }
  .ws-chat { width: 100%; height: 55vh; }
  .ws-canvas { min-height: 420px; flex: none; }
}

.win {
  position: absolute; width: 320px; max-width: calc(100% - 8px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.win-head {
  display: flex; align-items: center; justify-content: space-between; padding: 9px 12px;
  border-bottom: 1px solid var(--line); cursor: grab; touch-action: none; user-select: none;
}
.win-head:active { cursor: grabbing; }

.msg-row { max-width: 88%; }
.msg-meta { font-size: 9.5px; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; }
.msg-bubble { padding: 10px 13px; border-radius: 5px; font-size: 12.5px; line-height: 1.5; color: var(--ink); overflow-wrap: break-word; white-space: pre-wrap; }

/* ---------- share panel ---------- */

.overlay {
  position: fixed; inset: 0; background: rgba(15,17,20,.6); z-index: 90;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.dialog {
  width: 460px; max-width: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: 6px; padding: 24px; max-height: 85vh; overflow: auto;
}

/* ---------- misc ---------- */

.footer-verse {
  flex-shrink: 0; min-height: 44px; border-top: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); padding: 10px 24px;
}
.footer-verse span {
  font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--ink-3);
  letter-spacing: .02em; text-align: center; max-width: 900px;
}
@media (max-width: 640px) {
  .footer-verse { padding: 8px 16px; }
  .footer-verse span {
    font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
  }
}

.section-card { margin-bottom: 22px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.card-label { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 14px; }

.empty-dash { border: 1px dashed var(--line); border-radius: 5px; padding: 40px 20px; text-align: center; }

.row-line { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line-2); background: var(--panel); gap: 12px; flex-wrap: wrap; }
.row-line:last-child { border-bottom: none; }

.wizard-steps { display: flex; margin-bottom: 40px; }
.wizard-step { flex: 1; text-align: center; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.wizard-step span { font-size: 10.5px; letter-spacing: .1em; color: var(--line); }
.wizard-step.active { border-color: var(--gold); }
.wizard-step.active span { color: var(--gold); }
.wizard-step.done { border-color: var(--ink-2); }
.wizard-step.done span { color: var(--ink-2); }
@media (max-width: 480px) { .wizard-step span { font-size: 9px; letter-spacing: .04em; } }

.choice { padding: 16px 18px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.choice:hover { border-color: var(--ink-3); }
.choice.selected { border-color: var(--gold); }
.choice .t { font-family: var(--serif); font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.choice .d { font-size: 11.5px; color: var(--ink-3); }
