:root {
  --navy: #2c3e50; --gold: #e4a11b; --gold-dark: #c88a12; --gold-tint: #fdf6e8;
  --bg: #f7f5f1; --surface: #ffffff; --surface-2: #faf9f6; --sunk: #f1eee8;
  --border: #e9e5dd; --border-strong: #d8d2c7;
  --text: var(--navy); --text-2: #55697c; --muted: #8a97a4;
  --good: #1e7a4d; --bad: #b03a2e; --good-tint: #e6f4ec; --bad-tint: #f9e9e7;
  --radius: 18px; --radius-sm: 12px; --radius-xs: 8px;
  --shadow: 0 1px 2px rgba(44,62,80,.04), 0 6px 24px -12px rgba(44,62,80,.12);
  --shadow-lift: 0 2px 6px rgba(44,62,80,.06), 0 24px 48px -20px rgba(44,62,80,.28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sidebar: 236px;
  --c1:#3568a8; --c2:#c2850a; --c3:#0f9488; --c4:#c94a44; --c5:#8259c9; --c6:#6a9420; --c7:#c1478d; --c8:#4d90d6; --c9:#9aa3ad;
}
* { box-sizing: border-box; }
html { font: 15px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }
body { margin: 0; min-height: 100dvh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

/* layout */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 22px 16px; border-right: 1px solid var(--border);
  background: rgba(247,245,241,.82); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
.brand { display: block; padding: 4px 10px 22px; }
.brand img { display: block; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; transition: background 120ms, color 120ms, transform 100ms; }
.nav a:hover { background: rgba(44,62,80,.05); color: var(--text); }
.nav a:active { transform: scale(.98); }
.nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.sidebar-foot { margin-top: auto; padding: 10px 12px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px var(--good-tint); }
.dot.off { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-tint); }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px 14px;
  background: linear-gradient(rgba(247,245,241,.95), rgba(247,245,241,.75)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  mask-image: linear-gradient(#000 85%, transparent); -webkit-mask-image: linear-gradient(#000 85%, transparent); padding-bottom: 22px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.page-title { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
.menu-btn { display: none; }
.content { padding: 0 32px 48px; max-width: 1240px; }
.tabbar { display: none; }

/* controls */
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--sunk); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; font-weight: 500; font-size: 13px; color: var(--text-2); cursor: pointer; transition: background 140ms, color 140ms, box-shadow 140ms, transform 100ms; }
.seg button:active { transform: scale(.97); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(44,62,80,.10), 0 1px 0 rgba(255,255,255,.6) inset; }
.btn { border: 1px solid var(--border-strong); background: var(--surface); padding: 8px 14px; border-radius: 10px; font-weight: 500; font-size: 14px; cursor: pointer; transition: background 120ms, transform 100ms, box-shadow 120ms; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 600; }
.btn.primary:hover { background: #eab030; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(44,62,80,.06); }
.btn[disabled] { opacity: .5; cursor: default; }
.icon-btn { border: 0; background: transparent; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 18px; line-height: 1; }
.icon-btn:hover { background: rgba(44,62,80,.06); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 10px; padding: 9px 12px; font-size: 14px; outline: none; transition: border-color 120ms, box-shadow 120ms; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(228,161,27,.22); }
.input.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; width: auto; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }

/* cards */
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(6, 1fr); }
.grid.kpis.four { grid-template-columns: repeat(4, 1fr); }
.grid.kpis.five { grid-template-columns: repeat(5, 1fr); }
.grid.two { grid-template-columns: 3fr 2fr; }
.grid.two.even { grid-template-columns: 1fr 1fr; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; min-width: 0; }
.card.tight { padding: 16px 18px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head .sub { font-size: 13px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.kpi { padding: 16px 18px; }
.kpi .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: .01em; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; margin-top: 6px; }
.kpi .value small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-right: 2px; }
.kpi .delta { margin-top: 6px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; line-height: 1.35; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.up { color: var(--good); background: var(--good-tint); }
.pill.down { color: var(--bad); background: var(--bad-tint); }
.pill.flat { color: var(--text-2); background: var(--sunk); }
.pill.tag { color: var(--text-2); background: var(--sunk); font-weight: 500; }
.pill.gold { color: var(--gold-dark); background: var(--gold-tint); }
.hero { background: linear-gradient(135deg, #2c3e50, #3a5271); color: #fff; }
.hero .label { color: rgba(255,255,255,.7); }
.hero .value small { color: rgba(255,255,255,.55); }
.hero .delta { color: rgba(255,255,255,.7); }
.hero .pill.up { background: rgba(255,255,255,.16); color: #b8f0cf; }
.hero .pill.down { background: rgba(255,255,255,.16); color: #ffc4bb; }
.chart-wrap { position: relative; height: 300px; }
.chart-wrap.sm { height: 220px; }
.chart-wrap.lg { height: 340px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.line { height: 3px; border-radius: 2px; width: 14px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; border-bottom-color: var(--border-strong); }
th:first-child, td:first-child { text-align: left; padding-left: 6px; }
th:last-child, td:last-child { padding-right: 6px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.muted, .muted { color: var(--muted); }
td.trunc { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.share { display: inline-block; height: 6px; border-radius: 3px; background: var(--sunk); width: 110px; vertical-align: middle; margin-left: 10px; overflow: hidden; }
.share i { display: block; height: 100%; background: var(--navy); border-radius: 3px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.name-edit { border: 0; background: transparent; padding: 4px 6px; margin: -4px -6px; border-radius: 6px; width: 100%; min-width: 220px; }
.name-edit:hover { background: var(--sunk); }
.name-edit:focus { background: var(--surface); outline: 2px solid var(--gold); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; color: var(--muted); }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* unmapped cards */
.unmapped { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ucard { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: border-color 120ms, background 120ms, transform 100ms; background: var(--surface-2); }
.ucard:hover { border-color: var(--gold); background: var(--gold-tint); }
.ucard:active { transform: scale(.985); }
.ucard code { font-size: 12px; color: var(--text-2); word-break: break-all; }
.ucard .big { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 2px; }

/* sheet (dialog) */
dialog.sheet { border: 0; padding: 0; background: transparent; max-width: none; width: 100%; height: 100%; max-height: none; margin: 0; inset: 0; position: fixed; display: none; }
dialog.sheet[open] { display: grid; place-items: center; }
dialog.sheet::backdrop { background: rgba(44,62,80,.28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sheet-body { width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lift); padding: 22px 24px;
  animation: pop 320ms cubic-bezier(.2,.9,.3,1); }
.sheet-body h2 { margin-bottom: 4px; font-size: 19px; }
.sheet-body .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.sheet-body form { display: flex; flex-direction: column; gap: 14px; }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.sheet-actions .left { margin-right: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* toasts */
.toast-host { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lift); animation: pop 260ms cubic-bezier(.2,.9,.3,1); }
.toast.err { background: var(--bad); }

.fade-in { animation: fade 240ms ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--sunk), var(--surface-2), var(--sunk)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* responsive */
@media (max-width: 1100px) { .grid.kpis, .grid.kpis.five { grid-template-columns: repeat(3, 1fr); } .grid.kpis.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1000px) { .grid.two, .grid.two.even { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar { padding: 14px 16px 18px; flex-wrap: wrap; }
  .page-title { font-size: 22px; }
  .content { padding: 0 16px 90px; }
  .menu-btn { display: none; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; justify-content: space-around; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(247,245,241,.85); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-top: 1px solid var(--border); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); padding: 4px 10px; border-radius: 10px; }
  .tabbar a.active { color: var(--navy); }
  .tabbar a svg { width: 22px; height: 22px; }
  .kpi .value { font-size: 22px; }
  .card-head { flex-wrap: wrap; }
  .card-head h2 { white-space: nowrap; }
  #office-card .card-head .sub { display: none; }
  .tabbar a { white-space: nowrap; font-size: 10.5px; padding: 4px 6px; }
  .office-legend { font-size: 12px; gap: 8px 12px; }
  .grid.kpis, .grid.kpis.five, .grid.kpis.four { grid-template-columns: repeat(2, 1fr); }
  .chart-wrap { height: 240px; }
  .sheet-body { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; align-self: end; animation: rise 360ms cubic-bezier(.2,.9,.3,1); }
  dialog.sheet[open] { place-items: end center; }
  @keyframes rise { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---- team / office ---- */
.office { position: relative; isolation: isolate; z-index: 0; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #f3ede3; user-select: none; }
.office svg.room { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.office .stage { position: absolute; inset: 0; }
.chibi { position: absolute; width: 0; height: 0; cursor: pointer; transition: opacity 300ms; }
.chibi img { position: absolute; left: 0; bottom: 0; height: 12cqh; max-height: 104px; width: auto; transform-origin: 50% 100%; translate: -50% 0; filter: drop-shadow(0 6px 4px rgba(44,62,80,.18)); transition: filter 160ms; pointer-events: auto; }
.office { container-type: size; }
.chibi:hover img { filter: drop-shadow(0 8px 6px rgba(44,62,80,.28)) brightness(1.04); }
.chibi .tag { position: absolute; left: 0; top: 4px; translate: -50% 0; font-size: 11px; font-weight: 600; color: var(--navy); background: rgba(255,255,255,.85); padding: 1px 7px; border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 2px rgba(44,62,80,.12); }
.chibi .bubble { position: absolute; left: 0; bottom: calc(min(12cqh, 104px) + 10px); translate: -50% 0; font-size: 11.5px; font-weight: 500; color: var(--navy); background: #fff; padding: 4px 9px; border-radius: 12px; white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 8px rgba(44,62,80,.16); opacity: 0; transform: translateY(4px); transition: opacity 180ms, transform 180ms; pointer-events: none; }
.chibi .bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.chibi:hover .bubble, .office.show-bubbles .chibi .bubble { opacity: 1; transform: none; }
.chibi.is-out { opacity: .45; }
.chibi.has-overdue .tag::before { content: "●"; color: var(--bad); margin-right: 4px; font-size: 9px; }
.office-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); margin-top: 12px; align-items: center; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.status-working .status-dot, .pill.status-working { background: var(--good-tint); color: var(--good); } .status-working .status-dot { background: var(--good); }
.status-meeting .status-dot, .pill.status-meeting { background: #e9e3f7; color: #6a4fbf; } .status-meeting .status-dot { background: #6a4fbf; }
.status-call .status-dot, .pill.status-call { background: #e3eefa; color: #2f6bb5; } .status-call .status-dot { background: #2f6bb5; }
.status-break .status-dot, .pill.status-break { background: var(--gold-tint); color: var(--gold-dark); } .status-break .status-dot { background: var(--gold); }
.status-out .status-dot, .pill.status-out { background: var(--sunk); color: var(--muted); } .status-out .status-dot { background: var(--muted); }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.person { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 16px 16px; cursor: pointer; transition: transform 140ms, box-shadow 140ms; }
.person:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.person:active { transform: scale(.985); }
.person .avatar { width: 96px; height: 110px; display: grid; place-items: end center; margin-bottom: 8px; }
.person .avatar img { max-height: 110px; max-width: 96px; filter: drop-shadow(0 6px 4px rgba(44,62,80,.16)); }
.person .avatar .photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; align-self: center; }
.person .name { font-weight: 600; font-size: 15px; }
.person .title { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.person .meta { font-size: 12px; color: var(--text-2); margin-top: 8px; }
.person.add { border: 1.5px dashed var(--border-strong); box-shadow: none; background: transparent; color: var(--text-2); justify-content: center; min-height: 230px; }
.person.add:hover { border-color: var(--gold); background: var(--gold-tint); color: var(--navy); }
.person.add .plus { font-size: 34px; line-height: 1; margin-bottom: 8px; }

.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.goal { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: border-color 120ms, background 120ms; }
.goal:hover { border-color: var(--border-strong); background: var(--surface-2); }
.goal .g-title { font-weight: 600; margin-bottom: 4px; }
.goal .g-sub { font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.bar { height: 7px; border-radius: 4px; background: var(--sunk); overflow: hidden; margin: 8px 0 6px; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--gold); transition: width 400ms cubic-bezier(.2,.9,.3,1); }
.bar.done i { background: var(--good); }

/* side panel */
.panel-host { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.panel-host .scrim { position: absolute; inset: 0; background: rgba(44,62,80,.18); opacity: 0; transition: opacity 240ms; }
.panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); box-shadow: var(--shadow-lift); transform: translateX(100%); transition: transform 320ms cubic-bezier(.2,.9,.3,1); overflow-y: auto; padding: 22px 24px 40px; }
.panel-host.open { pointer-events: auto; } .panel-host.open .scrim { opacity: 1; } .panel-host.open .panel { transform: none; }
.panel .p-head { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 18px; }
.panel .p-head img { height: 96px; filter: drop-shadow(0 6px 4px rgba(44,62,80,.16)); }
.panel .p-head .photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.panel h2 { font-size: 20px; }
.panel h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 22px 0 10px; }
.panel .close { position: absolute; top: 14px; right: 14px; }
.status-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.status-grid button { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 8px 4px; font-size: 11.5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 3px; transition: background 120ms, border-color 120ms, transform 100ms; }
.status-grid button span:first-child { font-size: 18px; }
.status-grid button:hover { background: var(--surface-2); }
.status-grid button:active { transform: scale(.96); }
.status-grid button.active { border-color: var(--gold); background: var(--gold-tint); font-weight: 600; }
.task { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: 0; }
.task input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--good); cursor: pointer; }
.task .t-title { font-weight: 500; }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.task .t-sub { font-size: 12px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.task .t-sub .overdue { color: var(--bad); font-weight: 600; }
.task .t-actions { margin-left: auto; opacity: 0; transition: opacity 120ms; white-space: nowrap; }
.task:hover .t-actions { opacity: 1; }
.pill.prio-high { background: var(--bad-tint); color: var(--bad); } .pill.prio-low { background: var(--sunk); color: var(--muted); } .pill.prio-normal { display: none; }
.quick-add { display: flex; gap: 6px; margin-top: 8px; }
.quick-add input { flex: 1; }
.tasks-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .tasks-board { grid-template-columns: 1fr; } }
.tasks-board .col h3 { margin-bottom: 8px; display: flex; justify-content: space-between; }
.tasks-board .task { border-bottom: 0; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }

/* ---- kanban ---- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.kcol { background: var(--sunk); border-radius: 14px; padding: 10px; min-height: 160px; transition: background 140ms, box-shadow 140ms; }
.kcol.over { background: #ece7dc; box-shadow: inset 0 0 0 2px var(--gold); }
.kcol h3 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); margin: 4px 6px 10px; display: flex; justify-content: space-between; align-items: center; }
.kcol h3 .n { background: var(--surface); color: var(--muted); border-radius: 999px; padding: 0 8px; font-size: 11.5px; }
.kcol.c-review h3 { color: #6a4fbf; } .kcol.c-done h3 { color: var(--good); } .kcol.c-doing h3 { color: var(--gold-dark); }
.kcards { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kcard { background: var(--surface); border-radius: 11px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(44,62,80,.06); cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: box-shadow 140ms, transform 140ms; border-left: 3px solid transparent; }
.kcard:hover { box-shadow: var(--shadow-lift); }
.kcard.prio-high { border-left-color: var(--bad); } .kcard.prio-low { border-left-color: var(--border-strong); }
.kcard.dragging { display: none; }
/* Holds the slot the card will land in. The card itself stays put in the DOM. */
.kph { border-radius: 11px; border: 2px dashed var(--border-strong); background: rgba(44,62,80,.03); }
.kanban.dragging { touch-action: none; }
.kanban.dragging .kcard { cursor: grabbing; }
.kcard .k-title { font-weight: 500; font-size: 14px; line-height: 1.35; }
.kcard .k-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.kcard .k-meta .overdue { color: var(--bad); font-weight: 600; }
.kcard .k-meta .goal { background: var(--gold-tint); color: var(--gold-dark); padding: 1px 7px; border-radius: 999px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar-chip { display: inline-flex; align-items: center; gap: 6px; }
.avatar-chip img, .avatar-chip .ini { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--sunk); display: inline-grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--navy); }
.avatar-chip img.sprite { object-fit: contain; object-position: top; background: transparent; }
.kghost { position: fixed; z-index: 200; pointer-events: none; width: 260px; transform: rotate(2deg); box-shadow: var(--shadow-lift); opacity: .95; }
.kanban.compact .kcol { min-height: 100px; }
@media (max-width: 900px) { .kanban { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; } .kcol { flex: 0 0 82vw; scroll-snap-align: start; } }

/* ---- my day ---- */
.clock { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.clock .big { flex: none; width: 150px; height: 150px; border-radius: 50%; border: 0; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; cursor: pointer; color: var(--navy); background: var(--gold); box-shadow: 0 10px 30px -10px rgba(228,161,27,.8), inset 0 -4px 0 rgba(0,0,0,.08); transition: transform 120ms, box-shadow 160ms; display: grid; place-items: center; gap: 2px; }
.clock .big small { font-size: 12px; font-weight: 500; opacity: .75; }
.clock .big:hover { transform: translateY(-1px); } .clock .big:active { transform: scale(.96); }
.clock .big.out { background: var(--navy); color: #fff; box-shadow: 0 10px 30px -10px rgba(44,62,80,.7), inset 0 -4px 0 rgba(0,0,0,.2); }
.clock .big[disabled] { opacity: .6; }
.clock .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 14px 22px; flex: 1; min-width: 220px; }
.clock .facts .v { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; } .clock .facts .l { font-size: 12px; color: var(--muted); }
.entries { font-size: 13px; color: var(--text-2); margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.greeting { font-size: 14px; color: var(--muted); margin: -8px 0 4px; }
.who { display: flex; flex-wrap: wrap; gap: 8px; }
.who .pill { padding: 5px 10px; font-weight: 500; }

/* ---- resources ---- */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.res { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: border-color 120ms, box-shadow 120ms, transform 120ms; position: relative; }
.res:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.res .ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; background: var(--sunk); }
.res .ico.link { background: #e3eefa; } .res .ico.pdf { background: var(--bad-tint); } .res .ico.img { background: var(--good-tint); } .res .ico.doc { background: #e9e3f7; }
.res .r-title { font-weight: 600; font-size: 14px; }
.res .r-desc { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.res .r-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.res .r-act { position: absolute; top: 10px; right: 10px; opacity: 0; transition: opacity 120ms; }
.res:hover .r-act { opacity: 1; }
.res .pin { position: absolute; top: 10px; right: 12px; font-size: 12px; color: var(--gold-dark); }
.res:hover .pin { opacity: 0; }
.cat-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 10px; }

/* ---- people (settings) ---- */
.vis-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vis-chips .pill { font-weight: 500; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-top: auto; }
.sidebar-user img, .sidebar-user .ini { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--sunk); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.sidebar-user img.sprite { object-fit: contain; }
.sidebar-user .u-name { font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.sidebar-user .u-role { font-size: 11.5px; color: var(--muted); }
.sidebar-user button { margin-left: auto; }
