:root { --navy:#0b1b3a; --navy2:#13284f; --blue:#2563eb; --blue-l:#eff6ff; --text:#0f172a; --muted:#64748b; --line:#e2e8f0; --bg:#f5f7fb; --ok:#16a34a; --warn:#d97706; --bad:#dc2626; --r:14px; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
html, body { margin:0; height:100%; }
body { font:14px/1.5 Inter, "Segoe UI", system-ui, sans-serif; color:var(--text); background:var(--bg); }
a { color:var(--blue); text-decoration:none; }
h1, h2, h3, h4 { margin:0; letter-spacing:-.01em; }
button, input, select, textarea { font:inherit; color:inherit; }
input, select, textarea { width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:#fff; }
input:focus, select:focus, textarea:focus { outline:2px solid #bfdbfe; border-color:var(--blue); }
textarea { resize:vertical; }
label { display:block; font-size:12.5px; font-weight:600; color:#334155; margin:12px 0 5px; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; padding:8px 14px; border-radius:10px; border:1px solid var(--line); background:#fff; font-weight:600; cursor:pointer; white-space:nowrap; }
.btn:hover { background:#f8fafc; } .btn:disabled { opacity:.55; cursor:default; }
.btn.primary { background:var(--blue); border-color:var(--blue); color:#fff; } .btn.primary:hover { background:#1d4ed8; }
.btn.danger { color:var(--bad); } .btn.sm { padding:5px 10px; font-size:12.5px; border-radius:8px; } .btn.ghost { border-color:transparent; background:transparent; }
.muted { color:var(--muted); } .small { font-size:12.5px; } .err { color:var(--bad); font-size:13px; min-height:1em; margin-top:8px; }
.row { display:flex; gap:10px; align-items:center; } .row.wrap { flex-wrap:wrap; } .grow { flex:1; min-width:0; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; } .grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.card { background:#fff; border:1px solid var(--line); border-radius:var(--r); padding:18px; box-shadow:0 1px 3px rgba(15,23,42,.04); }
.card.narrow { max-width:440px; width:100%; }
.center-page { min-height:100vh; display:grid; place-items:center; padding:20px; background:radial-gradient(900px 500px at 85% -10%, rgba(34,211,238,.18), transparent 60%), var(--navy); }
.spinner { width:34px; height:34px; border-radius:50%; border:3px solid rgba(255,255,255,.25); border-top-color:#fff; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.pill { display:inline-flex; align-items:center; gap:5px; padding:2px 9px; border-radius:99px; font-size:11.5px; font-weight:700; background:#f1f5f9; color:#334155; white-space:nowrap; }
.pill.low { background:#f0fdf4; color:#15803d; } .pill.medium { background:#fefce8; color:#a16207; } .pill.high { background:#fff7ed; color:#c2410c; } .pill.urgent { background:#fef2f2; color:#b91c1c; }
.pill.blue { background:var(--blue-l); color:#1d4ed8; } .pill.ok { background:#dcfce7; color:#166534; } .pill.bad { background:#fee2e2; color:#991b1b; }
.av { width:26px; height:26px; border-radius:50%; display:inline-grid; place-items:center; font-size:10.5px; font-weight:800; color:#fff; flex:none; border:2px solid #fff; }
.avs { display:inline-flex; } .avs .av + .av { margin-left:-7px; }

/* layout */
.shell { display:grid; grid-template-columns:236px 1fr; min-height:100vh; }
.side { background:var(--navy); color:#cbd5e1; padding:14px 10px; display:flex; flex-direction:column; gap:2px; position:sticky; top:0; height:100vh; overflow:auto; }
.logo { display:flex; align-items:center; gap:10px; padding:4px 8px 14px; color:#fff; font-weight:800; font-size:15px; }
.logo b { width:34px; height:34px; border-radius:10px; display:grid; place-items:center; background:linear-gradient(135deg,#2563eb,#22d3ee); font-size:15px; }
.logo small { display:block; font-size:10.5px; color:#94a3b8; font-weight:600; letter-spacing:.06em; }
.nav { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:10px; color:#cbd5e1; cursor:pointer; font-weight:500; }
.nav:hover { background:rgba(255,255,255,.06); color:#fff; } .nav.on { background:#1e3a8a; color:#fff; }
.nav .dot { width:9px; height:9px; border-radius:3px; flex:none; }
.nav .n { margin-left:auto; font-size:11px; background:#ef4444; color:#fff; border-radius:99px; padding:0 7px; }
.side-lbl { font-size:10.5px; font-weight:800; letter-spacing:.1em; color:#64748b; padding:14px 10px 5px; }
.side select { background:#13284f; color:#fff; border-color:#1e3a8a; margin:0 0 6px; }
.side .btn { background:#13284f; border-color:#1e3a8a; color:#e2e8f0; } .side .btn:hover { background:#1e3a8a; color:#fff; }
.main { min-width:0; display:flex; flex-direction:column; }
.top { display:flex; align-items:center; gap:12px; padding:12px 24px; background:#fff; border-bottom:1px solid var(--line); position:sticky; top:0; z-index:20; }
.top h1 { font-size:19px; } .top .sub { color:var(--muted); font-size:13px; }
.top .acts { margin-left:auto; display:flex; gap:8px; align-items:center; }
.bell { position:relative; } .bell .n { position:absolute; top:-5px; right:-5px; background:#ef4444; color:#fff; border-radius:99px; font-size:10px; padding:0 5px; }
.timer { background:#ecfdf5; border-color:#86efac; color:#166534; }
.page { padding:20px 24px 60px; }
.tabs { display:flex; gap:2px; border-bottom:1px solid var(--line); margin:-4px 0 16px; overflow-x:auto; }
.tabs button { border:0; background:none; padding:10px 14px; font-weight:600; color:var(--muted); border-bottom:2px solid transparent; cursor:pointer; white-space:nowrap; }
.tabs button.on { color:var(--blue); border-bottom-color:var(--blue); }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; margin-bottom:16px; }
.stat b { display:block; font-size:26px; font-weight:800; } .stat span { color:var(--muted); font-size:12.5px; }
.empty { text-align:center; color:var(--muted); padding:36px 10px; }
table { width:100%; border-collapse:collapse; }
th { text-align:left; font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:9px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
td { padding:10px; border-bottom:1px solid #f1f5f9; vertical-align:middle; }
tr.click { cursor:pointer; } tr.click:hover td { background:#f8fafc; }
.bar { height:7px; border-radius:99px; background:#e2e8f0; overflow:hidden; } .bar i { display:block; height:100%; background:var(--blue); border-radius:99px; }

/* projects */
.pgrid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.pcard { cursor:pointer; border-top:4px solid var(--blue); transition:transform .15s, box-shadow .15s; }
.pcard:hover { transform:translateY(-2px); box-shadow:0 12px 28px rgba(15,23,42,.08); }
.pcard h3 { font-size:16px; margin-bottom:4px; }
/* board */
.board { display:flex; gap:14px; align-items:flex-start; overflow-x:auto; padding-bottom:12px; min-height:60vh; }
.col { background:#eef2f7; border-radius:14px; width:290px; flex:none; display:flex; flex-direction:column; max-height:calc(100vh - 210px); }
.col-h { display:flex; align-items:center; gap:8px; padding:11px 12px 7px; font-weight:700; }
.col-h .c { color:var(--muted); font-weight:600; font-size:12px; }
.col-b { padding:4px 10px 10px; display:flex; flex-direction:column; gap:8px; overflow-y:auto; min-height:60px; }
.col.over { outline:2px dashed var(--blue); outline-offset:-4px; }
.tcard { background:#fff; border-radius:11px; padding:10px 11px; border:1px solid var(--line); cursor:pointer; box-shadow:0 1px 2px rgba(15,23,42,.05); }
.tcard:hover { border-color:#93c5fd; } .tcard.dragging { opacity:.4; }
.tcard .t { font-weight:600; margin-bottom:6px; word-wrap:break-word; } .tcard.done .t { text-decoration:line-through; color:var(--muted); }
.meta { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:12px; color:var(--muted); }
.meta .late { color:var(--bad); font-weight:700; }
.addtask { border:1px dashed #cbd5e1; background:transparent; border-radius:10px; padding:8px; color:var(--muted); cursor:pointer; text-align:left; }
.addtask:hover { background:#fff; }
/* calendar */
.cal { display:grid; grid-template-columns:repeat(7,1fr); border:1px solid var(--line); border-radius:14px; overflow:hidden; background:#fff; }
.cal .dh { padding:8px; font-size:11px; font-weight:800; color:var(--muted); text-transform:uppercase; background:#f8fafc; border-bottom:1px solid var(--line); }
.cal .d { min-height:112px; border-right:1px solid #f1f5f9; border-bottom:1px solid #f1f5f9; padding:5px; font-size:12px; }
.cal .d.out { background:#fafbfd; color:#cbd5e1; } .cal .d.today .num { background:var(--blue); color:#fff; }
.cal .num { display:inline-grid; place-items:center; width:22px; height:22px; border-radius:50%; font-weight:700; margin-bottom:3px; }
.cal .ev { display:block; padding:2px 6px; border-radius:6px; margin-top:2px; font-size:11.5px; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; cursor:pointer; }
.cal .ev.done { opacity:.45; text-decoration:line-through; }
/* drawer */
.drawer { position:fixed; inset:0; z-index:60; background:rgba(15,23,42,.35); display:flex; justify-content:flex-end; }
.drawer .panel { width:min(760px,100%); height:100%; background:#fff; overflow-y:auto; box-shadow:-20px 0 50px rgba(0,0,0,.2); animation:slide .2s ease; }
@keyframes slide { from { transform:translateX(40px); opacity:0; } }
.dh { display:flex; gap:10px; align-items:center; padding:16px 20px; border-bottom:1px solid var(--line); position:sticky; top:0; background:#fff; z-index:2; }
.db { padding:18px 20px 40px; }
.ttl { font-size:21px; font-weight:800; border:1px solid transparent; padding:4px 6px; margin:-4px -6px; border-radius:8px; width:100%; }
.ttl:hover { border-color:var(--line); }
.fields { display:grid; grid-template-columns:140px 1fr; gap:8px 12px; align-items:center; margin:14px 0; }
.fields > span { color:var(--muted); font-size:12.5px; font-weight:600; }
.sec { margin-top:22px; } .sec h4 { font-size:13px; text-transform:uppercase; letter-spacing:.06em; color:#475569; margin-bottom:8px; display:flex; gap:8px; align-items:center; }
.ci { display:flex; gap:8px; align-items:center; padding:5px 0; } .ci input[type=checkbox] { width:auto; }
.ci.done span { text-decoration:line-through; color:var(--muted); }
.cmt { display:flex; gap:10px; padding:10px 0; border-bottom:1px solid #f1f5f9; } .cmt .b { white-space:pre-wrap; word-wrap:break-word; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { display:inline-flex; gap:6px; align-items:center; padding:3px 6px 3px 3px; border-radius:99px; background:#f1f5f9; font-size:12.5px; }
.chip button { border:0; background:none; cursor:pointer; color:var(--muted); padding:0 3px; }
.act { font-size:12.5px; color:var(--muted); padding:4px 0; }
/* modal / toast */
.modal { position:fixed; inset:0; z-index:80; background:rgba(15,23,42,.45); display:grid; place-items:center; padding:20px; }
.modal .box { background:#fff; border-radius:18px; padding:22px; width:min(560px,100%); max-height:92vh; overflow:auto; box-shadow:0 30px 80px rgba(0,0,0,.3); }
.modal .box.wide { width:min(860px,100%); }
.modal h3 { font-size:18px; margin-bottom:4px; }
.actions { display:flex; gap:8px; justify-content:flex-end; margin-top:18px; }
.toast { position:fixed; left:50%; bottom:22px; transform:translate(-50%,30px); background:var(--navy); color:#fff; padding:10px 16px; border-radius:12px; opacity:0; transition:all .25s; z-index:99; pointer-events:none; }
.toast.show { opacity:1; transform:translate(-50%,0); }
/* assistant */
.ai-facts { background:#f8fafc; border:1px solid var(--line); border-radius:12px; padding:12px 14px; }
.ai-text { white-space:pre-wrap; background:#fff; border:1px solid #c7d2fe; border-radius:12px; padding:14px 16px; }
.tag-ai { font-size:11px; font-weight:800; color:#6d28d9; background:#ede9fe; border-radius:6px; padding:2px 7px; }
.notif { display:flex; gap:10px; padding:11px 12px; border-radius:12px; cursor:pointer; } .notif:hover { background:#f8fafc; } .notif.unread { background:#eff6ff; }
.charts { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; }
.hbar { display:grid; grid-template-columns:120px 1fr 40px; gap:8px; align-items:center; font-size:12.5px; margin:5px 0; }
@media (max-width:900px) {
  .shell { grid-template-columns:1fr; } .side { position:static; height:auto; flex-direction:row; flex-wrap:wrap; }
  .side .side-lbl, .side .recent { display:none; } .page { padding:16px; } .grid2, .grid3 { grid-template-columns:1fr; } .fields { grid-template-columns:1fr; }
}
