/* Atlas — calm daylight design system. */
:root {
  --ground: #f8fbf6;
  --ink: #16130f;
  --ink-soft: #4c463f;
  --muted: #8a8378;
  --card: #ffffff;
  --line: #e7e3da;
  --accent: #ca3832;
  --red: #e5484d; --red-bg: #fdecec;
  --amber: #f59e0b; --amber-bg: #fdf1de;
  --green: #16a34a; --green-bg: #e7f6ed;
  --blue: #4361ee; --blue-bg: #e8ecfe;
  --violet: #7c3aed; --violet-bg: #f0e9fe;
  --orange: #ea6a17; --orange-bg: #fdeede;
  --pink: #db2777; --pink-bg: #fce8f1;
  --yellow: #eab308; --yellow-bg: #fbf3d3;
  --slate: #64748b; --slate-bg: #eef1f5;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(22, 19, 15, .05), 0 4px 14px rgba(22, 19, 15, .04);
  /* neutral sub-tokens (themeable) */
  --card-soft: #fdfdfb;
  --row-hover: #fcfbf7;
  --line-soft: #f1eee6;
  --nav-active: #f3ece9;
  --unread-bg: #fdf7ef;
  --quote-bg: #f6f3ec;
  --quote-bg-hover: #f1ede3;
  --accent-soft: #fdf5f4;
  --well: #f3f1ea;
  --well-hover: #efece2;
  /* liquid glass (Orbit recipe) */
  --glass-bg: rgba(255, 255, 255, .55);
  --glass-bd: rgba(255, 255, 255, .7);
  --glass-hl: rgba(255, 255, 255, .85);
  --glass-sheen: rgba(255, 255, 255, .5);
  --glass-shadow: 0 10px 34px rgba(31, 38, 55, .16);
}

/* ---- Dark theme ---- */
html[data-theme="dark"] {
  --ground: #0f1218;
  --ink: #e7e9ee;
  --ink-soft: #b6bcc6;
  --muted: #7c8390;
  --card: #191d26;
  --line: #2a2f3a;
  --card-soft: #1e222c;
  --row-hover: #20252f;
  --line-soft: #242833;
  --nav-active: #33232a;
  --unread-bg: #1e2233;
  --quote-bg: #1e222c;
  --quote-bg-hover: #232833;
  --accent-soft: #2a1f22;
  --well: #14171e;
  --well-hover: #191d25;
  --red: #f0616a; --red-bg: rgba(229, 72, 77, .18);
  --amber: #eab758; --amber-bg: rgba(245, 158, 11, .18);
  --green: #33c07e; --green-bg: rgba(22, 163, 74, .2);
  --blue: #6d86ff; --blue-bg: rgba(67, 97, 238, .22);
  --violet: #a887f7; --violet-bg: rgba(124, 58, 237, .24);
  --orange: #f2953f; --orange-bg: rgba(234, 106, 23, .2);
  --pink: #ee6faa; --pink-bg: rgba(219, 39, 119, .2);
  --yellow: #e8c34a; --yellow-bg: rgba(234, 179, 8, .2);
  --slate: #8b93a1; --slate-bg: rgba(100, 116, 139, .26);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 4px 14px rgba(0, 0, 0, .28);
  --glass-bg: rgba(40, 38, 34, .45);
  --glass-bd: rgba(255, 255, 255, .14);
  --glass-hl: rgba(255, 255, 255, .16);
  --glass-sheen: rgba(255, 255, 255, .2);
  --glass-shadow: 0 12px 38px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
html[data-theme="dark"] .flash { background: var(--green-bg); border-color: #2c5540; color: #9fd4b4; }
html[data-theme="dark"] .g2-today-line { opacity: .8; }
* { box-sizing: border-box; margin: 0; }
[x-cloak] { display: none !important; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--ground); color: var(--ink);
  font-size: 14px; line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* ---- Shell ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; flex-shrink: 0; background: var(--card);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; padding: 18px 16px 14px; letter-spacing: .2px; color: inherit; text-decoration: none; cursor: pointer; }
a.brand:hover .brand-logo { transform: scale(1.08); transition: transform .15s ease; }
a.brand:hover .brand-name { color: var(--accent); transition: color .15s ease; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800;
}
.brand-logo { display: inline-block; flex-shrink: 0; vertical-align: middle; }
.login-brand .brand-logo { margin-right: 2px; }
.sidebar nav { display: flex; flex-direction: column; padding: 6px 8px; gap: 2px; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 8px; color: var(--ink-soft); font-weight: 500;
}
.sidebar nav a:hover { background: var(--ground); color: var(--ink); }
.sidebar nav a.active { background: var(--nav-active); color: var(--accent); font-weight: 600; }
.sidebar nav a.soon { color: var(--muted); cursor: default; }
.sidebar nav a.soon:hover { background: none; }
.sidebar nav a em { font-style: normal; font-size: 10px; margin-left: auto; background: var(--slate-bg); color: var(--muted); border-radius: 99px; padding: 1px 7px; }
.nav-ico { width: 18px; text-align: center; opacity: .75; }
.sidebar-foot { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-top: 1px solid var(--line); }
.foot-meta { display: flex; flex-direction: column; line-height: 1.2; flex: 1; min-width: 0; }
.foot-meta strong { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-meta span { font-size: 11px; color: var(--muted); }
.linkish { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; }
.linkish:hover { color: var(--accent); }
.foot-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; border-radius: 8px; padding: 3px 4px; margin: -3px -4px; }
.foot-user:hover { background: var(--slate-bg); }

/* Profile photo avatars */
.avatar-photo { object-fit: cover; background: var(--card); }
/* ---- My Profile page ---- */
.pf-wrap { max-width: 620px; display: flex; flex-direction: column; gap: 16px; }
.pf-intro { margin-bottom: 22px; }
.pf-identity { display: flex; gap: 26px; align-items: flex-start; }
@media (max-width: 560px) { .pf-identity { flex-direction: column; align-items: center; text-align: center; } }
.pf-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 9px; flex-shrink: 0; }
.pf-avatar { position: relative; border: none; background: none; padding: 0; cursor: pointer; border-radius: 50%; line-height: 0; }
.pf-avatar .avatar { box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line); transition: box-shadow .15s; }
.pf-avatar:hover .avatar { box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--accent); }
.pf-cam { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; border: 3px solid var(--card); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.pf-remove { border: none; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 2px 4px; }
.pf-remove:hover { color: var(--red); }
.pf-form { flex: 1; min-width: 0; }
.pf-label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.pf-label span { font-weight: 400; color: var(--muted); }
.pf-label-mt { margin-top: 18px; }
.pf-input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 13px; font-size: 14px; background: var(--card-soft); color: var(--ink); font-weight: 550; font-family: inherit; }
.pf-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(202,56,50,.15); }
.pf-photo-hint { margin-top: 10px; }
.pf-swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.pf-swatch { position: relative; width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer; padding: 0; transition: transform .1s; }
.pf-swatch:hover { transform: scale(1.12); }
.pf-swatch-active { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.pf-swatch-active::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.pf-actions { margin-top: 22px; }
.pf-pw-grid { display: grid; gap: 14px; max-width: 380px; }
.pf-pw-grid .form-error { margin-top: -8px; }

/* People / user management */
.people-add .pa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.people-add label { display: block; margin-bottom: 3px; }
.people-add input, .people-add select { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 13.5px; }
.invite-link-panel { border-color: var(--green); }
.invite-copy { display: flex; gap: 8px; }
.invite-copy input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); color: var(--ink-soft); font-size: 12.5px; font-family: ui-monospace, monospace; }
.people-table { width: 100%; border-collapse: collapse; }
.people-table td { padding: 11px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.people-table tr:first-child td { border-top: none; }
.pt-user { display: flex; align-items: center; gap: 11px; }
.pt-meta { display: flex; flex-direction: column; line-height: 1.35; }
.pt-meta strong { font-size: 13.5px; }
.pt-role select { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--ink); font-size: 12.5px; }
.pt-actions { text-align: right; white-space: nowrap; }
.pt-actions form { display: inline; margin-left: 6px; }
.pt-reinvite-wrap { display: inline-block; margin-left: 6px; position: relative; }
.pt-reinvite-wrap > button { margin-left: 0; }
/* the re-invite editor floats as a popover so opening it never reflows/stretches the row */
.pt-actions .pt-reinvite {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; margin: 0;
  display: flex; gap: 6px; align-items: center; white-space: nowrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; box-shadow: 0 12px 30px rgba(0,0,0,.20);
}
.pt-reinvite input { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 7px; padding: 6px 9px; font-size: 12.5px; min-width: 220px; }
.pt-reinvite .btn-inline { white-space: nowrap; }
.prow-off { opacity: 0.55; }
@media (max-width: 640px) { .people-add .pa-grid { grid-template-columns: 1fr; } .pt-user { max-width: 150px; } }

/* Audit log */
.aud-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.aud-filters .search-input { flex: 1; min-width: 180px; }
.aud-filters select, .aud-filters input[type=date] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 12.5px; }
.aud-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.aud-tbl th { text-align: left; padding: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
.aud-tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.aud-when { white-space: nowrap; line-height: 1.3; }
.aud-sum { color: var(--ink-soft); word-break: break-word; }
.aud-ip { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.aud-act { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.aud-neutral { background: var(--slate-bg); color: var(--ink-soft); }
.aud-ok { background: var(--green-bg); color: var(--green); }
.aud-danger { background: var(--red-bg); color: var(--red); }
.aud-pager { display: flex; align-items: center; gap: 14px; justify-content: center; margin-top: 16px; }
.is-disabled { opacity: .4; pointer-events: none; }

/* KB slash-menu blocks (view mode) */
.kb-body ul.kb-check { list-style: none; padding-left: 4px; }
.kb-body ul.kb-check li { position: relative; padding-left: 28px; margin: 5px 0; cursor: pointer; }
.kb-body ul.kb-check li::before { content: ""; position: absolute; left: 0; top: 2px; width: 17px; height: 17px; border: 2px solid var(--line); border-radius: 5px; background: var(--card); }
.kb-body ul.kb-check li.done::before { background: var(--green); border-color: var(--green); }
.kb-body ul.kb-check li.done::after { content: "✓"; position: absolute; left: 3px; top: 1px; color: #fff; font-size: 12px; font-weight: 700; }
.kb-body ul.kb-check li.done { color: var(--muted); text-decoration: line-through; }
.kb-body details.kb-toggle { border-left: 3px solid var(--line); padding: 2px 0 2px 12px; margin: 8px 0; }
.kb-body details.kb-toggle summary { cursor: pointer; font-weight: 600; }
.kb-body a.kb-btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; padding: 8px 18px; border-radius: 8px; }
.kb-body a.kb-btn:hover { filter: brightness(1.05); }

/* KB slash-menu: link-to-project/task picker overlay */
.kb-ref-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-start; justify-content: center; z-index: 9000; padding-top: 12vh; }
.kb-ref-box { background: var(--card); border: 1px solid var(--line); border-radius: 12px; width: 460px; max-width: 92vw; box-shadow: 0 18px 50px rgba(0,0,0,.3); overflow: hidden; }
.kb-ref-box input { width: 100%; border: none; border-bottom: 1px solid var(--line); padding: 14px 16px; font-size: 14px; background: var(--card); color: var(--ink); outline: none; }
.kb-ref-results { max-height: 320px; overflow-y: auto; }
.kb-ref-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: none; padding: 10px 16px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.kb-ref-item:hover { background: var(--slate-bg); }
.kb-ref-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--slate); border-radius: 99px; padding: 2px 8px; flex-shrink: 0; }
.kb-ref-empty { padding: 14px 16px; }
.kb-ref-hint { padding: 8px 16px; border-top: 1px solid var(--line); }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 26px 0;
}
.topbar h1 { font-size: 21px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.back-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink-soft); font-size: 18px; line-height: 1; text-decoration: none; cursor: pointer; transition: background .14s, border-color .14s, color .14s; }
.back-btn:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.content { padding: 16px 26px 40px; display: flex; flex-direction: column; gap: 16px; }

/* ---- Panels & stats ---- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.panel-flush { padding: 6px 0 10px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.panel-flush .panel-head { padding: 10px 18px 0; }
.panel-head h2 { font-size: 14.5px; font-weight: 700; }
.panel-link { font-size: 12.5px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: minmax(0, 35fr) minmax(0, 65fr); gap: 16px; align-items: start; }
.col-stack { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } } /* sidebar becomes a drawer on mobile — see the mobile section at the end of this file */

.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(3, 1fr); } }

/* LIQUID GLASS stat tiles (Orbit recipe: frosted card + sheen + colour glow behind). */
.stat-row { position: relative; z-index: 0; }
.stat-row::before {
  content: ''; position: absolute; inset: -30px -10px; z-index: -1; pointer-events: none; filter: blur(14px);
  background:
    radial-gradient(30% 75% at 7% 50%, rgba(107, 114, 128, .18), transparent 70%),
    radial-gradient(30% 75% at 25% 50%, rgba(214, 69, 69, .17), transparent 70%),
    radial-gradient(30% 75% at 42% 50%, rgba(217, 154, 38, .17), transparent 70%),
    radial-gradient(30% 75% at 59% 50%, rgba(63, 157, 99, .17), transparent 70%),
    radial-gradient(30% 75% at 76% 50%, rgba(202, 56, 50, .15), transparent 70%),
    radial-gradient(30% 75% at 93% 50%, rgba(59, 116, 196, .17), transparent 70%);
}
.stat {
  position: relative; overflow: hidden;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--glass-bd);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hl), inset 0 0 18px rgba(255, 255, 255, .03);
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background:
    radial-gradient(120% 80% at 0% 0%, var(--glass-sheen), rgba(255, 255, 255, 0) 45%),
    linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 60%);
}
.stat > * { position: relative; z-index: 1; }
.stat:hover { transform: translateY(-2px); }
.stat-num { font-size: 24px; font-weight: 750; display: block; letter-spacing: -.5px; }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.stat-red .stat-num { color: var(--red); }
.stat-amber .stat-num { color: var(--amber); }
.stat-green .stat-num { color: var(--green); }

/* ---- Insights charts ---- */
.charts-row { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .charts-row { grid-template-columns: 1fr; } }
.chart-box { position: relative; }

/* ---- Health strip ---- */
.health-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.health-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px;
  display: flex; flex-direction: column; gap: 7px; background: var(--card);
  transition: transform .08s ease, box-shadow .08s ease;
}
.health-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: inherit; }
.hc-red { border-left: 3px solid var(--red); }
.hc-amber { border-left: 3px solid var(--amber); }
.hc-green { border-left: 3px solid var(--green); }
.hc-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hc-name { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hc-meta { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.hc-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-soft); }
.hc-reason { font-size: 10.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 6px; }

