:root { --navy:#21325e; --red:#ba1646; --ink:#1c2333; --mut:#5b6577; --line:#dde2ec; --bg:#f4f6fa; --card:#fff; }
* { box-sizing:border-box; }
body { margin:0; font-family:-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif; background:var(--bg); color:var(--ink); }
button { font:inherit; cursor:pointer; }
input,select,textarea { font:inherit; padding:7px 9px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.btn { background:var(--navy); color:#fff; border:0; border-radius:8px; padding:8px 14px; }
.btn.red { background:var(--red); }
.btn.ghost { background:#fff; color:var(--navy); border:1px solid var(--line); }
.btn.small { padding:4px 10px; font-size:13px; }
.btn:disabled { opacity:.5; cursor:default; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; margin-bottom:14px; }
.grid { display:grid; gap:14px; }
.grid.c2 { grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); }
.grid.c3 { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
h1 { font-size:22px; margin:0 0 4px; } h2 { font-size:17px; margin:0 0 10px; } h3 { font-size:15px; margin:14px 0 8px; }
.mut { color:var(--mut); font-size:13px; }
.money { font-weight:600; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th,td { text-align:left; padding:7px 8px; border-bottom:1px solid var(--line); }
th { color:var(--mut); font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.badge { display:inline-block; min-width:20px; text-align:center; background:var(--red); color:#fff; border-radius:999px; font-size:12px; padding:1px 6px; margin-left:6px; }
.pill { display:inline-block; border-radius:999px; padding:2px 10px; font-size:12px; font-weight:600; }
.st-pending { background:#fff6bf; } .st-inprogress,.st-ordered { background:#dbeafe; }
.st-arrived { background:#fef08a; } .st-done,.st-delivered,.st-completed,.st-approved { background:#bbf7d0; }
.st-denied,.st-cancelled { background:#fecaca; } .st-gray { background:#e5e7eb; }
.st-connected { background:#bbf7d0; } .st-disconnected { background:#fecaca; }
/* auth */
.auth-wrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; }
.auth-card { background:#fff; border:1px solid var(--line); border-radius:16px; padding:28px; width:360px; max-width:100%; }
.auth-card label { display:block; font-size:13px; color:var(--mut); margin:12px 0 4px; }
.auth-card input { width:100%; }
.brand { color:var(--navy); font-weight:800; font-size:20px; } .brand span { color:var(--red); }
.err { background:#fee2e2; border:1px solid #fca5a5; color:#7f1d1d; border-radius:8px; padding:8px 10px; font-size:14px; margin-top:10px; }
/* shell */
.shell { display:flex; min-height:100vh; }
.sidebar { position:fixed; top:0; bottom:0; left:0; background:var(--navy); color:#dbe4f5; display:flex; flex-direction:column; z-index:20; }
.sidebar .logo { padding:14px 14px 8px; font-weight:800; color:#fff; font-size:15px; line-height:1.25; }
.sidebar .logo span { color:#ff7d9c; }
.nav { overflow-y:auto; flex:1; padding:4px 8px; }
.nav button { display:flex; align-items:center; gap:8px; width:100%; text-align:left; background:none; border:0; color:#dbe4f5; padding:8px 9px; border-radius:8px; font-size:14px; white-space:nowrap; }
.nav button:hover { background:#2b4076; }
.nav button.active { background:#fff; color:var(--navy); font-weight:700; }
.nav .hub { font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:#8fa3cc; padding:10px 9px 2px; }
.nav .sub { padding-left:24px; font-size:13px; }
.side-refresh { padding:2px 14px 10px; }
.side-refresh .btn { width:100%; font-weight:700; }
.side-foot { padding:10px 14px; font-size:13px; border-top:1px solid #33477a; }
.side-foot button { background:none; border:0; color:#ffb3c2; padding:0; }
.dragbar { position:absolute; top:0; right:-4px; width:8px; bottom:0; cursor:col-resize; }
.main { flex:1; padding:20px 22px 60px; min-width:0; }
.topbar { display:flex; align-items:center; gap:10px; margin-bottom:14px; flex-wrap:wrap; }
.topbar .spacer { flex:1; }
/* leads dwell badge */
.dwell { float:right; border-radius:8px; padding:2px 8px; font-size:12px; font-weight:700; }
.dwell.g { background:#bbf7d0; } .dwell.y { background:#fef08a; } .dwell.o { background:#fed7aa; } .dwell.r { background:#fecaca; }
/* catalogs */
.chip { border:1px solid var(--line); background:#fff; border-radius:999px; padding:5px 12px; margin:0 6px 6px 0; font-size:13px; }
.autco-row { display:flex; background:#fff; border:1px solid var(--line); border-radius:10px; margin-bottom:8px; overflow:hidden; cursor:pointer; }
.autco-tab { writing-mode:vertical-rl; transform:rotate(180deg); color:#fff; font-size:11px; font-weight:700; letter-spacing:.06em; padding:8px 3px; text-align:center; }
.autco-body { flex:1; padding:9px 12px; min-width:0; }
.audit-btn { border:0; border-radius:8px; padding:6px 12px; font-weight:600; background:#fef08a; }
.audit-btn.done { background:#bbf7d0; }
/* calendar */
.cal { display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal .day { background:#fff; border:1px solid var(--line); border-radius:8px; min-height:74px; padding:6px; font-size:12px; }
.cal .day.off { background:#fafafa; color:#aab; }
.cal .day.free { background:#dcfce7; } .cal .day.notfree { background:#fee2e2; }
.cal .day .cust { display:block; font-weight:700; color:var(--navy); margin-top:2px; }
.modal-back { position:fixed; inset:0; background:rgba(15,20,35,.5); display:flex; align-items:center; justify-content:center; z-index:50; padding:16px; }
.modal { background:#fff; border-radius:14px; padding:20px; width:560px; max-width:100%; max-height:90vh; overflow-y:auto; }
.modal label { display:block; font-size:13px; color:var(--mut); margin:10px 0 4px; }
.modal input,.modal select,.modal textarea { width:100%; }
.rowflex { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.kv { display:flex; justify-content:space-between; padding:3px 0; border-bottom:1px dashed var(--line); font-size:14px; }
@media (max-width:760px){ .main{padding:14px;} }
