/* style.css */
:root{--bg:#f5f6fa;--panel:#fff;--ink:#1c2030;--muted:#85899a;--line:#e9eaf0;--purple:#625bf6;--purple-dark:#5049e7;--mint:#dff5eb;--red:#e26069;--shadow:0 14px 40px rgba(28,32,48,.07)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}h1,h2,h3,h4,p{margin-top:0}h1,h2,h3,h4,.brand{font-family:Inter,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}.shell{min-height:100vh;display:flex}.sidebar{width:248px;background:#fff;border-right:1px solid var(--line);padding:25px 16px 16px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;z-index:3}.brand{display:flex;gap:11px;align-items:center;text-decoration:none;color:var(--ink);font-size:16px;font-weight:800;padding:0 10px 34px}.brand small{display:block;color:var(--muted);font:11px Inter;font-weight:500;margin-top:2px}.brand-mark{background:var(--purple);color:white;width:32px;height:32px;border-radius:11px;display:grid;place-items:center;font:800 20px Inter}.workspace-label,.eyebrow{font-size:10px;letter-spacing:.12em;color:#a0a3b1;font-weight:700}.workspace-label{padding:0 10px 12px}.nav-item{width:100%;border:0;background:transparent;border-radius:10px;text-align:left;color:#777b8a;padding:11px 12px;margin:2px 0;display:flex;align-items:center;gap:12px;font-weight:600}.nav-item:hover{background:#f7f7fb;color:var(--ink)}.nav-item.active{background:#efefff;color:var(--purple)}.nav-icon{font-size:17px;width:19px;text-align:center}.sidebar-spacer{flex:1}.side-note{display:flex;gap:10px;align-items:center;padding:13px 11px;border-top:1px solid var(--line);margin-top:10px}.side-note strong,.side-note small{display:block;font-size:11px}.side-note small{color:var(--muted);margin-top:3px}.status-dot{width:8px;height:8px;background:#32b87a;border-radius:50%}.logout{font-size:12px}.main{margin-left:248px;min-width:0;width:calc(100% - 248px)}.topbar{height:72px;background:rgba(255,255,255,.84);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:2;backdrop-filter:blur(12px)}.breadcrumb{display:flex;gap:10px;align-items:center;color:#9a9daa;font-size:12px}.breadcrumb b{font-weight:400;color:#d5d6de}.breadcrumb strong{color:#333747;font-weight:600}.top-actions{display:flex;gap:12px;align-items:center}.searchbox{height:36px;border:1px solid var(--line);border-radius:9px;background:#fff;display:flex;align-items:center;padding:0 9px;gap:7px;color:#a1a3af}.searchbox input{border:0;outline:0;width:150px;font-size:12px}.searchbox kbd{font-size:9px;border:1px solid var(--line);border-radius:4px;padding:2px 4px;color:#a1a3af}.button{border:0;border-radius:9px;padding:10px 14px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:.15s}.button.primary{background:var(--purple);color:#fff;box-shadow:0 5px 12px rgba(98,91,246,.18)}.button.primary:hover{background:var(--purple-dark);transform:translateY(-1px)}.button.ghost{background:#f3f3f7;color:#55596a}.button.small{padding:7px 10px;font-size:12px}.button.full{width:100%;margin-top:8px}.avatar{border:0;background:#ebeaff;color:var(--purple);font-weight:800;width:34px;height:34px;border-radius:50%}.view{padding:32px 36px 60px;max-width:1500px;margin:0 auto}.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin-bottom:25px}.page-head h1{font-size:26px;margin-bottom:5px;letter-spacing:-.04em}.page-head p{color:var(--muted);margin:0;font-size:13px}.eyebrow{margin-bottom:8px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:23px}.stat-card,.panel,.column,.doc-card,.deal-card,.contact-card{background:var(--panel);border:1px solid var(--line);border-radius:14px}.stat-card{padding:17px 19px}.stat-top{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.stat-icon{width:28px;height:28px;display:grid;place-items:center;background:#f1f0ff;color:var(--purple);border-radius:8px;font-size:15px}.stat-value{font:700 26px Inter;margin:14px 0 2px}.stat-foot{font-size:11px;color:#a0a2af}.dashboard-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:16px}.panel{padding:19px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.panel-head h3{font-size:14px;margin:0}.text-link{border:0;background:none;color:var(--purple);font-size:12px;font-weight:700}.task-row{display:grid;grid-template-columns:18px 1fr auto;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #f0f0f4}.task-row:last-child{border:0}.check{width:16px;height:16px;border:1.5px solid #c9cbd5;border-radius:5px;display:grid;place-items:center;background:white;padding:0;color:white}.check.done{background:#53c995;border-color:#53c995}.task-title{font-size:12px;font-weight:600}.task-meta{font-size:10px;color:var(--muted);margin-top:5px}.pill{font-size:10px;padding:5px 8px;border-radius:20px;background:#f2f2f6;color:#777b8b;white-space:nowrap}.pill.purple{background:#efefff;color:#625bf6}.pill.green{background:#e5f8ef;color:#309767}.pill.orange{background:#fff2df;color:#c27d21}.pill.red{background:#fff0f0;color:#d8555f}.columns{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:13px;align-items:start;overflow:auto;padding-bottom:12px}.column{padding:12px;background:#f8f8fb;min-height:250px}.column-head{display:flex;align-items:center;justify-content:space-between;padding:3px 3px 12px;font-size:12px;font-weight:700}.count{font-size:10px;background:#ececf2;border-radius:10px;padding:3px 7px;color:#858899}.task-card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px;margin:0 0 8px;box-shadow:0 2px 5px rgba(20,20,40,.025);cursor:grab}.task-card:active{cursor:grabbing}.task-card h4{font:600 12px Inter;margin:0 0 8px;line-height:1.45}.task-card p{font-size:11px;color:var(--muted);line-height:1.5;margin:0 0 9px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.card-foot{display:flex;justify-content:space-between;align-items:center;color:var(--muted);font-size:10px}.board-toolbar{display:flex;gap:8px;align-items:center;margin-bottom:14px}.select,select,input,textarea{border:1px solid var(--line);background:#fff;border-radius:8px;padding:10px 11px;color:var(--ink);outline:none}.select:focus,input:focus,textarea:focus{border-color:#aaa5ff;box-shadow:0 0 0 3px rgba(98,91,246,.09)}.board-toolbar select{font-size:12px;padding:8px}.calendar-wrap{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px}.calendar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px}.calendar-head h2{font-size:16px;margin:0}.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--line);border-left:1px solid var(--line)}.cal-cell{min-height:110px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:8px}.cal-weekday{min-height:auto;text-align:center;color:var(--muted);font-size:10px;font-weight:700;padding:10px}.cal-day{font-size:11px;color:#65697b}.cal-day.today{width:22px;height:22px;background:var(--purple);color:white;border-radius:50%;display:grid;place-items:center}.cal-item{font-size:9px;line-height:1.35;background:#efefff;color:#5e58dd;border-radius:5px;padding:4px 5px;margin-top:5px;overflow:hidden}.cal-item.done{background:#e7f7ee;color:#398a62}.doc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.doc-card{padding:17px;cursor:pointer;min-height:145px;transition:.15s}.doc-card:hover,.contact-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.doc-icon{width:31px;height:31px;background:#f0efff;color:var(--purple);display:grid;place-items:center;border-radius:9px;margin-bottom:15px}.doc-card h3{font:700 14px Inter;margin-bottom:7px}.doc-card p{font-size:11px;line-height:1.55;color:var(--muted);display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.doc-date{font-size:10px;color:#a1a3af}.crm-layout{display:grid;grid-template-columns:1.2fr 1fr;gap:16px}.pipeline{display:grid;grid-template-columns:repeat(4,minmax(140px,1fr));gap:10px;overflow:auto}.stage-column{background:#f7f7fa;border-radius:11px;padding:10px;min-height:220px}.stage-title{font-size:11px;font-weight:700;margin:2px 3px 10px;display:flex;justify-content:space-between}.deal-card{padding:11px;margin-bottom:8px;cursor:pointer}.deal-card h4{font:600 11px Inter;margin:0 0 9px}.deal-amount{font:700 13px Inter;color:#413e9f}.deal-contact{color:var(--muted);font-size:10px;margin-top:6px}.contact-list{display:grid;gap:8px}.contact-card{padding:11px 13px;display:flex;justify-content:space-between;align-items:center;transition:.15s}.contact-name{font-weight:700;font-size:12px}.contact-company,.contact-email{font-size:10px;color:var(--muted);margin-top:3px}.empty{padding:22px;text-align:center;color:var(--muted);font-size:12px}.modal{border:0;border-radius:16px;padding:0;width:min(540px,calc(100vw - 28px));box-shadow:0 25px 80px rgba(18,20,40,.2)}.modal::backdrop{background:rgba(24,25,39,.35);backdrop-filter:blur(2px)}.modal form{padding:22px}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:20px}.modal-head h2{margin:0;font-size:19px}.icon-button{border:0;background:#f4f4f7;border-radius:8px;width:30px;height:30px;font-size:20px;color:#777}.form-fields{display:grid;gap:13px;max-height:min(62vh,520px);overflow:auto;padding-right:2px}.form-fields label,.login-card label{display:grid;gap:6px;font-size:11px;color:#686c7c;font-weight:700}.form-fields input,.form-fields select,.form-fields textarea,.login-card input{width:100%;font-size:13px}.form-fields textarea{min-height:100px;resize:vertical;line-height:1.5}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.toast{position:fixed;bottom:22px;left:50%;transform:translate(-50%,20px);background:#25283a;color:white;border-radius:10px;padding:11px 16px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;z-index:9}.toast.show{opacity:1;transform:translate(-50%,0)}.login-screen{min-height:100vh;display:grid;place-items:center;padding:18px;background:radial-gradient(circle at 80% 15%,#e9e8ff,transparent 29%),var(--bg)}.login-card{width:min(390px,100%);background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);padding:32px;border-radius:18px}.login-card .brand-mark{margin-bottom:21px}.login-card h1{font-size:23px;margin-bottom:6px}.login-card .muted{color:var(--muted);font-size:12px;margin-bottom:23px}.login-card label{margin-bottom:13px}.login-card input{margin-top:2px}.error{color:#d8555f;font-size:11px;min-height:14px}.search-results{position:absolute;right:170px;top:60px;background:white;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:10px;width:340px;padding:8px;z-index:5}.search-result{padding:9px;border-radius:7px;font-size:12px;cursor:pointer}.search-result:hover{background:#f4f3ff}.muted{color:var(--muted)}
@media(max-width:1050px){.sidebar{width:215px}.main{margin-left:215px;width:calc(100% - 215px)}.view{padding:26px 24px}.stats{grid-template-columns:repeat(2,1fr)}.doc-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:720px){.sidebar{position:fixed;inset:auto 0 0;width:100%;height:62px;padding:5px 6px;background:#fff;border:0;border-top:1px solid var(--line);display:block}.brand,.workspace-label,.side-note,.logout{display:none}.sidebar nav{display:flex;justify-content:space-around;height:100%}.nav-item{width:auto;flex:1;display:flex;flex-direction:column;gap:2px;justify-content:center;padding:5px 3px;font-size:9px;margin:0}.nav-icon{font-size:18px}.main{margin:0;width:100%;padding-bottom:62px}.topbar{height:58px;padding:0 14px}.breadcrumb{font-size:10px}.top-actions{gap:7px}.searchbox{width:35px;border:0;background:transparent;padding:0}.searchbox input,.searchbox kbd{display:none}.searchbox span{font-size:22px}.top-actions .button{padding:8px 10px;font-size:11px}.avatar{width:30px;height:30px}.view{padding:23px 14px 32px}.page-head{align-items:center;margin-bottom:18px}.page-head h1{font-size:21px}.page-head p{font-size:11px}.stats{gap:8px}.stat-card{padding:13px}.stat-value{font-size:21px}.stat-top{font-size:10px}.dashboard-grid,.crm-layout{grid-template-columns:1fr}.columns{grid-template-columns:repeat(3,minmax(235px,1fr));margin-right:-14px}.doc-grid{grid-template-columns:1fr 1fr;gap:8px}.doc-card{padding:13px;min-height:140px}.doc-card h3{font-size:12px}.doc-card p{font-size:10px}.calendar-wrap{padding:8px}.cal-cell{min-height:78px;padding:4px}.cal-item{font-size:8px;padding:3px}.cal-weekday{font-size:9px}.search-results{right:15px;top:52px;width:min(340px,calc(100vw - 30px))}}
@media(max-width:380px){.doc-grid{grid-template-columns:1fr}.top-actions .button{font-size:0}.top-actions .button span{font-size:17px}.stats{grid-template-columns:1fr 1fr}}

@media(max-width:720px){.searchbox.open{position:absolute;left:14px;right:114px;width:auto;height:40px;border:1px solid var(--line);background:#fff;padding:0 9px;z-index:6;box-shadow:var(--shadow)}.searchbox.open input{display:block;width:100%;min-width:0;background:transparent}.searchbox.open kbd{display:none}}

/* visual-assets.css */
/* Inter files match the font files served by https://weeek.net/ru. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('/static/fonts/Inter-Regular.woff2') format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url('/static/fonts/Inter-Medium.woff2') format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 600;
  font-display: block;
  src: url('/static/fonts/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 700;
  font-display: block;
  src: url('/static/fonts/Inter-Bold.woff2') format('woff2');
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 800;
  font-display: block;
  src: url('/static/fonts/Inter-ExtraBold.woff2') format('woff2');
}

/* Lucide SVGs are bundled locally; their ISC license is in icons/LICENSE.txt. */
.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: none;
  background-color: currentColor;
  -webkit-mask-image: var(--icon-url);
  mask-image: var(--icon-url);
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  vertical-align: middle;
}
.icon-layout-dashboard { --icon-url: url('/static/icons/layout-dashboard.svg'); }
.icon-square-kanban { --icon-url: url('/static/icons/square-kanban.svg'); }
.icon-calendar-days { --icon-url: url('/static/icons/calendar-days.svg'); }
.icon-notebook-text { --icon-url: url('/static/icons/notebook-text.svg'); }
.icon-handshake { --icon-url: url('/static/icons/handshake.svg'); }
.icon-log-out { --icon-url: url('/static/icons/log-out.svg'); }
.icon-search { --icon-url: url('/static/icons/search.svg'); }
.icon-plus { --icon-url: url('/static/icons/plus.svg'); }
.icon-x { --icon-url: url('/static/icons/x.svg'); }
.icon-arrow-right { --icon-url: url('/static/icons/arrow-right.svg'); }
.icon-chevron-left { --icon-url: url('/static/icons/chevron-left.svg'); }
.icon-chevron-right { --icon-url: url('/static/icons/chevron-right.svg'); }
.icon-chevron-down { --icon-url: url('/static/icons/chevron-down.svg'); }
.icon-chevron-up { --icon-url: url('/static/icons/chevron-up.svg'); }
.icon-check { --icon-url: url('/static/icons/check.svg'); }
.icon-list-todo { --icon-url: url('/static/icons/list-todo.svg'); }
.icon-folder-kanban { --icon-url: url('/static/icons/folder-kanban.svg'); }
.icon-file-text { --icon-url: url('/static/icons/file-text.svg'); }
.icon-panel-left-close { --icon-url: url('/static/icons/panel-left-close.svg'); }
.icon-panel-left-open { --icon-url: url('/static/icons/panel-left-open.svg'); }
.icon-settings { --icon-url: url('/static/icons/settings.svg'); }
.icon-ellipsis { --icon-url: url('/static/icons/ellipsis.svg'); }
.icon-maximize-2 { --icon-url: url('/static/icons/maximize-2.svg'); }
.icon-minimize-2 { --icon-url: url('/static/icons/minimize-2.svg'); }
.icon-paperclip { --icon-url: url('/static/icons/paperclip.svg'); }
.icon-link-2 { --icon-url: url('/static/icons/link-2.svg'); }
.icon-clock-3 { --icon-url: url('/static/icons/clock-3.svg'); }
.icon-history { --icon-url: url('/static/icons/history.svg'); }
.icon-sun { --icon-url: url('/static/icons/sun.svg'); }
.icon-moon { --icon-url: url('/static/icons/moon.svg'); }
.icon-play { --icon-url: url('/static/icons/play.svg'); }
.icon-square { --icon-url: url('/static/icons/square.svg'); }
.icon-circle-check { --icon-url: url('/static/icons/circle-check.svg'); }
.icon-user-round { --icon-url: url('/static/icons/user-round.svg'); }
.icon-tag { --icon-url: url('/static/icons/tag.svg'); }
.icon-list-checks { --icon-url: url('/static/icons/list-checks.svg'); }

.nav-icon { width: 18px; height: 18px; }
.searchbox .icon { width: 16px; height: 16px; }
.button .icon, .text-link .icon { width: 16px; height: 16px; }
.text-link .icon { margin-left: 2px; }
.stat-icon .icon { width: 16px; height: 16px; }
.doc-icon .icon { width: 18px; height: 18px; }
.check .icon { width: 12px; height: 12px; }
.icon-button { display: grid; place-items: center; }
.icon-button .icon { width: 18px; height: 18px; }
.calendar-head .icon-only { width: 32px; height: 32px; padding: 0; }
.calendar-head .icon-only .icon { width: 16px; height: 16px; }
.breadcrumb { min-width: 0; white-space: nowrap; }
.breadcrumb strong { overflow: hidden; text-overflow: ellipsis; }
.page-head .button, .top-actions .button { flex: none; white-space: nowrap; }

@media (max-width: 850px) {
  .breadcrumb > span, .breadcrumb > b { display: none; }
}
@media (max-width: 500px) {
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
}

/* polish.css */
:root {
  --control-height: 44px;
  --ease-out: cubic-bezier(.22, .72, .16, 1);
  --soft-shadow: 0 10px 30px rgba(34, 35, 74, .055);
}

.brand-mark {
  background: linear-gradient(145deg, #7770ff 0%, #625bf6 55%, #4e47dc 100%);
  box-shadow: 0 7px 18px rgba(98, 91, 246, .22), inset 0 1px rgba(255, 255, 255, .25);
  font-size: 19px;
  letter-spacing: -.08em;
}
.brand-name { line-height: 1.05; white-space: nowrap; }
.brand-name em { color: var(--purple); font-style: normal; }
.brand-name small { letter-spacing: .01em; }
.mobile-brand { display: none; }

.main, .view, .stats, .dashboard-grid, .crm-layout,
.dashboard-grid > .panel, .crm-layout > .panel,
.columns, .column, .pipeline, .stage-column { min-width: 0; }
.view { width: 100%; }
.stat-card, .panel, .column, .doc-card, .deal-card, .contact-card {
  border-radius: 15px;
}
.stat-card, .panel, .doc-card {
  box-shadow: var(--soft-shadow);
}
.stats { grid-auto-rows: minmax(132px, auto); }
.stat-card { min-height: 132px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); }
.dashboard-grid > .panel { min-height: 250px; }
.doc-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.doc-card { min-height: 180px; }

.columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: visible;
  margin-right: 0;
  gap: 14px;
}
.column { min-height: 260px; padding: 14px; }
.task-card {
  min-height: 146px;
  border-radius: 12px;
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out), border-color 180ms ease;
}
.task-card:focus-within { border-color: #b9b5ff; }

.crm-layout { grid-template-columns: minmax(0, 1.45fr) minmax(290px, 1fr); align-items: stretch; }
.crm-layout > .panel:first-child { container-type: inline-size; }
.pipeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
  align-items: stretch;
}
.stage-column { min-width: 0; min-height: 260px; padding: 12px; }
.stage-title { gap: 6px; }
.stage-title span:first-child { min-width: 0; overflow-wrap: anywhere; }
.deal-card { min-width: 0; overflow-wrap: anywhere; }
.contact-card { min-height: 76px; gap: 12px; }
.contact-card > div { min-width: 0; overflow-wrap: anywhere; }
.crm-layout > .panel:last-child { display: flex; flex-direction: column; min-height: 260px; }
.contact-list { min-width: 0; flex: 1; align-content: start; }
.contact-list:has(> .empty) { align-content: center; }
@container (max-width: 900px) {
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (max-width: 400px) {
  .pipeline { grid-template-columns: minmax(0, 1fr); }
}

.nav-item {
  min-height: 44px;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}
.nav-icon {
  transition: transform 220ms var(--ease-out), opacity 180ms ease;
  transform-origin: center;
}
.nav-item:focus-visible, .button:focus-visible, .text-link:focus-visible,
.icon-button:focus-visible, .select-trigger:focus-visible, .select-option:focus-visible,
.task-card:focus-visible {
  outline: 2px solid #8d87ff;
  outline-offset: 2px;
}
.button {
  transition: transform 160ms var(--ease-out), box-shadow 180ms ease, background-color 180ms ease;
}
.button:active { transform: scale(.97); }
.text-link { display: inline-flex; align-items: center; gap: 4px; }

.modal {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(24, 26, 53, .22);
  overflow: visible;
}
.modal form { padding: 25px; }
.modal-head { margin-bottom: 21px; }
.modal-head h2 { font-size: 21px; letter-spacing: -.025em; }
.form-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-height: calc(100dvh - 245px);
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
  scrollbar-width: thin;
}
.form-fields > * { min-width: 0; }
.form-fields[data-kind="tasks"] > :nth-child(-n+2),
.form-fields[data-kind="documents"] > *,
.form-fields[data-kind="projects"] > :first-child,
.form-fields[data-kind="deals"] > :first-child {
  grid-column: 1 / -1;
}
.form-fields label, .form-field label, .login-card label {
  font-size: 12px;
  font-weight: 650;
  color: #5e6374;
}
.form-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.form-fields input, .form-fields textarea, .login-card input {
  min-height: var(--control-height);
  border-radius: 10px;
  padding: 10px 13px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.form-fields textarea { min-height: 112px; }
.form-fields[data-kind="documents"] textarea { min-height: 190px; }
.modal-actions {
  margin-top: 19px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.modal-actions .button { min-height: 40px; }
.icon-button { width: 34px; height: 34px; border-radius: 9px; }
.icon-button:hover { background: #ebebf3; color: var(--ink); }
.modal[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
  @starting-style { opacity: 0; transform: translateY(10px) scale(.985); }
}
.modal::backdrop { background: rgba(24, 25, 39, .42); backdrop-filter: blur(3px); }

.select-control { position: relative; min-width: 0; width: 100%; }
.select-trigger {
  width: 100%;
  min-height: var(--control-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}
.select-trigger:hover { border-color: #cbc8e8; background: #fdfdff; }
.select-control.is-open .select-trigger,
.select-trigger:focus-visible { border-color: #9d98f8; box-shadow: 0 0 0 3px rgba(98, 91, 246, .1); }
.select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger .icon { width: 16px; height: 16px; color: #818597; transition: transform 180ms var(--ease-out); }
.select-control.is-open .select-trigger .icon { transform: rotate(180deg); }
.select-menu {
  position: fixed;
  z-index: 100;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #e5e5ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(29, 30, 59, .16), 0 3px 10px rgba(29, 30, 59, .06);
  opacity: 0;
  transform: translateY(-4px) scale(.985);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms var(--ease-out);
}
.modal .select-menu { position: absolute; }
.select-menu[hidden] { display: none; }
.select-menu.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.select-option {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  background: transparent;
  color: #3b4050;
  font: 600 12px Inter, sans-serif;
  text-align: left;
  cursor: pointer;
}
.select-option:hover, .select-option.is-active { background: #f1f0ff; color: var(--purple); }
.select-option .icon { width: 15px; height: 15px; opacity: 0; }
.select-option.is-selected .icon { opacity: 1; }
.board-toolbar .select-control { width: 180px; }
.board-toolbar .select-trigger { min-height: 36px; font-size: 12px; }

@media (hover: hover) and (pointer: fine) {
  .nav-item:hover .nav-icon { transform: translateY(-2px) scale(1.08); }
  .nav-item[data-view="overview"]:hover .nav-icon { transform: translateY(-2px) rotate(-7deg) scale(1.08); }
  .nav-item[data-view="tasks"]:hover .nav-icon { transform: translateY(-2px) rotate(5deg) scale(1.08); }
  .nav-item[data-view="calendar"]:hover .nav-icon { transform: translateY(-2px) rotate(-5deg) scale(1.08); }
  .nav-item[data-view="knowledge"]:hover .nav-icon { transform: translateY(-2px) rotate(5deg) scale(1.08); }
  .nav-item[data-view="crm"]:hover .nav-icon { transform: translateY(-2px) scale(1.15); }
  .task-card:hover { transform: translateY(-2px); border-color: #d8d5fc; box-shadow: 0 9px 22px rgba(28, 32, 60, .075); }
}

@media (max-width: 1280px) {
  .crm-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1150px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .columns { grid-template-columns: minmax(0, 1fr); margin-right: 0; }
}
@media (max-width: 650px) {
  .form-fields { grid-template-columns: minmax(0, 1fr); }
  .form-fields > * { grid-column: auto !important; }
  .modal { width: calc(100vw - 16px); }
  .modal form { padding: 20px; }
  .modal-actions { gap: 6px; }
  .modal-actions .button { padding: 9px 11px; }
}
@media (max-width: 720px) {
  .breadcrumb { display: none; }
  .mobile-brand { display: flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 12px; font-weight: 800; letter-spacing: -.025em; }
  .mobile-brand .brand-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 15px; }
  .mobile-brand em { color: var(--purple); font-style: normal; }
  .calendar-head { gap: 8px; }
  .calendar-head > div:last-child { display: none; }
  .calendar-head h2 { white-space: nowrap; font-size: 15px; }
}
@media (max-width: 560px) {
  .stage-column { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-icon, .task-card, .button, .select-trigger, .select-trigger .icon,
  .select-menu, .modal[open] { transition-duration: 0ms; transform: none; }
  .modal[open] { @starting-style { opacity: 1; transform: none; } }
}

/* compact.css */
:root { --bg: #f7f8fb; --line: #e9ebf1; --soft-shadow: none; }

@media (min-width: 721px) {
  .sidebar { width: 225px; padding: 15px 10px 12px; }
  .main { margin-left: 225px; width: calc(100% - 225px); }
}
.brand { padding: 5px 9px 20px; }
.sidebar-toggle { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #9398a5; }
.sidebar-toggle:hover { background: #f1f1f6; color: var(--purple); }
.sidebar-toggle .icon { width: 17px; height: 17px; }
@media (min-width: 721px) {
  .sidebar, .main { transition: width 180ms cubic-bezier(.23,1,.32,1), margin-left 180ms cubic-bezier(.23,1,.32,1); }
  .sidebar #nav { position: absolute; top: 155px; left: 10px; right: 10px; margin: 0; }
  body.sidebar-collapsed .sidebar { width: 64px; padding-left: 7px; padding-right: 7px; }
  body.sidebar-collapsed .main { margin-left: 64px; width: calc(100% - 64px); }
  body.sidebar-collapsed .brand { justify-content: center; padding: 5px 0 0; }
  body.sidebar-collapsed .brand-name, body.sidebar-collapsed .workspace-label, body.sidebar-collapsed .nav-label, body.sidebar-collapsed .side-note div { display: none; }
  body.sidebar-collapsed #nav { left: 7px; right: 7px; }
  body.sidebar-collapsed .nav-item { justify-content: center; padding: 8px; gap: 0; }
  body.sidebar-collapsed .nav-icon { width: 18px; height: 18px; }
  body.sidebar-collapsed .side-note { justify-content: center; padding: 12px 0; }
}
.workspace-label { padding: 0 10px 7px; }
.nav-item { min-height: 37px; padding: 7px 10px; margin: 1px 0; font-size: 13px; font-weight: 500; }
.topbar { height: 56px; padding: 0 22px; }
.top-actions { position: relative; }
.avatar { font-weight: 600; }
.profile-menu { position: absolute; top: calc(100% + 9px); right: 0; z-index: 25; width: 282px; padding: 8px; border: 1px solid #e7e9f0; border-radius: 11px; background: #fff; color: #303542; box-shadow: 0 18px 48px rgba(24,28,46,.16); font-family: Inter, sans-serif; }
.profile-menu[hidden] { display: none; }
.profile-menu-head { display: flex; align-items: center; gap: 10px; padding: 9px 8px 13px; border-bottom: 1px solid var(--line); }
.profile-menu-head .avatar { display: grid; place-items: center; width: 31px; height: 31px; flex: none; font-size: 12px; }
.profile-menu-head strong { display: block; font-size: 12px; font-weight: 600; }
.profile-menu-head small { display: block; margin-top: 3px; color: #9a9fad; font-size: 10px; }
.profile-menu-actions { padding: 7px 0; }
.profile-menu-foot { padding-top: 7px; border-top: 1px solid var(--line); }
.profile-menu button[role="menuitem"] { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 34px; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; color: #535a69; font-size: 12px; font-weight: 500; text-align: left; }
.profile-menu button[role="menuitem"]:hover { background: #f3f3fa; color: #4f49cf; }
.profile-menu button[role="menuitem"] .icon { width: 15px; height: 15px; }
.profile-settings { width: min(460px,calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 28px 80px rgba(24,28,48,.18); }
.profile-settings::backdrop { background: rgba(24,27,44,.27); backdrop-filter: blur(2px); }
.profile-settings-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.profile-settings-head h2 { margin: 3px 0 0; font-size: 20px; font-weight: 600; }
.profile-settings-body { padding: 4px 22px 22px; }
.profile-settings-body section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.profile-settings-body section:last-child { border: 0; }
.profile-settings-body h3 { margin: 0 0 7px; font-size: 13px; font-weight: 600; }
.profile-settings-body p { margin: 0 0 11px; color: #777e8d; font-size: 12px; line-height: 1.55; }
.project-nav { margin-top: 19px; padding: 0 2px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.project-nav-head { display: flex; align-items: center; justify-content: space-between; height: 27px; padding: 0 8px; color: #a7abb6; font-size: 9px; font-weight: 600; letter-spacing: .07em; }
.project-nav-head button { display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 5px; background: none; color: #a2a6b1; }
.project-nav-head button:hover { background: #f0efff; color: var(--purple); }
.project-nav-head .icon { width: 13px; height: 13px; }
.project-nav-item { display: flex; align-items: center; gap: 9px; width: 100%; height: 31px; padding: 3px 8px; overflow: hidden; border: 0; border-radius: 6px; background: none; color: #6c7281; font-size: 12px; font-weight: 450; text-align: left; }
.project-nav-item:hover { background: #f5f5fa; color: #343b4a; }
.project-nav-item.active { background: #f1f0ff; color: #5c55d0; font-weight: 500; }
.project-nav-item > span:first-child { width: 13px; height: 13px; flex: none; border-radius: 4px; background: var(--project-color); }
.project-nav-item > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 721px) {
  .sidebar #project-nav { position: fixed; top: 325px; bottom: 105px; left: 10px; width: 205px; margin: 0; }
  body.sidebar-collapsed .sidebar #project-nav { display: none; }
}
.view { max-width: none; padding: 20px 22px 32px; }
.page-head { margin-bottom: 17px; align-items: center; }
.page-head h1 { font-size: 23px; margin-bottom: 3px; }
.page-head p { font-size: 12px; }
.eyebrow { margin-bottom: 5px; }
.button { padding: 8px 12px; }
.button.primary { box-shadow: 0 3px 9px rgba(98,91,246,.15); }
.stat-card, .panel, .column, .doc-card, .deal-card, .contact-card { border-radius: 10px; box-shadow: none; }
.stats { gap: 9px; grid-auto-rows: auto; margin-bottom: 12px; }
.stat-card { min-height: 96px; padding: 12px 14px; }
.stat-value { margin: 8px 0 1px; font-size: 23px; }
.stat-icon { width: 26px; height: 26px; }
.dashboard-grid { gap: 10px; }
.dashboard-grid > .panel { min-height: 0; }
.panel { padding: 15px; }
.panel-head { margin-bottom: 11px; }
.task-row { padding: 8px 0; }
.task-title-link { padding: 0; border: 0; background: none; color: var(--ink); font-size: 12px; font-weight: 650; text-align: left; cursor: pointer; }
.task-title-link:hover { color: var(--purple); }
.task-title-link:focus-visible { outline: 2px solid #8d87ff; outline-offset: 3px; border-radius: 3px; }

.priority-badge { display: inline-flex; align-items: center; gap: 5px; flex: none; width: fit-content; border-radius: 5px; padding: 3px 7px; font-size: 10px; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.priority-badge > span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.priority-low { background: #e6f6e9; color: #3b9a59; }
.priority-normal { background: #fff3d9; color: #ae7d15; }
.priority-high { background: #fce9e9; color: #c95f62; }

.board-toolbar { margin-bottom: 9px; }
.task-total { font-size: 11px; white-space: nowrap; }
.project-page-head { margin: -3px 0 16px; border-bottom: 1px solid var(--line); }
.project-identity { display: flex; align-items: center; gap: 10px; min-height: 65px; }
.project-avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 9px; background: var(--project-color); color: #fff; font-size: 15px; font-weight: 600; }
.project-identity .eyebrow { margin-bottom: 2px; font-size: 9px; letter-spacing: .04em; }
.project-identity h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.project-title-more { display: grid; place-items: center; width: 28px; height: 28px; margin-left: auto; padding: 0; border: 0; border-radius: 6px; background: none; color: #999eaa; }
.project-title-more:hover { background: #eeeef7; color: var(--purple); }
.project-title-more .icon { width: 16px; height: 16px; }
.project-tabs { display: flex; gap: 19px; min-height: 36px; overflow-x: auto; }
.project-tabs button { position: relative; flex: none; padding: 8px 1px 11px; border: 0; background: none; color: #9296a3; font-size: 11px; font-weight: 500; }
.project-tabs button:hover { color: #5652bd; }
.project-tabs button.active { color: #5652bd; font-weight: 600; }
.project-tabs button.active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: #6b64e7; content: ''; }
.project-overview { display: grid; grid-template-columns: minmax(240px,.8fr) minmax(0,1.2fr); gap: 12px; }
.project-summary { min-width: 0; padding: 17px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.project-summary h2, .project-content-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.project-summary-head, .project-content-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.project-summary-head { margin-bottom: 9px; }
.project-summary .task-row { background: transparent; }
.project-metrics { display: grid; gap: 8px; margin-top: 16px; }
.project-metrics button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #edeef3; border-radius: 7px; background: #fff; color: #747a89; font-size: 11px; text-align: left; }
.project-metrics button:hover { background: #fafaff; border-color: #dcdafa; }
.project-metrics strong { color: #333b49; font-size: 14px; font-weight: 600; }
.project-metric-dot { width: 8px; height: 8px; border-radius: 50%; background: #a9aebe; }
.project-metric-dot.status-doing { background: #8b81e9; }
.project-metric-dot.status-done { background: #5cb981; }
.project-inline-add { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; margin-top: 9px; padding: 3px 0; border: 0; background: none; color: #8c8d9a; font-size: 11px; }
.project-inline-add:hover { color: var(--purple); }
.project-inline-add .icon { width: 14px; height: 14px; }
.project-content-head { margin: 2px 0 14px; }
.project-content-head p { margin: 5px 0 0; color: #999eaa; font-size: 11px; }
.project-documents { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.project-document { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 55px; padding: 8px 15px; border: 0; border-bottom: 1px solid #f0f1f5; background: #fff; color: #6e7381; text-align: left; }
.project-document:last-child { border-bottom: 0; }
.project-document:hover { background: #fafaff; }
.project-document > .icon:first-child { width: 17px; height: 17px; color: #847ee2; }
.project-document > .icon:last-child { width: 14px; height: 14px; margin-left: auto; color: #a9aab7; }
.project-document strong, .project-document small { display: block; }
.project-document strong { color: #343a47; font-size: 12px; font-weight: 500; }
.project-document small { margin-top: 3px; color: #a1a5af; font-size: 10px; }
.project-settings-card { display: flex; align-items: center; gap: 12px; max-width: 570px; min-height: 70px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.project-settings-card > div { display: grid; gap: 4px; flex: 1; }
.project-settings-card strong { font-size: 12px; font-weight: 600; }
.project-settings-card span:not(.project-avatar) { color: #9ba0ac; font-size: 11px; }
.toolbar-spacer { flex: 1; }
.view-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: #f3f4f7; }
.view-switch button { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 5px; padding: 5px 8px; background: none; color: #848899; font-size: 11px; font-weight: 650; }
.view-switch button.active { background: #fff; color: var(--purple); box-shadow: 0 1px 3px rgba(30,35,60,.08); }
.view-switch .icon { width: 13px; height: 13px; }
.task-list { border: 1px solid var(--line); border-radius: 9px; background: #fff; min-height: 270px; overflow-x: auto; }
.task-list-head, .task-list-row { display: grid; grid-template-columns: minmax(160px,2fr) minmax(75px,.8fr) minmax(78px,.8fr) minmax(65px,.6fr) minmax(78px,.8fr); gap: 8px; align-items: center; min-width: 500px; padding: 0 15px; }
.task-list-head { height: 38px; border-bottom: 1px solid var(--line); background: #fafafc; color: #9a9eac; font-size: 10px; font-weight: 500; }
.task-list-row { min-height: 43px; border-bottom: 1px solid #f1f2f5; color: #72788a; font-size: 11px; }
.task-list-row:last-child { border-bottom: 0; }
.task-list-row:hover { background: #fafaff; }
.task-list-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.task-list-title .task-title-link { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-list-title small { color: #adb0bd; margin-left: auto; }
.task-list-row .status-badge { padding: 4px 7px; font-size: 10px; }
.task-list-row.status-todo, .task-list-row.status-doing, .task-list-row.status-done { background: #fff; color: #747b89; }
.task-list-row.status-todo:hover, .task-list-row.status-doing:hover, .task-list-row.status-done:hover { background: #f8f8fc; }
.task-list-row .task-title-link { font-weight: 500; }
.panel .task-row { background: transparent; }
.task-list-add { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 38px; padding: 7px 16px; border: 0; background: #fff; color: #9498a4; font-size: 11px; text-align: left; }
.task-list-add:hover { background: #f9f9ff; color: var(--purple); }
.task-list-add .icon { width: 14px; height: 14px; }
.task-list-add-form { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 6px 13px; border-top: 1px solid var(--line); }
.task-list-add-form[hidden], .task-list-add[hidden] { display: none; }
.task-list-add-form input { flex: 1; min-width: 0; height: 31px; padding: 5px 8px; font-size: 11px; }
.week-nav { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; }
.week-nav strong { margin-left: 7px; color: #666d7e; font-size: 11px; font-weight: 650; }
.week-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px,1fr); gap: 7px; height: clamp(270px,calc(100dvh - 520px),480px); overflow-x: auto; padding-bottom: 7px; scrollbar-width: thin; }
.week-day { min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 9px; background: #f6f7fa; overflow-y: auto; }
.week-day.is-today { border-color: #c8c5ff; background: #f7f6ff; }
.week-day-head { padding: 3px 2px 11px; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.week-empty { padding: 8px 2px; color: #adb0bc; font-size: 11px; }
.week-task { display: grid; gap: 9px; width: 100%; margin-bottom: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 650; line-height: 1.45; text-align: left; }
.week-task:hover, .week-backlog-item:hover { border-color: #c8c4ff; }
.week-task > span:first-child { overflow-wrap: anywhere; }
.week-backlog { padding: 13px 0; }
.week-backlog h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 9px; font-size: 12px; }
.week-backlog > div { display: flex; gap: 6px; flex-wrap: wrap; }
.week-backlog-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #414656; font-size: 11px; }
.columns { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(260px, 28vw, 320px); gap: 9px; height: clamp(410px, calc(100dvh - 250px), 780px); overflow-x: auto; overflow-y: hidden; margin: 0; padding: 0 0 8px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.column { height: 100%; min-height: 0; overflow-y: auto; padding: 10px; background: #f5f6f9; scroll-snap-align: start; scrollbar-width: thin; }
.column-todo { background: #f5f6f9; }
.column-doing { background: #f4f4fc; }
.column-done { background: #f2f8f4; }
.column-head { position: relative; }
.column-head::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #aab0bd; }
.column-doing .column-head::before { background: #716bec; }
.column-done .column-head::before { background: #55aa79; }
.column.is-drop-target { outline: 2px solid #9b95ff; outline-offset: -2px; background: #efedff; }
.task-card.dragging { opacity: .45; transform: scale(.98); }
.column-head { padding: 2px 2px 10px; font-weight: 600; }
.task-card { min-height: 0; padding: 12px; border-radius: 8px; box-shadow: 0 1px 2px rgba(25,30,50,.025); cursor: pointer; }
.task-card.status-doing { border-left: 3px solid #9e9af5; }
.task-card.status-done { border-color: #d5eadb; border-left: 3px solid #66b587; background: #f1faf4; }
.task-card.status-done h4 { color: #547360; }
.task-card.status-done p { color: #7e9b88; }
.task-list-row.status-done { background: #fff; }
.task-list-row.status-done .task-title-link { color: #588069; }
.week-task.status-done, .week-backlog-item.status-done { border-color: #d1eadb; background: #f0f9f3; color: #548268; }
.task-card-signals { display: flex; gap: 5px; min-width: 0; flex-wrap: wrap; }
.task-tag { display: inline-flex; align-items: center; max-width: 100px; padding: 3px 6px; overflow: hidden; border-radius: 5px; background: #edf1f7; color: #627087; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quick-task-trigger { display: inline-flex; align-items: center; gap: 4px; padding: 6px 3px; font-size: 11px; }
.quick-task-trigger[hidden], .quick-task-form[hidden] { display: none; }
.quick-task-form { padding: 8px; border: 1px solid #c9c5fa; border-radius: 8px; background: #fff; box-shadow: 0 4px 14px rgba(37,39,70,.06); }
.quick-task-form input { width: 100%; min-height: 32px; padding: 7px 8px; font-size: 11px; }
.quick-task-form > div { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 7px; }
.quick-task-form [data-quick-cancel] { border: 0; background: none; color: #9297a5; font-size: 10px; }
.task-card h4 { margin-bottom: 7px; font-size: 12px; }
.task-card-title { display: flex; align-items: flex-start; gap: 7px; }
.task-card-title h4 { flex: 1; min-width: 0; }
.assignee-avatar { display: inline-grid; place-items: center; width: 21px; height: 21px; flex: none; border-radius: 50%; background: #eae9ff; color: #615be5; font-size: 10px; font-weight: 800; }
.task-card p { margin-bottom: 9px; }
.card-foot { gap: 9px; }
.task-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 11px; }
.task-card-open { display: inline-flex; align-items: center; gap: 2px; color: var(--purple); font-size: 10px; font-weight: 650; }
.task-card-open .icon { width: 12px; height: 12px; }

.crm-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 10px; }
.crm-layout > .panel:last-child { min-height: 190px; }
.pipeline { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: clamp(210px, 23vw, 280px); align-items: start; gap: 8px; height: 360px; overflow-x: auto; overflow-y: hidden; padding-bottom: 7px; scrollbar-width: thin; }
.stage-column { height: 100%; min-height: 0; padding: 10px; overflow-y: auto; background: #f5f6f9; scrollbar-width: thin; }
.stage-column[data-stage="proposal"] { background: #f4f4fc; }
.stage-column[data-stage="won"] { background: #f1f8f3; }
.stage-column[data-stage="lost"] { background: #f8f5f5; }
.deal-card.stage-won { border-color: #d5eadb; background: #f0f9f3; }
.deal-card.stage-lost { border-color: #ede6e6; background: #fbf7f7; }
.stage-column.is-drop-target { outline: 2px solid #9b95ff; outline-offset: -2px; background: #efedff; }
.deal-card { padding: 10px; cursor: pointer; }
.deal-card.dragging { opacity: .45; transform: scale(.98); }
.deal-card h4 { margin: 0 0 6px; font-size: 12px; font-weight: 550; line-height: 1.35; }
.deal-card p { margin: 0 0 8px; color: #818797; font-size: 11px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.deal-card .deal-contact { color: #9297a5; font-size: 10px; line-height: 1.5; }
.deal-card .task-tag { margin-top: 7px; }
.quick-deal-trigger { display: inline-flex; align-items: center; gap: 4px; padding: 7px 3px; font-size: 11px; }
.quick-deal-trigger[hidden], .quick-deal-form[hidden] { display: none; }
.quick-deal-form { padding: 8px; border: 1px solid #c9c5fa; border-radius: 8px; background: #fff; }
.quick-deal-form input { width: 100%; min-height: 32px; padding: 7px 8px; font-size: 11px; }
.quick-deal-form > div { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 7px; }
.quick-deal-form [data-quick-cancel] { border: 0; background: none; color: #9297a5; font-size: 10px; }
.doc-card { min-height: 150px; padding: 14px; }
.doc-icon { margin-bottom: 10px; }
.knowledge-layout { display: grid; grid-template-columns: 230px minmax(0,1fr); min-height: clamp(420px,calc(100dvh - 205px),820px); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.knowledge-index { min-width: 0; border-right: 1px solid var(--line); background: #fbfbfd; }
.knowledge-index-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 13px 11px; color: #8c91a0; font-size: 11px; font-weight: 700; }
.knowledge-item { display: flex; align-items: center; gap: 9px; width: calc(100% - 12px); margin: 2px 6px; padding: 9px 8px; overflow: hidden; border: 0; border-radius: 7px; background: transparent; color: #5c6272; font-size: 12px; text-align: left; }
.knowledge-item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knowledge-item .icon { width: 15px; height: 15px; flex: none; }
.knowledge-item:hover, .knowledge-item.active { background: #eeedff; color: #5852cf; }
.knowledge-content { min-width: 0; padding: 20px 28px; overflow-y: auto; }
.knowledge-content-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 32px; font-size: 11px; }
.knowledge-content h2 { margin: 18px 0 19px; font-size: 23px; letter-spacing: -.03em; }
.knowledge-body { max-width: 740px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; font-size: 13px; color: #444b5b; }
.knowledge-empty { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 330px; max-width: 350px; margin: auto; }
.knowledge-empty > .icon { width: 29px; height: 29px; color: var(--purple); }
.knowledge-empty h2 { margin: 18px 0 7px; font-size: 18px; }
.knowledge-empty p { color: #9398a6; font-size: 12px; line-height: 1.55; }
.calendar-wrap { padding: 12px; }
.cal-cell { min-height: 76px; }
.cal-weekday { min-height: 0; }
.cal-cell[data-open-day] { cursor: pointer; transition: background-color 150ms ease; }
.cal-cell[data-open-day]:hover, .cal-cell.is-today { background: #f9f8ff; }
.cal-day { display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 50%; background: none; color: #646a79; font-size: 11px; }
.cal-day.today { background: var(--purple); color: #fff; }
.cal-more { margin-top: 4px; color: var(--purple); font-size: 10px; }
.calendar-hint { width: 120px; color: #a2a7b3; font-size: 10px; text-align: right; }

.day-dialog { position: fixed; inset: 0 0 0 auto; width: min(720px,100vw); height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line); background: #fff; box-shadow: -20px 0 60px rgba(20,27,50,.16); }
.day-dialog::backdrop { background: rgba(25,30,48,.24); }
.day-dialog-content { display: flex; flex-direction: column; height: 100%; }
.day-topbar { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.day-topbar > div { flex: 1; }
.day-topbar > div span { color: #a1a5b1; font-size: 9px; font-weight: 700; letter-spacing: .09em; }
.day-topbar h2 { margin: 2px 0 0; font-size: 17px; font-weight: 600; text-transform: capitalize; }
.day-close { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 7px; background: #f4f5f8; color: #7b8190; }
.day-close .icon { width: 17px; height: 17px; }
.day-toolbar { display: flex; align-items: center; gap: 6px; min-height: 45px; padding: 6px 18px; border-bottom: 1px solid var(--line); }
.day-toolbar > span { margin-left: auto; color: #a0a5b2; font-size: 10px; }
.day-toolbar .icon { width: 14px; height: 14px; }
.day-quick { padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fbfbff; }
.day-quick[hidden] { display: none; }
.day-quick-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.day-quick-head strong { font-size: 12px; font-weight: 600; }
.day-quick-head button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: #9298a5; }
.day-quick-head .icon { width: 13px; height: 13px; }
.day-quick form { display: flex; gap: 7px; }
.day-quick input { min-width: 0; flex: 1; padding: 7px 9px; font-size: 12px; }
.day-quick .select-control { width: 130px; flex: none; }
.day-quick .select-trigger { min-height: 33px; font-size: 11px; }
.day-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.day-timeline { position: relative; min-height: 1632px; }
.day-slot-row { display: grid; grid-template-columns: 64px minmax(0,1fr); height: 34px; }
.day-slot-row > span { position: relative; top: -6px; padding-right: 10px; color: #adb1bc; font-size: 10px; text-align: right; }
.day-slot { display: block; width: 100%; height: 34px; padding: 0; border: 0; border-left: 1px solid #e7e9f0; border-bottom: 1px solid #f1f2f6; background: #fff; cursor: crosshair; }
.day-slot-row:nth-child(2n+1) .day-slot { border-bottom-color: #e7e9f0; }
.day-slot:hover { background: #faf9ff; }
.day-selection { position: absolute; left: 65px; right: 16px; z-index: 2; border: 1px solid #9d98f8; border-radius: 7px; background: rgba(98,91,246,.11); pointer-events: none; }
.day-selection[hidden] { display: none; }
.day-event { position: absolute; left: 68px; right: 18px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 30px; padding: 5px 9px; overflow: hidden; border: 1px solid #c9c5ff; border-left: 3px solid var(--purple); border-radius: 6px; background: #efeeff; color: #45419c; font-size: 11px; font-weight: 600; text-align: left; }
.day-event small { font-size: 10px; font-weight: 400; }
.day-event.is-done { border-color: #bde5cf; border-left-color: #4ea876; background: #e9f7ee; color: #387355; }
.day-unscheduled { flex: none; max-height: 155px; overflow-y: auto; padding: 12px 18px 17px; border-top: 1px solid var(--line); }
.day-unscheduled h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 8px; font-size: 12px; font-weight: 600; }
.day-unscheduled p { margin: 0; color: #a6aab5; font-size: 11px; }
.day-unscheduled-item { display: inline-flex; align-items: center; gap: 7px; margin: 0 6px 5px 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #3d4351; font-size: 11px; }
.day-unscheduled-item.is-done { background: #edf8f1; color: #508667; }

.task-detail { position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; width: min(620px, 100vw); max-width: none; height: 100dvh; max-height: none; border: 0; border-left: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: -18px 0 60px rgba(26,30,55,.16); }
.task-detail { width: min(var(--detail-width,668px),100vw); }
.task-detail.detail-full { width: 100vw; border-left: 0; }
.detail-resize-handle { position: absolute; z-index: 5; inset: 0 auto 0 -4px; width: 9px; cursor: col-resize; touch-action: none; }
.detail-resize-handle::after { content: ''; position: absolute; top: 50%; left: 3px; width: 3px; height: 35px; transform: translateY(-50%); border-radius: 5px; background: #c8cbd5; opacity: 0; transition: opacity 120ms ease; }
.detail-resize-handle:hover::after, .detail-resize-handle:focus-visible::after, .is-resizing-detail .detail-resize-handle::after { opacity: 1; }
.is-resizing-detail, .is-resizing-detail * { cursor: col-resize !important; user-select: none !important; }
.task-detail::backdrop { background: rgba(24,27,44,.22); backdrop-filter: blur(2px); }
.task-detail[open] { animation: detail-enter 220ms cubic-bezier(.22,.72,.16,1) both; }
@keyframes detail-enter { from { opacity: .65; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
.task-detail-content { display: flex; flex-direction: column; height: 100%; }
.detail-toolbar { height: 54px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--line); }
.detail-number { color: #9599a7; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.detail-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 30px 34px; scrollbar-width: thin; }
.detail-heading { margin-bottom: 25px; }
.detail-project { color: #7b80a0; font-size: 12px; font-weight: 600; margin-bottom: 9px; }
.detail-heading h2 { font-size: clamp(23px, 2.4vw, 30px); line-height: 1.22; letter-spacing: -.035em; margin: 0 0 17px; overflow-wrap: anywhere; }
.detail-stage-line { display: flex; align-items: center; gap: 0; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.detail-stage-line button { position: relative; flex: 1; min-width: max-content; min-height: 30px; padding: 7px 11px; border: 1px solid #e7e9ef; border-right: 0; background: #fafafd; color: #9297a5; font-size: 11px; font-weight: 500; }
.detail-stage-line button:first-child { border-radius: 6px 0 0 6px; }
.detail-stage-line button:last-child { border-right: 1px solid #e7e9ef; border-radius: 0 6px 6px 0; }
.detail-stage-line button:hover { background: #f0efff; color: var(--purple); }
.detail-stage-line button.active { border-color: #d2cffd; background: #eeedff; color: #5b55d5; font-weight: 600; }
.detail-stage-line button[data-detail-status="done"].active, .detail-stage-line button[data-process-stage="won"].active { border-color: #cbe8d7; background: #e8f7ee; color: #408660; }
.task-detail.is-done .detail-toolbar { background: #f4fbf6; }
.task-detail.is-done .detail-heading h2 { color: #406f50; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.detail-tags .task-tag { max-width: 160px; font-weight: 500; }
.detail-unset { color: #a4a9b4 !important; font-weight: 400; }
.detail-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.detail-badges .priority-badge { font-size: 11px; padding: 6px 9px; }
.status-badge { display: inline-flex; align-items: center; border-radius: 5px; padding: 6px 9px; font-size: 11px; font-weight: 650; }
.status-todo { background: #f0f1f5; color: #697082; }
.status-doing { background: #eae9ff; color: #5d57d8; }
.status-done { background: #e5f7ed; color: #3c9364; }
.detail-properties { display: grid; gap: 0; padding: 3px 0 17px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-properties > div { display: grid; grid-template-columns: 125px minmax(0,1fr); align-items: baseline; gap: 10px; padding: 10px 0; font-size: 12px; }
.detail-properties span { color: #999eab; }
.detail-properties strong { font-weight: 600; overflow-wrap: anywhere; }
.detail-description { padding-top: 25px; }
.detail-description h3 { font-size: 13px; margin: 0 0 12px; }
.detail-copy { min-height: 70px; color: #3d4250; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-copy.is-empty { color: #a5a9b4; }
.detail-activity { color: #9a9eaa; font-size: 12px; }
.detail-section { padding: 20px 0; border-top: 1px solid var(--line); }
.detail-section-head { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.detail-section-head h3 { margin: 0; color: var(--ink); font-size: 13px; }
.detail-section-head > span { color: #9da1ae; font-size: 11px; }
.detail-hint { margin: 0 0 12px; color: #a4a8b3; font-size: 12px; }
.detail-checklist { display: grid; gap: 2px; margin-bottom: 12px; }
.detail-checkitem { display: flex; align-items: center; justify-content: space-between; min-height: 35px; gap: 8px; }
.detail-checkitem label { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; color: #3e4351; font-size: 12px; }
.detail-checkitem label span { overflow-wrap: anywhere; }
.detail-checkitem label span.complete { color: #a3a7b1; text-decoration: line-through; }
.detail-checkitem input { width: 15px; height: 15px; margin: 0; padding: 0; accent-color: var(--purple); }
.detail-remove { display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #b3b7c1; }
.detail-remove:hover { background: #fce9e9; color: #c95f62; }
.detail-remove .icon { width: 13px; height: 13px; }
.detail-promote { display: grid; place-items: center; width: 23px; height: 23px; flex: none; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #7b94a4; }
.detail-promote:hover, .detail-promote:focus-visible { background: #eaf2f7; color: #355d78; }
.detail-promote .icon { width: 13px; height: 13px; }
.detail-inline-form { display: flex; gap: 7px; }
.detail-inline-form input { flex: 1; min-width: 0; height: 33px; padding: 7px 9px; font-size: 12px; }
.detail-inline-form .button { flex: none; }
.detail-comments { display: grid; gap: 13px; margin-bottom: 15px; }
.detail-comment { padding: 10px 12px; border-radius: 8px; background: #f8f8fb; color: #424855; font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.detail-comment-meta strong { font-size: 11px; }
.detail-comment-meta time { color: #9ba0ad; font-size: 10px; }
.detail-comment-form { display: grid; gap: 8px; justify-items: end; }
.detail-comment-form textarea { width: 100%; min-height: 68px; padding: 9px 10px; resize: vertical; font-size: 12px; }
.detail-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fff; }
.modal.editor-sheet { position: fixed; inset: 0 0 0 auto; width: min(620px,100vw); max-width: none; height: 100dvh; max-height: none; margin: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0; box-shadow: -18px 0 60px rgba(26,30,55,.16); }
.modal.editor-sheet form { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 0; }
.modal.editor-sheet .modal-head { flex: none; align-items: center; min-height: 78px; margin: 0; padding: 18px 26px; border-bottom: 1px solid var(--line); }
.modal.editor-sheet .form-fields { flex: 1; align-content: start; min-height: 0; max-height: none; padding: 24px 26px; gap: 15px; }
.modal.editor-sheet .modal-actions { flex: none; margin: 0; padding: 14px 26px; background: #fff; }
.modal.editor-sheet[open] { animation: detail-enter 220ms cubic-bezier(.22,.72,.16,1) both; }

/* Lighter type and tighter rhythm keep dense work screens readable. */
.nav-item { font-size: 13px; font-weight: 500; }
.button, .text-link { font-weight: 550; }
.page-head h1 { font-weight: 650; letter-spacing: -.025em; }
.task-card h4, .week-task, .task-title-link { font-weight: 550; }
.detail-heading h2 { font-weight: 600; }
.detail-project { font-weight: 500; }
.detail-properties strong { font-weight: 500; }
.detail-copy { font-size: 13px; line-height: 1.6; }
.priority-badge, .status-badge { font-weight: 550; }
.form-fields label { font-weight: 550; }
.task-card, .deal-card, .date-popover, .participant-options { transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms cubic-bezier(.23,1,.32,1); }
@media (hover: hover) and (pointer: fine) {
  .task-card:hover, .deal-card:hover { border-color: #d7d4fc; box-shadow: 0 5px 15px rgba(34,39,67,.08); transform: translateY(-1px); }
}

.participant-control, .date-control { position: relative; min-width: 0; }
.participant-search { width: 100%; }
.participant-options, .date-popover { position: absolute; z-index: 120; border: 1px solid #e7e9f0; border-radius: 11px; background: #fff; box-shadow: 0 18px 45px rgba(32,37,58,.16); }
.participant-options[hidden], .date-popover[hidden] { display: none; }
.participant-options { overflow-y: auto; padding: 5px; }
.participant-option { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 39px; padding: 6px 8px; border: 0; border-radius: 7px; background: none; color: #3d4351; font-size: 12px; text-align: left; }
.participant-option:hover, .participant-option.is-active { background: #f1f0ff; color: var(--purple); }
.participant-option small { display: block; margin-top: 2px; color: #a0a4b0; font-size: 10px; }
.participant-avatar, .participant-create-icon { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: #ebeaff; color: var(--purple); font-size: 11px; font-weight: 700; }
.participant-create-icon { background: #e8f5eb; color: #34895b; font-size: 16px; }
.date-control input[readonly] { width: 100%; padding-right: 39px; cursor: pointer; }
.date-open { position: absolute; top: 4px; right: 5px; bottom: 4px; display: grid; place-items: center; width: 31px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: #858b9a; }
.date-open:hover { background: #f1f0ff; color: var(--purple); }
.date-open .icon { width: 17px; height: 17px; }
.date-popover { width: 292px; padding: 11px; }
.date-popover-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.date-popover-head strong { font-size: 12px; font-weight: 600; text-transform: capitalize; }
.date-popover-head button { display: grid; place-items: center; width: 27px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: #8d92a0; }
.date-popover-head button:hover { background: #f1f0ff; color: var(--purple); }
.date-popover-head .icon { width: 15px; height: 15px; }
.date-popover-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.date-weekday { display: grid; place-items: center; height: 24px; color: #aaadba; font-size: 10px; }
.date-day { display: grid; place-items: center; height: 33px; padding: 0; border: 0; border-radius: 7px; background: none; color: #474e5d; font-size: 11px; }
.date-day:hover { background: #f0efff; color: var(--purple); }
.date-day.is-other { color: #c1c4ce; }
.date-day.is-today { box-shadow: inset 0 0 0 1px #bab6ff; }
.date-day.is-selected { background: var(--purple); color: #fff; box-shadow: none; }
.date-popover-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.date-popover-foot button { border: 0; background: none; color: var(--purple); font-size: 11px; font-weight: 600; }

@media (max-width: 1200px) { .crm-layout { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 720px) {
  .project-nav { display: none; }
  .project-overview { grid-template-columns: minmax(0,1fr); }
  .project-page-head { margin-top: 0; }
  .project-tabs { gap: 15px; }
  .sidebar-toggle { display: none; }
  .topbar { height: 56px; padding: 0 14px; }
  .view { padding: 17px 14px 25px; }
  .nav-item { font-size: 9px; min-height: 0; }
  .page-head { align-items: flex-start; }
  .stats { gap: 7px; }
  .stat-card { min-height: 88px; padding: 10px 12px; }
  .columns { grid-auto-columns: minmax(270px, 85vw); height: clamp(380px, calc(100dvh - 240px), 650px); }
  .pipeline { grid-auto-columns: minmax(220px, 78vw); }
  .board-toolbar { flex-wrap: wrap; }
  .view-switch { width: 100%; justify-content: space-between; }
  .view-switch button { flex: 1; justify-content: center; }
  .week-board { grid-auto-columns: minmax(190px,70vw); }
  .week-backlog { padding-bottom: 70px; }
  .toolbar-spacer { display: none; }
  .project-add { display: none; }
  .knowledge-layout { grid-template-columns: 1fr; min-height: 420px; }
  .knowledge-index { border-right: 0; border-bottom: 1px solid var(--line); }
  .knowledge-index-head { padding: 10px 12px; }
  .knowledge-index .empty { padding: 14px; }
  .knowledge-item { display: inline-flex; width: auto; max-width: 185px; white-space: nowrap; }
  .knowledge-content { padding: 17px 19px; }
  .task-detail { width: 100vw; border-left: 0; }
  .detail-resize-handle { display: none; }
  .modal.editor-sheet { width: 100vw; border-left: 0; }
  .modal.editor-sheet .modal-head { padding: 16px 20px; }
  .modal.editor-sheet .form-fields { grid-template-columns: minmax(0,1fr); padding: 18px 20px; }
  .modal.editor-sheet .form-fields > * { grid-column: auto !important; }
  .modal.editor-sheet .modal-actions { padding: 12px 20px; }
  .detail-scroll { padding: 24px 20px; }
  .detail-toolbar { padding: 0 16px; }
  .detail-actions { padding: 12px 16px; }
  .detail-properties > div { grid-template-columns: 90px minmax(0,1fr); }
  .day-dialog { width: 100vw; border-left: 0; }
  .day-toolbar > span { display: none; }
  .day-quick form { flex-wrap: wrap; }
  .day-quick input { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .task-detail[open] { animation: none; }
  .modal.editor-sheet[open] { animation: none; }
  .sidebar, .main, .task-card, .deal-card, .date-popover, .participant-options { transition: none !important; }
}

/* Task sheet follows the quiet, dense type rhythm of the reference app. */
#task-detail { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
#task-detail .detail-toolbar { height: 52px; padding: 0 25px; }
#task-detail .detail-number { display: inline-flex; align-items: center; gap: 8px; color: #8d919e; font-size: 11px; font-weight: 500; letter-spacing: .015em; }
#task-detail .detail-number .icon { width: 16px; height: 16px; color: #69717e; }
.detail-toolbar-actions { display: flex; align-items: center; gap: 6px; }
#task-detail .detail-toolbar-actions .icon-button { width: 29px; height: 29px; background: transparent; color: #858b98; }
#task-detail .detail-toolbar-actions .icon-button:hover { background: #f1f1f6; color: #3e4654; }
#task-detail .detail-toolbar-actions .icon { width: 16px; height: 16px; }
#task-detail .detail-scroll { padding: 27px 34px 45px; }
.detail-heading-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 14px; }
#task-detail .detail-project { margin: 0; color: #9095a3; font-size: 11px; font-weight: 400; }
.detail-heading-top time { color: #afb2bd; font-size: 10px; }
.detail-action-row { display: flex; align-items: center; gap: 8px; margin-bottom: 17px; }
.detail-action-row button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 7px 11px; border: 0; border-radius: 7px; font-size: 12px; font-weight: 500; }
.detail-action-row .icon { width: 17px; height: 17px; }
.detail-complete-button { background: #eeedff; color: #6b63d7; }
.detail-complete-button:hover { background: #e4e1ff; }
.detail-complete-button.is-complete { background: #e7f6ec; color: #40875c; }
.detail-timer-button { background: #f2f3f6; color: #686d7a; }
.detail-timer-button:hover { background: #e9eaf0; }
.detail-timer-button.is-running { background: #fff1e3; color: #ad7131; }
.detail-action-row .detail-edit-button { margin-left: auto; background: transparent; color: #8e93a1; font-size: 11px; }
.detail-action-row .detail-edit-button:hover { background: #f4f4fa; color: var(--purple); }
#task-detail .detail-heading { margin-bottom: 18px; }
#task-detail .detail-heading h2 { max-width: 800px; margin: 0 0 11px; font-size: clamp(21px,2.3vw,26px); font-weight: 560; line-height: 1.25; letter-spacing: -.022em; }
.detail-shortcuts { display: flex; flex-wrap: wrap; gap: 3px 11px; }
.detail-shortcuts button { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 2px 0; border: 0; background: none; color: #969ba6; font-size: 11px; font-weight: 400; white-space: nowrap; }
.detail-shortcuts button:hover { color: var(--purple); }
.detail-shortcuts .icon { width: 12px; height: 12px; }
#task-detail .detail-properties { padding: 8px 0 16px; border-top: 0; border-bottom: 1px solid var(--line); }
#task-detail .detail-property { display: grid; grid-template-columns: 162px minmax(0,1fr); gap: 12px; align-items: center; min-height: 37px; padding: 5px 0; }
.detail-property-label { display: flex; align-items: center; gap: 10px; color: #a1a5b0; font-size: 12px; font-weight: 400; }
.detail-property-label .icon { width: 15px; height: 15px; flex: none; color: #a7abb6; }
.detail-property-value { min-width: 0; color: #3e4553; font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.detail-property-link { padding: 0; border: 0; background: none; color: #7479a6; font-size: 12px; text-align: left; }
.detail-property-link:hover { color: var(--purple); }
.detail-type { display: inline-flex; align-items: center; gap: 5px; color: #6962c8; }
.detail-type::before { width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; content: ''; }
#task-detail .detail-stage-line { display: inline-flex; max-width: 100%; margin: 0; }
#task-detail .detail-stage-line button { flex: none; min-height: 25px; padding: 4px 8px; font-size: 10px; }
#task-detail .detail-stage-line .stage-todo.active { background: #eff0f3; border-color: #dfe1e8; color: #626a78; }
#task-detail .detail-stage-line .stage-doing.active { background: #eeedff; border-color: #d5d1ff; color: #5e57d3; }
#task-detail .detail-stage-line .stage-done.active { background: #e7f7ec; border-color: #cdebd8; color: #3f8b5c; }
#task-detail .detail-description { min-height: 130px; padding: 20px 0 25px; }
#task-detail .detail-description h3 { margin-bottom: 11px; color: #7d8492; font-size: 11px; font-weight: 500; }
#task-detail .detail-copy { color: #444b59; font-size: 13px; font-weight: 400; line-height: 1.7; }
#task-detail .detail-copy.is-empty { color: #aeb2bd; }
#task-detail .detail-section { padding: 20px 0 23px; scroll-margin-top: 10px; }
#task-detail .detail-section-head { min-height: 27px; margin-bottom: 12px; }
#task-detail .detail-section-head h3 { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; }
#task-detail .detail-section-head h3 .icon { width: 15px; height: 15px; color: #999eaa; }
.detail-section-action { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 4px 6px; border: 0; border-radius: 5px; background: transparent; color: #777d8e; font-size: 11px; }
.detail-section-action:hover { background: #f1f0ff; color: var(--purple); }
.detail-section-action .icon { width: 13px; height: 13px; }
.detail-file-list, .detail-linked-list, .detail-time-list, .detail-history-list { display: grid; gap: 5px; }
.detail-file, .detail-linked, .detail-time-list > div { display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 5px 7px; border: 1px solid #eceef3; border-radius: 6px; background: #fff; font-size: 11px; }
.detail-file-icon { display: grid; place-items: center; width: 23px; height: 23px; flex: none; border-radius: 5px; background: #eef0ff; color: #6f69dc; }
.detail-file-icon .icon { width: 14px; height: 14px; }
.detail-file a { min-width: 0; flex: 1; overflow: hidden; color: #434d63; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.detail-file a:hover { color: var(--purple); text-decoration: underline; }
.detail-file small { color: #abb0bc; white-space: nowrap; }
.detail-file button, .detail-linked > button:last-child { display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #b5b9c3; }
.detail-file button:hover, .detail-linked > button:last-child:hover { background: #fceaea; color: #bc5b60; }
.detail-file button .icon, .detail-linked button .icon { width: 13px; height: 13px; }
.detail-linked > button:first-child { flex: 1; min-width: 0; overflow: hidden; border: 0; background: transparent; color: #424a59; font-size: 11px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.detail-linked > button:first-child:hover { color: var(--purple); }
.detail-linked small { color: #9ca1ae; }
#task-detail .detail-inline-form { margin-top: 10px; }
#task-detail .detail-inline-form .select-control { flex: 1; min-width: 0; }
#task-detail .detail-inline-form .select-trigger { min-height: 33px; padding: 6px 8px; font-size: 11px; }
.detail-estimate-form { display: flex; align-items: end; gap: 8px; margin: 4px 0 15px; }
.detail-estimate-form label { display: grid; gap: 5px; width: 150px; color: #9297a3; font-size: 10px; }
.detail-estimate-form input { width: 100%; height: 32px; padding: 6px 8px; font-size: 11px; }
.detail-running { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 13px; padding: 5px 8px; border-radius: 5px; background: #fff2e4; color: #a46b30; font-size: 11px; }
.detail-running .icon { width: 13px; height: 13px; }
.detail-time-list { margin: 0 0 10px; }
.detail-time-list > div strong { color: #575ed1; font-size: 11px; font-weight: 600; white-space: nowrap; }
.detail-time-list > div span { flex: 1; min-width: 0; color: #555d6b; overflow-wrap: anywhere; }
.detail-time-list > div time { color: #a6aab6; font-size: 10px; white-space: nowrap; }
.detail-time-form { display: grid; grid-template-columns: 72px 72px minmax(0,1fr) auto; gap: 6px; }
.detail-time-form input { min-width: 0; height: 33px; padding: 6px 8px; font-size: 11px; }
.detail-history-item { display: flex; align-items: flex-start; gap: 11px; min-height: 30px; }
.detail-history-dot { width: 7px; height: 7px; flex: none; margin: 6px 0 0 3px; border-radius: 50%; background: #a8a5f2; box-shadow: 0 0 0 3px #f1f0ff; }
.detail-history-item strong { display: block; color: #5b6270; font-size: 11px; font-weight: 500; }
.detail-history-item time { display: block; margin-top: 3px; color: #a8acb7; font-size: 10px; }
.detail-comment-dock { display: flex; align-items: end; gap: 8px; flex: none; padding: 11px 23px 13px; border-top: 1px solid var(--line); background: #fff; }
.detail-comment-dock textarea { flex: 1; min-width: 0; min-height: 37px; max-height: 100px; padding: 10px 12px; resize: vertical; border-radius: 9px; color: #424958; font-size: 12px; }
.detail-comment-dock button { display: grid; place-items: center; width: 36px; height: 36px; flex: none; padding: 0; border: 0; border-radius: 8px; background: #efeeff; color: var(--purple); }
.detail-comment-dock button:hover { background: #e4e2ff; }
.detail-comment-dock button .icon { width: 16px; height: 16px; }
@media (max-width: 720px) {
  #task-detail .detail-scroll { padding: 20px 20px 34px; }
  #task-detail .detail-toolbar { padding: 0 15px; }
  #task-detail .detail-property { grid-template-columns: 116px minmax(0,1fr); gap: 7px; }
  .detail-time-form { grid-template-columns: 70px 70px minmax(0,1fr); }
  .detail-time-form button { grid-column: 1 / -1; }
  .detail-comment-dock { padding: 10px 15px; }
}

/* Compact board with controls that stay visible above the scrolling cards. */
.columns.board-many { grid-auto-columns: clamp(206px, calc((100% - 36px) / 5), 260px); }
.column { display: flex; flex-direction: column; overflow: hidden; background: color-mix(in srgb, var(--column-color, #929baa) 6%, #f8f9fb); }
.column-top { flex: none; padding-bottom: 7px; }
.column-head { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 2px 5px; }
.column-head > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.column-head::before { flex: none; background: var(--column-color, #929baa); }
.column-head .count { margin-left: auto; }
.column-task-list { flex: 1; min-height: 60px; overflow-y: auto; padding: 2px 2px 12px; scrollbar-width: thin; }
.column-task-list .task-card + .task-card { margin-top: 8px; }
.quick-task-trigger { width: 100%; min-height: 30px; padding: 6px 7px; border-radius: 6px; text-align: left; }
.quick-task-trigger:hover, .quick-task-trigger:focus-visible { background: color-mix(in srgb, var(--column-color, #929baa) 12%, white); }
.add-column { justify-content: flex-start; border: 1px dashed #d7dce5; background: #fafbfd; }
.add-column-trigger { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 7px; border: 0; border-radius: 6px; background: transparent; color: #667081; font-size: 11px; font-weight: 600; text-align: left; }
.add-column-trigger:hover, .add-column-trigger:focus-visible { background: #efedff; color: #605ad2; }
.add-column-form { display: grid; gap: 9px; padding: 4px; font-size: 11px; }
.add-column-form[hidden] { display: none; }
.add-column-form label { display: grid; gap: 5px; color: #687183; }
.add-column-form input[name="title"] { min-width: 0; width: 100%; height: 32px; padding: 6px 8px; border: 1px solid #dce0e9; border-radius: 6px; background: white; }
.add-column-form input[type="color"] { width: 42px; height: 28px; padding: 2px; border: 1px solid #dce0e9; border-radius: 6px; }
.add-column-form > div { display: flex; flex-wrap: wrap; gap: 5px; }
.column-remove, .column-rename { display: grid; place-items: center; width: 22px; height: 22px; flex: none; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #9199a7; opacity: 0; }
.column:hover .column-remove, .column-remove:focus-visible { opacity: 1; }
.column-remove:hover { background: #fce9eb; color: #b84a57; }
.column-remove .icon { width: 13px; height: 13px; }
.column-rename:hover, .column-rename:focus-visible { background: #eaf1f5; color: #4b6b80; }
.column-rename .icon { width: 13px; height: 13px; }
.column:hover .column-rename, .column-rename:focus-visible { opacity: 1; }
.column-rename-form { display: grid; gap: 7px; margin: 2px 0 8px; padding: 8px; border: 1px solid #dbe4e8; border-radius: 8px; background: #fff; }
.column-rename-form[hidden] { display: none; }
.column-rename-form label { display: grid; gap: 5px; color: #647783; font-size: 11px; font-weight: 600; }
.column-rename-form input { width: 100%; min-width: 0; height: 34px; font-size: 12px; }
.column-rename-form > div { display: flex; gap: 5px; }
.task-card { position: relative; border-left: 3px solid var(--column-color, #929baa); }
.task-card.drop-before { box-shadow: 0 -3px 0 var(--purple); }
.task-card.drop-after { box-shadow: 0 3px 0 var(--purple); }
.assignee-pill { display: inline-flex; align-items: center; gap: 5px; max-width: calc(100% - 48px); min-height: 24px; margin-top: 10px; padding: 2px 7px 2px 3px; overflow: hidden; border: 1px solid #dedcff; border-radius: 999px; background: #f4f3ff; color: #5f5bc0; font-size: 10px; font-weight: 550; white-space: nowrap; }
.assignee-pill > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.assignee-pill .assignee-avatar { width: 17px; height: 17px; font-size: 9px; }
.task-card-order { position: absolute; right: 6px; bottom: 5px; display: flex; gap: 2px; opacity: 0; }
.task-card:hover .task-card-order, .task-card:focus-within .task-card-order { opacity: 1; }
.task-card-order button { display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 0; border-radius: 5px; background: #f5f4ff; color: #6963c5; }
.task-card-order button:hover, .task-card-order button:focus-visible { background: #e5e1ff; }
.task-card-order .icon { width: 13px; height: 13px; }
.status-badge[style] { background: color-mix(in srgb, var(--column-color) 14%, white); color: color-mix(in srgb, var(--column-color) 77%, #27313e); }
#task-detail .detail-stage-line { max-width: 100%; overflow-x: auto; padding: 2px; }
#task-detail .detail-stage-line button { min-width: max-content; font-weight: 550; transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
#task-detail .detail-stage-line button:hover, #task-detail .detail-stage-line button:focus-visible, #task-detail .detail-stage-line button.active { border-color: color-mix(in srgb, var(--column-color) 36%, white); background: color-mix(in srgb, var(--column-color) 16%, white); color: color-mix(in srgb, var(--column-color) 85%, #25303c); font-weight: 550; }
#task-detail .detail-stage-line button:disabled { cursor: wait; }
@media (hover: none) { .task-card-order, .column-remove, .column-rename { opacity: 1; } }
@media (max-width: 720px) { .columns.board-many { grid-auto-columns: minmax(265px, 85vw); } }
@media (prefers-reduced-motion: reduce) { #task-detail .detail-stage-line button { transition: none; } }

/* Every task card reserves the same rows for description, tags, owner and ordering. */
.task-card { display: flex; flex-direction: column; height: 198px; padding: 11px; }
.task-card-title { flex: none; height: 32px; overflow: hidden; }
.task-card-title h4 { display: -webkit-box; max-height: 32px; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 16px; }
.task-card-description { display: -webkit-box; flex: none; height: 33px; margin: 4px 0 0 !important; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 16px; }
.task-card .card-foot { flex: none; min-height: 16px; margin-top: 4px; }
.task-card-bottom { flex: none; min-height: 19px; margin-top: 5px; }
.task-card-tags { display: flex; flex: none; align-items: center; gap: 4px; height: 22px; min-width: 0; margin-top: 5px; overflow: hidden; white-space: nowrap; }
.task-card-tags .task-tag { flex: 0 1 auto; min-width: 0; max-width: 83px; padding: 3px 5px; background: #e9efff; color: #4d65b1; font-weight: 650; }
.task-card-tags .task-tag .icon { width: 11px; height: 11px; flex: none; }
.task-card-tags .task-tag span:last-child { overflow: hidden; text-overflow: ellipsis; }
.task-tag-more { flex: none; color: #6375a8; font-size: 10px; font-weight: 700; }
.task-card-person-row { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 5px; height: 25px; margin-top: auto; }
.task-card-person-row .assignee-pill { min-width: 0; max-width: calc(100% - 50px); margin: 0; }
.assignee-placeholder { flex: 1; min-width: 0; }
.task-card-order { position: static; flex: none; gap: 2px; opacity: 0; visibility: hidden; }
.task-card:hover .task-card-order, .task-card:focus-within .task-card-order { opacity: 1; visibility: visible; }
.task-card-order button { width: 21px; height: 21px; }
.column-top { position: relative; z-index: 1; }
.quick-task-trigger { display: inline-flex; align-items: center; width: 100%; height: 31px; padding: 5px 8px; border: 1px solid #dce0e8; border-radius: 7px; background: rgba(255,255,255,.78); color: #737d8e; font-size: 11px; font-weight: 550; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.quick-task-trigger:hover, .quick-task-trigger:focus-visible, .quick-task-trigger[aria-expanded="true"] { border-color: #bbb9ed; background: #f5f4ff; color: #605ad0; transform: none; }
.quick-task-form { position: absolute; top: calc(100% - 4px); left: 0; right: 0; z-index: 2; margin: 0; box-shadow: 0 10px 24px rgba(35,37,64,.13); }
@media (hover: none) { .task-card-order { opacity: 1; visibility: visible; } }
@media (prefers-reduced-motion: reduce) { .quick-task-trigger { transition: none; } }

/* account.css */
.account-link{display:block;margin:14px auto 0;padding:6px;border:0;background:none;color:#655fca;font:inherit;font-size:13px;cursor:pointer}.account-link:hover{text-decoration:underline}
.icon-users{--icon-url:url('/static/icons/user-round.svg')}
.new-token[hidden],.pending-badge[hidden],#member-form[hidden],#profile-admin-trigger[hidden]{display:none!important}
.account-dialog{width:min(540px,calc(100vw - 32px));max-height:min(760px,calc(100dvh - 32px));border:1px solid #e4e6ee;border-radius:20px;padding:27px;background:#fff;box-shadow:0 24px 80px #26325530;color:#252b3d}.account-dialog::backdrop{background:#17213d66;backdrop-filter:blur(3px)}
.account-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}.account-dialog-head h2{font-size:22px;line-height:1.3;margin:3px 0 0}.account-dialog p{font-size:13px;line-height:1.6;color:#6f7789;margin:0 0 20px}.account-dialog label{display:block;margin:14px 0;color:#41495c;font-size:12px;font-weight:600}.account-dialog label input{display:block;width:100%;height:42px;margin-top:7px;border:1px solid #e0e4ed;border-radius:10px;padding:0 12px;font:inherit;font-size:14px;outline:none}.account-dialog label input:focus,.account-inline-form input:focus{border-color:#827cf1;box-shadow:0 0 0 3px #827cf122}.account-dialog .full{margin-top:20px}
.account-inline-form{display:flex;gap:8px;margin:14px 0}.account-inline-form input{min-width:0;flex:1;height:36px;border:1px solid #e0e4ed;border-radius:9px;padding:0 10px;font:inherit;font-size:13px;outline:none}.account-list{display:grid;gap:7px;margin-top:12px}.account-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border:1px solid #edf0f4;border-radius:11px;background:#fafbfe}.account-row strong{display:block;font-size:13px;font-weight:600;overflow-wrap:anywhere}.account-row small{display:block;margin-top:4px;font-size:11px;color:#8991a0}.account-row-actions{display:flex;gap:6px;flex-shrink:0}.account-row .button{white-space:nowrap}.account-success{color:#21895d!important}.pending-badge{margin-left:auto;padding:2px 6px;border-radius:9px;background:#e75b65;color:#fff;font-size:10px;font-weight:700}.avatar.has-pending{box-shadow:0 0 0 2px #e75b65}.new-token{display:grid;gap:8px;padding:13px;margin:12px 0;border:1px solid #cbdcd0;border-radius:11px;background:#f5fbf7}.new-token strong{font-size:12px}.new-token code{font-size:11px;overflow-wrap:anywhere;user-select:all}.new-token button{justify-self:start}
@media(max-width:560px){.account-dialog{padding:19px}.account-inline-form,.account-row-actions{flex-wrap:wrap}.account-row{align-items:flex-start}.account-row-actions{justify-content:flex-end}}
.account-password-form{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.account-password-form input{min-width:145px;flex:1;height:35px;padding:0 10px;border:1px solid #e0e4ed;border-radius:9px;background:#fff;font:inherit;font-size:12px}.account-password-form input:focus{outline:0;border-color:#827cf1;box-shadow:0 0 0 3px #827cf122}
.telegram-health-alert { border: 1px solid #e6c7bc; border-radius: 8px; background: #fff4f0; color: #9a5546; padding: 7px 10px; font: inherit; font-size: 11px; font-weight: 600; cursor: pointer; }
.telegram-health-alert:hover, .telegram-health-alert:focus-visible { background: #ffebe4; outline: 2px solid #d8a18e; outline-offset: 1px; }
.telegram-status { padding: 10px 12px; border: 1px solid #d8e1e4; border-radius: 9px; background: #f6f8f8; color: #596b73; font-size: 12px; line-height: 1.5; }
.telegram-status[data-state="ok"] { border-color: #bcd9c8; background: #f1f8f3; color: #377452; }
.telegram-status[data-state="error"] { border-color: #e9c5ba; background: #fff4f0; color: #94574b; }
.telegram-form { display: grid; gap: 13px; margin-top: 14px; }
.telegram-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.telegram-form label { display: grid; gap: 6px; color: #59636d; font-size: 11px; font-weight: 600; }
.telegram-form label input:not([type="checkbox"]) { width: 100%; min-width: 0; min-height: 37px; padding: 8px 10px; border: 1px solid #dce2e5; border-radius: 7px; background: #fff; color: #34414b; font: inherit; font-size: 12px; }
.telegram-form label input:focus-visible { outline: 2px solid #9bbac9; outline-offset: 1px; }
.telegram-form .telegram-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.telegram-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.telegram-chat-list { display: grid; gap: 5px; margin-top: 10px; }
.telegram-chat-list button { padding: 8px 10px; border: 1px solid #dce2e5; border-radius: 7px; background: #fff; color: #34414b; text-align: left; cursor: pointer; }
.telegram-chat-list button:hover { background: #f2f6f8; }
.telegram-hint { color: #7c8891; font-size: 11px; line-height: 1.55; }
@media (max-width: 660px) { .telegram-form-grid { grid-template-columns: 1fr; } .telegram-health-alert { max-width: 118px; line-height: 1.2; } }
.process-linked-task { display: inline-block; margin-top: 8px; padding: 3px 7px; border: 1px solid #dbe5e9; border-radius: 6px; background: #f4f8f9; color: #57717e; font-size: 10px; font-weight: 600; }
.profile-settings { width: min(600px,calc(100vw - 24px)); overflow: hidden; }
.profile-settings-body { max-height: calc(100dvh - 112px); overflow-y: auto; scrollbar-gutter: stable; }

/* neutral.css */
/* Quiet surfaces let task content, priority, and completion carry the color. */
:root {
  --bg: #f6f7f8;
  --panel: #fff;
  --ink: #27303a;
  --muted: #77818c;
  --line: #e5e8eb;
  --purple: #566679;
  --purple-dark: #455467;
  --red: #ac7272;
  --shadow: 0 10px 28px rgba(40, 48, 58, .07);
  --soft-shadow: 0 3px 14px rgba(40, 48, 58, .035);
}
body, .login-screen { background: var(--bg); }
.login-screen { background-image: radial-gradient(circle at 80% 15%, #ebeff1, transparent 30%); }
.brand-mark { background: linear-gradient(145deg, #113d6b, #176ca5 58%, #43afcf); box-shadow: 0 5px 13px rgba(22, 93, 145, .22), inset 0 1px rgba(255,255,255,.24); }
.brand-name em, .mobile-brand em { color: #176ca5; }
.nav-item.active, .project-nav-item.active { background: #edf0f2; color: #3f5061; }
.nav-item:hover, .project-nav-item:hover, .profile-menu button[role="menuitem"]:hover { background: #f1f3f4; color: #344454; }
.avatar, .assignee-avatar, .participant-avatar { background: #e9eef1; color: #4d6172; }
.button.primary { box-shadow: 0 3px 9px rgba(61, 73, 85, .12); }
.button.ghost { background: #f0f2f3; color: #53606c; }
.stat-icon, .doc-icon { background: #eef1f3; color: #657889; }
.select-trigger:hover, .select-option:hover, .select-option.is-active,
.participant-option:hover, .participant-option.is-active,
.date-open:hover, .date-popover-head button:hover, .date-day:hover,
.sidebar-toggle:hover, .project-nav-head button:hover,
.detail-section-action:hover, .detail-action-row .detail-edit-button:hover {
  border-color: #cbd3d9; background: #f0f3f5; color: #46596b;
}
.select-control.is-open .select-trigger, .select-trigger:focus-visible,
.select:focus, input:focus, textarea:focus {
  border-color: #9aaab7; box-shadow: 0 0 0 3px rgba(94, 113, 130, .11);
}
.nav-item:focus-visible, .button:focus-visible, .text-link:focus-visible,
.icon-button:focus-visible, .select-trigger:focus-visible, .select-option:focus-visible,
.task-card:focus-visible, .task-title-link:focus-visible { outline-color: #748899; }
.project-tabs button:hover, .project-tabs button.active { color: #4b5e70; }
.project-tabs button.active::after { background: #738697; }
.week-day.is-today { border-color: #c9d4db; background: #f0f4f6; }
.knowledge-item:hover, .knowledge-item.active { background: #edf1f3; color: #455c6d; }
.add-column-trigger:hover, .add-column-trigger:focus-visible { background: #edf1f3; color: #455c6d; }
.stage-column.is-drop-target { outline-color: #a1b0bc; background: #eef2f4; }
.account-link { color: #536a7c; }
.account-dialog label input:focus, .account-inline-form input:focus, .account-password-form input:focus { border-color: #9aaab7; box-shadow: 0 0 0 3px rgba(94, 113, 130, .11); }
.project-metric-dot.status-doing { background: #8ea2b0; }
.project-metric-dot.status-done, .status-dot { background: #8cae98; }

.priority-low, .pill.green { background: #edf3ed; color: #56755e; }
.priority-normal, .pill.orange { background: #f6f1e8; color: #8c724c; }
.priority-high, .pill.red { background: #f6eded; color: #a66b6b; }
.pill.purple, .status-badge.status-doing, .cal-item, .detail-complete-button { background: #edf1f4; color: #586d7e; }
.status-badge.status-todo { background: #eff1f2; color: #66717a; }
.status-badge.status-done, .cal-item.done, .detail-complete-button.is-complete { background: #ecf3ed; color: #587a63; }
.detail-complete-button:hover { background: #e4eaee; }
.detail-complete-button.is-complete:hover { background: #e2ede4; }
.task-detail.is-done .detail-toolbar { background: #f7faf7; }
.task-detail.is-done .detail-heading h2 { color: #4f6d59; }

.column { background: #f5f6f7; }
.column-doing { background: #f3f5f6; }
.column-done { background: #f4f7f4; }
.column-head::before { background: color-mix(in srgb, var(--column-color, #8d99a2) 38%, #929ca5); }
.column-doing .column-head::before { background: #8296a5; }
.column-done .column-head::before { background: #85a28b; }
.column.is-drop-target { outline-color: #a1b0bc; background: #eef2f4; }
.task-card { border-left-color: color-mix(in srgb, var(--column-color, #929baa) 35%, #9da8b0); }
.task-card.status-todo { background: #fff; color: var(--ink); }
.task-card.status-doing { border-left-color: #90a4b2; background: #fff; color: var(--ink); }
.task-card.status-done { border-color: #dbe7dc; border-left-color: #8eaf96; background: #f8fbf8; }
.task-card.status-doing h4 { color: var(--ink); }
.task-card.status-done { color: #506e59; }
.task-card.status-done h4, .task-list-row.status-done .task-title-link { color: #506e59; }
.task-card.status-done p { color: #778e7c; }
.task-card:focus-within, .task-card:hover, .deal-card:hover { border-color: #cdd6dc; }
.task-card-tags .task-tag { background: #e9eef1; color: #566e7d; }
.task-tag-more { color: #63798a; }
.assignee-pill { border-color: #dce4e9; background: #f0f3f5; color: #546775; }
.task-card-order button { background: #edf1f3; color: #607587; }
.task-card-order button:hover, .task-card-order button:focus-visible { background: #dfe7ec; }
.quick-task-trigger:hover, .quick-task-trigger:focus-visible, .quick-task-trigger[aria-expanded="true"] { border-color: #becbd3; background: #f0f3f5; color: #475b6c; }
.quick-task-form { border-color: #cbd5db; }
.status-badge[style] { border: 1px solid color-mix(in srgb, var(--column-color) 35%, white); background: color-mix(in srgb, var(--column-color) 21%, white); color: color-mix(in srgb, var(--column-color) 78%, #24374a); }
.status-badge.status-todo[style] { border-color: #c8d7e5; background: #e6eff7; color: #355e7e; }
.status-badge.status-doing[style] { border-color: #b5d8ec; background: #dceffa; color: #176487; }
.status-badge.status-done[style] { border-color: #b9ddc6; background: #dff3e7; color: #27714a; }
.date-day.is-today { box-shadow: inset 0 0 0 1px #9aaab7; }
.day-event { border-color: #cbd8e0; border-left-color: #7e98aa; background: #eef3f6; color: #526a7b; }
.day-event.is-done { border-color: #d7e6da; border-left-color: #91b29a; background: #eff6f0; color: #57735e; }

#task-detail .detail-stage-line button, #process-detail .detail-stage-line button { background: #fafbfb; color: #7f8993; }
#process-detail .detail-stage-line button:hover, #process-detail .detail-stage-line button.active { border-color: #cad4db; background: #e8eef2; color: #4c6374; }
#process-detail .detail-stage-line button[data-process-stage="won"].active { border-color: #d4e3d8; background: #eaf3ec; color: #57765f; }
#task-detail .detail-stage-line button:hover, #task-detail .detail-stage-line button:focus-visible,
#task-detail .detail-stage-line button.active { border-color: #cad4db; background: #e8eef2; color: #4c6374; }
#task-detail .detail-stage-line .stage-todo:hover, #task-detail .detail-stage-line .stage-todo.active { border-color: #dce1e4; background: #eef0f1; color: #5e6a73; }
#task-detail .detail-stage-line button.stage-doing:hover, #task-detail .detail-stage-line button.stage-doing.active { border-color: #cad4db; background: #e8eef2; color: #4c6374; }
#task-detail .detail-stage-line .stage-done:hover, #task-detail .detail-stage-line .stage-done.active { border-color: #d4e3d8; background: #eaf3ec; color: #57765f; }
.detail-type, .detail-file-icon, .detail-time-list > div strong { color: #61778a; }
.detail-file-icon { background: #edf2f5; }
.detail-history-dot { background: #91a3b1; box-shadow: 0 0 0 3px #edf1f4; }
.detail-comment-dock button { background: #e9eff2; color: #526779; }

/* Focused semantic color against the quiet workspace. */
.priority-low, .pill.green { background: #e3f5e9; color: #27784b; }
.priority-normal, .pill.orange { background: #fff0d1; color: #91620b; }
.priority-high, .pill.red { background: #ffe3e4; color: #b94654; }
.priority-badge { font-weight: 650; }
.priority-badge > span { width: 7px; height: 7px; }

.task-tag { gap: 4px; border: 1px solid transparent; font-weight: 600; }
.task-card-tags .task-tag.tag-tone-0, .detail-tags .tag-tone-0 { background: #e8e9ff; border-color: #d8dbff; color: #5c5cb7; }
.task-card-tags .task-tag.tag-tone-1, .detail-tags .tag-tone-1 { background: #ddf3f1; border-color: #c5e9e6; color: #247a76; }
.task-card-tags .task-tag.tag-tone-2, .detail-tags .tag-tone-2 { background: #fff0dd; border-color: #f7e1bf; color: #95661e; }
.task-card-tags .task-tag.tag-tone-3, .detail-tags .tag-tone-3 { background: #f8e7f1; border-color: #f0d5e5; color: #9a4979; }
.task-card-tags .task-tag.tag-tone-4, .detail-tags .tag-tone-4 { background: #e6efff; border-color: #d2e2fc; color: #426bb0; }
.task-card-tags .task-tag { background: #e6efff; }

.assignee-pill { --assignee-bg: #e9edff; --assignee-border: #dce2fa; --assignee-ink: #4e61a5; --avatar-bg: #d5defb; max-width: 100%; border-color: var(--assignee-border); background: var(--assignee-bg); color: var(--assignee-ink); font-weight: 650; }
.assignee-pill .assignee-avatar { background: var(--avatar-bg); color: var(--assignee-ink); }
.assignee-tone-0 { --assignee-bg: #e9edff; --assignee-border: #dce2fa; --assignee-ink: #4e61a5; --avatar-bg: #d5defb; }
.assignee-tone-1 { --assignee-bg: #e0f4ee; --assignee-border: #cce9dd; --assignee-ink: #287861; --avatar-bg: #bde5d5; }
.assignee-tone-2 { --assignee-bg: #fff0dc; --assignee-border: #f5dfbd; --assignee-ink: #94641c; --avatar-bg: #f8dba8; }
.assignee-tone-3 { --assignee-bg: #f6e7f4; --assignee-border: #ecd5e9; --assignee-ink: #925b8c; --avatar-bg: #e9d0e7; }
.assignee-tone-4 { --assignee-bg: #e6f1fc; --assignee-border: #d1e4f4; --assignee-ink: #3d719e; --avatar-bg: #c8e0f5; }
.detail-property-value .assignee-pill { margin: 0; }
.task-list-title .assignee-pill { flex: none; max-width: 112px; margin: 0; }
.task-list-title .task-title-link { min-width: 0; }
.detail-tags .task-tag { max-width: 180px; padding: 5px 8px; }
.detail-tags .task-tag .icon { width: 12px; height: 12px; }
.detail-tags .task-tag span:last-child { overflow: hidden; text-overflow: ellipsis; }

.week-day { display: flex; flex-direction: column; cursor: pointer; }
.week-day-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; width: 100%; min-height: 30px; padding: 3px 5px 8px; border: 0; border-radius: 5px; background: transparent; color: #4b5865; font: inherit; font-size: 11px; font-weight: 700; text-align: left; text-transform: capitalize; cursor: pointer; }
.week-day-head .icon { width: 14px; height: 14px; color: #8998a4; }
.week-day-head:hover, .week-day-head:focus-visible { background: #e9eef2; color: #314b5f; outline: none; }
.week-day-head:hover .icon, .week-day-head:focus-visible .icon { color: #456b86; }
.week-day-tasks { min-height: 0; overflow-y: auto; }
.week-empty { display: block; width: 100%; padding: 10px 5px; border: 0; border-radius: 5px; background: transparent; color: #8a98a3; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.week-empty:hover, .week-empty:focus-visible { background: #e9eef2; color: #4a6a80; outline: none; }
.week-day-add { display: inline-flex; align-items: center; gap: 5px; width: 100%; min-height: 29px; margin-top: auto; padding: 5px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #687b88; font-size: 11px; font-weight: 600; text-align: left; cursor: pointer; }
.week-day-add .icon { width: 13px; height: 13px; }
.week-day-add:hover, .week-day-add:focus-visible { border-color: #d1dce3; background: #eef3f6; color: #415f73; outline: none; }
.week-day.is-today .week-day-head { color: #365d76; }
.week-task:focus-visible { outline: 2px solid #748899; outline-offset: -2px; }

/* Quiet grabber, with a wider invisible pointer target. */
.detail-resize-handle {
  inset: auto auto auto -7px;
  top: 50%;
  width: 20px;
  height: 68px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  transition: background-color 140ms ease;
}
.detail-resize-handle::after {
  top: 50%; left: 8px; width: 4px; height: 33px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px; background: #b5c2ca; opacity: .68;
  box-shadow: 0 0 0 1px rgba(255,255,255,.8);
  transition: opacity 140ms ease, height 140ms ease, background-color 140ms ease;
}
.detail-resize-handle:hover, .detail-resize-handle:focus-visible, .is-resizing-detail .detail-resize-handle {
  background: rgba(238,243,246,.85);
}
.detail-resize-handle:hover::after, .detail-resize-handle:focus-visible::after, .is-resizing-detail .detail-resize-handle::after { height: 42px; background: #718c9c; opacity: 1; }
.detail-resize-handle:focus-visible { outline: 2px solid #748899; outline-offset: 2px; }
.task-detail.detail-full .detail-resize-handle { display: none; }

/* Description can be edited without leaving the task sheet. */
#task-detail .detail-description { min-height: 126px; }
.detail-description-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#task-detail .detail-description-head h3 { margin: 0; }
.detail-description-edit { padding: 4px 7px; border: 0; border-radius: 5px; background: transparent; color: #6c7d89; font-size: 11px; }
.detail-description-edit:hover, .detail-description-edit:focus-visible { background: #edf1f4; color: #41596b; }
#task-detail .detail-copy { display: block; width: 100%; min-height: 66px; padding: 7px 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #3f4b55; font: inherit; font-size: 13px; line-height: 1.7; text-align: left; white-space: pre-wrap; cursor: text; }
#task-detail .detail-copy.is-empty { color: #89939b; }
#task-detail .detail-copy:hover, #task-detail .detail-copy:focus-visible { border-color: #dce5e9; background: #f8fafb; outline: none; }
.detail-description-form { display: grid; gap: 10px; }
.detail-description-form[hidden], .detail-description-edit[hidden], .detail-copy[hidden] { display: none !important; }
.detail-description-form textarea { width: 100%; min-height: 146px; padding: 11px 12px; resize: vertical; border-color: #d7e0e5; font-size: 13px; line-height: 1.6; }
.detail-description-actions { display: flex; justify-content: flex-end; gap: 8px; }
.detail-description-actions .button { min-height: 32px; }

@media (max-width: 720px) {
  .detail-resize-handle { display: none; }
  #task-detail .detail-description { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .detail-resize-handle { transition: none; }
}

/* auth.css */
/* The first screens use the same quiet proportions as the workspace. */
.login-screen {
  padding: 22px 14px;
  background: radial-gradient(circle at 50% 3%, #edf1f3 0, transparent 47%), #f6f7f8;
}
.auth-card, .auth-dialog {
  width: min(420px, calc(100vw - 28px));
  min-height: 426px;
  padding: 28px 30px 25px;
  border: 1px solid #e1e6e9;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(42, 54, 65, .09), 0 2px 8px rgba(42, 54, 65, .03);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}
.auth-dialog { max-height: calc(100dvh - 28px); overflow-y: auto; }
.auth-dialog::backdrop { background: rgba(35, 45, 54, .35); backdrop-filter: blur(4px); }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-card .brand-mark, .auth-dialog .brand-mark {
  width: 38px; height: 38px; flex: none; margin: 0; border-radius: 10px;
  font-size: 21px; line-height: 1;
}
.auth-brand-text strong, .auth-brand-text small { display: block; }
.auth-brand-text strong { font-size: 15px; font-weight: 650; letter-spacing: -.025em; }
.auth-brand-text small { margin-top: 2px; color: #8a949d; font-size: 10px; font-weight: 450; }
.auth-dialog-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.auth-dialog-top .icon-button { width: 36px; height: 36px; flex: none; padding: 9px; border: 1px solid #e4e9ed; background: #f7f9fa; color: #637481; }
.auth-dialog-top .icon-button:hover { background: #f0f2f3; color: #4a5865; }
.auth-dialog-top .icon { width: 16px; height: 16px; }
.auth-intro { margin: 30px 0 23px; }
.auth-kicker { display: block; margin-bottom: 8px; color: #8796a1; font-size: 10px; font-weight: 650; letter-spacing: .105em; }
.auth-intro h1, .auth-intro h2 { margin: 0 0 8px; color: #24303a; font-size: 25px; font-weight: 650; letter-spacing: -.038em; line-height: 1.18; }
.auth-intro p, .auth-dialog .auth-intro p { max-width: 340px; margin: 0; color: #7b8791; font-size: 12px; line-height: 1.55; }
.auth-fields { display: grid; gap: 14px; }
.auth-card .auth-fields label, .auth-dialog .auth-fields label {
  display: grid; gap: 7px; margin: 0; color: #53606b; font-size: 11px; font-weight: 600;
}
.auth-card .auth-fields input, .auth-dialog .auth-fields input {
  display: block; width: 100%; height: 43px; min-height: 43px; margin: 0; padding: 0 12px;
  border: 1px solid #dfe5e9; border-radius: 9px; background: #fbfcfc;
  color: #26323b; font-size: 13px; font-weight: 450; box-shadow: none;
}
.auth-card .auth-fields input::placeholder, .auth-dialog .auth-fields input::placeholder { color: #abb4bb; }
.auth-card .auth-fields input:hover, .auth-dialog .auth-fields input:hover { border-color: #c9d3da; }
.auth-card .auth-fields input:focus, .auth-dialog .auth-fields input:focus {
  border-color: #8da0ad; background: #fff; box-shadow: 0 0 0 3px rgba(99, 120, 136, .10);
}
.auth-submit, .auth-dialog .auth-submit {
  display: flex; width: 100%; min-height: 42px; margin-top: 20px;
  border-radius: 9px; font-size: 12px; font-weight: 600; box-shadow: none;
}
.auth-submit:disabled { opacity: .7; cursor: wait; transform: none; }
.auth-feedback {
  margin: 14px 0 -7px; padding: 10px 11px; border: 1px solid #dbe4e8;
  border-radius: 8px; background: #f4f7f8; color: #516575;
  font-size: 11px; line-height: 1.5;
}
.auth-feedback[hidden], .auth-status[hidden], #register-form[hidden] { display: none !important; }
.auth-card .auth-feedback, .auth-dialog #register-message { height: 56px; min-height: 56px; max-height: 56px; margin: 12px 0 -7px; overflow-wrap: anywhere; overflow-y: auto; }
.auth-card .auth-feedback[hidden] { display: block !important; visibility: hidden; }
.auth-dialog #register-message[hidden] { display: block !important; visibility: hidden; }
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 23px; padding-top: 17px; border-top: 1px solid #edf0f2; }
.auth-foot > span { color: #89939c; font-size: 11px; }
.auth-foot .account-link { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 2px 0; color: #4f6475; font-size: 11px; font-weight: 600; white-space: nowrap; }
.auth-foot .account-link:hover { color: #314b5c; text-decoration: none; }
.auth-foot .account-link span { font-size: 15px; font-weight: 400; }

.auth-dialog.is-status[open] { display: flex; flex-direction: column; }
.auth-dialog.is-status .auth-intro { display: none; }
.auth-dialog .auth-dialog-note { margin: 22px 0 0; padding-top: 15px; border-top: 1px solid #edf0f2; color: #929ca5; font-size: 10px; line-height: 1.55; }
.auth-status { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 19px 0 0; text-align: center; }
.auth-status-visual {
  position: relative; display: grid; place-items: center; width: 70px; height: 70px;
  margin: 0 auto 22px; padding: 0; border: 1px solid #dfe6ea; border-radius: 21px;
  background: #f5f8f9; color: #6d8597; box-shadow: 0 8px 18px rgba(67, 83, 95, .07);
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.auth-status-visual:disabled { cursor: default; }
.auth-status-spinner { width: 32px; height: 32px; border: 2px solid #dce5ea; border-top-color: #708a9d; border-radius: 50%; animation: auth-spin 1.15s linear infinite; }
.auth-status-visual .icon { display: none; width: 30px; height: 30px; }
.auth-status[data-status="approved"] .auth-status-visual { border-color: #d7e5db; background: #edf5ef; color: #5b8466; cursor: pointer; animation: auth-arrive 360ms cubic-bezier(.22,.72,.16,1); }
.auth-status[data-status="approved"] .auth-status-visual:hover { transform: translateY(-2px); }
.auth-status[data-status="rejected"] .auth-status-visual, .auth-status[data-status="unavailable"] .auth-status-visual { border-color: #eaded9; background: #faf4f1; color: #a27b6d; }
.auth-status[data-status="approved"] .auth-status-spinner, .auth-status[data-status="rejected"] .auth-status-spinner, .auth-status[data-status="unavailable"] .auth-status-spinner { display: none; }
.auth-status[data-status="approved"] .auth-status-check, .auth-status[data-status="rejected"] .auth-status-rejected, .auth-status[data-status="unavailable"] .auth-status-rejected { display: block; }
.auth-status h3 { margin: 0 0 9px; color: #2b3740; font-size: 19px; font-weight: 620; letter-spacing: -.025em; }
.auth-status p, .auth-dialog .auth-status p { min-height: 38px; max-width: 315px; margin: 0; color: #7d8993; font-size: 12px; line-height: 1.55; }
.auth-status-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; margin-top: 25px; }
.auth-status-steps span { padding: 8px 2px; border-top: 2px solid #e9edf0; color: #a1aab2; font-size: 10px; font-weight: 550; }
.auth-status-steps span.is-complete { border-color: #91aa98; color: #617966; }
.auth-status-steps span.is-current { border-color: #829baa; color: #587184; }
.auth-status .auth-submit { margin-top: 18px; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@keyframes auth-arrive { from { opacity: .7; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 480px) {
  .auth-card, .auth-dialog { min-height: 0; padding: 24px 22px 22px; border-radius: 15px; }
  .auth-dialog.is-status { min-height: 392px; }
  .auth-intro { margin-top: 27px; }
  .auth-intro h1, .auth-intro h2 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-status-spinner { animation: none; border-color: #dce5ea; border-top-color: #708a9d; }
  .auth-status[data-status="approved"] .auth-status-visual { animation: none; }
  .auth-status-visual { transition: none; }
}

/* final-qa.css */
/* Final interaction pass: stable hover geometry and visible keyboard focus. */
.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 100;
  padding: 9px 13px;
  border-radius: 8px;
  background: #fff;
  color: #273b4c;
  box-shadow: 0 6px 20px rgba(30, 45, 55, .18);
}
.skip-link:focus { top: 10px; }

.build-version { color: #9aa5ad; font-size: 10px; font-weight: 500; letter-spacing: .015em; }
.auth-version { margin-top: 16px; text-align: center; }
.side-note .build-version { margin-top: 5px; }

.button.primary:hover,
.task-card:hover,
.doc-card:hover,
.contact-card:hover { transform: none; }

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible,
[role="slider"]:focus-visible,
.week-day-head:focus-visible,
.week-empty:focus-visible,
.week-day-add:focus-visible {
  outline: 2px solid #657f90;
  outline-offset: 2px;
}

#task-detail .detail-copy:focus-visible {
  outline: 2px solid #657f90;
  outline-offset: 2px;
}

.task-detail,
.account-dialog,
.profile-settings { overscroll-behavior: contain; }

.view h1,
.task-detail h2 { text-wrap: balance; }

.count,
.stat-value { font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  #task-detail .detail-stage-line {
    scrollbar-width: thin;
    scrollbar-color: #b8c5cd transparent;
    padding-bottom: 5px;
    overscroll-behavior-inline: contain;
  }
}

@media (max-width: 420px) {
  .topbar { padding-inline: 10px; }
  .top-actions { gap: 7px; }
  .telegram-health-alert { max-width: 105px; padding-inline: 7px; font-size: 10px; }
}

@media (max-width: 360px) {
  #quick-add { width: 34px; min-width: 34px; height: 34px; padding: 0; }
  #quick-add .quick-add-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  .task-card,
  .doc-card,
  .contact-card { transition-duration: 0ms; animation-duration: 0ms; }
}

/* iPhone Safari zooms focused form controls when their text is smaller than 16px. */
@media (max-width: 1024px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  textarea,
  select,
  [contenteditable="true"] {
    font-size: 16px !important;
  }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select { min-height: 44px; }
}

/* hierarchy.css */
/* Hierarchy preview: full-width aligned rows with a restrained connector tree. */
.hierarchy-list { overflow-x: auto; overflow-anchor: none; }
.hierarchy-list .task-list-head,
.hierarchy-list .hierarchy-row { grid-template-columns: minmax(340px, 2.6fr) minmax(82px, .8fr) minmax(100px, .8fr) minmax(84px, .65fr) minmax(84px, .7fr); min-width: 730px; }
.hierarchy-list .task-list-head { padding-left: 16px; }
.hierarchy-roots,
.hierarchy-children { margin: 0; padding: 0; list-style: none; }
.hierarchy-children { overflow: hidden; }
.hierarchy-row { min-height: 52px; background: #fff; transition: background-color 150ms ease; }
.hierarchy-row:hover,
.hierarchy-row:focus-within { background: #f8fafb !important; }
.hierarchy-row .task-list-title { gap: 8px; padding-left: calc(var(--depth) * 22px); }
.hierarchy-row .task-title-link { flex: 1; min-width: 42px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 550; }
.hierarchy-row .task-list-title small { margin-left: 0; font-variant-numeric: tabular-nums; }
.hierarchy-toggle,
.hierarchy-toggle-spacer { display: inline-grid; flex: none; place-items: center; width: 26px; height: 30px; }
.hierarchy-toggle { padding: 0; border: 0; border-radius: 7px; background: transparent; color: #687886; cursor: pointer; }
.hierarchy-toggle:hover,
.hierarchy-toggle:focus-visible { background: #e9eef1; color: #263e50; }
.hierarchy-toggle .icon { width: 16px; height: 16px; transition: transform 220ms cubic-bezier(.22,.72,.2,1); }
.hierarchy-toggle[aria-expanded="true"] .icon { transform: rotate(90deg); }
.hierarchy-node { position: relative; }
.hierarchy-children { margin: 0; padding: 0; border: 0; }
.hierarchy-children > .hierarchy-node::before,
.hierarchy-children > .hierarchy-node::after { content: ''; position: absolute; z-index: 1; pointer-events: none; }
.hierarchy-children > .hierarchy-node::before { top: 0; bottom: 0; left: calc(28px + (var(--depth) - 1) * 22px); border-left: 1px solid #aebfca; }
.hierarchy-children > .hierarchy-node:last-child::before { bottom: auto; height: 26px; }
.hierarchy-children > .hierarchy-node::after { top: 26px; left: calc(28px + (var(--depth) - 1) * 22px); width: 9px; border-top: 1px solid #aebfca; }
.work-mark { display: inline-flex; flex: none; align-items: center; min-height: 22px; padding: 2px 7px; border: 1px solid transparent; border-radius: 6px; font-size: 10px; font-weight: 650; line-height: 1; white-space: nowrap; }
.work-mark-epic { color: #67399d; border-color: #d8bff3; background: #eadcfb; }
.work-mark-story { color: #17618e; border-color: #bdddf2; background: #dceeff; }
.work-mark-task { color: #3a6380; border-color: #c7dce9; background: #e1edf6; }
.work-mark-subtask { color: #257348; border-color: #bce4cb; background: #daf2e3; }
.hierarchy-row .work-mark-task { display: none; }
.task-card-title .work-mark { font-size: 9px; padding-inline: 5px; }
.work-progress { flex: none; color: #697c87; background: #eef3f5; border-radius: 5px; padding: 3px 6px; font-size: 10px; font-variant-numeric: tabular-nums; }
.hierarchy-add-child { display: inline-grid; flex: none; place-items: center; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #738796; cursor: pointer; }
.hierarchy-add-child:hover,
.hierarchy-add-child:focus-visible { border-color: #d5e0e6; background: #edf3f6; color: #39566b; }
.hierarchy-add-child .icon { width: 15px; height: 15px; }
@media (hover: hover) {
  .hierarchy-add-child { opacity: 0; transition: opacity 120ms ease, background-color 120ms ease; }
  .hierarchy-row:hover .hierarchy-add-child,
  .hierarchy-row:focus-within .hierarchy-add-child { opacity: 1; }
}
.hierarchy-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 7px 14px; border-bottom: 1px solid #e8ecef; color: #6b7a86; font-size: 11px; font-weight: 600; }
.hierarchy-toolbar > div { display: flex; flex-wrap: wrap; gap: 6px; }
.hierarchy-toolbar button { display: inline-flex; align-items: center; gap: 4px; min-height: 31px; padding: 5px 9px; border: 1px solid #e0e6e9; border-radius: 7px; background: #fff; color: #566a79; font: inherit; cursor: pointer; }
.hierarchy-toolbar button:hover,
.hierarchy-toolbar button:focus-visible { border-color: #bccbd4; background: #f1f5f7; color: #34546b; }
.hierarchy-toolbar .icon { width: 13px; height: 13px; }
.hierarchy-row .assignee-pill { max-width: 105px; }
.detail-hierarchy-list { display: grid; gap: 6px; }
.detail-hierarchy-list button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 37px; padding: 6px 8px; border: 1px solid #e5ebee; border-radius: 7px; background: #fff; color: #445969; text-align: left; cursor: pointer; }
.detail-hierarchy-list button:hover { background: #f5f8f9; border-color: #cad7de; }
.detail-hierarchy-list button > span:last-child { margin-left: auto; color: #82919b; font-size: 11px; }
.detail-hierarchy-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.detail-hierarchy-form select { width: auto; max-width: min(100%, 230px); min-height: 32px; padding: 5px 8px; border-color: #dce5e9; border-radius: 7px; color: #3f596a; font-size: 12px; }
.detail-hierarchy-form select[name="parent_task_id"] { flex: 1 1 175px; min-width: 0; }
.detail-hierarchy-form .button { min-height: 32px; flex: none; }
.detail-hierarchy-form:focus-within { color: #244b64; }
@media (max-width: 720px) { .detail-hierarchy-form select { max-width: 100%; } }

/* Each visible tab represents a parent sheet kept in the open task trail. */
#task-detail.detail-layered:not(.detail-full) { width: min(calc(var(--detail-width, 668px) + var(--detail-peek-width, 0px)), 100vw); transition: width 230ms cubic-bezier(.22,.72,.2,1); }
#task-detail.detail-layered .task-detail-content { width: calc(100% - var(--detail-peek-width, 0px)); margin-left: var(--detail-peek-width, 0px); transition: margin-left 230ms cubic-bezier(.22,.72,.2,1), width 230ms cubic-bezier(.22,.72,.2,1); }
#task-detail .detail-layer-rail[hidden] { display: none; }
#task-detail .detail-layer-rail { position: absolute; z-index: 3; inset: 0 auto 0 0; display: flex; width: var(--detail-peek-width, 0px); background: #eef3f7; }
#task-detail .detail-layer-tab { display: flex; flex: 1; min-width: 0; align-items: center; gap: 9px; flex-direction: column; padding: 22px 4px 12px; border: 0; border-right: 1px solid #dce7ed; background: #f7fafc; color: #46647a; cursor: pointer; box-shadow: inset -6px 0 13px rgba(34,63,83,.035); }
#task-detail .detail-layer-tab:hover,
#task-detail .detail-layer-tab:focus-visible { background: #eaf3f9; color: #1c5e86; }
#task-detail .detail-layer-tab:focus-visible { outline: 2px solid #2c83b0; outline-offset: -3px; }
#task-detail .detail-layer-tab.detail-layer-epic { box-shadow: inset 3px 0 #b486e4, inset -6px 0 13px rgba(34,63,83,.035); }
#task-detail .detail-layer-tab.detail-layer-story { box-shadow: inset 3px 0 #6bb3df, inset -6px 0 13px rgba(34,63,83,.035); }
#task-detail .detail-layer-tab.detail-layer-task { box-shadow: inset 3px 0 #8badc5, inset -6px 0 13px rgba(34,63,83,.035); }
#task-detail .detail-layer-type { writing-mode: vertical-rl; font-size: 11px; font-weight: 700; letter-spacing: .035em; }
#task-detail .detail-layer-id { writing-mode: vertical-rl; color: #8b9ead; font-size: 10px; }

@media (max-width: 680px) {
  #task-detail.detail-layered .detail-layer-rail { inset: 0 0 auto; width: 100%; height: 44px; border-bottom: 1px solid #dce7ed; }
  #task-detail.detail-layered .detail-layer-tab { flex: 0 1 auto; flex-direction: row; gap: 6px; max-width: 50%; padding: 0 12px; border-right: 1px solid #dce7ed; box-shadow: none; }
  #task-detail.detail-layered .detail-layer-type,
  #task-detail.detail-layered .detail-layer-id { writing-mode: horizontal-tb; }
  #task-detail.detail-layered .task-detail-content { width: 100%; height: 100%; margin: 0; padding-top: 44px; }
  .hierarchy-list .task-list-head,
  .hierarchy-list .hierarchy-row { min-width: 0; grid-template-columns: minmax(0, 1fr) 92px; gap: 6px; }
  .hierarchy-list .task-list-head span:nth-child(2),
  .hierarchy-list .task-list-head span:nth-child(4),
  .hierarchy-list .task-list-head span:nth-child(5),
  .hierarchy-row > span:nth-child(2),
  .hierarchy-row > span:nth-child(4),
  .hierarchy-row > span:nth-child(5) { display: none; }
  .hierarchy-row { min-height: 55px; padding-inline: 7px; }
  .hierarchy-row .task-list-title { gap: 5px; padding-left: calc(var(--depth) * 18px); }
  .hierarchy-row .check { flex: none; }
  .hierarchy-row .task-title-link { font-size: 11px; }
  .hierarchy-row .task-list-title small,
  .hierarchy-row .assignee-pill { display: none; }
  .hierarchy-toggle,
  .hierarchy-toggle-spacer { width: 22px; }
  .hierarchy-add-child { display: none; }
  .hierarchy-children > .hierarchy-node::before,
  .hierarchy-children > .hierarchy-node::after { left: calc(18px + (var(--depth) - 1) * 18px); }
  .hierarchy-children > .hierarchy-node::before { height: auto; }
  .hierarchy-children > .hierarchy-node:last-child::before { height: 27px; }
  .hierarchy-children > .hierarchy-node::after { top: 27px; width: 7px; }
  .hierarchy-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .hierarchy-toggle .icon,
  .hierarchy-row,
  #task-detail.detail-layered,
  #task-detail.detail-layered .task-detail-content { transition: none; }
}

/* craft.css */
/* Functional refinements shared by all future color directions. */
:root { --hairline: #dce3e8; --quiet-blue: #eaf0f4; }
html, body, .shell, .main { max-width: 100%; }
.main, .view, .calendar-wrap, .calendar-grid, .cal-cell { min-width: 0; }
.view { width: 100%; }

/* Compact controls keep their geometry on hover and focus. */
.button, .icon-button, .select-trigger, .select-option, .cal-item,
.detail-description-edit, .detail-shortcuts button {
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}
.button.primary { box-shadow: none; }
.button.primary:hover { box-shadow: none; transform: none; }
.button.ghost { border: 1px solid transparent; }
.button.ghost:hover { border-color: var(--hairline); background: #e9eef1; }
.task-card:hover, .doc-card:hover, .contact-card:hover { box-shadow: none; transform: none; }
.task-card:hover { border-color: #b9c8d2; }

/* Popovers remain aligned to their trigger inside the browser top layer. */
dialog .select-menu { position: absolute; }
.select-menu {
  border-color: var(--hairline);
  border-radius: 9px;
  box-shadow: 0 10px 30px rgba(26, 40, 52, .12);
  padding: 4px;
  background: #fff;
}
.select-option { min-height: 36px; border-radius: 6px; font-weight: 500; }
.select-option:hover, .select-option.is-active { background: var(--quiet-blue); color: #244e69; }
.select-option.is-selected { color: #244e69; }
.select-trigger { border-radius: 7px; font-weight: 500; }
.select-trigger:hover { border-color: #a9bbc7; background: #fff; }
.select-control.is-open .select-trigger, .select-trigger:focus-visible {
  border-color: #688ba1; box-shadow: 0 0 0 2px rgba(45, 102, 136, .12);
}

/* The seven tracks must be allowed to shrink independently of task titles. */
.calendar-wrap { overflow: hidden; }
.calendar-grid { width: 100%; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-cell { min-width: 0; overflow: hidden; }
.cal-item {
  display: block; width: 100%; max-width: 100%; border: 0; border-left: 2px solid #85aabd;
  border-radius: 3px; padding: 5px 7px; text-align: left; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; line-height: 1.3; font-weight: 500;
}
.cal-item:hover { background: #dfe9ef; color: #2a5268; }
.cal-item.done { border-left-color: #82a78e; }
.cal-item.done:hover { background: #dcecdf; color: #466c50; }
.cal-day { border: 0; background: transparent; border-radius: 5px; min-width: 26px; min-height: 26px; }
.cal-day:hover { background: #e9eef1; }
.cal-day.today { border-radius: 6px; }
.calendar-head { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; min-width: 0; min-height: 38px; gap: 12px; }
.calendar-head h2 { min-width: 0; margin: 0; text-align: center; }
.calendar-nav { display: inline-flex; align-items: center; justify-self: start; gap: 6px; white-space: nowrap; }
.calendar-nav .button { flex: none; min-height: 36px; height: 36px; margin: 0; border-radius: 8px; line-height: 1; }
.calendar-nav .icon-only { width: 36px; min-width: 36px; padding: 0; }
.calendar-nav #cal-today { padding-inline: 13px; }
.calendar-nav .button:hover, .calendar-nav .button:focus-visible { transform: none; }

/* Show every process stage at once when the workspace has room. */
@media (min-width: 900px) {
  .crm-layout .pipeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-columns: auto; grid-auto-flow: row; overflow-x: visible;
  }
  .crm-layout .stage-column { min-width: 0; }
  .crm-layout .stage-column .deal-card { min-width: 0; overflow-wrap: anywhere; }
}

/* The toolbar gives the alert a bounded slot instead of stretching the page. */
.topbar { min-width: 0; max-width: 100%; gap: 14px; }
.breadcrumb { min-width: 0; overflow: hidden; white-space: nowrap; }
.breadcrumb span, .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; }
.top-actions { min-width: 0; flex: none; }
.telegram-health-alert { max-width: min(24vw, 220px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Task metadata stays compact, including the editable hierarchy. */
#task-detail .detail-scroll { padding-top: 25px; }
#task-detail .detail-heading, #task-detail .detail-properties,
#task-detail .detail-description, #task-detail .detail-activity { width: min(100%, 880px); margin-inline: auto; }
#task-detail .detail-heading h2 { line-height: 1.18; letter-spacing: -.025em; }
#task-detail .detail-shortcuts button { border-radius: 5px; padding: 3px 5px; }
#task-detail .detail-shortcuts button:hover { color: #315e78; background: #edf3f6; }
#task-detail .detail-property { grid-template-columns: minmax(118px, 150px) minmax(0, 1fr); }
#task-detail .detail-property-label { color: #788794; }
#task-detail .detail-property-value { color: #2e3b46; }
.detail-hierarchy-form { display: grid; grid-template-columns: minmax(105px, 142px) minmax(145px, 1fr) auto; gap: 6px; width: 100%; }
.detail-hierarchy-form .select-control { min-width: 0; }
.detail-hierarchy-form .select-trigger { min-height: 34px; padding-inline: 10px; font-size: 12px; }
.detail-hierarchy-form .button { min-height: 34px; padding-inline: 10px; white-space: nowrap; }
.detail-hierarchy-form .button[hidden] { display: none !important; }

/* Notifications live in the active dialog so the browser top layer cannot hide them. */
.toast {
  display: inline-flex; align-items: center; gap: 8px; max-width: min(460px, calc(100vw - 32px));
  background: #263b4a; color: #fff; border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px; box-shadow: 0 8px 26px rgba(19, 34, 43, .16);
  font-size: 12px; font-weight: 550; line-height: 1.4;
}
.toast[data-kind="success"]::before {
  content: '✓'; display: grid; place-items: center; width: 17px; height: 17px;
  flex: none; border-radius: 50%; background: #dcefe3; color: #285c40; font-weight: 800;
}
dialog .toast { position: absolute; z-index: 110; left: 50%; bottom: 74px; }

@media (max-width: 1100px) {
  .topbar .searchbox { width: 36px; justify-content: center; padding: 0; }
  .topbar .searchbox input, .topbar .searchbox kbd { display: none; }
  .telegram-health-alert { max-width: 125px; }
}
@media (max-width: 720px) {
  .topbar { gap: 6px; }
  .top-actions { gap: 6px; }
  .telegram-health-alert {
    width: 32px; min-width: 32px; max-width: 32px; height: 32px;
    padding: 0; font-size: 0; text-align: center;
  }
  .telegram-health-alert::before { content: '!'; display: inline-grid; place-items: center; font-size: 14px; font-weight: 750; }
  #quick-add { width: 34px; min-width: 34px; height: 34px; padding: 0; }
  #quick-add .quick-add-label { display: none; }
  .calendar-wrap { padding: 8px; }
  .calendar-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .cal-cell { min-height: 72px; padding: 4px; }
  .cal-weekday { min-height: 0; }
  .cal-item { display: inline-block; width: 7px; height: 7px; margin: 2px 2px 0 0; padding: 0; border: 0; border-radius: 50%; font-size: 0; vertical-align: middle; }
  .cal-more { font-size: 9px; }
  .calendar-hint { display: none; }
  .calendar-head { grid-template-columns: minmax(0, 1fr) auto; }
  .calendar-head h2 { justify-self: end; font-size: 13px; }
  #task-detail .detail-property { grid-template-columns: minmax(85px, 110px) minmax(0, 1fr); }
  .detail-hierarchy-form { grid-template-columns: minmax(0, 1fr); }
  .detail-hierarchy-form .button { width: fit-content; }
  dialog .toast { bottom: 70px; }
}
@media (max-width: 430px) {
  .calendar-head { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .calendar-head h2 { grid-row: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .icon-button, .select-trigger, .select-option, .cal-item,
  .detail-description-edit, .detail-shortcuts button { transition-duration: 0ms; }
}

/* themes.css */
:root {
  color-scheme: light;
  --bg:#f3f6f8;--panel:#fff;--ink:#203445;--muted:#657986;--line:#d8e1e7;
  --purple:#12608a;--purple-dark:#0c4f73;--theme-sidebar:#eaf0f4;
  --theme-soft:#e9f0f4;--theme-hover:#dce9f0;--theme-card:#fff;
  --theme-low:#fff;--theme-normal:#fff3e9;--theme-high:#fcebe8;
  --theme-border-normal:#dca66e;--theme-border-high:#cf7772;
}
:root[data-theme="night"] {
  color-scheme: dark;
  --bg:#111d28;--panel:#192b38;--ink:#eaf1f3;--muted:#b4c4cc;--line:#334653;
  --purple:#78bfd8;--purple-dark:#a2dcf0;--theme-sidebar:#14232f;
  --theme-soft:#213744;--theme-hover:#294454;--theme-card:#1c303e;
  --theme-low:#1c303e;--theme-normal:#2c343a;--theme-high:#382f38;
  --theme-border-normal:#c39064;--theme-border-high:#b76870;
  --shadow:none;--soft-shadow:none;
}
@media (min-width:721px) {
  .sidebar #nav {display:flex;flex-direction:column;bottom:190px;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;overscroll-behavior:contain}
  .sidebar #nav>.nav-item {flex:none}
  .sidebar #project-nav {position:static;inset:auto;width:100%;flex:none;min-height:0;margin:8px 0 0;padding:0 2px;overflow:visible}
  .sidebar-collapsed .sidebar #project-nav {display:none}
}
html,body,.sidebar,.main,.topbar,.view,.panel,.column,.task-card,.task-detail,.task-detail-content,
.modal,.account-dialog,.profile-settings,.calendar-wrap,.cal-cell,.project-summary,.project-settings-card,
.select-trigger,.select-menu,.date-popover,.participant-popover,.profile-menu,.search-results {
  transition:background-color 240ms ease,border-color 240ms ease,color 240ms ease;
}
body,.login-screen,.main,.view {background:var(--bg);color:var(--ink)}
.sidebar {background:var(--theme-sidebar);border-color:var(--line)}
.topbar {background:var(--panel);border-color:var(--line)}
.breadcrumb,.breadcrumb strong,.brand,.brand-name,.mobile-brand {color:var(--ink)}
.nav-item,.project-nav-item {color:var(--muted)}
.nav-item:hover,.project-nav-item:hover {background:var(--theme-hover);color:var(--ink)}
.nav-item.active,.project-nav-item.active {background:var(--theme-soft);color:var(--purple)}
.panel,.stat-card,.column,.doc-card,.contact-card,.project-summary,.project-settings-card,
.calendar-wrap,.day-dialog,.modal,.account-dialog,.profile-settings,.login-card,
.profile-menu,.search-results {background:var(--panel);color:var(--ink);border-color:var(--line);box-shadow:none}
.column,.stage-column {background:var(--theme-soft)}
.task-card {background:var(--theme-card);color:var(--ink);border-color:var(--line);box-shadow:none}
.task-card.priority-card-low {background:var(--theme-low)}
.task-card.priority-card-normal {background:var(--theme-normal);border-left:3px solid var(--theme-border-normal)}
.task-card.priority-card-high {background:var(--theme-high);border-left:3px solid var(--theme-border-high)}
.task-card.priority-card-normal:hover {border-color:var(--theme-border-normal)}
.task-card.priority-card-high:hover {border-color:var(--theme-border-high)}
.task-card.status-done {opacity:1}
.task-card h4,.task-card.status-done h4 {color:var(--ink)}
.task-card p,.task-card.status-done p,.card-foot {color:var(--muted)}
.task-detail,.task-detail-content,.detail-toolbar,.detail-property,.detail-section,.detail-layer-rail,
.detail-layer-tab {background:var(--panel);color:var(--ink);border-color:var(--line)}
.task-detail .detail-heading,.task-detail .detail-heading h2 {color:var(--ink)}
.detail-hierarchy-list button,.hierarchy-row,.hierarchy-toolbar,.hierarchy-toolbar button,
.task-list-row,.task-list-head,.week-day,.week-board,.week-nav,.week-backlog {background:var(--panel);color:var(--ink);border-color:var(--line)}
.hierarchy-children>.hierarchy-node::before,.hierarchy-children>.hierarchy-node::after {border-color:var(--muted)}
.hierarchy-row:hover,.hierarchy-row:focus-within {background:var(--theme-soft)!important}
.task-detail input,.task-detail textarea,.modal input,.modal textarea,.modal select,
.profile-settings input,.account-dialog input,.login-card input,.searchbox,.searchbox input,
.select-trigger,.select-menu,.select-option,.date-popover,.participant-popover {
  background:var(--panel);color:var(--ink);border-color:var(--line)}
.select-option:hover,.date-day:hover,.participant-option:hover,.search-result:hover,
.detail-hierarchy-list button:hover {background:var(--theme-hover);color:var(--ink)}
.button.ghost,.icon-button,.count,.pill,.task-card-order button {background:var(--theme-soft);color:var(--ink)}
.button.primary {background:#12608a;color:#fff;box-shadow:none}
.button.primary:hover {background:#0e5175;transform:none}
:root[data-theme="night"] .button.primary {background:#438dac;color:#fff}
:root[data-theme="night"] .button.primary:hover {background:#539dbc}
:root[data-theme="night"] .priority-low {background:#294a42;color:#a4d8b4}
:root[data-theme="night"] .priority-normal {background:#594637;color:#f0c096}
:root[data-theme="night"] .priority-high {background:#604247;color:#f4b6ae}
:root[data-theme="night"] .status-badge[style] {color:var(--ink);background:var(--theme-soft);border-color:var(--line)}
:root[data-theme="night"] .task-card.status-done {border-color:#486657;border-left-color:#76ae8d}
:root[data-theme="night"] .task-card.priority-card-normal {background:var(--theme-normal);border-left-color:var(--theme-border-normal)}
:root[data-theme="night"] .task-card.priority-card-high {background:var(--theme-high);border-left-color:var(--theme-border-high)}
:root[data-theme="night"] .task-card .task-card-description {color:#c0cdd2}
:root[data-theme="night"] .task-card .card-foot {color:#b7c6cd}
:root[data-theme="night"] .quick-task-trigger {background:#2b4050;color:#dae8ee;border:1px solid #496272}
:root[data-theme="night"] .quick-task-trigger:hover,
:root[data-theme="night"] .quick-task-trigger:focus-visible,
:root[data-theme="night"] .quick-task-trigger[aria-expanded="true"] {background:#36566a;color:#f3f8fa;border-color:#76a7bf}
:root[data-theme="night"] .quick-task-form {background:var(--theme-sidebar);border-color:var(--line)}
:root[data-theme="night"] .task-list,:root[data-theme="night"] .task-list-head,
:root[data-theme="night"] .task-list-row.status-todo,:root[data-theme="night"] .task-list-row.status-doing,
:root[data-theme="night"] .task-list-row.status-done,:root[data-theme="night"] .task-list-add,
:root[data-theme="night"] .week-day,:root[data-theme="night"] .week-task,
:root[data-theme="night"] .week-backlog-item,:root[data-theme="night"] .knowledge-layout,
:root[data-theme="night"] .knowledge-index,:root[data-theme="night"] .project-metrics button,
:root[data-theme="night"] .project-documents,:root[data-theme="night"] .project-document,
:root[data-theme="night"] .quick-task-form,:root[data-theme="night"] .account-row,
:root[data-theme="night"] .day-quick,:root[data-theme="night"] .day-slot,
:root[data-theme="night"] .day-unscheduled-item,:root[data-theme="night"] .detail-comment,
:root[data-theme="night"] .detail-actions,:root[data-theme="night"] .modal.editor-sheet .modal-actions,
:root[data-theme="night"] .participant-options,:root[data-theme="night"] .date-popover,
:root[data-theme="night"] .detail-stage-line button,:root[data-theme="night"] .view-switch {
  background:var(--panel);color:var(--ink);border-color:var(--line)}
:root[data-theme="night"] .task-list-row:hover,:root[data-theme="night"] .task-list-add:hover,
:root[data-theme="night"] .project-document:hover,:root[data-theme="night"] .week-task:hover,
:root[data-theme="night"] .day-slot:hover {background:var(--theme-soft)}
:root[data-theme="night"] .week-day.is-today,:root[data-theme="night"] .cal-cell.is-today {background:var(--theme-soft);border-color:var(--purple)}
:root[data-theme="night"] .select-trigger:hover,:root[data-theme="night"] .participant-option:hover,
:root[data-theme="night"] .participant-option.is-active,:root[data-theme="night"] .date-day:hover,
:root[data-theme="night"] .detail-stage-line button:hover {background:var(--theme-hover);color:var(--ink);border-color:var(--line)}
:root[data-theme="night"] .detail-stage-line button.active {background:#285269;color:#eaf1f3}
:root[data-theme="night"] .task-detail.is-done .detail-toolbar {background:#213d36}
:root[data-theme="night"] #task-detail .detail-property-value {color:var(--ink)}
:root[data-theme="night"] #task-detail .detail-layer-tab {background:var(--theme-sidebar);color:var(--muted);border-color:var(--line)}
:root[data-theme="night"] #task-detail .detail-layer-tab:hover {background:var(--theme-hover);color:var(--ink)}
:root[data-theme="night"] .account-inline-form input,:root[data-theme="night"] .account-password-form input,
:root[data-theme="night"] .telegram-form label input:not([type="checkbox"]),
:root[data-theme="night"] .telegram-chat-list button {background:var(--panel);color:var(--ink);border-color:var(--line)}
:root[data-theme="night"] .telegram-status,:root[data-theme="night"] .new-token {background:var(--theme-soft);color:var(--ink);border-color:var(--line)}
:root[data-theme="night"] .profile-menu button[role="menuitem"]:hover {background:var(--theme-hover);color:var(--ink)}
.calendar-grid,.cal-cell,.cal-weekday,.cal-day,.cal-item,.week-day,.day-event {border-color:var(--line);color:var(--ink)}
.cal-cell {background:var(--panel)}
.cal-cell:hover {background:var(--theme-soft)}
.cal-item {background:var(--theme-soft)}
.calendar-head button,.calendar-nav button,.cal-controls button {min-width:36px;min-height:36px;display:inline-grid;place-items:center;vertical-align:middle}
.calendar-head,.calendar-nav,.cal-controls {align-items:center;gap:3px}
:root[data-theme="night"] .cal-day.today {color:#fff}
:root[data-theme="night"] .cal-cell[data-open-day]:hover {background:#254152;box-shadow:inset 0 0 0 1px #52788b}
:root[data-theme="night"] .cal-cell.is-today {background:#203947}
:root[data-theme="night"] .cal-cell.is-today:hover {background:#2b4b5c}
:root[data-theme="night"] .cal-day {color:#d9e6eb}
:root[data-theme="night"] .cal-day:hover {background:#3b6073;color:#fff}
:root[data-theme="night"] .cal-item {background:#2d4a59;color:#e8f2f5;border-left-color:#7ebbd1}
:root[data-theme="night"] .cal-item:hover {background:#3b6477;color:#fff;border-left-color:#a9d7e7}
:root[data-theme="night"] .cal-item.done {background:#294b40;color:#d9f0df;border-left-color:#85c19a}
:root[data-theme="night"] .cal-item.done:hover {background:#376450;color:#fff}
:root[data-theme="night"] .cal-more {color:#b7cbd5}
/* Night mode needs explicit interaction states: legacy light selectors are more specific. */
:root[data-theme="night"] .workspace-label,
:root[data-theme="night"] .eyebrow,
:root[data-theme="night"] .project-nav-head,
:root[data-theme="night"] .profile-settings-body p,
:root[data-theme="night"] .stat-foot,
:root[data-theme="night"] .doc-date,
:root[data-theme="night"] .week-day-head,
:root[data-theme="night"] .week-empty,
:root[data-theme="night"] .week-day-add,
:root[data-theme="night"] .day-slot-row>span,
:root[data-theme="night"] .cal-weekday {color:var(--muted)}
:root[data-theme="night"] .sidebar-toggle,
:root[data-theme="night"] .project-nav-head button,
:root[data-theme="night"] .project-title-more,
:root[data-theme="night"] .avatar,
:root[data-theme="night"] .searchbox kbd,
:root[data-theme="night"] .stat-icon,
:root[data-theme="night"] .doc-icon,
:root[data-theme="night"] .select-menu,
:root[data-theme="night"] .date-popover-head button,
:root[data-theme="night"] .date-day,
:root[data-theme="night"] .day-close,
:root[data-theme="night"] .detail-file,
:root[data-theme="night"] .detail-linked,
:root[data-theme="night"] .detail-time-list>div {background:var(--panel);color:var(--ink);border-color:var(--line);box-shadow:none}
:root[data-theme="night"] .project-nav-head button:hover,
:root[data-theme="night"] .sidebar-toggle:hover,
:root[data-theme="night"] .project-title-more:hover,
:root[data-theme="night"] .date-popover-head button:hover,
:root[data-theme="night"] .date-day:hover,
:root[data-theme="night"] .day-close:hover,
:root[data-theme="night"] .knowledge-item:hover,
:root[data-theme="night"] .knowledge-item.active,
:root[data-theme="night"] .add-column-trigger:hover,
:root[data-theme="night"] .add-column-trigger:focus-visible,
:root[data-theme="night"] .week-day-head:hover,
:root[data-theme="night"] .week-day-head:focus-visible,
:root[data-theme="night"] .week-empty:hover,
:root[data-theme="night"] .week-empty:focus-visible,
:root[data-theme="night"] .week-day-add:hover,
:root[data-theme="night"] .week-day-add:focus-visible,
:root[data-theme="night"] .select-option:hover,
:root[data-theme="night"] .select-option.is-active {background:var(--theme-hover);color:var(--ink);border-color:var(--line)}
:root[data-theme="night"] .select-option.is-selected,
:root[data-theme="night"] .project-tabs button:hover,
:root[data-theme="night"] .project-tabs button.active {color:var(--purple)}
:root[data-theme="night"] .button.ghost:hover {background:var(--theme-hover);border-color:#638092;color:var(--ink)}
:root[data-theme="night"] .column.is-drop-target,
:root[data-theme="night"] .stage-column.is-drop-target {background:#2b4c5e;outline-color:#78bfd8}
:root[data-theme="night"] .task-card:hover,
:root[data-theme="night"] .task-card:focus-within {border-color:#7096a8}
:root[data-theme="night"] .task-card-tags .task-tag {background:#354859;color:#d5e7ee;border-color:#526b7a}
:root[data-theme="night"] .task-tag-more,
:root[data-theme="night"] .task-card-order button {color:#c4d5dc}
:root[data-theme="night"] .task-card-order button:hover,
:root[data-theme="night"] .task-card-order button:focus-visible {background:#3a5768;color:#fff}
:root[data-theme="night"] .week-day-head .icon,
:root[data-theme="night"] .week-day.is-today .week-day-head {color:#c9e6f0}
:root[data-theme="night"] .day-slot {background:var(--panel);border-color:var(--line)}
:root[data-theme="night"] .day-slot:hover {background:#315367}
:root[data-theme="night"] .day-event {background:#2c4a5b;color:#e5f1f5;border-color:#66869a;border-left-color:#9ed5e8}
:root[data-theme="night"] .day-event:hover {background:#385d70;color:#fff}
:root[data-theme="night"] .day-event.is-done {background:#2d4b40;color:#e2f3e6;border-color:#557c63;border-left-color:#9bccaa}
:root[data-theme="night"] .day-event.is-done:hover {background:#3b604c;color:#fff}
:root[data-theme="night"] .date-day.is-other {color:#899da8}
:root[data-theme="night"] .date-day.is-selected {background:#397f9d;color:#fff}
:root[data-theme="night"] .date-day.is-today {box-shadow:inset 0 0 0 1px #7cb5ca}
:root[data-theme="night"] #task-detail .detail-number,
:root[data-theme="night"] #task-detail .detail-project,
:root[data-theme="night"] .detail-heading-top time,
:root[data-theme="night"] .detail-property-label,
:root[data-theme="night"] .detail-property-label .icon,
:root[data-theme="night"] .detail-shortcuts button,
:root[data-theme="night"] .detail-section-action,
:root[data-theme="night"] .detail-hint,
:root[data-theme="night"] .detail-activity,
:root[data-theme="night"] .detail-comment-meta time,
:root[data-theme="night"] .detail-history-item time {color:var(--muted)}
:root[data-theme="night"] #task-detail .detail-copy,
:root[data-theme="night"] .detail-checkitem label,
:root[data-theme="night"] .detail-history-item strong,
:root[data-theme="night"] .detail-file a,
:root[data-theme="night"] .detail-linked>button:first-child,
:root[data-theme="night"] .detail-time-list>div span {color:var(--ink)}
:root[data-theme="night"] #task-detail .detail-copy.is-empty,
:root[data-theme="night"] .detail-unset,
:root[data-theme="night"] .detail-checkitem label span.complete,
:root[data-theme="night"] .detail-file small,
:root[data-theme="night"] .detail-linked small,
:root[data-theme="night"] .detail-time-list>div time {color:var(--muted)!important}
:root[data-theme="night"] #task-detail .detail-toolbar-actions .icon-button,
:root[data-theme="night"] .detail-action-row .detail-edit-button,
:root[data-theme="night"] .detail-remove,
:root[data-theme="night"] .detail-promote {background:transparent;color:var(--muted)}
:root[data-theme="night"] #task-detail .detail-toolbar-actions .icon-button:hover,
:root[data-theme="night"] .detail-action-row .detail-edit-button:hover,
:root[data-theme="night"] .detail-section-action:hover,
:root[data-theme="night"] #task-detail .detail-shortcuts button:hover,
:root[data-theme="night"] .detail-promote:hover {background:var(--theme-hover);color:var(--ink)}
:root[data-theme="night"] .detail-remove:hover,
:root[data-theme="night"] .detail-file button:hover,
:root[data-theme="night"] .detail-linked>button:last-child:hover {background:#593b45;color:#ffd0d0}
:root[data-theme="night"] .detail-complete-button,
:root[data-theme="night"] .detail-timer-button,
:root[data-theme="night"] .detail-comment-dock button {background:#2b4b5c;color:#d7ecf4}
:root[data-theme="night"] .detail-complete-button:hover,
:root[data-theme="night"] .detail-timer-button:hover,
:root[data-theme="night"] .detail-comment-dock button:hover {background:#3b6174;color:#fff}
:root[data-theme="night"] .detail-complete-button.is-complete {background:#28503c;color:#d5f3df}
:root[data-theme="night"] .detail-timer-button.is-running,
:root[data-theme="night"] .detail-running {background:#514231;color:#f6d3a4}
:root[data-theme="night"] .detail-comment-dock {background:var(--panel);border-color:var(--line)}
:root[data-theme="night"] #task-detail .detail-stage-line button,
:root[data-theme="night"] #process-detail .detail-stage-line button {background:var(--theme-card);color:var(--muted);border-color:var(--line)}
:root[data-theme="night"] #task-detail .detail-stage-line button:hover,
:root[data-theme="night"] #task-detail .detail-stage-line button:focus-visible,
:root[data-theme="night"] #task-detail .detail-stage-line button.active,
:root[data-theme="night"] #process-detail .detail-stage-line button:hover,
:root[data-theme="night"] #process-detail .detail-stage-line button.active {background:#305467;color:#eff8fb;border-color:#74a7bb}
:root[data-theme="night"] #task-detail .detail-stage-line .stage-done:hover,
:root[data-theme="night"] #task-detail .detail-stage-line .stage-done.active,
:root[data-theme="night"] #process-detail .detail-stage-line button[data-process-stage="won"].active {background:#2e5340;color:#e0f6e7;border-color:#82b291}
:root[data-theme="night"] .task-detail.is-done .detail-heading h2 {color:#b3dfbd}
:root[data-theme="night"] .detail-history-dot {background:#86bbd0;box-shadow:0 0 0 3px #294454}
:root[data-theme="night"] .detail-file-icon {background:#29475a;color:#a3d7ed}
:root[data-theme="night"] .detail-time-list>div strong {color:#a9d7e8}
:root[data-theme="night"] .profile-menu button[role="menuitem"] {color:var(--ink)}
:root[data-theme="night"] .detail-property-link,
:root[data-theme="night"] .detail-type {color:#add7e7}
:root[data-theme="night"] .detail-property-link:hover {color:#d9f2fa}
:root[data-theme="night"] #user-chip {background:#294a5b;color:#e3f3f8;border:1px solid #456b7d}
:root[data-theme="night"] #user-chip:hover,
:root[data-theme="night"] #user-chip[aria-expanded="true"] {background:#365d70;border-color:#78acc1}
:root[data-theme="night"] .login-screen {background-image:radial-gradient(circle at 80% 15%,#1e3746,transparent 30%)}
:root[data-theme="night"] .login-card,
:root[data-theme="night"] .auth-dialog {background:var(--panel);color:var(--ink);border-color:var(--line)}
.theme-switch-row {display:flex;align-items:center;min-height:52px;margin:8px 2px 0;padding:7px 5px 3px;border-top:1px solid var(--line);flex:none}
.theme-switch-label {display:none}
.theme-switch {display:inline-flex;flex-direction:row-reverse;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;min-height:36px;padding:5px 7px;border:0;border-radius:8px;background:transparent;color:var(--ink);font-size:11px;font-weight:600;white-space:nowrap}
.theme-switch:hover {background:var(--theme-hover)}
.theme-switch:focus-visible {outline:2px solid var(--purple);outline-offset:2px}
.theme-track {display:flex;align-items:center;flex:none;width:38px;height:22px;padding:3px;border:1px solid var(--line);border-radius:999px;background:#c8d7e1;transition:background-color 230ms ease,border-color 230ms ease}
.theme-thumb {width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.15);transition:transform 290ms cubic-bezier(.2,.75,.2,1)}
:root[data-theme="night"] .theme-track {background:#33738e;border-color:#579ab4}
:root[data-theme="night"] .theme-thumb {transform:translateX(16px)}
.sidebar-collapsed .theme-switch-row {justify-content:center;margin-inline:0;padding-inline:0}
.sidebar-collapsed .theme-switch {justify-content:center;padding-inline:0}
.sidebar-collapsed .theme-switch-label,.sidebar-collapsed .theme-switch-text {display:none}
.process-layout {display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:16px;margin-bottom:16px}
.process-template,.process-hierarchy,.process-projects,.process-legacy {min-width:0}
.process-section-head,.project-head-actions {display:flex;align-items:center;justify-content:space-between;gap:12px}
.process-section-head h2,.process-hierarchy h2,.process-projects h2,.process-legacy h2 {margin:0 0 6px;font-size:17px}
.process-section-head p,.process-hierarchy p,.process-projects p,.process-legacy p {color:var(--muted);font-size:12px;line-height:1.5}
.workflow-template-list {display:grid;gap:6px;margin-top:18px}
.workflow-stage {display:flex;align-items:center;gap:13px;min-height:54px;padding:9px 12px;border:1px solid var(--line);border-radius:9px;background:var(--panel)}
.workflow-stage-index {width:23px;color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.workflow-stage-dot {width:10px;height:10px;flex:none;border-radius:50%;background:var(--step-color)}
.workflow-stage>div {display:grid;gap:2px;min-width:0}
.workflow-stage strong {font-size:13px}
.workflow-stage small {color:var(--muted);font-size:11px}
.workflow-stage-edit {margin-left:auto;border:0;background:transparent;color:var(--muted);padding:7px;border-radius:6px}
.workflow-stage-edit:hover {background:var(--theme-soft);color:var(--ink)}
.workflow-template-form {display:flex;align-items:end;flex-wrap:wrap;gap:8px;margin-top:12px}
.workflow-template-form[hidden] {display:none}
.workflow-template-form label {display:grid;gap:4px;color:var(--muted);font-size:11px}
.workflow-template-form input {min-height:34px}
.workflow-tree {display:grid;gap:4px;margin-top:20px}
.workflow-tree-row {position:relative;display:flex;align-items:center;gap:8px;min-height:42px;padding:5px 8px;color:var(--ink);font-size:11px}
.workflow-tree-row.level-1 {padding-left:24px}.workflow-tree-row.level-2 {padding-left:40px}.workflow-tree-row.level-3 {padding-left:56px}
.workflow-tree-row:not(.level-0)::before {content:'';position:absolute;top:0;bottom:50%;width:12px;border-left:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0 0 0 5px}
.workflow-tree-row.level-1::before {left:8px}.workflow-tree-row.level-2::before {left:24px}.workflow-tree-row.level-3::before {left:40px}
.process-project-list,.people-list,.process-legacy-list {display:grid;gap:7px}
.process-project,.person-card,.process-legacy-list button {display:flex;align-items:center;gap:11px;width:100%;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--ink);text-align:left}
.process-project:hover,.person-card-edit:hover,.process-legacy-list button:hover {background:var(--theme-soft);border-color:var(--purple)}
.process-project>span:nth-child(2),.person-card-main {display:grid;gap:3px;min-width:0;flex:1}
.process-project strong,.person-card strong {font-size:12px}
.process-project small,.person-card small,.person-card-main>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:11px}
.process-project>.icon {margin-left:auto;color:var(--muted)}
.process-legacy {margin-top:16px}
.process-legacy-list button {justify-content:space-between}
.workflow-steps {display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}
.workflow-step {display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid var(--line);border-radius:7px;background:var(--theme-soft);font-size:11px}
.workflow-step i {width:7px;height:7px;border-radius:50%;background:var(--step-color)}
.workflow-step b {color:var(--muted);font-size:10px}
.project-people-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.project-people-grid h3 {font-size:14px}
.person-avatar {display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:9px;background:var(--theme-soft);color:var(--purple);font-weight:700}
.person-card-edit {cursor:pointer}
.people-hint {color:var(--muted);font-size:11px;line-height:1.5}
#my-telegram-form label {display:grid;gap:5px;flex:1;color:var(--muted);font-size:11px}
#my-telegram-form input {width:100%;min-height:36px}
#modal-fields[data-kind="contacts"] {grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
#modal-fields[data-kind="contacts"] > label,#modal-fields[data-kind="contacts"] > .form-field {min-width:0;min-height:70px;margin:0}
#modal-fields[data-kind="contacts"] input,#modal-fields[data-kind="contacts"] .select-trigger {width:100%;min-height:40px}
@media(max-width:900px){.process-layout,.project-people-grid{grid-template-columns:1fr}}
@media(max-width:720px){.theme-switch-row{display:none}.project-head-actions{flex-wrap:wrap}.workflow-stage{gap:8px}#modal-fields[data-kind="contacts"]{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){html,body,.sidebar,.main,.topbar,.view,.panel,.column,.task-card,.task-detail,.task-detail-content,.modal,.account-dialog,.profile-settings,.calendar-wrap,.cal-cell,.theme-track,.theme-thumb{transition:none!important}}

/* Sidebar controls stay in document flow directly below the logo. */
@media(min-width:721px){
  .sidebar {transition:width 280ms cubic-bezier(.22,1,.36,1),background-color 240ms ease,border-color 240ms ease}
  .main {transition:margin-left 280ms cubic-bezier(.22,1,.36,1),width 280ms cubic-bezier(.22,1,.36,1),background-color 240ms ease}
  .sidebar .brand {position:relative;min-height:55px;padding-left:50px}
  .sidebar .brand-mark {position:absolute;left:9px;top:5px}
  .sidebar .brand-name {transition:opacity 210ms ease}
  .sidebar .workspace-head {display:flex;align-items:center;justify-content:space-between;height:42px;padding:0 2px 0 5px;gap:4px;flex:none}
  .sidebar .sidebar-toggle {position:static;flex:none;width:40px;height:40px;border:1px solid transparent;border-radius:8px;color:var(--muted);background:transparent}
  .sidebar .sidebar-toggle:hover {background:var(--theme-hover);border-color:var(--line);color:var(--ink)}
  .sidebar>.workspace-label {display:block;height:27px;min-width:0;padding:7px 10px 0;overflow:hidden;white-space:nowrap;transition:opacity 180ms ease}
  .sidebar .theme-switch-row {flex:none;min-height:0;margin:0;padding:0;border:0}
  .sidebar .theme-switch {width:43px;min-height:36px;padding:5px 2px;justify-content:center}
  .sidebar .theme-switch-text {display:none}
  .sidebar #nav {top:155px}
  body.sidebar-collapsed .sidebar .brand {justify-content:flex-start;padding-left:50px}
  body.sidebar-collapsed .sidebar .brand-mark {left:12px}
  body.sidebar-collapsed .sidebar .brand-name {display:block;opacity:0;pointer-events:none}
  body.sidebar-collapsed .sidebar .workspace-head {height:80px;flex-direction:column;justify-content:flex-start;align-items:center;gap:2px;padding:0;position:relative;left:3px}
  body.sidebar-collapsed .sidebar>.workspace-label {height:0;padding:0;opacity:0;pointer-events:none}
  body.sidebar-collapsed .sidebar .theme-switch-row {display:flex;margin:0;padding:0}
  body.sidebar-collapsed .sidebar .theme-switch {width:43px}
  body.sidebar-collapsed .sidebar #nav>.nav-item {justify-content:flex-start;padding-left:13px}
  body.sidebar-collapsed .sidebar .nav-label {display:inline;position:absolute;opacity:0;pointer-events:none}
}
@media(max-width:720px){.sidebar .workspace-head{display:none}#profile-sidebar-trigger{display:none!important}}
@media(prefers-reduced-motion:reduce){.sidebar,.main,.sidebar .brand-name,.sidebar .workspace-label{transition:none!important}}

/* Stable editor popover and reorder controls. */
.process-template {position:relative;overflow:visible}
.workflow-stage {transition:background-color 160ms ease,border-color 160ms ease,transform 160ms ease}
.workflow-stage.is-drop-target {background:var(--theme-hover);border-color:var(--purple)}
.workflow-stage-copy {flex:1;min-width:0}
.workflow-stage-actions {display:flex;align-items:center;gap:2px;margin-left:auto;flex:none}
.workflow-stage-actions button,.workflow-drag-handle {display:grid;place-items:center;width:27px;height:27px;flex:none;padding:0;border:0;border-radius:6px;background:transparent;color:var(--muted);font-size:14px;font-weight:600}
.workflow-stage-actions button:hover:not(:disabled),.workflow-drag-handle:hover {background:var(--theme-hover);color:var(--ink)}
.workflow-stage-actions button:disabled {opacity:.35;cursor:default}
.workflow-drag-handle {cursor:grab;letter-spacing:-4px;padding-right:4px;user-select:none}
.workflow-drag-handle:active {cursor:grabbing}
.workflow-stage-actions .workflow-stage-edit {margin:0}
.workflow-stage-actions .workflow-stage-remove:hover {background:#fbe8e8;color:#a64050}
.workflow-template-form {position:absolute;right:18px;z-index:8;display:grid;grid-template-columns:minmax(0,1fr) 60px;align-items:end;gap:9px;width:min(370px,calc(100% - 36px));margin:0;padding:15px;border:1px solid var(--line);border-radius:10px;background:var(--panel);box-shadow:0 14px 36px rgba(15,34,49,.16)}
.workflow-template-form[hidden] {display:none}
.workflow-form-title {grid-column:1/-1;color:var(--ink);font-size:13px}
.workflow-template-form label {min-width:0;color:var(--muted)}
.workflow-template-form input {width:100%;height:36px;min-height:36px;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:7px}
.workflow-template-form input[type=color] {padding:3px;cursor:pointer}
.workflow-form-actions {grid-column:1/-1;display:flex;justify-content:flex-end;gap:7px}
.project-avatar {color:var(--project-ink,#fff)}
:root[data-theme="night"] .workflow-template-form {background:#203746;border-color:#537080;box-shadow:0 16px 42px rgba(0,0,0,.35)}
:root[data-theme="night"] .workflow-template-form input {background:#172b38;color:var(--ink);border-color:#557181}
:root[data-theme="night"] .workflow-stage-actions .workflow-stage-remove:hover {background:#593b45;color:#ffd7d7}
:root[data-theme="night"] .view-switch {background:#1c303e;border-color:#3e5968}
:root[data-theme="night"] .view-switch button {color:#b7c8d0;box-shadow:none}
:root[data-theme="night"] .view-switch button:hover {background:#2b495b;color:#f2f8fa}
:root[data-theme="night"] .view-switch button.active {background:#38657b;color:#fff;box-shadow:inset 0 0 0 1px #70a6bc}
:root[data-theme="night"] .cal-cell.is-today:hover .cal-item {box-shadow:inset 0 0 0 1px #79afc6;border-left-width:3px}
:root[data-theme="night"] .cal-cell.is-today:hover .cal-item.done {box-shadow:inset 0 0 0 1px #81b997;border-left-width:3px}

/* Small lists keep five rows visible and switch pages without changing the surrounding layout. */
.is-page-hidden {display:none!important}
.list-pager {display:flex;align-items:center;justify-content:center;gap:4px;align-self:end;padding:7px 0 0;margin-top:auto}
.list-pager button {display:grid;place-items:center;min-width:29px;height:29px;padding:0 6px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);font-size:11px;font-weight:600;line-height:1}
.list-pager button:hover:not(:disabled) {background:var(--theme-hover);color:var(--ink);border-color:var(--line)}
.list-pager button[aria-current=page] {background:var(--theme-soft);color:var(--purple);border-color:var(--line)}
.list-pager button:disabled {opacity:.35;cursor:default}
.list-pager button:focus-visible {outline:2px solid var(--purple);outline-offset:1px}
.page-reveal>:not(.list-pager):not(.is-page-hidden) {animation:page-reveal 180ms ease-out both}
@keyframes page-reveal {from{opacity:.25;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
.detail-history-item {display:grid;grid-template-columns:12px minmax(0,1fr) auto;align-items:center;gap:8px}
.detail-history-item strong {min-width:0;overflow-wrap:anywhere}
.detail-history-item time {margin:0;white-space:nowrap;font-variant-numeric:tabular-nums}
.detail-history-dot {margin:0 0 0 3px}
:root[data-theme="night"] .list-pager button[aria-current=page] {background:#315870;color:#f2f9fb;border-color:#79acc2}
:root[data-theme="night"] .project-metrics strong {color:#e6f0f3}
:root[data-theme="night"] .project-metrics button {color:#b7c8d0}
:root[data-theme="night"] .project-inline-add {color:#b4c8d1}
:root[data-theme="night"] .project-inline-add:hover {color:#a2dcf0}
:root[data-theme="night"] .project-document strong {color:#e6f0f3}
:root[data-theme="night"] .project-document small {color:#b4c4cc}
:root[data-theme="night"] .task-list-row.status-done .task-title-link,
:root[data-theme="night"] .hierarchy-row.status-done .task-title-link {color:#a8d9b7}
:root[data-theme="night"] .panel .task-row,
:root[data-theme="night"] .project-summary .task-row {border-bottom-color:var(--line)}
:root[data-theme="night"] .task-row .task-meta {color:#b4c4cc}
@media(max-width:560px){.detail-history-item{grid-template-columns:12px minmax(0,1fr)}.detail-history-item time{grid-column:2;justify-self:start}}
@media(prefers-reduced-motion:reduce){.page-reveal>:not(.list-pager):not(.is-page-hidden){animation:none}}

/* admin.css */
/* Administration is a quiet, anchored extension of the workspace. */
#admin-nav[hidden],#route-loader[hidden],#quick-add[hidden],#admin-reset-result[hidden]{display:none!important}
.admin-nav{flex:none;border-top:1px solid var(--line);border-radius:0;margin:0;padding-top:12px;padding-bottom:12px}
.admin-nav .pending-badge{margin-left:auto}
.admin-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
.admin-panel{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:20px;color:var(--ink)}
#admin-backup{grid-column:1/-1}
.admin-panel-head{border-bottom:1px solid var(--line);padding-bottom:14px;margin-bottom:14px}
.admin-panel-head h2,.admin-panel h3{margin:0 0 5px;font-size:17px;font-weight:650;letter-spacing:-.02em;color:var(--ink)}
.admin-panel-head p,.admin-panel p{margin:0;color:var(--muted);font-size:12px;line-height:1.55}
.admin-panel .account-list,.admin-users-list{display:grid;gap:8px}
.admin-panel .account-row,.admin-user-row{min-width:0;background:var(--theme-card);border:1px solid var(--line);border-radius:9px;padding:11px 12px;color:var(--ink)}
.admin-panel .account-row small{color:var(--muted)}
.admin-user-row{display:grid;grid-template-columns:minmax(150px,1fr) auto;gap:8px 12px;align-items:center}
.admin-user-identity{display:flex;align-items:center;gap:10px;min-width:0}
.admin-user-identity strong{display:block;overflow-wrap:anywhere;font-size:12px}
.admin-user-identity small{display:block;margin-top:3px;color:var(--muted);font-size:10px}
.admin-user-avatar{display:grid;place-items:center;width:31px;height:31px;flex:none;border-radius:8px;background:var(--theme-soft);color:var(--purple);font-size:12px;font-weight:700}
.admin-user-status{justify-self:end;border:1px solid var(--line);border-radius:5px;padding:3px 7px;font-size:10px;color:var(--muted)}
.admin-user-status[data-status="active"]{border-color:#7caa95;background:#e1f2e8;color:#286a4c}
.admin-user-status[data-status="blocked"]{border-color:#d29c95;background:#fae8e6;color:#954d49}
.admin-user-status[data-status="pending"]{border-color:#caad7d;background:#f8f0df;color:#806638}
.admin-user-actions,.admin-protected{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;padding-left:41px}
.admin-protected{color:var(--muted);font-size:10px}
.admin-user-actions .button{border:1px solid var(--line);background:transparent;color:var(--ink)}
.admin-user-actions .button:hover{background:var(--theme-hover)}
.admin-reset-result{display:grid;gap:6px;margin:0 0 12px;padding:12px;border:1px solid var(--purple);border-radius:8px;background:var(--theme-soft);font-size:12px}
.admin-reset-result code{overflow-wrap:anywhere;user-select:all;font-size:13px;color:var(--ink)}
.admin-reset-result small{color:var(--muted)}
#admin-backup .telegram-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#admin-backup .telegram-form label{color:var(--muted)}
#admin-backup .telegram-hint{margin-top:12px}
.route-loader{position:fixed;inset:0;z-index:15;display:grid;place-content:center;justify-items:center;gap:12px;background:color-mix(in srgb,var(--bg) 43%,transparent);color:var(--purple);pointer-events:auto;animation:route-fade-in 180ms ease both}
.route-loader.is-leaving{animation:none;opacity:0;pointer-events:none;transition:opacity 170ms ease}
.route-loader-mark{position:relative;display:grid;place-items:center;width:78px;height:78px;border-radius:50%;background:var(--panel);border:1px solid var(--line);box-shadow:0 12px 32px #152b3c18}
.route-loader-dots{position:absolute;inset:8px;border-radius:50%;border:3px dotted var(--purple);opacity:.65;animation:route-orbit 3.4s linear infinite}
.route-loader-plane{width:29px;height:29px;transform:rotate(-20deg);animation:plane-glide 1.4s ease-in-out infinite alternate}
.route-loader-label{font-size:12px;color:var(--ink);letter-spacing:.01em}
body.route-loading #app{filter:blur(3px);transition:filter 180ms ease}
@keyframes route-fade-in{from{opacity:0}to{opacity:1}}
@keyframes route-orbit{to{transform:rotate(360deg)}}
@keyframes plane-glide{from{transform:translate(-2px,2px) rotate(-23deg)}to{transform:translate(2px,-2px) rotate(-17deg)}}
:root[data-theme="night"] .admin-user-status[data-status="active"]{background:#234237;color:#b9e4c7;border-color:#416f59}
:root[data-theme="night"] .admin-user-status[data-status="blocked"]{background:#473239;color:#f0c4c5;border-color:#80545a}
:root[data-theme="night"] .admin-user-status[data-status="pending"]{background:#443c2d;color:#eddbad;border-color:#766449}
@media(max-width:1100px){.admin-layout{grid-template-columns:1fr}}
@media(max-width:720px){.admin-nav{border:0;padding:5px 3px}.admin-nav .pending-badge{position:absolute;right:3px;top:2px;padding:0 4px;font-size:8px}.sidebar #nav{width:calc(100% - 60px)}.sidebar #nav>.nav-item{min-width:0}.sidebar .admin-nav{position:absolute;right:6px;bottom:5px;width:55px;height:51px;justify-content:center;align-items:center;flex-direction:column;gap:2px}.sidebar .admin-nav .nav-label{display:none}.admin-panel{padding:15px}.admin-user-row{grid-template-columns:1fr auto}#admin-backup .telegram-form-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.route-loader,.route-loader-dots,.route-loader-plane,body.route-loading #app{animation:none!important;transition:none!important}}

/* mobile-workflow.css */
/* Task details and calendar use the same surfaces in both themes. */
.detail-start-datetime{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 10px;font-variant-numeric:tabular-nums}
.detail-start-datetime span:last-child{color:var(--muted)}
.detail-api-badge{display:inline-flex;align-items:center;min-height:18px;padding:1px 6px;border:1px solid color-mix(in srgb,var(--purple) 42%,var(--line));border-radius:5px;background:var(--theme-soft);color:var(--purple);font-size:10px;font-weight:750;letter-spacing:.035em;line-height:1}
.detail-comment-meta{flex-wrap:wrap}
.duration-form-title{color:var(--muted);font-size:12px;font-weight:600}
#task-detail .detail-estimate-form,#task-detail .detail-time-form{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;gap:10px;margin:12px 0 18px}
.duration-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:min(100%,390px)}
.duration-unit{display:grid;gap:5px;min-width:0;color:var(--muted);font-size:11px;font-weight:600}
#task-detail .detail-estimate-form .duration-unit{width:auto}
.duration-control{display:grid;grid-template-columns:30px minmax(0,1fr) 30px;align-items:center;min-height:40px;border:1px solid var(--line);border-radius:9px;background:var(--theme-card);overflow:hidden}
#task-detail .duration-control input{width:100%;min-width:0;min-height:38px;height:38px;padding:0;border:0;border-radius:0;background:transparent;color:var(--ink);font-size:15px;font-weight:650;font-variant-numeric:tabular-nums;text-align:center;box-shadow:none;appearance:textfield}
.duration-control input::-webkit-inner-spin-button,.duration-control input::-webkit-outer-spin-button{appearance:none;margin:0}
.duration-step{display:grid;place-items:center;width:30px;height:40px;padding:0;border:0;background:transparent;color:var(--muted);font-size:18px;line-height:1;touch-action:manipulation}
#task-detail .detail-time-form .duration-step{grid-column:auto}
.duration-step:hover,.duration-step:focus-visible{background:var(--theme-hover);color:var(--ink)}
.duration-note{display:grid;gap:5px;max-width:440px;color:var(--muted);font-size:11px;font-weight:600}
#task-detail .duration-note input{width:100%;min-height:40px;padding:8px 11px;font-size:14px}
#task-detail .detail-estimate-form>.button,#task-detail .detail-time-form>.button{justify-self:start;min-height:38px}
.detail-layer-current{display:none}
.cal-mobile-dots,.calendar-mobile-agenda{display:none}
.cal-desktop-items{display:block}
.day-new-task{margin-left:auto;white-space:nowrap}
.day-topbar h2 .day-title-wide{color:var(--ink);font-size:17px;font-weight:600;letter-spacing:normal}
.day-title-mobile{display:none}
@media(max-width:720px){
  #task-detail.detail-layered .detail-layer-rail{display:flex;inset:0 0 auto;width:100%;height:48px;overflow:hidden;border-bottom:1px solid var(--line);background:var(--theme-sidebar)}
  #task-detail.detail-layered .detail-layer-tab{flex:0 1 auto;max-width:45%;min-width:0;min-height:48px;padding:0 13px;border-color:var(--line);background:var(--theme-sidebar);color:var(--muted);box-shadow:none;white-space:nowrap}
  #task-detail.detail-layered .detail-layer-tab:hover{background:var(--theme-hover);color:var(--ink)}
  #task-detail.detail-layered .detail-layer-current{display:flex;flex:1;align-items:center;justify-content:flex-end;gap:5px;min-width:0;padding:0 16px;background:var(--theme-soft);color:var(--ink);font-size:12px;font-weight:650;white-space:nowrap}
  #task-detail.detail-layered .detail-layer-current span{color:var(--muted);font-weight:500}
  #task-detail.detail-layered .task-detail-content{padding-top:48px}
  #task-detail .detail-property{grid-template-columns:minmax(98px,132px) minmax(0,1fr)}
  #task-detail .detail-estimate-form,#task-detail .detail-time-form{gap:9px}
  .duration-fields{width:100%}
  .duration-control{grid-template-columns:30px minmax(0,1fr) 30px;min-height:44px}
  .duration-step{min-height:44px}
  #task-detail .duration-control input{min-height:44px;height:44px;font-size:16px!important}
  #task-detail .duration-note input{font-size:16px!important}
  .calendar-wrap{padding:12px!important;overflow:visible}
  .calendar-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 12px;margin-bottom:12px}
  .calendar-head h2{margin:0;font-size:16px;text-transform:capitalize}
  .calendar-nav{gap:5px}
  .calendar-nav button{min-height:40px;min-width:40px}
  .calendar-grid{border:1px solid var(--line);border-radius:10px;overflow:hidden}
  .cal-cell{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;min-height:50px!important;padding:3px 1px!important;border-color:var(--line)}
  .cal-weekday{min-height:30px!important;justify-content:center;color:var(--muted);font-size:11px}
  .cal-cell.is-other .cal-day{opacity:.5}
  .cal-cell.is-selected{background:var(--theme-soft);box-shadow:inset 0 0 0 1px var(--purple)}
  .cal-cell.is-selected:hover{background:var(--theme-hover)}
  .cal-day{width:33px;height:33px;flex:none;border-radius:8px;font-size:13px;font-weight:600}
  .cal-day.today{background:var(--purple);color:var(--panel)}
  .cal-cell.is-selected .cal-day:not(.today){color:var(--purple)}
  .cal-desktop-items{display:none}
  .cal-mobile-dots{display:flex;justify-content:center;gap:3px;height:5px}
  .cal-mobile-dots i{width:4px;height:4px;border-radius:50%;background:var(--purple)}
  .cal-mobile-dots i.is-done{background:#69aa88}
  .calendar-mobile-agenda{display:block;margin-top:16px;border-top:1px solid var(--line);padding-top:15px}
  .calendar-agenda-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
  .calendar-agenda-head>div{display:grid;gap:3px;min-width:0}
  .calendar-agenda-head strong{color:var(--ink);font-size:15px;font-weight:650;text-transform:capitalize}
  .calendar-agenda-head>div>span,.calendar-mobile-agenda p{color:var(--muted);font-size:12px}
  .calendar-mobile-agenda p{margin:16px 0}
  .calendar-agenda-list{display:grid;gap:6px;margin:13px 0}
  .calendar-agenda-list button{display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:46px;padding:8px 11px;border:1px solid var(--line);border-radius:8px;background:var(--theme-card);color:var(--ink);text-align:left}
  .calendar-agenda-list button:active{background:var(--theme-hover)}
  .calendar-agenda-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
  .calendar-open-day{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;margin-top:10px;padding:0;border:0;border-top:1px solid var(--line);background:transparent;color:var(--purple);font-size:13px;font-weight:600;text-align:left}
  .calendar-open-day .icon{width:16px;height:16px}
  .view:has(.calendar-wrap){padding-bottom:calc(116px + env(safe-area-inset-bottom))}
  .day-toolbar{flex-wrap:wrap;gap:6px;padding:9px 13px}
  .day-title-wide{display:none}
  .day-topbar h2 .day-title-mobile{display:inline;color:var(--ink);font-size:17px;font-weight:600;letter-spacing:normal;white-space:nowrap}
  .day-toolbar button{min-height:40px}
  .day-new-task{margin-left:auto}
  .day-slot-row{height:44px}
  .day-slot{height:44px;cursor:pointer}
  .day-timeline{min-height:2112px}
}
@media(max-width:390px){
  #task-detail.detail-layered .detail-layer-tab{padding-inline:9px}
  #task-detail.detail-layered .detail-layer-current{padding-inline:10px}
  .calendar-wrap{padding:8px!important}
  .cal-cell{min-height:46px!important}
  .calendar-agenda-head .button{padding-inline:9px}
}
@media(prefers-reduced-motion:reduce){.duration-control input{animation:none!important}}

/* analytics.css */
.analytics {margin:24px 0;min-width:0}
.analytics-head {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.analytics-head h2 {font-size:18px;letter-spacing:-.025em;margin:0 0 5px;color:var(--ink)}
.analytics-head p {font-size:12px;color:var(--muted);margin:0}
.analytics-period {display:flex;gap:3px;padding:3px;border:1px solid var(--line);background:var(--panel);border-radius:9px;flex:none}
.analytics-period button {min-height:34px;padding:6px 12px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);font-size:12px;cursor:pointer;transition:background 150ms,color 150ms}
.analytics-period button:hover {background:var(--theme-hover);color:var(--ink)}
.analytics-period button[aria-pressed="true"] {background:var(--theme-soft);border-color:var(--line);color:var(--ink);font-weight:600}
.analytics-grid {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:16px}
.analytics-panel {min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:20px}
.analytics-metrics {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.analytics-metrics span {display:block;font-size:11px;color:var(--muted);line-height:1.5}
.analytics-metrics strong {display:block;margin-top:5px;font-size:26px;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.analytics-metrics .metric-overdue {color:#b54d50}
.chart-legend {display:flex;gap:18px;justify-content:flex-end;margin:18px 0 3px;font-size:11px;color:var(--muted)}
.chart-legend span {display:flex;align-items:center;gap:6px}
.chart-legend i {width:8px;height:8px;border-radius:2px}
.chart-created {fill:#5a9fc5;background:#5a9fc5}
.chart-completed {fill:#65a78c;background:#65a78c}
.activity-chart {display:block;width:100%;height:auto;overflow:visible}
.activity-chart text {fill:var(--muted);font-size:10px;font-family:inherit}
.activity-chart line {stroke:var(--line);stroke-width:1}
.chart-empty {font-size:12px;color:var(--muted);margin:0;text-align:center}
.analytics-state-head {display:flex;align-items:center;justify-content:space-between;gap:12px}
.analytics-state-head h3 {font-size:14px;color:var(--ink);margin:0}
.analytics-state-head>strong {font-size:22px;font-weight:600;color:var(--ink)}
.analytics-state-head small {font-size:11px;color:var(--muted);font-weight:400;margin-left:3px}
.status-spectrum {display:flex;gap:3px;height:9px;overflow:hidden;border-radius:4px;margin:18px 0}
.spectrum-empty {flex:1;background:var(--line)}
.analytics-statuses {display:grid;gap:12px}
.analytics-statuses>div {display:grid;grid-template-columns:8px minmax(0,1fr) 30px 34px;align-items:center;gap:9px;font-size:12px;color:var(--ink)}
.analytics-statuses i {width:7px;height:7px;border-radius:50%}
.analytics-statuses span {overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.analytics-statuses strong,.analytics-statuses small {text-align:right;font-variant-numeric:tabular-nums}
.analytics-statuses small {color:var(--muted);font-size:10px}
.analytics-priorities {display:flex;flex-wrap:wrap;gap:12px;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.analytics-priorities>span {display:flex;align-items:center;gap:5px}
.analytics-priorities strong {font-size:11px;color:var(--ink)}
:root[data-theme="night"] .analytics-metrics .metric-overdue {color:#f1a9a3}
:root[data-theme="night"] .chart-created {fill:#7ab9d8;background:#7ab9d8}
:root[data-theme="night"] .chart-completed {fill:#81c5a7;background:#81c5a7}
@media(max-width:1000px) {.analytics-grid{grid-template-columns:1fr}.analytics-state{display:grid;grid-template-columns:1fr 1fr;column-gap:24px}.analytics-state-head,.status-spectrum{grid-column:1/-1}.analytics-priorities{margin-top:0;padding-top:0;border-top:0;align-content:start}}
@media(max-width:540px) {.analytics-head{align-items:flex-start;flex-direction:column;gap:12px}.analytics-period{width:100%;box-sizing:border-box}.analytics-period button{flex:1;min-height:40px}.analytics-panel{padding:16px}.analytics-metrics{gap:10px}.analytics-metrics span{font-size:11px}.analytics-metrics strong{font-size:24px}.analytics-state{display:block}.analytics-priorities{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.chart-legend{margin-top:14px}.activity-chart text{font-size:18px}}
@media(prefers-reduced-motion:reduce) {.analytics-period button{transition:none}}

/* refinement.css */
/* v1.1.16: compact, stable navigation geometry and readable type in both themes. */
html { font-synthesis: none; }
body,button,input,select,textarea,#task-detail,#process-detail {font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
button,input,select,textarea {font-size:inherit}
.brand-name,.auth-brand-text strong,.mobile-brand strong {font-weight:700;letter-spacing:-.035em}
.sidebar .nav-item,.sidebar .project-nav-item {font-weight:500;line-height:1.25}
.sidebar .nav-label {white-space:nowrap}
.sidebar .theme-switch-row {border:0}
.sidebar .theme-switch {display:grid;place-items:center;width:44px;height:44px;min-height:44px;padding:0;border-radius:10px}
.sidebar .theme-track {width:34px;height:20px;padding:2px}
.sidebar .theme-thumb {width:14px;height:14px}
:root[data-theme="night"] .sidebar .theme-thumb {transform:translateX(14px)}
.mobile-theme-switch {display:none;place-items:center;width:36px;height:36px;border:1px solid var(--line);border-radius:9px;background:var(--theme-soft);color:var(--ink)}
.mobile-theme-switch:hover {background:var(--theme-hover)}
.mobile-theme-switch .icon {width:18px;height:18px}
#user-chip {position:relative}
#user-chip.has-pending::after {content:"";position:absolute;top:-3px;right:-3px;width:9px;height:9px;border:2px solid var(--panel);border-radius:50%;background:#dc8a5b;box-shadow:0 0 0 1px #aa603b;animation:pending-pulse 2.8s ease-in-out infinite}
@keyframes pending-pulse {50% {box-shadow:0 0 0 4px #dc8a5b44}}
.week-backlog {box-sizing:border-box;padding:15px 16px 18px!important;margin-top:12px;border:1px solid var(--line);border-radius:10px;background:var(--panel)}
.week-backlog h3 {margin:0 0 10px;line-height:1.4}
.week-backlog > p,.week-backlog > div {margin:0;min-height:22px}
.admin-tabs {display:inline-flex;gap:4px;padding:4px;margin:0 0 16px;border:1px solid var(--line);border-radius:10px;background:var(--theme-soft)}
.admin-tabs button {display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:7px 15px;border:1px solid transparent;border-radius:7px;background:transparent;color:var(--muted);font-size:12px;font-weight:600;cursor:pointer}
.admin-tabs button:hover {color:var(--ink);background:var(--theme-hover)}
.admin-tabs button[aria-selected="true"] {color:var(--ink);background:var(--panel);border-color:var(--line)}
.admin-tab-count {min-width:17px;padding:1px 5px;border-radius:5px;background:#b96b44;color:#fff;text-align:center;font-size:10px}
.admin-tabs [hidden],.admin-layout[hidden] {display:none!important}
.admin-user-projects {grid-column:1/-1;min-width:0}
.admin-user-projects summary {width:max-content;max-width:100%;color:var(--purple);font-size:11px;font-weight:600;cursor:pointer}
.admin-user-projects > div {display:grid;gap:7px;margin:9px 0 0;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--theme-soft)}
.admin-user-projects label {display:grid;grid-template-columns:minmax(0,1fr) minmax(125px,190px);align-items:center;gap:9px;color:var(--ink);font-size:11px}
.admin-user-projects label span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-user-projects select,.member-actions select,#member-form select {min-height:34px;max-width:100%;padding:5px 27px 5px 9px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink);font-size:11px}
.admin-delete {color:#a95d55!important}
.admin-delete:hover {background:#f8e8e5!important}
.admin-panel .account-row {gap:12px}
.modal .form-fields > label,.modal .form-field {align-self:start}
.modal .form-field > label {min-height:0!important;height:auto;margin:0;line-height:1.35}
.modal .form-fields input,.modal .select-trigger {min-height:42px}
:root[data-theme="night"] .modal .form-fields label,:root[data-theme="night"] .modal .form-field > label,:root[data-theme="night"] .profile-settings label,:root[data-theme="night"] .account-dialog label {color:#c8d9df}
:root[data-theme="night"] .modal input::placeholder,:root[data-theme="night"] .modal textarea::placeholder {color:#a5bac3;opacity:1}
:root[data-theme="night"] .modal .select-trigger {color:#edf4f7;background:#1b303e;border-color:#4a6370}
:root[data-theme="night"] .modal .select-trigger:hover {background:#274353;border-color:#739aad;color:#fff}
.task-detail.is-readonly [data-detail-complete],.task-detail.is-readonly [data-detail-timer],.task-detail.is-readonly [data-detail-edit],.task-detail.is-readonly [data-detail-status],.task-detail.is-readonly [data-description-edit],.task-detail.is-readonly .detail-description-form,.task-detail.is-readonly .detail-comment-dock,.task-detail.is-readonly [data-description-preview] {pointer-events:none}
.task-detail.is-readonly [data-detail-complete],.task-detail.is-readonly [data-detail-timer],.task-detail.is-readonly [data-detail-edit],.task-detail.is-readonly [data-description-edit],.task-detail.is-readonly .detail-comment-dock {display:none!important}
.task-detail.is-readonly .detail-hierarchy-form select,.task-detail.is-readonly .detail-hierarchy-form button {pointer-events:none;opacity:.75}
:root[data-theme="night"] {--ink:#edf4f7;--muted:#b8cbd3;--purple:#84c9e1}
:root[data-theme="night"] .sidebar {color:var(--ink)}
:root[data-theme="night"] .sidebar .nav-item {color:#b6c9d1}
:root[data-theme="night"] .sidebar .nav-item.active {color:#a4dbec}
:root[data-theme="night"] .sidebar .nav-item:hover {color:#ecf6f8}
:root[data-theme="night"] .sidebar .workspace-label,:root[data-theme="night"] .sidebar .project-nav-head {color:#a9bfca}
:root[data-theme="night"] .sidebar .project-nav-item {color:#bfd0d6}
:root[data-theme="night"] .brand-name,:root[data-theme="night"] .brand-name small,:root[data-theme="night"] .mobile-brand strong {color:#eff5f7}
:root[data-theme="night"] .side-note strong {color:#e3edf1}
:root[data-theme="night"] .side-note small {color:#aec2cb}
:root[data-theme="night"] .page-head p,:root[data-theme="night"] .week-backlog p,:root[data-theme="night"] .detail-unset,:root[data-theme="night"] .detail-property-label {color:#b9cbd3}
:root[data-theme="night"] .task-card h4,:root[data-theme="night"] .week-task strong,:root[data-theme="night"] .task-list-row strong {color:#edf4f6}
:root[data-theme="night"] .task-card p,:root[data-theme="night"] .week-task small {color:#bed0d7}
:root[data-theme="night"] .task-detail .detail-heading h2 {color:#f0f5f7}
:root[data-theme="night"] .admin-user-projects select,:root[data-theme="night"] .member-actions select,:root[data-theme="night"] #member-form select {background:#1b303e;color:#eaf2f5;border-color:#48616d}
:root[data-theme="night"] .admin-delete {color:#e6aaa3!important}
:root[data-theme="night"] .admin-delete:hover {background:#513842!important}
@media(min-width:721px) {
  .sidebar {--side-inset:10px}
  .sidebar .brand {box-sizing:border-box;height:58px;min-height:58px;margin:0;padding:5px 0 0 50px;justify-content:flex-start;overflow:hidden}
  .sidebar .brand-mark,body.sidebar-collapsed .sidebar .brand-mark {left:9px;top:5px}
  .sidebar .workspace-head,body.sidebar-collapsed .sidebar .workspace-head {box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;width:auto;height:44px;min-height:44px;margin:0 3px;padding:0;position:relative;left:0;gap:10px}
  .sidebar .sidebar-toggle {box-sizing:border-box;display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted)}
  .sidebar .sidebar-toggle:hover {border-color:var(--line);background:var(--theme-hover);color:var(--ink)}
  .sidebar .workspace-head .workspace-label {display:block;min-width:0;max-width:140px;height:auto;margin:0;padding:0;overflow:hidden;white-space:nowrap;color:var(--muted);font-size:11px;font-weight:600;letter-spacing:.01em;text-transform:none;opacity:1;transition:opacity 160ms ease,max-width 200ms ease}
  .sidebar .theme-switch-row,body.sidebar-collapsed .sidebar .theme-switch-row {position:relative;top:auto;right:auto;left:auto;display:flex;align-items:center;justify-content:flex-start;width:auto;height:44px;min-height:44px;margin:0 3px;padding:0}
  .sidebar .theme-switch {display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:9px;width:100%;height:44px;min-height:44px;padding:0 5px;border-radius:9px;font-size:12px;font-weight:500}
  .sidebar .theme-switch-text {display:inline;color:var(--muted)}
  .sidebar #nav,body.sidebar-collapsed .sidebar #nav {top:176px;bottom:172px}
  .sidebar #nav>.nav-item,body.sidebar-collapsed .sidebar #nav>.nav-item {box-sizing:border-box;height:44px;min-height:44px;padding:0 15px;justify-content:flex-start;gap:10px;margin:1px 0}
  .sidebar #nav>.nav-item .nav-icon,body.sidebar-collapsed .sidebar #nav>.nav-item .nav-icon {width:20px;height:20px;flex:none}
  .sidebar .admin-nav .nav-icon,.sidebar .logout .nav-icon {width:20px;height:20px;flex:none}
  body.sidebar-collapsed .sidebar {width:70px;padding-left:10px;padding-right:10px}
  body.sidebar-collapsed .main {margin-left:70px;width:calc(100% - 70px)}
  body.sidebar-collapsed .sidebar .brand {padding-left:50px;justify-content:flex-start}
  body.sidebar-collapsed .sidebar .brand-mark {left:9px}
  body.sidebar-collapsed .sidebar .brand-name {display:block;opacity:0}
  body.sidebar-collapsed .sidebar .workspace-head .workspace-label {max-width:0;opacity:0;pointer-events:none}
  body.sidebar-collapsed .sidebar .theme-switch-row {margin:0 0 0 3px}
  body.sidebar-collapsed .sidebar .theme-switch {display:grid;place-items:center;justify-content:center;width:44px;padding:0}
  body.sidebar-collapsed .sidebar .theme-switch-text {display:none}
  body.sidebar-collapsed .sidebar .workspace-head {margin-left:3px;gap:0}
  body.sidebar-collapsed .sidebar #nav {left:10px;right:10px}
  body.sidebar-collapsed .sidebar #nav>.nav-item {padding-left:15px}
  body.sidebar-collapsed .sidebar .nav-label {display:inline;position:absolute;opacity:0;pointer-events:none}
  body.sidebar-collapsed .sidebar .admin-nav,body.sidebar-collapsed .sidebar .logout {justify-content:center;padding-left:0;padding-right:0}
  body.sidebar-collapsed .sidebar .admin-nav .nav-icon,body.sidebar-collapsed .sidebar .logout .nav-icon {width:20px;height:20px}
  .sidebar .admin-nav {box-sizing:border-box;min-height:50px;padding:8px 15px;margin:0;border-top:1px solid var(--line);border-radius:0}
  .sidebar .side-note {box-sizing:border-box;min-height:48px;margin:0;padding:5px 10px;border:0;gap:9px}
  .sidebar .side-note strong,.sidebar .side-note small {font-size:10px;line-height:1.35}
  .sidebar .side-note small {margin-top:2px}
  .sidebar .side-note .build-version {margin-top:2px}
  .sidebar .logout {box-sizing:border-box;min-height:44px;margin:0;padding:8px 15px}
}
@media(max-width:720px) {
  .mobile-theme-switch {display:grid}
  .week-backlog {padding:13px!important}
  .admin-user-projects label {grid-template-columns:1fr;gap:4px}
}
@media(prefers-reduced-motion:reduce) {#user-chip.has-pending::after {animation:none}}
/* v1.1.17: comfortable project actions and complete status controls on phones. */
@media(max-width:720px) {
  .project-content-head {flex-direction:column;align-items:stretch;gap:12px}
  .project-head-actions {display:flex;flex-wrap:wrap;gap:8px;width:100%}
  .project-head-actions .button {flex:1;min-height:42px;justify-content:center}
  #task-detail .detail-stage-line {flex-wrap:wrap!important;overflow:visible!important;max-width:100%}
  #task-detail .detail-stage-line button {min-height:36px}
  .calendar-head h2,.calendar-agenda-head strong {text-transform:none}
}
@media(max-width:540px) {
  .process-section-head {flex-direction:column;align-items:stretch}
  .process-section-head>.button {align-self:flex-start;min-height:40px}
  .workflow-stage {box-sizing:border-box;display:grid;grid-template-columns:22px 10px minmax(0,1fr);width:100%;min-width:0;gap:7px 8px}
  .workflow-stage-copy {min-width:0;overflow:hidden}
  .workflow-stage-copy strong {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .workflow-stage-actions {grid-column:2/-1;justify-content:flex-end;width:100%;margin:0;gap:4px}
  .workflow-stage-actions button {width:40px;height:40px;border:1px solid var(--line);background:var(--theme-soft)}
  .workflow-drag-handle {display:none}
}
.day-slot-row>span {color:var(--muted);font-size:12px}
.day-unscheduled p {color:var(--muted)}
.day-slot {border-left-color:var(--line);border-bottom-color:var(--line);background:var(--panel)}
.day-slot-row:nth-child(2n+1) .day-slot {border-bottom-color:var(--line)}
.day-slot:hover {background:var(--theme-hover)}
.day-selection {border-color:var(--purple);background:color-mix(in srgb,var(--purple) 14%,transparent)}
.day-event {border-color:var(--line);border-left-color:var(--purple);background:var(--theme-soft);color:var(--ink)}
#task-detail .detail-property-label,#task-detail .detail-unset,#task-detail .detail-project-line time,#task-detail .detail-shortcuts button,#task-detail .detail-edit-button {color:var(--muted)}
#task-detail .detail-property-value,#task-detail .detail-start-datetime {color:var(--ink)}
@media(max-width:540px) {
  #task-detail .detail-action-row {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  #task-detail .detail-action-row>button {min-width:0;min-height:42px;width:100%;justify-content:center}
  #task-detail .detail-action-row .detail-edit-button {grid-column:1/-1;margin-left:0;background:var(--theme-soft);border:1px solid var(--line)}
  #task-detail .detail-stage-line {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin:0}
  #task-detail .detail-stage-line button {min-width:0;border:1px solid var(--line);border-radius:6px!important;white-space:normal;overflow-wrap:anywhere}
}
#task-detail .detail-property-value .detail-unset {color:var(--muted)!important}
#task-detail .detail-start-datetime span:first-child {color:var(--ink)!important}
#task-detail .detail-property-label .icon {color:var(--muted)}
#task-detail .detail-project-line time {color:var(--muted)!important}

/* workspace-layout.css */
/* Shared task workspace geometry. The project name never sets the row height. */
#view .project-page-head {box-sizing:border-box;height:116px;margin:0 0 18px;border-bottom:1px solid var(--line)}
#view .project-identity {display:flex;align-items:center;gap:12px;height:70px;min-width:0;padding:0}
#view .project-identity>div {flex:1;min-width:0}
#view .project-identity h1 {margin:3px 0 0;font-size:23px;line-height:1.25;letter-spacing:-.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#view .project-identity .eyebrow {margin:0;color:var(--muted);font-size:10px}
#view .project-identity .project-avatar {width:40px;height:40px;flex:none}
#view .project-tabs,#view .workspace-context {box-sizing:border-box;height:45px;display:flex;align-items:center;margin:0;padding:0;gap:24px;color:var(--muted);font-size:12px}
#view .project-tabs {overflow-x:auto;scrollbar-width:none}
#view .project-tabs button {height:45px;flex:none;margin:0;padding:0 2px;font-size:12px}
#view .board-toolbar {box-sizing:border-box;min-height:44px;margin:0 0 14px;gap:12px}
#view .board-toolbar>.custom-select,#view .board-toolbar>#project-filter {flex:0 0 230px;width:230px;min-width:0;max-width:230px}
.hierarchy-list {min-height:390px;background:var(--panel);border-color:var(--line)}
.hierarchy-list .hierarchy-toolbar {box-sizing:border-box;height:56px;min-height:56px;padding:8px 16px;border-color:var(--line);color:var(--ink)}
.hierarchy-toolbar>span {display:flex;align-items:center;gap:8px}
.hierarchy-toolbar small {color:var(--muted);font-size:11px;font-weight:500;font-variant-numeric:tabular-nums}
.hierarchy-list .hierarchy-filters {display:flex;flex-wrap:nowrap;gap:3px;padding:3px;border:1px solid var(--line);border-radius:9px;background:var(--bg)}
.hierarchy-list .hierarchy-filters button {min-height:30px;padding:5px 13px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);transition:background-color 160ms ease,color 160ms ease}
.hierarchy-list .hierarchy-filters button[aria-pressed="true"] {background:var(--panel);border-color:var(--line);color:var(--ink)}
.hierarchy-list .hierarchy-filters button:hover {color:var(--ink);background:var(--theme-hover)}
.hierarchy-list .task-list-head,.hierarchy-list .hierarchy-row {grid-template-columns:minmax(310px,1fr) 100px 138px 110px 110px;gap:16px;min-width:820px;padding-inline:16px}
.hierarchy-list .task-list-head {height:40px;background:var(--panel);color:var(--muted);font-size:11px;border-color:var(--line)}
.hierarchy-list .hierarchy-row {box-sizing:border-box;height:60px;min-height:60px;color:var(--muted);font-size:12px;border-color:var(--line)}
.hierarchy-row .task-list-title {min-width:0;overflow:hidden}
.hierarchy-row .task-title-link {font-size:12px;line-height:1.4}
.hierarchy-project {min-width:0;white-space:nowrap}
.project-code {display:inline-flex;align-items:center;justify-content:center;max-width:100%;min-width:38px;height:24px;padding:0 7px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--muted);font-size:10px;font-weight:650;letter-spacing:.035em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-nav-label {display:none}
@media(max-width:720px) {
  #view .project-page-head {height:126px;margin-bottom:14px}
  #view .project-identity {height:78px;gap:9px}
  #view .project-identity h1 {font-size:20px}
  #view .project-identity .button {width:40px;height:40px;min-height:40px;padding:0;font-size:0;flex:none}
  #view .project-identity .button .icon {width:18px;height:18px}
  #view .project-tabs,#view .workspace-context {height:47px;gap:18px;font-size:11px}
  #view .project-tabs button {height:47px;font-size:11px}
  #view .board-toolbar {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;min-height:94px}
  #view .board-toolbar>.custom-select,#view .board-toolbar>#project-filter {width:100%;max-width:none;min-width:0}
  #view .board-toolbar .toolbar-spacer {display:none}
  #view .board-toolbar .view-switch {width:100%;min-width:0}
  #view .board-toolbar .view-switch button {flex:1;padding-inline:6px}
  #view .board-toolbar>.button {height:38px;min-width:76px;margin:0;padding-inline:8px;font-size:11px}
  .hierarchy-list .hierarchy-toolbar {height:86px;min-height:86px;align-items:stretch;justify-content:center;gap:8px;padding:10px}
  .hierarchy-list .hierarchy-filters {width:100%}
  .hierarchy-list .hierarchy-filters button {flex:1;padding-inline:7px;font-size:11px}
  .hierarchy-list .task-list-head {display:none}
  .hierarchy-list .hierarchy-row {height:84px;min-height:84px;min-width:0;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr 24px;gap:0 8px;padding:9px 10px}
  .hierarchy-list .task-list-title {grid-column:1/-1;padding-left:calc(min(var(--depth),3)*14px);gap:5px}
  .hierarchy-row .task-title-link {white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:1.35}
  .hierarchy-row .work-progress {font-size:9px;padding:2px 4px}
  .hierarchy-list .hierarchy-row>.hierarchy-project {display:block;grid-row:2;grid-column:1;padding-left:calc(24px + min(var(--depth),3)*14px)}
  .hierarchy-list .hierarchy-row>span:nth-child(3) {grid-row:2;grid-column:2}
  .hierarchy-row .status-badge {font-size:9px;min-height:20px;max-width:115px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .hierarchy-row .project-code {height:20px;font-size:9px}
  /* A single floating navigation dock, including the administrator action. */
  body .sidebar,body.sidebar-collapsed .sidebar {box-sizing:border-box;position:fixed;inset:auto 8px calc(8px + env(safe-area-inset-bottom)) 8px;width:auto;height:64px;min-height:64px;padding:5px;display:grid;grid-template-columns:minmax(0,1fr);border:1px solid var(--line);border-radius:19px;background:var(--theme-sidebar,var(--panel));box-shadow:0 4px 20px #00000012;z-index:8}
  body .sidebar:has(#admin-nav:not([hidden])) {grid-template-columns:minmax(0,1fr) minmax(40px,1fr);grid-template-columns:minmax(0,5fr) 1fr}
  body .sidebar #nav,body.sidebar-collapsed .sidebar #nav {position:static;inset:auto;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%;height:52px;margin:0;padding:0;gap:2px;overflow:visible}
  body .sidebar #nav>.nav-item,body.sidebar-collapsed .sidebar #nav>.nav-item,body .sidebar #admin-nav {box-sizing:border-box;position:relative;inset:auto;width:100%;height:52px;min-height:52px;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;margin:0;padding:4px 0;border:0;border-radius:13px;background:transparent;color:var(--muted);font-size:9px;line-height:1.1;transition:background-color 180ms ease,color 180ms ease}
  body .sidebar #nav>.nav-item.active,body .sidebar #admin-nav.active {background:var(--theme-hover);color:var(--ink)}
  body .sidebar #nav .nav-icon,body .sidebar #admin-nav .nav-icon {width:20px;height:20px;flex:none}
  body .sidebar #nav .nav-label,body .sidebar #admin-nav .nav-label {display:none}
  body .sidebar .mobile-nav-label {display:block;white-space:nowrap;font-weight:550}
  body .sidebar #admin-nav[hidden],body .sidebar .brand,body .sidebar .workspace-head,body .sidebar .theme-switch-row,body .sidebar .side-note,body .sidebar .logout,body .sidebar .sidebar-spacer,body .sidebar #project-nav {display:none!important}
  body .main,body.sidebar-collapsed .main {margin-left:0;width:100%;padding-bottom:calc(88px + env(safe-area-inset-bottom))}
  body .sidebar .pending-badge {top:2px;right:4px}
  .toast {bottom:calc(88px + env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion:reduce) {.hierarchy-list .hierarchy-filters button,body .sidebar #nav>.nav-item,body .sidebar #admin-nav {transition:none}}
#view .board-toolbar>.select-control {flex:0 0 230px;width:230px;min-width:0;max-width:230px}
.hierarchy-list .work-progress {background:var(--bg);color:var(--muted);border:1px solid var(--line)}
@media(max-width:720px) {#view .board-toolbar>.select-control {width:100%;max-width:none}.hierarchy-list .work-progress {border:0}}
@media(max-width:360px) {#view .board-toolbar .view-switch .icon {display:none}}
#view .board-toolbar>.button {width:96px;flex:none;justify-content:center}
@media(max-width:720px) {
  #view .board-toolbar {grid-template-columns:minmax(0,1fr) 84px}
  #view .board-toolbar>.button {display:inline-flex;width:84px;min-width:0;justify-content:center}
}
.hierarchy-list .hierarchy-toggle:hover,.hierarchy-list .hierarchy-toggle:focus-visible {background:var(--theme-hover);color:var(--ink)}
.hierarchy-list .hierarchy-toggle:focus-visible {outline:2px solid var(--accent);outline-offset:1px}

/* One continuous axis: rounded branches lead to quiet disclosure markers. */
.hierarchy-list {--tree-step:22px;--tree-axis:29px;--tree-joint:30px;--tree-line:#b3c5d0}
:root[data-theme="night"] .hierarchy-list {--tree-line:#597584}
.hierarchy-list .hierarchy-row {position:relative}
.hierarchy-list .hierarchy-toggle {position:relative;z-index:2;color:var(--muted);border-radius:50%;background:transparent}
.hierarchy-caret {display:block;width:14px;height:14px;transition:transform 220ms cubic-bezier(.22,.72,.2,1),color 160ms ease;transform-origin:50% 50%}
.hierarchy-toggle[aria-expanded="true"] .hierarchy-caret {color:var(--ink)}
.hierarchy-caret-stem {transform-origin:8px 8px;transition:transform 180ms ease,opacity 180ms ease}
.hierarchy-toggle[aria-expanded="true"] .hierarchy-caret-stem {transform:scaleY(0);opacity:0}
.hierarchy-list .hierarchy-toggle:hover,.hierarchy-list .hierarchy-toggle:focus-visible {color:var(--accent);background:var(--theme-hover)}
.hierarchy-list .hierarchy-row::after {content:'';display:none;position:absolute;pointer-events:none;top:calc(var(--tree-joint) + 10px);bottom:0;left:calc(var(--tree-axis) + var(--depth)*var(--tree-step));border-left:1px solid var(--tree-line)}
.hierarchy-list .hierarchy-row:has(.hierarchy-toggle[aria-expanded="true"])::after {display:block}
.hierarchy-list .hierarchy-children>.hierarchy-node::before {top:0;bottom:0;left:calc(var(--tree-axis) + (var(--depth) - 1)*var(--tree-step));height:auto;border:0;border-left:1px solid var(--tree-line)}
.hierarchy-list .hierarchy-children>.hierarchy-node:last-child::before {height:auto;bottom:calc(100% - var(--tree-joint) + 7px)}
.hierarchy-list .hierarchy-children>.hierarchy-node::after {box-sizing:border-box;top:calc(var(--tree-joint) - 7px);left:calc(var(--tree-axis) + (var(--depth) - 1)*var(--tree-step));width:calc(var(--tree-step) - 9px);height:7px;border:0;border-left:1px solid var(--tree-line);border-bottom:1px solid var(--tree-line);border-bottom-left-radius:7px}
@media(max-width:720px) {
  .hierarchy-list {--tree-step:14px;--tree-axis:21px}
  .hierarchy-list .hierarchy-toggle,.hierarchy-list .hierarchy-toggle-spacer {width:22px}
  .hierarchy-list .hierarchy-caret {width:14px;height:14px}
  .hierarchy-list .hierarchy-children>.hierarchy-node::after {width:9px}
}
@media(prefers-reduced-motion:reduce) {.hierarchy-caret,.hierarchy-caret-stem {transition:none}}

/* interface-soft.css */
/* Approved reference direction. Classic layout and palettes remain intact. */
:root[data-interface="soft"] {
  --bg:#f4f4f8;--panel:#fff;--ink:#162129;--muted:#64717b;--line:#e3e7eb;
  --purple:#148591;--purple-dark:#106e79;--theme-sidebar:#f9f9fb;
  --theme-soft:#edf5f5;--theme-hover:#e1f1f2;--theme-card:#fff;
  --theme-low:#fff;--theme-normal:#fff5e8;--theme-high:#fff0ef;
  --shadow:0 5px 24px rgb(25 40 55 / 5%);--soft-shadow:var(--shadow);
  font-family:-apple-system,BlinkMacSystemFont,"Inter",sans-serif;
}
:root[data-interface="soft"][data-theme="night"] {
  --bg:#142127;--panel:#20323a;--ink:#edf5f6;--muted:#b5c6cc;--line:#41565f;
  --purple:#67d2d7;--purple-dark:#96e5e8;--theme-sidebar:#1a2b33;
  --theme-soft:#2a424a;--theme-hover:#33535b;--theme-card:#20323a;
  --theme-low:#20323a;--theme-normal:#39362e;--theme-high:#413237;
  --shadow:none;--soft-shadow:none;
}
:root[data-interface="soft"] body {font-family:inherit;background:var(--bg);color:var(--ink)}
:root[data-interface="soft"] button,:root[data-interface="soft"] input,:root[data-interface="soft"] textarea,:root[data-interface="soft"] select {font-family:inherit}
.interface-settings {display:grid;gap:14px}
.interface-switch {display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--theme-soft);color:var(--ink);text-align:left}
.interface-switch .theme-track {flex:none}
.interface-switch[aria-checked="true"] .theme-track {background:#148591;border-color:#148591}
.interface-switch[aria-checked="true"] .theme-thumb {transform:translateX(18px)}
#interface-save-state {min-height:18px;color:var(--muted)}
:root[data-interface="soft"] .brand-mark {background:#30aeba;box-shadow:none;border:0;color:#fff}
:root[data-interface="soft"] .brand-name em,:root[data-interface="soft"] .mobile-brand em {color:var(--purple)}
:root[data-interface="soft"] .brand-name small {color:var(--muted)}
:root[data-interface="soft"] .sidebar {background:var(--theme-sidebar);border-color:var(--line)}
:root[data-interface="soft"] .topbar {background:var(--panel);border-color:var(--line)}
:root[data-interface="soft"] .nav-item {border-radius:12px;color:var(--muted)}
:root[data-interface="soft"] .nav-item.active {color:var(--purple);background:var(--theme-hover)}
:root[data-interface="soft"] .button.primary,:root[data-interface="soft"] .auth-submit {background:#148591;color:#fff;border-color:#148591;box-shadow:none}
:root[data-interface="soft"][data-theme="night"] .button.primary {background:#238c98;color:#fff;border-color:#238c98}
:root[data-interface="soft"] :is(.button,.icon-button,.custom-select-trigger,.view-switch) {border-radius:12px;box-shadow:none}
:root[data-interface="soft"] :is(.panel,.stat-card,.analytics-card,.project-summary,.hierarchy-list,.knowledge-card,.doc-card,.column,.crm-column) {border:1px solid var(--line);border-radius:18px;background:var(--panel);box-shadow:var(--shadow)}
:root[data-interface="soft"] :is(.task-card,.week-task) {border-radius:13px;box-shadow:none;color:var(--ink)}
:root[data-interface="soft"] :is(.task-row,.hierarchy-row,.detail-comment,.detail-history-item) {border-color:var(--line)}
:root[data-interface="soft"] :is(.muted,.eyebrow,label,.detail-property-label,.detail-unset,.detail-hint,.auth-kicker) {color:var(--muted)}
:root[data-interface="soft"] :is(input,textarea,select,.custom-select-trigger) {background:var(--panel);color:var(--ink);border-color:var(--line)}
:root[data-interface="soft"] :is(input,textarea)::placeholder {color:var(--muted);opacity:1}
:root[data-interface="soft"] :is(.custom-select-menu,.profile-menu,.date-picker,.participant-menu) {background:var(--panel);color:var(--ink);border-color:var(--line);border-radius:14px;box-shadow:var(--shadow)}
:root[data-interface="soft"] :is(.view-switch,.hierarchy-filters) {background:var(--theme-soft);border-color:var(--line)}
:root[data-interface="soft"] :is(.view-switch button.active,.hierarchy-filters button[aria-pressed="true"]) {background:var(--panel);color:var(--purple);border-color:var(--line)}
:root[data-interface="soft"] :is(dialog,.profile-settings,.modal,.auth-dialog) {background:var(--bg);color:var(--ink);border-color:var(--line)}
:root[data-interface="soft"] :is(.login-screen,.task-detail,.task-detail-content,.detail-scroll) {background:var(--bg)}
:root[data-interface="soft"] .auth-card {background:var(--panel);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}
:root[data-interface="soft"] :is(.detail-toolbar,.detail-layer-rail,.detail-comment-dock) {background:var(--panel);color:var(--ink);border-color:var(--line)}
:root[data-interface="soft"] .detail-scroll {padding:20px;display:block}
:root[data-interface="soft"] :is(.detail-heading,.detail-properties,.detail-description,.detail-section) {background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:20px;margin:0 0 16px;box-shadow:var(--shadow)}
:root[data-interface="soft"] .detail-heading h2 {color:var(--ink);letter-spacing:-.025em}
:root[data-interface="soft"] .detail-section-head {margin-bottom:14px}
:root[data-interface="soft"] .detail-description .detail-copy {color:var(--ink)}
:root[data-interface="soft"] .detail-property {gap:16px}
:root[data-interface="soft"] .detail-properties {padding-block:14px}
:root[data-interface="soft"] :is(.detail-complete-button,.detail-timer-button,.detail-edit-button) {border-radius:12px}
:root[data-interface="soft"] #view .project-page-head {height:auto;min-height:140px;background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:16px 20px;box-shadow:var(--shadow)}
:root[data-interface="soft"] #view .project-identity {height:98px}
:root[data-interface="soft"] #view .workspace-task-head .project-identity {height:68px}
:root[data-interface="soft"] #view .workspace-task-head {min-height:140px}
:root[data-interface="soft"] .project-avatar {border-radius:50%}
.soft-project-description {margin:6px 0;color:var(--muted);font-size:13px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.soft-progress {display:flex;align-items:center;gap:12px;color:var(--muted);font-size:11px}
.soft-progress progress {appearance:none;height:4px;border:0;flex:1;max-width:240px;background:var(--line);border-radius:4px;overflow:hidden}
.soft-progress progress::-webkit-progress-bar {background:var(--line)}
.soft-progress progress::-webkit-progress-value {background:#30aeba}
.soft-progress progress::-moz-progress-bar {background:#30aeba}
.soft-actions {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 20px}
.soft-actions button {display:flex;align-items:center;gap:14px;padding:24px;border:1px solid var(--line);border-radius:18px;background:var(--panel);color:var(--ink);box-shadow:var(--shadow);font-weight:600}
.soft-actions .icon {width:24px;height:24px;color:var(--purple);flex:none}
:root[data-interface="soft"] .calendar-panel {background:var(--panel);border-radius:18px;border-color:var(--line)}
:root[data-interface="soft"] :is(.calendar-day,.calendar-day.today) {color:var(--ink);border-color:var(--line)}
:root[data-interface="soft"] .calendar-day:hover {background:var(--theme-hover)}
:root[data-interface="soft"] .calendar-day .calendar-task {border:1px solid var(--line);color:var(--ink)}
@media(max-width:720px){
  :root[data-interface="soft"] .view {padding:18px 16px calc(96px + env(safe-area-inset-bottom))}
  :root[data-interface="soft"] .sidebar {left:0;right:0;bottom:0;width:100%;height:calc(70px + env(safe-area-inset-bottom));padding:6px 8px calc(6px + env(safe-area-inset-bottom));border-radius:0;border:0;border-top:1px solid var(--line);box-shadow:none;background:var(--panel);gap:0}
  :root[data-interface="soft"] .sidebar :is(#nav,.admin-nav) {gap:0}
  :root[data-interface="soft"] .sidebar .nav-item {height:56px;min-width:0;padding:7px 2px;gap:5px;border-radius:0;background:transparent;color:var(--muted)}
  :root[data-interface="soft"] .sidebar .nav-item.active {color:var(--purple);background:transparent}
  :root[data-interface="soft"] .sidebar .nav-icon {width:22px;height:22px}
  :root[data-interface="soft"] .sidebar .mobile-nav-label {font-size:10px;line-height:14px;white-space:nowrap;letter-spacing:0}
  :root[data-interface="soft"] .sidebar:has(.admin-nav:not([hidden])) .nav-icon {width:20px;height:20px}
  :root[data-interface="soft"] .sidebar:has(.admin-nav:not([hidden])) .mobile-nav-label {font-size:9px}
  :root[data-interface="soft"] .topbar {height:64px;padding:10px 16px;background:var(--bg)}
  :root[data-interface="soft"] .soft-actions {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  :root[data-interface="soft"] .soft-actions button {flex-direction:column;gap:10px;padding:20px 10px;font-size:14px}
  :root[data-interface="soft"] #view .project-page-head {padding:12px 16px;margin-bottom:16px}
  :root[data-interface="soft"] #view .project-identity {height:110px}
  :root[data-interface="soft"] #view .project-identity h1 {font-size:21px}
  :root[data-interface="soft"] .soft-progress {gap:8px;font-size:10px}
  :root[data-interface="soft"] .soft-progress progress {max-width:100px}
  :root[data-interface="soft"] .detail-scroll {padding:12px}
  :root[data-interface="soft"] :is(.detail-heading,.detail-properties,.detail-description,.detail-section) {padding:16px;margin-bottom:12px;border-radius:18px}
  :root[data-interface="soft"] .detail-properties .detail-property {grid-template-columns:105px minmax(0,1fr);gap:10px}
  :root[data-interface="soft"] :is(.detail-property-label,.detail-property-value) {font-size:13px}
  :root[data-interface="soft"] .detail-heading h2 {font-size:24px;line-height:1.25}
  :root[data-interface="soft"] .detail-heading-top {gap:8px;font-size:11px}
  :root[data-interface="soft"] .detail-comment-dock {padding:10px 12px calc(10px + env(safe-area-inset-bottom))}
  :root[data-interface="soft"] .stats {gap:12px}
}
@media(prefers-reduced-motion:no-preference){
  :root[data-interface="soft"] :is(.button,.nav-item,.soft-actions button) {transition:background-color 160ms ease,color 160ms ease,border-color 160ms ease}
}
@media(max-width:720px){:root[data-interface="soft"] .sidebar #nav>.nav-item.active,:root[data-interface="soft"] .sidebar #admin-nav.active {background:transparent;color:var(--purple)}}
@media(max-width:720px){
  :root[data-interface="soft"] .hierarchy-list {min-height:0}
  :root[data-interface="soft"] .hierarchy-list .task-title-link {font-size:14px;line-height:1.4}
  :root[data-interface="soft"] .hierarchy-list .hierarchy-row {min-height:88px}
}
:root[data-interface="soft"] #task-detail .detail-properties {padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--panel);margin-bottom:16px}
:root[data-interface="soft"] #task-detail .detail-property {padding:9px 0;gap:12px;background:transparent;border:0}
:root[data-interface="soft"] #task-detail .detail-property-label {color:var(--muted)!important}
:root[data-interface="soft"] #task-detail .detail-property-value {color:var(--ink)}
:root[data-interface="soft"] #task-detail .detail-heading-top {color:var(--muted)}
:root[data-interface="soft"] #task-detail .detail-stage-line button.active {background:var(--theme-hover);color:var(--purple);border-color:var(--purple)}
:root[data-interface="soft"] .button.primary {background:var(--purple);color:#fff;border-color:var(--purple)}
:root[data-interface="soft"] .brand-mark {background:#30aeba!important}
:root[data-interface="soft"] .detail-complete-button {background:var(--theme-hover);color:var(--purple)}
:root[data-interface="soft"] .detail-timer-button {background:var(--theme-soft);color:var(--ink)}
:root[data-interface="soft"] :is(.stat-foot,.detail-shortcuts button,.detail-heading-top time) {color:var(--muted)}
@media(max-width:720px){
  :root[data-interface="soft"] #task-detail .detail-property {grid-template-columns:105px minmax(0,1fr)}
}
.soft-task-summary,.soft-parent-card,.soft-parameters-toggle,.soft-task-badges {display:none}
:root[data-interface="soft"] .soft-task-summary,:root[data-interface="soft"] .soft-parent-card {display:block;background:var(--panel);padding:20px;border:1px solid var(--line);border-radius:18px;margin-bottom:16px;box-shadow:var(--shadow)}
:root[data-interface="soft"] .soft-assignee {display:flex;align-items:center;gap:14px;padding-bottom:16px}
:root[data-interface="soft"] .soft-assignee>.icon {width:28px;height:28px;color:var(--purple)}
:root[data-interface="soft"] .soft-assignee small,:root[data-interface="soft"] .soft-task-dates small {display:block;margin:4px 0;color:var(--muted);font-size:12px}
:root[data-interface="soft"] .soft-task-dates {display:grid;grid-template-columns:1fr 1fr;gap:12px;border-top:1px solid var(--line);padding-top:12px}
:root[data-interface="soft"] .soft-task-dates>div {display:flex;align-items:flex-start;gap:10px}
:root[data-interface="soft"] .soft-task-dates .icon {color:var(--purple);margin-top:5px;flex:none}
:root[data-interface="soft"] .soft-task-dates strong {font-size:13px;line-height:1.5}
:root[data-interface="soft"] .soft-parent-card {display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:14px}
:root[data-interface="soft"] .soft-parent-card progress {width:100%;height:5px;accent-color:#30aeba}
:root[data-interface="soft"] .soft-parameters-toggle {display:flex;align-items:center;justify-content:space-between;width:100%;padding:12px 16px;margin-bottom:12px;background:var(--theme-soft);color:var(--purple);border:1px solid var(--line);border-radius:12px}
:root[data-interface="soft"] #task-detail .detail-properties:not(.soft-expanded) {display:none}
:root[data-interface="soft"] .detail-heading {display:flex;flex-direction:column}
:root[data-interface="soft"] .detail-heading-top {order:0}
:root[data-interface="soft"] #task-detail-title {order:1;margin:12px 0 14px}
:root[data-interface="soft"] .soft-task-badges {display:flex;gap:8px;align-items:center;order:2;margin-bottom:16px}
:root[data-interface="soft"] .soft-task-stage {padding:5px 10px;border-radius:10px;background:var(--theme-hover);color:var(--purple);font-size:12px}
:root[data-interface="soft"] .detail-action-row {order:3}
:root[data-interface="soft"] .detail-shortcuts {order:4;margin-top:12px}
.soft-pulse {background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:22px;margin-bottom:16px;box-shadow:var(--shadow)}
.soft-pulse h2 {display:flex;align-items:center;gap:10px;font-size:18px;margin:0 0 18px}
.soft-pulse-values {display:grid;grid-template-columns:repeat(3,1fr);text-align:center;margin-bottom:18px}
.soft-pulse-values>div+div {border-left:1px solid var(--line)}
.soft-pulse-values strong {display:block;font-size:30px;color:var(--purple);font-variant-numeric:tabular-nums}
.soft-pulse-values span {font-size:12px;color:var(--muted)}
.soft-pulse-values .soft-overdue {color:#d1495b}
.soft-pulse progress {width:100%;height:8px;accent-color:#30aeba}
.soft-pulse small {display:block;color:var(--muted);margin-top:8px}
.soft-project-actions {grid-template-columns:repeat(2,minmax(0,1fr))}
:root[data-interface="soft"] #view .project-tabs {background:var(--bg);border-radius:10px;gap:3px;padding:3px;height:42px}
:root[data-interface="soft"] #view .project-tabs button {flex:1;height:36px;padding:0 8px;border:0;border-radius:8px;font-size:12px;color:var(--muted)}
:root[data-interface="soft"] #view .project-tabs button.active {background:var(--panel);color:var(--ink);box-shadow:var(--shadow)}
:root[data-interface="soft"] #view .project-tabs button.active:after {display:none}
@media(max-width:720px){
  :root[data-interface="soft"] #view .project-tabs button {font-size:11px;flex:none;padding:0 10px}
  :root[data-interface="soft"] .soft-project-actions button {flex-direction:row;justify-content:center;padding:20px 10px;color:var(--purple)}
}
.soft-pulse progress {appearance:none;border:0;background:var(--line);border-radius:8px;overflow:hidden}
.soft-pulse progress::-webkit-progress-bar {background:var(--line);border-radius:8px}
.soft-pulse progress::-webkit-progress-value {background:#30aeba;border-radius:8px}
.soft-pulse progress::-moz-progress-bar {background:#30aeba;border-radius:8px}
:root[data-interface="soft"] #task-detail :is(.detail-description,.detail-section) {padding:20px;border:1px solid var(--line);border-radius:18px;background:var(--panel);margin:0 0 16px}
:root[data-interface="soft"] #task-detail .detail-description-head h3 {font-size:16px;color:var(--ink)}
:root[data-interface="soft"] #task-detail .detail-copy {font-size:14px;line-height:1.65;color:var(--ink)}
:root[data-interface="soft"] .detail-activity {display:flex;flex-direction:column}
:root[data-interface="soft"] .detail-activity>.detail-section {order:3}
:root[data-interface="soft"] #detail-comments {order:0}
:root[data-interface="soft"] #detail-history {order:1}
:root[data-interface="soft"] #detail-files {order:2}
.soft-activity-tabs {display:none}
:root[data-interface="soft"] .soft-activity-tabs {order:-1;display:flex;padding:4px;margin-bottom:12px;border-radius:12px;background:var(--theme-soft);gap:3px}
:root[data-interface="soft"] .soft-activity-tabs button {flex:1;border:0;border-radius:9px;padding:10px 4px;background:transparent;color:var(--muted);font-size:13px}
:root[data-interface="soft"] .soft-activity-tabs button[aria-pressed="true"] {background:var(--panel);color:var(--ink);box-shadow:var(--shadow)}
:root[data-interface="soft"] .detail-activity[data-activity-tab="comments"] :is(#detail-history,#detail-files),
:root[data-interface="soft"] .detail-activity[data-activity-tab="history"] :is(#detail-comments,#detail-files),
:root[data-interface="soft"] .detail-activity[data-activity-tab="files"] :is(#detail-comments,#detail-history) {display:none}
:root[data-interface="soft"] .detail-activity :is(#detail-comments,#detail-history,#detail-files) {order:0}
:root[data-interface="soft"] #task-detail :is(.detail-history-item time,.detail-comment-meta time,.detail-section-head>span,.detail-heading-top time) {color:var(--muted);font-size:12px}
:root[data-interface="soft"] #task-detail :is(.detail-history-item,.detail-comment,.detail-hint) {font-size:14px;line-height:1.55}
:root[data-interface="soft"] .soft-project-actions~.board-toolbar>[data-project-new-task],
:root[data-interface="soft"] #view:has(>.soft-pulse)>.page-head>.button {display:none}
@media(max-width:720px){
  :root[data-interface="soft"] .soft-project-actions~.board-toolbar .view-switch {grid-column:1/-1}
}
:root[data-interface="soft"] #view .soft-project-actions~.board-toolbar>[data-project-new-task] {display:none!important}

/* iteration-polish.css */
/* Shared geometry and semantic colours, applied to both interface choices. */
:root {--control-height:40px;--control-small:36px;--control-radius:10px}
:root[data-theme="night"] {
 --bg:#102326;--panel:#193135;--ink:#edf7f7;--muted:#b5cccd;--line:#3c5b5e;
 --purple:#70d7db;--purple-dark:#a2e8e8;--accent:#70d7db;
 --theme-sidebar:#13292d;--theme-soft:#203d40;--theme-hover:#2b4d50;--theme-card:#1c363a;
 --theme-low:#1c363a;--theme-normal:#3e362c;--theme-high:#402f35;
 --theme-border-normal:#cfa272;--theme-border-high:#cf8990;
}
:root[data-interface="soft"][data-theme="night"] {--bg:#112629;--panel:#1d3539;--theme-sidebar:#172d31;--theme-soft:#254145;--theme-hover:#305156;--theme-card:#1d3539;--ink:#edf7f7;--muted:#b5cccd;--line:#405d60;--purple:#70d7db;--accent:#70d7db}
body .button {box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:var(--control-height);min-height:var(--control-height);padding:0 16px;border-radius:var(--control-radius);font-size:13px;line-height:1.2;font-weight:600;white-space:nowrap;flex-shrink:0}
body .button.small {height:var(--control-small);min-height:var(--control-small);padding:0 12px;font-size:12px}
body .button .icon {width:18px;height:18px;flex:none}
body :is(.modal-actions,.workflow-form-actions,.account-row-actions) {gap:8px}
body .modal-actions>.button {min-width:112px}
:root[data-theme="night"] body :is(label,.muted,.detail-hint,.detail-comment-meta,.detail-history-item time) {color:var(--muted)}
:root[data-theme="night"] body :is(input,textarea,.select-trigger) {background:var(--panel);color:var(--ink);border-color:var(--line)}
:root[data-theme="night"] body input::placeholder,:root[data-theme="night"] body textarea::placeholder {color:#9cb7b9;opacity:1}
#task-detail .detail-description {box-sizing:border-box;min-width:0}
#task-detail .detail-description-head {margin:0 0 14px;padding:0;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
#task-detail .detail-description-head h3 {margin:0;padding:0;color:var(--ink);font-size:14px;line-height:1.4}
#task-detail .detail-description-head button {height:36px;padding:0 8px;flex:none;color:var(--muted);font-size:13px}
#task-detail .detail-copy {margin:0;padding:0;overflow-wrap:anywhere}
#task-detail .detail-description-form {margin:0;min-width:0}
#task-detail .detail-comment-dock {align-items:center}
#task-detail .detail-comment-dock input {box-sizing:border-box;flex:1;min-width:0;width:0;height:44px;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink);font-size:16px;line-height:1.3}
#task-detail .detail-comment-dock button {width:44px;height:44px;min-height:44px;border-radius:12px}
.detail-comment {overflow-wrap:anywhere}
.detail-comment-meta {display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.detail-comment-meta .comment-edit {margin-left:auto;height:32px;padding:0 8px;border:0;background:transparent;color:var(--purple);font-size:12px}
.detail-comment-edited {display:block;margin:7px 0 0;color:var(--muted);font-size:11px;line-height:1.5}
.comment-editor {display:grid;gap:10px;margin-top:10px}
.comment-editor textarea {width:100%;min-height:88px;resize:vertical;font-size:16px}
.comment-editor>div {display:flex;gap:8px;justify-content:flex-end}
.calendar-mobile-agenda,.calendar-agenda-list {min-width:0;width:100%;max-width:100%;box-sizing:border-box}
body .calendar-agenda-list>button:not(.is-page-hidden),body .day-unscheduled-item:not(.is-page-hidden) {box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;width:100%;max-width:100%;min-width:0;min-height:64px;padding:12px;border:1px solid var(--line);background:var(--theme-card);color:var(--ink);border-radius:12px;font:inherit;text-align:left}
body .calendar-agenda-title,body .day-unscheduled-item>.agenda-title {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;min-width:0;overflow:hidden;white-space:normal;overflow-wrap:anywhere;font-size:14px;line-height:1.45;font-weight:550}
body .calendar-agenda-list .priority-badge {max-width:88px;font-size:10px;white-space:nowrap}
body .calendar-agenda-head {align-items:center;min-width:0}
body .calendar-agenda-head strong {font-size:15px;line-height:1.4;overflow-wrap:anywhere}
body .calendar-agenda-list>.list-pager {grid-column:1/-1}
.feedback-dialog {width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid var(--line);border-radius:22px;background:var(--panel);color:var(--ink);overflow-y:auto}
.feedback-dialog::backdrop {background:#06191aaa;backdrop-filter:blur(8px)}
.feedback-head {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}
.feedback-head h2 {margin:4px 0;font-size:24px}
.feedback-dialog form {display:grid;gap:16px}
.feedback-dialog label {display:grid;gap:8px;color:var(--muted);font-size:13px;font-weight:550;min-width:0}
.feedback-dialog :is(input,textarea) {width:100%;box-sizing:border-box;font-size:16px}
.feedback-dialog textarea {min-height:130px;resize:vertical}
.feedback-dialog small,.feedback-note {color:var(--muted);font-size:12px;line-height:1.5}
.feedback-list {display:grid;gap:12px;margin-top:20px;min-width:0}
.feedback-item {width:100%;min-width:0;padding:16px;text-align:left;border:1px solid var(--line);border-radius:14px;color:var(--ink);background:var(--panel)}
.feedback-item>strong {display:block;overflow-wrap:anywhere;font-size:14px;line-height:1.5}
.feedback-item>small {display:block;margin-top:8px;color:var(--muted);font-size:12px}
.feedback-status {display:inline-flex;padding:4px 8px;border-radius:6px;font-size:11px;background:var(--theme-soft);color:var(--ink)}
.feedback-status.accepted {color:var(--purple)}
.feedback-status.rejected {color:var(--theme-border-high,#a83446)}
.feedback-body {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:15px}
.feedback-response {padding:16px;background:var(--theme-soft);border-radius:12px;margin:16px 0;overflow-wrap:anywhere}
.feedback-files {display:grid;gap:8px;margin:16px 0}
.feedback-files a {display:block;padding:12px;border:1px solid var(--line);border-radius:10px;color:var(--purple);overflow-wrap:anywhere}
.feedback-notice {width:7px;height:7px;background:var(--purple);border-radius:50%;margin-left:auto}
@media(max-width:720px) {
 :root {--control-height:44px;--control-small:40px}
 body .button {font-size:13px;padding-inline:12px}
 body .button.small {font-size:12px}
 body .sidebar,body.sidebar-collapsed .sidebar {height:76px;min-height:76px;padding:6px;align-items:start;grid-template-columns:minmax(0,1fr);gap:0}
 body .sidebar:has(#admin-nav:not([hidden])) {grid-template-columns:minmax(0,5fr) minmax(0,1fr)}
 body .sidebar #nav,body.sidebar-collapsed .sidebar #nav {height:60px;gap:0;align-items:start}
 body .sidebar #nav>.nav-item,body.sidebar-collapsed .sidebar #nav>.nav-item,body .sidebar #admin-nav,
 :root[data-interface="soft"] body .sidebar #admin-nav {display:grid;grid-template-rows:24px 14px;align-content:center;justify-items:center;align-items:center;gap:5px;height:60px;min-height:60px;padding:0;margin:0;border:0;line-height:14px;border-radius:14px}
 body .sidebar #nav .nav-icon,body .sidebar #admin-nav .nav-icon,:root[data-interface="soft"] .sidebar:has(.admin-nav:not([hidden])) .nav-icon {width:22px;height:22px;margin:0;grid-row:1}
 body .sidebar .mobile-nav-label,:root[data-interface="soft"] .sidebar .mobile-nav-label,:root[data-interface="soft"] .sidebar:has(.admin-nav:not([hidden])) .mobile-nav-label {grid-row:2;margin:0;padding:0;font-size:9px;line-height:14px;letter-spacing:0;font-weight:600}
 body .sidebar #admin-nav[hidden] {display:none!important}
 :root[data-interface="soft"] body .sidebar {height:calc(76px + env(safe-area-inset-bottom));min-height:76px;padding:6px 8px calc(6px + env(safe-area-inset-bottom))}
 body .main,body.sidebar-collapsed .main {padding-bottom:calc(100px + env(safe-area-inset-bottom))}
 #task-detail .detail-description {padding:16px}
 body .calendar-agenda-list {gap:8px;margin:16px 0}
 body .calendar-agenda-list>button {height:76px;min-height:76px;grid-template-columns:minmax(0,1fr) 76px;gap:8px}
 .feedback-dialog {padding:18px}
 .admin-tabs {gap:4px}
 .admin-tabs>button {flex:1;min-width:0;padding-inline:8px;font-size:12px}
}

body .calendar-agenda-list>button.is-page-hidden,body .day-unscheduled-item.is-page-hidden {display:none!important}
:root[data-theme="night"] #task-detail .detail-copy {color:var(--ink)}
:root[data-theme="night"] #task-detail .detail-copy.is-empty {color:var(--muted)}
:root[data-theme="night"] body .button.primary {background:#246f79;color:#fff}
:root[data-theme="night"] body .button.primary:hover {background:#2b7b84;color:#fff}
@media(max-width:720px){body .sidebar #nav .nav-icon,body .sidebar #admin-nav .nav-icon {transform:none!important;animation:none!important}}

:root[data-theme="night"] body .list-pager button[aria-current=page] {background:var(--theme-hover);color:var(--ink);border-color:var(--purple)}
:root[data-theme="night"] body .view-switch button.active {background:var(--theme-hover);color:var(--ink);box-shadow:inset 0 0 0 1px var(--purple)}
@media(max-width:720px){body .sidebar .mobile-nav-label,:root[data-interface="soft"] .sidebar .mobile-nav-label,:root[data-interface="soft"] .sidebar:has(.admin-nav:not([hidden])) .mobile-nav-label {font-size:clamp(9px,2.5vw,10px);letter-spacing:-.015em}}

#view .button,body dialog .button {height:var(--control-height);min-height:var(--control-height);line-height:1.2;border-radius:var(--control-radius)}
#view .button.small,body dialog .button.small {height:var(--control-small);min-height:var(--control-small)}
#view .button.icon-only {width:var(--control-small);padding:0}
#view :is(.calendar-nav,.week-nav,.modal-actions) {align-items:center;gap:8px}
@media(max-width:720px){#quick-add,#mobile-theme-switch {height:40px;min-height:40px;width:40px}}

:root[data-interface="soft"]:not([data-theme="night"]) {--purple:#117681;--purple-dark:#0d626b}
:root[data-interface="soft"]:not([data-theme="night"]) body .button.primary {background:#117681;color:#fff}
:root[data-interface="soft"]:not([data-theme="night"]) body .button.primary:hover {background:#0d626b}
#task-detail .detail-copy,#task-detail .detail-copy:hover {padding:0;background:transparent;border-color:transparent;border-radius:0}
#task-detail .detail-copy:focus-visible {background:transparent;border-color:transparent;outline:2px solid var(--purple);outline-offset:4px;border-radius:4px}
:root[data-theme="night"] #task-detail .detail-description-edit:hover {background:var(--theme-hover);color:var(--ink)}
:root[data-theme="night"] body .workflow-template-form {background:var(--panel);border-color:var(--line);color:var(--ink)}
:root[data-theme="night"] body .workflow-template-form input {background:var(--panel);border-color:var(--line);color:var(--ink)}
:root[data-theme="night"] body :is(.view-switch,.select-menu,.date-popover,.participant-popover,.profile-menu,.search-results) {background:var(--panel);border-color:var(--line);color:var(--ink)}
:root[data-theme="night"] body .view-switch button:hover {background:var(--theme-hover);color:var(--ink)}

/* Calendar context stays on its own row; every administrative surface uses one spacing scale. */
body .calendar-agenda-list>button:not(.is-page-hidden),body .day-unscheduled-item:not(.is-page-hidden) {grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 22px;gap:8px;align-items:center;height:96px;min-height:96px}
body .calendar-agenda-meta {display:flex;align-items:center;gap:6px;min-width:0;max-width:100%}
body .calendar-agenda-meta :is(.priority-badge,.work-mark,.project-code) {display:inline-flex;align-items:center;justify-content:center;flex:none;box-sizing:border-box;height:22px;min-height:22px;max-width:none;padding:0 7px;border-radius:6px;font-size:10px;font-weight:600;line-height:1;letter-spacing:0;white-space:nowrap}
body .calendar-agenda-meta .priority-badge {gap:4px}
body .calendar-agenda-meta .calendar-project-code {color:var(--purple);background:var(--theme-soft);border-color:var(--line)}
:root:not([data-theme="night"]) {--muted:#526772}
:root[data-interface="soft"]:not([data-theme="night"]) {--muted:#526772}
:root:not([data-theme="night"]) body .priority-low {background:#e7f3ed;color:#23634b}
:root:not([data-theme="night"]) body .priority-normal {background:#fff1dc;color:#805019}
:root:not([data-theme="night"]) body .priority-high {background:#fbe7eb;color:#9b3547}
:root[data-theme="night"] body .calendar-agenda-meta .priority-low {background:#23443d;color:#bee6d1}
:root[data-theme="night"] body .calendar-agenda-meta .priority-normal {background:#514232;color:#f1d4ad}
:root[data-theme="night"] body .calendar-agenda-meta .priority-high {background:#51343c;color:#ffd0d6}
body .admin-tabs {box-sizing:border-box;max-width:100%}
body .admin-tabs button {justify-content:center;position:relative}
body .admin-layout {gap:16px;min-width:0}
body .admin-panel {padding:20px;min-width:0}
body .admin-panel-head {padding-bottom:16px;margin-bottom:16px}
body .admin-panel-head p {font-size:13px;line-height:1.6}
body .admin-panel :is(.telegram-form,.account-list,.admin-users-list) {gap:16px}
body .admin-panel .telegram-form label {font-size:13px;line-height:1.5;gap:8px}
body .admin-panel .telegram-form label input:not([type="checkbox"]) {height:44px;padding:0 12px;font-size:16px;font-weight:400;color:var(--ink);background:var(--panel);border-color:var(--line)}
body .admin-panel input::placeholder {color:var(--muted);opacity:1;font-weight:400}
body .admin-panel .telegram-form-actions {gap:8px}
body .admin-user-actions {gap:8px}
body .admin-protected {line-height:1.6}
body .admin-user-identity>div {min-width:0}
body .admin-user-projects .select-control {min-width:0;width:100%}
body .admin-user-projects .select-trigger {min-width:0;max-width:100%;font-size:13px}
:root[data-interface] body dialog.feedback-dialog {box-sizing:border-box;width:min(640px,calc(100vw - 24px));padding:24px;background:var(--panel);color:var(--ink);border-color:var(--line);max-height:calc(100dvh - 24px)}
body .feedback-head {align-items:flex-start;gap:12px;margin-bottom:24px}
body .feedback-head>div {min-width:0}
body .feedback-head h2 {font-size:22px;line-height:1.3;overflow-wrap:anywhere;margin:6px 0 0}
body .feedback-head .icon-button {flex:none;display:grid;place-items:center;width:40px;height:40px;background:var(--theme-soft);color:var(--ink);border-radius:10px}
body .feedback-dialog form {gap:16px}
body .feedback-dialog label {margin:0;gap:8px;line-height:1.5}
body .feedback-dialog :is(input,textarea,.select-trigger) {min-width:0;font-weight:400;border-color:var(--line);background:var(--panel);color:var(--ink)}
body .feedback-dialog input:not([type="file"]) {height:44px;padding:0 12px}
body .feedback-dialog textarea {padding:12px;line-height:1.5;border-radius:10px}
body .feedback-dialog :is(input,textarea)::placeholder {font-weight:400;color:var(--muted);opacity:1}
body .feedback-dialog input[type="file"] {height:auto;min-height:44px;padding:6px;width:100%;overflow:hidden;font-size:12px;border-radius:10px}
body .feedback-dialog input[type="file"]::file-selector-button {height:32px;border:0;border-radius:7px;padding:0 10px;margin-right:8px;background:var(--theme-soft);color:var(--purple);font:inherit;font-weight:600;cursor:pointer}
body .feedback-dialog #feedback-progress {margin:0;font-size:12px;line-height:1.5}
body .feedback-dialog #feedback-progress:empty {display:none}
body .feedback-dialog>h3 {margin:24px 0 12px;font-size:16px;line-height:1.4}
body .feedback-list {gap:12px;margin-top:0}
body .feedback-item {box-sizing:border-box;padding:16px;line-height:1.5}
body .feedback-item>strong {font-size:14px;font-weight:600}
body .feedback-item>small {margin-top:8px;line-height:1.5}
body .feedback-dialog .feedback-note {margin:12px 0 16px}
body .feedback-dialog .feedback-files:empty {display:none}
body .feedback-dialog .feedback-response {margin:16px 0;padding:16px}
body .feedback-response p {margin:8px 0;line-height:1.6}
body .feedback-response small {display:block;margin-top:8px}
body .feedback-dialog [data-feedback-back] {margin-top:16px}
body .feedback-dialog .modal-actions {margin-top:0;gap:8px}
@media(max-width:720px) {
 body .admin-tabs {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:4px;padding:4px}
 body .admin-tabs button {display:grid;place-items:center;gap:0;min-width:0;height:44px;padding:4px;font-size:clamp(10.5px,2.9vw,12px);line-height:16px}
 body .admin-tab-label {white-space:nowrap}
 body .admin-tab-count {position:absolute;top:1px;right:2px;min-width:14px;font-size:9px;padding:0 3px;line-height:14px}
 body .admin-panel {padding:16px;border-radius:16px}
 body .admin-user-row {grid-template-columns:minmax(0,1fr);padding:12px;gap:12px}
 body .admin-user-status {justify-self:start;margin-left:41px}
 body .admin-user-identity strong {font-size:14px}
 body .admin-user-identity small {font-size:11px;line-height:1.5}
 body .admin-user-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding-left:0;width:100%}
 body .admin-user-actions .button {width:100%;min-width:0;padding-inline:4px;font-size:11px}
 body .admin-user-actions .admin-delete {grid-column:1/-1}
 body .admin-protected {padding-left:0;font-size:11px}
 body .admin-user-projects summary {font-size:12px;min-height:32px;line-height:32px}
 body .admin-user-projects label {grid-template-columns:minmax(0,1fr);gap:6px;font-size:12px}
 body .admin-user-projects label span {white-space:normal;overflow-wrap:anywhere}
 body .admin-panel .telegram-form-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body .admin-panel .telegram-form-actions .button {width:100%;min-width:0;padding-inline:4px;font-size:12px}
 body .admin-panel .telegram-form-actions .button:first-child {grid-column:1/-1}
 body .admin-panel .account-row {flex-direction:column;align-items:stretch;padding:12px}
 body .admin-panel .account-row-actions {justify-content:start;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 :root[data-interface] body dialog.feedback-dialog {padding:20px;border-radius:20px}
 body .feedback-dialog .modal-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 body .feedback-dialog .modal-actions .button {min-width:0;width:100%;padding-inline:8px}
 body .feedback-dialog [data-feedback-back] {width:100%;min-width:0}
 body .sidebar #nav>.nav-item .mobile-nav-label,body .sidebar #admin-nav .mobile-nav-label {text-align:center;justify-self:center}
 body .sidebar #admin-nav .pending-badge {position:absolute;top:1px;right:2px;grid-row:auto;margin:0}
}
body .feedback-files a {display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:start;gap:8px 10px;padding:12px;text-decoration:none;background:var(--theme-soft);font-size:13px;line-height:1.5}
body .feedback-files a .icon {width:18px;height:18px;margin-top:1px}
body .feedback-file-name {min-width:0;overflow-wrap:anywhere}
body .feedback-files a small {white-space:nowrap;line-height:1.5}
body .feedback-files a:hover {background:var(--theme-hover)}
@media(max-width:720px) {
 body .admin-panel .button.small {height:44px;min-height:44px}
 body .feedback-head {display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:12px;margin-bottom:20px}
 body .feedback-head>div {display:contents}
 body .feedback-head .eyebrow {grid-column:1;grid-row:1}
 body .feedback-head h2 {grid-column:1/-1;grid-row:2;margin:0;font-size:20px;line-height:1.35}
 body .feedback-head .icon-button {grid-column:2;grid-row:1;width:44px;height:44px}
 body .feedback-files a {grid-template-columns:18px minmax(0,1fr);font-size:12px}
 body .feedback-files a small {grid-column:2;margin-top:-4px}
}
body #admin-feedback-pane {grid-template-columns:minmax(0,1fr)}
@media(min-width:721px) {
 body #admin-feedback-list {grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
 body #admin-feedback-list>.list-pager {grid-column:1/-1}
 body #admin-feedback-list .feedback-item {min-height:132px}
}
:root[data-interface]:not([data-theme="night"]) #view .button.primary {background:var(--purple);color:#fff}
:root[data-interface]:not([data-theme="night"]) #view .button.primary:hover {background:var(--purple-dark);color:#fff}
:root[data-theme="night"] #view .button.primary {background:#246f79;color:#fff}
:root[data-theme="night"] #view .button.primary:hover {background:#2b7b84;color:#fff}
#view .button .icon,body dialog .button .icon {color:inherit}
:root {--primary-fill:var(--purple);--primary-hover:var(--purple-dark)}
:root[data-theme="night"] {--primary-fill:#246f79;--primary-hover:#2b7b84}
:root[data-interface] .auth-submit {background:var(--primary-fill);color:#fff;border-color:var(--primary-fill)}
:root[data-interface] .auth-submit:hover {background:var(--primary-hover);color:#fff}
:root[data-theme="night"] #view .button.primary,:root[data-theme="night"] body dialog .button.primary {border-color:var(--primary-fill)}
:root[data-interface] body dialog.feedback-dialog {width:min(640px,calc(100vw - 32px));max-width:calc(100vw - 32px);margin:auto}
@media(max-width:720px){#view .admin-panel .button.small {height:44px;min-height:44px}}

