:root { --deep: #1e1b4b; --accent: #6366f1; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0; --bg: #f8fafc; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, sans-serif; color: var(--ink); background: var(--bg); }
h1 { font-size: 1.15rem; margin: 0; white-space: nowrap; }
h1 span { color: var(--accent); }
button { font: inherit; border: 0; border-radius: 8px; padding: 8px 14px; background: var(--accent); color: #fff; cursor: pointer; }
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.error { color: #dc2626; min-height: 1.2em; margin: 0; }

#login { min-height: 100vh; display: grid; place-items: center; background: var(--deep); }
.card.narrow { background: #fff; padding: 28px; border-radius: 14px; width: min(360px, 92vw); display: grid; gap: 14px; }

header { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 20px; background: var(--deep); color: #fff; }
header h1 span { color: #a5b4fc; }
header #search { flex: 1; min-width: 160px; }
header select { width: auto; }
header #me { font-size: 13px; color: #c7d2fe; }
header .ghost { color: #c7d2fe; border-color: #4338ca; }

#board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; padding: 20px; overflow-x: auto; }
.col { background: #eef2ff; border-radius: 12px; padding: 12px; min-height: 60vh; transition: background .15s; }
.col.over { background: #e0e7ff; }
.col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 2px 4px 12px; }
.col h2 span { background: #fff; border-radius: 99px; padding: 1px 8px; margin-left: 4px; }
.ticket { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; cursor: pointer; }
.ticket:hover { border-color: var(--accent); }
.ticket .top { display: flex; justify-content: space-between; font-size: 12px; }
.ticket .key { color: var(--muted); font-weight: 600; }
.ticket .title { margin: 4px 0 6px; font-weight: 600; }
.ticket .foot { font-size: 12px; color: var(--muted); }
.pri { border-radius: 99px; padding: 0 8px; font-weight: 600; }
.pri.low { background: #f1f5f9; color: #475569; }
.pri.medium { background: #e0f2fe; color: #0369a1; }
.pri.high { background: #ffedd5; color: #c2410c; }
.pri.urgent { background: #fee2e2; color: #b91c1c; }

dialog { border: 0; border-radius: 14px; padding: 0; width: min(640px, 94vw); }
dialog::backdrop { background: rgb(15 23 42 / .5); }
#ticket-form { display: grid; gap: 12px; padding: 20px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
#t-extra h3 { font-size: 14px; margin: 12px 0 6px; }
#t-extra ul { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; font-size: 13px; }
#t-comments p { margin: 2px 0 0; white-space: pre-wrap; }

@media (max-width: 700px) { #board { grid-template-columns: 1fr; } .col { min-height: auto; } }
