:root {
  --bg: #0b0a09; --panel: #12110f; --panel-2: #191713; --panel-3: #211e18;
  --line: rgba(244, 205, 120, .12); --line-strong: rgba(244, 205, 120, .24);
  --text: #f6f0e4; --muted: #9f9789; --gold: #e8b95b; --gold-bright: #ffd889;
  --red: #e37368; --green: #6cc19a; --blue: #70a6db; --purple: #a98bd4;
  --radius: 18px; --shadow: 0 24px 80px rgba(0,0,0,.42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { background-image: radial-gradient(circle at 14% -8%, rgba(232,185,91,.12), transparent 34%), radial-gradient(circle at 90% 10%, rgba(118,87,36,.08), transparent 30%); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 4px; color: var(--gold); font-size: 11px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; }
.muted, .updated { color: var(--muted); }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 44px; border: 1px solid var(--line-strong); border-radius: 28px; background: linear-gradient(155deg, rgba(31,28,23,.98), rgba(15,14,12,.98)); box-shadow: var(--shadow); }
.sigil { width: 68px; height: 68px; display: grid; place-items: center; margin-bottom: 24px; border: 1px solid rgba(232,185,91,.45); border-radius: 22px; color: var(--gold-bright); background: rgba(232,185,91,.08); font-size: 36px; }
.login h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(32px, 8vw, 44px); font-weight: 500; }
.login form { margin-top: 30px; }
label { display: grid; gap: 8px; color: #c9c1b4; font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; color: var(--text); border: 1px solid var(--line-strong); border-radius: 12px; outline: none; background: #0d0c0b; padding: 12px 14px; transition: border .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,185,91,.12); }
textarea { resize: vertical; }
.form-error { min-height: 18px; color: #f09b91; font-size: 12px; }
.button, .icon-button { border: 0; cursor: pointer; transition: transform .15s, background .2s, opacity .2s; }
.button:hover, .icon-button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button { padding: 11px 16px; border-radius: 11px; font-size: 13px; font-weight: 750; }
.button.primary { color: #1b1408; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); box-shadow: 0 8px 24px rgba(232,185,91,.16); }
.button.ghost { border: 1px solid var(--line-strong); color: #d9d1c3; background: rgba(255,255,255,.025); }
.button.wide { width: 100%; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.035); font-size: 20px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; padding: 14px 28px; border-bottom: 1px solid var(--line); background: rgba(11,10,9,.88); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 14px; color: var(--gold); background: rgba(232,185,91,.06); font-size: 25px; }
.brand h1 { margin: 0; font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.connection { display: flex; align-items: center; gap: 7px; margin-right: 8px; color: var(--muted); font-size: 12px; }
.connection i { width: 7px; height: 7px; border-radius: 50%; background: #887d6d; box-shadow: 0 0 0 4px rgba(136,125,109,.1); }
.connection.online i { background: var(--green); box-shadow: 0 0 0 4px rgba(108,193,154,.1); }
.connection.error i { background: var(--red); }
main { padding: 24px 28px 40px; }
.team { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.agent { position: relative; overflow: hidden; min-height: 105px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(29,27,23,.95), rgba(17,16,14,.95)); }
.agent::after { content: ''; position: absolute; inset: auto -20px -45px auto; width: 100px; height: 100px; border-radius: 50%; background: var(--agent, var(--gold)); opacity: .07; filter: blur(4px); }
.agent-head { display: flex; justify-content: space-between; gap: 12px; }
.agent-name { margin: 0; font-size: 14px; }
.agent-role { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--agent) 35%, transparent); border-radius: 12px; color: var(--agent); background: color-mix(in srgb, var(--agent) 9%, transparent); }
.agent-stats { display: flex; gap: 14px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.agent-stats strong { display: block; color: var(--text); font-size: 17px; line-height: 1; }
.toolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.toolbar select { width: auto; min-width: 145px; padding: 10px 32px 10px 12px; }
.search { position: relative; display: block; width: min(330px, 30vw); }
.search span { position: absolute; left: 13px; top: 8px; color: var(--muted); font-size: 20px; }
.search input { padding-left: 40px; }
.toggle { display: flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; }
.toggle span { position: relative; width: 34px; height: 19px; border-radius: 20px; background: #2b2822; transition: .2s; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #8c8477; transition: .2s; }
.toggle input:checked + span { background: rgba(232,185,91,.35); }
.toggle input:checked + span::after { left: 18px; background: var(--gold-bright); }
.toggle.line { margin-top: 4px; }
.updated { margin-left: auto; font-size: 11px; }
.board-shell { overflow-x: auto; padding-bottom: 14px; scrollbar-color: #463d2c transparent; }
.board { display: grid; grid-template-columns: repeat(7, minmax(270px, 1fr)); gap: 12px; min-width: 1940px; align-items: start; }
.column { min-height: 55vh; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(18,17,15,.72); }
.column.drag-over { border-color: var(--gold); background: rgba(232,185,91,.04); }
.column-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 12px; border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; background: rgba(18,17,15,.95); }
.column-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 760; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--status); box-shadow: 0 0 0 4px color-mix(in srgb, var(--status) 12%, transparent); }
.count { min-width: 24px; padding: 3px 7px; border-radius: 20px; color: var(--muted); background: rgba(255,255,255,.04); text-align: center; font-size: 10px; }
.cards { display: grid; gap: 9px; padding: 10px; }
.card { padding: 13px; border: 1px solid rgba(255,255,255,.055); border-radius: 14px; background: linear-gradient(145deg, #1c1a16, #171511); box-shadow: 0 8px 24px rgba(0,0,0,.14); cursor: pointer; transition: border .18s, transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 12px 30px rgba(0,0,0,.24); }
.card[draggable="true"]:active { opacity: .6; }
.card-top, .card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-id { color: #746d62; font-family: ui-monospace, monospace; font-size: 9px; }
.priority { width: 8px; height: 8px; border-radius: 3px; background: var(--priority); }
.card h3 { margin: 11px 0 12px; font-size: 13px; line-height: 1.4; font-weight: 680; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.chip { max-width: 100%; overflow: hidden; padding: 4px 7px; border-radius: 7px; color: #bcb3a5; background: rgba(255,255,255,.04); text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.chip.profile { color: var(--profile-color, var(--gold)); background: color-mix(in srgb, var(--profile-color, var(--gold)) 10%, transparent); }
.card-foot { color: #7e766a; font-size: 9px; }
.card-meta { display: flex; gap: 8px; }
.progress { height: 3px; margin-top: 11px; overflow: hidden; border-radius: 5px; background: #2a2722; }
.progress i { display: block; height: 100%; background: var(--gold); }
.empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.empty span { color: var(--gold); font-size: 42px; }.empty h2 { color: var(--text); font-family: Georgia, serif; font-weight: 500; }
dialog { color: var(--text); border: 1px solid var(--line-strong); background: #141310; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(4px); }
.drawer { width: min(620px, 100%); height: 100vh; max-height: none; margin: 0 0 0 auto; padding: 0; border-width: 0 0 0 1px; }
.drawer[open] { animation: slide .22s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: .5; } }
.drawer-head, .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2, .modal-head h2 { margin: 0; font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.drawer-body { padding: 22px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-section { margin-top: 24px; }.detail-section h3 { margin: 0 0 10px; color: #d9d1c3; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.detail-copy { color: #c3bbaf; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.comment { margin: 8px 0; padding: 11px; border-left: 2px solid var(--line-strong); color: #c9c1b4; background: rgba(255,255,255,.025); font-size: 12px; }
.comment-form { display: flex; gap: 8px; }.comment-form input { flex: 1; }
.modal { width: min(580px, calc(100% - 28px)); padding: 0; border-radius: 22px; }
.modal form { display: grid; gap: 15px; padding-bottom: 20px; }.modal form > label, .modal form > .form-grid, .modal form > .form-error { margin-inline: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 4px 22px 0; }
.toast-zone { position: fixed; z-index: 100; right: 18px; bottom: 18px; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: 12px; color: #ded6c9; background: #211e18; box-shadow: var(--shadow); font-size: 12px; }
@media (max-width: 1000px) { .team { grid-template-columns: 1fr 1fr; }.connection span { display: none; }.toolbar { flex-wrap: wrap; }.updated { width: 100%; margin-left: 0; }.search { width: 100%; }.topbar { padding-inline: 16px; } main { padding-inline: 16px; } }
@media (max-width: 640px) { .topbar { align-items: flex-start; }.brand .eyebrow, .brand h1 { display: none; }.brand-mark { width: 40px; height: 40px; }.top-actions .ghost { display: none; }.top-actions { gap: 5px; }.button { padding: 10px 12px; }.team { grid-template-columns: 1fr 1fr; gap: 8px; }.agent { min-height: 96px; padding: 13px; }.agent-role { display: none; }.toolbar select { flex: 1; min-width: 130px; }.board { grid-template-columns: repeat(7, 82vw); min-width: calc(7 * 82vw + 72px); }.drawer { width: 100%; }.detail-grid, .form-grid { grid-template-columns: 1fr; }.login-card { padding: 30px 24px; } }

/* Material 3 — light production theme */
:root {
  --bg: #f7f7fb;
  --panel: #ffffff;
  --panel-2: #f3f1f8;
  --panel-3: #ece9f2;
  --line: #e4e1ea;
  --line-strong: #cac5d1;
  --text: #1d1b20;
  --muted: #625f68;
  --gold: #6750a4;
  --gold-bright: #7f67be;
  --red: #ba1a1a;
  --green: #2e7d32;
  --blue: #0061a4;
  --purple: #6750a4;
  --radius: 18px;
  --shadow: 0 12px 34px rgba(31, 24, 44, .12), 0 2px 8px rgba(31, 24, 44, .07);
  font-family: Roboto, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html, body { background: var(--bg); color: var(--text); }
body {
  background-image:
    radial-gradient(circle at 12% -12%, rgba(103, 80, 164, .10), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(0, 106, 106, .07), transparent 28%);
}
.eyebrow { color: var(--gold); font-weight: 700; letter-spacing: .12em; }
.muted, .updated { color: var(--muted); }

.login { min-height: 100dvh; background: linear-gradient(150deg, #f7f7fb 0%, #f1edf8 52%, #eef6f5 100%); }
.login-card {
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 44px 42px;
  border: 1px solid rgba(103, 80, 164, .13);
  border-radius: 28px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 64px rgba(51, 39, 78, .14), 0 3px 12px rgba(51, 39, 78, .07);
  text-align: center;
}
.sigil {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border: 0;
  border-radius: 24px;
  color: #ffffff;
  background: var(--gold);
  box-shadow: 0 10px 24px rgba(103, 80, 164, .24);
  font-size: 36px;
}
.login h1 {
  margin: 4px 0 0;
  font-family: inherit;
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 650;
  letter-spacing: -.035em;
}
.login-card > .muted { max-width: 330px; margin: 14px auto 0; line-height: 1.55; }
.login form { width: 100%; display: grid; justify-items: center; gap: 2px; margin-top: 30px; }
.login form label { width: 100%; align-items: center; color: var(--muted); text-align: center; }
.login input {
  width: min(292px, 100%);
  margin: 2px auto 0;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: .3em;
  text-align: center;
}
.login .form-error { width: 100%; margin: 8px 0 2px; text-align: center; }
.login .button.wide { width: min(292px, 100%); min-height: 48px; margin-inline: auto; }

label { color: #49454f; }
input, select, textarea {
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}
input::placeholder, textarea::placeholder { color: #7b7681; }
input:focus, select:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(103, 80, 164, .14);
}
.form-error { color: var(--red); }

.button, .icon-button { color: var(--text); }
.button { min-height: 40px; border-radius: 20px; padding-inline: 20px; letter-spacing: .01em; }
.button.primary {
  color: #ffffff;
  background: var(--gold);
  box-shadow: 0 4px 12px rgba(103, 80, 164, .22);
}
.button.primary:hover { background: #5d4698; box-shadow: 0 6px 18px rgba(103, 80, 164, .28); }
.button.ghost { border: 1px solid var(--line-strong); color: var(--gold); background: transparent; }
.button.ghost:hover { background: rgba(103, 80, 164, .08); }
.icon-button { color: #49454f; background: #f1eff5; }
.icon-button:hover { background: #e8e4ee; }

.topbar {
  min-height: 84px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 12px rgba(38, 31, 52, .06);
}
.brand-mark {
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: var(--gold);
  box-shadow: 0 5px 14px rgba(103, 80, 164, .2);
}
.brand h1 { font-family: inherit; font-weight: 650; letter-spacing: -.02em; }
.connection { color: var(--muted); }
.connection i { background: #79747e; box-shadow: 0 0 0 4px rgba(121, 116, 126, .12); }
.connection.online i { background: var(--green); box-shadow: 0 0 0 4px rgba(46, 125, 50, .12); }

main { max-width: 1800px; margin-inline: auto; }
.team { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.agent {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 3px 12px rgba(37, 31, 48, .07);
}
.agent::after { opacity: .10; }
.agent-name { color: var(--text); font-size: 14px; font-weight: 700; }
.agent-role { min-height: 30px; color: var(--muted); line-height: 1.35; display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--agent) 28%, white);
  border-radius: 19px;
  color: var(--agent);
  background: color-mix(in srgb, var(--agent) 12%, white);
  box-shadow: 0 4px 12px rgba(37, 31, 48, .12);
  font-size: 16px;
  font-weight: 750;
}
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; }
.agent-stats { color: var(--muted); }
.agent-stats strong { color: var(--text); }

.toolbar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 31, 48, .045);
}
.search span { color: var(--muted); }
.toggle span { background: #ded9e2; }
.toggle span::after { background: #79747e; }
.toggle input:checked + span { background: #d0bcff; }
.toggle input:checked + span::after { background: var(--gold); }

.board-shell { scrollbar-color: #b9b1c4 transparent; }
.column {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f2f0f6;
}
.column.drag-over { border-color: var(--gold); background: #eee8f8; }
.column-head {
  border-bottom: 1px solid var(--line);
  background: #faf9fd;
}
.count { color: #49454f; background: #e8e4ec; }
.card {
  border: 1px solid #e5e1e9;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 31, 48, .07);
}
.card:hover { border-color: #c9c3cf; box-shadow: 0 8px 20px rgba(37, 31, 48, .12); }
.task-id { color: #79747e; }
.card h3 { color: var(--text); }
.chip { color: #49454f; background: #efedf2; }
.chip.profile { background: color-mix(in srgb, var(--profile-color, var(--gold)) 12%, white); }
.card-foot { color: #79747e; }
.progress { background: #e6e1e9; }
.progress i { background: var(--gold); }

.empty h2 { color: var(--text); font-family: inherit; font-weight: 600; }
dialog { color: var(--text); border-color: var(--line); background: #ffffff; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(31, 27, 36, .34); backdrop-filter: blur(3px); }
.drawer-head, .modal-head { border-bottom-color: var(--line); background: #faf9fd; }
.drawer-head h2, .modal-head h2 { font-family: inherit; font-weight: 650; }
.detail-section h3 { color: #49454f; }
.detail-copy { color: #49454f; }
.comment { border-left-color: #d0bcff; color: #49454f; background: #f7f3fb; }
.toast { border-color: #49454f; color: #ffffff; background: #323036; box-shadow: var(--shadow); }

@media (max-width: 1000px) {
  .team { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}
@media (max-width: 640px) {
  .login { padding: 16px; }
  .login-card { padding: 36px 22px 30px; border-radius: 24px; }
  .team { grid-template-columns: 1fr; }
  .agent { min-height: 110px; }
  .agent-role { display: -webkit-box; }
  .toolbar { padding: 10px; }
  .topbar { background: rgba(255, 255, 255, .96); }
}
