/* Navio Client Portal */
@font-face {
  font-family: "Cal Sans";
  src: url("../fonts/CalSans-Regular.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --blue: #1a68fe;
  --blue-600: #0f57e3;
  --blue-50: #e9f0ff;
  --blue-100: #d6e3ff;
  --ink: #030327;
  --text: #4a4b63;
  --muted: #7a7b90;
  --line: #e4e6ef;
  --line-2: #eef0f6;
  --mist: #f3f4f9;
  --white: #fff;
  --amber: #f5b544;
  --amber-50: #fff5e2;
  --amber-ink: #8a5a00;
  --green: #2bb58c;
  --green-50: #e3f7f0;
  --green-ink: #12704f;
  --purple: #8a6cf0;
  --red: #e5484d;
  --red-50: #fdecec;
  --r-card: 20px;
  --r-md: 14px;
  --r-btn: 12px;
  --ease: cubic-bezier(0.05, 0.8, 0.1, 1);
  --display: "Cal Sans", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --side: 248px;
  --shadow: 0 1px 2px rgba(3, 3, 39, .04), 0 8px 24px -14px rgba(3, 3, 39, .18);
  --shadow-lg: 0 30px 80px -30px rgba(3, 3, 39, .45);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--mist); color: var(--text); font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: var(--ink); }
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.12; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.blue { color: var(--blue); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--r-btn);
  font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), background-color .2s, color .2s, border-color .2s, opacity .2s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 22px -12px rgba(26, 104, 254, .8); }
