/* PocketLabs Planner */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/inter-latin.woff2") format("woff2"); }
:root {
  --ink: #1d1d1f; --body: #424245; --muted: #6e6e73; --line: #e5e5ea; --line-2: #f0f0f3;
  --bg: #fff; --bg-2: #f5f5f7;
  --blue: #0071e3; --blue-600: #0062c4; --blue-soft: #e8f3fe; --blue-line: #9cc8f7;
  --green: #248a3d; --green-soft: #e9f8ee; --green-line: #9fd8ae;
  --red: #d70015; --red-soft: #fff0f1; --amber: #a05a00; --amber-soft: #fff6e5;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 14px 34px -14px rgba(0,0,0,.18);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --hour: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg-2); color: var(--body); font: 15px/1.45 var(--sans); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); margin: 0; letter-spacing: -.022em; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid #2997ff; outline-offset: 2px; border-radius: 6px; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 980px; border: 1px solid transparent; background: #fff; color: var(--ink); font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); color: #fff; }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { border-color: #f3c2c7; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { height: 32px; padding: 0 12px; font-size: .875rem; }
.btn-block { width: 100%; height: 46px; font-size: 1rem; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d2d2d7; border-radius: 10px; background: #fff; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.18); }

.note { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.note-ok { background: var(--green-soft); color: #145c28; }
.note-err { background: var(--red-soft); color: #9b0010; }
.note-dev { background: var(--amber-soft); color: var(--amber); }

/* ---------- sign-in pages ---------- */
body.auth { min-height: 100vh; background: radial-gradient(700px 420px at 50% -10%, rgba(41,151,255,.22), transparent 65%), radial-gradient(500px 360px at 90% 110%, rgba(48,209,88,.14), transparent 60%), #f7faff; }
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; gap: 22px; }
.auth-brand, .top-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 1.15rem; letter-spacing: -.022em; }
.auth-brand:hover, .top-brand:hover { text-decoration: none; }
.auth-brand b, .top-brand b { color: var(--green); font-weight: 600; }
.auth-brand small, .top-brand small { display: block; font-weight: 500; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: -2px; }
.auth-card { width: 100%; max-width: 420px; background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.06); border-radius: 22px; padding: 30px 28px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-lead { color: var(--muted); margin-bottom: 22px; }
.auth-foot { font-size: .85rem; color: var(--muted); text-align: center; max-width: 420px; }
.form { display: grid; gap: 8px; }
.form label { font-weight: 500; color: var(--ink); font-size: .9rem; margin-top: 6px; }
.form .btn-block { margin-top: 14px; }
.form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; font-size: .9rem; }
.form-alt { text-align: center; font-size: .9rem; margin: 10px 0 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 400 !important; color: var(--body) !important; margin: 0 !important; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.email-field { display: flex; align-items: stretch; border: 1px solid #d2d2d7; border-radius: 10px; background: #fff; overflow: hidden; }
.email-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.18); }
.email-field input { border: 0; border-radius: 0; box-shadow: none !important; min-width: 0; flex: 1; }
.email-domain { display: flex; align-items: center; padding: 0 12px; background: var(--bg-2); color: var(--muted); border-left: 1px solid var(--line); font-size: .92rem; white-space: nowrap; }

/* ---------- board ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; padding: 10px 20px; max-width: 1500px; margin: 0 auto; }
.top-brand img { width: 36px; height: 36px; }
.top-user { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: .9rem; }
.top-user .who { text-align: right; line-height: 1.2; }
.top-user .who b { display: block; color: var(--ink); font-weight: 600; }
.top-user .who span { color: var(--muted); font-size: .8rem; }
.top-user form { margin: 0; }

.board { max-width: 1500px; margin: 0 auto; padding: 18px 20px 40px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar h1 { font-size: 1.35rem; margin-right: auto; }
.toolbar h1 small { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.seg { display: inline-flex; padding: 3px; background: #e8e8ed; border-radius: 980px; }
.seg button { height: 32px; padding: 0 14px; border: 0; border-radius: 980px; background: transparent; cursor: pointer; font-weight: 500; font-size: .875rem; color: var(--body); }
.seg button[aria-pressed=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.weeknav { display: inline-flex; gap: 4px; }
.icon-btn { width: 32px; padding: 0; }
.viewing { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; }
.viewing select { min-height: 34px; padding: 4px 30px 4px 10px; width: auto; border-radius: 980px; }

.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }

/* backlog */
.side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.backlog { padding: 16px; display: flex; flex-direction: column; }
.backlog .cards { max-height: 420px; }

/* team list (admins) */
.team { padding: 14px 10px 10px; }
.team h2 { font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; padding: 0 6px 8px; }
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; max-height: 330px; overflow-y: auto; overflow-x: hidden; }
.person { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; text-align: left; }
.person:hover { background: var(--bg-2); }
.person.on { background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue-line); }
.p-txt { min-width: 0; line-height: 1.25; }
.p-txt b { display: block; color: var(--ink); font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-txt small { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .02em; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.avatar.all { background: var(--bg-2); grid-template-columns: 1fr 1fr; gap: 2px; padding: 7px; box-shadow: inset 0 0 0 1px var(--line); }
.avatar.all i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.backlog.drop-ok { outline: 2px dashed var(--blue); outline-offset: -4px; background: var(--blue-soft); }
.backlog h2 { font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 980px; background: var(--bg-2); color: var(--muted); font-size: .78rem; font-weight: 600; }
.backlog .hint { font-size: .82rem; color: var(--muted); margin: 4px 0 12px; }
.add-task { display: flex; gap: 6px; margin-bottom: 12px; }
.add-task input { min-height: 40px; padding: 8px 12px; }
.add-task .btn { height: 40px; }
.cards { list-style: none; margin: 0; padding: 0 2px 2px; display: grid; gap: 8px; overflow-y: auto; }
.card { --c: var(--blue); padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; background: #fff; cursor: grab; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; color: var(--ink); font-weight: 500; font-size: .9rem; display: flex; gap: 8px; align-items: flex-start; }
.card:hover { border-color: var(--blue-line); box-shadow: 0 4px 12px -6px rgba(0,0,0,.18); }
.card .grip { flex: none; width: 10px; height: 16px; margin-top: 2px; background-image: radial-gradient(#b5b5bb 1.2px, transparent 1.3px); background-size: 5px 5px; }
.card .meta { display: block; font-weight: 400; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.empty { color: var(--muted); font-size: .88rem; text-align: center; padding: 18px 8px; border: 1px dashed var(--line); border-radius: 12px; }

/* time grid */
.grid-panel { padding: 0; overflow: hidden; }
.grid-scroll { overflow-x: auto; overflow-y: hidden; }
.grid { display: grid; grid-template-columns: 58px repeat(var(--cols), minmax(var(--colmin, 150px), 1fr)); min-width: min-content; }
.day-head { position: sticky; top: 0; z-index: 3; padding: 12px 12px 10px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; min-height: 74px; }
.day-head .lbl { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.day-head .date { font-weight: 600; color: var(--ink); font-size: 1rem; }
.day-head.is-today .lbl { color: var(--blue); }
.day-head.is-today .date::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); margin-left: 6px; vertical-align: middle; }
.day-head .sum { font-size: .76rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 980px; font-size: .74rem; font-weight: 600; background: var(--amber-soft); color: var(--amber); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.k-seminar { background: #f3ecff; color: #6a2fb5; }
.chip.k-networking { background: #e6f7f9; color: #0b6a78; }
.corner { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 3; }
.gutter { position: relative; height: calc(var(--hours) * var(--hour)); }
.gutter span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.gutter span:first-child { transform: none; top: 2px !important; }
.gutter span:last-child { transform: translateY(-100%); }
.day-col { position: relative; height: calc(var(--hours) * var(--hour)); border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line-2) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2); }
.day-col.off { background-color: #fafafa; background-image: repeating-linear-gradient(135deg, transparent 0 10px, rgba(0,0,0,.035) 10px 20px); }
.day-col.off .off-msg { position: absolute; inset: 40% 12px auto; text-align: center; color: var(--muted); font-size: .85rem; }
.day-col.off .off-msg b { display: block; color: var(--ink); font-size: .95rem; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

.block { --c: var(--blue); position: absolute; left: 4px; right: 4px; z-index: 1; padding: 5px 8px 8px 30px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 40%, #fff); border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); color: var(--ink); overflow: hidden; cursor: grab; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; font-size: .85rem; line-height: 1.25; }
.block:hover { box-shadow: 0 6px 16px -8px rgba(0,60,140,.45); z-index: 2; }
.block .t { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }
.block .tm { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.block .pill { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 980px; font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: #fff; color: var(--c); vertical-align: 1px; }
.block .owner { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block.short .owner { display: inline; margin-right: 4px; }
.block .tick { position: absolute; left: 7px; top: 6px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--c); background: #fff; color: var(--c); cursor: pointer; padding: 0; display: grid; place-items: center; }
.block .tick svg { width: 11px; height: 11px; opacity: 0; }
.block .tick:hover svg { opacity: .35; }
.block .resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.block .resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: rgba(0,0,0,.18); opacity: 0; }
.block:hover .resize::after { opacity: 1; }
.block.short { padding-top: 3px; padding-bottom: 3px; white-space: nowrap; }
.block.short .t { display: inline; }
.block.short .tick { top: 50%; margin-top: -9px; width: 16px; height: 16px; }
.block.done { background: color-mix(in srgb, var(--c) 5%, #fff); border-style: solid; border-color: color-mix(in srgb, var(--c) 25%, #fff); border-left-color: var(--c); }
.block.done .t { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.35); color: var(--body); }
.block.done .pill { background: var(--c); color: #fff; }
.block.done .tick { background: var(--c); border-color: var(--c); }
.block.done .tick svg { opacity: 1; color: #fff; }
.block.dragging { opacity: .35; }
.block.readonly { cursor: default; }
.preview { position: absolute; left: 4px; right: 4px; z-index: 4; border: 2px dashed var(--blue); border-radius: 10px; background: rgba(0,113,227,.08); pointer-events: none; font-size: .75rem; font-weight: 600; color: var(--blue); padding: 3px 8px; }
.preview.bad { border-color: var(--red); background: rgba(215,0,21,.06); color: var(--red); }
.ghost { position: fixed; z-index: 100; pointer-events: none; width: 220px; padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--blue-line); box-shadow: 0 16px 30px -12px rgba(0,0,0,.35); font-size: .88rem; font-weight: 600; color: var(--ink); transform: rotate(-2deg); }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.legend .l-back { border: 1px solid #c7c7cc; background: #fff; }
.legend .l-draft { background: #fff; border: 2px solid #8e8e93; border-radius: 50% !important; }
.legend .l-done { background: #8e8e93; border-radius: 50% !important; }
.legend span > i[style] { border-radius: 50%; }
.legend .l-off { background: repeating-linear-gradient(135deg, #fff 0 3px, #e5e5ea 3px 6px); }

/* dialogs */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); color: var(--body); }
dialog.wide { width: min(760px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(10,15,30,.38); backdrop-filter: blur(2px); }
.dlg { padding: 22px 22px 18px; display: grid; gap: 10px; }
.dlg h2 { font-size: 1.2rem; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dlg label { font-weight: 500; color: var(--ink); font-size: .88rem; }
.dlg .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.dlg .row > div { display: grid; gap: 6px; }
.dlg .actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.dlg .actions .left { margin-right: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.dlg .sub { font-size: .85rem; color: var(--muted); }
.x { border: 0; background: var(--bg-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--muted); }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl td .btn { margin: 2px 0; }
.tbl-wrap { overflow-x: auto; max-height: 340px; overflow-y: auto; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 980px; font-size: .74rem; font-weight: 600; }
.b-on { background: var(--green-soft); color: var(--green); }
.b-inv { background: var(--amber-soft); color: var(--amber); }
.b-off { background: var(--bg-2); color: var(--muted); }
.b-adm { background: var(--blue-soft); color: var(--blue); }
.sep { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 12px; background: #1d1d1f; color: #fff; font-size: .9rem; box-shadow: 0 14px 30px -10px rgba(0,0,0,.5); }
.toast.err { background: #9b0010; }
.toast a { color: #8ec5ff; }
.loading { padding: 60px; text-align: center; color: var(--muted); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .team { max-height: none; }
  .people { max-height: 230px; }
  .cards { max-height: 260px; }
  .top-in, .board { padding-left: 16px; padding-right: 16px; }
  .top-user .who { display: none; }
}
@media (max-width: 520px) {
  .toolbar h1 { width: 100%; }
  .block { padding-left: 26px; }
}

/* ---------- logged time ---------- */
.timep { padding: 14px 16px; flex: none; }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tp-head h2 { font-size: 1.05rem; }
.tp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.tp-stats div { background: var(--bg-2); border-radius: 12px; padding: 8px 10px; }
.tp-stats b { display: block; font-size: 1.25rem; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tp-stats span { font-size: .76rem; color: var(--muted); }
.btn-wide { width: 100%; }
.day-head .sum.logged { color: var(--green); font-weight: 600; }
.block .lg { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 600; color: var(--body); }
.timebox { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; gap: 8px; }
.tb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .9rem; }
.tb-head b { color: var(--ink); }
.logs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 300px; overflow-y: auto; }
.log { border-left: 3px solid var(--line); padding: 4px 0 4px 10px; }
.log-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: .82rem; color: var(--muted); }
.log-head b { color: var(--ink); font-size: .9rem; }
.log-task { color: var(--body); font-weight: 500; }
.log-user { --c: var(--blue); color: var(--c); font-weight: 700; }
.log-note { white-space: pre-wrap; color: var(--ink); font-size: .9rem; margin: 3px 0 0; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--red); font-size: .8rem; cursor: pointer; margin-left: auto; }
.thumbs { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.thumb { position: relative; display: block; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.filechip { position: relative; display: inline-flex; align-items: center; max-width: 220px; padding: 6px 26px 6px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
a.filechip { padding-right: 10px; }
.rm { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: .8rem; line-height: 1; cursor: pointer; }
.evidence { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.evidence label.btn { color: var(--ink); font-weight: 500; }
.ts-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ts-bar input { width: auto; min-height: 36px; padding: 4px 8px; }
.ts-total { margin-left: auto; color: var(--ink); }
.ts-body { max-height: 60vh; overflow-y: auto; display: grid; gap: 14px; }
.ts-day h3 { font-size: .95rem; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 8px; }
.ts-day h3 span { color: var(--green); }
.ts-day .logs { max-height: none; }

/* roles */
.role-sel { min-height: 32px; padding: 4px 26px 4px 8px; width: auto; font-size: .85rem; border-radius: 8px; }
.roles-help { font-size: .85rem; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.roles-help summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.roles-help dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.roles-help dt { font-weight: 600; color: var(--ink); }
.roles-help dd { margin: 0; color: var(--body); }
.card.readonly, .block.readonly { cursor: pointer; }
.block .tick:disabled { cursor: default; }

/* ---------- top tabs ---------- */
.tabs { display: flex; gap: 4px; margin-left: 18px; }
.tabs a { padding: 7px 14px; border-radius: 980px; color: var(--body); font-weight: 500; font-size: .92rem; }
.tabs a:hover { background: var(--bg-2); text-decoration: none; }
.tabs a[aria-current=page] { background: var(--ink); color: #fff; }
@media (max-width: 640px) { .tabs { margin-left: 4px; } .tabs a { padding: 6px 10px; font-size: .85rem; } .top-brand span { display: none; } }

/* ---------- shared files ---------- */
.f-search { width: min(320px, 100%); min-height: 40px; border-radius: 980px; padding: 8px 16px; }
.f-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.f-sections { padding: 14px 10px; position: sticky; top: 76px; }
.f-sections h2 { font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center; padding: 0 6px 8px; }
.f-sections ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.f-sec { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; }
.f-sec:hover { background: var(--bg-2); }
.f-sec.on { background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue-line); }
.f-sec.drop { background: var(--green-soft); box-shadow: inset 0 0 0 2px var(--green); }
.f-sec-txt { min-width: 0; flex: 1; line-height: 1.25; }
.f-sec-txt b { display: block; color: var(--ink); font-size: .92rem; }
.f-sec-txt small { color: var(--muted); font-size: .76rem; }
.f-dot { flex: none; width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.f-dot.big { width: 16px; height: 16px; margin-right: 10px; vertical-align: -1px; border-radius: 5px; }
.f-lock { font-size: .8rem; opacity: .7; }
.f-main { padding: 20px; min-height: 420px; }
.f-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.f-head h2 { font-size: 1.35rem; }
.f-desc { margin: 4px 0 2px; color: var(--body); }
.f-ro { background: var(--bg-2); color: var(--body); }
.dropzone { display: grid; justify-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed #c7c7cc; border-radius: 16px; background: #fbfbfd; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 14px; }
.dropzone:hover, .dragging-files .dropzone { border-color: var(--blue); background: var(--blue-soft); }
.dropzone b { color: var(--ink); font-size: 1.02rem; }
.dropzone u { color: var(--blue); }
.dropzone small { color: var(--muted); font-size: .8rem; }
.dz-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 1.3rem; }
.drop-overlay { display: none; }
.dragging-files .drop-overlay { display: grid; position: fixed; inset: 0; z-index: 150; place-items: center; background: rgba(0,113,227,.12); border: 4px dashed var(--blue); pointer-events: none; }
.drop-overlay div { background: #fff; padding: 20px 30px; border-radius: 18px; box-shadow: var(--shadow); text-align: center; display: grid; gap: 2px; }
.drop-overlay b { color: var(--ink); font-size: 1.2rem; }
.f-queue { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.f-queue:empty { display: none; }
.f-queue li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--bg-2); font-size: .86rem; }
.q-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-meta { color: var(--muted); font-size: .8rem; }
.q-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: #e5e5ea; overflow: hidden; }
.q-bar i { display: block; height: 100%; background: var(--blue); transition: width .2s; }
.q-done .q-bar i { background: var(--green); }
.q-error { background: var(--red-soft) !important; }
.q-error .q-meta { color: var(--red); }
.f-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.f-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .15s; }
.f-card:hover { box-shadow: 0 8px 22px -12px rgba(0,0,0,.3); }
.f-thumb { display: grid; place-items: center; height: 120px; background: var(--bg-2); overflow: hidden; }
.f-thumb img { width: 100%; height: 100%; object-fit: cover; }
.f-badge { display: grid; place-items: center; min-width: 64px; height: 44px; padding: 0 10px; border-radius: 10px; color: #fff; font-weight: 800; letter-spacing: .04em; background: #8e8e93; }
.k-pdf { background: #d70015; } .k-doc { background: #1f5fbf; } .k-sheet { background: #1e7d45; } .k-slides { background: #d2601a; }
.k-video { background: #6a2fb5; } .k-audio { background: #0c8599; } .k-zip { background: #5c5c63; } .k-design { background: #b5267b; } .k-img { background: #0c8599; }
.f-info { padding: 10px 12px 4px; display: grid; gap: 2px; min-width: 0; }
.f-name { color: var(--ink); font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-meta { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-actions { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px 10px; margin-top: auto; }
.f-actions .btn { height: 28px; padding: 0 10px; font-size: .78rem; }
.f-empty { margin-top: 6px; }
@media (max-width: 900px) {
  .f-layout { grid-template-columns: minmax(0, 1fr); }
  .f-sections, .f-main { min-width: 0; }
  .f-main { padding: 14px; }
  .f-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .f-sections { position: static; }
  .f-sections ul { grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); overflow-x: auto; }
}

/* ---------- upcoming ---------- */
.agenda-p { padding: 14px 16px; }
.agenda { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.agenda li { display: flex; align-items: flex-start; gap: 10px; }
.ag-date { flex: none; width: 40px; text-align: center; border-radius: 10px; background: var(--amber-soft); color: var(--amber); font-size: .66rem; font-weight: 700; text-transform: uppercase; padding: 3px 0; line-height: 1.1; }
.ag-date b { display: block; font-size: 1.05rem; }
.ag-ev.k-seminar .ag-date { background: #f3ecff; color: #6a2fb5; }
.ag-ev.k-networking .ag-date { background: #e6f7f9; color: #0b6a78; }
.ag-txt { min-width: 0; flex: 1; line-height: 1.25; }
.ag-txt b { display: block; color: var(--ink); font-size: .88rem; }
.ag-txt small { display: block; color: var(--muted); font-size: .76rem; }
.ag-note { white-space: pre-wrap; }
.ag-tick { flex: none; width: 22px; height: 22px; margin: 2px 9px 0; border-radius: 50%; border: 2px solid #8e8e93; background: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; color: #8e8e93; }
.ag-tick svg { width: 11px; height: 11px; opacity: 0; }
.ag-tick:hover svg { opacity: .6; }
.ag-rem.due .ag-tick { border-color: var(--red); color: var(--red); }
.ag-rem.due .ag-txt small:first-of-type { color: var(--red); font-weight: 600; }
.ag-rem .linkbtn { margin-left: 0; font-size: 1rem; color: var(--muted); }

/* ---------- AI assistant ---------- */
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 90; height: 46px; padding: 0 18px; border: 0; border-radius: 980px; background: linear-gradient(135deg, #0071e3, #7048e8); color: #fff; font-weight: 600; font-size: .95rem; cursor: pointer; box-shadow: 0 12px 28px -10px rgba(60,40,200,.6); }
.ai-fab:hover { filter: brightness(1.08); }
.ai-panel { position: fixed; right: 20px; bottom: 78px; z-index: 95; width: min(400px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px)); display: flex; flex-direction: column; background: #fff; border-radius: 20px; border: 1px solid rgba(0,0,0,.08); box-shadow: 0 30px 70px -20px rgba(0,0,0,.4); overflow: hidden; }
.ai-panel[hidden] { display: none; }
.ai-panel header { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 0 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ai-panel header b { color: var(--ink); }
.ai-panel header small { grid-column: 1; grid-row: 2; color: var(--muted); font-size: .74rem; }
.ai-clear { grid-row: 1 / span 2; color: var(--muted) !important; margin: 0 !important; }
.ai-panel header .x { grid-row: 1 / span 2; }
.ai-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #fafafc; }
.ai-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; white-space: pre-wrap; font-size: .9rem; line-height: 1.4; color: var(--ink); }
.ai-msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.ai-msg.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-msg.thinking { display: flex; gap: 4px; }
.ai-msg.thinking i { width: 7px; height: 7px; border-radius: 50%; background: #b5b5bb; animation: aiDot 1s infinite ease-in-out; }
.ai-msg.thinking i:nth-child(2) { animation-delay: .15s; } .ai-msg.thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip { border: 1px solid var(--blue-line); background: #fff; color: var(--blue); border-radius: 980px; padding: 6px 12px; font-size: .82rem; cursor: pointer; }
.ai-chip:hover { background: var(--blue-soft); }
.ai-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); }
.ai-form textarea { min-height: 40px; max-height: 120px; resize: none; padding: 9px 12px; }
.lbl-row { display: flex; justify-content: space-between; align-items: center; }
.ai-tidy { color: #7048e8 !important; font-weight: 600; margin: 0 !important; font-size: .82rem !important; }
@media (prefers-reduced-motion: reduce) { .ai-msg.thinking i { animation: none; } }
@media (max-width: 520px) { .ai-fab { right: 12px; bottom: 12px; } .ai-panel { right: 16px; bottom: 68px; } }

/* ---------- projects, due dates, create-task wizard ---------- */
.create-btn { height: 40px; box-shadow: 0 8px 18px -10px rgba(0,113,227,.8); }
.card .due { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 980px; background: var(--amber-soft); color: var(--amber); font-size: .72rem; font-weight: 600; }
.card .due.over { background: var(--red-soft); color: var(--red); }
.block .proj { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.block .due-flag { color: var(--amber); }
.block .due-flag.over { color: var(--red); }
.day-col:not(.off) { cursor: copy; }
.ag-dot { flex: none; width: 12px; height: 12px; border-radius: 4px; margin: 4px 14px 0; }
.ag-due.over small { color: var(--red); font-weight: 600; }
.linkish { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; font-size: .88rem; color: var(--ink); text-align: left; cursor: pointer; display: block; }
.linkish:hover { color: var(--blue); text-decoration: underline; }
.ai-chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }

dialog.wizard { width: min(560px, calc(100vw - 32px)); }
.wz-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; counter-reset: s; }
.wz-steps li { display: flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--line); }
.wz-steps li span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-2); font-size: .72rem; }
.wz-steps li.done { color: var(--green); border-top-color: var(--green); }
.wz-steps li.done span { background: var(--green); color: #fff; }
.wz-steps li.on { color: var(--blue); border-top-color: var(--blue); }
.wz-steps li.on span { background: var(--blue); color: #fff; }
.wz-body { display: grid; gap: 8px; min-height: 220px; align-content: start; }
.wz-q { font-size: 1rem; color: var(--ink); font-weight: 600; margin: 6px 0 2px; }
.wz-lbl { font-weight: 500; color: var(--ink); font-size: .88rem; margin-top: 6px; }
.wz-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; padding: 2px; }
.wz-proj { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; font-weight: 500; color: var(--ink); }
.wz-proj:hover { border-color: var(--blue-line); }
.wz-proj.on { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: var(--blue-soft); }
.wz-swatch { flex: none; width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; margin-right: 6px; }
.wz-proj .wz-swatch { margin-right: 0; }
.wz-new { display: grid; gap: 6px; }
.wz-new.on { border: 1px dashed var(--blue-line); border-radius: 14px; padding: 12px; background: #fbfdff; }
.wz-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.wz-color { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.wz-color.on { box-shadow: 0 0 0 2px var(--ink); }
.wz-cancel { justify-self: start; margin: 0 !important; color: var(--muted) !important; }
.wz-review { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; padding: 14px; border-radius: 14px; background: var(--bg-2); }
.wz-review dt { color: var(--muted); font-size: .85rem; }
.wz-review dd { margin: 0; color: var(--ink); font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 520px) { .wz-steps li { font-size: 0; gap: 0; } .wz-steps li span { font-size: .72rem; } .create-btn { width: 100%; } }

[hidden] { display: none !important; }

/* ---------- reviews, approvals, comments ---------- */
.f-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; min-width: 0; }
.f-side .f-sections { position: static; }
.f-count { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 980px; background: var(--bg-2); color: var(--muted); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.f-rev.hot .f-count { background: var(--red); color: #fff; }
.f-ico { flex: none; width: 22px; text-align: center; font-size: .95rem; }
.dragging-card .f-rev, .dragging-card .f-sec { outline: 1px dashed var(--blue-line); outline-offset: -2px; }
.f-prefs { padding: 14px 16px; display: grid; gap: 8px; }
.f-prefs h2 { font-size: 1.05rem; }
.f-prefs .check { font-size: .88rem; align-items: flex-start; }
.f-prefs .check input { margin-top: 2px; }

.st { display: inline-block; padding: 2px 9px; border-radius: 980px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.st-proposed { background: var(--amber-soft); color: var(--amber); }
.st-review { background: var(--blue-soft); color: var(--blue); }
.st-changes { background: var(--red-soft); color: var(--red); }
.st-approved { background: var(--green-soft); color: var(--green); }
.f-thumb { position: relative; }
.f-thumb .st { position: absolute; top: 8px; left: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.st-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.st-tab { border: 1px solid var(--line); background: #fff; border-radius: 980px; padding: 6px 12px; font-size: .84rem; font-weight: 500; cursor: pointer; color: var(--body); display: inline-flex; gap: 6px; align-items: center; }
.st-tab span { color: var(--muted); font-size: .76rem; }
.st-tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.st-tab.on span { color: rgba(255,255,255,.7); }
.dz-wrap { margin-bottom: 14px; }
.dz-wrap .dropzone { margin-bottom: 0; }
.f-info { border: 0; background: none; text-align: left; cursor: pointer; padding: 10px 12px 4px; font: inherit; }
.f-info:hover .f-name { color: var(--blue); }
.f-flags { display: flex; align-items: center; gap: 8px; min-height: 22px; margin-top: 4px; flex-wrap: wrap; }
.f-cm { font-size: .76rem; color: var(--muted); }
.f-you { font-size: .7rem; font-weight: 700; color: #fff; background: var(--red); padding: 1px 8px; border-radius: 980px; }
.f-card.mine { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.avs { display: inline-flex; }
.avs .av { margin-left: -6px; border: 2px solid #fff; }
.avs .av:first-child { margin-left: 0; }
.av { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: .7rem; font-weight: 700; position: relative; }
.av.sm { width: 22px; height: 22px; font-size: .58rem; }
.av.ok::after, .av.chg::after { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; display: grid; place-items: center; font-size: .55rem; color: #fff; border: 1.5px solid #fff; }
.av.ok::after { content: "\2713"; background: var(--green); }
.av.chg::after { content: "!"; background: var(--red); }

.pick-list { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.pick-list.small { max-height: 160px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; font-size: .9rem; }
.pick:hover { background: var(--bg-2); }
.pick input { width: 18px; height: 18px; accent-color: var(--blue); }
.pick b { display: block; color: var(--ink); font-weight: 600; }
.pick small { color: var(--muted); font-size: .76rem; }
.notif-set { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px 12px; display: grid; gap: 8px; margin: 6px 0 0; }
.notif-set legend { font-weight: 600; color: var(--ink); padding: 0 4px; font-size: .9rem; }

dialog.f-detail { width: min(940px, calc(100vw - 32px)); }
.d-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; }
.d-left, .d-right { display: grid; gap: 10px; align-content: start; min-width: 0; }
.d-preview { display: grid; place-items: center; height: 200px; border-radius: 14px; background: var(--bg-2); overflow: hidden; }
.d-preview img { width: 100%; height: 100%; object-fit: contain; }
.f-badge.big { min-width: 96px; height: 64px; font-size: 1.2rem; }
.d-open { display: flex; gap: 6px; }
.d-meta { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: .88rem; }
.d-meta dt { color: var(--muted); }
.d-meta dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.d-revs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.d-revs li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink); }
.d-revs small { color: var(--muted); font-size: .76rem; }
.d-revs small.ok { color: var(--green); font-weight: 600; }
.d-revs small.chg { color: var(--red); font-weight: 600; }
.d-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.d-decide { width: 100%; display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--blue-soft); border: 1px solid var(--blue-line); }
.d-decide b { color: var(--ink); }
.d-decide textarea { min-height: 64px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-approve { background: var(--green); color: #fff; }
.btn-approve:hover { background: #1e7a35; color: #fff; }
.d-history { font-size: .84rem; }
.d-history summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.d-history ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.d-history small { color: var(--muted); }
.d-comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-height: 360px; overflow-y: auto; }
.d-comments li { display: flex; gap: 10px; }
.d-comments li > div { min-width: 0; flex: 1; background: var(--bg-2); border-radius: 4px 14px 14px 14px; padding: 8px 12px; }
.c-head { display: flex; align-items: baseline; gap: 8px; }
.c-head b { color: var(--ink); font-size: .86rem; }
.c-head small { color: var(--muted); font-size: .74rem; }
.c-head .linkbtn { font-size: .74rem; }
.d-comments p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); font-size: .9rem; }
.d-newc { display: grid; gap: 6px; }
.d-newc textarea { min-height: 70px; }
.d-newc .btn { justify-self: end; }

/* ---------- notification bell ---------- */
.bell-slot { position: relative; }
.bell { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; display: grid; place-items: center; }
.bell:hover { border-color: var(--blue); }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 980px; background: var(--red); color: #fff; font-size: .66rem; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.bell-pop { position: absolute; right: 0; top: 46px; z-index: 60; width: min(360px, calc(100vw - 24px)); background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0,0,0,.4); overflow: hidden; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.bell-head b { color: var(--ink); }
.bell-head .linkbtn { color: var(--blue); margin: 0; }
.bell-list { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow-y: auto; }
.bell-list a { display: grid; gap: 2px; padding: 10px 14px; color: var(--body); font-size: .86rem; border-bottom: 1px solid var(--line-2); }
.bell-list a:hover { background: var(--bg-2); text-decoration: none; }
.bell-list li.unread a { background: var(--blue-soft); color: var(--ink); font-weight: 500; }
.bell-list small { color: var(--muted); font-size: .74rem; }
.bell-empty { padding: 18px 14px; color: var(--muted); font-size: .86rem; }

@media (max-width: 900px) {
  .f-side { position: static; }
  .d-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) { .bell-pop { position: fixed; right: 12px; top: 60px; } }

/* ---------- board (kanban) and table views ---------- */
.layout-seg button { white-space: nowrap; }
.kb { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; align-items: start; padding-bottom: 6px; }
.kb-col { padding: 0; display: flex; flex-direction: column; min-height: 220px; max-height: calc(100vh - 170px); transition: box-shadow .15s, background .15s; }
.kb-col.drop { box-shadow: 0 0 0 2px var(--blue); background: var(--blue-soft); }
.kb-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
.kb-head h2 { font-size: 1.05rem; }
.kb-head small { grid-column: 1 / -1; color: var(--muted); font-size: .8rem; }
.kb-list { list-style: none; margin: 0; padding: 12px; display: grid; gap: 10px; overflow-y: auto; align-content: start; }
.kb-card { --c: var(--blue); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; cursor: pointer; }
.kb-card[draggable=true] { cursor: grab; }
.kb-card:hover { box-shadow: 0 8px 18px -12px rgba(0,0,0,.35); }
.kb-card.dragging { opacity: .4; }
.kb-card.done .kb-title { text-decoration: line-through; text-decoration-color: rgba(0,0,0,.3); color: var(--body); }
.kb-card.mine { border-color: var(--red); border-left-color: var(--red); }
.kb-title { font-weight: 600; color: var(--ink); font-size: .92rem; display: flex; gap: 8px; align-items: center; overflow-wrap: anywhere; }
.kb-meta { font-size: .78rem; color: var(--muted); }
.kb-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.kb-tags:empty { display: none; }
.kb-proj { --pc: var(--blue); font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 980px; background: color-mix(in srgb, var(--pc) 14%, #fff); color: var(--pc); }
.kb-who { font-size: .7rem; font-weight: 600; padding: 1px 8px; border-radius: 980px; background: var(--bg-2); color: var(--body); }
.kb-tags .due { display: inline-block; padding: 1px 8px; border-radius: 980px; background: var(--amber-soft); color: var(--amber); font-size: .7rem; font-weight: 600; }
.kb-tags .due.over { background: var(--red-soft); color: var(--red); }
.kb-empty { color: var(--muted); font-size: .85rem; text-align: center; padding: 18px 6px; border: 1px dashed var(--line); border-radius: 12px; }
.kb-add { margin: 0 12px 12px; }
.kb-backlog .kb-head { border-top: 4px solid #8e8e93; border-radius: 18px 18px 0 0; }
.kb-draft .kb-head { border-top: 4px solid var(--blue); border-radius: 18px 18px 0 0; }
.kb-done .kb-head { border-top: 4px solid var(--green); border-radius: 18px 18px 0 0; }
.f-kb { grid-auto-columns: minmax(220px, 1fr); }
.f-kb .kb-col { max-height: none; }
.fk-proposed .kb-head { border-top: 4px solid var(--amber); border-radius: 18px 18px 0 0; }
.fk-review .kb-head { border-top: 4px solid var(--blue); border-radius: 18px 18px 0 0; }
.fk-changes .kb-head { border-top: 4px solid var(--red); border-radius: 18px 18px 0 0; }
.fk-approved .kb-head { border-top: 4px solid var(--green); border-radius: 18px 18px 0 0; }
.f-kbcard { border-left-width: 1px; }
.f-badge.mini { min-width: 0; height: 20px; padding: 0 6px; border-radius: 6px; font-size: .6rem; display: inline-grid; flex: none; vertical-align: middle; margin-right: 8px; }
.kb-title .f-badge.mini { margin-right: 0; }

.f-layout-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 4px 0 12px; flex-wrap: wrap; }
.tt { padding: 0; overflow: hidden; }
.tt-wrap { max-height: none; }
.tt-tbl th { white-space: nowrap; position: sticky; top: 0; background: #fff; z-index: 1; }
.tt-tbl tbody tr { cursor: pointer; }
.tt-tbl tbody tr:hover { background: var(--bg-2); }
.tt-tbl tbody tr.mine { background: var(--red-soft); }
.tt-tbl td { white-space: nowrap; }
.tt-tbl td:first-child { white-space: normal; min-width: 220px; }
.tt-tbl td b { color: var(--ink); font-weight: 600; }
.th-sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.th-sort:hover { color: var(--ink); }
.tt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.tt-backlog { background: var(--bg-2); color: var(--muted); }
.tt-draft { background: var(--blue-soft); color: var(--blue); }
.tt-done { background: var(--green-soft); color: var(--green); }
.tt-over { color: var(--red); font-weight: 600; }
.tt-tbl .f-you { margin-left: 8px; }

/* ---------- settings page ---------- */
.settings-page { max-width: 980px; }
.set-form { display: grid; gap: 16px; }
.set-group { padding: 18px 20px; }
.set-group h2 { font-size: 1.1rem; margin-bottom: 6px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px 24px; padding: 12px 0; border-top: 1px solid var(--line-2); align-items: center; }
.set-row:first-of-type { border-top: 0; }
.set-lbl { display: grid; gap: 2px; }
.set-lbl label { font-weight: 600; color: var(--ink); }
.set-lbl small { color: var(--muted); font-size: .82rem; }
.set-lbl small.warn { color: var(--amber); font-weight: 600; }
.set-in { display: grid; gap: 4px; }
.set-in input[type=number], .set-in input[type=time], .set-in select { max-width: 220px; }
.set-def { color: var(--muted); font-size: .76rem; }
.days { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { display: inline-grid; place-items: center; min-width: 46px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--body); }
.day-chip input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.day-chip input:focus-visible + span { outline: 3px solid #2997ff; outline-offset: 2px; }
.set-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg-2) 35%); }
.set-actions .sub { margin-right: auto; }
.set-info ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.set-info code { background: var(--bg-2); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
@media (max-width: 720px) { .set-row { grid-template-columns: minmax(0, 1fr); } .kb { grid-auto-columns: minmax(240px, 85%); } }
.settings-page .set-actions { padding-right: 140px; }
@media (max-width: 520px) { .settings-page .set-actions { padding-right: 0; padding-bottom: 70px; } }

/* ---------- thumbnails ---------- */
.thumb-box { display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; background: var(--bg-2); }
.thumb-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-box.tk-pdf img, .thumb-box.tk-doc img { object-fit: cover; object-position: top; }
.f-thumb .thumb-box { position: absolute; inset: 0; }
.kb-thumb { position: relative; display: block; height: 130px; margin: -10px -12px 4px; border-radius: 11px 11px 0 0; overflow: hidden; background: var(--bg-2); }
.kb-ext { position: absolute; right: 8px; bottom: 8px; padding: 1px 7px; border-radius: 6px; color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .04em; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.kb-ext.k-other { background: #8e8e93; }
.kb-thumb .thumb-box .f-badge { min-width: 70px; height: 48px; font-size: 1rem; }
.f-kbcard { padding-top: 10px; }
.thumb-box.tiny { display: inline-grid; width: 40px; height: 40px; border-radius: 8px; vertical-align: middle; margin-right: 10px; flex: none; border: 1px solid var(--line); }
.thumb-box.tiny .f-badge { min-width: 0; height: 22px; padding: 0 5px; font-size: .55rem; border-radius: 5px; }
.tt-file { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.thumb-box.big { height: 100%; }
.thumb-box.big .f-badge { min-width: 96px; height: 64px; font-size: 1.2rem; }
.d-preview .thumb-box img { object-fit: contain; }
.kb-photo { display: block; height: 110px; margin: -10px -12px 4px -12px; border-radius: 0 11px 0 0; overflow: hidden; background: var(--bg-2); }
.kb-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- touch: press and hold to pick a task up ---------- */
.block.lifted, .card.lifted { transform: scale(1.04); box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); z-index: 5; transition: transform .15s, box-shadow .15s; }
@media (pointer: coarse) {
  .block .resize { height: 16px; }
  .block .resize::after { opacity: .6; }
}

/* ---------- button feedback: spinner, then a quick tick ---------- */
.btn.is-busy, .btn.is-done { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.55); border-top-color: #fff; animation: btnSpin .6s linear infinite; }
.btn-ghost.is-busy::after { border-color: rgba(0,0,0,.15); border-top-color: var(--blue); }
.btn.is-done { background: var(--green) !important; border-color: var(--green) !important; }
.btn.is-done::after { content: "\2713"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.05rem;
  animation: btnTick .3s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes btnSpin { to { transform: rotate(360deg); } }
@keyframes btnTick { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .btn.is-busy::after, .btn.is-done::after { animation: none; } }

/* ---------- viewer ---------- */
dialog.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border-radius: 0; background: #16161a; color: #fff; display: flex; flex-direction: column; box-shadow: none; }
dialog.viewer:not([open]) { display: none; }
dialog.viewer::backdrop { background: rgba(0,0,0,.85); }
.vw-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(0,0,0,.35); border-bottom: 1px solid rgba(255,255,255,.08); flex-wrap: wrap; }
.vw-title { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 200px; }
.vw-count { color: rgba(255,255,255,.6); font-size: .85rem; white-space: nowrap; }
.vw-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.vw-btn { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; font-size: 1rem; cursor: pointer; }
.vw-btn:hover { background: rgba(255,255,255,.14); }
.vw-fit { font-size: .82rem; }
.vw-zoom { min-width: 46px; text-align: center; font-size: .82rem; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.vw-dl { color: #fff !important; border-color: rgba(255,255,255,.25) !important; background: rgba(255,255,255,.06) !important; }
.vw-close { font-size: 1.3rem; }
.vw-body { flex: 1; overflow: auto; display: grid; place-items: center; padding: 16px; outline: none; -webkit-overflow-scrolling: touch; }
.vw-image img { max-width: 100%; max-height: calc(100vh - 100px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px -20px rgba(0,0,0,.8); cursor: zoom-in; }
.vw-image img.zoomed { max-width: none; max-height: none; cursor: zoom-out; }
.vw-body.vw-image:has(img.zoomed) { place-items: start; }
.vw-video video, .vw-audio audio { max-width: 100%; max-height: calc(100vh - 100px); border-radius: 8px; background: #000; }
.vw-pdf { place-items: start center; }
.vw-pages { display: grid; gap: 14px; justify-items: center; padding-bottom: 40px; }
.vw-page { background: #fff; box-shadow: 0 10px 30px -12px rgba(0,0,0,.7); max-width: none; }
.vw-page canvas { display: block; }
.vw-msg { color: rgba(255,255,255,.8); text-align: center; display: grid; gap: 14px; justify-items: center; }
.vw-msg b { color: #fff; }
.vw-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 64px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; font-size: 2rem; cursor: pointer; z-index: 2; }
.vw-nav:hover { background: rgba(255,255,255,.22); }
.vw-prev { left: 12px; } .vw-next { right: 12px; }
@media (max-width: 640px) {
  .vw-head { padding: 8px 10px; gap: 6px; }
  .vw-title { flex-basis: 100%; }
  .vw-tools { margin-left: 0; width: 100%; justify-content: flex-end; }
  .vw-nav { width: 38px; height: 52px; font-size: 1.6rem; top: auto; bottom: 16px; transform: none; }
  .vw-body { padding: 10px; }
}
.f-thumb, .d-preview { cursor: zoom-in; }

/* WhatsApp in the bell, exact times, members' numbers */
.bell-wa { border-top: 1px solid var(--line, #e3e8f2); padding: 10px 14px; font-size: 13px; }
.bell-wa-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bell-wa-form { display: grid; gap: 6px; }
.bell-wa-form input[type=tel] { width: 100%; }
.bell-wa-form .check { display: flex; gap: 6px; align-items: center; font-weight: 500; }
.bell-wa-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bell-wa-msg { margin: 0; font-size: 12px; color: var(--muted, #6b7690); }
.bell-wa-msg:empty { display: none; }
.done-at { font-size: 11px; font-weight: 600; color: #2b8a3e; white-space: nowrap; }
.phone-cell { display: inline-flex; gap: 6px; align-items: center; }
.phone-in { width: 150px; }
