:root {
  --bg: #efe7db;
  --panel: #fffdf8;
  --ink: #1c2430;
  --muted: #5e6874;
  --line: #e4d8c8;
  --accent: #0d6a56;
  --accent-ink: #f4fbf8;
  --warm: #b85a32;
  --ok: #1d7a4a;
  --bad: #a33b32;
  --warn: #8a5a00;
  --shadow: 0 10px 30px rgba(48, 36, 20, 0.08);
  --sidebar: 232px;
  font-family: "Segoe UI", "Noto Sans", "Ubuntu", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(880px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.login-card h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -0.03em; }
.lede { color: var(--muted); margin: 0 0 20px; line-height: 1.45; }
.accounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.account {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
}
.account .btn { margin-top: 10px; }
.account:hover { border-color: var(--accent); }
.account strong { display: block; margin-bottom: 4px; }
.account span { color: var(--muted); font-size: 14px; }
.pass { margin-top: 8px; font-size: 13px; color: var(--warn); }

.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.side {
  background: #17342e;
  color: #e7f3ef;
  padding: 18px 14px 88px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}
.brand { font-weight: 700; font-size: 22px; letter-spacing: -0.03em; }
.brand small { display: block; font-weight: 500; font-size: 12px; opacity: 0.75; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; margin-top: 18px; }
.nav button {
  text-align: left;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
}
.nav button.active, .nav button:hover { background: rgba(255,255,255,0.1); }
.who { margin-top: 18px; font-size: 13px; line-height: 1.4; opacity: 0.9; }
.who button { margin-top: 8px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 8px; padding: 6px 8px; }

.main { padding: 18px 18px 110px; }
.top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.muted { color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
}
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
}
textarea { min-height: 90px; resize: vertical; }
.btn {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 10px;
  padding: 8px 12px;
}
.btn.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.warn { background: var(--warm); }
.btn.bad { background: var(--bad); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.tree { display: flex; flex-direction: column; gap: 8px; }
.node {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.node .child { margin-left: 22px; margin-top: 8px; border-left: 3px solid var(--accent); }
.person { font-size: 14px; margin-top: 6px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  background: #efe6d8;
  font-size: 12px;
}
.pill.ok { background: #e4f5ec; color: var(--ok); }
.pill.bad { background: #fde8e6; color: var(--bad); }
.pill.warn { background: #fff4d6; color: var(--warn); }

.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.col { background: #f7f1e8; border-radius: 12px; padding: 10px; min-height: 180px; }
.task {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 8px;
}
.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.widget strong { display: block; font-size: 28px; letter-spacing: -0.04em; }
.note { font-size: 13px; color: var(--muted); line-height: 1.4; }
.flow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.stage-card { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; min-width: 140px; }
label input[type="checkbox"] { width: auto; margin-right: 4px; }
.hash { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 12px; word-break: break-all; }

.dock {
  position: fixed;
  left: var(--sidebar);
  right: 0;
  bottom: 0;
  background: #fffdf8;
  border-top: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 5;
}
.steps { display: flex; gap: 4px; flex-wrap: wrap; }
.step {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0;
  font-size: 12px;
}
.step.on { background: var(--accent); color: white; border-color: var(--accent); }
.step.done { background: #d9f2e6; border-color: #8ec9aa; }
.dock p { margin: 0; font-size: 14px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; }
  .accounts, .grid-2, .grid-3, .widgets, .kanban { grid-template-columns: 1fr; }
  .dock { position: static; }
}
