/* SEO247 Work - styles */
:root {
  --bg: #f4f5fb; --card: #ffffff; --card2: #f8f9fd; --text: #1a1c2e; --muted: #6a6f87; --line: #e6e8f2; --input: #ffffff;
  --primary: #4f46e5; --primary2: #7c3aed; --primary-bg: rgba(79,70,229,.1);
  --red: #e5484d; --red-bg: rgba(229,72,77,.12); --green: #12a150; --green-bg: rgba(18,161,80,.12);
  --amber: #d98206; --amber-bg: rgba(217,130,6,.14); --blue: #2563eb; --blue-bg: rgba(37,99,235,.12);
  --violet: #7c3aed; --violet-bg: rgba(124,58,237,.12); --gray: #6b7280; --gray-bg: rgba(107,114,128,.12);
  --shadow: 0 1px 2px rgba(20,20,60,.04), 0 6px 20px rgba(20,20,60,.06); --shadow-lg: 0 20px 60px rgba(20,20,60,.25);
  --r: 16px; --side: 252px; --tab: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-theme=dark] {
  --bg: #0d0e1c; --card: #161830; --card2: #1c1f3a; --text: #eceefb; --muted: #9a9fbd; --line: #272a4a; --input: #11122a;
  --primary: #818cf8; --primary2: #a78bfa; --primary-bg: rgba(129,140,248,.16);
  --red: #ff6b70; --red-bg: rgba(255,107,112,.15); --green: #3ddc84; --green-bg: rgba(61,220,132,.14);
  --amber: #fbb040; --amber-bg: rgba(251,176,64,.15); --blue: #6ea0ff; --blue-bg: rgba(110,160,255,.15);
  --violet: #b794ff; --violet-bg: rgba(183,148,255,.16); --gray: #9ca3af; --gray-bg: rgba(156,163,175,.15);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.3);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.noscroll { overflow: hidden; } html, body { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
b { font-weight: 650; }
.muted { color: var(--muted); } .sm { font-size: 13px; } .center { text-align: center; } .grow { flex: 1; min-width: 0; } .full { grid-column: 1 / -1; }
[hidden] { display: none !important; }

/* tones */
.red { --c: var(--red); --cb: var(--red-bg); } .green { --c: var(--green); --cb: var(--green-bg); } .amber { --c: var(--amber); --cb: var(--amber-bg); }
.blue { --c: var(--blue); --cb: var(--blue-bg); } .violet { --c: var(--violet); --cb: var(--violet-bg); } .gray { --c: var(--gray); --cb: var(--gray-bg); }
b.red, b.green, b.amber, .amt.red, .amt.green, .amt.amber, td.red, td.green, span.red, small.red { color: var(--c); }

.ic { width: 18px; height: 18px; flex: none; } .ic.xl { width: 46px; height: 46px; } .ic.tiny { width: 13px; height: 13px; vertical-align: -2px; } .ic.back-ic { transform: rotate(90deg); width: 16px; height: 16px; }

/* boot / spinner */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ layout ============ */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; background: var(--card); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 9px 14px; }
.brand.mobile { display: none; padding: 5px 10px; border-radius: 10px; }
.logo { height: 32px; width: auto; max-width: 150px; object-fit: contain; display: block; } .logo.big { height: 46px; max-width: 220px; }
.logo-text { font-weight: 800; letter-spacing: -.02em; color: #4f46e5; font-size: 20px; }
.side nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--muted); font-weight: 550; transition: .2s; position: relative; }
.nav:hover { background: var(--card2); color: var(--text); }
.nav.on { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; box-shadow: 0 8px 20px -8px var(--primary); }
.nav .badge { margin-left: auto; }
.badge { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center; animation: pop .4s; }
.side-foot { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; } .me div { display: flex; flex-direction: column; min-width: 0; } .me b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me small { color: var(--muted); font-size: 12px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top-search { max-width: 360px; width: 100%; }
#view { flex: 1; }
.page { max-width: 1180px; margin: 0 auto; padding: 26px 28px 60px; display: flex; flex-direction: column; gap: 18px; animation: fade .35s both; }
.offline { background: var(--amber); color: #fff; text-align: center; padding: 6px; font-size: 13px; font-weight: 600; }
.tabbar, .fab { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; letter-spacing: -.02em; font-weight: 750; } .page-head p { margin-top: 3px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ============ components ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); animation: up .45s both; animation-delay: calc(var(--i, 0) * 55ms); }
.card.hover { transition: .22s; } .card.hover:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(60,60,140,.16); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; } .card-h h2 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card h4 { font-size: 13px; color: var(--muted); font-weight: 650; margin-bottom: 6px; }
.skel { height: 110px; background: linear-gradient(100deg, var(--card) 30%, var(--card2) 50%, var(--card) 70%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
.sep { height: 1px; background: var(--line); margin: 14px 0; }
.link { color: var(--primary); font-weight: 600; font-size: 13px; }
.grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } .grid.two > .card { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 14px; width: fit-content; } .back:hover { color: var(--primary); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 12px; font-weight: 650; font-size: 14px; border: 1px solid transparent; transition: .18s; white-space: nowrap; }
.btn:active { transform: scale(.97); } .btn[disabled] { opacity: .6; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; box-shadow: 0 8px 18px -8px var(--primary); } .btn.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.soft { background: var(--primary-bg); color: var(--primary); } .btn.soft:hover { background: color-mix(in srgb, var(--primary) 20%, transparent); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); } .btn.ghost:hover { background: var(--card2); }
.btn.danger { background: var(--red); color: #fff; } .btn.danger-soft { background: var(--red-bg); color: var(--red); }
.btn.wa { background: #25d366; color: #fff; } .btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; } .btn.block { width: 100%; padding: 13px; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; display: inline-grid; place-items: center; color: var(--muted); transition: .15s; flex: none; }
.icon-btn:hover { background: var(--card2); color: var(--text); } .icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; } .icon-btn.xs { width: 26px; height: 26px; border-radius: 7px; } .icon-btn.xs .ic { width: 14px; height: 14px; }
.icon-btn.danger:hover { background: var(--red-bg); color: var(--red); } .icon-btn.wa { color: #25d366; } .icon-btn.wa:hover { background: rgba(37,211,102,.14); color: #1fb855; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.seg { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 11px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; } .seg button.on { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }

/* pills, chips */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--cb); color: var(--c); white-space: nowrap; }
.pill.clickable { cursor: pointer; } .pill.clickable:hover { filter: brightness(.95); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; } .chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .chips.scroll::-webkit-scrollbar { display: none; }
.chip { padding: 7px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--muted); transition: .15s; white-space: nowrap; display: inline-flex; align-items: center; }
.chip:hover { border-color: var(--primary); color: var(--primary); } .chip.on { background: var(--primary); border-color: var(--primary); color: #fff; } .chip.small { padding: 4px 11px; font-size: 12px; } .chip.other { border-style: dashed; }
.chip.ghosty { padding: 0; overflow: hidden; gap: 0; } .chip.ghosty button { padding: 7px 10px; color: inherit; } .chip.ghosty .x { padding: 7px 8px 7px 2px; opacity: .5; } .chip.ghosty .x:hover { opacity: 1; color: var(--red); } .chip em { font-style: normal; opacity: .6; font-size: 11px; }
.chips.wrapall { margin-top: 6px; }
.mini-row { display: flex; flex-wrap: wrap; gap: 6px; } .mini { background: var(--card2); border: 1px solid var(--line); padding: 2px 9px; border-radius: 8px; font-size: 12px; color: var(--muted); font-weight: 550; }
.dot, .dotc { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }

/* search / toolbar */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; flex: 1; min-width: 200px; transition: .15s; }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); } .search .ic { color: var(--muted); }
.search input { border: 0; outline: 0; background: transparent; padding: 10px 0; width: 100%; font-size: 14px; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; } .tiles.sm { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; background: linear-gradient(135deg, var(--cb), transparent 75%), var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); overflow: hidden; animation: up .5s both; transition: .2s; }
a.tile:hover { transform: translateY(-3px); } .tile::after { content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%; background: var(--cb); }
.tile:nth-child(2) { animation-delay: .06s; } .tile:nth-child(3) { animation-delay: .12s; } .tile:nth-child(4) { animation-delay: .18s; }
.tile-l { font-size: 12.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tile b { font-size: 28px; letter-spacing: -.02em; color: var(--c); font-weight: 750; line-height: 1.15; } .tiles.sm .tile b { font-size: 22px; } .tile small { color: var(--muted); font-size: 12.5px; }
.tile-act { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; gap: 4px; align-items: center; background: #25d366; color: #fff; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; }

/* rows */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-top: 1px solid var(--line); animation: up .4s both; animation-delay: calc(var(--i, 0) * 40ms); border-radius: 8px; transition: background .15s; }
.row:first-child { border-top: 0; } .row:hover { background: var(--card2); } .row.faded { opacity: .55; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; } .row-main b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .row-main > a { color: var(--primary); }
.row-end { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.row .avatar + b { margin-left: 0; } a.row-main:has(.avatar) { flex-direction: row; align-items: center; gap: 10px; }
.amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.ic-box { width: 34px; height: 34px; border-radius: 10px; background: var(--cb, var(--primary-bg)); color: var(--c, var(--primary)); display: inline-grid; place-items: center; flex: none; } .ic-box.xs { width: 26px; height: 26px; border-radius: 8px; } .ic-box.xs .ic { width: 14px; height: 14px; }
.rank { width: 26px; height: 26px; border-radius: 8px; background: var(--primary-bg); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.row .avatar { width: 32px; height: 32px; font-size: 12px; }

.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 750; font-size: 15px; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 55%), hsl(calc(var(--h) + 40) 70% 45%)); flex: none; }
.avatar.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 22px; }

