:root { --ink:#1b1f23; --muted:#6b7280; --line:#e5e7eb; --bg:#f7f7f8; --card:#fff; --accent:#1f5fbf; --ok:#15803d; --warn:#b45309; --bad:#b91c1c; }
* { box-sizing: border-box; }
body { margin:0; font:14px/1.45 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color:var(--ink); background:var(--bg); }
a { color:var(--accent); text-decoration:none; } a:hover { text-decoration:underline; }
h1 { font-size:22px; margin:0 0 12px; } h2 { font-size:17px; margin:22px 0 8px; } h3 { font-size:15px; margin:16px 0 6px; }
.top { display:flex; align-items:center; gap:18px; padding:8px 16px; background:#fff; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.brand { font-weight:600; color:var(--ink); }
.top nav a { margin-right:14px; }
.who { margin-left:auto; color:var(--muted); display:flex; gap:8px; align-items:center; }
main { padding:16px; max-width:1400px; margin:0 auto; }
.narrow { max-width:420px; margin:40px auto; background:#fff; padding:24px; border:1px solid var(--line); border-radius:8px; }
.muted { color:var(--muted); } .small { font-size:12px; padding:3px 8px; }
.flash { padding:8px 12px; border-radius:6px; margin-bottom:12px; background:#ecfdf5; border:1px solid #a7f3d0; }
.flash.error { background:#fef2f2; border-color:#fecaca; }
.pill { background:var(--bad); color:#fff; border-radius:10px; padding:0 7px; font-size:12px; }
.pill.warn { background:var(--warn); }
.badge { display:inline-block; padding:1px 8px; border-radius:10px; font-size:12px; background:#eef2ff; color:#3730a3; white-space:nowrap; }
.cat-super { background:#dcfce7; color:#166534; } .cat-normal { background:#e0f2fe; color:#075985; }
.cat-low { background:#fef3c7; color:#92400e; } .cat-loss { background:#fee2e2; color:#991b1b; } .cat-na { background:#f3f4f6; color:#6b7280; }
.sig-new { background:#fee2e2; color:#991b1b; } .sig-in_work { background:#fef3c7; color:#92400e; } .sig-postponed { background:#e0e7ff; color:#3730a3; }
.sig-done { background:#dcfce7; color:#166534; } .sig-rejected_pending { background:#fde68a; color:#78350f; }
.signal.rejected_pending { border-left-color:#d97706; } .sig-rejected { background:#f3f4f6; color:#6b7280; }
.st-lead { background:#f3f4f6; color:#374151; } .st-contract { background:#e0e7ff; color:#3730a3; } .st-work { background:#dbeafe; color:#1e40af; }
.st-pause { background:#fef3c7; color:#92400e; } .st-delivered { background:#dcfce7; color:#166534; } .st-closed { background:#e5e7eb; color:#374151; }
.ok { color:var(--ok); } .no { color:var(--bad); } .warn { color:var(--warn); }
table { border-collapse:collapse; width:100%; background:#fff; }
th, td { border-bottom:1px solid var(--line); padding:6px 8px; text-align:left; vertical-align:top; }
th { background:#f3f4f6; font-weight:600; font-size:12px; text-transform:none; }
td.num, th.num { text-align:right; white-space:nowrap; }
tr.stale td { background:#fff7ed; }
.tablewrap { overflow-x:auto; background:#fff; border:1px solid var(--line); border-radius:8px; }
.card { background:var(--card); border:1px solid var(--line); border-radius:8px; padding:12px 14px; }
.cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:10px; margin:10px 0 16px; }
.kpi .label { color:var(--muted); font-size:12px; } .kpi .value { font-size:18px; font-weight:600; margin-top:2px; } .kpi .sub { font-size:12px; color:var(--muted); }
.row { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.stack label, .row label { display:flex; flex-direction:column; gap:3px; font-size:12px; color:var(--muted); }
.stack { display:flex; flex-direction:column; gap:10px; }
input, select, textarea, button { font:inherit; }
input, select, textarea { padding:5px 7px; border:1px solid #cbd5e1; border-radius:5px; background:#fff; color:var(--ink); }
input[type=number] { width:110px; } input[type=date] { width:140px; } textarea { min-height:60px; width:100%; }
button { padding:5px 11px; border:1px solid #cbd5e1; border-radius:5px; background:#fff; cursor:pointer; }
button.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
button.danger { color:var(--bad); } button.link { border:none; background:none; color:var(--accent); padding:0; }
.inline { display:inline; }
.tabs { display:flex; gap:4px; flex-wrap:wrap; margin:14px 0 10px; border-bottom:1px solid var(--line); }
.tabs a { padding:8px 12px; border-radius:6px 6px 0 0; color:var(--muted); }
.tabs a.active { background:#fff; color:var(--ink); border:1px solid var(--line); border-bottom-color:#fff; margin-bottom:-1px; font-weight:600; }
.sigform { display:flex; gap:4px; flex-wrap:wrap; align-items:center; }
.sigform input { width:150px; } .sigform input[type=date] { width:130px; }
.signal { border-left:4px solid var(--bad); padding:8px 12px; margin-bottom:8px; background:#fff; border-radius:0 6px 6px 0; }
.signal.in_work { border-left-color:var(--warn); } .signal.postponed { border-left-color:#4f46e5; }
.signal .hint { color:var(--muted); font-size:13px; }
.hidden { display:none; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:16px; } @media (max-width:900px) { .grid2 { grid-template-columns:1fr; } }
.quick form { display:inline; } .quick button { padding:2px 6px; font-size:12px; margin:1px; }
details summary { cursor:pointer; color:var(--accent); }
.filters { display:flex; gap:8px; flex-wrap:wrap; align-items:flex-end; margin-bottom:12px; }
.hint-box { background:#fffbeb; border:1px solid #fde68a; padding:8px 10px; border-radius:6px; font-size:13px; }
pre { background:#f3f4f6; padding:10px; border-radius:6px; overflow-x:auto; }
.right { text-align:right; }
@media (max-width:700px) { main { padding:10px; } .top { gap:8px; } .who { margin-left:0; } }
.ball-client { background:#dcfce7; color:#166534; } .ball-ours { background:#fee2e2; color:#991b1b; } .ball-pause { background:#fef3c7; color:#92400e; }
.ball-btn { width:22px; height:22px; border-radius:50%; border:2px solid transparent; cursor:pointer; padding:0; font-size:0; }
.ball-btn.client { background:#22c55e; } .ball-btn.ours { background:#ef4444; } .ball-btn.pause { background:#eab308; }
.ball-btn.active { border-color:#1b1f23; box-shadow:0 0 0 2px #fff inset; }
.sigform textarea { width:100%; min-height:48px; }
.qrow { display:grid; grid-template-columns:1fr 180px; gap:8px; align-items:center; padding:6px 0; border-bottom:1px solid var(--line); }
.succ-pos { color:var(--ok); } .succ-neg { color:var(--bad); }
.edit-box { background:#f9fafb; border:1px solid var(--line); border-radius:6px; padding:8px; margin:4px 0; }
.task-head td { background:#f3f4f6; }
.task-add td { background:#fafafa; }
.bulkbar { margin-bottom:8px; }
details.inline { display:inline-block; }
.badge.inwork { background:#e0f2fe; color:#075985; }