.btn-primary:hover:not(:disabled) { background: var(--blue-600); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #14143d; transform: translateY(-1px); }
.btn-outline { border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.btn-outline:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.btn-ghost { color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--mist); color: var(--ink); }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 8px 22px -12px rgba(43, 181, 140, .9); }
.btn-green:hover:not(:disabled) { background: #22a07a; transform: translateY(-1px); }
.btn-danger { color: var(--red); border: 1.5px solid #f4c7c8; background: #fff; }
.btn-danger:hover:not(:disabled) { background: var(--red-50); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn .icon { width: 17px; height: 17px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--muted); transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--mist); color: var(--ink); }
.link { color: var(--blue); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; transition: border-color .2s, box-shadow .2s; font-size: 15px;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237a7b90' stroke-width='1.8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.form-error { background: var(--red-50); color: #a1262a; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.form-ok { background: var(--green-50); color: var(--green-ink); padding: 10px 14px; border-radius: 12px; font-size: 14px; }

/* ---------- Boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 46px; animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.92); } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: #fff; }
.auth-art {
  position: relative; overflow: hidden; background: var(--ink); color: #b9bad3;
  padding: 44px clamp(28px, 4vw, 64px); display: grid; grid-template-rows: auto auto 1fr auto; gap: 36px;
  isolation: isolate; position: sticky; top: 0; height: 100vh; min-height: 640px;
}
.auth-art .logo { width: 138px; }
.art-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.art-pill { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(26, 104, 254, .5); color: #fff; font-size: 12.5px; font-weight: 600; background: rgba(26, 104, 254, .14); }
.art-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(26, 104, 254, .25); }
.auth-art .eyebrow { color: var(--blue); }
.auth-art h1 { color: #fff; font-size: clamp(36px, 3.8vw, 58px); max-width: 13ch; margin-top: 14px; }
.auth-art h1 .blue { color: var(--blue); }
.auth-art .art-copy p { max-width: 46ch; margin-top: 16px; font-size: 16px; }
.auth-art .bird { position: absolute; z-index: -1; left: -90px; bottom: -110px; width: 420px; opacity: .07; }
/* board preview */
.preview { align-self: center; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); border-radius: 22px; padding: 16px; display: grid; gap: 14px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); }
.preview-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #fff; font-weight: 600; }
.preview-head .dots { display: flex; gap: 6px; margin-right: 6px; }
.preview-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.preview-head small { margin-left: auto; color: #8f90b2; font-weight: 500; }
.preview-head small b { color: var(--blue); }
.mini-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mini-col { background: rgba(255, 255, 255, .04); border-radius: 14px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 190px; }
.mini-col b { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #8f90b2; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.mini-col b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c, #8f90b2); }
.mini-card { background: rgba(255, 255, 255, .08); border-radius: 10px; padding: 10px; font-size: 12.5px; color: #fff; display: grid; gap: 7px; animation: rise .9s var(--ease) both; min-width: 0; }
.mini-card span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-card i { display: block; height: 4px; border-radius: 4px; background: var(--c, var(--blue)); width: var(--w, 60%); }
.mini-card.thumb::before { content: ""; display: block; aspect-ratio: 16 / 9; border-radius: 7px; background: var(--blue); }
.mini-card.thumb.alt::before { background: var(--amber); }
.art-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 24px; }
.art-points li { display: grid; gap: 4px; font-size: 13.5px; }
.art-points b { font-family: var(--display); color: var(--blue); font-size: 15px; font-weight: 600; }
.art-points strong { color: #fff; font-size: 15px; font-weight: 600; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.auth-form { display: grid; grid-template-rows: auto 1fr auto; padding: 28px clamp(20px, 4vw, 56px); gap: 24px; }
.auth-top, .auth-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.auth-top a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.auth-top a:hover { color: var(--blue); }
.auth-top .icon { width: 16px; height: 16px; }
.auth-top b, .auth-foot b { color: var(--ink); font-weight: 600; user-select: all; }
.auth-box { width: 100%; max-width: 440px; display: grid; gap: 26px; align-self: center; justify-self: center; padding-block: 12px; }
.auth-box h2 { font-size: clamp(32px, 3vw, 40px); }
.auth-box .sub { margin-top: 8px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 14px; }
.demo-box { border: 1.5px dashed var(--blue-100); background: #f7f9ff; border-radius: 16px; padding: 18px; display: grid; gap: 12px; }
.demo-box h3 { font-size: 16px; }
.demo-users { display: grid; gap: 8px; }
.demo-user { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; text-align: left; transition: border-color .2s, transform .4s var(--ease); }
.demo-user:hover { border-color: var(--blue); transform: translateX(3px); }
.demo-user span { display: grid; line-height: 1.3; min-width: 0; }
.demo-user small { color: var(--muted); }
.demo-user .tag { margin-left: auto; }

/* ---------- Avatar & tags ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--av, var(--blue)); letter-spacing: .02em; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--mist); color: var(--text); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; display: var(--dot, none); }
.tag .icon { width: 13px; height: 13px; stroke-width: 2.2; }
.tag:has(.icon)::before { display: none; }
.back .icon { width: 16px; height: 16px; }
.tag.grey { --dot: block; }
.tag.blue { background: var(--blue-50); color: var(--blue-600); --dot: block; }
.tag.amber { background: var(--amber-50); color: var(--amber-ink); --dot: block; }
.tag.green { background: var(--green-50); color: var(--green-ink); --dot: block; }
.tag.purple { background: #f0ecff; color: #5a3fc4; }
.tag.dark { background: var(--ink); color: #fff; }
.tag.red { background: var(--red-50); color: #a1262a; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.side {
  position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 26px 16px 18px; gap: 26px;
}
.side .logo { width: 112px; margin: 0 10px; }
.side nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 500; color: var(--text); transition: background-color .2s, color .2s; }
.nav-item:hover { background: var(--mist); color: var(--ink); }
.nav-item.on { background: var(--blue-50); color: var(--blue-600); font-weight: 600; }
.nav-item .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--amber); color: #3b2600; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.side-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 0 12px; margin-bottom: 4px; }
.plan-card { margin-top: auto; background: var(--ink); color: #b9bad3; border-radius: 16px; padding: 16px; display: grid; gap: 10px; font-size: 13px; position: relative; overflow: hidden; }
.plan-card strong { color: #fff; font-family: var(--display); font-size: 18px; font-weight: 600; }
.plan-card .bird { position: absolute; right: -14px; top: -10px; width: 74px; opacity: .1; filter: brightness(0) invert(1); }
.slots { display: flex; gap: 6px; }
.slot { flex: 1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.slot.on { background: var(--blue); }
.slot.over { background: var(--amber); }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; }
.me span { display: grid; min-width: 0; line-height: 1.3; }
.me b { color: var(--ink); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .icon-btn { margin-left: auto; }

.main { min-width: 0; display: flex; flex-direction: column; }
.demo-bar { background: var(--ink); color: #c9cae0; font-size: 13px; padding: 8px 24px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.demo-bar b { color: #fff; }
.demo-bar button { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.page { width: 100%; max-width: 1320px; margin: 0 auto; padding: 34px 36px 60px; display: grid; gap: 26px; align-content: start; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(28px, 3vw, 38px); }
.page-head .sub { margin-top: 6px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 500; margin-bottom: 10px; }
.back:hover { color: var(--blue); }

.tabbar { display: none; }
.mobile-top { display: none; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); }
.card-pad { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { font-size: 17px; }
.card-body { padding: 20px 22px; display: grid; gap: 16px; }
.empty { text-align: center; padding: 30px 18px; color: var(--muted); display: grid; gap: 10px; justify-items: center; font-size: 14px; }
.empty .icon { width: 28px; height: 28px; color: #b6b8cc; }

/* ---------- Banner + stats ---------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: var(--amber-50); color: var(--amber-ink); font-weight: 500; border: 1px solid #f7deb0; }
.banner .icon { color: #c98a14; }
.banner .btn { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: grid; gap: 4px; }
.stat b { font-family: var(--display); font-size: 30px; color: var(--ink); font-weight: 600; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.hl { background: var(--blue); border-color: var(--blue); }
.stat.hl b, .stat.hl span { color: #fff; }
.stat.hl span { opacity: .8; }

.pace { display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; }
.pace .slots { width: 140px; }
.pace .slot { background: var(--line); height: 8px; }
.pace .slot.on { background: var(--blue); }
.pace .slot.over { background: var(--amber); }
.pace-item { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.pace-item b { color: var(--ink); font-size: 15px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: border-color .2s, background-color .2s, color .2s; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip small { font-weight: 500; opacity: .7; }
.chip small.over { opacity: 1; color: var(--red); font-weight: 700; }
.chip.on small.over { color: #ffb3b5; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: #e9ebf3; border-radius: 18px; padding: 12px; display: grid; gap: 10px; align-content: start; min-height: 200px; transition: background-color .2s, box-shadow .2s; }
.col.drop { background: var(--blue-50); box-shadow: inset 0 0 0 2px var(--blue-100); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 2px; }
.col-head h3 { font-family: var(--body); font-size: 13.5px; font-weight: 700; letter-spacing: 0; }
.col-head .n { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.col-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.col-head .more { margin-left: auto; font-size: 12.5px; }
.col-list { display: grid; gap: 10px; min-height: 40px; }
.col-empty { border: 1.5px dashed #cfd2e0; border-radius: 14px; padding: 18px 12px; text-align: center; font-size: 13px; color: var(--muted); }
.rcard {
  position: relative; display: grid; gap: 10px; background: #fff; border-radius: 14px; padding: 14px;
  border: 1px solid transparent; box-shadow: 0 1px 2px rgba(3, 3, 39, .06);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .2s, opacity .2s;
  cursor: pointer;
}
.rcard:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(3, 3, 39, .35); border-color: var(--line); }
.rcard.dragging { opacity: .4; }
.rcard[draggable="true"] { cursor: grab; }
.rcard .top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.rcard .top .co { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .top .num { margin-left: auto; }
.rcard h4 { font-family: var(--body); font-weight: 600; font-size: 14.5px; line-height: 1.35; letter-spacing: 0; }
.rcard .cat { font-size: 12.5px; color: var(--muted); }
.rcard .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.rcard .thumb { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--mist); }
.rcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.rcard.next { border-color: var(--blue-100); }
.rcard .move { display: none; position: absolute; right: 8px; bottom: 8px; gap: 2px; }
.rcard .move button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); background: var(--mist); }
.drop-line { height: 3px; border-radius: 3px; background: var(--blue); margin: -6px 4px; }
.mini-progress { height: 4px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.mini-progress i { display: block; height: 100%; background: var(--blue); border-radius: inherit; width: var(--p, 30%); transition: width .8s var(--ease); }

/* ---------- Request detail ---------- */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.detail-main, .detail-side { display: grid; gap: 22px; min-width: 0; }
.detail-side { position: sticky; top: 24px; }
.req-title { display: grid; gap: 10px; }
.req-title .tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.req-title h1 { font-size: clamp(26px, 2.6vw, 34px); }
.brief { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.brief a { color: var(--blue); text-decoration: underline; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.steps { display: grid; gap: 0; }
.stp { display: grid; grid-template-columns: 22px 1fr; gap: 12px; position: relative; padding-bottom: 16px; font-size: 14px; }
.stp:last-child { padding-bottom: 0; }
.stp::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--line); }
.stp:last-child::before { display: none; }
.stp .b { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; }
.stp.done .b { background: var(--blue); border-color: var(--blue); color: #fff; }
.stp.done::before { background: var(--blue); }
.stp.cur .b { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.stp.cur .b::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.stp .b .icon { width: 13px; height: 13px; stroke-width: 3; }
.stp span { color: var(--muted); }
.stp.done span, .stp.cur span { color: var(--ink); font-weight: 600; }
.stp small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.action-card { display: grid; gap: 12px; }
.action-card p { font-size: 14px; }
.rounds { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.rounds i { width: 22px; height: 6px; border-radius: 6px; background: var(--line); }
.rounds i.used { background: var(--amber); }

/* Files */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.files.lg { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.files.hero { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.files.hero:has(> .file:only-child) { grid-template-columns: minmax(0, 1fr); }
.files.hero:has(> .file:only-child) .prev { aspect-ratio: 16 / 9; }
.file { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: grid; transition: transform .5s var(--ease), box-shadow .5s var(--ease); min-width: 0; }
.file:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(3, 3, 39, .35); }
.file .prev { aspect-ratio: 4 / 3; background: var(--mist); display: grid; place-items: center; overflow: hidden; cursor: zoom-in; }
.file .prev img { width: 100%; height: 100%; object-fit: cover; }
.file .prev.contain img { object-fit: contain; padding: 18px; }
.file .prev .ext { font-family: var(--display); font-size: 22px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.file .info { padding: 10px 12px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.file .info span { display: grid; min-width: 0; line-height: 1.3; }
.file .info b { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file .info small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file .info .icon-btn { margin-left: auto; width: 32px; height: 32px; }
.file .del { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .2s; }
.file:hover .del, .file:focus-within .del { opacity: 1; }
.file .del:hover { color: var(--red); }
.round-head { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.round-head small { color: var(--muted); font-weight: 400; }
.chip-files { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px 6px 6px; border-radius: 10px; background: var(--mist); font-size: 13px; font-weight: 500; color: var(--ink); }
.fchip img, .fchip .ext { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; background: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: var(--muted); flex: none; }
.fchip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Dropzone */
.dz { border: 1.5px dashed #c5cbe0; border-radius: 14px; padding: 18px; text-align: center; font-size: 14px; color: var(--muted); cursor: pointer; transition: border-color .2s, background-color .2s; display: grid; gap: 6px; justify-items: center; }
.dz:hover, .dz.over { border-color: var(--blue); background: var(--blue-50); color: var(--blue-600); }
.dz .icon { width: 24px; height: 24px; color: var(--blue); }
.dz b { color: var(--ink); }
.picked { display: flex; flex-wrap: wrap; gap: 8px; }
.picked .fchip button { color: var(--muted); display: grid; }
.picked .fchip button:hover { color: var(--red); }

/* Thread */
.thread { display: grid; gap: 18px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
.msg .bubble { display: grid; gap: 8px; min-width: 0; }
.msg .who { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.msg .who b { color: var(--ink); }
.msg .who small { color: var(--muted); }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); background: var(--mist); padding: 12px 14px; border-radius: 4px 14px 14px 14px; }
.msg.team .text { background: var(--blue-50); }
.msg.internal .text { background: #fff8e8; border: 1px dashed #f0cf8a; }
.msg.revision .text { background: #fff; border: 1.5px solid var(--amber); }
.event { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); padding-left: 6px; }
.event .icon { width: 15px; height: 15px; }
.event b { color: var(--ink); font-weight: 600; }
.composer { display: grid; gap: 10px; border-top: 1px solid var(--line-2); padding-top: 18px; }
.composer .textarea { min-height: 90px; }
.composer-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.composer-bar .btn-primary { margin-left: auto; }

/* ---------- Lists (clients, people) ---------- */
.clients { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.client { display: grid; gap: 14px; padding: 20px; cursor: pointer; transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .2s; }
.client:hover { transform: translateY(-2px); border-color: var(--blue-100); }
.client .head { display: flex; align-items: center; gap: 12px; }
.client .head h3 { font-size: 19px; }
.client .head .tag { margin-left: auto; }
.client .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.client .nums div { background: var(--mist); border-radius: 12px; padding: 10px; display: grid; font-size: 12px; color: var(--muted); }
.client .nums b { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink); }
.people { display: grid; }
.person { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.person:last-child { border-bottom: 0; }
.person span { display: grid; min-width: 0; line-height: 1.35; }
.person b { color: var(--ink); font-size: 14.5px; }
.person small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.person .end { margin-left: auto; display: flex; gap: 6px; align-items: center; flex: none; }
.table-list { display: grid; }
.trow { display: grid; grid-template-columns: 70px minmax(0, 1fr) 140px 120px; gap: 14px; align-items: center; padding: 12px 22px; border-bottom: 1px solid var(--line-2); font-size: 14px; cursor: pointer; }
.trow:hover { background: #fafbfe; }
.trow:last-child { border-bottom: 0; }
.trow b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 4px; background: #e6e8f1; padding: 4px; border-radius: 14px; width: max-content; max-width: 100%; overflow-x: auto; }
.tabs button { height: 36px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--text); white-space: nowrap; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(3, 3, 39, .12); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }

/* ---------- Invoices ---------- */
.inv-head, .inv-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(110px, .8fr) 110px 96px 150px; gap: 16px; align-items: center; padding: 14px 22px; }
.card.admin-inv .inv-head, .card.admin-inv .inv-row { grid-template-columns: minmax(0, 1.6fr) minmax(110px, .8fr) 110px 96px 268px; }
.card.admin-inv .inv-act { flex-wrap: nowrap; }
.page-head .actions { align-items: center; }
.page-head .actions .select { width: auto; }
.inv-head { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); padding-block: 12px; }
.inv-row { border-bottom: 1px solid var(--line-2); font-size: 14px; }
.inv-row:last-child { border-bottom: 0; }
.inv-row:hover { background: #fafbfe; }
.inv-main { display: grid; min-width: 0; line-height: 1.4; }
.inv-main b { color: var(--ink); font-weight: 600; }
.inv-main > span { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-co { color: var(--ink); font-weight: 600; }
.inv-dates { display: grid; font-size: 13px; color: var(--muted); line-height: 1.45; }
.inv-amt { font-family: var(--display); font-size: 18px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.inv-row.paid .inv-amt { color: var(--muted); }
.inv-row.overdue .inv-dates span:last-child { color: var(--red); font-weight: 600; }
.inv-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.stat b { overflow-wrap: anywhere; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.modal-bg { position: absolute; inset: 0; background: rgba(3, 3, 39, .55); backdrop-filter: blur(4px); animation: fade .3s both; }
.modal-card { position: relative; width: 100%; max-width: 560px; max-height: calc(100vh - 48px); overflow: auto; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); padding: 28px; display: grid; gap: 20px; animation: pop .6s var(--ease) both; }
.modal-card.wide { max-width: 720px; }
.modal-card h2 { font-size: 26px; padding-right: 36px; }
.modal-x { position: absolute; top: 16px; right: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.type-note { font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--blue-50); color: var(--blue-600); }
.type-note.amber { background: var(--amber-50); color: var(--amber-ink); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.98); } }

.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(3, 3, 39, .9); display: grid; place-items: center; padding: 60px 24px 24px; animation: fade .25s both; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 10px; box-shadow: var(--shadow-lg); animation: pop .5s var(--ease) both; }
.lightbox .bar { position: absolute; top: 14px; left: 20px; right: 14px; display: flex; align-items: center; gap: 12px; color: #fff; font-size: 14px; }
.lightbox .bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox .bar .btn { margin-left: auto; }
.lightbox .icon-btn { color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: pop .5s var(--ease) both; }
.toast.err { background: #a1262a; }
.toast .icon { color: #7fb0ff; }
.toast.err .icon { color: #ffc4c6; }
.toast.out { opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; }

.reveal { animation: rise .7s var(--ease) both; animation-delay: var(--d, 0s); }
.skeleton { background: linear-gradient(90deg, #eceef5 25%, #f6f7fb 50%, #eceef5 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
}
@media (max-width: 900px) {
  :root { --side: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line); padding: 12px max(16px, env(safe-area-inset-right, 0px)) 12px max(16px, env(safe-area-inset-left, 0px));
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
  }
  .mobile-top .logo { width: 96px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
  }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); position: relative; }
  .tabbar a.on { color: var(--blue); }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar .count { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--amber); color: #3b2600; font-size: 11px; display: grid; place-items: center; }
  .page { padding: 22px max(16px, env(safe-area-inset-right, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); gap: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { padding: 24px 20px 30px; gap: 22px; grid-template-rows: auto; position: relative; height: auto; min-height: 0; }
  .auth-art .preview, .auth-art .art-copy p, .art-points { display: none; }
  .auth-art h1 { font-size: 32px; max-width: none; }
  .auth-art .bird { width: 220px; left: auto; right: -50px; bottom: -70px; }
  .auth-form { padding: 20px 16px 32px; }
  .auth-top a { display: none; }
}
.board-tabs { display: none; }
@media (max-width: 640px) {
  .board { grid-template-columns: minmax(0, 1fr); }
  .col { min-height: 0; }
  .board-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; margin-bottom: -8px; overflow: visible; }
  .board-tabs button { height: auto; padding: 7px 2px; font-size: 12.5px; line-height: 1.25; display: grid; justify-items: center; white-space: normal; }
  .board-tabs button span { font-size: 15px; font-weight: 700; color: var(--ink); }
  .col:not(.show) { display: none; }
  .col .col-head { display: none; }
  .col { background: none; padding: 0; }
  .page-head .actions:has([data-newreq]) { display: none; }
  .pace { display: grid; grid-template-columns: 1fr 1fr; }
  .pace .slots { display: none; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .page-head { align-items: stretch; }
  .page-head .actions, .page-head .actions .btn { width: 100%; }
  .page-head .actions { flex-wrap: nowrap; }
  .banner { flex-wrap: wrap; }
  .banner .btn { margin-left: 0; width: 100%; }
  .modal { padding: 0; align-items: end; }
  .modal-card { border-radius: 22px 22px 0 0; max-height: 92vh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .modal-foot .btn { flex: 1; }
  .trow { grid-template-columns: 52px minmax(0, 1fr) auto; padding: 12px 16px; }
  .trow .hide-sm { display: none; }
  .inv-head { display: none; }
  .inv-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 16px; }
  .inv-row .inv-dates { grid-row: 2; grid-column: 1; }
  .inv-row .inv-amt { grid-row: 1; grid-column: 2; text-align: right; }
  .inv-row > div:nth-child(4) { grid-row: 2; grid-column: 2; justify-self: end; }
  .inv-row .inv-act { grid-column: 1 / -1; justify-content: flex-start; }
  .card.admin-inv .inv-row { grid-template-columns: minmax(0, 1fr) auto; }
  .card.admin-inv .inv-act { flex-wrap: wrap; }
  .page-head .actions:has(.select) { flex-wrap: wrap; }
  .page-head .actions .select { width: 100%; }
  .inv-row .inv-act:empty { display: none; }
  .files { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .files.lg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-head, .card-body { padding-left: 16px; padding-right: 16px; }
  /* Phones: the review/approve card comes first, details last */
  .detail-main, .detail-side { display: contents; }
  .detail { gap: 18px; }
  .detail .action-card { order: -1; }
  .detail .action-card .steps { display: none; }
  .detail .action-card > div[style] { border-top: 0 !important; padding-top: 0 !important; }
  .pace { gap: 14px 22px; }
  .stat b { font-size: 26px; }
}
@media (pointer: coarse) {
  .rcard .move { display: flex; }
  .rcard.can-move { padding-bottom: 46px; }
  .file .del { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