/* clients */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.client { display: flex; flex-direction: column; gap: 12px; padding: 16px; } .client-top { display: flex; align-items: center; gap: 12px; } .client-top b { display: block; font-size: 15.5px; } .client-top small { color: var(--muted); }
.client-foot { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); padding-top: 10px; border-top: 1px dashed var(--line); }
.client-promise { font-size: 12px; color: var(--amber); background: var(--amber-bg); padding: 5px 10px; border-radius: 8px; font-weight: 600; }
.chead { display: flex; flex-direction: column; gap: 12px; } .chead-main { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; } .chead h1 { font-size: 24px; letter-spacing: -.02em; }
.contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.notes { background: var(--amber-bg); color: var(--text); padding: 10px 14px; border-radius: 12px; font-size: 14px; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 16px; font-weight: 650; color: var(--muted); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; transition: .15s; }
.tab:hover { color: var(--text); } .tab.on { color: var(--primary); border-color: var(--primary); } .tab em { font-style: normal; background: var(--primary-bg); color: var(--primary); font-size: 11px; padding: 1px 7px; border-radius: 99px; }

/* work card */
.work { display: flex; flex-direction: column; gap: 12px; } .work.done { opacity: .82; } .work.done h3 { text-decoration: none; }
.work-top { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; } .work h3 { font-size: 17px; letter-spacing: -.01em; } .desc { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.money { display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; } .money div { display: flex; flex-direction: column; } .money small { color: var(--muted); font-size: 12px; font-weight: 600; } .money b { font-size: 18px; font-variant-numeric: tabular-nums; } .money .pill { margin-left: auto; }
.progress { height: 8px; background: var(--card2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); } .progress i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--green), #34d399); border-radius: 99px; animation: fill 1s cubic-bezier(.2,.8,.2,1) both; }
.work-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-sel { appearance: none; -webkit-appearance: none; border: 0; border-radius: 99px; padding: 6px 28px 6px 12px; font-size: 12.5px; font-weight: 700; background: var(--cb, var(--gray-bg)) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23888' stroke-width='2'><path d='m1 1 4 4 4-4'/></svg>") no-repeat right 11px center; color: var(--c, var(--text)); cursor: pointer; max-width: 100%; }
.status-sel option { color: var(--text); background: var(--card); }
details.sec { border-top: 1px solid var(--line); } details.sec summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 2px; cursor: pointer; font-weight: 650; font-size: 14px; color: var(--muted); } details.sec summary::-webkit-details-marker { display: none; }
details.sec summary:hover { color: var(--text); } details.sec em { font-style: normal; font-size: 11px; background: var(--card2); border: 1px solid var(--line); padding: 0 7px; border-radius: 99px; } .sum-ic { margin-left: auto; transition: .2s; } details[open] .sum-ic { transform: rotate(180deg); }
.sec-body { padding: 2px 2px 12px; display: flex; flex-direction: column; gap: 6px; animation: fade .25s; }
.task { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; } .task.done > span { text-decoration: line-through; color: var(--muted); } .task a { color: var(--primary); font-weight: 550; flex: 1; overflow: hidden; text-overflow: ellipsis; } .task > span:not(.ic-box) { flex: 1; }
.check-btn { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; flex: none; transition: .2s; } .check-btn .ic { width: 13px; height: 13px; stroke-width: 3; } .check-btn:hover { border-color: var(--green); } .check-btn.on { background: var(--green); border-color: var(--green); color: #fff; animation: pop .3s; }
.inline-add { display: flex; gap: 8px; margin-top: 4px; } .inline-add input { flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); outline: 0; } .inline-add input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

/* kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; align-items: start; }
.kcol { background: var(--card2); border: 1px dashed var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; scroll-snap-align: start; transition: .15s; } .kcol.over { background: var(--primary-bg); border-color: var(--primary); }
.kcol-h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; } .kcol-h em { margin-left: auto; font-style: normal; background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 0 9px; font-size: 12px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); cursor: grab; animation: up .35s both; animation-delay: calc(var(--i, 0) * 35ms); } .kcard.drag { opacity: .4; }
.kcard a b { display: block; font-size: 14px; } .kcard a span { color: var(--muted); font-size: 13px; } .kcard .status-sel { align-self: flex-start; }
.kempty { text-align: center; padding: 16px 0; }

/* charts */
.segbar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--card2); gap: 2px; } .segbar i { width: var(--w); background: var(--c); animation: fillw .9s cubic-bezier(.2,.8,.2,1) both; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: 13px; color: var(--muted); } .legend a, .legend span { display: inline-flex; align-items: center; gap: 6px; } .legend a:hover { color: var(--primary); } .legend b { color: var(--text); } .legend.sm { justify-content: center; font-size: 12px; }
.bars { display: flex; align-items: stretch; gap: 10px; height: 190px; } .bars.big { height: 250px; } .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); } .bar-pair i { width: 28%; max-width: 22px; height: var(--h); min-height: 3px; border-radius: 6px 6px 0 0; animation: grow .9s cubic-bezier(.2,.8,.2,1) both; }
.b0 { background: var(--blue); } .b1 { background: linear-gradient(var(--green), color-mix(in srgb, var(--green) 70%, #fff)); } .b2 { background: var(--amber); } .bar-col span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.dotc.gray { background: var(--gray); }
.table-wrap { overflow-x: auto; } .tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; } .tbl th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; } .tbl td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; } .tbl tr:last-child td { border: 0; }
.timeline { display: flex; flex-direction: column; } .tl { display: flex; gap: 14px; padding: 8px 0; position: relative; } .tl i { width: 11px; height: 11px; border-radius: 50%; background: var(--primary); margin-top: 5px; flex: none; position: relative; z-index: 1; box-shadow: 0 0 0 4px var(--primary-bg); } .tl::before { content: ""; position: absolute; left: 5px; top: 18px; bottom: -8px; width: 1px; background: var(--line); } .tl:last-child::before { display: none; } .tl b { font-size: 14px; display: block; } .tl small { color: var(--muted); font-size: 12px; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 16px; color: var(--muted); } .empty .ic.xl { color: var(--primary); opacity: .75; } .empty h3 { color: var(--text); font-size: 17px; } .empty p { max-width: 360px; } .empty .btn { margin-top: 8px; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; } .setrow:first-of-type { border-top: 0; } .setrow div { display: flex; flex-direction: column; } .setrow small { color: var(--muted); font-size: 13px; max-width: 460px; }
pre.digest { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 14px; background: var(--card2); border: 1px solid var(--line); padding: 14px; border-radius: 12px; max-height: 50vh; overflow: auto; margin: 10px 0 0; } pre.secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 17px; text-align: center; letter-spacing: .02em; }

