:root { color-scheme: light; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: #f5f6f8; color: #1f2430; padding: 18px; }
.narrow-outer { max-width: 1200px; margin: 0 auto; }
.narrow { max-width: 1000px; margin: 0 auto; }
h1 { font-size: 20px; margin-bottom: 2px; }
.sub { color: #6b7280; font-size: 13px; margin-bottom: 14px; }
h2.section { font-size: 16px; margin: 24px 0 10px; display: flex; align-items: center; gap: 10px; max-width: 1000px; margin-left: auto; margin-right: auto; }
h2.section button { padding: 3px 10px; font-size: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; max-width: 1000px; margin: 0 auto; }
.whoami { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #4b5563; }
.whoami button { font-size: 12px; padding: 4px 9px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; max-width: 1000px; margin-left: auto; margin-right: auto; }
.stat { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; padding: 8px 14px; font-size: 13px; }
.stat b { font-size: 18px; display: block; }
.stat.alert b { color: #c2410c; }
button { cursor: pointer; border: 1px solid #d1d5db; background: #fff; border-radius: 6px; padding: 6px 12px; font-size: 13px; }
button.primary { background: #1e5aa8; border-color: #1e5aa8; color: #fff; }
.del { color: #b91c1c; border-color: #fca5a5; }
button:disabled { opacity: .5; cursor: default; }
/* ---- login ---- */
.login-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; border: 1px solid #e3e6ea; border-radius: 12px; padding: 26px; width: 340px; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: #4b5563; margin: 10px 0 3px; }
.login-card input, .login-card select { width: 100%; padding: 8px 9px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.login-error { color: #b91c1c; font-size: 12.5px; margin-top: 10px; }
/* ---- proposal kanban ---- */
.board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: start; max-width: 1200px; margin: 0 auto; }
@media (max-width: 1200px) { .board { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .board { grid-template-columns: repeat(2, 1fr); } .topbar { flex-direction: column; gap: 10px; } }
.col { background: #eceef2; border-radius: 10px; padding: 8px; min-height: 60px; }
.col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #4b5563; padding: 4px 6px 8px; display: flex; justify-content: space-between; }
details.card { background: #fff; border: 1px solid #e3e6ea; border-radius: 8px; margin-bottom: 8px; font-size: 12.5px; overflow: hidden; }
details.card.overdue { border-left: 4px solid #dc2626; }
details.card summary { list-style: none; cursor: pointer; padding: 8px 10px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
details.card summary::-webkit-details-marker { display: none; }
details.card summary:hover { background: #fafbfc; }
.cvei { color: #1e5aa8; font-weight: 700; flex: none; }
.cname { font-weight: 600; }
.cbody { padding: 0 10px 10px; border-top: 1px dashed #eef0f3; }
.cbody .client { color: #4b5563; margin-top: 8px; }
.cbody .meta { color: #6b7280; font-size: 12px; margin-top: 4px; }
.cbody .next { margin-top: 6px; font-size: 12px; background: #f3f4f6; border-radius: 5px; padding: 4px 6px; }
.cbody .notes { color: #4b5563; font-size: 12px; margin-top: 6px; }
.cbody a { color: #1e5aa8; font-size: 12px; text-decoration: none; }
.cbody .controls { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cbody .controls button { padding: 3px 8px; font-size: 11.5px; }
.cbody select { padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; background: #fff; max-width: 100%; }
.empty { color: #9ca3af; font-size: 12px; text-align: center; padding: 10px 0; }
.pill { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 7px; white-space: nowrap; flex: none; }
.pill.overdue { background: #fee2e2; color: #b91c1c; }
.pill.today { background: #ffedd5; color: #c2410c; }
.pill.soon { background: #fef3c7; color: #92400e; }
.pill.later { background: #e5e7eb; color: #4b5563; }
.pill.waiting { background: #dbeafe; color: #1e40af; }
.pill.pending { background: #e0e7ff; color: #3730a3; }
/* ---- project groups ---- */
.proj { background: #fff; border: 1px solid #e3e6ea; border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.proj > h3 { font-size: 14px; padding: 10px 14px; background: #f0f3f7; display: flex; justify-content: space-between; align-items: center; }
.proj > h3 .num { color: #1e5aa8; }
.proj > h3 .cnt { font-size: 12px; color: #6b7280; font-weight: 400; display: flex; align-items: center; gap: 8px; }
.proj > h3 .addbtn, .proj > h3 .renamebtn { padding: 2px 8px; font-size: 11.5px; color: #1e5aa8; border-color: #b6c8e0; }
.task { display: flex; gap: 10px; padding: 9px 14px; border-top: 1px solid #eef0f3; font-size: 13px; align-items: flex-start; }
.task input[type=checkbox] { margin-top: 2px; width: 15px; height: 15px; cursor: pointer; flex: none; }
.task.done .txt { text-decoration: line-through; color: #9ca3af; }
.task .txt { flex: 1; }
.task .who { color: #6b7280; font-size: 12px; margin-top: 2px; }
.task .txt a { color: #1e5aa8; font-size: 12px; text-decoration: none; }
.task .side { display: flex; gap: 6px; align-items: center; flex: none; }
.task .editbtn { padding: 1px 7px; font-size: 12px; color: #1e5aa8; border-color: #b6c8e0; }
.nonum-note { color: #6b7280; font-size: 12.5px; margin: 14px 0 8px; }
details.changes { background: #fff; border: 1px solid #e3e6ea; border-radius: 10px; margin: 10px 0; font-size: 13px; }
details.changes summary { padding: 10px 14px; cursor: pointer; color: #1e5aa8; font-weight: 600; }
details.changes .body { padding: 0 14px 10px; }
details.changes li { margin-left: 18px; margin-bottom: 3px; color: #374151; }
details.changes .d { font-weight: 600; margin-top: 6px; }
dialog { border: none; border-radius: 10px; padding: 20px; width: 440px; max-width: 92vw; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
dialog::backdrop { background: rgba(0,0,0,.35); }
dialog label { display: block; font-size: 12px; font-weight: 600; color: #4b5563; margin: 10px 0 3px; }
dialog input, dialog select, dialog textarea { width: 100%; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px; font-family: inherit; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.dlg-actions.split { justify-content: space-between; }
.dlg-actions .right { display: flex; gap: 8px; }
.footer { color: #9ca3af; font-size: 12px; margin-top: 22px; max-width: 1000px; margin-left: auto; margin-right: auto; }