/* ---- Dots, pills, chips, avatars ---- */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-red { background: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.dot-amber { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.dot-green { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.pill { font-size: 10.5px; font-weight: 600; border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
/* Solid, vibrant status/stage pills (ClickUp-style pop). Yellow keeps dark text for contrast. */
.pill-slate { background: var(--slate); color: #fff; }
.pill-violet { background: var(--violet); color: #fff; }
.pill-blue { background: var(--blue); color: #fff; }
.pill-orange { background: var(--orange); color: #fff; }
.pill-pink { background: var(--pink); color: #fff; }
.pill-yellow { background: var(--yellow); color: #3d3100; }
.pill-green { background: var(--green); color: #fff; }
.pill-red { background: var(--red); color: #fff; }
.avatar {
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; flex-shrink: 0;
  background: hsl(var(--hue, 210), 42%, 47%);
}
.avatar-empty { background: var(--slate-bg); color: var(--muted); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 5px 14px; font-size: 12.5px; font-weight: 550; color: var(--ink-soft); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-active { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.chip-active:hover { color: var(--ground); }
/* timeline paging: a small divider between the zoom chips and the earlier/later nav */
.tl-nav-sep { align-self: stretch; width: 1px; background: var(--line); margin: 2px 2px; }
.chip-accent { border-color: var(--accent); color: var(--accent); font-weight: 650; }
.chip-accent:hover { background: var(--accent); color: #fff; }
.chip-sm { font-size: 10.5px; font-weight: 600; border-radius: 99px; padding: 2px 8px; }
.chip-retainer { background: var(--violet-bg); color: var(--violet); }
.chip-one_time { background: var(--blue-bg); color: var(--blue); }
.chip-recurring { background: var(--green-bg); color: var(--green); }
.count-badge { font-size: 10px; font-weight: 700; background: var(--slate-bg); color: var(--ink-soft); border-radius: 99px; padding: 1px 7px; margin-left: 6px; }
.ref { font-size: 10.5px; color: var(--muted); font-weight: 650; letter-spacing: .3px; white-space: nowrap; }
.muted { color: var(--muted); }
.muted-sm { color: var(--muted); font-size: 11.5px; }
.overdue-text { color: var(--red); font-weight: 650; font-size: 12px; }
.empty { color: var(--muted); padding: 14px 4px; font-size: 13px; }
.panel-flush .empty { padding: 14px 18px; }

/* ---- Progress ---- */
.progress { height: 5px; border-radius: 99px; background: var(--slate-bg); overflow: hidden; min-width: 60px; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--green); }
.progress-cell { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-soft); }

/* ---- Projects toolbar (Notion-style) ---- */
.ptoolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; flex-wrap: wrap; }
.ptoolbar .view-tabs { border-bottom: none; margin-bottom: 0; }
.ptoolbar-sub { display: flex; align-items: center; margin-bottom: 12px; }
.tbar { display: flex; align-items: center; gap: 4px; padding-bottom: 4px; }
.tbar-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 7px 13px; font-size: 12px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.tbar-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tbar-on { color: var(--accent); }
.tico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tbar-new { display: inline-flex; align-items: center; background: var(--accent); color: #fff; border-radius: 8px; padding: 7px 13px; font-size: 12.5px; font-weight: 650; margin-left: 4px; }
.tbar-new:hover { background: #b32e29; color: #fff; }
.tbar-pop { position: relative; }
.pop { position: absolute; top: 100%; right: 0; margin-top: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 24px rgba(22,19,15,.12); min-width: 200px; padding: 6px; z-index: 30; }
.pop-head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 5px 8px 6px; }
.pop-item { display: flex; align-items: center; justify-content: space-between; padding: 7px 8px; border-radius: 7px; font-size: 12.5px; color: var(--ink-soft); }
.pop-item:hover { background: var(--ground); color: var(--ink); }
.pop-active { background: var(--nav-active); color: var(--accent); font-weight: 600; }
.pop-dir { color: var(--accent); font-weight: 700; }

/* ---- Value chips (dimension values, scrollable) ---- */
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.chips-scroll .chip { flex-shrink: 0; }
.chip-n { font-size: 10px; opacity: .65; margin-left: 3px; }

/* ---- View-mode switcher (Table | List | Board) ---- */
.vswitch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-right: 4px; }
.vsw { display: inline-flex; align-items: center; padding: 6px 9px; color: var(--muted); }
.vsw:hover { background: var(--ground); color: var(--ink); }
.vsw-active { background: var(--ink); color: #fff; }
.vsw-active:hover { background: var(--ink); color: #fff; }

/* ---- Project board ---- */
.pboard { align-items: flex-start; }
.pcol-wrap { min-width: 250px; width: 250px; }
.pcard-name { font-weight: 650; font-size: 13px; display: block; line-height: 1.3; }
.pcard-name:hover { color: var(--accent); }
.pcard .pclient { margin: 2px 0 6px; }
.pcard-prog { margin-bottom: 7px; }
.pcard-side { display: inline-flex; align-items: center; gap: 6px; }
.hp-red { background: var(--red-bg); color: var(--red); }
.hp-amber { background: var(--amber-bg); color: var(--amber); }
.hp-green { background: var(--green-bg); color: var(--green); }
.pcol-new { display: block; text-align: center; border: 1px dashed var(--line); border-radius: 8px; padding: 7px; font-size: 12px; color: var(--muted); }
.pcol-new:hover { color: var(--accent); border-color: var(--accent); }
.sl-chooser { position: absolute; left: 8px; top: 8px; z-index: 50; }
.pcard { position: relative; }

/* ---- List view (tasks under project headers) ---- */
.lv-proj { padding: 6px 0 10px; border-bottom: 1px solid var(--line); }
.lv-proj:last-child { border-bottom: none; }
.lv-head { display: flex; align-items: center; gap: 9px; padding: 10px 18px 6px; }
.lv-name { font-weight: 700; font-size: 13.5px; }
.lv-newtask { display: inline-block; font-size: 12px; color: var(--muted); padding: 6px 18px 0; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; }
.lv-newtask:hover { color: var(--accent); }

/* ---- Modal + tab customization ---- */
.modal-overlay { position: fixed; inset: 0; background: rgba(22,19,15,.34); display: flex; align-items: flex-start; justify-content: center; padding-top: 8vh; z-index: 100; }
.modal { background: var(--card); border-radius: 14px; box-shadow: 0 12px 48px rgba(22,19,15,.22); width: 560px; max-width: 92vw; padding: 22px 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); justify-content: flex-end; }
.tabcfg-list { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.tabcfg-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--card-soft); }
.tabcfg-drag { cursor: grab; color: var(--muted); font-size: 14px; }
.tabcfg-vis { display: flex; }
.tabcfg-label { border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font-size: 13px; font-weight: 600; width: 190px; }
.tabcfg-desc { flex: 1; }

/* ---- Stage manager ---- */
.st-list { max-height: 54vh; overflow-y: auto; padding-right: 2px; }
.stage-row { gap: 8px; padding: 5px 8px; }
.stage-row:hover { border-color: #ddd6c8; }
.st-ghost { opacity: .45; }
.st-name { flex: 1; min-width: 0; border: 1px solid transparent; border-radius: 7px; padding: 6px 9px; font-size: 13px; font-weight: 600; background: none; font-family: inherit; color: var(--ink); }
.stage-row:hover .st-name, .st-name:focus { border-color: var(--line); background: var(--card); outline: none; }
.st-dots { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.st-dotpick { width: 15px; height: 15px; border-radius: 50%; border: none; padding: 0; cursor: pointer; opacity: .4; flex-shrink: 0; transition: transform .1s, opacity .1s; }
.st-dotpick:hover { opacity: .85; transform: scale(1.15); }
.st-dotpick.sel { opacity: 1; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px currentColor; }
.st-end { width: 64px; display: flex; justify-content: flex-end; flex-shrink: 0; }
.st-lock { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; background: var(--slate-bg); color: var(--muted); border-radius: 99px; padding: 3px 8px; }
.st-del { width: 26px; height: 26px; border: none; background: none; border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 13px; }
.st-del:hover { background: var(--red-bg); color: var(--red); }
.st-add { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin-top: 10px; padding: 9px; border: 1.5px dashed var(--line); border-radius: 9px; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.st-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---- Chat ---- */
.chat-wrap { display: flex; gap: 0; height: calc(100vh - 118px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-side { width: 230px; flex-shrink: 0; border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px; background: var(--row-hover); }
.chat-side-head { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 10px 10px 4px; }
.chat-chan { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; color: var(--ink-soft); }
.chat-chan:hover { background: var(--ground); color: var(--ink); }
.chat-chan-active { background: var(--red-bg); color: var(--accent); font-weight: 650; }
.chat-arch-toggle { display: flex; align-items: center; gap: 5px; width: 100%; background: none; border: 0; font-family: inherit; cursor: pointer; }
.chat-arch-toggle:hover { color: var(--ink); }
.chat-arch-caret { font-size: 9px; width: 9px; }
.chat-chan-archived { opacity: .62; }
.chat-chan-archived:hover { opacity: 1; }
.chat-arch-tag { margin-left: auto; font-size: 9px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; white-space: nowrap; }
.chan-hash { color: var(--muted); font-weight: 700; }
.chan-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-unread { font-style: normal; font-size: 10px; font-weight: 750; background: var(--accent); color: #fff; border-radius: 99px; padding: 1px 7px; }
.chat-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-title { font-size: 14px; }
.chat-hint { margin-left: auto; }
.chat-thread { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { display: flex; gap: 10px; position: relative; padding: 2px 8px; margin: -2px -8px; border-radius: 8px; }
.chat-msg:hover { background: var(--row-hover); }
.chat-msg-main { min-width: 0; flex: 1; }
.chat-msg-head { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.chat-acts { display: none; gap: 6px; margin-left: auto; }
.chat-msg:hover .chat-acts { display: inline-flex; }
.chat-act { border: 1px solid var(--line); background: var(--card); border-radius: 7px; padding: 2px 8px; font-size: 11px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.chat-act:hover { border-color: var(--green); color: var(--green); }
.chat-act-del:hover { border-color: var(--red); color: var(--red); }
.chat-msg-body { font-size: 13px; line-height: 1.5; color: var(--ink); word-wrap: break-word; }
.chat-msg-body a { color: var(--blue); text-decoration: underline; }
.chat-mention { background: var(--yellow-bg); color: var(--yellow); border-radius: 4px; padding: 0 3px; font-weight: 650; }
.chat-task-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; font-size: 11px; font-weight: 700; background: var(--green-bg); color: var(--green); border-radius: 99px; padding: 2px 9px; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
.chat-compose textarea { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 13px; resize: none; min-height: 40px; }
.chat-compose textarea:focus { outline: none; border-color: var(--muted); }
.em-unread { background: var(--accent) !important; color: #fff !important; }
.chat-attach-btn { border: 1px solid var(--line); background: var(--card); border-radius: 10px; width: 40px; height: 40px; font-size: 16px; cursor: pointer; flex-shrink: 0; }
.chat-attach-btn:hover { border-color: var(--muted); }
.chat-quote { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: none; border-left: 3px solid var(--accent); background: var(--quote-bg); border-radius: 6px; padding: 5px 10px; margin: 3px 0 4px; font-size: 11.5px; cursor: pointer; text-align: left; max-width: 480px; font-family: inherit; }
.chat-quote:hover { background: var(--quote-bg-hover); }
.chat-quote strong { color: var(--accent); font-size: 11px; }
.chat-quote span { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 440px; }
.chat-img { display: block; max-width: 320px; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); margin: 4px 0; cursor: zoom-in; }
.chat-file { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card-soft); border-radius: 10px; padding: 7px 12px; margin: 4px 0; font-size: 12.5px; max-width: 380px; }
.chat-file:hover { border-color: var(--muted); }
.chat-file-ico { font-size: 16px; }
.chat-file-name { font-weight: 650; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chat-pending { padding: 8px 16px 0; }
.chat-strip { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--row-hover); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.chat-strip-ico { font-size: 14px; }
.chat-strip-img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.chat-strip-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }
.chat-hl { background: var(--yellow-bg); border-radius: 10px; transition: background 1s; }

/* ---- Chat v0.54: slack-style grouping, reactions, threads, mentions ---- */
.chat-gutter { width: 30px; flex-shrink: 0; display: flex; align-items: flex-start; justify-content: center; }
.chat-hover-time { display: none; font-size: 9.5px; color: var(--muted); padding-top: 3px; white-space: nowrap; }
.cm-compact { margin-top: -12px; }
.cm-compact .chat-msg-ava, .cm-compact .chat-msg-head { display: none; }
.cm-compact:hover .chat-hover-time { display: block; }
.chat-day { display: flex; align-items: center; gap: 10px; margin: 6px 0 -2px; }
.chat-day::before, .chat-day::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.chat-day span { font-size: 10.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 2px 12px; }
.chat-toolbar { position: absolute; top: -12px; right: 10px; display: none; gap: 3px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 3px; box-shadow: 0 4px 14px rgba(17,14,13,.08); z-index: 5; }
.chat-msg:hover .chat-toolbar { display: inline-flex; }
.chat-toolbar form { display: contents; }
.chat-toolbar .chat-act { border: none; background: none; padding: 3px 6px; font-size: 12.5px; border-radius: 6px; }
.chat-toolbar .chat-act:hover { background: var(--row-hover); color: var(--ink); }
.chat-toolbar .chat-act-del:hover { background: var(--red-bg); color: var(--red); }
.chat-edited { font-size: 10.5px; color: var(--muted); font-style: italic; }
.chat-code { background: var(--slate-bg); border: 1px solid var(--line); border-radius: 5px; padding: 0 5px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.chat-pre { background: var(--slate-bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; margin: 5px 0; white-space: pre-wrap; word-break: break-word; max-width: 560px; }
.chat-li { display: block; padding-left: 6px; }
.react-strip { display: flex; flex-wrap: wrap; gap: 4px; }
.react-strip:not(:empty) { margin-top: 5px; }
.react-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 1px 9px; font-size: 12.5px; cursor: pointer; }
.react-chip span { font-size: 10.5px; font-weight: 750; color: var(--ink-soft); }
.react-chip:hover { border-color: var(--muted); }
.react-mine { border-color: var(--accent); background: var(--red-bg); }
.react-mine span { color: var(--accent); }
.react-pop { position: fixed; display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 5px 7px; box-shadow: 0 8px 26px rgba(17,14,13,.14); z-index: 210; }
.react-pop button { border: none; background: none; font-size: 17px; padding: 3px 5px; border-radius: 7px; cursor: pointer; }
.react-pop button:hover { background: var(--row-hover); transform: scale(1.2); }
.chat-thread-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; padding: 3px 10px; font-size: 11.5px; font-weight: 650; color: var(--blue); cursor: pointer; }
.chat-thread-chip:hover { border-color: var(--blue); background: var(--blue-bg, var(--row-hover)); }
.thread-panel { width: 340px; flex-shrink: 0; border-left: 1px solid var(--line); display: flex; flex-direction: column; background: var(--card); }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.thread-head .flash-x { margin-left: auto; }
.thread-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.thread-sep { border-top: 1px solid var(--line); margin: 2px 0; }
.thread-compose { display: flex; gap: 6px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); }
.thread-compose textarea { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; font-family: inherit; font-size: 12.5px; resize: none; min-height: 36px; }
.thread-compose textarea:focus { outline: none; border-color: var(--muted); }
.chat-msg-in-thread .chat-toolbar { right: 4px; }
.chat-main { position: relative; }
.chat-drop { position: absolute; inset: 8px; z-index: 60; border: 2px dashed var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--card) 82%, transparent); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: var(--accent); pointer-events: none; }
.chat-compose { position: relative; }
.mention-menu { position: absolute; bottom: calc(100% + 4px); left: 60px; width: 300px; max-height: 240px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 26px rgba(17,14,13,.14); z-index: 80; padding: 4px; }
.mention-item { display: flex; align-items: baseline; gap: 8px; width: 100%; border: none; background: none; text-align: left; padding: 6px 10px; border-radius: 7px; font-size: 12.5px; cursor: pointer; }
.mention-item strong { color: var(--accent); }
.mention-item:hover, .mention-active { background: var(--row-hover); }
.chat-edit-wrap { margin: 3px 0; }
.chat-edit-box { width: 100%; max-width: 560px; border: 1px solid var(--accent); border-radius: 9px; padding: 7px 10px; font-family: inherit; font-size: 13px; resize: vertical; }
.chat-edit-box:focus { outline: none; }
.chat-edit-acts { display: flex; gap: 6px; margin-top: 4px; }
.chat-edit-acts .chat-act { border: 1px solid var(--line); background: var(--card); padding: 2px 10px; font-size: 11px; border-radius: 7px; }

/* ---- Files ---- */
.file-up { display: flex; gap: 8px; align-items: center; }
.file-input { font-size: 12px; color: var(--ink-soft); max-width: 260px; }
.file-input-sm { max-width: 220px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.file-card { border: 1px solid var(--line); border-radius: 10px; background: var(--card-soft); overflow: hidden; display: flex; flex-direction: column; }
.file-thumb { display: block; width: 100%; height: 120px; border: none; padding: 0; background: var(--slate-bg); cursor: zoom-in; }
.file-thumb img { width: 100%; height: 120px; object-fit: cover; display: block; }
.file-thumb-icon { display: flex; align-items: center; justify-content: center; font-size: 38px; cursor: pointer; text-align: center; line-height: 120px; }
.file-meta { padding: 8px 10px 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-name { font-size: 12px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-acts { display: flex; gap: 4px; justify-content: flex-end; padding: 2px 8px 8px; }
.file-acts a, .file-acts button { border: none; background: none; color: var(--muted); font-size: 13px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.file-acts a:hover { color: var(--ink); background: var(--slate-bg); }
.file-acts button:hover { color: var(--red); background: var(--red-bg); }
.lightbox { position: fixed; inset: 0; background: rgba(17,14,13,.82); z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: zoom-out; padding: 4vh 4vw; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 8px; box-shadow: 0 18px 60px rgba(0,0,0,.4); }
.lightbox-title { color: #f8fbf6; font-size: 12.5px; }

/* task panel attachments */
.task-files { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.tf-head { font-weight: 700; text-transform: uppercase; letter-spacing: .4px; font-size: 10px !important; margin-bottom: 6px; }
.tf-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12.5px; }
.tf-thumb { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.tf-ico { width: 34px; text-align: center; font-size: 18px; }
.tf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 550; }
.tf-name:hover { color: var(--accent); }
.tf-dl { color: var(--muted); }
.tf-dl:hover { color: var(--ink); }
.tf-up { display: flex; gap: 8px; align-items: center; margin-top: 6px; }

/* ---- Docs ---- */
.doc-list { display: flex; flex-direction: column; margin-top: 6px; }
.doc-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); border-radius: 8px; }
.doc-row:last-child { border-bottom: none; }
.doc-row:hover { background: var(--ground); }
.doc-title { font-size: 13px; font-weight: 650; color: var(--ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.doc-head-side { display: flex; gap: 8px; }
.doc-title-input { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-size: 16px; font-weight: 700; font-family: inherit; margin-bottom: 10px; }
.doc-title-input:focus { outline: none; border-color: var(--muted); }
.doc-view-title { font-size: 19px; font-weight: 750; margin-bottom: 4px; }

/* ---- Settings hub ---- */
.set-section { margin-bottom: 8px; }
.set-section-head { font-size: 10.5px; letter-spacing: .8px; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 7px; margin-bottom: 16px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.set-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 18px 12px 14px; border-radius: 14px; border: 1px solid transparent; }
.set-card:hover { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); color: inherit; }
.set-ico { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; font-size: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 4px; }
.set-label { font-size: 12.5px; font-weight: 650; }
.set-desc { font-size: 11px; color: var(--muted); line-height: 1.35; }
.set-card-soon { opacity: .55; cursor: default; }
.set-card-soon:hover { background: none; border-color: transparent; box-shadow: none; }
.set-soon { font-style: normal; font-size: 9px; font-weight: 700; text-transform: uppercase; background: var(--slate-bg); color: var(--muted); border-radius: 99px; padding: 1px 6px; vertical-align: 2px; }

/* theme picker */
.theme-pick { display: flex; gap: 14px; }
.theme-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 18px; border: 2px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 650; color: var(--ink); }
.theme-card:hover { border-color: var(--muted); }
.theme-card-active { border-color: var(--accent); }
.theme-preview { width: 120px; height: 70px; border-radius: 9px; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.theme-preview-light { background: #f8fbf6; }
.theme-preview-light span { display: block; height: 10px; border-radius: 4px; background: #fff; border: 1px solid #e7e3da; }
.theme-preview-dark { background: #131210; }
.theme-preview-dark span { display: block; height: 10px; border-radius: 4px; background: #1d1b18; border: 1px solid #33302a; }

/* members & access */
.mem-list { display: flex; flex-direction: column; gap: 8px; }
.mem-row { border: 1px solid var(--line); border-radius: 12px; background: var(--card-soft); padding: 10px 14px; }
.mem-main { display: flex; align-items: center; gap: 11px; }
.mem-meta { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.mem-scope { flex-shrink: 0; }
.mem-config { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.mem-scope-pick { display: flex; gap: 18px; margin-bottom: 10px; }
.mem-radio { display: flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; }
.mem-projects { border: 1px solid var(--line); border-radius: 10px; max-height: 46vh; overflow-y: auto; }
.mem-proj-head, .mem-proj-row { display: grid; grid-template-columns: 1fr 70px 70px; align-items: center; gap: 8px; padding: 6px 12px; }
.mem-proj-head { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.mem-proj-row { border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.mem-proj-row:last-child { border-bottom: none; }
.mem-proj-row:hover { background: var(--row-hover); }
.mem-proj-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* service catalog */
.cat-block { margin-bottom: 14px; }
.cat-category { font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.cat-services { display: flex; flex-wrap: wrap; gap: 6px; }

/* chat channel management + storage */
.chat-side-head-btn { display: flex; align-items: center; justify-content: space-between; }
.chan-add { border: 1px solid var(--line); background: var(--card); border-radius: 6px; width: 20px; height: 20px; font-size: 12px; line-height: 1; cursor: pointer; color: var(--muted); }
.chan-add:hover { color: var(--accent); border-color: var(--accent); }
.chat-usage { flex-shrink: 0; }
.ch-members { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; max-height: 38vh; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.stor-list { display: flex; flex-direction: column; gap: 12px; }
.stor-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.stor-name { font-size: 13px; font-weight: 650; }
.stor-bar { height: 8px; border-radius: 99px; background: var(--slate-bg); overflow: hidden; }
.stor-fill { height: 100%; border-radius: 99px; background: var(--blue); }

/* whiteboard island */
.wb-page { display: flex; flex-direction: column; gap: 10px; }
.wb-mount { height: calc(100vh - 150px); min-height: 480px; }
.wb-mount > div { height: 100%; }
/* The board is always a light canvas (cream cards), so its text/controls must stay dark
   and native widgets light — regardless of the app's dark theme (else note/checklist text
   inherits the page's light ink and vanishes on the light cards). */
#atlasBoard {
  color-scheme: light;
  /* Tailwind preflight is off for the island, so seed the ring base vars the ring-* utilities
     read (they inherit to every card); without these, ALL ring outlines render nothing —
     card borders, the selection ring, pin/avatar rings. Utility classes still override per-element. */
  --tw-ring-inset: ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #f7f5ed;
  --tw-ring-color: rgb(202 56 50 / .5);
}
#atlasBoard textarea, #atlasBoard input { color: #110e0d; }
#atlasBoard textarea::placeholder, #atlasBoard input::placeholder { color: #989ea3; }
.wb-toolbar::-webkit-scrollbar { width: 6px; }
.wb-toolbar::-webkit-scrollbar-thumb { background: #cfc9bd; border-radius: 99px; }
.wb-toolbar { scrollbar-width: thin; }

/* ---- Bell dropdown ---- */
.bell-wrap { position: relative; }
.bell { border: none; background: none; cursor: pointer; font-size: 15px; position: relative; padding: 4px 6px; }
.bell-panel { position: absolute; right: 0; top: 34px; width: 360px; max-width: 86vw; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 44px rgba(22,19,15,.18); z-index: 120; overflow: hidden; }
.bell-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.bell-feed { max-height: 420px; overflow-y: auto; }
.bell-feed .notif-row { padding: 9px 14px; }
.notif-unread { background: var(--unread-bg); }

/* ---- View tabs (Notion-style grouping tabs) ---- */
.view-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex-wrap: wrap; }
.vtab { padding: 8px 15px; font-size: 13px; font-weight: 550; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 7px 7px 0 0; }
.vtab:hover { background: var(--ground); color: var(--ink); }
.vtab-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.vtab-active:hover { background: none; color: var(--accent); }
.ctl-collapse { font-size: 11.5px; color: var(--muted); }
.ctl-collapse:hover { color: var(--accent); }
.group-row { cursor: pointer; }
.group-row td { background: var(--well); }
.group-row:hover td { background: var(--well-hover); }
.group-row .caret { display: inline-block; transition: transform .12s ease; color: var(--muted); margin-right: 4px; }
.group-row .caret-open { transform: rotate(90deg); }

/* ---- Control bar (filter-sort-group) ---- */
.control-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 2px 2px 0; }
.ctl { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.ctl-select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; font-weight: 500; background: var(--card); color: var(--ink); text-transform: none; letter-spacing: 0; }
.ctl-dir { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--ink-soft); background: var(--card); }
.ctl-dir:hover { border-color: var(--accent); color: var(--accent); }
.ctl-count { margin-left: auto; font-size: 11.5px; color: var(--muted); }

/* ---- Portfolio table ---- */
.table-scroll { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; min-width: 860px; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.th-sort:hover { color: var(--accent); }
.th-arrow { color: var(--accent); font-size: 9px; }
.group-row td { background: var(--well); padding: 7px 14px !important; border-bottom: 1px solid var(--line); }
.group-label { font-weight: 700; font-size: 12px; }
.svc-line { font-size: 12.5px; font-weight: 550; }
.ptable th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 650; padding: 10px 12px 6px; border-bottom: 1px solid var(--line); }
.ptable td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ptable tbody:last-child tr:last-child td { border-bottom: none; }
.prow { cursor: pointer; }
.prow:hover { background: var(--row-hover); }
.td-caret { width: 26px; padding-right: 0 !important; }
.caret { display: inline-block; transition: transform .12s ease; color: var(--muted); }
.caret-open { transform: rotate(90deg); }
.pname { display: flex; align-items: center; gap: 8px; font-weight: 620; }
.pname a:hover { color: var(--accent); }
.pclient { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.th-progress { width: 130px; }
.expand-row td { background: var(--row-hover); padding-top: 2px; }
.expand-loading { padding: 8px 0; }
.expand-tasks { padding: 6px 0 10px; }
.expand-open { display: inline-block; font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 8px; }

/* ---- Task rows ---- */
.trow { display: flex; align-items: center; gap: 12px; padding: 7px 18px; border-bottom: 1px solid var(--line-soft); }
.expand-tasks .trow { padding: 6px 4px; }
.trow:last-child { border-bottom: none; }
.trow-link:hover { background: var(--row-hover); }
.trow-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.trow-people { display: flex; gap: 3px; align-items: center; min-width: 40px; }
.trow-due { font-size: 11.5px; color: var(--ink-soft); min-width: 46px; text-align: right; }
.status-select { border: 1px solid var(--line); border-radius: 7px; background: var(--card); font-size: 11.5px; padding: 3px 6px; color: var(--ink-soft); }
.status-group { padding-top: 6px; }
.status-head { padding: 8px 18px 4px; display: flex; align-items: center; gap: 8px; }

/* ---- Attention / done lists ---- */
.attn-list { list-style: none; }
.attn-item { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line-soft); }
.attn-item:hover { background: var(--row-hover); }
.attn-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12.5px; }
.sub-head { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 12px 0 4px; }
.sub-red { color: var(--red); }
.sub-pink { color: var(--pink); }
.done-row { display: flex; gap: 12px; align-items: flex-start; padding: 7px 2px; border-bottom: 1px solid var(--line-soft); }
.done-row:last-child { border-bottom: none; }
.done-row:hover { background: var(--row-hover); }
.done-count { background: var(--green-bg); color: var(--green); font-weight: 750; border-radius: 8px; min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0; }
.done-row strong { display: block; font-size: 12.5px; }

/* ---- 3-week window ---- */
.window-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.window-day { border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px; display: flex; flex-direction: column; gap: 4px; }
.window-day.is-today { border-color: var(--accent); background: var(--accent-soft); }
.window-day.is-weekend { background: var(--card-soft); }
.window-date { font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; display: flex; gap: 6px; }
.window-date em { font-style: normal; color: var(--accent); }
.window-item { font-size: 11.5px; padding: 3px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wi-task { background: var(--blue-bg); }
.wi-deadline { background: var(--red-bg); font-weight: 600; }

/* ---- Project page ---- */
.proj-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.proj-head-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.proj-title { font-size: 17px; font-weight: 700; }
.proj-head-side { display: flex; align-items: center; gap: 12px; }
.tab-row { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tab { padding: 7px 14px; font-size: 13px; font-weight: 550; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 650; }
.tab-soon { color: var(--muted); opacity: .55; cursor: default; }
.about-grid { display: grid; grid-template-columns: 90px 1fr; gap: 7px 12px; font-size: 13px; }
.about-grid dt { color: var(--muted); font-size: 12px; }
.scope-text { font-size: 13px; color: var(--ink-soft); white-space: pre-line; }

/* ---- Top scroll proxy ---- */
.top-scroll { overflow-x: auto; overflow-y: hidden; height: 12px; }
.top-scroll::-webkit-scrollbar { height: 9px; }
.top-scroll::-webkit-scrollbar-thumb { background: #d6d0c4; border-radius: 99px; }
.top-scroll::-webkit-scrollbar-track { background: transparent; }

/* ---- Tasks toolbar (switcher left, compact add right) ---- */
.tasks-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tasks-bar .quick-add { margin-left: auto; flex-wrap: nowrap; }
.qa-title-sm { flex: 0 1 220px; min-width: 140px; }
.btn-inline { width: auto !important; margin: 0 !important; padding: 8px 16px !important; }

/* ---- Task quick-add & edit ---- */
.quick-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qa-title { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; font-size: 13px; background: var(--card-soft); }
.qa-title:focus { outline: 2px solid #e9c2c0; border-color: var(--accent); }
.qa-select, .qa-date { border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 12.5px; background: var(--card-soft); color: var(--ink-soft); }
.qa-narrow { width: 90px; }
.btn-inline { width: auto; margin: 0; padding: 8px 18px; }
.trow-click { cursor: pointer; }
.trow-click:hover { background: var(--row-hover); }
.task-edit { background: var(--row-hover); border-bottom: 1px solid var(--line); padding: 12px 18px; display: flex; gap: 14px; align-items: flex-start; }
.task-edit-form { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.te-row { display: flex; gap: 10px; flex-wrap: wrap; }
.te-title { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 13px; font-weight: 600; }
.te-row label { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.te-row select, .te-row input[type=date] { border: 1px solid var(--line); border-radius: 7px; padding: 5px 7px; font-size: 12.5px; background: var(--card); }
.te-row textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; resize: vertical; }
.te-actions { display: flex; gap: 8px; }
.btn-ghost { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; font-size: 12.5px; cursor: pointer; color: var(--ink-soft); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-danger { background: none; border: 1px solid #eecfcf; color: var(--red); border-radius: 8px; padding: 8px 14px; font-size: 12.5px; cursor: pointer; }
.btn-danger:hover { background: var(--red-bg); }

/* ---- Gantt / Timeline (frozen-left grid + scrollable chart) ---- */
.g2-scroll { overflow-x: auto; }
.g2 { display: inline-block; min-width: 100%; }
.g2-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--line-soft); min-height: 34px; }
.g2c { position: sticky; z-index: 2; flex-shrink: 0; display: flex; align-items: center; gap: 7px; padding: 4px 10px; background: var(--card); border-right: 1px solid var(--line); font-size: 12.5px; }
.g2c-title { left: 0; width: 240px; }
.g2c-dur { left: 240px; width: 56px; justify-content: center; color: var(--ink-soft); font-size: 11.5px; gap: 1px; }
.g2c-start { left: 296px; width: 112px; color: var(--muted); font-size: 11px; }
.g2c-end { left: 408px; width: 112px; color: var(--muted); font-size: 11px; }
.g2c-sub { padding-left: 30px; }
.g2-track { position: relative; flex-shrink: 0; }
.g2-head { border-bottom: 1px solid var(--line); }
.g2-head .g2c { z-index: 4; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
.g2-prow { background: var(--card); }
.g2-prow:hover { background: var(--row-hover); }
.g2-prow:hover .g2c { background: var(--row-hover); }
.g2-prow .caret { cursor: pointer; color: var(--muted); }
.g2-pname { font-weight: 650; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g2-trow { background: var(--row-hover); }
.g2-trow .g2c { background: var(--row-hover); transition: background .4s; }
.g2-trow.tl-saved .g2c { background: var(--green-bg); }

/* ---- Timeline inline editing ---- */
.tl-drag { cursor: grab; color: #cfc9bd; font-size: 12px; flex-shrink: 0; margin-left: -20px; }
.tl-drag:hover { color: var(--ink); }
.tl-edit { border: 1px solid transparent; border-radius: 6px; background: none; font-family: inherit; font-size: 12px; color: var(--ink); padding: 3px 5px; min-width: 0; }
.g2-trow:hover .tl-edit, .tl-edit:focus { border-color: var(--line); background: var(--card); outline: none; }
.tl-title { flex: 1; font-weight: 550; }
.tl-dur { width: 40px; text-align: center; padding: 3px 2px; -moz-appearance: textfield; appearance: textfield; }
.tl-dur::-webkit-outer-spin-button, .tl-dur::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tl-d { font-size: 11px; color: var(--muted); }
.tl-date { width: 100%; font-size: 10.5px; color: var(--ink-soft); padding: 3px 4px; }
.tl-date::-webkit-calendar-picker-indicator { padding: 0; margin: 0; }
.g2-tt { font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g2-tick { position: absolute; top: 5px; font-size: 10px; color: var(--muted); padding-left: 5px; }
.g2-tick strong { color: var(--ink-soft); }
.g2-today-line { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); opacity: .6; z-index: 1; }
.g2-bar { position: absolute; top: 8px; height: 16px; border-radius: 5px; z-index: 1; opacity: .55; }
.gb-red { background: var(--red); }
.gb-amber { background: var(--amber); }
.gb-green { background: var(--green); }
.g2-bar.clip-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.g2-bar.clip-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.g2-bar-label { position: absolute; top: 8px; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; z-index: 1; }
.g2-diamond { position: absolute; top: 10px; width: 11px; height: 11px; background: var(--ink); transform: rotate(45deg) translateX(-50%); border-radius: 2px; z-index: 1; }
.g2-diamond.gd-done { background: var(--green); }
.g2-taskbar { position: absolute; top: 10px; height: 13px; border-radius: 4px; z-index: 1; }
.gt-open { background: var(--blue); }
.gt-done { background: var(--green); opacity: .5; }
.gt-overdue { background: var(--red); }
.g2-task-after { position: absolute; top: 7px; display: flex; align-items: center; gap: 5px; white-space: nowrap; z-index: 1; }
.g2-tt-label { font-size: 11px; color: var(--ink-soft); }
.g2-loading { padding: 7px 10px 7px 30px; background: var(--row-hover); border-bottom: 1px solid var(--line-soft); font-size: 11.5px; color: var(--muted); }
.gantt-unscheduled { padding: 12px 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ms-diamond { width: 9px; height: 9px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; display: inline-block; flex-shrink: 0; }
.ms-diamond.gd-done { background: var(--green); }

/* ---- Board ---- */
.board { display: flex; gap: 10px; align-items: stretch; overflow-x: auto; padding-bottom: 10px; }
.board-col-wrap { min-width: 216px; width: 216px; flex-shrink: 0; background: var(--well); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; }
.board-col-head { display: flex; align-items: center; gap: 7px; padding: 2px 4px 8px; }
/* the sortable list fills the whole column so a drop lands anywhere in it, not just on the card stack */
.board-col { flex: 1; min-height: 120px; display: flex; flex-direction: column; gap: 9px; align-content: flex-start; }
.board-full { min-height: 60vh; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 14px 15px; min-height: 124px; display: flex; flex-direction: column; cursor: grab; box-shadow: 0 1px 2px rgba(22, 19, 15, .05); }
.card:hover { border-color: var(--muted); box-shadow: 0 3px 10px rgba(22, 19, 15, .08); }
.card:active { cursor: grabbing; }
.card-ghost { opacity: .4; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.card-title { display: block; font-size: 13.5px; line-height: 1.45; margin-bottom: 9px; color: var(--ink); font-weight: 600; cursor: pointer; }
.card-title:hover, a.card-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.card-foot { margin-top: auto; }
.card-foot { display: flex; justify-content: space-between; align-items: center; }
.board-more { padding: 4px; text-align: center; }

/* ClickUp-style board interactions */
.board-add { padding: 2px 0 8px; }
.board-add-btn { width: 100%; border: none; background: none; text-align: left; padding: 7px 8px; border-radius: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.board-add-btn:hover { background: var(--slate-bg); color: var(--ink); }
.board-composer .bc-title { width: 100%; border: 1px solid var(--accent); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; background: var(--card); color: var(--ink); outline: none; }
.board-composer .bc-project { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 12px; background: var(--card); color: var(--ink-soft); }

/* background-save failures (atlasToast) */
.atlas-toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.atlas-toast { background: #b3261e; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.4; padding: 10px 16px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .22); max-width: 460px; transition: opacity .3s, transform .3s; }
.atlas-toast-ok { background: var(--green); }
.atlas-toast-out { opacity: 0; transform: translateY(6px); }

/* ============ PM workflow (Oct 2026): cockpit, waiting badges, estimates, re-plan, nav ============ */
/* ---- "My projects" cockpit on My Work ---- */
.cockpit .panel-head { flex-wrap: wrap; gap: 8px; }
.ck-table { min-width: 900px; }
.ck-table th.ck-num, .ck-table td.ck-num { text-align: right; font-variant-numeric: tabular-nums; width: 76px; }
.ck-proj { min-width: 220px; }
.ck-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink); }
.ck-name span { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.ck-name:hover span { text-decoration-color: var(--accent); color: var(--accent); }
.ck-proj > .muted-sm { display: block; margin-top: 2px; }
.ck-count { display: inline-block; min-width: 28px; text-align: center; font-weight: 750; padding: 2px 8px; border-radius: 8px; background: var(--slate-bg); color: var(--ink); }
.ck-count:hover { outline: 2px solid var(--line); }
.ck-count.ck-bad { background: var(--red-bg); color: var(--red); }
.ck-inline { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.ck-inline:hover { text-decoration-color: currentColor; }
.ck-next { white-space: nowrap; }
.ck-flags { white-space: nowrap; }
.ck-flags .pill + .pill, td .pill-blue { margin-left: 5px; }
.ck-flags a.pill:hover { filter: brightness(1.08); }
/* ---- days a task has sat in "Waiting on Client" ---- */
.wait-badge { display: inline-block; font-size: 10.5px; font-weight: 750; white-space: nowrap; padding: 1px 6px; border-radius: 6px; background: var(--slate-bg); color: var(--ink-soft); margin-left: 5px; vertical-align: middle; }
.wait-badge.wait-warn { background: var(--orange-bg); color: var(--orange); }
.wait-badge.wait-bad { background: var(--red-bg); color: var(--red); }
/* ---- estimates ---- */
.noest-chip { font-size: 10px; font-weight: 650; white-space: nowrap; flex-shrink: 0; padding: 1px 6px; border-radius: 6px; border: 1px dashed var(--line); color: var(--muted); cursor: pointer; }
.noest-chip:hover { border-color: var(--orange); color: var(--orange); }
.qa-est { width: 74px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; font-size: 12.5px; background: var(--card-soft); color: var(--ink-soft); }
.te-row label.est-missing .est-inputs input { border-color: var(--orange); }
.te-row label.est-missing > .muted-sm { color: var(--orange); text-transform: none; letter-spacing: 0; }
/* ---- project past its end date: close or extend ---- */
.pastend { background: var(--amber-bg); border: 1px solid var(--amber); border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pastend-main { flex: 1; min-width: 260px; font-size: 13px; color: var(--ink); }
.pastend-main strong { display: block; font-size: 13.5px; }
.pastend-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pastend-form { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.pastend-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; font-weight: 650; color: var(--ink-soft); }
.pastend-form input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font-size: 13px; background: var(--card); color: var(--ink); }
.pastend-reason { flex: 1; min-width: 240px; }
.pastend-tip, .pastend-form .form-error { flex-basis: 100%; margin: 0; }
/* ---- re-plan the ticked tasks ---- */
#tlDatesModal { z-index: 450; }
.tl-dates-modes { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 14px; }
.tl-dates-mode { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; cursor: pointer; }
.tl-dates-mode input[type=radio] { margin-top: 5px; accent-color: var(--accent); }
.tl-dates-mode input[type=number], .tl-dates-mode input[type=date], .tl-dates-reason input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 13px; background: var(--card-soft); color: var(--ink); }
.tl-dates-days { width: 70px; }
.tl-dates-reason { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 650; color: var(--ink-soft); }
/* ---- columns hidden because they are empty ---- */
.cols-note a { text-decoration: underline; }
.cols-hide-empty { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
/* ---- "Client SOW" button in the project header ---- */
.btn-sow { border-color: var(--violet); color: var(--violet); }
.btn-sow:hover { background: var(--violet-bg); color: var(--violet); }
/* ---- client block on the project Overview ---- */
.ov-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.ov-link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.ov-contact { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.ov-contact + .ov-contact { margin-top: 4px; }
/* ---- sidebar "More" group ---- */
.nav-more { display: flex; flex-direction: column; gap: 2px; }
.nav-more-btn { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: none; background: none; width: 100%; text-align: left; border-radius: 8px; color: var(--ink-soft); font: inherit; font-weight: 500; cursor: pointer; }
.nav-more-btn:hover { background: var(--ground); color: var(--ink); }
.nav-more-btn:focus-visible, .sidebar nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.nav-more-caret { margin-left: auto; font-size: 10px; color: var(--muted); transition: transform .15s ease; transform: rotate(-90deg); }
.nav-more-items { display: none; flex-direction: column; gap: 2px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav-more.open .nav-more-items, html.nav-more-open .nav-more-items { display: flex; }
.nav-more.open .nav-more-caret, html.nav-more-open .nav-more-caret { transform: none; }
/* collapsed rail: no room for a group, so every icon is shown and the "More" row steps aside */
html.nav-min .nav-more-btn { display: none; }
html.nav-min .nav-more-items { display: flex; margin: 0; padding: 0; border: none; }
@media (prefers-reduced-motion: reduce) { .nav-more-caret { transition: none; } }
@media (max-width: 900px) {
  /* the drawer menu on phones is full width — the rail rules above must not apply there */
  html.nav-min .nav-more-btn { display: flex; }
  html.nav-min .nav-more-items { display: none; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--line); }
  html.nav-min .nav-more.open .nav-more-items, html.nav-min.nav-more-open .nav-more-items { display: flex; }
  .nav-more-btn { padding: 12px 10px; }
  /* the closed menu drawer is parked just off the left edge, but its shadow still reached into the
     page as a grey smear down the side of every screen — no shadow until it is open */
  body:not(.nav-open) .sidebar { box-shadow: none; }
  /* project header: title block on its own line, actions wrap underneath (it used to squeeze the title to one word per line) */
  .proj-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .proj-head-side { flex-wrap: wrap; gap: 8px; }
  .pastend { padding: 12px; }
  .pastend-actions, .pastend-actions form, .pastend-actions button { width: 100%; }
  .qa-est { width: 100%; }
}
@media (max-width: 720px) {
  /* cockpit: one card per project instead of a 900px table that scrolls sideways */
  .cockpit .table-scroll { overflow: visible; }
  .ck-table { min-width: 0; display: block; }
  .ck-table thead { display: none; }
  .ck-table tbody { display: block; }
  .ck-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .ck-table tr:last-child { border-bottom: none; }
  .ck-table td { display: block; padding: 0; border: none; text-align: left !important; width: auto !important; min-width: 0; white-space: normal; }
  .ck-table td.ck-proj, .ck-table td.ck-flags { grid-column: 1 / -1; }
  .ck-table td[data-label]::before { content: attr(data-label); display: block; font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 3px; }
  .ck-flags .pill { display: inline-block; margin: 0 5px 4px 0; padding: 5px 11px; }
  .ck-count { min-width: 40px; padding: 6px 10px; }       /* comfortable to tap */
  .ck-name { font-size: 14.5px; }
}
.card-actions { display: flex; align-items: center; gap: 4px; }

/* estimate (task editor) */
.te-time { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.est-inputs { display: inline-flex; align-items: center; gap: 4px; }
.est-inputs input { width: 52px; }
.est-inputs span { color: var(--muted); font-size: 12px; }
.te-metric { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.te-metric strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.est-bar { display: inline-block; width: 90px; height: 6px; border-radius: 99px; background: var(--slate-bg); overflow: hidden; vertical-align: middle; }
.est-bar-wide { width: 150px; }
.est-fill { display: block; height: 100%; background: var(--green); }
.est-fill.est-near { background: var(--orange); }
.est-fill.est-over { background: var(--red); }

/* ---- Report-style tables (legacy; still used by shared .rep-* classes) ---- */
.rep-nav { margin-bottom: 14px; }
.rep-filters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.rep-filters .tf { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.rep-filters input, .rep-filters select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 12.5px; }
.rep-row { display: grid; grid-template-columns: 200px 1fr 84px 110px; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.rep-row:last-child { border-bottom: none; }
.rep-label { font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-person { display: flex; align-items: center; gap: 8px; }
.rep-bar-wrap { height: 10px; border-radius: 99px; background: var(--slate-bg); overflow: hidden; }
.rep-bar { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.rep-bar-low { background: var(--blue); }
.rep-bar-ok { background: var(--green); }
.rep-bar-over { background: var(--red); }
.rep-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.rep-sub { text-align: right; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rep-table th { text-align: left; padding: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
.rep-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.rep-plink { font-weight: 600; }
.tp-idle { margin-top: 12px; padding: 9px 12px; background: var(--orange-bg); border-radius: 8px; color: var(--ink-soft); }

/* ---- Operations cockpit (dashboard) ---- */
.vitals-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.vital { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 12px; padding: 12px 15px; display: flex; flex-direction: column; gap: 2px; }
.vital-num { font-size: 25px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.vital-label { font-size: 12px; font-weight: 650; color: var(--ink-soft); }
.vital-sub { font-size: 10.5px; color: var(--muted); }
.vital.v-good { border-left-color: var(--green); } .vital.v-good .vital-num { color: var(--green); }
.vital.v-warn { border-left-color: var(--orange); } .vital.v-warn .vital-num { color: var(--orange); }
.vital.v-bad { border-left-color: var(--red); } .vital.v-bad .vital-num { color: var(--red); }

.ops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 760px) { .ops-grid { grid-template-columns: 1fr; } }

.wip-row { display: grid; grid-template-columns: 130px 1fr 32px; align-items: center; gap: 12px; padding: 7px 2px; }
.wip-stage .pill { font-size: 11px; }
.wip-bar-wrap { height: 10px; border-radius: 99px; background: var(--slate-bg); overflow: hidden; }
.wip-bar { display: block; height: 100%; border-radius: 99px; }
.wip-count { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.age-row { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.age-row:first-child { border-top: none; }
.age-row:hover { background: var(--slate-bg); border-radius: 8px; }
.age-days { font-weight: 800; font-size: 13px; color: var(--orange); min-width: 32px; font-variant-numeric: tabular-nums; }
.age-days.age-hot { color: var(--red); }
.age-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.age-title { font-size: 13px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.age-people { display: flex; gap: 3px; flex-shrink: 0; }
.pill-xs { font-size: 9.5px; padding: 1px 6px; }

.slip-row { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.slip-row:first-child { border-top: none; }
.slip-row:hover { background: var(--slate-bg); border-radius: 8px; }
.slip-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.slip-dot.health-red { background: var(--red); } .slip-dot.health-amber { background: var(--orange); } .slip-dot.health-green { background: var(--green); }
.slip-main { flex: 1; min-width: 0; }
.slip-name { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slip-reasons { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; }
.slip-chip { font-size: 10px; background: var(--slate-bg); color: var(--ink-soft); border-radius: 99px; padding: 2px 7px; }

/* forward capacity heatmap */
.fc-table { width: 100%; border-collapse: separate; border-spacing: 0 5px; font-size: 12.5px; }
.fc-table th { text-align: center; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 0 6px 4px; }
.fc-table th span { display: block; font-size: 9.5px; font-weight: 400; }
.fc-person-h { text-align: left !important; }
.fc-person { display: flex; align-items: center; gap: 8px; white-space: nowrap; padding-right: 12px; }
.fc-name { overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.fc-cell { text-align: center; border-radius: 8px; padding: 7px 4px; min-width: 66px; line-height: 1.15; }
.fc-h { display: block; font-weight: 800; font-variant-numeric: tabular-nums; }
.fc-sub { display: block; font-size: 9.5px; opacity: .7; }
.fc-free { background: var(--slate-bg); color: var(--muted); }
.fc-ok { background: var(--green-bg); color: var(--green); }
.fc-full { background: var(--orange-bg); color: var(--orange); }
.fc-over { background: var(--red); color: #fff; }
.fc-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.fc-key { width: 11px; height: 11px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.fc-key.fc-ok { background: var(--green); } .fc-key.fc-full { background: var(--orange); } .fc-key.fc-over { background: var(--red); } .fc-key.fc-free { background: var(--slate); }

/* bottleneck people */
.bn-row { display: flex; align-items: center; gap: 11px; padding: 9px 4px; border-top: 1px solid var(--line); }
.bn-row:first-child { border-top: none; }
.bn-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bn-name { font-size: 13px; font-weight: 600; }
.bn-sub { display: flex; gap: 6px; flex-wrap: wrap; }
.bn-chip { font-size: 10.5px; border-radius: 99px; padding: 2px 8px; font-weight: 600; }
.bn-ar { background: var(--red-bg); color: var(--red); }
.bn-block { background: var(--orange-bg); color: var(--orange); }

/* deadline crunch */
.crunch-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .crunch-row { grid-template-columns: 1fr; } }
.crunch-cell { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.crunch-cell.fc-over { border-color: var(--red); }
.crunch-cell.fc-full { border-color: var(--orange); }
.crunch-label { font-size: 12.5px; font-weight: 700; }
.crunch-label span { display: block; font-size: 10px; font-weight: 400; }
.crunch-bar-wrap { height: 8px; border-radius: 99px; background: var(--slate-bg); overflow: hidden; margin: 8px 0 7px; }
.crunch-bar { height: 100%; border-radius: 99px; background: var(--green); }
.crunch-cell.fc-full .crunch-bar { background: var(--orange); }
.crunch-cell.fc-over .crunch-bar { background: var(--red); }
.crunch-meta { font-size: 11px; color: var(--muted); }
.crunch-meta strong { color: var(--ink); }

/* ---- Reports: Analytics ---- */
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.an-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.an-kpi-num { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.an-kpi-num em { font-size: 15px; font-weight: 600; font-style: normal; color: var(--muted); }
.an-kpi-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.an-kpi-quad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.an-kpi-quad > div { display: flex; flex-direction: column; }
.an-kpi-quad b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.an-kpi-quad span { font-size: 10.5px; color: var(--muted); }
.an-good { color: var(--green); } .an-bad { color: var(--red); }

.seg-bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--slate-bg); }
.seg { display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; min-width: 0; overflow: hidden; }
.seg-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.seg-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.seg-key i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.seg-key b { font-variant-numeric: tabular-nums; }

.abar-row { display: grid; grid-template-columns: 130px 1fr 34px; align-items: center; gap: 10px; padding: 5px 2px; font-size: 12.5px; }
.abar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.abar-track { height: 16px; background: var(--slate-bg); border-radius: 6px; overflow: hidden; }
.abar-fill { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.abar-fill.abar-blue { background: var(--blue); }
.abar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- Schedule changes (due-date shift log) ---- */
.dc-row { display: flex; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); }
.dc-row:first-of-type { border-top: none; }
.dc-arrow { flex-shrink: 0; min-width: 52px; text-align: center; align-self: flex-start; font-size: 12px; font-weight: 800; border-radius: 7px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.dc-late { background: var(--red-bg); color: var(--red); }
.dc-early { background: var(--green-bg); color: var(--green); }
.dc-cleared { background: var(--slate-bg); color: var(--muted); }
.dc-main { flex: 1; min-width: 0; }
.dc-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.dc-subject { font-size: 13.5px; font-weight: 600; }
.dc-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--violet-bg); color: var(--violet); border-radius: 99px; padding: 1px 7px; margin-right: 4px; }
.dc-dates { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-meta { margin-top: 2px; }
.dc-reason { margin-top: 7px; font-size: 13px; color: var(--ink); background: var(--slate-bg); border-radius: 8px; padding: 7px 11px; font-style: italic; }
.dc-noreason { margin-top: 7px; font-size: 12px; color: var(--orange); font-weight: 600; }
.dc-reason-form { margin-top: 7px; display: flex; gap: 8px; }
.dc-reason-input { flex: 1; min-width: 0; border: 1px solid var(--orange); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; background: var(--card); color: var(--ink); }
.te-reason .te-full { display: block; }
.te-reason input { width: 100%; margin-top: 4px; }

/* ---- Timeline Phase-2: baseline, critical path, dependency arrows, workload heat ---- */
.g2-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g2-legend { display: inline-flex; align-items: center; gap: 12px; margin-left: 10px; }
.g2-lg { display: inline-flex; align-items: center; gap: 5px; }
.g2-lg::before { content: ""; width: 14px; height: 8px; border-radius: 2px; display: inline-block; }
.g2-lg-crit::before { background: var(--red); }
.g2-lg-base::before { background: none; border: 1.5px solid var(--muted); height: 5px; }
.g2-lg-heat::before { background: linear-gradient(to right, var(--blue-bg), var(--blue)); }

.g2-baseline { position: absolute; top: 50%; height: 5px; transform: translateY(-50%); margin-top: 11px;
  border: 1.5px solid var(--muted); border-radius: 3px; background: transparent; opacity: .7; }
.g2-baseline-slip { border-color: var(--red); }
.g2-taskbar.gt-critical { box-shadow: 0 0 0 2px var(--red); }
.g2-crit-dot { color: var(--red); font-size: 9px; margin-right: 3px; }

.g2-deps { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 6; overflow: visible; }
.g2-dep { fill: none; stroke: var(--muted); stroke-width: 1.4; opacity: .65; }
.g2-dep-crit { stroke: var(--red); stroke-width: 1.8; opacity: .9; }
#tlAr path { fill: var(--muted); }
#tlArC path { fill: var(--red); }

.g2-heat-row { height: 26px; }
.g2-heat { position: absolute; top: 4px; height: 16px; border-radius: 3px; display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff; }
.g2-heat.lv0 { background: transparent; }
.g2-heat.lv1 { background: color-mix(in srgb, var(--blue) 28%, transparent); color: var(--ink-soft); }
.g2-heat.lv2 { background: color-mix(in srgb, var(--blue) 50%, transparent); }
.g2-heat.lv3 { background: color-mix(in srgb, var(--blue) 74%, transparent); }
.g2-heat.lv4 { background: var(--blue); }

.te-deps .dep-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dep-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--slate-bg); border-radius: 99px; padding: 3px 6px 3px 10px; font-size: 11.5px; font-weight: 600; }
.dep-x { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 11px; padding: 0 2px; }
.dep-x:hover { color: var(--red); }
.dep-add { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink-soft); font-size: 12px; }
@media (max-width: 640px) { .rep-row { grid-template-columns: 130px 1fr 70px; } .rep-sub { display: none; } }

.ts-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ts-range { font-weight: 600; font-size: 14px; }
.ts-total strong { font-size: 18px; margin: 0 4px; font-variant-numeric: tabular-nums; }
.ts-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ts-add select, .ts-add input[type=text], .ts-add input[type=date], .ts-add input[type=number] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 12.5px; }
.ts-add input[type=text] { flex: 1; min-width: 160px; }
.ts-dur { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.ts-h, .ts-m { width: 52px; }
.ts-day { padding: 12px 16px; }
.ts-weekend { opacity: .7; }
.ts-day-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.ts-day-total { font-variant-numeric: tabular-nums; }
.ts-entry { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.ts-entry-main { flex: 1; min-width: 0; font-size: 13px; }
.ts-entry-min { font-weight: 600; font-variant-numeric: tabular-nums; }
.ts-entry-src { text-transform: capitalize; }
.ts-empty { padding: 4px 0; }
.ts-viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ts-viewtoggle .vt { padding: 6px 14px; font-size: 12.5px; color: var(--ink-soft); text-decoration: none; }
.ts-viewtoggle .vt-active { background: var(--ink); color: var(--ground); }

/* weekly grid */
.ts-grid-wrap { overflow-x: auto; }
.ts-grid { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 620px; }
.ts-grid th, .ts-grid td { border: 1px solid var(--line); padding: 0; text-align: center; }
.ts-grid thead th { padding: 7px 6px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; background: var(--well); }
.ts-grid thead th span { display: block; font-size: 13px; color: var(--ink); font-weight: 700; }
.tg-proj { text-align: left !important; padding: 8px 10px !important; font-weight: 550; white-space: nowrap; }
.tg-weekend { opacity: .6; }
.tg-cell { width: 100%; border: none; background: none; text-align: center; padding: 9px 4px; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; outline: none; }
.tg-cell:focus { background: var(--accent-bg, rgba(202,56,50,.08)); box-shadow: inset 0 0 0 2px var(--accent); }
.ts-grid tfoot td, .tg-total { font-weight: 700; font-variant-numeric: tabular-nums; background: var(--well); padding: 8px 6px; }
.tg-cell-future { opacity: .35; cursor: not-allowed; }
.tg-allrow td { font-weight: 600; color: var(--muted); font-size: 12px; }
.tg-allrow .tg-over { color: var(--orange, #d99a26); }
.tg-allrow .tg-impossible { color: var(--red, #d64545); }
.ts-grid-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.tg-addproj { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 12.5px; }
.ts-grid-foot .btn-inline { margin-left: auto; }
.card-prio { border: none; background: none; padding: 0; cursor: pointer; line-height: 1; }
.card-prio-idle .prio-flag { color: var(--line); font-size: 13px; }
.card:hover .card-prio-idle .prio-flag { color: var(--muted); }
.card-addppl { width: 18px; height: 18px; border-radius: 50%; border: 1px dashed var(--muted); background: none; color: var(--muted); font-size: 11px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; opacity: 0; transition: opacity .12s; }
.card:hover .card-addppl { opacity: 1; }
.card-date { border: none; background: none; padding: 0; font-size: 11.5px; color: var(--ink-soft); cursor: pointer; }
.card-date-empty { opacity: 0; font-size: 12px; }
.card:hover .card-date-empty { opacity: .7; }
.card-pop { position: absolute; z-index: 8000; width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.22); padding: 6px; }
.cp-head { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 9px 4px; }
.cp-row { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 9px; border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.cp-row:hover { background: var(--slate-bg); }
.cp-btn { border: none; background: none; text-align: left; }
.cp-row input[type=checkbox] { accent-color: var(--accent); }
.cp-date { width: calc(100% - 18px); margin: 4px 9px 6px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 12.5px; }

/* ---- Tasks module (workspace-wide board) ---- */
.tboard-controls { display: flex; flex-direction: column; gap: 12px; }
.tboard-controls .chip-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ttotal { margin-left: auto; }
.tfilters { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
.tf { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.tf select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font-size: 12.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--ink); background: var(--card); min-width: 130px; }
.tf-clear { align-self: center; font-size: 12px; color: var(--muted); }
.tf-clear:hover { color: var(--accent); }
.tboard-lane { margin-top: 8px; }
.tboard-lane-head { display: flex; align-items: center; gap: 8px; padding: 6px 2px; }
.tboard-lane-name { font-size: 13.5px; font-weight: 700; }
.tboard-scroll { overflow-x: auto; }
.tcard-proj { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; min-width: 0; }
.tcard-proj-name { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard-tag { flex-shrink: 0; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; background: var(--slate-bg); color: var(--ink-soft); border-radius: 99px; padding: 1px 7px; }

/* ---- In-page search ---- */
.psearch-input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; font-size: 12.5px; background: var(--card); color: var(--ink); min-width: 170px; }
.psearch-input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.tboard-search { margin-left: auto; }
.tboard-mine { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; flex-shrink: 0; }
.tboard-mine:hover { border-color: var(--line); }
.tboard-mine-on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
/* while searching, the project table ignores group-collapse so matches always show */
.ptable.searching .group-row { display: none; }
.ptable.searching .prow { display: table-row !important; }
.ptable.searching .expand-row { display: none !important; }
.ptable.searching .prow.prow-hide { display: none !important; }
.group-row:hover td { background: var(--well-hover); }

/* ---- Archive browser ---- */
.arch-controls .panel-head { align-items: center; }
.arch-search .search-input { min-width: 240px; }
.arch-period-head { font-size: 12.5px; font-weight: 700; padding: 9px 18px 7px; color: var(--ink); background: var(--well); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; display: flex; align-items: center; gap: 8px; }
.arch-group { margin-bottom: 14px; }
.arch-row td { padding: 9px 14px; }
.arch-row:hover { background: var(--row-hover); }

/* ---- Knowledge Base ---- */
.kb-wrap { display: flex; height: calc(100vh - 96px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kb-side { width: 264px; flex-shrink: 0; border-right: 1px solid var(--line); background: var(--card-soft); overflow-y: auto; padding-bottom: 12px; }
.kb-side-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); position: sticky; top: 0; background: var(--card-soft); z-index: 1; }
.kb-new { border: 1px solid var(--line); background: var(--card); border-radius: 6px; width: 22px; height: 22px; font-size: 13px; cursor: pointer; color: var(--muted); }
.kb-new:hover { color: var(--accent); border-color: var(--accent); }
.kb-tree-list { list-style: none; margin: 0; padding: 0; }
.kb-tree > .kb-tree-list { min-height: 20px; }
.kb-tree-list .kb-tree-list { margin-left: 14px; border-left: 1px solid var(--line-soft); min-height: 4px; }
/* empty child list = a droppable zone under a leaf page, so you can nest into any page */
.kb-node > .kb-tree-list:empty { min-height: 12px; margin-left: 22px; }
.kb-collapsed > .kb-tree-list { display: none; }
.kb-node-row { display: flex; align-items: center; gap: 2px; padding: 3px 8px 3px 4px; border-radius: 7px; margin: 1px 6px; }
.kb-node-row:hover { background: var(--row-hover); }
.kb-node-active { background: var(--nav-active) !important; }
.kb-node-active .kb-node-title { color: var(--accent); font-weight: 650; }
.kb-caret { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 10px; width: 16px; height: 16px; flex-shrink: 0; transition: transform .12s; }
.kb-node:not(.kb-collapsed) > .kb-node-row > .kb-caret { transform: rotate(90deg); }
.kb-caret-empty { width: 16px; flex-shrink: 0; }
.kb-node-link { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-soft); padding: 2px 0; }
.kb-node-link:hover { color: var(--ink); }
.kb-node-icon { flex-shrink: 0; font-size: 13px; }
.kb-node-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-node-add { opacity: 0; }
.kb-node-row:hover .kb-node-add { opacity: 1; }
.kb-node-add button { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 3px; }
.kb-node-add button:hover { color: var(--accent); }
.kb-drag-ghost { opacity: .4; }

.kb-main { flex: 1; min-width: 0; overflow-y: auto; }
.kb-empty { max-width: 460px; margin: 12vh auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.kb-empty-emoji { font-size: 46px; }
.kb-empty h2 { font-size: 20px; font-weight: 750; }
.kb-cover { height: 200px; background-size: cover; background-position: center; position: relative; }
.kb-cover-actions { position: absolute; right: 14px; bottom: 12px; }
.kb-cover-btn { display: inline-block; background: rgba(0,0,0,.55); color: #fff; border: none; border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.kb-cover-btn:hover { background: rgba(0,0,0,.72); }
.kb-doc-inner { max-width: 860px; margin: 0 auto; padding: 24px 40px 80px; }
.kb-cover + .kb-doc-inner { padding-top: 18px; }
.kb-icon-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; position: relative; }
.kb-icon-btn { border: none; background: none; font-size: 40px; line-height: 1; cursor: pointer; padding: 0; }
.kb-icon-pick { position: absolute; top: 48px; left: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 4px; width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
.kb-icon-pick button { border: none; background: none; font-size: 20px; cursor: pointer; width: 30px; height: 30px; border-radius: 7px; }
.kb-icon-pick button:hover { background: var(--row-hover); }
.kb-add-cover { font-size: 12px; color: var(--muted); cursor: pointer; }
.kb-add-cover:hover { color: var(--accent); }
.kb-title-input { width: 100%; border: none; background: none; font-size: 34px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); padding: 4px 0; outline: none; font-family: inherit; }
.kb-crumbs { font-size: 11.5px; color: var(--muted); margin-bottom: 10px; }
.kb-crumbs a:hover { color: var(--accent); }
.kb-view-head { display: flex; align-items: center; gap: 12px; }
.kb-view-icon { font-size: 40px; line-height: 1; }
.kb-view-title { font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.kb-view-meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.kb-view-tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.kb-body { font-size: 15px; line-height: 1.65; }
.kb-body img { max-width: 100%; height: auto; border-radius: 8px; }
@media (max-width: 900px) { .kb-side { display: none; } .kb-doc-inner { padding: 20px; } }
.view-toggle { display: inline-flex; gap: 2px; background: var(--well); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.vt { padding: 5px 14px; font-size: 12px; font-weight: 600; color: var(--ink-soft); border-radius: 7px; }
.vt:hover { color: var(--ink); background: var(--row-hover); }
.vt-active { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.vt-active:hover { background: var(--card); color: var(--ink); }

.row-done { opacity: .5; }
.row-done .trow-title { text-decoration: line-through; }

/* ---- HQ hover-edit ---- */
.hq-box { position: relative; }
.box-edit { position: absolute; top: 12px; right: 14px; opacity: .5; transition: opacity .12s ease; background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 3px 9px; font-size: 13px; color: var(--ink-soft); cursor: pointer; text-decoration: none; }
.hq-box:hover .box-edit { opacity: 1; }
@media (hover: none) { .box-edit { opacity: 1; } }
.box-edit:hover { color: var(--accent); border-color: var(--accent); }
.hq-edit-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.hq-edit-row.hq-edit-note { align-items: flex-start; }
.he-note { flex: 1; min-height: 34px; resize: vertical; font-family: inherit; line-height: 1.5; border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: 12.5px; background: var(--card-soft); color: inherit; }
.hq-text-note { white-space: pre-wrap; }
.hq-edit-row input[type=text], .hq-edit-row input[type=date], .hq-edit-row select { border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; font-size: 12.5px; background: var(--card-soft); }
.he-grow { flex: 1; }
.he-mid { width: 180px; }
.he-kind { width: 78px; }
.he-del { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.he-del:hover { color: var(--red); }
.hq-box .te-actions { margin-top: 12px; }
.scope-rich { font-size: 13px; color: var(--ink-soft); line-height: 1.55; overflow-x: auto; }
.scope-rich table { border-collapse: collapse; margin: 8px 0; }
.scope-rich td, .scope-rich th { border: 1px solid var(--line); padding: 5px 9px; }
.scope-rich p { margin-bottom: 7px; }
.scope-rich ul, .scope-rich ol { padding-left: 20px; margin-bottom: 7px; }
.tox-tinymce { border-radius: 8px !important; border-color: var(--line) !important; }

/* ---- HQ blocks ---- */
.hq-line { display: flex; align-items: center; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line-soft); }
.hq-line:last-child { border-bottom: none; }
.hq-text { flex: 1; font-size: 12.5px; }
.hq-done { color: var(--muted); }
.req-got { color: var(--green); font-weight: 800; }
.req-wait { color: var(--muted); }
.req-no { color: var(--red); font-weight: 800; }
.pm-amt { min-width: 44px; font-size: 11.5px; }

/* ---- Search + bell ---- */
.topbar-side { display: flex; align-items: center; gap: 12px; }
.search-input { border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; font-size: 12.5px; width: 250px; background: var(--card); }
.search-input:focus { outline: 2px solid #e9c2c0; border-color: var(--accent); }
.bell { position: relative; font-size: 16px; text-decoration: none; }
.bell-count { position: absolute; top: -6px; right: -8px; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 700; border-radius: 99px; padding: 1px 5px; }
.notif-row { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--line-soft); }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--row-hover); }
.notif-ico { width: 22px; text-align: center; }
.notif-text { flex: 1; font-size: 12.5px; min-width: 0; }

/* ---- Comments ---- */
.task-comments { flex-basis: 100%; border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 10px; }
.task-edit { flex-wrap: wrap; }
.comment { display: flex; gap: 9px; padding: 5px 0; }
.comment-body { flex: 1; }
.comment-meta { font-size: 11.5px; }
.comment-text { font-size: 12.5px; color: var(--ink-soft); white-space: pre-line; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px; font-size: 12.5px; background: var(--card); }

/* ---- Project form ---- */
.form-panel { max-width: 760px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.f-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.f-grid input, .f-grid select, .f-grid textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 13px; background: var(--card-soft); font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--ink); }
.f-grid input:focus, .f-grid select:focus, .f-grid textarea:focus { outline: 2px solid #e9c2c0; border-color: var(--accent); }
.f-wide { grid-column: 1 / -1; }
.f-link { font-size: 11px; color: var(--accent); cursor: pointer; text-transform: none; letter-spacing: 0; }
.form-actions { margin-top: 16px; }
.btn-edit { padding: 6px 14px; text-decoration: none; }
.chip-new { border-style: dashed; color: var(--accent); }

/* ---- Flash + Trash ---- */
.flash { background: var(--green-bg); border: 1px solid #cfe6d8; color: #2c6b45; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; }
.flash-x { background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; }
.chip-trash { border-style: dashed; color: var(--muted); }
.chip-trash:hover { border-color: var(--red); color: var(--red); }
.trash-row { display: flex; align-items: center; gap: 14px; padding: 11px 2px; border-bottom: 1px solid var(--line-soft); }
.trash-row:last-child { border-bottom: none; }
.trash-main { flex: 1; min-width: 0; }
.trash-main strong { display: block; font-size: 13.5px; }
.trash-meta { display: flex; align-items: center; gap: 10px; }
.trash-actions { display: flex; gap: 8px; }

/* ---- Login ---- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--ground); }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 34px 34px 30px; width: 350px; }
.login-brand { padding: 0 0 4px; font-size: 20px; }
.login-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 22px; }
.login-card label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-soft); margin: 12px 0 4px; }
.login-card input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font-size: 13.5px; background: var(--card-soft); }
.login-card input:focus { outline: 2px solid #e9c2c0; border-color: var(--accent); }
.btn-primary { width: 100%; margin-top: 18px; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 10px; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.btn-primary:hover { background: #b32e29; }
.form-error { color: var(--red); font-size: 12px; margin-top: 8px; }


/* ---- Delivered History ---- */
.dh-controls { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.dh-period { display: flex; align-items: center; gap: 8px; }
.dh-nav { padding: 5px 11px; font-weight: 700; }
.dh-label { font-size: 14px; font-weight: 700; color: var(--ink); min-width: 150px; text-align: center; }
.dh-filters { display: flex; gap: 8px; margin-left: auto; }
.dh-filters select { border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }
.dh-row { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-top: 1px solid var(--line-soft); }
.dh-row:first-of-type { border-top: 0; }
.dh-check { color: var(--green); font-weight: 800; flex-shrink: 0; }
.dh-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.dh-title { font-size: 13px; font-weight: 550; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-people { display: flex; gap: 4px; flex-shrink: 0; }
.dh-when { flex-shrink: 0; min-width: 122px; text-align: right; }
.dh-silent { color: var(--muted); }
.dh-dark { color: var(--red); font-size: 12px; font-weight: 600; flex-shrink: 0; min-width: 122px; text-align: right; }

/* ---- Claude MCP settings ---- */
.mcp-plain { border: 1px solid var(--green); background: var(--green-bg); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: 13px; }
.mcp-plain code { display: block; margin-top: 6px; padding: 8px 10px; background: var(--card); border: 1px dashed var(--line); border-radius: 8px; font-size: 12.5px; word-break: break-all; cursor: copy; }
.mcp-actions { display: flex; gap: 6px; justify-content: flex-end; }
.mcp-actions .chip { cursor: pointer; }
.mcp-steps { margin: 0 0 10px 18px; font-size: 13px; color: var(--ink-soft); display: grid; gap: 8px; }
.mcp-pre { background: var(--well); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; font-size: 12px; overflow-x: auto; margin: 6px 0; }

/* ---- People: super-admin inline email edit ---- */
.pt-email-edit { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 11px; padding: 0 2px; }
.pt-email-edit:hover { color: var(--accent); }
.pt-email-form { display: flex; gap: 6px; margin-top: 4px; align-items: center; }
.pt-email-form input { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 7px; padding: 5px 9px; font-size: 12.5px; min-width: 220px; }

/* ---- Task edit: assignee chip picker (replaces the ctrl-click multi-select) ---- */
.te-field { display: flex; flex-direction: column; gap: 3px; }
.te-lab { font-size: 10.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.asg-pick { position: relative; }
.asg-trigger { display: inline-flex; align-items: center; gap: 8px; max-width: 260px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; font-size: 12.5px; background: var(--card); color: var(--ink); cursor: pointer; }
.asg-trigger span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asg-trigger:hover { border-color: var(--accent); }
.asg-caret { color: var(--muted); font-size: 10px; }
.asg-pop { position: absolute; top: calc(100% + 4px); left: 0; z-index: 8000; width: 240px; max-height: 260px; overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.22); padding: 6px; }
.asg-opt { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.asg-opt:hover { background: var(--slate-bg); }
.asg-opt input[type=checkbox] { accent-color: var(--accent); }


/* ---- v0.55: task drawer, tags, checklist, richer cards ---- */
.task-drawer-wrap { position: fixed; inset: 0; z-index: 220; }
.task-drawer-back { position: absolute; inset: 0; background: rgba(17,14,13,.38); }
.task-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 640px; max-width: 94vw; background: var(--card); border-left: 1px solid var(--line); box-shadow: -14px 0 44px rgba(17,14,13,.18); display: flex; flex-direction: column; animation: drawerIn .16s ease-out; }
@keyframes drawerIn { from { transform: translateX(28px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.drawer-head .flash-x { margin-left: auto; }
.drawer-proj { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.drawer-proj:hover { color: var(--accent); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px 26px; }
.task-edit-drawer .task-edit-form { border: none; padding: 0; }
body.drawer-open { overflow: hidden; }

/* tags */
.te-tags { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.tag-chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tag-chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 1px 8px; font-size: 10.5px; font-weight: 700; color: #fff; line-height: 1.7; }
.tag-red { background: var(--red); } .tag-orange { background: var(--orange); } .tag-yellow { background: var(--yellow); color: #3b3000; } .tag-green { background: var(--green); } .tag-blue { background: var(--blue); } .tag-violet { background: var(--violet); } .tag-pink { background: var(--pink); } .tag-slate { background: var(--slate); }
.tag-x { border: none; background: none; color: inherit; font-size: 10px; cursor: pointer; padding: 0 1px; opacity: .75; }
.tag-x:hover { opacity: 1; }
.tag-add-wrap { position: relative; }
.tag-add-btn { border: 1px dashed var(--line); background: none; border-radius: 6px; padding: 1px 9px; font-size: 10.5px; font-weight: 650; color: var(--muted); cursor: pointer; }
.tag-add-btn:hover { border-color: var(--muted); color: var(--ink); }
.tag-pick { position: absolute; top: calc(100% + 5px); left: 0; z-index: 60; width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 26px rgba(17,14,13,.14); padding: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.tag-opt { border: none; cursor: pointer; }
.tag-opt:hover { filter: brightness(1.08); }
.tag-new { display: flex; flex-direction: column; gap: 6px; width: 100%; border-top: 1px dashed var(--line); padding-top: 7px; margin-top: 3px; }
.tag-new-name { border: 1px solid var(--line); border-radius: 7px; padding: 4px 8px; font-size: 12px; font-family: inherit; width: 100%; }
.tag-new-name:focus { outline: none; border-color: var(--muted); }
.tag-colors { display: flex; gap: 5px; }
.tag-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.tag-dot.sel { border-color: var(--ink); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 7px; }
.card-tags .tag-chip { font-size: 9.5px; padding: 0 7px; }

/* checklist */
.te-check { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.te-check .tf-head { display: flex; align-items: center; gap: 8px; }
.chk-count { font-weight: 750; color: var(--ink-soft); }
.chk-count-all { color: var(--green); }
.chk-bar { flex: 1; max-width: 140px; height: 5px; border-radius: 99px; background: var(--slate-bg); overflow: hidden; }
.chk-fill { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.chk-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12.5px; }
.chk-row input[type="checkbox"] { accent-color: var(--green); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0; }
.chk-title { flex: 1; min-width: 0; color: var(--ink); }
.chk-done .chk-title { color: var(--muted); text-decoration: line-through; }
.chk-x { border: none; background: none; color: var(--muted); font-size: 11px; cursor: pointer; opacity: 0; padding: 2px 5px; border-radius: 5px; }
.chk-row:hover .chk-x { opacity: 1; }
.chk-x:hover { color: var(--red); background: var(--red-bg); }
.chk-add { width: 100%; border: 1px dashed var(--line); border-radius: 8px; padding: 5px 9px; font-size: 12px; font-family: inherit; margin-top: 4px; background: none; color: var(--ink); }
.chk-add:focus { outline: none; border-color: var(--muted); border-style: solid; }
.card-chk { font-size: 10.5px; font-weight: 750; color: var(--ink-soft); background: var(--slate-bg); border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.card-chk-all { color: var(--green); background: var(--green-bg); }
.card-meta { white-space: nowrap; }

/* table: latest comment + clickable title */
.tt-open { cursor: pointer; }
.tt-open:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tt-comment { max-width: 240px; }
.tt-cbody { display: block; font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; cursor: pointer; }
.tt-cbody:hover { color: var(--accent); }
.tt-cmeta { display: block; font-size: 10.5px; }


/* ---- v0.56: Project Workbench table + Project notes ---- */
.wb-scroll { overflow-x: auto; }
.wb-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.wb-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.wb-table td { padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.wb-table tr:last-child td { border-bottom: none; }
.wb-particulars { font-weight: 600; color: var(--ink); }
.wb-type { display: inline-block; font-size: 10.5px; font-weight: 650; background: var(--slate-bg); color: var(--ink-soft); border-radius: 6px; padding: 1px 8px; white-space: nowrap; }
.wb-link { color: var(--blue); font-weight: 600; white-space: nowrap; }
.wb-link:hover { text-decoration: underline; }
.wb-edit td { padding: 4px 5px; }
.wb-edit input { width: 100%; min-width: 120px; border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-family: inherit; font-size: 12px; }
.wb-edit input:focus { outline: none; border-color: var(--muted); }
.wb-edit input.wb-in-sm { min-width: 88px; }
.wb-edit input[type="date"] { min-width: 130px; }
.wb-edit .he-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.wb-edit .he-del:hover { color: var(--red); background: var(--red-bg); }

/* project notes */
.note-form { display: flex; gap: 8px; margin-bottom: 12px; }
.note-input { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font-family: inherit; font-size: 13px; }
.note-input:focus { outline: none; border-color: var(--muted); }
.note-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 2px; border-bottom: 1px solid var(--line-soft); }
.note-row:last-child { border-bottom: none; }
.note-body { flex: 1; min-width: 0; }
.note-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.note-text { font-size: 13px; line-height: 1.5; color: var(--ink); margin-top: 2px; word-wrap: break-word; white-space: pre-wrap; }
.note-badge { font-size: 10px; font-weight: 750; background: var(--green-bg); color: var(--green); border-radius: 99px; padding: 1px 8px; }
.note-resolved .note-text { color: var(--muted); text-decoration: line-through; }
.note-resolved .avatar { opacity: .6; }
.note-acts { display: flex; gap: 4px; flex-shrink: 0; }
.note-acts form { display: contents; }
.note-tog { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--card); border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 13px; }
.note-tog:hover { border-color: var(--green); color: var(--green); }
.note-tog-on { background: var(--green); border-color: var(--green); color: #fff; }
.note-del { width: 26px; height: 26px; border: 1px solid var(--line); background: var(--card); border-radius: 7px; color: var(--muted); cursor: pointer; font-size: 12px; }
.note-del:hover { border-color: var(--red); color: var(--red); }


/* ---- v0.57: picker type-ahead ---- */
.asg-search, .cp-search { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; font-family: inherit; font-size: 12px; margin-bottom: 6px; }
.asg-search:focus, .cp-search:focus { outline: none; border-color: var(--muted); }


/* ---- v0.58: Communication Log ---- */
.comm-wrap { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .comm-wrap { grid-template-columns: 1fr; } }
.comm-feed-panel { display: flex; flex-direction: column; max-height: 74vh; }
.comm-thread { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 6px 2px 10px; min-height: 200px; }
.comm-msg { display: flex; gap: 10px; }
.comm-msg-main { min-width: 0; flex: 1; }
.comm-msg-head { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.comm-acts { margin-left: auto; display: none; }
.comm-msg:hover .comm-acts { display: inline-flex; }
.comm-act { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 1px 7px; font-size: 11px; color: var(--ink-soft); cursor: pointer; }
.comm-act-del:hover { border-color: var(--red); color: var(--red); }
.comm-edited { font-style: italic; }
.comm-msg-body { font-size: 13px; line-height: 1.5; color: var(--ink); word-wrap: break-word; margin-top: 2px; }
.comm-msg-body a { color: var(--blue); text-decoration: underline; }
.comm-img { display: block; max-width: 320px; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); margin: 4px 0; cursor: zoom-in; }
.comm-pending { padding: 6px 0 0; }
.comm-compose { display: flex; gap: 8px; align-items: flex-end; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.comm-compose textarea { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 13px; resize: none; min-height: 40px; }
.comm-compose textarea:focus { outline: none; border-color: var(--muted); }

.comm-actions-panel { position: sticky; top: 12px; }
.comm-act-add { margin-bottom: 12px; }
.ca-title { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-family: inherit; font-size: 13px; }
.ca-title:focus { outline: none; border-color: var(--muted); }
.ca-add-row { display: flex; gap: 8px; margin-top: 7px; }
.ca-date { flex: 1; border: 1px solid var(--line); border-radius: 9px; padding: 6px 9px; font-family: inherit; font-size: 12.5px; }
.ca-row { display: flex; align-items: flex-start; gap: 9px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.ca-row:last-child { border-bottom: none; }
.ca-row input[type="checkbox"] { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; flex-shrink: 0; }
.ca-body { flex: 1; min-width: 0; }
.ca-text { font-size: 13px; color: var(--ink); line-height: 1.4; }
.ca-done .ca-text { color: var(--muted); text-decoration: line-through; }
.ca-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; font-size: 11.5px; }
.ca-due { font-weight: 650; color: var(--ink-soft); }
.ca-overdue { color: var(--red); }
.ca-date-edit { border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; font-size: 11px; font-family: inherit; color: var(--muted); }
.ca-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 6px; flex-shrink: 0; }
.ca-del:hover { color: var(--red); background: var(--red-bg); }
.fu-ico { font-size: 14px; }


/* =====================================================================
   v0.59 — UI MODERNIZATION PASS (forms, task drawer, panels, buttons)
   Appended last so it refines the shared components app-wide.
   ===================================================================== */

/* 1) Labels: drop the dated UPPERCASE + letter-spacing → calm sentence-case */
.te-row label, .te-lab, .te-field .te-lab,
.f-grid label, .people-add label, .pf-label {
  text-transform: none;
  letter-spacing: normal;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
}

/* 2) Inputs / selects / textareas: roomier, softer, consistent */
.te-row select, .te-row input[type=date], .te-row input[type=text],
.te-row input[type=number], .te-row input[type=url], .te-title, .te-row textarea,
.asg-trigger,
.f-grid input, .f-grid select, .f-grid textarea {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  background: var(--card-soft);
  color: var(--ink);
  transition: border-color .13s ease, box-shadow .13s ease, background .13s ease;
}
.te-row select, .asg-trigger { padding: 8px 12px; }
.te-row input[type=date] { padding: 7px 12px; }

/* Notion-style title field: quiet until focused */
.te-title {
  font-size: 15.5px;
  font-weight: 650;
  padding: 11px 13px;
  background: transparent;
  border-color: transparent;
  border-radius: 11px;
}
.te-title:hover { background: var(--card-soft); }

/* Modern focus ring — one language everywhere (replaces the hard 2px outline) */
.te-row select:focus, .te-row input:focus, .te-title:focus, .te-row textarea:focus,
.asg-trigger:focus,
.f-grid input:focus, .f-grid select:focus, .f-grid textarea:focus,
.ca-title:focus, .ca-date:focus, .note-input:focus, .comm-compose textarea:focus,
.wb-edit input:focus, .search-input:focus, .psearch-input:focus, .login-card input:focus,
.qa-title:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft) !important;
  background: var(--card) !important;
}

/* 3) Breathing room in the editor + drawer */
.te-row { gap: 16px 18px; align-items: flex-end; }
.task-edit-form { gap: 15px; }
.task-edit { padding: 16px 20px; gap: 18px; }
.drawer-body { padding: 22px 24px 30px; }
.drawer-head { padding: 16px 22px; }
.te-actions { margin-top: 4px; gap: 8px; }

/* 4) Buttons: softer, more tactile */
.btn-inline { border-radius: 10px !important; padding: 9px 18px !important; font-weight: 600; }
.btn-ghost { border-radius: 10px; padding: 9px 16px; transition: border-color .13s ease, background .13s ease; }
.btn-danger { border-radius: 10px; padding: 9px 16px; transition: background .13s ease; }
.btn-primary.btn-inline { box-shadow: 0 1px 2px rgba(202,56,50,.25); }
.btn-primary.btn-inline:hover { filter: brightness(1.04); }

/* 5) Panels + drawer: a touch more polish */
.panel { border-radius: 13px; }
.panel-head h2 { font-size: 14px; letter-spacing: -.1px; }
.task-drawer { border-radius: 0; box-shadow: -18px 0 60px rgba(17,14,13,.22); }
.task-drawer-back { backdrop-filter: blur(2px); }

/* section dividers inside the editor read softer */
.te-tags, .te-check, .task-files, .task-comments { border-top-color: var(--line-soft); }


/* =====================================================================
   v0.60 — ClickUp-style list view + multi-select, drawer Delete zone,
           and the last uppercase labels retired.
   ===================================================================== */

/* --- List view (grouped table) --- */
.tasklist { display: flex; flex-direction: column; gap: 22px; }
.tl-group { }
.tl-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tl-group-count { font-size: 12px; font-weight: 700; color: var(--muted); }
.tl-addbtn { border: none; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 3px 8px; border-radius: 7px; }
.tl-addbtn:hover { color: var(--accent); background: var(--accent-soft); }
.tl-table { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; }
.tl-hrow, .tl-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 128px 92px 96px 132px; align-items: center; gap: 8px; padding: 0 12px; }
.tl-hrow { height: 34px; border-bottom: 1px solid var(--line); }
.tl-hrow span { font-size: 11px; font-weight: 650; color: var(--muted); }
.tl-row { min-height: 44px; border-bottom: 1px solid var(--line-soft); transition: background .1s ease; }
.tl-row:last-child { border-bottom: none; }
.tl-row:hover { background: var(--row-hover); }
.tl-row-sel { background: var(--accent-soft) !important; }
.tl-c-check { display: flex; align-items: center; }
.tl-c-check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.tl-c-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tl-name { border: none; background: none; text-align: left; font-family: inherit; font-size: 13.5px; font-weight: 550; color: var(--ink); cursor: pointer; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tl-name:hover { color: var(--accent); }
.tl-meta { flex-shrink: 0; }
.tl-chk { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); background: var(--slate-bg); border-radius: 6px; padding: 1px 6px; flex-shrink: 0; }
.tl-c-name .tag-chip { flex-shrink: 0; }
.tl-c-asg { display: flex; align-items: center; gap: 2px; }
.tl-c-due { font-size: 12.5px; color: var(--ink-soft); }
.tl-c-prio, .tl-c-status { display: flex; }
.tl-composer { padding: 8px 12px 10px; border-top: 1px solid var(--line-soft); }
.tl-composer-input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; font-family: inherit; font-size: 13px; }
.tl-composer-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
@media (max-width: 720px) {
  .tl-hrow, .tl-row { grid-template-columns: 30px minmax(0,1fr) 70px; }
  .tl-c-asg, .tl-c-prio { display: none; }
}

/* floating bulk-action bar */
.tl-bulkbar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400;
  display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff;
  border-radius: 12px; padding: 9px 12px 9px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.28); }
.tl-bulk-count { font-size: 12.5px; }
.tl-bulk-count strong { font-size: 13.5px; }
.tl-bulk-btn { border: none; background: rgba(255,255,255,.14); color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.tl-bulk-btn:hover { background: rgba(255,255,255,.24); }
.tl-bulk-del { background: var(--accent); }
.tl-bulk-del:hover { filter: brightness(1.08); background: var(--accent); }

/* --- Drawer: Delete moved to a subtle bottom danger zone --- */
.te-danger { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; }
.te-danger-btn { border: 1px solid transparent; background: none; color: var(--muted); font-size: 12px; font-weight: 550; cursor: pointer; padding: 6px 12px; border-radius: 9px; }
.te-danger-btn:hover { color: var(--red); background: var(--red-bg); border-color: var(--red-bg); }

/* --- Last dated labels retired (Tags / Checklist / Attachments / Comments headers) --- */
.tf-head { text-transform: none !important; letter-spacing: normal !important; font-size: 11px !important; font-weight: 650; color: var(--muted); }



/* =====================================================================
   v0.61 — Tasks module: Table + List views + per-user column customizer
   ===================================================================== */

/* view switcher row on the tasks control bar */
.tv-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tv-cols { margin-left: auto; }

/* shared task table (used by Table view + inside List groups) */
.ttable { width: 100%; border-collapse: collapse; font-size: 13px; }
.ttable thead th { text-align: left; font-size: 11px; font-weight: 650; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ttable tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ttable tbody tr:last-child td { border-bottom: none; }
.ttable tbody tr:hover { background: var(--row-hover); }
.ttable .row-done .tl-name { color: var(--muted); text-decoration: line-through; }
.ttable-flush { border: none; }
.ttable .tl-name { border: none; background: none; font-family: inherit; font-size: 13.5px; font-weight: 550; color: var(--ink); cursor: pointer; padding: 0; }
.ttable .tl-name:hover { color: var(--accent); }
.tcol-task { min-width: 240px; }
/* Task name cell: status dot beside the title, vertically centred even when the title wraps to 2 lines. */
.tl-task { display: flex; align-items: center; gap: 9px; min-width: 0; }
.tl-task .tl-name { min-width: 0; flex: 0 1 auto; }
.tl-task .tl-dot { width: 11px; height: 11px; margin: 0; }
/* Vibrant status dots — solid colour + a soft glow ring so they pop (grey = not started, colours light up as work moves). */
.tl-dot.dot-slate  { background: var(--slate);  box-shadow: 0 0 0 3px var(--slate-bg),  0 0 8px -2px var(--slate); }
.tl-dot.dot-violet { background: var(--violet); box-shadow: 0 0 0 3px var(--violet-bg), 0 0 8px -2px var(--violet); }
.tl-dot.dot-blue   { background: var(--blue);   box-shadow: 0 0 0 3px var(--blue-bg),   0 0 8px -2px var(--blue); }
.tl-dot.dot-yellow { background: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-bg), 0 0 8px -2px var(--yellow); }
.tl-dot.dot-orange { background: var(--orange); box-shadow: 0 0 0 3px var(--orange-bg), 0 0 8px -2px var(--orange); }
.tl-dot.dot-pink   { background: var(--pink);   box-shadow: 0 0 0 3px var(--pink-bg),   0 0 8px -2px var(--pink); }
.tl-dot.dot-red    { background: var(--red);    box-shadow: 0 0 0 3px var(--red-bg),    0 0 8px -2px var(--red); }
.tl-dot.dot-green  { background: var(--green);  box-shadow: 0 0 0 3px var(--green-bg),  0 0 8px -2px var(--green); }
.tcol-assignee, .tcol-action, .tcol-reviewer { white-space: nowrap; }
.tcol-assignee .avatar, .tcol-action .avatar, .tcol-reviewer .avatar { margin-right: -4px; }
.tcol-tags { max-width: 220px; }
.tcol-tags .tag-chip { margin: 1px 2px 1px 0; }
.tcol-due, .tcol-start, .tcol-logged { white-space: nowrap; }

/* list view uses the tl-group shells (shared with the project list) + a table inside */
.tasklist .tl-table { padding: 0; }
.tasklist .ttable { }

/* column customizer modal */
.cols-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(17,14,13,.4); display: none; align-items: center; justify-content: center; padding: 5vh 4vw; }
.cols-modal { width: 380px; max-width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 60px rgba(17,14,13,.28); padding: 16px 18px; }
.cols-hint { margin: 2px 0 12px; }
.cols-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 52vh; overflow-y: auto; }
.cols-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 9px; }
.cols-item:hover { background: var(--row-hover); }
.cols-ghost { opacity: .4; }
.cols-drag { cursor: grab; color: var(--muted); font-size: 15px; }
.cols-check { display: flex; align-items: center; gap: 9px; flex: 1; font-size: 13px; cursor: pointer; }
.cols-check input { width: 15px; height: 15px; accent-color: var(--accent); }
.cols-check input:disabled { opacity: .5; }
.cols-fixed { flex-shrink: 0; }
.cols-modal .modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---- Inline-editable table cells (shared task tables: /tasks + project Tasks tab) ---- */
.cellbtn { border: none; background: none; padding: 3px 6px; margin: -3px -6px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; text-align: left; }
.cellbtn:hover { background: var(--slate-bg); }
.cellbtn [data-cell] { display: inline-flex; align-items: center; gap: 4px; }

/* v0.61b — project table/list column wiring: select column + table row selection */
.tcol-check { width: 34px; }
.tcol-check input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.ttable tbody tr.tl-row-sel { background: var(--accent-soft) !important; }
.ttable .status-select { border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; font-size: 12px; font-family: inherit; background: var(--card); max-width: 130px; }
/* ---- Bottleneck drawer (dashboard) ---- */
.bn-chip { cursor: pointer; border: none; font: inherit; }
button.bn-chip:hover { filter: brightness(1.12); text-decoration: underline; }
.bn-overlay { position: fixed; inset: 0; background: rgba(10, 12, 16, .45); z-index: 8998; }
.bn-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; background: var(--card); border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(0,0,0,.25); z-index: 8999; transform: translateX(105%); transition: transform .22s ease; display: flex; flex-direction: column; }
.bn-drawer.bn-open { transform: translateX(0); }
.bn-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line-soft); }
.bn-drawer-head h2 { font-size: 16px; margin: 0 0 2px; }
.bn-x { border: none; background: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.bn-x:hover { background: var(--slate-bg); color: var(--ink); }
.bn-list { overflow-y: auto; padding: 8px 12px 20px; display: flex; flex-direction: column; gap: 4px; }
.bn-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 10px; border-radius: 10px; border-bottom: 1px solid var(--line-soft); }
.bn-item:hover { background: var(--row-hover); }
.bn-item-top { display: flex; align-items: center; gap: 8px; }
.bn-due { margin-left: auto; font-size: 12px; }
.bn-item-title { font-size: 13px; font-weight: 550; color: var(--ink); }

/* ---- Dashboard: By category ---- */
/* Bar colors = the dataviz-validated status trio (done/open/overdue) used across dashboard charts. */
.plr-row { display: grid; grid-template-columns: 220px 90px 1fr 280px; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.plr-row:last-of-type { border-bottom: none; }
.plr-name { font-size: 13px; font-weight: 650; color: var(--ink); }
.plr-name:hover { color: var(--accent); }
.plr-proj { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.plr-bar-wrap { min-height: 12px; }
.plr-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--slate-bg); }
.plr-bar > span { display: block; height: 100%; }
.plr-bar > span + span { border-left: 2px solid var(--card); }
.plr-done { background: #3f9d63; }
.plr-open { background: #4a7cc7; }
.plr-over { background: #d64545; }
.plr-nums { text-align: right; white-space: nowrap; }
.plr-legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.plr-legend .plr-lg { display: inline-flex; align-items: center; gap: 6px; }
.plr-legend .fc-key { margin: 0; }
.plr-k-done { background: #3f9d63; }
.plr-k-open { background: #4a7cc7; }
.plr-k-over { background: #d64545; }
@media (max-width: 1100px) { .plr-row { grid-template-columns: 150px 80px 1fr; } .plr-nums { grid-column: 1 / -1; text-align: left; } }

/* v0.62 — comm message inline edit box */
.comm-edit-box { width: 100%; max-width: 480px; border: 1px solid var(--accent); border-radius: 9px; padding: 7px 10px; font-family: inherit; font-size: 13px; resize: vertical; margin-top: 2px; }
.comm-edit-box:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
/* ---- Charts that fill their panel: no dead space when the grid row is tall ---- */
.panel-chartfill { display: flex; flex-direction: column; }
.panel-chartfill .chart-box { flex: 1; min-height: 190px; position: relative; }

/* ---- Dashboard headline cards ---- */
.hl-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.hl-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label ico" "num ico" "sub ico"; row-gap: 2px; box-shadow: var(--shadow); transition: border-color .12s; }
.hl-card:hover { border-color: var(--accent); }
.hl-label { grid-area: label; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.hl-num { grid-area: num; font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -.5px; color: var(--ink); font-variant-numeric: tabular-nums; }
.hl-unit { font-size: 16px; font-weight: 700; color: var(--muted); margin-left: 2px; }
.hl-sub { grid-area: sub; font-size: 12px; }
.hl-ico { grid-area: ico; align-self: center; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.hl-ico-proj { background: var(--green-bg); color: var(--green); }
.hl-ico-task { background: var(--blue-bg); color: var(--blue); }
.hl-ico-people { background: var(--violet-bg); color: var(--violet); }
.hl-ico-time { background: var(--amber-bg); color: var(--amber); }
.hl-up { color: var(--green); font-weight: 700; }
.hl-down { color: var(--red); font-weight: 700; }
@media (max-width: 900px) { .hl-row { grid-template-columns: repeat(2, 1fr); } }

/* Project Summary table + progress ring */
.two-col-rev { grid-template-columns: minmax(0, 64fr) minmax(0, 36fr); }
.psum-table { width: 100%; border-collapse: collapse; }
.psum-table th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.psum-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); font-size: 13px; vertical-align: middle; }
.psum-table tr:last-child td { border-bottom: none; }
.psum-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 550; color: var(--ink); }
.psum-name:hover { color: var(--accent); }
.psum-prog { text-align: right; }
.psum-ring { --pct: 0; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--pct) * 1%), var(--well) 0); }
.psum-ring > span { width: 30px; height: 30px; border-radius: 50%; background: var(--card); display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Upcoming milestones */
.ms-row { display: flex; align-items: center; gap: 11px; padding: 9px 2px; border-bottom: 1px solid var(--line-soft); }
.ms-row:last-child { border-bottom: none; }
.ms-row:hover { background: var(--row-hover); }
.ms-diamond { width: 9px; height: 9px; background: var(--blue); transform: rotate(45deg); flex-shrink: 0; }
.ms-diamond.ms-over { background: var(--red); }
.ms-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.ms-title { font-size: 13px; font-weight: 550; color: var(--ink); }
.ms-when { flex-shrink: 0; min-width: 90px; text-align: right; }
@media (max-width: 900px) { .two-col-rev { grid-template-columns: 1fr; } }

/* Data Health report */
.dh-hero { display: flex; gap: 20px; align-items: center; margin-bottom: 16px; }
.dh-score { flex-shrink: 0; width: 108px; height: 108px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.dh-score-n { font-size: 30px; font-weight: 800; line-height: 1; }
.dh-score-n span { font-size: 15px; font-weight: 700; }
.dh-score-lbl { font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .5px; opacity: .9; margin-top: 4px; }
.dh-good { background: var(--green); } .dh-warn { background: var(--amber); } .dh-bad { background: var(--red); }
.dh-hero-body { min-width: 0; }
.dh-hero-title { font-size: 18px; margin-bottom: 4px; }
.dh-list { display: flex; flex-direction: column; gap: 10px; }
.dh-check { padding: 0; overflow: hidden; }
.dh-check-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.dh-badge { flex-shrink: 0; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: 750; color: #fff; }
.dh-b-ok { background: var(--green); } .dh-b-warn { background: var(--amber); } .dh-b-bad { background: var(--red); }
.dh-check-main { flex: 1; min-width: 0; }
.dh-check-title { font-size: 13.5px; font-weight: 650; }
.dh-check-desc { margin-top: 2px; }
.dh-check-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.dh-bar { width: 90px; height: 6px; border-radius: 99px; background: var(--slate-bg); overflow: hidden; }
.dh-fill { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.dh-caret { color: var(--muted); transition: transform .15s; }
.dh-caret-o { transform: rotate(180deg); }
.dh-ok { opacity: .72; }
.dh-items { border-top: 1px solid var(--line-soft); padding: 6px 16px 12px; display: flex; flex-direction: column; }
.dh-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-size: 12.5px; color: var(--ink); }
.dh-item:hover { background: var(--row-hover); }
.dh-fix { color: var(--accent); font-weight: 650; font-size: 11.5px; opacity: 0; flex-shrink: 0; }
.dh-item:hover .dh-fix { opacity: 1; }
.dh-more { padding: 6px 8px; }
/* ---- Workload (Box view) ---- */
.wl-top { margin-bottom: 16px; }
.wl-bars { display: flex; align-items: flex-end; justify-content: space-evenly; gap: 10px; height: 150px; padding: 8px 4px 0; flex-wrap: wrap; }
.wl-bar-col { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1 1 40px; max-width: 60px; min-width: 34px; }
.wl-bar-track { width: 12px; height: 110px; background: var(--well); border-radius: 99px; display: flex; align-items: flex-end; overflow: hidden; }
.wl-bar-fill { width: 100%; background: #3f9d63; border-radius: 99px; transition: height .2s; }
.wl-bar-fill.wl-bar-hot { background: #d64545; }
.wl-summary-foot { margin-top: 10px; }
.wl-summary-note { margin-top: 4px; opacity: .75; }
.wl-foot-sep { margin: 0 4px; opacity: .5; }
.wl-monthnav { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.wl-mbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); color: var(--ink-soft); font-size: 11px; text-decoration: none; }
.wl-mbtn:hover { border-color: var(--accent); color: var(--accent); }
.wl-mbtn-off { opacity: .3; pointer-events: none; }
.wl-mlabel { font-size: 12.5px; font-weight: 650; color: var(--ink-soft); min-width: 92px; text-align: center; }
.wl-mnow { font-size: 11.5px; color: var(--accent); text-decoration: none; margin-left: 2px; }
.wl-mnow:hover { text-decoration: underline; }

.wl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.wl-card { display: flex; flex-direction: column; gap: 12px; }
.wl-head { display: flex; align-items: center; justify-content: space-between; }
.wl-who { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; }
.wl-stats { display: flex; align-items: center; gap: 20px; }
.wl-count b { font-size: 22px; font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.wl-count span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.wl-ring { --pct: 0; margin-left: auto; width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: conic-gradient(#3f9d63 calc(var(--pct) * 1%), var(--well) 0); flex-shrink: 0; }
.wl-ring > span { width: 42px; height: 42px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.wl-ring-est { background: conic-gradient(#4a7cc7 100%, var(--well) 0); }
.wl-ring-est small { font-size: 8px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.wl-stagebar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--well); }
.wl-seg { display: block; height: 100%; padding: 0 !important; border-radius: 0 !important; }
.wl-seg + .wl-seg { border-left: 2px solid var(--card); }
.wl-est { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.wl-est-head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin-bottom: 8px; }
.wl-est-row { display: flex; align-items: center; gap: 20px; }
.wl-warn { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--amber); }
.wl-warn:hover { text-decoration: underline; }
.wl-logged { margin-top: 6px; }
.wl-logged b { color: var(--ink-soft); }
.wl-toggle { border: 1px solid var(--line); background: var(--card); color: var(--ink-soft); border-radius: 8px; padding: 7px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wl-toggle:hover { border-color: var(--accent); color: var(--accent); }
.wl-stages { display: flex; flex-direction: column; gap: 12px; }
.wl-stage-head { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.wl-task { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border-radius: 8px; }
.wl-task:hover { background: var(--row-hover); }
.wl-task-title { font-size: 12.5px; color: var(--ink); font-weight: 500; }
.wl-empty { text-align: center; padding: 6px; }

/* Saved views control */
.sv-wrap { position: relative; }
.sv-pop { min-width: 220px; }
.sv-row { display: flex; align-items: center; gap: 4px; }
.sv-apply { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 11px; padding: 4px 7px; border-radius: 6px; flex-shrink: 0; }
.sv-del:hover { color: var(--red); background: var(--red-bg); }
.sv-empty { padding: 8px 12px; }
.sv-save { display: block; width: 100%; text-align: left; border: none; border-top: 1px solid var(--line-soft); background: none; color: var(--accent); font-weight: 600; font-size: 12.5px; padding: 9px 12px; cursor: pointer; margin-top: 4px; }
.sv-save:hover { background: var(--accent-soft); }
/* ---- Task deliverable link ---- */
.task-link, .js-link { border: none; background: none; cursor: pointer; font-size: 14px; line-height: 1; padding: 2px; border-radius: 6px; text-decoration: none; }
.task-link-add { filter: grayscale(1); opacity: .4; }
.task-link-add:hover { filter: none; opacity: 1; }
.task-link-on { text-decoration: none; }
.task-link-on:hover { transform: scale(1.12); }
.task-link-edit { font-size: 11px; opacity: .5; }
.task-link-edit:hover { opacity: 1; color: var(--accent); }
.tl-link { display: inline-flex; align-items: center; gap: 2px; }
.card-link { display: inline-flex; align-items: center; }
.cp-link { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; background: var(--card); color: var(--ink); }
.cp-link-actions { display: flex; gap: 6px; margin-top: 8px; }
.cp-link-save, .cp-link-clear { flex: 1; text-align: center; }
.te-link-row { display: flex; gap: 8px; align-items: center; }
.te-link-row input { flex: 1; }
.te-link-open { font-size: 12px; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ---- Draggable column headers ---- */
table[data-colreorder] th[draggable="true"] { cursor: grab; user-select: none; }
table[data-colreorder] th[draggable="true"]:hover { color: var(--ink); }
th.th-dragging { opacity: .4; }
th.th-drop { box-shadow: inset 2px 0 0 var(--accent); }

/* v0.64 — Atlas rebrand: gradient mark + Aeonik wordmark */
.brand, .login-brand { font-family: "Aeonik Pro", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; font-weight: 800; letter-spacing: -.02em; }
/* =====================================================================
   v0.65 — Motion: login intro, nav topline sweep, logo page-loader
   ===================================================================== */
.amark { display: block; }
/* raster logo (partials/logo_img) used in transform-animated placements — Safari-safe.
   Fills its box like the inline SVG did; context `.X .amark{width}` rules still win by specificity. */
.logo-img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---- login intro (approved mock) ---- */
.lgx { position: relative; width: 400px; max-width: calc(100vw - 48px); text-align: center; }
.lg-lock { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 26px; transform: translateY(26vh) scale(1.5); animation: lockSettle .9s cubic-bezier(.7,0,.25,1) 1.5s forwards; }
@keyframes lockSettle { to { transform: translateY(0) scale(1); } }
.lg-logo { width: 46px; height: 52px; opacity: 0; transform: scale(.4) rotate(-14deg); animation: logoPop .8s cubic-bezier(.2,1.35,.3,1) .25s forwards; }
@keyframes logoPop { to { opacity: 1; transform: scale(1) rotate(0deg); } }
.lg-word { overflow: hidden; }
.lg-word span { display: inline-block; font-size: 38px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); transform: translateX(-110%); animation: wordIn .7s cubic-bezier(.16,1,.3,1) .75s forwards; }
@keyframes wordIn { to { transform: translateX(0); } }
.lg-ripple { position: fixed; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border: 1.5px solid rgba(202,56,50,.35); border-radius: 50%; opacity: 0; pointer-events: none; animation: lgRipple 1.4s cubic-bezier(.2,.6,.3,1) .45s; }
@keyframes lgRipple { 0% { transform: scale(.5); opacity: 0; } 25% { opacity: .5; } 100% { transform: scale(3.4); opacity: 0; } }
.lgx .login-card { width: 100%; text-align: left; opacity: 0; transform: translateY(26px); animation: lgRise .8s cubic-bezier(.16,1,.3,1) 1.9s forwards; }
@keyframes lgRise { to { opacity: 1; transform: translateY(0) ; } }
.lg-f1 { opacity: 0; animation: lgRise .55s cubic-bezier(.2,.7,.2,1) 2.35s forwards; }
.lg-f2 { opacity: 0; animation: lgRise .55s cubic-bezier(.2,.7,.2,1) 2.45s forwards; }
.lg-f3 { opacity: 0; animation: lgRise .55s cubic-bezier(.2,.7,.2,1) 2.55s forwards; }
.lg-foot { text-align: center; margin-top: 18px; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); opacity: 0; animation: lgFade .8s ease 2.8s forwards; }
@keyframes lgFade { to { opacity: 1; } }
/* fast mode: repeat visits / validation-error reloads skip the show */
html.fast .lg-lock, html.fast .lg-logo, html.fast .lg-word span, html.fast .lgx .login-card,
html.fast .lg-f1, html.fast .lg-f2, html.fast .lg-f3, html.fast .lg-foot { animation: none; opacity: 1; transform: none; }
html.fast .lg-ripple { animation: none; }

/* ---- nav topline: gradient sweep on every page navigation ---- */
.nav-topline { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.nav-topline.on { opacity: 1; }
.nav-topline i { position: absolute; top: 0; bottom: 0; width: 34%; border-radius: 3px; background: linear-gradient(90deg, #FFB000, #FF1C93, #5A3BE8); }
.nav-topline.on i { animation: navSweep 1.1s cubic-bezier(.4,0,.6,1) infinite; }
@keyframes navSweep { 0% { left: -34%; } 100% { left: 100%; } }

/* ---- full-screen logo loader (login submit → first page) ---- */
.atlas-loader { position: fixed; inset: 0; z-index: 9000; background: var(--ground); display: none; align-items: center; justify-content: center; flex-direction: column; }
.atlas-loader.on { display: flex; }
.ld-mark { width: 92px; height: 105px; }
.ld-mark .amark { width: 100%; height: 100%; animation: ldBreathe 2.4s ease-in-out infinite; }
@keyframes ldBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.ld-mark .cursor { animation: ldSeek 1.6s ease-in-out infinite; }
@keyframes ldSeek { 0%, 100% { transform: translate(-2px,-7px) rotate(4deg) scale(.7); } 50% { transform: translate(-2px,-7px) rotate(24deg) scale(.7); } }
.ld-shadow { width: 54px; height: 10px; margin: 10px auto 0; border-radius: 50%; background: rgba(17,14,13,.12); filter: blur(3px); animation: ldShadow 2.4s ease-in-out infinite; }
@keyframes ldShadow { 0%, 100% { transform: scaleX(1); opacity: .55; } 50% { transform: scaleX(.78); opacity: .3; } }
.ld-word { margin-top: 22px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); font-family: "Aeonik Pro", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif; }
.ld-dots { display: inline-block; width: 26px; text-align: left; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .lg-lock, .lg-logo, .lg-word span, .lgx .login-card, .lg-f1, .lg-f2, .lg-f3, .lg-foot { animation: none; opacity: 1; transform: none; }
  .lg-ripple, .nav-topline.on i, .ld-mark .amark, .ld-mark .cursor, .ld-shadow { animation: none; }
}.brand-logo .amark { width: 100%; height: 100%; }

/* Invite / set-password page — animated hero logo (mark rises & settles, arrow seeks like a compass, then a gentle breathe) */
.invite-hero { text-align: center; margin: 2px 0 10px; }
.invite-logo { display: inline-block; width: 62px; height: 71px; animation: inviteRise .7s cubic-bezier(.2,.7,.2,1) both; }
.invite-logo .amark { width: 100%; height: 100%; display: block; animation: inviteBreathe 4s ease-in-out 1.15s infinite; }
.invite-logo .cursor { animation: inviteSeek 1.15s cubic-bezier(.4,1.25,.5,1) .15s both; }
.invite-word { margin-top: 11px; font-size: 22px; font-weight: 800; letter-spacing: .4px; color: var(--ink); }
.invite-welcome { text-align: center; }
@keyframes inviteRise { from { opacity: 0; transform: translateY(10px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes inviteBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes inviteSeek {
  0%   { transform: translate(-2px,-7px) rotate(-46deg) scale(.7); }
  55%  { transform: translate(-2px,-7px) rotate(26deg) scale(.7); }
  100% { transform: translate(-2px,-7px) rotate(13deg) scale(.7); }
}
@media (prefers-reduced-motion: reduce) {
  .invite-logo, .invite-logo .amark, .invite-logo .cursor { animation: none; }
}
/* =====================================================================
   v0.66 — Service category as a colour-coded chip (projects table)
   ===================================================================== */
.svc-line { font-size: 13px; font-weight: 650; color: var(--ink); line-height: 1.3; }
.category-chip { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 10px; font-weight: 750;
  letter-spacing: .03em; text-transform: uppercase; padding: 2px 9px 2px 8px; border-radius: 999px; white-space: nowrap; }
.category-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* per-category palette — tinted fill + saturated ink (both themes via tokens) */
.pchip-violet { background: var(--violet-bg); color: var(--violet); }
.pchip-pink   { background: var(--pink-bg);   color: var(--pink); }
.pchip-blue   { background: var(--blue-bg);   color: var(--blue); }
.pchip-green  { background: var(--green-bg);  color: var(--green); }
.pchip-orange { background: var(--orange-bg); color: var(--orange); }
.pchip-slate  { background: var(--slate-bg);  color: var(--slate); }

/* group headers (when grouped by category) carry the same signature colour */
.group-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: currentColor; margin-right: 8px; vertical-align: middle; }
.group-row[class*="group-row-"] td { position: relative; }
.group-row[class*="group-row-"] td::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; border-radius: 3px; }
.group-row-violet td::before { background: var(--violet); } .group-row-violet .group-dot { color: var(--violet); }
.group-row-pink td::before   { background: var(--pink); }   .group-row-pink .group-dot { color: var(--pink); }
.group-row-blue td::before   { background: var(--blue); }   .group-row-blue .group-dot { color: var(--blue); }
.group-row-green td::before  { background: var(--green); }  .group-row-green .group-dot { color: var(--green); }
.group-row-orange td::before { background: var(--orange); } .group-row-orange .group-dot { color: var(--orange); }
.group-row-slate td::before  { background: var(--slate); }  .group-row-slate .group-dot { color: var(--slate); }
/* =====================================================================
   v0.66b — Larger, more comfortable data tables + clearly-dropdown selects
   (applies to the projects table AND every task table/list)
   ===================================================================== */
.ptable { font-size: 14px; }
.ptable th { font-size: 11px; padding: 13px 14px 8px; }
.ptable td { padding: 14px 14px; }
.pname { font-size: 14.5px; gap: 9px; }
.pclient { font-size: 12.5px; margin-top: 3px; }
.svc-line { font-size: 13.5px; }
.category-chip { font-size: 10.5px; padding: 3px 10px 3px 9px; margin-top: 6px; }
.ptable .group-row td { padding: 11px 16px !important; }
.group-label { font-size: 13px; font-weight: 750; }
.ptable .pill, .ttable .pill { font-size: 11px; padding: 3px 11px; }

.ttable { font-size: 14px; }
.ttable thead th { font-size: 11.5px; padding: 12px 14px; }
.ttable tbody td { padding: 13px 14px; }
.ttable .tl-name { font-size: 14.5px; }
.tl-group-head { margin-bottom: 8px; }
.tl-group-head .pill { font-size: 11.5px; padding: 3px 12px; }

/* selects in these tables now READ as dropdowns: border + chevron + room */
.ptable select, .ttable select, .status-select, .qa-select {
  appearance: none; -webkit-appearance: none;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 30px 7px 11px; font-family: inherit; font-size: 13px; color: var(--ink);
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='%238a8378' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px;
  cursor: pointer; transition: border-color .13s ease, box-shadow .13s ease;
}
.ptable select:hover, .ttable select:hover, .status-select:hover, .qa-select:hover { border-color: var(--muted); }
.ptable select:focus, .ttable select:focus, .status-select:focus, .qa-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* =====================================================================
   v0.66c — Category group headers: bolder headline + visible toggle button
   ===================================================================== */
.ptable .group-row td { padding: 13px 16px !important; }
.group-label { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.group-row .count-badge { font-size: 11.5px; }
.group-dot { display: none; } /* colour now carried by the toggle + full-height accent bar */

/* accent bar runs the full height of the header band */
.group-row[class*="group-row-"] td::before { top: 0; bottom: 0; width: 4px; border-radius: 0; }

/* the toggle: an obviously-clickable coloured chip that rotates open */
.group-row .caret {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 8px; margin-right: 12px;
  font-size: 11px; border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  vertical-align: middle; transition: transform .16s ease, background .13s ease, filter .13s ease;
}
.group-row:hover .caret { filter: brightness(.97); }
.group-row .caret-open { transform: rotate(90deg); }
.group-row-violet .caret { color: var(--violet); background: var(--violet-bg); border-color: transparent; }
.group-row-pink   .caret { color: var(--pink);   background: var(--pink-bg);   border-color: transparent; }
.group-row-blue   .caret { color: var(--blue);   background: var(--blue-bg);   border-color: transparent; }
.group-row-green  .caret { color: var(--green);  background: var(--green-bg);  border-color: transparent; }
.group-row-orange .caret { color: var(--orange); background: var(--orange-bg); border-color: transparent; }
.group-row-slate  .caret { color: var(--slate);  background: var(--slate-bg);  border-color: transparent; }
/* ---- Column resizing (spreadsheet-style) ---- */
table[data-colreorder] thead th { position: relative; }
.th-rz { position: absolute; top: 0; right: -5px; width: 10px; height: 100%; cursor: col-resize; z-index: 3; }
.th-rz:hover, body.rz-active .th-rz { box-shadow: inset -2px 0 0 var(--accent); }
body.rz-active { cursor: col-resize; user-select: none; }
table.col-fixed { table-layout: fixed; }
table.col-fixed tbody td { overflow: hidden; }
table.col-fixed .tl-name { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.rz-tip { position: absolute; z-index: 9500; background: var(--ink); color: var(--ground); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 4px 9px; border-radius: 7px; pointer-events: none; box-shadow: 0 6px 18px rgba(0,0,0,.3); }

/* =====================================================================
   v0.66d — Group-header toggle is the Atlas mark (keeps rotate-on-open)
   ===================================================================== */
.group-row .caret-logo {
  width: 22px; height: 25px; padding: 0; margin-right: 12px;
  border: none; background: none !important; border-radius: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .22s cubic-bezier(.2,.7,.2,1); transform-origin: 50% 50%;
}
.group-row .caret-logo .amark { width: 100%; height: 100%; display: block; }
.group-row:hover .caret-logo { transform: scale(1.08); filter: none; }
.group-row .caret-logo.caret-open { transform: rotate(90deg); }
.group-row:hover .caret-logo.caret-open { transform: rotate(90deg) scale(1.08); }
/* v0.67 — task Trash view */
.tt-trash-act { white-space: nowrap; text-align: right; }
.tt-trash-act .btn-inline { margin-left: 6px; }

/* =====================================================================
   v0.68 - Timeline restyle: roomy project rows (match Projects page),
   Atlas-mark toggle, softer type weights, centered bars
   ===================================================================== */
.g2-prow { min-height: 54px; }
.g2-prow .g2c { padding: 10px 12px; font-size: 13px; }
.g2-prow .g2c-title { gap: 10px; }
.g2-pname { font-weight: 560; font-size: 13.5px; }
.g2-prow .g2c-dur { font-size: 12px; }
.g2-prow .g2c-start, .g2-prow .g2c-end { font-size: 12px; }
.g2-prow .g2-bar { top: 50%; transform: translateY(-50%); height: 20px; border-radius: 7px; }
.g2-prow .g2-bar-label { top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 500; }
.g2-prow .g2-diamond { top: calc(50% - 5.5px); }
/* the toggle is the Atlas mark, same rotate-open as the Projects page */
.g2-prow .caret-logo {
  width: 22px; height: 25px; padding: 0; flex-shrink: 0;
  border: none; background: none; border-radius: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .22s cubic-bezier(.2,.7,.2,1); transform-origin: 50% 50%;
}
.g2-prow .caret-logo .amark { width: 100%; height: 100%; display: block; }
.g2-prow:hover .caret-logo { transform: scale(1.08); }
.g2-prow .caret-logo.caret-open { transform: rotate(90deg); }
.g2-prow:hover .caret-logo.caret-open { transform: rotate(90deg) scale(1.08); }
/* =====================================================================
   v0.68 - Chat: media/link galleries, attachment meta, bug channel,
   inline video, nicer add-channel button
   ===================================================================== */
.chat-head-btn {
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.chat-head-btn:hover { border-color: var(--accent); color: var(--accent); }

/* attachment meta line (size / duration) under images & videos */
.chat-att-meta { display: block; font-size: 11px; color: var(--muted); margin: 1px 0 3px 2px; }
.chat-video { display: block; max-width: 380px; max-height: 280px; border-radius: 10px; border: 1px solid var(--line); margin: 4px 0; background: #000; }

/* media gallery */
.gal-body { padding: 10px 12px; overflow-y: auto; }
.gal-sec { margin: 10px 2px 6px; text-transform: uppercase; letter-spacing: .5px; font-size: 10px; font-weight: 700; }
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gal-cell { position: relative; margin: 0; }
.gal-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.gal-cell figcaption { font-size: 10px; color: var(--muted); padding: 2px 1px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gal-del { position: absolute; top: 4px; right: 4px; display: none; }
.gal-cell:hover .gal-del { display: block; }
.gal-del button { border: none; background: rgba(0,0,0,.62); color: #fff; width: 20px; height: 20px; border-radius: 6px; cursor: pointer; font-size: 11px; line-height: 1; }
.gal-del button:hover { background: var(--red); }
.gal-file { display: flex; align-items: center; gap: 6px; padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.gal-file-main { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.gal-file-meta { min-width: 0; display: flex; flex-direction: column; }
.gal-file-name { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* links gallery */
.gal-link { display: flex; align-items: center; gap: 9px; padding: 7px 4px; border-bottom: 1px solid var(--line-soft); }
.gal-link-fav { flex-shrink: 0; }
.gal-link-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.gal-link-url { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* bug-report channel entry */
.chat-chan-bugs .chan-hash { font-size: 11px; }

/* the add-channel button: proper round action chip instead of a bare box */
.chan-add {
  border: none; background: var(--well); border-radius: 50%;
  width: 22px; height: 22px; font-size: 14px; font-weight: 600; line-height: 1;
  cursor: pointer; color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .13s ease, color .13s ease, transform .13s ease;
}
.chan-add:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.08); }
/* v0.68 - template editor: role field + full-width description second line */
.tpl-row { flex-wrap: wrap; }
.tpl-row .tpl-desc { flex: 1 1 100%; margin: 4px 0 2px 26px; font-size: 12px; color: var(--ink-soft); }
/* =====================================================================
   v0.69 - Collapsible sidebar (drawer). Toggle handle on the border;
   collapsed = icon-only rail with hover-name tooltips. State on <html>.
   ===================================================================== */
.sidebar { transition: width .18s ease; }
.sidebar-toggle {
  position: absolute; top: 20px; right: -11px; z-index: 30;
  width: 22px; height: 22px; border-radius: 50%; padding: 0;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 1px 5px rgba(0,0,0,.10); transition: background .13s, color .13s, border-color .13s;
}
.sidebar-toggle:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.sidebar-toggle .sb-tog-ico { display: block; line-height: 1; font-size: 14px; transition: transform .2s ease; }
html.nav-min .sidebar-toggle .sb-tog-ico { transform: rotate(180deg); }

/* ---- collapsed state ---- */
html.nav-min .sidebar { width: 64px; }
html.nav-min .brand { justify-content: center; padding: 18px 0 14px; gap: 0; }
html.nav-min .brand-name { display: none; }
html.nav-min .sidebar nav { padding: 6px 8px; }
html.nav-min .sidebar nav a { justify-content: center; gap: 0; padding: 10px 0; position: relative; }
html.nav-min .nav-label { display: none; }
html.nav-min .sidebar nav a .nav-ico { width: auto; opacity: .85; }
/* unread badge shrinks to a corner dot */
html.nav-min .sidebar nav a em {
  position: absolute; top: 4px; right: 12px; margin: 0; min-width: 0; width: 8px; height: 8px;
  padding: 0; font-size: 0; border-radius: 50%; background: var(--accent);
}
/* hover-name tooltip (name shows on hover while collapsed) */
html.nav-min .sidebar nav a::after {
  content: attr(data-title);
  position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--ink); color: var(--ground); font-size: 12px; font-weight: 500;
  padding: 5px 10px; border-radius: 7px; white-space: nowrap;
  opacity: 0; pointer-events: none; z-index: 70; box-shadow: 0 4px 16px rgba(0,0,0,.20);
  transition: opacity .12s ease;
}
html.nav-min .sidebar nav a:hover::after { opacity: 1; }
/* footer: stack avatar + sign-out, hide the name/role meta */
html.nav-min .sidebar-foot { flex-direction: column; gap: 8px; padding: 12px 0; }
html.nav-min .foot-meta { display: none; }
html.nav-min .foot-user { flex: 0 0 auto; margin: 0; padding: 3px; }
/* =====================================================================
   v0.76 - Dashboard restructure: jump nav, numbered section headers,
   merged Portfolio table (task-mix bars) and Team table
   ===================================================================== */
.dash-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 4px; }
.dash-nav a { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 5px 11px; white-space: nowrap; }
.dash-nav a:hover { border-color: var(--accent); color: var(--accent); }
.dash-sec { display: flex; align-items: flex-start; gap: 12px; margin: 30px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.dash-sec-n { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--card); font-size: 12.5px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.dash-sec h2 { font-size: 17px; font-weight: 800; letter-spacing: -.2px; margin: 0; line-height: 1.25; }
.dash-sec p { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.dash-sec-meta { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; padding-top: 5px; }
.dash-sec-meta strong { color: var(--ink); }
.dash-sec + .ops-grid { margin-top: 0; }
.two-col + .panel, .ops-grid + .panel, .panel + .panel, .panel + .two-col, .panel + .ops-grid { margin-top: 16px; }
/* task-mix bar: one row's own composition (done / open / waiting on client / overdue) */
.mix-bar { display: flex; height: 9px; border-radius: 99px; overflow: hidden; background: var(--slate-bg); min-width: 130px; }
.mix-bar span { display: block; height: 100%; }
.mix-bar-sm { min-width: 110px; }
.mix-done { background: var(--green); } .mix-open { background: var(--blue); } .mix-wait { background: #d99a26; } .mix-over { background: var(--red); }
html[data-theme="dark"] .mix-wait { background: #ba8a30; } /* validated dark-surface step for the waiting amber */
.fc-key.mix-done, .fc-key.mix-open, .fc-key.mix-wait, .fc-key.mix-over { margin-left: 0; }
.mix-nums { display: block; font-size: 10.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.psum-reason { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.psum-table th .muted-sm { font-weight: 400; text-transform: none; letter-spacing: 0; }
.psum-table td:nth-child(3), .psum-table td:nth-child(4) { white-space: nowrap; }
/* team table */
.team-table { width: 100%; border-collapse: separate; border-spacing: 0 5px; font-size: 12.5px; }
.team-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: 0 8px 4px; vertical-align: bottom; }
.team-table th span { display: block; font-size: 9.5px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.team-table th.fc-wk { text-align: center; }
.team-table td { padding: 4px 8px; vertical-align: middle; }
.team-table td.fc-person { padding-left: 2px; }
.team-table .fc-cell { min-width: 72px; }
.team-log { display: flex; align-items: center; gap: 8px; min-width: 160px; }
.team-log .rep-bar-wrap { flex: 1; height: 8px; }
.team-log .rep-val { font-size: 12px; min-width: 44px; }
.team-log .rep-sub { font-size: 10.5px; min-width: 30px; }
.team-hold { display: flex; gap: 5px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .dash-sec { margin-top: 22px; flex-wrap: wrap; }
  .dash-sec-meta { margin-left: 38px; padding-top: 0; white-space: normal; }
  .psum-reason { max-width: 200px; }
}
/* =====================================================================
   v0.70 - Notification settings: in-app / email routing toggles
   ===================================================================== */
.notif-warn { display: flex; gap: 10px; align-items: flex-start; background: var(--orange-bg); border: 1px solid transparent; color: var(--ink-soft); border-radius: 10px; padding: 11px 14px; font-size: 12.5px; line-height: 1.5; margin: 8px 0 14px; }
.notif-warn span { font-size: 15px; }
.notif-table { width: 100%; border-collapse: collapse; }
.notif-table thead th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.notif-table thead th.notif-col { text-align: center; }
.notif-table tbody td { padding: 12px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.notif-table .notif-col { width: 78px; text-align: center; }
.notif-name { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.notif-name .notif-ico { width: 20px; text-align: center; opacity: .85; }
.notif-desc { margin: 2px 0 0 29px; }
/* pill toggle switch */
.notif-switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.notif-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.notif-slider { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s ease; }
.notif-slider::before { content: ""; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s ease; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.notif-switch input:checked + .notif-slider { background: var(--accent); }
.notif-switch input:checked + .notif-slider::before { transform: translateX(16px); }
.notif-switch input:focus-visible + .notif-slider { outline: 2px solid var(--accent); outline-offset: 2px; }
/* =====================================================================
   v0.71 - Task Brief: right-side drawer with a rich write-up
   (text, pasted images, links). Replaces the old description textarea.
   ===================================================================== */
.te-brief-btn {
  display: inline-flex; align-items: center; gap: 8px; width: 100%;
  border: 1px dashed var(--line); background: var(--card-soft, var(--card)); color: var(--ink-soft);
  border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 550; cursor: pointer; text-align: left;
  transition: border-color .13s ease, background .13s ease;
}
.te-brief-btn:hover { border-color: var(--accent); color: var(--ink); }
.te-brief-btn .te-brief-ico { font-size: 15px; }
.te-brief-btn.has-brief { border-style: solid; border-color: var(--line); background: var(--well, var(--card-soft)); }
.te-brief-btn.has-brief .brief-btn-lab { color: var(--accent); font-weight: 650; }

.brief-overlay { position: fixed; inset: 0; background: rgba(17,14,13,.34); opacity: 0; pointer-events: none;
  transition: opacity .18s ease; z-index: 9550; }
.brief-overlay.on { opacity: 1; pointer-events: auto; }
.brief-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(580px, 94vw); z-index: 9600;
  background: var(--card); border-left: 1px solid var(--line); box-shadow: -14px 0 40px rgba(17,14,13,.18);
  transform: translateX(100%); transition: transform .22s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
}
.brief-drawer.on { transform: translateX(0); }
.brief-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.brief-loading { padding: 26px; }

.brief-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; }
.brief-head-l { min-width: 0; }
.brief-ref { font-size: 11px; font-weight: 750; color: var(--accent); letter-spacing: .02em; }
.brief-title { display: block; font-size: 15.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-head-r { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.brief-view { padding: 18px 20px 40px; font-size: 15px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.brief-view img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; }
.brief-view h1, .brief-view h2, .brief-view h3 { line-height: 1.25; margin: 18px 0 8px; }
.brief-view p { margin: 0 0 11px; }
.brief-view ul, .brief-view ol { padding-left: 22px; margin: 8px 0; }
.brief-view a { color: var(--accent); text-decoration: underline; }
.brief-view table { border-collapse: collapse; margin: 10px 0; }
.brief-view td, .brief-view th { border: 1px solid var(--line); padding: 6px 10px; }
.brief-view blockquote { border-left: 3px solid var(--line); margin: 10px 0; padding: 2px 0 2px 14px; color: var(--ink-soft); }
.brief-empty { padding: 8px 0; }

.brief-edit { padding: 14px 18px 24px; }
.brief-edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.brief-hint { flex-basis: 100%; }
body.brief-open { overflow: hidden; }
@media (max-width: 620px) { .brief-drawer { width: 100vw; } }

/* ---- person switcher + inline entry adjust (legacy) ---- */
.ts-person select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12.5px; background: var(--card); color: var(--ink); max-width: 190px; }
.ts-fix { display: inline-flex; align-items: center; }
.ts-fix-form { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.ts-fix-form .btn-ghost { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; }

/* ---- task row drag-to-reorder (project Tasks tab: Table + List views) ---- */
.tcol-drag { width: 26px; min-width: 26px; padding: 0 0 0 8px; }
.t-drag { cursor: grab; color: var(--muted); font-size: 13px; user-select: none; touch-action: none; display: inline-block; padding: 4px 3px; }
.t-drag:hover { color: var(--ink); }
.t-drag:active { cursor: grabbing; }

/* ==========================================================================
   Mobile pass 1 (2026-08-13) — drawer nav + touch polish.
   Everything below is guarded by @media (max-width:900px) or (hover:none):
   desktop rendering must be byte-identical.
   ========================================================================== */
.nav-burger { display: none; }
.nav-scrim { display: none; }

@media (max-width: 900px) {
  /* --- drawer nav: the existing sidebar slides in over a scrim --- */
  .nav-burger {
    display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
    border: 1px solid var(--line); border-radius: 9px; background: var(--card);
    color: var(--ink-soft); font-size: 17px; line-height: 1; cursor: pointer;
  }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; height: 100%; z-index: 9750;
    width: 272px; max-width: 84vw;
    transform: translateX(-106%); transition: transform .22s ease;
    box-shadow: 14px 0 44px rgba(17,14,13,.25);
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.nav-open .sidebar { transform: none; }
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 9700; background: rgba(17,14,13,.42);
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
  }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
  .sidebar-toggle { display: none; } /* the desktop collapse handle is meaningless in a drawer */
  .sidebar nav a { padding: 11px 12px; font-size: 14.5px; } /* >=42px tap targets */

  /* a desktop-collapsed (nav-min) preference must never shrink the mobile drawer
     (the boot script also skips nav-min <=900px; this covers window resizes) */
  html.nav-min .sidebar { width: 272px; }
  html.nav-min .brand { justify-content: flex-start; padding: 18px 16px 14px; gap: 9px; }
  html.nav-min .brand-name, html.nav-min .nav-label { display: inline; }
  html.nav-min .sidebar nav { padding: 6px 8px; }
  html.nav-min .sidebar nav a { justify-content: flex-start; gap: 10px; padding: 11px 12px; }
  html.nav-min .sidebar nav a .nav-ico { width: 18px; }
  html.nav-min .sidebar nav a em { position: static; margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: 99px; }
  html.nav-min .sidebar nav a::after { display: none; }
  html.nav-min .sidebar-foot { flex-direction: row; gap: 9px; padding: 12px 14px; }
  html.nav-min .foot-meta { display: flex; }

  /* --- topbar: tighter, wrappable, title keeps room --- */
  .topbar { padding: 12px 14px 0; gap: 10px; flex-wrap: wrap; row-gap: 8px; }
  .topbar h1 { font-size: 18px; }
  .topbar-side { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; margin-left: auto; }
  .search-form { flex: 1 1 120px; min-width: 0; }
  .search-input { width: 100%; min-width: 0; }
  .bell-panel { position: fixed; left: 12px; right: 12px; top: 62px; width: auto; max-width: none; }
  .content { padding: 12px 14px 40px; }

  /* --- no page-level sideways scroll: wide things scroll inside their own containers --- */
  .main { overflow-x: hidden; }
  /* 1fr grid tracks have a min-content floor that stretches the page on narrow screens;
     minmax(0,1fr) lets tiles actually shrink */
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hl-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-row > *, .hl-row > * { min-width: 0; }
  /* 1fr == minmax(auto,1fr): a wide child (e.g. the Project-summary table, min-content 745px)
     inflates the track and the whole page with it — pin the floor to 0 */
  .two-col, .two-col-rev { grid-template-columns: minmax(0, 1fr); }
  .two-col > *, .two-col-rev > *, .col-stack > * { min-width: 0; }
  .panel { min-width: 0; }
  /* wide tables inside panels scroll within the panel, not the page */
  .panel table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* --- forms: 16px inputs stop iOS Safari from zooming on focus --- */
  input[type="text"], input[type="search"], input[type="email"], input[type="password"],
  input[type="number"], input[type="date"], input[type="datetime-local"], input[type="url"],
  select, textarea { font-size: 16px; }

  /* --- kanban: columns near-viewport-wide, snap one at a time --- */
  .board { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
  .board-col-wrap { min-width: 82vw; width: 82vw; scroll-snap-align: start; }

  /* --- wide tables: momentum scroll --- */
  .table-scroll { -webkit-overflow-scrolling: touch; }

  /* --- chat: stack the 230px channel rail above the thread instead of beside it --- */
  .chat-wrap { flex-direction: column; }
  .chat-side { width: 100%; max-height: 138px; flex-shrink: 0; border-right: none; border-bottom: 1px solid var(--line); }
}

@media (hover: none) {
  /* bigger touch hit-areas without shifting layout (negative margins offset the padding) */
  .cellbtn { padding: 8px 9px; margin: -8px -9px; }
  .back-btn { width: 38px; height: 38px; }
  .bell { padding: 8px 10px; }
}

/* ---- company card (sidebar foot): its own row above the profile ---- */
.sidebar-foot { flex-wrap: wrap; row-gap: 10px; }
.ws-card { flex: 0 0 100%; display: flex; align-items: center; gap: 9px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card, #fff); min-width: 0; }
.ws-mark { flex: 0 0 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--ink, #110e0d); color: #fff; font-size: 12px; font-weight: 700; }
.ws-body { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.ws-label { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ws-name { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-select { width: 100%; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; text-overflow: ellipsis; }
.ws-select:focus-visible { outline: 2px solid var(--accent, #ca3832); outline-offset: 2px; border-radius: 4px; }
.ws-admin { flex: 0 0 auto; font-size: 13px; color: var(--muted); text-decoration: none; padding: 2px 4px; border-radius: 6px; }
.ws-admin:hover { background: var(--slate-bg); color: var(--ink); }
html.nav-min .ws-card { flex-basis: auto; padding: 0; border: 0; background: none; }
html.nav-min .ws-body, html.nav-min .ws-admin { display: none; }
@media (max-width: 900px) { html.nav-min .ws-card { flex-basis: 100%; padding: 7px 8px; border: 1px solid var(--line); background: var(--card, #fff); } html.nav-min .ws-body, html.nav-min .ws-admin { display: flex; } }
.ws-mark img{width:100%;height:100%;object-fit:cover;border-radius:7px}

/* ---- task editor (drawer + list expand), styled like the project form ---- */
.tx{gap:0 !important}
.tx-top{margin-bottom:14px}
.tx-title{width:100%;border:1px solid var(--line);border-radius:10px;padding:11px 13px;font:inherit;font-size:16px;font-weight:650;background:var(--card);color:var(--ink)}
.tx-title:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(17,14,13,.07)}
.tx-meta{margin:6px 2px 0;font-size:11.5px;color:var(--muted)}
.tx-done{color:#2e7d4f;font-weight:600}
.tx-sec{border:1px solid var(--line);border-radius:12px;padding:12px 14px 6px;margin-bottom:10px;background:var(--card)}
.tx-h{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 10px}
.tx-grid{display:grid;grid-template-columns:1fr 1fr;gap:2px 14px}
.tx-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:640px){.tx-grid,.tx-grid-3{grid-template-columns:1fr}}
.tx-field{display:flex;flex-direction:column;gap:4px;min-width:0;margin-bottom:10px}
.tx-lab{font-size:12px;font-weight:600;color:var(--ink-soft);text-transform:none;letter-spacing:0;display:flex;gap:6px;align-items:baseline}
.tx-hint{font-size:11px;font-weight:400;color:var(--muted)}
.tx .tx-input,.tx-input{width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:9px;padding:8px 10px;font:inherit;font-size:13px;background:var(--card);color:var(--ink)}
.tx .tx-input:focus,.tx-input:focus{outline:none;border-color:var(--ink);box-shadow:0 0 0 3px rgba(17,14,13,.07)}
.tx-asg{display:flex;justify-content:space-between;max-width:none;text-align:left}
.tx-dep{margin-top:4px}
.tx .te-deps .dep-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.tx-link-row{display:flex;gap:8px;align-items:center}
.tx-open{white-space:nowrap;padding:8px 12px}
.tx-seg{display:inline-flex;border:1px solid var(--line);border-radius:9px;padding:3px;gap:2px;background:var(--card);align-self:flex-start}
.tx-seg-opt input{display:none}
.tx-seg-opt span{display:block;padding:5px 12px;border-radius:7px;font-size:12.5px;font-weight:600;color:var(--muted);cursor:pointer}
.tx-seg-opt input:checked + span{background:var(--accent);color:#fff}
.tx-check{display:inline-flex;align-items:center;gap:8px;padding:8px 0;font-size:13px}
.tx-brief{width:100%;justify-content:flex-start;margin:2px 0 10px}
.tx-actions{display:flex;justify-content:flex-end;gap:8px;margin:4px 0 12px}
.tx-save{width:auto;margin:0;padding:9px 18px;border-radius:9px}
.tx-extras{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:0}
@media (max-width:640px){.tx-extras{grid-template-columns:1fr}}
.tx-card{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--card);min-width:0}
.tx-card-wide{grid-column:1 / -1}
.tx-card-h{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin:0 0 8px;display:flex;gap:6px;align-items:baseline}
.tx-card .tf-head{margin-top:0}
.tx-up{display:flex;gap:8px;align-items:center;margin-top:8px}
.tx-comment{display:flex;gap:8px;margin-top:8px}
.tx-comment .btn-primary{width:auto;margin:0;white-space:nowrap}
.tx-danger{margin-top:14px;display:flex;justify-content:flex-end}
.tx-card .te-tags,.tx-card .te-check{margin-top:0;border-top:0;padding-top:0}
.tx-card .te-tags .tf-head,.tx-card .te-check .tf-head{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);margin-bottom:8px}

.task-edit-drawer .task-edit-form{margin-bottom:0}
.task-edit-drawer .tx-extras{margin-top:4px}

/* ---- workspace menu (sidebar foot): switch, invitations, new workspace ---- */
.ws-menu{position:relative;flex:0 0 100%;min-width:0}
.ws-menu .ws-card{width:100%;cursor:pointer;text-align:left;font:inherit;color:inherit}
.ws-menu .ws-card:hover{border-color:var(--muted)}
.ws-caret{flex:0 0 auto;font-size:11px;color:var(--muted);transform:rotate(180deg)}
.ws-menu .ws-card[aria-expanded="true"] .ws-caret{transform:none}
.ws-dot{flex:0 0 auto;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:var(--accent);color:#fff;font-size:10.5px;font-weight:700;display:grid;place-items:center}
.ws-pop{position:absolute;left:0;right:0;bottom:calc(100% + 8px);z-index:9600;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 44px rgba(0,0,0,.2);padding:6px;max-height:70vh;overflow-y:auto}
.ws-pop-h{font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);padding:8px 8px 4px}
.ws-pop form{margin:0}
.ws-opt{width:100%;display:flex;align-items:center;gap:9px;padding:7px 8px;border:0;border-radius:8px;background:none;font:inherit;font-size:13px;color:var(--ink);cursor:pointer;text-align:left}
.ws-opt:hover{background:var(--slate-bg)}
.ws-opt.on{font-weight:650}
.ws-opt-mark{flex:0 0 22px;height:22px;border-radius:6px;background:var(--slate-bg);display:grid;place-items:center;font-size:11px;font-weight:700}
.ws-opt.on .ws-opt-mark{background:var(--ink);color:#fff}
.ws-opt-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ws-opt-tag{font-size:10px;font-weight:600;color:var(--muted);border:1px solid var(--line);border-radius:99px;padding:0 6px}
.ws-opt-check{color:var(--accent);font-weight:700}
.ws-inv{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:8px;background:var(--slate-bg);margin:2px 0;font-size:13px}
.ws-join{width:auto;margin:0;padding:4px 12px;font-size:12px}
.ws-new{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px;margin-top:4px;border-top:1px solid var(--line);font-size:12.5px;font-weight:600;color:var(--ink);text-decoration:none;border-radius:0 0 8px 8px}
.ws-new:hover{background:var(--slate-bg)}
.ws-new-off{color:var(--muted);font-weight:500;cursor:default}
.ws-new-off:hover{background:none}
html.nav-min .ws-menu{flex-basis:auto}
html.nav-min .ws-menu .ws-caret,html.nav-min .ws-menu .ws-dot{display:none}
html.nav-min .ws-pop{left:0;right:auto;width:260px}
/* ---- Task drawer: attachments drop zone (14 Oct) ---- */
.tx-drop { margin-top: 10px; }
.tx-drop-zone { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box;
  padding: 14px 16px; border: 1.5px dashed var(--line); border-radius: 10px; background: var(--card-soft, transparent);
  cursor: pointer; transition: border-color .15s, background-color .15s; }
.tx-drop-zone:hover, .tx-drop.is-over .tx-drop-zone { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.tx-drop-zone:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.tx-drop-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.tx-drop-ico { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; font-size: 16px;
  background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tx-drop-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; color: var(--ink); }
.tx-drop-sub { font-size: 11.5px; color: var(--muted); }
.tx-drop-picked { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tx-drop-picked[hidden] { display: none; }
.tx-drop-names { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-drop.is-busy .tx-drop-zone { opacity: .6; pointer-events: none; }
/* ---- Task drawer: "Move to Trash" as a clear, quiet danger button (14 Oct; was a faint emoji + grey text) ---- */
.te-danger-btn { display: inline-flex; align-items: center; gap: 7px; color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent);
  background: transparent; font-size: 12.5px; font-weight: 600; padding: 7px 14px; min-height: 34px; }
.te-danger-btn:hover, .te-danger-btn:focus-visible { color: #fff; background: var(--red); border-color: var(--red); }
.te-danger-ico { flex: none; display: block; }
/* drop zone, round 2: stronger dashed edge in both themes, accent-coloured clip icon */
.tx-drop-zone { border-color: color-mix(in srgb, var(--muted) 45%, transparent); padding: 16px 18px; }
.tx-drop-ico { color: var(--accent-text, var(--accent)); }
.tx-drop-text strong { font-weight: 650; }
/* Task drawer is ALWAYS one column: .task-edit (shared with the inline editor) is a wrapping flex row, which let the
   form and the extras sit side by side whenever their content happened to fit — squashing the form — and spread
   spare height into large gaps. Block flow stacks form → tags/checklist/attachments/comments → trash. (14 Oct) */
.task-edit-drawer { display: block; }
.task-edit-drawer > * + * { margin-top: 14px; }

/* ---- Task editor: "Blocked by" searchable combobox (14 Oct; replaces the native <select class="dep-add">) ---- */
.te-deps .dep-chips { margin-bottom: 4px; }
.dep-combo { position: relative; }
.tx .dep-combo-input { padding-left: 32px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b93a1' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px 50%; }
.tx .dep-combo-input::placeholder { color: var(--muted); opacity: 1; }
.tx .dep-combo-input:disabled { opacity: .7; cursor: not-allowed; }
.dep-pop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 70; padding: 4px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); }
.dep-pop[hidden], .dep-list[hidden], .dep-empty[hidden], .dep-opt[hidden] { display: none; }
.dep-list { position: relative; list-style: none; margin: 0; padding: 0; max-height: 268px; overflow-y: auto; overscroll-behavior: contain; }
.dep-opt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 6px 10px; border-radius: 7px;
  font-size: 13px; line-height: 1.35; color: var(--ink); cursor: pointer; }
.dep-opt.is-active { background: var(--slate-bg); box-shadow: inset 3px 0 0 var(--accent); }
.dep-opt-ref { flex: none; min-width: 54px; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.dep-opt-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-opt mark { background: color-mix(in srgb, var(--accent) 26%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.dep-opt.is-done .dep-opt-ref, .dep-opt.is-done .dep-opt-title { color: var(--muted); }
.dep-opt-done { flex: none; font-size: 10.5px; font-weight: 700; line-height: 1.6; padding: 0 8px; border-radius: 99px; color: var(--green); background: var(--green-bg); }
.dep-opt.is-first-done { margin-top: 7px; }
.dep-opt.is-first-done::before { content: ""; position: absolute; left: 8px; right: 8px; top: -4px; border-top: 1px solid var(--line); }
.dep-empty { margin: 0; padding: 10px 12px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) {
  .dep-opt { min-height: 44px; font-size: 14px; }
  .dep-list { max-height: 50vh; }
  .tx .dep-combo-input { font-size: 16px; }
}

/* ---- Task editor: the Tags card is built like the Checklist card (14 Oct) ----
   Chips wrap on top; a full-width dashed "＋ Add tag" row matches "＋ Add checklist item" (same height, font,
   padding, radius, colours) and opens the picker anchored under it at the card's full width. */
.te-check .chk-add, .te-tags .tag-add-row { display: flex; align-items: center; width: 100%; height: 32px; margin: 6px 0 0; padding: 0 10px;
  border: 1px dashed var(--line); border-radius: 8px; background: none; font: inherit; font-size: 12.5px; font-weight: 400; line-height: 1.2;
  color: var(--ink); text-align: left; }
.te-check .chk-add::placeholder { color: var(--muted); opacity: 1; }
.te-tags .tag-add-row { color: var(--muted); cursor: pointer; }
.te-check .chk-add:hover, .te-tags .tag-add-row:hover { border-color: var(--muted); }
.te-tags .tag-add-row:hover, .te-tags .tag-add-row[aria-expanded="true"] { color: var(--ink); }
.te-tags .tag-add-row[aria-expanded="true"] { border-style: solid; border-color: var(--muted); }
.te-tags .tag-chips { gap: 6px; }
.te-tags .tag-chips .tag-chip { font-size: 11.5px; padding: 2px 5px 2px 9px; }
.te-tags .tag-add-wrap { position: relative; display: block; }
.te-tags .tag-pick { left: 0; right: 0; width: auto; top: calc(100% + 6px); z-index: 70; padding: 12px; border-radius: 10px; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); }
.tag-pick-h { margin: 0 0 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tag-pick-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tag-pick .tag-opt { font: inherit; font-size: 11.5px; font-weight: 700; padding: 3px 10px; line-height: 1.5; }
.te-tags .tag-new { gap: 8px; margin-top: 0; padding-top: 12px; }
.te-tags .tag-pick > .tag-new:first-child { border-top: 0; padding-top: 0; }
.te-tags .tag-new .tag-pick-h { margin-bottom: -1px; }
.te-tags .tag-new-name { height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; background: var(--card); color: var(--ink); }
.te-tags .tag-new-name::placeholder { color: var(--muted); opacity: 1; }
.te-tags .tag-colors { flex-wrap: wrap; gap: 7px; }
.te-tags .tag-new-foot { display: flex; justify-content: flex-end; }
.te-tags .tag-new .tag-new-add { width: auto; margin: 0; padding: 6px 18px; border-radius: 8px; font-size: 12.5px; }
.te-tags .tag-new .tag-new-add:disabled { opacity: .45; cursor: not-allowed; }
.te-tags .tag-new .tag-new-add:disabled:hover { background: var(--accent); }
@media (max-width: 760px) {
  .te-tags .tag-add-row { min-height: 44px; }
  .te-tags .tag-new-name { font-size: 16px; }
  .te-tags .tag-new .tag-new-add { min-width: 96px; }
  .tag-pick .tag-opt { min-height: 32px; }
}

/* ---- Due dates: late is red everywhere, and says how late (UI-5, 16 Oct fix) ----
   .overdue-text (≈345) lost to the later single-class colour rules on .trow-due (My Work rows ≈737) and
   .card-date (board cards ≈1250), so a late date looked like any other. The two-class selectors below win in
   both themes (--red / --orange are tuned per theme in mobile.css + app.css dark). The "· 3d late" /
   "· Due today" words (App\Support\DueCue, app.js dueCue) carry the meaning without colour (WCAG 1.4.1). */
.overdue-text, .trow-due.overdue-text, .card-date.overdue-text { color: var(--red); font-weight: 650; }
.due-today, .trow-due.due-today, .card-date.due-today { color: var(--orange); font-weight: 650; }
.trow-due, .card-date { white-space: nowrap; }
.card-date { flex: none; }
.card-foot { gap: 6px; }                /* the longer "15 Oct · 1d late" must not touch the checklist chip */
.due-cue { white-space: nowrap; }

/* ---- Blocked work is visible (UX-28, 16 Oct fix) ----
   "Blocked · RPAU-2" (tasks/_blocked) on board cards, table/list Name cells and My Work rows while any task this
   one waits on is unfinished; the drawer lists those tasks with stage + owner ("Waiting on" for members, the
   editable "Blocked by" for managers). Text + icon, never colour alone. */
.blk-badge { display: inline-flex; align-items: center; gap: 4px; flex: none; max-width: 100%; padding: 1px 7px 1px 5px;
  border-radius: 6px; border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); background: var(--red-bg); color: var(--red);
  font-size: 10.5px; font-weight: 700; line-height: 1.6; white-space: nowrap; vertical-align: middle; }
.blk-ico { flex: none; display: block; }
.card > .blk-badge { align-self: flex-start; margin: -3px 0 8px; }      /* board card: its own line under the title */
.tl-task .blk-badge { margin-left: 1px; }
.dep-rows { list-style: none; margin: 2px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.dep-row { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 6px 8px 6px 10px; border: 1px solid var(--line);
  border-left: 3px solid var(--red); border-radius: 9px; background: var(--card); font-size: 13px; }
.dep-row.is-done { border-left-color: var(--green); }
.dep-row-ref { flex: none; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); font-variant-numeric: tabular-nums; text-decoration: none; }
.dep-row-ref:hover, .dep-row-ref:focus-visible { color: var(--accent-text, var(--accent)); text-decoration: underline; text-underline-offset: 2px; }
.dep-row-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.dep-row.is-done .dep-row-ref, .dep-row.is-done .dep-row-title { color: var(--muted); }
.dep-row-meta { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.dep-row-owner { display: inline-flex; align-items: center; gap: 5px; max-width: 140px; min-width: 0; font-size: 12px; color: var(--ink-soft); }
.dep-row-owner-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep-row .dep-x { font-size: 12px; padding: 2px 4px; border-radius: 6px; }
.dep-row .dep-x:hover { background: var(--red-bg); }
@media (max-width: 600px) {
  .dep-row { flex-wrap: wrap; row-gap: 4px; }
  .dep-row-title { flex: 1 1 calc(100% - 80px); white-space: normal; }
  .dep-row-meta { flex: 1 1 100%; }
  .dep-row .dep-x { margin-left: auto; }
}

/* ---- Brief editor: TinyMCE's menus and dialogs above the Brief drawer (BUG-5 follow-up, 16 Oct fix) ----
   TinyMCE puts its dropdowns (Paragraph, text colour, "…" overflow) and dialogs (link, image) in .tox-tinymce-aux at
   z-index 1300; the Brief drawer sits at 9600, so they opened invisibly behind it. Only while the Brief is open. */
body.brief-open .tox-tinymce-aux, body.brief-open .tox-silver-sink { z-index: 9700; }