/* ============ forms & modals ============ */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; grid-column: 1 / -1; } .field.half { grid-column: span 1; } .field > span { font-size: 12.5px; font-weight: 650; color: var(--muted); } .field > span i { color: var(--red); font-style: normal; } .field small { color: var(--muted); font-size: 12px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); background: var(--input); border-radius: 11px; outline: 0; transition: .15s; font-size: 15px; } .field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.field .chips { margin-bottom: 6px; } .field .chip.on { transform: scale(1.03); }
.check { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; } .check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-err { grid-column: 1 / -1; background: var(--red-bg); color: var(--red); padding: 9px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600; }
.modal-foot { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; flex-wrap: wrap; } .modal > .modal-foot { margin-top: 18px; }
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,28,.55); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .2s; } .modal-back.show { opacity: 1; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; width: 100%; max-width: 540px; max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.97); transition: transform .25s cubic-bezier(.2,.9,.3,1.2); } .modal-back.show .modal { transform: none; } .modal.wide { max-width: 640px; } .modal.sm { max-width: 420px; } .modal.sheet { max-width: 440px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; } .modal-head h3 { font-size: 19px; letter-spacing: -.01em; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; } .more-i { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; background: var(--card2); border: 1px solid var(--line); border-radius: 14px; font-weight: 600; font-size: 13px; position: relative; transition: .15s; text-align: center; } .more-i:hover { border-color: var(--primary); color: var(--primary); } .more-i .ic { width: 22px; height: 22px; } .more-i .badge { position: absolute; top: 6px; right: 6px; }

#toasts { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { background: #1f2140; color: #fff; padding: 11px 16px; border-radius: 12px; display: flex; gap: 9px; align-items: center; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); transform: translateY(14px); opacity: 0; transition: .3s; max-width: min(92vw, 380px); } .toast.show { transform: none; opacity: 1; } .toast.err { background: var(--red); } .toast .ic { color: #5be28f; } .toast.err .ic { color: #fff; }

/* ============ auth ============ */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; background: linear-gradient(135deg, #312e81, #6d28d9 55%, #c026d3); }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 14s ease-in-out infinite; } .b1 { width: 380px; height: 380px; background: #60a5fa; top: -90px; left: -80px; } .b2 { width: 320px; height: 320px; background: #f472b6; bottom: -80px; right: -60px; animation-delay: -5s; } .b3 { width: 240px; height: 240px; background: #34d399; top: 50%; left: 55%; animation-delay: -9s; opacity: .35; }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 400px; background: rgba(255,255,255,.92); color: #1a1c2e; backdrop-filter: blur(20px); border-radius: 24px; padding: 30px 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px rgba(10,10,50,.45); animation: up .6s both; --card: #fff; --line: #e3e5f1; --input: #fff; --muted: #6a6f87; --text: #1a1c2e; --card2: #f6f7fc; --primary: #4f46e5; --primary-bg: rgba(79,70,229,.1); }
.auth-card h1 { font-size: 24px; letter-spacing: -.02em; } .auth-logo { display: flex; justify-content: center; margin-bottom: 4px; }

/* ============ animations ============ */
@keyframes up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes grow { from { height: 0; } } @keyframes fill { from { width: 0; } } @keyframes fillw { from { width: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; } }

/* ============ responsive ============ */
@media (max-width: 1000px) { .grid.two { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; } .side { display: none; } .brand.mobile { display: inline-flex; } .top { padding: 10px 14px; } .top-search { display: none; } .hide-m { display: none !important; }
  .page { padding: 16px 14px calc(var(--tab) + var(--safe-b) + 90px); gap: 14px; } .page-head h1 { font-size: 22px; }
  .tabbar { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + var(--safe-b)); justify-content: space-around; }
  .tab-i { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 650; position: relative; transition: .15s; } .tab-i.on { color: var(--primary); } .tab-i.on .ic { transform: translateY(-2px) scale(1.12); } .tab-i .ic { transition: .2s; width: 22px; height: 22px; } .tab-i .badge { position: absolute; top: 0; right: calc(50% - 22px); }
  .fab { display: grid; place-items: center; position: fixed; z-index: 41; right: 16px; bottom: calc(var(--tab) + var(--safe-b) + 14px); width: 54px; height: 54px; border-radius: 18px; background: linear-gradient(135deg, var(--primary), var(--primary2)); color: #fff; box-shadow: 0 12px 28px -6px var(--primary); transition: .2s; } .fab:active { transform: scale(.92) rotate(90deg); } .fab .ic { width: 26px; height: 26px; }
  #toasts { right: 12px; left: 12px; bottom: calc(var(--tab) + var(--safe-b) + 80px); align-items: center; }
  .tile b { font-size: 24px; } .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tile { padding: 14px; } .tiles.sm { grid-template-columns: 1fr 1fr; }
  .modal-back { align-items: flex-end; padding: 0; } .modal { max-width: none !important; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); max-height: 92dvh; transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.9,.3,1); } .modal.sm { border-radius: 22px 22px 0 0; }
  .row-main b, .row-main small { white-space: normal; } .row-main { flex: 1 1 55%; }
  .kanban { grid-auto-columns: 82%; } .row { flex-wrap: wrap; } .row-end { margin-left: auto; } .cgrid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .field.half { grid-column: 1 / -1; } .money { gap: 16px; } .money .pill { margin-left: 0; } .work-top { flex-direction: column; } .work-top .status-sel { align-self: flex-start; }
  .page-head { align-items: flex-start; } .head-actions { width: 100%; } .head-actions .btn { flex: 1; } input, select, textarea { font-size: 16px !important; } .chead h1 { font-size: 21px; }
}
@media print { .side, .tabbar, .fab, .top { display: none; } }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, var(--primary-bg), transparent), var(--card); } .banner.amber { background: linear-gradient(135deg, var(--amber-bg), transparent), var(--card); } .banner b { font-size: 16px; } .banner > div { flex: 1; min-width: 220px; }

