/* Shared visual system. Loaded after the feature styles. */
:root {
    --bg: #f5f6fa;
    --bg-elevated: #fff;
    --bg-soft: #f8f9fc;
    --bg-muted: #edf0f5;
    --line: #e6e9f0;
    --line-strong: #d4dbe6;
    --text: #202b40;
    --text-secondary: #5d6b82;
    --text-muted: #738099;
    --accent: #4263eb;
    --accent-hover: #3451d1;
    --accent-soft: #edf1ff;
    --success: #16826a;
    --success-soft: #e8f6f0;
    --danger: #c44848;
    --danger-soft: #fff0ef;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 18px rgba(29, 43, 76, .035);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --sidebar-width: 232px;
}
body, .board-body { background: var(--bg); font-size: 14px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #97aaff; outline-offset: 3px; }
::selection { background: #dce4ff; }
.ui-icon { flex: 0 0 auto; vertical-align: middle; }
.btn { min-height: 42px; height: 42px; gap: 8px; border-radius: 9px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 3px 7px #4263eb20; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 4px 10px #4263eb25; }
.btn-ghost { background: #fff; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { height: 38px; min-height: 38px; padding: 0 13px; font-size: 12px; }
.field { min-width: 0; }
.field-label { color: #49566d; font-size: 13px; font-weight: 600; }
.field input:not([type="checkbox"]), .field select, .search-field input, .filter-field select,
.task-form input[type="text"], .task-form input[type="date"], .task-form select, .task-form textarea, .comment-form textarea {
    min-width: 0; border: 1px solid var(--line-strong); border-radius: 9px; background-color: #fff; font-size: 14px; box-shadow: 0 1px 2px #1d2b4c03;
}
.field input:focus, .field select:focus, .task-form textarea:focus, .search-field input:focus, .filter-field select:focus { border-color: #7e95f6; box-shadow: 0 0 0 3px #4263eb12; }
.field input[type="checkbox"], input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--accent); }
.field input::placeholder, textarea::placeholder, .search-field input::placeholder { color: #909bb0; }
.alert { border-radius: 10px; font-size: 13px; }
.brand-icon { width: 35px; height: 35px; flex-shrink: 0; border-radius: 10px; background: #5574ff; box-shadow: none; }
.brand-icon::after { border: 0; inset: 9px 8px; border-radius: 2px; transform: none; background: linear-gradient(90deg, #fff 0 23%, transparent 23% 38%, #fff 38% 62%, transparent 62% 77%, #fff 77%); }
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: -.6px; line-height: 1.1; }
.brand-caption { display: block; margin-top: 7px; font-size: 10px; font-weight: 400; letter-spacing: 1px; color: #94a3c0; }

/* Workspace shell */
.board-app, .admin-body .board-app { width: auto; margin: 0 0 0 var(--sidebar-width); padding: 0; min-width: 0; }
.board-top { top: 0; margin: 0; padding: 0 32px; height: 78px; background: #ffffffed; border-bottom: 1px solid var(--line); z-index: 30; }
.board-top-inner { height: 100%; max-width: none; width: 100%; gap: 16px; }
.board-top-left { min-width: 0; }
.workspace-breadcrumb { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--text-muted); }
.workspace-breadcrumb strong { color: #36425b; font-weight: 600; }
.workspace-breadcrumb > span:nth-child(2) { color: #b7bfcd; }
.account-menu { position: relative; flex-shrink: 0; }
.account-menu summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; border-radius: 10px; padding: 5px; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary > .ui-icon { width: 16px; color: var(--text-muted); }
.account-menu[open] summary { background: var(--bg-soft); }
.user-avatar { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 50%; font-size: 13px; font-weight: 600; color: #4d62bd; background: #edf0fc; border: 3px solid #fff; box-shadow: 0 0 0 1px #e6eafa; flex: 0 0 auto; }
.board-user-meta { display: grid; text-align: left; gap: 3px; }
.board-user-name { font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-user-sub { font-size: 10px; color: #808ba0; }
.account-menu-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 210px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 12px 35px #17253b20; }
.account-menu-panel > strong { display: block; padding: 10px 12px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.account-menu-panel a, .account-menu-panel button { display: block; width: 100%; padding: 10px 12px; color: var(--text-secondary); text-align: left; font: inherit; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.account-menu-panel a:hover, .account-menu-panel button:hover { background: var(--bg-soft); color: var(--accent); }
.board-body .board-side-nav { display: flex !important; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); height: 100dvh; background: #17243b; color: #c0cadd; border: 0; box-shadow: none; padding: 28px 18px 16px; transform: none; z-index: 55; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #455570 transparent; }
.side-nav-head { margin-bottom: 28px; padding: 0 10px; }
.side-nav-head .brand-mark { color: #fff; gap: 11px; }
.nav-close { display: none; border: 0; width: 38px; height: 38px; background: #ffffff0d; color: #d6deeb; border-radius: 8px; font-size: 24px; cursor: pointer; }
.workspace-switch { display: flex; align-items: center; gap: 10px; border: 1px solid #ffffff13; border-radius: 11px; padding: 12px 10px; margin-bottom: 20px; background: #ffffff04; }
.workspace-monogram { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 8px; background: #30415e; color: #d8e4ff; font-size: 14px; }
.workspace-switch strong { display: block; font-size: 12px; color: #e0e7f2; font-weight: 600; }
.workspace-switch div > span { display: block; font-size: 9px; color: #95a3bb; margin-top: 3px; }
.workspace-nav { display: grid; gap: 5px; }
.side-nav-label { margin: 20px 12px 7px; font-size: 10px; color: #8e9db6; letter-spacing: 1px; font-weight: 500; }
.workspace-nav > .side-nav-label:first-child { margin-top: 0; }
.side-nav-label > span { float: right; color: #acb7cc; }
.workspace-link, .dept-switch-side .dept-chip { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 12px; color: #b6c2d6; border: 0; border-radius: 8px; background: transparent; font-size: 12px; font-weight: 500; box-shadow: none; }
.workspace-link:hover, .dept-switch-side .dept-chip:hover { background: #ffffff09; color: #fff; border: 0; }
.workspace-link.is-active { background: #4263eb; color: #fff; box-shadow: 0 4px 10px #091a4333; }
.workspace-link .ui-icon, .dept-chip .ui-icon { width: 18px; height: 18px; }
.dept-switch-side { gap: 3px; }
.dept-switch-side .dept-chip.is-active { background: #ffffff0c; color: #b8c9ff; }
.dept-dot { width: 7px; height: 7px; border-radius: 2px; background: #79a6e4; margin: 0 5px; }
.dept-chip:nth-child(3n) .dept-dot { background: #68bfa5; }
.dept-chip:nth-child(3n + 1) .dept-dot { background: #c69adf; }
.dept-chip:nth-child(5n) .dept-dot { background: #dcb675; }
.sidebar-note { margin: auto 0 0; padding: 28px 12px 16px; font-size: 11px; color: #90a2be; }
.sidebar-note > .ui-icon { display: block; margin-bottom: 10px; color: #718ebc; }
.sidebar-note strong { color: #b3c1d8; font-weight: 500; }
.sidebar-note p { margin: 5px 0; font-size: 10px; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; border-top: 1px solid #ffffff0e; padding: 16px 12px 0; font-size: 10px; color: #94a3bb; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #62b49e; }
.skip-link { position: fixed; left: 260px; top: -60px; padding: 10px 16px; z-index: 200; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.board-main { gap: 24px; padding: 30px 32px 48px; min-width: 0; width: 100%; max-width: 1720px; margin: auto; }
.board-main > * { min-width: 0; }
.board-hero { align-items: center; padding: 0; gap: 20px; }
.page-eyebrow { display: block; color: var(--text-muted); font-size: 11px; margin-bottom: 8px; }
.board-hero h1 { font-size: 27px; font-weight: 700; letter-spacing: -.7px; line-height: 1.45; }
.board-hero p { font-size: 12px; margin: 8px 0 0; color: #7a869b; }
.heading-scope { display: inline-block; margin-left: 13px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-secondary); background: #fff; font-size: 10px; vertical-align: middle; letter-spacing: 0; font-weight: 400; }
.hero-actions { flex: 0 0 auto; }

/* Overview, filtering and task cards */
.stat-row, .completed-summary { gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { position: relative; min-width: 0; padding: 20px 22px; border-radius: 14px; border-color: var(--line); box-shadow: var(--shadow); }
.stat-label { font-size: 12px; font-weight: 500; color: #66758c; }
.stat-value { font-size: 31px; font-weight: 650; line-height: 1.3; margin-top: 9px; font-variant-numeric: tabular-nums; letter-spacing: -.9px; }
.stat-unit { margin-left: 4px; font-size: 15px; color: #8b96a8; font-weight: 400; }
.stat-icon { display: grid; place-items: center; width: 36px; height: 36px; position: absolute; top: 20px; right: 20px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.stat-icon .ui-icon { width: 18px; height: 18px; }
.stat-progress .stat-icon { background: #fff4e4; color: #c18429; }
.stat-done .stat-icon { background: var(--success-soft); color: var(--success); }
.stat-average .stat-icon { background: #f1ecfb; color: #8b6db6; }
.stat-hint { font-size: 11px; margin-top: 7px; }
.toolbar { padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow); position: static; }
.board-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.toolbar-form { min-width: 0; flex: 1; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.board-toolbar .toolbar-form { max-width: 710px; }
.search-field { min-width: 0; flex: 1 1 210px; position: relative; }
.search-field::before { content: ''; width: 12px; height: 12px; border: 1.5px solid #8c98ad; border-radius: 50%; position: absolute; top: 13px; left: 14px; pointer-events: none; }
.search-field::after { content: ''; position: absolute; top: 25px; left: 25px; width: 5px; height: 1.5px; background: #8c98ad; transform: rotate(45deg); pointer-events: none; }
.search-field input { padding-left: 37px; height: 40px; font-size: 12px; background: var(--bg-soft); border-color: var(--line); }
.filter-field { min-width: 0; flex: 0 1 130px; }
.filter-field select { height: 40px; font-size: 12px; }
.view-switch { flex-shrink: 0; gap: 4px; padding: 4px; border: 0; border-radius: 9px; background: #f0f2f6; }
.view-chip { height: 32px; gap: 7px; padding: 0 12px; border-radius: 6px; font-size: 12px; font-weight: 500; color: var(--text-secondary); }
.view-chip .ui-icon { width: 16px; height: 16px; }
.view-chip.is-active, .view-chip.is-active:hover { background: #fff; color: var(--accent); box-shadow: 0 1px 5px #1d2b4c12; }
.flow-board { gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.flow-column { min-width: 0; min-height: 330px; border: 1px solid #e8ebf1; border-radius: 14px; background: #eef1f6; padding: 3px; }
.flow-column[data-status="in_progress"] { background: #edf1fa; border-color: #e1e7f3; }
.flow-column[data-status="completed"] { background: #edf4f1; border-color: #dfece6; }
.flow-column-head { border: 0; padding: 16px 14px 14px; gap: 10px; justify-content: flex-start; }
.flow-column-head h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.flow-column-head h2::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #8a97ad; }
.flow-column[data-status="in_progress"] .flow-column-head h2::before { background: var(--accent); }
.flow-column[data-status="completed"] .flow-column-head h2::before { background: #32a88b; }
.flow-column-head > span { background: #fff9; color: #66758b; font-size: 11px; min-width: 22px; height: 22px; border-radius: 6px; }
.flow-column-body { padding: 0 9px 10px; gap: 12px; }
.task-card, .flow-column .task-card { border: 1px solid #e4e8ef; border-radius: 11px; background: #fff; box-shadow: 0 2px 3px #1b304004; animation: none; }
.task-card { padding: 24px; min-width: 0; }
.task-card-compact { padding: 18px !important; }
.task-card-compact:hover, .task-card-compact:focus-visible { border-color: #abbaf4; box-shadow: 0 5px 16px #1c31500c; transform: translateY(-2px); }
.task-card-compact .task-title { margin: 14px 0 8px; font-size: 14px; line-height: 1.65; font-weight: 650; letter-spacing: 0; }
.task-title, .task-copy p, .checkpoint-main, .timeline-task-title { overflow-wrap: anywhere; min-width: 0; }
.compact-goal { color: var(--text-muted); font-size: 11px; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.8; }
.compact-top { gap: 5px; }
.badge { height: 23px; padding: 0 7px; font-size: 10px; font-weight: 500; border-radius: 5px; }
.badge-dept, .badge-in_progress, .badge-assist { background: #edf1ff; color: #526bc0; }
.badge-phase { background: #f2f3f6; color: #7b8799; }
.badge-completed { background: var(--success-soft); color: var(--success); }
.progress-track { background: #edf0f5; height: 5px; }
.progress-fill { background: #7391ed; box-shadow: none; }
.compact-progress { margin: 10px 0 16px; gap: 10px; }
.compact-progress .progress-track { height: 5px; }
.compact-progress strong { font-size: 11px; font-weight: 500; color: #71809a; }
.task-card[data-status="completed"] .progress-fill, .task-detail-panel[data-status="completed"] .progress-fill { background: #50ad94; }
.compact-meta { border-top: 1px solid #f0f2f5; padding-top: 12px; font-size: 10px; gap: 7px 12px; line-height: 1.5; }
.compact-meta > span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.compact-meta .ui-icon { width: 12px; height: 12px; }
.compact-owner { margin-left: auto; color: #60718c; }
.column-empty { display: grid; justify-items: center; align-content: center; gap: 7px; margin: 0; min-height: 210px; padding: 24px 12px; border: 1px dashed #d6dde8; border-radius: 10px; color: #8b98ac; text-align: center; }
.column-empty > .ui-icon { width: 29px; height: 29px; margin-bottom: 5px; color: #acb7c9; }
.column-empty strong { font-size: 12px; font-weight: 500; color: #77859b; }
.column-empty > span { font-size: 10px; }
.view-all-completed { border: 0; background: transparent; padding: 11px 3px 2px; gap: 5px; flex-wrap: wrap; }
.view-all-completed:hover { background: transparent; }
.view-all-completed > span { font-size: 10px; font-weight: 400; color: #788c83; }
.view-all-completed strong { font-size: 10px; color: var(--success); }
.view-all-completed .ui-icon { width: 14px; height: 14px; }
.task-list { gap: 18px; }
.task-card-head { flex-wrap: wrap; }
.task-title { font-size: 19px; }
.task-actions { flex-wrap: wrap; align-items: center; gap: 7px; }
.link-action { min-height: 30px; display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.link-action:hover { background: var(--accent-soft); }
.link-danger:hover { background: var(--danger-soft); }
.task-copy { grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.task-copy > div { padding: 14px 16px; background: var(--bg-soft); border-radius: 9px; min-width: 0; }
.copy-label { color: #7a89a0; font-size: 11px; font-weight: 500; margin-bottom: 6px; }
.task-copy p { font-size: 13px; line-height: 1.8; }
.progress-meta { font-size: 12px; }
.checkpoint-toggle { padding: 12px; background: #fff; border-color: var(--line); border-radius: 9px; font-size: 12px; }
.checkpoint-toggle.is-static { background: var(--bg-soft); }
.checkpoint-meta, .checkpoint-goal { font-size: 11px; }
.task-foot { font-size: 10px; gap: 5px 16px; padding-top: 14px; line-height: 1.8; }
.comment-block { padding-top: 20px; margin-top: 20px; }
.comment-item { background: var(--bg-soft); border: 0; padding: 14px; }
.comment-body { font-size: 13px; line-height: 1.8; }
.comment-meta { font-size: 12px; }
.comment-meta time { font-size: 10px; }
.comment-empty, .comment-locked { font-size: 12px; }
.empty-state { background: #fff; border: 1px dashed var(--line-strong); box-shadow: none; padding: 60px 20px; border-radius: var(--radius); }
.empty-state h2 { font-size: 18px; }
.empty-state p { font-size: 13px; }

/* Detail and task editor */
.drawer-backdrop, .task-modal-backdrop, .confirm-backdrop, .side-nav-backdrop { background: #101c3560; backdrop-filter: blur(3px); }
.task-drawer { width: min(560px, 100%); z-index: 80; height: 100dvh; border: 0; visibility: hidden; box-shadow: -10px 0 60px #14203920; }
.task-drawer.is-open { visibility: visible; }
.drawer-backdrop { z-index: 75; }
.task-drawer-inner { padding: 0 28px 28px; overscroll-behavior: contain; }
.task-drawer-head { position: sticky; top: 0; z-index: 2; padding: 20px 0; margin-bottom: 18px; background: #fff; border-bottom: 1px solid var(--line); }
.task-drawer-head h2 { font-size: 19px; }
.task-form { gap: 20px; }
.task-form textarea { line-height: 1.8; }
.switch-field { font-size: 12px; padding: 13px; }
.checkpoint-row { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); grid-template-columns: auto minmax(0, 1fr) auto; }
.task-form-actions { position: sticky; bottom: -28px; z-index: 1; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: #fffffff5; border-top: 1px solid var(--line); }
.task-modal { z-index: 70; padding: 28px; }
.task-modal-shell { width: min(760px, 100%); max-height: calc(100dvh - 56px); border-radius: 18px; border: 0; box-shadow: 0 20px 80px #101c3533; overscroll-behavior: contain; }
.task-modal-head { padding: 18px 24px; }
.task-modal-head h2 { max-width: 85%; overflow-wrap: anywhere; font-size: 16px; }
.task-modal-body { padding: 24px; }
.confirm-shell { border: 0; padding: 25px; border-radius: 16px; }
.confirm-shell p { font-size: 13px; }
.locked-banner { background: var(--bg-soft); border: 1px solid var(--line); font-size: 12px; }

/* Review and administration */
.completed-toolbar { gap: 16px; padding: 18px; }
.period-switch { gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.period-switch .view-chip.is-active { background: var(--accent-soft); box-shadow: none; }
.slot-tab { padding: 15px 18px; border-radius: 12px; }
.slot-tab.is-active { background: var(--accent-soft); box-shadow: none; border-color: #b8c7fa; }
.slot-tab-label { font-size: 12px; }
.slot-panel { padding: 24px; box-shadow: var(--shadow); }
.slot-panel-head h2 { font-size: 18px; }
.timeline-period-meta, .timeline-task-meta { font-size: 11px; line-height: 1.9; }
.timeline-task { border: 1px solid var(--line); background: #fff; padding: 18px; }
.timeline-task-title { font-size: 14px; }
.timeline-task-goal { font-size: 12px; }
.admin-panel, .settings-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.admin-panel h1, .admin-panel h2 { font-size: 17px; margin-bottom: 8px; }
.admin-panel > p { font-size: 12px; }
.admin-stats { gap: 20px; }
.admin-stat { background: var(--bg-soft); border: 0; padding: 22px; }
.admin-stat strong { font-size: 32px; }
.admin-stat span { color: var(--text-secondary); font-size: 12px; }
.admin-inline-form { border-top: 1px solid #f0f2f5; padding-top: 22px; gap: 20px; }
.admin-form-grid { gap: 20px; }
.admin-form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-checkbox-field { display: flex; align-items: center; gap: 10px; padding: 12px 0; cursor: pointer; }
.admin-table-wrap { margin-top: 18px; }
.admin-table { font-size: 12px; }
.admin-table th { font-size: 11px; font-weight: 500; background: #f7f8fb; color: #75829a; padding: 13px 16px; }
.admin-table td { padding: 16px; border-bottom-color: #eef1f5; overflow-wrap: anywhere; }
.admin-table tbody tr:hover { background: #fafbfe; }
.admin-table td strong { font-weight: 600; }
.admin-actions { gap: 10px; }
.admin-badge { font-size: 10px; height: 22px; border-radius: 5px; }
.password-main { max-width: 760px; margin: 0 auto; }
.settings-card .alert { margin-bottom: 20px; }

/* Authentication */
.auth-page { padding: 48px 24px; min-height: 100dvh; }
.auth-shell, .admin-login-shell { display: grid; grid-template-columns: 1fr 1fr; width: min(1040px, 100%); border-radius: 24px; overflow: hidden; border: 1px solid #e0e5ef; box-shadow: 0 20px 65px #23375b0c; background: #fff; animation: none; margin: 0; }
.auth-intro { display: flex; flex-direction: column; min-width: 0; position: relative; padding: 42px; background: #17243b; color: #fff; }
.auth-intro .brand-mark { align-self: flex-start; color: #fff; }
.auth-intro-copy { margin: 68px 0 32px; }
.eyebrow { font-size: 11px; color: #94add5; letter-spacing: 2px; }
.auth-intro h2 { font-size: clamp(28px, 3vw, 38px); font-weight: 600; letter-spacing: 1px; line-height: 1.55; margin: 17px 0; }
.auth-intro-copy p { font-size: 12px; color: #a3b2cb; line-height: 2; }
.auth-intro-footer { display: flex; flex-wrap: wrap; gap: 20px; font-size: 10px; color: #9daec9; margin-top: auto; padding-top: 38px; }
.auth-intro-footer span { display: inline-flex; align-items: center; gap: 7px; }
.auth-intro-footer span::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #607ca6; }
.auth-illustration { padding: 17px; background: #ffffff05; border: 1px solid #ffffff13; border-radius: 12px; transform: rotate(-3deg); }
.illustration-head { display: flex; align-items: center; gap: 4px; color: #bdcbe0; font-size: 10px; margin-bottom: 18px; }
.illustration-head > span { margin-right: auto; }
.illustration-head i { width: 5px; height: 5px; background: #6b80a3; border-radius: 50%; }
.illustration-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.illustration-label { color: #94a8c6; font-size: 9px; display: block; margin-bottom: 10px; }
.illustration-card { border: 1px solid #ffffff16; border-radius: 6px; padding: 10px; margin-bottom: 9px; background: #2a3a56; }
.illustration-card b { display: block; width: 30%; height: 5px; background: #7398e5; border-radius: 2px; margin-bottom: 12px; }
.illustration-card i { display: block; height: 3px; background: #60718e; border-radius: 2px; margin: 5px 0; }
.illustration-card i:nth-of-type(2) { width: 65%; }
.illustration-card em { display: block; height: 3px; width: 60%; margin-top: 14px; background: #7996ef; border-radius: 2px; }
.illustration-card.done { background: #293f4e; }
.illustration-card.done .ui-icon { color: #7fc9b3; width: 17px; height: 17px; }
.illustration-card.done em { width: 100%; background: #7fc9b3; }
.auth-panel { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 52px 48px 35px; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.auth-panel-head h1, .auth-heading h1 { margin: 12px 0 10px; font-size: 25px; line-height: 1.5; letter-spacing: -.6px; }
.auth-panel-head p, .auth-heading p { color: var(--text-muted); font-size: 12px; line-height: 1.8; margin: 0 0 24px; }
.auth-kicker { font-size: 11px; color: var(--accent); letter-spacing: 1px; font-weight: 600; }
.auth-tabs { display: flex; background: #f1f3f8; border: 0; border-radius: 9px; padding: 4px; margin: 24px 0 28px; gap: 4px; }
.auth-tab { flex: 1; border-radius: 6px; height: 36px; font-size: 12px; }
.auth-tab.is-active, .auth-tab.is-active:hover { background: #fff; color: var(--accent); box-shadow: 0 1px 6px #1d2b4c0d; }
.auth-form { gap: 21px; }
.auth-form .field input, .auth-form .field select { height: 45px; font-size: 13px; }
.auth-form .btn-block { height: 45px; margin-top: 2px; }
.auth-switch { font-size: 11px; line-height: 2; color: #8994a7; }
.auth-switch a { font-weight: 500; }
.auth-footer { border-top: 1px solid #f0f2f6; padding-top: 24px; margin-top: 32px; font-size: 10px; letter-spacing: 1px; color: #929db0; }

/* Tablet and phone: preserve all actions without forcing a wide canvas. */
@media (min-width: 961px) {
    .board-body .nav-toggle, .board-body .nav-close, .board-body .side-nav-backdrop { display: none !important; }
    .board-body .board-side-nav { visibility: visible; transform: none; }
    .flow-column-completed .completed-desktop { display: flex !important; }
    .flow-column-completed .flow-column-body { display: grid !important; }
    .flow-column-completed .completed-collapsed { display: none; }
}
@media (min-width: 961px) and (max-width: 1180px) {
    :root { --sidebar-width: 204px; }
    .board-top { padding: 0 22px; }
    .board-main { padding: 26px 22px 40px; gap: 20px; }
    .stat-row { gap: 12px; }
    .stat-card { padding: 17px; }
    .stat-icon { right: 14px; width: 29px; height: 29px; }
    .flow-board { gap: 12px; }
    .task-card-compact { padding: 13px !important; }
    .board-toolbar { gap: 14px; }
}
@media (max-width: 960px) {
    .board-app, .admin-body .board-app { margin-left: 0; }
    .board-body .board-side-nav { width: min(290px, 86vw); visibility: hidden; transform: translateX(-105%); transition: transform .25s var(--ease), visibility .25s; }
    .board-body .board-side-nav.is-open { visibility: visible; transform: translateX(0); }
    .board-body .nav-toggle { display: inline-flex !important; width: 40px; height: 40px; border: 0; background: var(--bg-soft); }
    .board-body .nav-close { display: block; }
    .side-nav-backdrop { display: block; z-index: 50; }
    .board-body .side-nav-backdrop:not([hidden]) { display: block !important; }
    .board-top { height: 68px; padding: 0 24px; }
    .board-main { padding: 24px; gap: 20px; }
    .board-hero { flex-direction: row; align-items: center; }
    .board-hero h1 { font-size: 24px; }
    .hero-actions { width: auto; }
    .hero-actions .btn { width: auto; }
    .stat-row, .completed-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .flow-board { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .flow-column-completed { grid-column: 1 / -1; min-height: 0; }
    .flow-column-completed .completed-desktop { display: none !important; }
    .flow-column-completed .completed-collapsed { display: flex; }
    .completed-collapsed { padding: 18px; }
    .completed-collapsed-text h2 { font-size: 13px; }
    .completed-collapsed-text p { font-size: 11px; }
    .toolbar { position: static; }
    .toolbar-form { flex-wrap: wrap; }
    .board-toolbar { flex-wrap: wrap; gap: 12px; }
    .board-toolbar .toolbar-form { max-width: none; flex-basis: 100%; }
    .auth-intro { padding: 32px; }
    .auth-panel { padding: 36px 32px; }
    .auth-intro-copy { margin-top: 50px; }
    .skip-link { left: 20px; }
}
@media (max-width: 640px) {
    .board-top { height: 64px; padding: 0 16px; }
    .board-top-inner { gap: 6px; }
    .workspace-breadcrumb { font-size: 12px; }
    .workspace-breadcrumb > span { display: none; }
    .account-menu .board-user-meta { display: none; }
    .account-menu summary { gap: 4px; }
    .board-main { padding: 22px 16px 32px; gap: 18px; }
    .board-hero { align-items: flex-start; gap: 12px; }
    .board-hero h1 { font-size: 22px; }
    .board-hero p { font-size: 11px; max-width: 27em; line-height: 1.8; }
    .page-eyebrow { font-size: 10px; }
    .heading-scope { display: block; width: fit-content; margin: 7px 0 0; font-size: 10px; }
    .hero-actions { margin-top: 24px; }
    .hero-actions .btn { padding: 0 12px; font-size: 12px; min-height: 42px; }
    .hero-actions .ui-icon { width: 16px; }
    .stat-row, .completed-summary { gap: 10px; }
    .stat-card { padding: 16px; border-radius: 12px; }
    .stat-label { font-size: 11px; }
    .stat-value { font-size: 28px; margin-top: 10px; }
    .stat-icon { width: 29px; height: 29px; right: 12px; top: 13px; border-radius: 8px; }
    .stat-icon .ui-icon { width: 16px; }
    .stat-unit { font-size: 12px; }
    .stat-hint { font-size: 10px; }
    .toolbar { padding: 12px; }
    .board-toolbar .view-switch { width: 100%; }
    .board-toolbar .view-chip { flex: 1; justify-content: center; min-height: 38px; }
    .toolbar-form .search-field { flex: 1 1 calc(100% - 80px); }
    .toolbar-form .filter-field { flex: 1 1 120px; }
    .toolbar-form .btn { flex: 0 0 auto; height: 42px; min-height: 42px; }
    .search-field input, .filter-field select { height: 42px; font-size: 14px; }
    .flow-board { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .flow-column { min-height: 0; }
    .flow-column-head { padding: 14px 13px; }
    .column-empty { min-height: 145px; }
    .task-card-compact { padding: 18px !important; }
    .task-card-compact .task-title { font-size: 15px; }
    .compact-goal { font-size: 12px; }
    .compact-meta { font-size: 11px; }
    .badge { font-size: 11px; height: 25px; }
    .task-card { padding: 18px; }
    .task-copy { grid-template-columns: minmax(0, 1fr); }
    .task-card-head { flex-direction: column; }
    .task-actions { width: 100%; justify-content: flex-end; }
    .link-action { min-height: 40px; padding: 6px 10px; }
    .task-drawer-inner { padding: 0 18px 24px; }
    .task-drawer-head { padding: 17px 0; }
    .task-drawer .field-grid { grid-template-columns: minmax(0, 1fr); }
    .field input:not([type="checkbox"]), .field select, .task-form input[type="text"], .task-form input[type="date"], .task-form select, .task-form textarea, .comment-form textarea, .auth-form .field input, .auth-form .field select { font-size: 16px; }
    .task-form-actions { bottom: -24px; }
    .checkpoint-row { gap: 6px; padding: 10px; grid-template-columns: auto minmax(0, 1fr); }
    .checkpoint-row .remove-checkpoint { grid-column: 2; margin: 0; justify-self: end; }
    .task-modal { padding: 0; align-items: end; }
    .task-modal-shell { width: 100%; max-height: 94dvh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .task-modal-head { padding: 16px 18px; }
    .task-modal-head h2 { font-size: 14px; }
    .task-modal-body { padding: 18px; }
    .comment-replies { padding-left: 8px; }
    .slot-panel { padding: 17px; }
    .timeline-task { padding: 14px; }
    .period-switch .view-chip { min-height: 40px; }
    .admin-panel, .settings-card { padding: 19px 16px; }
    .admin-form-grid.two { grid-template-columns: minmax(0, 1fr); }
    .admin-stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .admin-stat { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; }
    .admin-stat span { margin: 0; }
    .admin-stat strong { font-size: 26px; }
    .admin-table-wrap { overflow: visible; }
    .admin-table, .admin-table tbody { display: block; width: 100%; }
    .admin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .admin-table tbody tr { display: block; border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; margin: 12px 0; }
    .admin-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid #f0f2f5; text-align: right; }
    .admin-table td::before { content: attr(data-label); color: var(--text-muted); font-size: 11px; margin-right: auto; text-align: left; }
    .admin-table tr:last-child td { border-bottom: 1px solid #f0f2f5; }
    .admin-table tr td:last-child { border-bottom: 0; }
    .admin-table td .admin-actions { justify-content: flex-end; }
    .admin-table td > div:not(.admin-actions) { flex-basis: 100%; }
    .auth-page { padding: 20px 14px; align-items: start; }
    .auth-shell, .admin-login-shell { grid-template-columns: minmax(0, 1fr); border-radius: 18px; }
    .auth-intro { padding: 24px; }
    .auth-intro-copy { margin: 24px 0 0; }
    .auth-intro h2 { font-size: 24px; margin: 9px 0 0; line-height: 1.5; }
    .auth-intro h2 br { display: none; }
    .auth-intro-copy p, .auth-illustration, .auth-intro-footer { display: none; }
    .auth-panel { padding: 28px 24px; }
    .auth-panel-head h1, .auth-heading h1 { font-size: 22px; }
    .auth-form { gap: 18px; }
    .auth-footer { margin-top: 26px; padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
