@import url('./theme.css');

* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 'Segoe UI', system-ui, sans-serif; color: var(--ink); background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--forest); }
button, a, input, textarea { transition: background .15s, border-color .15s; }
a { color: var(--forest); text-underline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.icon { width: 19px; height: 19px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-header { height: 80px; padding: 0 max(32px, calc((100vw - 1440px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--surface); }
.brand { display: inline-flex; align-items: center; font-size: 27px; font-weight: 700; letter-spacing: -1.2px; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; margin-right: 10px; border-radius: 10px; background: var(--forest); color: #d7edab; font-size: 25px; }
.brand-dot { color: #68854c; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.primary { background: var(--forest); color: white; }
.primary:hover:not(:disabled) { background: #3b5d47; }
.primary > span { font-size: 23px; font-weight: 400; line-height: 1; }
.secondary { background: var(--surface); border-color: var(--line); }
.secondary:hover { background: var(--tint); border-color: #a6b69d; }
#toggle-assistant[aria-expanded="true"] { background: var(--tint); border-color: #cbd7c4; }
.workspace { max-width: 1504px; margin: auto; padding: 32px; display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 40px; }
.workspace.assistant-hidden { grid-template-columns: minmax(0, 1fr); max-width: 1160px; }
main { min-width: 0; padding-top: 14px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 8px; }
h1 { font-size: clamp(32px, 3.2vw, 44px); line-height: 1.15; font-weight: 600; letter-spacing: -1.6px; }
.task-section { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filters button { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 8px 10px; min-height: 42px; font-size: 14px; color: var(--muted); }
.filters button:hover { background: #f3f5ef; }
.filters button.active { background: var(--tint); color: var(--forest); border-color: #d8e2d0; font-weight: 600; }
.filter-count { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 20px; text-align: center; padding: 0 4px; border-radius: 4px; background: #f0f2ed; }
.active .filter-count { background: #d6e3cc; }
.search { display: flex; align-items: center; gap: 8px; width: 195px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #fafbf8; }
.search:focus-within { border-color: var(--forest); outline: 2px solid var(--forest); outline-offset: 2px; }
.search input { width: 100%; min-width: 0; padding: 10px 0; font-size: 14px; border: 0; outline: none; background: transparent; color: var(--ink); }
input::placeholder, textarea::placeholder { color: #6d786f; opacity: 1; }
.search-summary { color: var(--muted); font-size: 13px; padding: 14px 24px 0; overflow-wrap: anywhere; }
.task-row { display: flex; gap: 16px; align-items: flex-start; padding: 23px 24px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #fcfdf9; }
.task-check { appearance: none; display: grid; place-items: center; width: 24px; height: 24px; flex: none; border: 1.5px solid #87977f; border-radius: 6px; margin: 1px 0 0; cursor: pointer; background: white; }
.task-check:hover { border-color: var(--forest); background: var(--tint); }
.task-check:checked { background: var(--forest); border-color: var(--forest); }
.task-check:checked::after { content: '✓'; font-size: 17px; color: white; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 16px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.completed .task-title { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.task-notes { color: var(--muted); font-size: 14px; margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 88px; overflow: auto; }
.task-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 11px; }
.priority { border-radius: 4px; padding: 2px 7px; font-size: 12px; color: #536748; background: #edf2e9; }
.priority.high { color: #894719; background: #fcf0dd; }
.priority.low { color: #436774; background: #eaf1f4; }
.due { font-size: 12px; color: var(--muted); }
.due.overdue { color: var(--danger); }
.icon-button { display: grid; place-items: center; border: 0; background: transparent; font-size: 25px; width: 40px; height: 40px; flex: none; border-radius: 6px; color: var(--muted); }
.icon-button:hover { background: var(--tint); color: var(--forest); }
.edit-item { font-size: 13px; width: auto; padding: 0 10px; min-height: 40px; margin-top: -7px; }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 330px; padding: 48px 24px; }
.empty h3 { font-size: 22px; letter-spacing: -.5px; font-weight: 600; }
.empty p { max-width: 340px; color: var(--muted); margin-top: 8px; font-size: 14px; }
.empty .text-button { margin-top: 18px; text-decoration: underline; text-underline-offset: 4px; }
.loading { padding: 40px 24px; color: var(--muted); }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 12px 20px; font-size: 13px; color: var(--muted); }
.text-button { border: 0; background: transparent; border-radius: 6px; padding: 8px; min-height: 40px; font-size: 13px; color: var(--forest); }
.text-button:hover:not(:disabled) { background: var(--tint); }
.storage-note { display: flex; align-items: center; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.storage-note .icon { width: 15px; height: 15px; }
.assistant { position: sticky; top: 24px; display: flex; flex-direction: column; min-width: 0; height: calc(100dvh - 144px); min-height: 650px; background: #eef1e9; border: 1px solid #d8dfd1; border-radius: 12px; overflow: auto; }
.assistant.unavailable { height: auto; min-height: 0; }
.assistant-header, .assistant-connection, .assistant-bottom { flex-shrink: 0; }
.assistant-header { display: flex; align-items: center; gap: 8px; padding: 16px 16px 12px 24px; }
.assistant-header h2 { font-size: 16px; font-weight: 600; margin-right: auto; }
.assistant-header .text-button { padding: 6px; }
.assistant-connection { padding: 0 24px 20px; border-bottom: 1px solid #d8dfd1; }
.connection-status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #8e9687; flex: none; }
.status-dot.ready { background: #426d36; }
#model-help { font-size: 13px; color: #596653; margin-top: 10px; }
.enable-button { margin-top: 16px; width: 100%; }
.enable-button:disabled { background: #e2e7dc; border-color: #cdd6c5; color: #596653; opacity: 1; }
.messages { flex: 1; min-height: 180px; overflow-y: auto; padding: 25px 24px; scrollbar-width: thin; }
.assistant-intro h3 { font-size: 24px; line-height: 1.25; font-weight: 500; letter-spacing: -.6px; }
.assistant-intro p { font-size: 13px; color: #596653; margin-top: 12px; }
.suggestions { display: grid; gap: 8px; margin-top: 22px; }
.suggestions button { display: flex; justify-content: space-between; gap: 10px; text-align: left; border: 1px solid #d1dac9; background: #f8faf4; border-radius: 6px; padding: 12px; min-height: 44px; font-size: 13px; }
.suggestions button:hover:not(:disabled) { background: #e0ead7; }
.suggestions button:disabled { opacity: 1; color: #69725f; background: transparent; border-style: dashed; }
.assistant-bottom { padding: 0 18px 18px; }
.composer { border: 1px solid #bccab2; border-radius: 8px; background: white; padding: 12px; }
.composer:focus-within { border-color: var(--forest); outline: 2px solid var(--forest); outline-offset: 2px; }
.composer textarea { display: block; width: 100%; border: 0; resize: vertical; background: transparent; font-size: 14px; min-height: 62px; max-height: 150px; color: var(--ink); outline: none; }
.composer textarea:disabled { cursor: not-allowed; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.composer-footer > span { font-size: 11px; line-height: 1.5; color: var(--muted); max-width: 190px; }
.send-button { height: 36px; width: 36px; border: 0; background: var(--forest); color: white; border-radius: 6px; font-size: 22px; flex: none; }
.stop-button { border: 1px solid var(--line); border-radius: 6px; background: #f3f4ef; font-size: 13px; min-height: 36px; padding: 5px 10px; }
.browser-details { margin-top: 14px; color: #596653; font-size: 12px; }
.browser-details summary { cursor: pointer; padding: 5px 0; }
.browser-details p { line-height: 1.7; margin-top: 10px; }
.activity-status { font-size: 12px; color: var(--forest); padding: 0 24px 12px; overflow-wrap: anywhere; }
.activity-status:empty { display: none; }
.message { margin-bottom: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.message-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 1px; color: #596653; margin-bottom: 6px; }
.message.user { border-radius: 8px; background: #dfe8d6; padding: 12px; }
.message.error { color: var(--danger); }
.tool-trace { margin-bottom: 12px; border: 1px solid #cbd7c0; background: #f8faf4; padding: 10px; border-radius: 6px; font-size: 12px; }
.tool-trace summary { cursor: pointer; overflow-wrap: anywhere; }
.tool-trace pre { font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; }
.tool-trace.failed { color: var(--danger); border-color: #e1caba; background: #fff6ef; }
dialog { border: 1px solid var(--line); border-radius: 12px; width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 28px; box-shadow: 0 24px 100px #1d301d30; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: #1e2c2560; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dialog-heading h2 { font-size: 26px; font-weight: 600; letter-spacing: -.6px; }
#item-form label { display: flex; flex-direction: column; font-size: 14px; gap: 7px; margin-bottom: 18px; position: relative; }
#item-form input, #item-form textarea, #item-form select { border: 1px solid #b9c5b1; border-radius: 6px; background: white; padding: 11px; min-height: 44px; font-size: 16px; color: var(--ink); width: 100%; }
#item-form textarea { resize: vertical; }
.optional { position: absolute; right: 0; top: 2px; color: var(--muted); font-size: 12px; }
.form-row { display: flex; gap: 16px; }
.form-row label { flex: 1; min-width: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.form-error { color: var(--danger); font-size: 14px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--forest); color: white; border-radius: 8px; padding: 12px 20px; box-shadow: 0 5px 20px #253f2c30; z-index: 5; font-size: 14px; max-width: calc(100vw - 32px); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link:focus { position: fixed; top: 12px; left: 16px; z-index: 10; padding: 12px; background: white; }
@media (max-width: 1100px) { .workspace { gap: 24px; padding: 24px; grid-template-columns: minmax(0, 1fr) 330px; } .app-header { padding: 0 24px; } .list-toolbar { gap: 12px; } .search { width: 100%; } .assistant-connection, .messages { padding-left: 20px; padding-right: 20px; } }
@media (max-width: 760px) {
  .app-header { height: 72px; padding: 0 20px; }
  .brand { font-size: 25px; }
  .workspace { display: block; padding: 24px 20px; }
  main { padding-top: 4px; }
  .page-heading { gap: 12px; margin-bottom: 24px; }
  h1 { font-size: 36px; }
  .eyebrow { font-size: 12px; }
  .list-toolbar { padding: 12px; }
  .filters { width: 100%; gap: 2px; }
  .filters button { flex: 1; justify-content: center; font-size: 13px; padding: 8px 6px; gap: 5px; }
  .search input, .composer textarea { font-size: 16px; }
  .task-row { padding: 20px 16px; gap: 12px; }
  .empty { min-height: 300px; padding: 36px 20px; }
  .empty h3 { font-size: 21px; }
  .assistant { position: relative; top: auto; margin-top: 32px; height: 720px; min-height: 650px; scroll-margin-top: 16px; }
  .form-row { flex-direction: column; gap: 0; }
  dialog { padding: 24px; }
  .pagination { padding: 10px; }
}
@media (max-width: 360px) { .workspace { padding: 20px 12px; } .app-header { padding: 0 12px; } .filters button { font-size: 12px; gap: 4px; } .page-heading .button { padding: 10px 12px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