/* =====================================================================
   v2 refinements: compact, GitHub-inspired density (overrides above)
   ===================================================================== */
:root { --r: 10px; --side: 224px; --shadow: 0 0 0 transparent; }
[data-theme=dark] { --shadow: 0 0 0 transparent; }
body { font-size: 13.5px; line-height: 1.45; }
.sm { font-size: 12px; } b { font-weight: 600; } .fw4 { font-weight: 400; } .opt { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11.5px; } .mt { margin-top: 6px; }
.ic { width: 16px; height: 16px; } .ic.xl { width: 38px; height: 38px; } .ic.tiny { width: 12px; height: 12px; }
kbd { font: 600 10.5px ui-monospace, Menlo, Consolas, monospace; background: var(--card2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--muted); }

/* shell */
.side { padding: 14px 10px; gap: 14px; } .brand { padding: 7px 12px; border-radius: 10px; } .logo { height: 26px; }
.nav { padding: 8px 11px; border-radius: 8px; gap: 10px; font-size: 13.5px; font-weight: 500; } .nav.on { box-shadow: none; }
.me b { font-size: 13px; } .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12.5px; } .avatar.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
.top { padding: 9px 24px; } .top-search { max-width: 340px; }
.palette-btn { cursor: pointer; padding: 7px 10px; color: var(--muted); text-align: left; font-size: 13px; } .palette-btn span { flex: 1; } .palette-btn:hover { border-color: var(--primary); }
.show-m { display: none; }
.page { padding: 20px 24px 56px; gap: 14px; max-width: 1120px; }
.page-head h1 { font-size: 20px; font-weight: 700; } .page-head p { font-size: 13px; }

/* surfaces: borders over shadows */
.card { padding: 14px; border-radius: 10px; box-shadow: none; } .card.hover:hover { box-shadow: 0 4px 14px rgba(40,40,100,.1); transform: translateY(-2px); }
.card-h { margin-bottom: 8px; } .card-h h2 { font-size: 14px; font-weight: 650; }
.tile { padding: 11px 14px; border-radius: 10px; box-shadow: none; gap: 2px; text-align: left; font: inherit; cursor: default; } a.tile, button.tile { cursor: pointer; } .tile::after { width: 64px; height: 64px; right: -18px; top: -18px; opacity: .7; }
.tile-l { font-size: 10.5px; letter-spacing: .05em; } .tile b { font-size: 21px; font-weight: 700; } .tiles.sm .tile b { font-size: 18px; } .tile small { font-size: 11.5px; } .tiles { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } .tiles.sm { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
button.tile.sel { outline: 2px solid var(--c); outline-offset: -1px; }
.btn { padding: 7px 13px; font-size: 13px; border-radius: 8px; gap: 6px; font-weight: 600; } .btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 7px; } .btn.primary { box-shadow: none; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; } .icon-btn.sm { width: 28px; height: 28px; } .icon-btn.xs { width: 22px; height: 22px; } .icon-btn.xs .ic { width: 12px; height: 12px; }
.pill { font-size: 11px; padding: 2px 8px; font-weight: 600; } .chip { padding: 5px 12px; font-size: 12.5px; }
.row { padding: 8px 4px; gap: 10px; } .row-main b { font-size: 13.5px; } .row-main small { font-size: 12px; } .ic-box { width: 28px; height: 28px; border-radius: 8px; } .row .avatar { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.tabs { gap: 2px; } .tab { padding: 8px 12px; font-size: 13px; font-weight: 600; }
.search { border-radius: 8px; } .search input { padding: 7px 0; font-size: 13px; } .fsel { appearance: none; -webkit-appearance: none; background: var(--card2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23888' stroke-width='2'><path d='m1 1 4 4 4-4'/></svg>") no-repeat right 9px center; border: 1px solid var(--line); border-radius: 8px; padding: 6px 26px 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.status-sel { font-size: 11.5px; padding: 4px 24px 4px 10px; }

/* forms / modals */
.field > span { font-size: 12px; } .field input, .field select, .field textarea { padding: 8px 11px; font-size: 14px; border-radius: 8px; }
.modal { padding: 18px; border-radius: 14px; max-width: 520px; } .modal-head h3 { font-size: 16px; } .modal.wide { max-width: 560px; } .form { gap: 10px 12px; margin-top: 10px; }
details.more { border: 1px solid var(--line); border-radius: 8px; padding: 0; } details.more summary { padding: 8px 11px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--muted); list-style: none; } details.more summary::-webkit-details-marker { display: none; } details.more summary::before { content: "▸ "; } details.more[open] summary::before { content: "▾ "; } details.more .inner { padding: 4px 11px 11px; margin: 0; }
.svclist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.svcrow { display: grid; grid-template-columns: 1fr 120px auto; gap: 8px; align-items: center; } .svcrow .svc-custom { grid-column: 1 / -1; order: 3; } .svcrow:has(.svc-price:only-of-type) {} 
.svcrow select, .svcrow input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); background: var(--input); border-radius: 8px; font-size: 14px; outline: 0; } .svcrow select:focus, .svcrow input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.chip.on { transform: none; }

