/* Taskout app: sidebar shell, white cards on a soft blue-white ground. Matches the marketing site. */
:root {
  --bg: #F7F9FD;
  --tint: #EEF2F9;
  --surface: #FFFFFF;
  --ink: #071A3D;
  --text: #566681;
  --line: #E3E9F3;
  --blue: #1268FF;
  --blue-dark: #0B55D6;
  --blue-soft: #E8F0FF;
  --navy: #0A2A66;
  --good: #0B7F50;
  --good-bg: #E1F5EC;
  --warn: #8A5200;
  --warn-bg: #FFF1D6;
  --danger: #B42318;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--text); }
.small { font-size: 0.85rem; }

/* Shell */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; gap: 14px; }
.side-top { display: grid; gap: 12px; padding: 0 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.03em; }
.brand img { display: block; }
.mode { justify-self: start; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); }
.mode.boss { background: var(--navy); color: #fff; }
.nav { display: grid; gap: 2px; align-content: start; flex: 1; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.93rem; }
.nav a::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: #C9D5EA; flex: none; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.on { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.nav a.on::before { background: linear-gradient(135deg, #4D93FF, #1268FF); }
.nav a.dim { opacity: 0.5; }
.nav a.boss-only { margin-block: 4px; border: 1px dashed #B9C8E4; }
.side-foot { border-top: 1px solid var(--line); padding: 14px 6px 0; display: grid; gap: 6px; }
.who strong { display: block; font-size: 0.9rem; }
.who span { font-size: 0.8rem; color: var(--text); word-break: break-all; }
.link-btn { background: none; border: 0; padding: 2px 0; text-align: left; color: var(--text); cursor: pointer; font-size: 0.85rem; }
.link-btn:hover { color: var(--ink); text-decoration: underline; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 28px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.8); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); }
.crumb { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-right { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 0.85rem; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 28px; background: var(--navy); color: #fff; font-size: 0.88rem; }
.banner button { background: rgba(255, 255, 255, 0.14); border: 0; color: #fff; padding: 5px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 0.82rem; }
.banner button:hover { background: rgba(255, 255, 255, 0.24); }
#view { padding: 28px; max-width: 1180px; width: 100%; outline: none; }
.scrim { display: none; }

@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 280px; transform: translateX(-102%); transition: transform 0.2s ease; box-shadow: 0 0 40px rgba(7, 26, 61, 0.18); }
  .nav-open .side { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(7, 26, 61, 0.4); }
  .menu-btn { display: inline-block; }
  .top, .banner { padding-inline: 16px; }
  #view { padding: 18px 16px 40px; }
}

/* Page pieces */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 20px; margin-bottom: 22px; }
.page-head h1 { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.page-head p { color: var(--text); margin-top: 4px; max-width: 46rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 1px 2px rgba(7, 26, 61, 0.04), 0 10px 28px rgba(7, 26, 61, 0.05); min-width: 0; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.card h2 + .muted { margin-bottom: 12px; font-size: 0.9rem; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid > .card + .card { margin-top: 0; }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stat b { display: block; font-size: 1.9rem; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text); font-size: 0.85rem; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows .name { min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.rows .sub { display: block; font-weight: 400; color: var(--text); font-size: 0.82rem; }
.empty { padding: 18px; text-align: center; color: var(--text); border: 1px dashed #C9D5EA; border-radius: 12px; background: var(--bg); }

.badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--text); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.blue { background: var(--blue-soft); color: var(--blue-dark); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; font-weight: 600; font-size: 0.9rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(18, 104, 255, 0.2); }
.btn.primary:hover { background: var(--blue-dark); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: #C5D2E8; }
.btn.danger { background: #fff; border-color: #F2C6C1; color: var(--danger); }
.btn.sm { padding: 5px 11px; font-size: 0.8rem; border-radius: 8px; }
.btn:disabled { opacity: 0.55; cursor: default; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

form.stack { display: grid; gap: 12px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-size: 0.82rem; font-weight: 600; }
input, select, textarea { width: 100%; background: #fff; border: 1px solid #CFD9EA; border-radius: 10px; padding: 9px 12px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.tall { min-height: 200px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--blue); }
.err { color: var(--danger); font-size: 0.88rem; min-height: 1.2em; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); font-weight: 600; padding: 12px 14px; background: var(--bg); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; text-align: right; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 500; font-size: 0.88rem; }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 800px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.col { background: var(--tint); border-radius: 14px; padding: 12px; min-width: 0; }
.col h3 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); margin-bottom: 10px; display: flex; justify-content: space-between; }
.task { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 0.9rem; overflow-wrap: anywhere; }
.task .actions { margin-top: 8px; }
.bar { height: 6px; border-radius: 99px; background: var(--tint); overflow: hidden; width: 90px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #4D93FF, #09B8C5); }

.agent { display: grid; gap: 10px; }
.agent-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.agent h3 { font-size: 1.05rem; letter-spacing: -0.01em; }
details summary { cursor: pointer; color: var(--blue-dark); font-weight: 600; font-size: 0.85rem; }
pre.text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 0.88rem; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 10px 0 0; }
.notice { background: var(--blue-soft); color: var(--blue-dark); border-radius: 10px; padding: 10px 14px; font-size: 0.88rem; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 0.85rem; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 0.9rem; font-weight: 500; z-index: 60; box-shadow: 0 10px 30px rgba(7, 26, 61, 0.3); max-width: calc(100vw - 32px); }
#toast.err { background: var(--danger); }
#toast:empty { display: none; }
dialog { border: 0; border-radius: 18px; padding: 24px; width: min(440px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(7, 26, 61, 0.35); }
dialog::backdrop { background: rgba(7, 26, 61, 0.45); }
dialog h2 { font-size: 1.15rem; margin-bottom: 6px; }
.secret { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.92rem; overflow-wrap: anywhere; margin-top: 8px; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(600px 400px at 85% 10%, rgba(18, 104, 255, 0.14), transparent 70%), radial-gradient(520px 360px at 15% 95%, rgba(9, 184, 197, 0.14), transparent 70%), var(--bg); }
.login-card { width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 32px; box-shadow: 0 1px 2px rgba(7, 26, 61, 0.04), 0 24px 60px rgba(7, 26, 61, 0.1); }
.login-card .brand { margin-bottom: 20px; }
.login-card h1 { font-size: 1.5rem; letter-spacing: -0.03em; margin-bottom: 4px; }
.login-card p { color: var(--text); margin-bottom: 20px; }
.plain{margin:8px 0 0;padding-left:18px;display:grid;gap:4px}
.cols.six { grid-template-columns: repeat(6, minmax(185px, 1fr)); overflow-x: auto; padding-bottom: 6px; gap: 10px; }
.cols.six .col h3 { gap: 6px; align-items: flex-start; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card-btn { text-align: left; width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font: inherit; cursor: pointer; color: inherit; }
.card-btn:hover { border-color: var(--blue, #1d5cff); }
.card-btn b { display: block; }
.card-btn small { display: block; color: var(--muted, #5b6b85); margin-top: 2px; }
dialog.wide { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.sect { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; display: grid; gap: 10px; }
.sect h3 { font-size: 0.95rem; }
.check { display: flex; gap: 10px; align-items: center; }
.check input { width: auto; }

.meter { height: 10px; border-radius: 999px; background: #e6ecf7; overflow: hidden; margin: 10px 0; }
.meter i { display: block; height: 100%; background: #1268ff; border-radius: 999px; }
.meter.warn i { background: #e0a100; }
.meter.bad i { background: #d6334a; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge.bad { background: #fde8ec; color: #a1233a; }

.actions select { width: auto; min-width: 150px; max-width: 100%; }

/* agent chat */
.chat { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }
.chat-log { display: grid; gap: 8px; max-height: 340px; overflow: auto; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.chat-msg { max-width: 88%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92rem; }
.chat-msg.user { justify-self: end; background: var(--blue); color: #fff; }
.chat-msg.assistant { justify-self: start; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.chat-receipt { justify-self: start; margin: -4px 0 2px 6px; font-size: 0.78rem; color: var(--text); }
.chat-input { width: 100%; resize: vertical; min-height: 56px; }
.chat-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }

.rows li.job { flex-wrap: wrap; }
.job .job-more { flex-basis: 100%; }
.rows li .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
