* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font: 15px/1.5 Inter, "Segoe UI", Arial, sans-serif;
  color: #282c33;
  background: #f8f8fa;
  --line: #dedfe6;
  --accent: #51449d;
  --muted: #636774;
}
body { margin: 0; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
button, summary, select { cursor: pointer; }
button { border: 1px solid transparent; border-radius: 8px; padding: 8px 14px; font-size: .9rem; font-weight: 600; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #9184d8; outline-offset: 2px; }
input:not([type=checkbox]), select, textarea { width: 100%; border: 1px solid #cdd0d9; border-radius: 7px; background: white; padding: 9px 11px; color: inherit; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
textarea { resize: vertical; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.18; letter-spacing: -.045em; }
h2 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -.02em; }
h3 { font-size: 1rem; }
small, .muted, .feedback { color: var(--muted); }
.primary { background: var(--accent); color: white; }
.primary:hover:not(:disabled) { background: #423582; }
.secondary { background: white; color: #353943; border-color: var(--line); }
.secondary:hover:not(:disabled), .quiet:hover { background: #eeedf4; }
.quiet, .icon, .tab { background: transparent; color: var(--muted); }
.danger { color: #b3261e; }
.danger:hover { background: #f7e8e6; }
.icon { font-size: 1.45rem; line-height: 1; padding: 5px 9px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.actions select { width: auto; }
.initial { margin: 3rem; color: var(--muted); }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: #eeedf4; }
.auth-panel { width: min(100%,420px); padding: clamp(26px,5vw,42px); border: 1px solid #d9d7e2; border-radius: 15px; background: #fff; box-shadow: 0 12px 48px #27243b0b; }
.auth-panel .brand { margin-bottom: 34px; }
.auth-panel h1 { font-size: 1.9rem; margin-bottom: 24px; }
.auth-panel > :not(:first-child) + * { margin-top: 16px; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.45rem; font-weight: 700; letter-spacing: -.05em; }
.mark { width: 33px; height: 33px; border-radius: 9px; background: #d8d2ff; display: inline-flex; align-items: flex-start; gap: 3px; padding: 9px 7px; }
.mark i { display: block; border-radius: 1.5px; width: 5px; background: #463879; height: 14px; }
.mark i:nth-child(2) { height: 9px; } .mark i:nth-child(3) { height: 12px; }
.shell { display: grid; grid-template-columns: 232px minmax(0,1fr); min-height: 100vh; }
.sidebar { background: #25262d; color: #eeeef2; display: flex; flex-direction: column; gap: 31px; padding: 26px 17px 16px; }
.sidebar .brand { margin: 0 7px 6px; color: #fff; }
.nav-block { display: grid; align-content: start; gap: 5px; }
.nav-heading { padding: 0 6px; display: flex; align-items: center; justify-content: space-between; color: #c1c1cb; font-size: .78rem; font-weight: 600; }
.nav-add,.nav-logout { color: #dddbe8; background: transparent; }
.nav-add { font-size: 1.15rem; padding: 0 6px; }
.nav-add:hover,.nav-logout:hover,.project-link:hover { background: #3a3b45; }
.sidebar .space-select { background: #33343c; border-color: #4c4c58; color: white; }
.project-link { position: relative; text-align: left; background: transparent; color: #d2d2db; overflow-wrap: anywhere; padding: 8px 12px 8px 25px; }
.project-link::before { content: ""; width: 6px; height: 6px; border: 1px solid #a4a3b0; border-radius: 2px; position: absolute; top: 15px; left: 10px; }
.project-link.selected { background: #44404f; color: #faf8ff; }
.project-link.selected::before { background: #cbbff9; border-color: #cbbff9; }
.nav-archive { padding: 7px; color: #bdbcc9; font-size: .85rem; }
.nav-archive button { display: block; width: 100%; }
.account { margin-top: auto; display: flex; gap: 9px; align-items: center; padding: 14px 3px 0; border-top: 1px solid #494951; overflow-wrap: anywhere; }
.account strong { min-width: 0; font-size: .86rem; }
.nav-logout { margin-left: auto; padding: 4px; font-size: .8rem; }
.avatar { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #cce3d8; color: #315144; font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.avatar.small { width: 22px; height: 22px; font-size: .59rem; }
.main { min-width: 0; }
.topbar { min-height: 68px; padding: 12px clamp(16px,3vw,45px); display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: white; }
.crumb { color: #50545e; font-size: .88rem; overflow-wrap: anywhere; }
.crumb span { margin: 0 6px; color: #8d8e98; }
.content { max-width: 1600px; margin: auto; padding: clamp(20px,3vw,44px); }
.project-title,.toolbar,.dialog-head { display: flex; gap: 15px; justify-content: space-between; align-items: center; }
.project-title { margin-bottom: 22px; } .project-title h1 { overflow-wrap: anywhere; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); }
.tab { border-radius: 0; border-width: 0 0 2px; padding: 9px 3px 12px; }
.tab.active { border-color: var(--accent); color: var(--accent); }
.toolbar { margin: 24px 0 16px; flex-wrap: wrap; }
.board { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; align-items: stretch; }
.column { background: #efeff3; border: 1px solid #e0e0e7; border-radius: 11px; padding: 12px; min-height: 260px; }
.column-head { display: flex; align-items: center; gap: 8px; padding: 2px 1px 13px; }
.column-head h3 { font-size: .94rem; } .dot { width: 9px; height: 9px; border-radius: 50%; background: #8591a6; flex-shrink: 0; }
.in_progress .dot { background: #be833b; } .done .dot { background: #50876b; }
.count { color: #5f626c; font-size: .75rem; border-radius: 5px; font-weight: 600; background: #e1e1e8; min-width: 19px; text-align: center; }
.cards { display: grid; gap: 8px; }
.card { display: grid; gap: 7px; width: 100%; min-width: 0; padding: 13px; text-align: left; background: white; border-color: #dddde5; box-shadow: 0 1px 2px #24243508; }
.card:hover { border-color: #aaa2c9; } .card-title,.card-description { overflow-wrap: anywhere; }
.card-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: .85rem; font-weight: 400; white-space: pre-line; }
.person { display: flex; gap: 6px; align-items: center; font-size: .77rem; font-weight: 500; }
.empty-column { padding: 28px 5px; color: #717580; border: 1px dashed #cdced7; border-radius: 7px; text-align: center; font-size: .82rem; }
.card.dragging { opacity: .45; }
.card.drop-before { box-shadow: 0 -3px 0 0 var(--accent); }
.column.drop-target, .archive.drop-target { outline: 2px dashed var(--accent); outline-offset: 3px; }
.empty { margin: 22px 0; border: 1px dashed #c9c6d5; border-radius: 11px; background: #fff; padding: clamp(24px,5vw,55px); display: grid; justify-items: start; gap: 12px; }
.empty p { max-width: 54ch; }
.archive { margin: 22px 0; color: var(--muted); }
.archive summary { padding: 7px 4px; margin: 0 -4px; }
.file-list { background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.file-group { margin: 0 0 20px; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 2px 1px 9px; }
.group-head h3 { font-size: .95rem; }
.file-row,.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.file-row { padding: 15px; flex-wrap: wrap; }
.file-row:last-child,.list-row:last-child { border-bottom: none; }
.file-info { display: grid; flex: 1; min-width: 115px; overflow-wrap: anywhere; }
.file-icon { padding: 7px; font-family: monospace; font-weight: 700; border-radius: 6px; background: #ece9fa; color: var(--accent); }
.list-row { justify-content: space-between; overflow-wrap: anywhere; }
dialog { color: inherit; width: min(480px,94vw); max-height: 88vh; overflow: auto; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 80px #22223630; padding: 22px; }
dialog::backdrop { background: #24212f75; }
.dialog-head { margin-bottom: 18px; }
.dialog-tools { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 13px; display: grid; gap: 10px; }
.form,.field { display: grid; gap: 14px; }
.file-fields { display: grid; gap: 14px; min-width: 0; margin: 0; padding: 0; border: 0; }
dialog:has(.file-editor) { width: min(780px,94vw); }
.field .file-editor { font: 400 .9rem/1.5 ui-monospace, Consolas, monospace; tab-size: 4; }
.field { gap: 5px; min-width: 0; font-size: .9rem; font-weight: 550; } .field input,.field select,.field textarea { font-weight: 400; }
.form p:empty,dialog p:empty { display: none; }
.error { color: #9a3247; } .feedback,.error { font-size: .9rem; }
#notice { display: none; } #notice.visible { display: block; position: fixed; bottom: 20px; right: 20px; max-width: min(420px,90vw); background: #272631; color: #fff; padding: 13px 18px; border-radius: 9px; box-shadow: 0 4px 20px #19182130; }
#notice.error { background: #802c40; }
@media (max-width: 860px) { .shell { grid-template-columns: 190px minmax(0,1fr); } .topbar { flex-wrap: wrap; } .board { gap: 8px; } .column { padding: 8px; } }
@media (max-width: 680px) {
  .shell { display: block; } .sidebar { gap: 12px; padding: 14px 16px; } .sidebar .brand { margin: 0; font-size: 1.1rem; }
  .sidebar .nav-block { display: flex; align-items: center; flex-wrap: wrap; } .sidebar .space-select { width: auto; max-width: 75%; }
  .account { margin: 0; padding-top: 7px; } .topbar { padding: 8px 16px; min-height: 46px; }
  .board { grid-template-columns: 1fr; } .column { min-height: 95px; } .empty-column { padding: 12px 5px; }
  .topbar .quiet { font-size: .78rem; padding: 4px; } .file-row .actions { width: 100%; } .toolbar { margin-top: 17px; }
}