/* work card: step-wise */
.work { gap: 10px; } .work h3 { font-size: 15px; } .desc { font-size: 12.5px; } .money b { font-size: 15px; } .money { gap: 18px; } .progress { height: 6px; } .progress.sm { height: 5px; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; font-size: 11px; font-weight: 600; color: var(--muted); }
.stepper li::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; } .stepper li:first-child::before { display: none; } .stepper li.done::before, .stepper li.now::before { background: var(--green); }
.stepper li i { width: 17px; height: 17px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; position: relative; z-index: 1; color: #fff; }
.stepper li i .ic { width: 10px; height: 10px; stroke-width: 3.5; } .stepper li.done i { background: var(--green); border-color: var(--green); } .stepper li.done { color: var(--text); }
.stepper li.now i { border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px var(--primary-bg); animation: pulse 1.8s infinite; } .stepper li.now { color: var(--primary); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px transparent; } }
.nextstep { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 11px; border-radius: 8px; background: var(--cb); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.ns-text { font-weight: 600; color: var(--c); display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; } .ns-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.nextcard { display: block; } .nextcard.ok { display: flex; align-items: center; gap: 8px; color: var(--green); background: var(--green-bg); } .nextcard.ok .muted { font-size: 12.5px; }
.ns-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); flex-wrap: wrap; } .ns-row:first-of-type { border-top: 0; }
.pbs { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; } .pbs:first-child { border-top: 0; } .pbs-top { display: flex; justify-content: space-between; align-items: center; }

