:root {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color-scheme: dark;
  --bg: #101821; --nav: #0c131b; --surface: #18232e; --raised: #202e3a;
  --line: #324250; --text: #edf5f5; --muted: #9aafba; --mint: #9af1cb;
  --blue: #9dcaff; --amber: #f5cb86; --red: #ffabae;
  background: var(--bg); color: var(--text); font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, .button, input, select, textarea { border: 1px solid var(--line); border-radius: 8px; }
button, .button { background: var(--raised); color: var(--text); padding: .6rem .88rem; cursor: pointer; font-weight: 600; font-size: .9rem; }
button:hover, .button:hover { border-color: var(--muted); }
button:disabled { opacity: .5; cursor: wait; }
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
.primary { background: var(--mint); color: #0c2920; border-color: var(--mint); }
.primary:hover { background: #b9ffdf; border-color: #b9ffdf; }
.quiet { background: transparent; }
.danger { color: var(--red); }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
input, select, textarea { width: 100%; min-width: 0; padding: .65rem .75rem; background: var(--nav); color: var(--text); }
textarea { min-height: 6rem; resize: vertical; }
select { padding-right: 1.7rem; }
::placeholder { color: var(--muted); }
input[type=checkbox] { width: 1.05rem; height: 1.05rem; accent-color: var(--mint); }
h1, h2, h3, p { margin: 0; }
.muted, small { color: var(--muted); }
.loading { display: grid; min-height: 100vh; place-items: center; color: var(--muted); }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); font-size: 1.15rem; font-weight: 750; letter-spacing: -.03em; }
.mark { background: var(--mint); color: #0c2920; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; font-size: 1.2rem; }
.login { min-height: 100vh; display: grid; align-items: center; justify-content: center; padding: 1.5rem; background: radial-gradient(ellipse at 50% 0%, #1c393b, transparent 65%); }
.login-panel { width: min(100%, 420px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.4rem, 5vw, 2.4rem); box-shadow: 0 24px 80px #060c1666; }
.login-panel h1 { font-size: 2rem; margin: 1.6rem 0 1rem; letter-spacing: -.04em; }
.login-panel form { margin-top: 1rem; }
.login-panel .primary { width: 100%; }
.layout { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
aside { background: var(--nav); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 1.3rem 1rem; gap: 1.65rem; }
aside .brand { margin: 0 .5rem .25rem; }
.nav-block { display: grid; gap: .28rem; }
.nav-label { color: var(--muted); font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; padding: 0 .5rem .3rem; }
.nav-label-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0 .15rem 0 0; }
.nav-label-row button { padding: .1rem .48rem; }
.nav-item { display: flex; align-items: center; gap: .6rem; text-align: left; background: transparent; border-color: transparent; padding: .55rem .55rem; min-width: 0; }
.nav-item[aria-current=true] { background: #1b3034; border-color: #28454a; color: var(--mint); }
.nav-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-code { display: grid; place-items: center; flex: 0 0 2rem; min-height: 1.62rem; border-radius: 5px; background: #253941; color: var(--mint); font-size: .72rem; }
.nav-spacer { flex: 1; }
.nav-footer { border-top: 1px solid var(--line); padding-top: .8rem; }
.topbar { min-height: 66px; padding: .75rem clamp(1rem, 3vw, 2rem); display: flex; gap: 1rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.search { width: min(32rem, 100%); display: flex; align-items: center; gap: .5rem; }
.search input { background: var(--surface); }
.account { background: transparent; white-space: nowrap; }
.content { max-width: 1800px; margin: 0 auto; padding: 1.65rem clamp(1rem, 3vw, 2rem); }
.heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.heading h1 { font-size: clamp(1.8rem, 4vw, 2.55rem); line-height: 1.12; letter-spacing: -.045em; margin-bottom: .45rem; }
.heading p { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.heading-actions, .actions, .filters { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.heading-actions { justify-content: flex-end; }
.viewbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.tabs { display: flex; border: 1px solid var(--line); padding: .22rem; border-radius: 9px; background: var(--nav); }
.tabs button { background: transparent; border: 1px solid transparent; color: var(--muted); padding: .45rem .85rem; }
.tabs button[aria-pressed=true] { background: var(--raised); color: var(--text); border-color: var(--line); }
.filters select { width: auto; max-width: 12rem; font-size: .875rem; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.lane { display: flex; flex-direction: column; background: #141f29; border: 1px solid var(--line); border-radius: 12px; min-height: 18rem; padding: .75rem; }
.lane[data-drop=true] { border-color: var(--mint); background: #172e2e; }
.lane-head { display: flex; align-items: center; gap: .42rem; margin-bottom: .75rem; min-height: 2.05rem; }
.lane-head h2 { font-size: .93rem; }
.dot { display: inline-block; width: .58rem; height: .58rem; border-radius: 50%; background: var(--muted); flex: 0 0 .58rem; }
.inProgress .dot { background: var(--blue); }
.review .dot { background: var(--amber); }
.done .dot { background: var(--mint); }
.count { color: var(--muted); background: #253441; border-radius: 6px; min-width: 1.55rem; text-align: center; font-size: .8rem; padding: .12rem .22rem; }
.lane-head button { margin-left: auto; padding: .2rem .45rem; background: transparent; }
.cards { display: grid; gap: .5rem; }
.card { width: 100%; text-align: left; border-radius: 9px; padding: .75rem; background: var(--surface); display: grid; gap: .42rem; }
.card:hover { background: var(--raised); }
.card-key { font-size: .76rem; font-weight: 700; letter-spacing: .025em; color: var(--muted); }
.card-title { line-height: 1.35; overflow-wrap: anywhere; }
.card-meta { color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 500; flex-wrap: wrap; }
.priority { border-radius: 5px; padding: .16rem .4rem; display: inline-block; background: #263944; color: #c2d8e5; }
.priority.high { background: #3d3024; color: var(--amber); }
.priority.urgent { background: #43272d; color: var(--red); }
.overdue { color: var(--red); }
.empty-lane { text-align: center; border: 1px dashed var(--line); padding: 1rem .45rem; border-radius: 8px; color: var(--muted); font-size: .85rem; }
.empty-view { text-align: center; background: var(--surface); border: 1px dashed var(--line); padding: 2.3rem 1rem; border-radius: 12px; }
.empty-view h2 { margin-bottom: .5rem; }
.empty-view button { margin-top: 1rem; }
.more { margin-top: .7rem; width: 100%; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; min-width: 660px; border-collapse: collapse; background: var(--surface); }
th, td { padding: .75rem .8rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; }
th { color: var(--muted); background: var(--nav); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child, td:nth-child(3) { white-space: nowrap; }
.issue-link { background: transparent; color: var(--mint); padding: .15rem 0; border: 0; text-align: left; }
.issue-link:hover { text-decoration: underline; }
.table-status { display: inline-flex; align-items: center; gap: .4rem; }
dialog { color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(94vw, 710px); max-height: 92dvh; box-shadow: 0 26px 90px #04080eb8; }
dialog::backdrop { background: #050a10b8; }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: 1rem 1.25rem; background: var(--nav); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1; }
.dialog-header h2 { font-size: 1.22rem; }
.dialog-body { padding: 1.15rem 1.25rem 1.4rem; }
form, .fields { display: grid; gap: .8rem; }
form label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 600; min-width: 0; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
form .check { display: flex; gap: .45rem; align-items: center; }
.help, .form-error { font-size: .88rem; }
.form-error { color: var(--red); }
.form-error:empty { display: none; }
.section { margin-top: 1.35rem; border-top: 1px solid var(--line); padding-top: 1.05rem; }
.section h3 { margin-bottom: .75rem; font-size: 1.02rem; }
.comment-stack, .entry-list { display: grid; gap: .55rem; margin-bottom: .8rem; }
.comment, .entry { border: 1px solid var(--line); border-radius: 8px; padding: .65rem .8rem; background: var(--nav); }
.comment p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: .35rem; }
.entry { display: flex; gap: .55rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.entry small { display: block; }
.token-secret { font-family: monospace; word-break: break-all; color: var(--mint); }
#notice { position: fixed; bottom: 1rem; right: 1rem; z-index: 2; max-width: min(420px, 90vw); border-radius: 8px; background: var(--raised); padding: .75rem 1rem; border: 1px solid var(--line); box-shadow: 0 8px 30px #0006; }
#notice:empty { display: none; }
@media (max-width: 1120px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  aside { border-right: 0; border-bottom: 1px solid var(--line); padding: .7rem .85rem; gap: .6rem; }
  aside .brand { margin-bottom: 0; }
  .nav-block { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem; }
  .nav-footer, .nav-spacer { display: none; }
  .nav-label-row { padding-right: .35rem; }
  .nav-label { padding-bottom: 0; }
  .topbar { min-height: auto; }
}
@media (max-width: 400px) { .board, .row { grid-template-columns: 1fr; } .heading { flex-direction: column; } }