/* GitHub-style list */
.listbox { border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.lb-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; background: var(--card2); border-bottom: 1px solid var(--line); }
.lb-tabs { display: flex; gap: 2px; } .lb-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 7px; font-weight: 600; color: var(--muted); font-size: 13px; } .lb-tabs button:hover { color: var(--text); background: var(--line); } .lb-tabs button.on { color: var(--text); background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.sm-search { flex: 1; min-width: 160px; background: var(--card); } .lb-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.irow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); animation: up .35s both; animation-delay: calc(var(--i, 0) * 28ms); transition: background .12s; } .irow:first-child { border-top: 0; } .irow:hover { background: var(--card2); }
.sti { color: var(--c); display: grid; place-items: center; align-self: flex-start; margin-top: 2px; } .sti .ic { width: 17px; height: 17px; }
.irow-main { flex: 1; min-width: 0; } .ititle-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .ititle { font-weight: 650; font-size: 14px; } .ititle:hover { color: var(--primary); }
.imeta { color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .irow-end { display: flex; align-items: center; gap: 8px; flex: none; }
#wlist .kanban { padding: 12px; }

/* money, client-wise */
.mcard { padding: 0; overflow: hidden; } .mhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 14px; background: var(--card2); border-bottom: 1px solid var(--line); }
.mclient { display: flex; align-items: center; gap: 10px; min-width: 0; } .mclient b { display: block; font-size: 14px; } .mclient small { color: var(--muted); font-size: 12px; } .mclient:hover b { color: var(--primary); }
.mhead-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .mtotal { text-align: right; line-height: 1.15; } .mtotal small { display: block; color: var(--muted); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; } .mtotal b { font-size: 17px; font-variant-numeric: tabular-nums; }
.mrow { display: grid; grid-template-columns: minmax(150px, 1.3fr) minmax(130px, 1fr) 130px 90px auto; gap: 12px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line); } .mrow:first-child { border-top: 0; } .mrow:hover { background: var(--card2); }
.mname b { display: block; font-size: 13.5px; } .mname small, .mbar small { color: var(--muted); font-size: 11.5px; } .mbar { display: flex; flex-direction: column; gap: 3px; } .mamt { text-align: right; font-size: 14px; } .mact { display: flex; gap: 2px; }
.link-btn { color: var(--primary); font-weight: 600; font-size: 12px; } .link-btn:hover { text-decoration: underline; }
.datebox { width: 38px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 2px 0; background: var(--card2); flex: none; } .datebox b { display: block; font-size: 14px; line-height: 1.1; } .datebox small { font-size: 9.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.rowline { display: flex; align-items: center; gap: 10px; } .rowline > span { display: flex; flex-direction: column; }

/* heatmap */
.heat-wrap { overflow-x: auto; padding-bottom: 4px; } .heat { display: grid; grid-template-rows: repeat(7, 11px); grid-auto-flow: column; grid-auto-columns: 11px; gap: 3px; width: max-content; }
.hc { display: block; width: 11px; height: 11px; border-radius: 3px; background: var(--card2); border: 1px solid var(--line); } .hc.pad { visibility: hidden; }
.hc.l1 { background: color-mix(in srgb, var(--green) 28%, var(--card)); border-color: transparent; } .hc.l2 { background: color-mix(in srgb, var(--green) 50%, var(--card)); border-color: transparent; } .hc.l3 { background: color-mix(in srgb, var(--green) 75%, var(--card)); border-color: transparent; } .hc.l4 { background: var(--green); border-color: transparent; }
.heat-legend { display: flex; align-items: center; gap: 3px; justify-content: flex-end; font-size: 11px; color: var(--muted); margin-top: 8px; } .heat-legend .hc { margin: 0 1px; }
.heat .hc { animation: fade .6s both; }

/* palette */
.modal.pal { padding: 0; max-width: 560px; align-self: flex-start; margin-top: 12vh; overflow: hidden; } .pal-in { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); } .pal-in .ic { color: var(--muted); } .pal-in input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; }
.pal-list { max-height: 50vh; overflow-y: auto; padding: 6px; } .pal-i { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-align: left; } .pal-i b { display: block; font-size: 13.5px; } .pal-i small { color: var(--muted); font-size: 12px; } .pal-i em { font-style: normal; color: var(--muted); font-size: 11px; } .pal-i.on, .pal-i:hover { background: var(--primary-bg); } .pal-empty { padding: 20px; text-align: center; }
.pal-i .avatar { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.banner b { font-size: 14px; }

@media (max-width: 900px) {
  .show-m { display: inline-grid; } .top-search { display: none; } .page { padding: 14px 12px calc(var(--tab) + var(--safe-b) + 90px); }
  .modal.pal { margin-top: 0; align-self: flex-start; border-radius: 0 0 14px 14px; max-width: none !important; transform: translateY(-100%); } .modal-back.show .modal.pal { transform: none; }
  .mrow { grid-template-columns: 1fr auto; gap: 6px 10px; } .mrow .mbar { grid-column: 1 / -1; order: 5; } .mrow .mpromise { order: 3; } .mrow .mamt { order: 2; } .mrow .mact { order: 4; margin-left: auto; }
  .svcrow { grid-template-columns: 1fr 96px auto; } .irow { flex-wrap: wrap; } .irow-end { width: 100%; justify-content: flex-start; flex-wrap: wrap; padding-left: 29px; } .imeta { white-space: normal; }
  .lb-head { padding: 8px; } .sm-search { min-width: 100%; order: 3; }
  .tile b { font-size: 19px; } .tiles { grid-template-columns: 1fr 1fr; } .mhead { padding: 10px 12px; }
}
@media (max-width: 520px) { .stepper li { font-size: 10px; } input, select, textarea { font-size: 16px !important; } .page-head h1 { font-size: 19px; } .nextstep { flex-direction: column; align-items: flex-start; } }

/* ---- Taskbar ---- */
.tb-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
.tb-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tb-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 14px; }
.tb-sum { display: flex; flex-direction: column; gap: 2px; } .tb-big { font-size: 30px; letter-spacing: -.02em; color: var(--amber, #d97706); }
.tb-by h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tb-bc { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; font-size: 13px; transition: background .15s; }
.tb-bc:hover, .tb-bc.on { background: var(--card2); } .tb-bc.on { outline: 1px solid var(--primary); } .tb-bc em { font-style: normal; color: var(--muted); margin-left: 6px; font-size: 11px; } .tb-bc b { white-space: nowrap; }
.tb-add { padding: 10px; } .tb-add-row { display: flex; gap: 8px; flex-wrap: wrap; } .tb-add-row input[name=note] { flex: 1 1 220px; min-width: 0; }
.tb-add-row select { flex: 0 1 180px; min-width: 0; } .tb-amt-in { flex: 0 0 110px; width: 110px; }
.tb-new { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; } .tb-new[hidden] { display: none; } .tb-new input { flex: 1 1 180px; }
.tb-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-top: 1px solid var(--line); border-radius: 8px; animation: up .35s both; }
.tb-row:first-child { border-top: 0; } .tb-row:hover { background: var(--card2); }
.tb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; } .tb-main b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.tb-main small { display: flex; flex-wrap: wrap; gap: 2px; font-size: 12px; } .tb-main small a { color: var(--primary); display: inline-flex; align-items: center; gap: 3px; } .tb-main small .ic { width: 12px; height: 12px; }
.tb-amt { white-space: nowrap; font-size: 14px; } .tb-amt.amber { color: var(--amber, #d97706); }
.tb-row.done .tb-main b { text-decoration: line-through; color: var(--muted); } .tb-row.done { opacity: .75; }
.tb-filter { display: flex; align-items: center; gap: 10px; font-size: 13px; } .tb-doneh { width: 100%; display: flex; align-items: center; gap: 8px; }
@media (max-width: 860px) { .tb-wrap { grid-template-columns: 1fr; } .tb-side { position: static; order: -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; } .tb-by { display: none; } .tb-big { font-size: 24px; } .tb-amt-in { flex: 1 1 100px; } }
.tb-add input, .tb-add select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); outline: 0; font-size: 14px; color: inherit; transition: .15s; }
.tb-add input:focus, .tb-add select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

.cb { position: relative; flex: 0 1 200px; min-width: 150px; } .cb-in { width: 100%; padding-right: 30px !important; } .field .cb-in { padding: 11px 30px 11px 13px; }
.cb-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); border-radius: 50%; } .cb-x:hover { background: var(--card2); } .cb-x .ic { width: 13px; height: 13px; } .cb-x[hidden] { display: none; }
.cb-list { position: absolute; z-index: 60; left: 0; right: 0; min-width: 240px; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14); max-height: 260px; overflow: auto; padding: 4px; } .cb-list[hidden] { display: none; }
.cb-h { padding: 6px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cb-opt { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; } .cb-opt small { color: var(--muted); } .cb-opt:hover, .cb-opt.hl { background: var(--card2); } .cb-opt.new { color: var(--primary); font-weight: 600; justify-content: flex-start; } .cb-opt.new .ic { width: 14px; height: 14px; }
.tb-due-in { flex: 0 0 140px; width: 140px; } .tb-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; }
.tb-searchbar { position: relative; } .tb-searchbar .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.tb-search { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); outline: 0; font-size: 14px; color: inherit; } .tb-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.tb-months { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 4px 6px 8px; } .tb-main small .pill { padding: 1px 8px; font-size: 11px; } .tb-main small .pill .ic { width: 11px; height: 11px; }
@media (max-width: 860px) { .cb { flex: 1 1 100%; } .tb-due-in { flex: 1 1 130px; } }

/* ---- Taskbar v3 ---- */
.tb-add { position: relative; z-index: 30; display: flex; flex-direction: column; gap: 10px; }
.tb-left > .card { position: relative; z-index: 1; }
.tb-step { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kind-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.kchip { flex: none; padding: 8px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; transition: .15s; }
.kchip:hover { border-color: var(--primary); } .kchip.on { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 14px var(--primary-bg); }
.tb-note { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); outline: 0; font-size: 14px; color: inherit; } .tb-note:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.tb-add-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 8px; align-items: stretch; } .tb-add-row .cb { min-width: 0; flex: none; } .tb-add-row .btn { white-space: nowrap; }
.tb-amt-in { width: 100%; flex: none; }
.cb-opt b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; } .cb-opt small { white-space: nowrap; flex: none; }
.cb-list { min-width: 0; right: auto; width: max(100%, 280px); max-width: calc(100vw - 32px); }
.kind { display: inline-flex; align-self: flex-start; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; background: var(--primary-bg); color: var(--primary); font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.tb-main b { font-weight: 500; font-size: 13.5px; color: var(--text); }
.tb-row { align-items: flex-start; } .tb-row .check-btn { margin-top: 2px; }
.tb-money { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; } .tb-amt.green { color: var(--green); }
.paybtn { padding: 4px 11px; min-height: 28px; border-radius: 99px; border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card); white-space: nowrap; transition: .15s; } .paybtn:hover { border-color: var(--green); color: var(--green); } .paybtn.on { background: var(--green); border-color: var(--green); color: #fff; }
.tb-doneh .pill.sm { font-size: 11px; padding: 1px 8px; } .pad { padding: 8px 6px; }
.tb-modal .kind-row { flex-wrap: wrap; overflow: visible; }
@media (max-width: 860px) {
  .tb-add-row { grid-template-columns: 1fr 1fr; } .tb-add-row .cb { grid-column: 1 / -1; } .tb-add-row .btn { justify-content: center; }
  .tb-add-row:not(:has(.tb-amt-in)) .btn { grid-column: 1 / -1; }
  .tb-row { gap: 10px; padding: 12px 4px; } .paybtn { min-height: 34px; padding: 6px 12px; } .kchip { padding: 9px 14px; }
  .cb-list { width: 100%; }
}
.tb-left > .card.tb-add { z-index: 30; }

/* ---- Taskbar partial payments ---- */
.tb-money small { font-size: 11px; line-height: 1.1; } .tb-bar { display: block; width: 96px; height: 5px; border-radius: 9px; background: var(--card2); overflow: hidden; } .tb-bar u { display: block; height: 100%; background: var(--green); border-radius: 9px; transition: width .5s; }
.tb-recv { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; } .tb-recv b { font-size: 18px; color: var(--green); }
.tb-rp { display: flex; justify-content: space-between; gap: 10px; padding: 6px 4px; font-size: 13px; } .tb-rp .block, .pay-hist .block { display: block; font-size: 11px; } .tb-rp b.green { white-space: nowrap; }
.pay-hist { margin-top: 6px; } .pay-hist h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ph { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; } .ph em { font-style: normal; font-size: 11px; background: var(--card2); padding: 1px 8px; border-radius: 99px; color: var(--muted); }
.kind-row.wrap { flex-wrap: wrap; overflow: visible; }
@media (max-width: 860px) { .tb-recv { margin: 0; padding: 0; border: 0; } .tb-sum { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; align-items: flex-end; } }
