:root {
    --sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --logo-font: "Red Hat Display", system-ui, sans-serif;
    --accent: #0d8f9c;
    --banner: #16386e;
    --product-color: #e0871f;
    --logo-module: var(--product-color);
    --bg: #eef0f4;
    --surface: #ffffff;
    --surface-2: #f7f8fb;
    --field: #f5f6fa;
    --chip: #f0f2f7;
    --sidebar-bg: #fafbfc;
    --line: #e6e8ee;
    --line-2: #eef0f4;
    --muted: #6a7180;
    --faint: #98a0ae;
    --ink: #14181f;
    --ink2: #3a4150;
    --ok: #15a06a;
    --warn: #cf850f;
    --bad: #e23d52;
    --info: #2a6fdb;
    --kpi: var(--accent);
    --kpi-banner: color-mix(in srgb, var(--accent) 42%, #fff);
    --kpi-soft: color-mix(in srgb, var(--kpi) 13%, transparent);
    --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
    --accent-line: color-mix(in srgb, var(--accent) 28%, transparent);
    --ok-soft: color-mix(in srgb, var(--ok) 13%, transparent);
    --warn-soft: color-mix(in srgb, var(--warn) 15%, transparent);
    --bad-soft: color-mix(in srgb, var(--bad) 11%, transparent);
    --info-soft: color-mix(in srgb, var(--info) 13%, transparent);
    --product-soft: color-mix(in srgb, var(--product-color) 13%, transparent);
    --shadow-card: 0 1px 2px #14181f0a;
    --shadow-pop: 0 8px 28px #14181f1a;
    --shadow-up: 0 1px 2px #14181f0d, 0 10px 30px #14181f0f;
    --radius-control: 10px;
    --radius-panel: 16px;
    --radius-tile: 22%;
    --raised: #ffffff;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --accent: #1fb6c3;
    --banner: #1d2f57;
    --bg: #0e1116;
    --surface: #161b22;
    --surface-2: #1b212b;
    --field: #1a2029;
    --chip: #222a35;
    --sidebar-bg: #11151b;
    --line: #262d38;
    --line-2: #1b212b;
    --muted: #8a93a2;
    --faint: #69727f;
    --ink: #e7eaef;
    --ink2: #aab3c0;
    --ok: #2bb47f;
    --warn: #e0a23a;
    --bad: #ef5a6e;
    --info: #5a8ff0;
    --raised: #2b3543;
    --shadow-card: 0 1px 2px #00000040;
    --shadow-pop: 0 8px 28px #00000080;
    --shadow-up: 0 1px 2px #00000040, 0 10px 30px #00000066;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
}

button,
input,
textarea,
select {
    font: inherit;
}

a {
    color: var(--accent);
}

a:hover {
    color: color-mix(in srgb, var(--accent) 78%, var(--ink));
}

.bark-logo {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: max-content;
    color: var(--ink);
    text-decoration: none;
}

.bark-logo__tile {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: var(--radius-tile);
    background: linear-gradient(135deg, #1d2733 0%, #14181f 100%);
}

.bark-logo__tile img {
    width: 74%;
    height: 74%;
    display: block;
}

.bark-logo__word {
    display: block;
    color: var(--ink);
    font-family: var(--logo-font);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.bark-logo__module {
    color: var(--logo-module, var(--accent));
    font-weight: 600;
}

.bark-logo__subtitle {
    display: block;
    margin-top: 4px;
    color: var(--faint);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-transform: uppercase;
}

.app-shell {
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    min-height: 100vh;
}

.bark-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    width: 244px;
    height: 100vh;
    flex-direction: column;
    gap: 22px;
    border-right: 1px solid var(--line);
    background: var(--sidebar-bg);
    padding: 20px 14px 14px;
}

.bark-sidebar__group {
    display: grid;
    gap: 2px;
}

.bark-sidebar__group-label {
    margin: 0 0 6px 12px;
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bark-sidebar__item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-control);
    color: var(--ink2);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 12px;
    text-decoration: none;
}

.bark-sidebar__item:hover {
    background: var(--chip);
    color: var(--ink);
}

.bark-sidebar__item--active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
}

.bark-sidebar__note {
    display: block;
    border-radius: var(--radius-control);
    background: var(--chip);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    padding: 10px 12px;
}

.bark-sidebar__footer {
    margin-top: 0;
    color: var(--faint);
    font-size: 11px;
    line-height: 1.5;
}

.bark-sidebar__bottom {
    display: grid;
    gap: 12px;
    margin-top: auto;
}

.bark-sidebar__bottom .bark-theme-switch {
    justify-self: start;
}

.app-workspace {
    min-width: 0;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    padding: 14px 24px;
    backdrop-filter: blur(16px);
}

.app-topbar__title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.app-topbar__title span {
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.app-topbar__title strong {
    color: var(--ink);
    font-family: var(--logo-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.user-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.user-chip {
    display: inline-flex;
    max-width: 260px;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--ink2);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.bark-theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--chip);
    padding: 3px;
}

.bark-theme-switch button {
    display: inline-flex;
    width: 42px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: none;
    color: var(--faint);
    cursor: pointer;
    padding: 0;
}

.bark-theme-switch button:hover {
    color: var(--ink2);
}

.bark-theme-switch button[aria-pressed="true"] {
    background: var(--raised);
    box-shadow: var(--shadow-card);
    color: var(--accent);
}

.bark-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    stroke-width: 1.7;
}

.bark-sidebar .bark-icon,
.bark-theme-switch .bark-icon {
    width: 18px;
    height: 18px;
}

.container {
    width: min(100%, 1400px);
    margin: 0 auto;
    padding: 24px 24px 48px;
}

.page-overview {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.page-overview__copy {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.page-eyebrow {
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page-overview h1 {
    margin: 0;
    color: var(--ink);
    font-family: var(--logo-font);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.page-overview p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
}

.page-tabs {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--chip);
    padding: 3px;
}

.page-tab {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: var(--ink2);
    font-weight: 700;
    padding: 0 12px;
    text-decoration: none;
    white-space: nowrap;
}

.page-tab:hover {
    color: var(--ink);
}

.page-tab.is-active {
    background: var(--raised);
    box-shadow: var(--shadow-card);
    color: var(--accent);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.metric-card {
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    padding: 16px;
}

.metric-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.metric-card strong {
    color: var(--ink);
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
}

.metric-card small {
    color: var(--faint);
    font-size: 12px;
    font-weight: 600;
}

.section,
.info-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.section {
    margin-bottom: 20px;
    padding: 24px;
}

.section:target {
    scroll-margin-top: 88px;
}

.section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section__header .info-text {
    margin: 8px 0 0;
}

.section h2,
.employee-details h2,
.checklist-header h2 {
    margin: 0 0 12px;
    color: var(--ink);
    font-family: var(--logo-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.login-card h1 {
    margin: 0 0 12px;
    color: var(--ink);
    font-family: var(--logo-font);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.section h3,
.info-card h3,
.poll-name,
.section-title {
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.info-text,
.search-results,
.pagination-info,
.bot-date,
.poll-meta,
.message-meta,
.login-card p,
.login-footer p {
    color: var(--muted);
}

.info-text {
    margin: 0 0 18px;
}

.btn,
.login-btn,
.save-btn,
.pagination-btn,
.pagination-page {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    padding: 0 16px;
    cursor: pointer;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}

.btn:focus-visible,
.login-btn:focus-visible,
.save-btn:focus-visible,
.pagination-btn:focus-visible,
.pagination-page:focus-visible,
.icon-btn:focus-visible,
.app-nav__item:focus-visible,
.day-tab:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-primary,
.login-btn,
.save-btn {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover,
.login-btn:hover,
.save-btn:hover {
    background: color-mix(in srgb, var(--accent) 86%, var(--ink));
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary {
    border-color: var(--line);
    background: transparent;
    color: var(--ink2);
}

.btn-secondary:hover {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.form-group {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.form-group label,
.info-item label,
.info-row strong {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.custom-select {
    position: relative;
    width: 100%;
}

.search-input,
input[type="text"],
textarea,
select {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--field);
    color: var(--ink);
    font-weight: 500;
    padding: 10px 12px;
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.custom-select .search-input {
    padding-right: 58px;
}

textarea {
    min-height: 118px;
    resize: vertical;
}

.search-input::placeholder,
textarea::placeholder,
input::placeholder {
    color: var(--faint);
}

.search-input:focus,
input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.dropdown-arrow,
.clear-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.dropdown-arrow {
    right: 13px;
    color: var(--faint);
    font-size: 12px;
    pointer-events: none;
}

.clear-button {
    right: 34px;
    display: flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--bad-soft);
    color: var(--bad);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.dropdown-list {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    z-index: 1000;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    box-shadow: var(--shadow-pop);
}

.dropdown-item {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    cursor: pointer;
    font-weight: 600;
}

.dropdown-item:last-child {
    border-bottom: 0;
}

.dropdown-item:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.item-details {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.search-info {
    display: inline-flex;
    align-self: flex-start;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 9px;
}

.assignment-form,
.search-form {
    display: flex;
    gap: 10px;
}

.assignment-form {
    flex-direction: column;
}

.assignment-form > .btn {
    align-self: flex-start;
}

.search-form {
    align-items: center;
}

.search-box {
    margin-bottom: 18px;
}

.success-message,
.error-message,
.login-notice,
.view-mode-notice {
    border-radius: var(--radius-control);
    margin-bottom: 18px;
    padding: 13px 15px;
    font-weight: 700;
}

.success-message,
.login-notice {
    border: 1px solid color-mix(in srgb, var(--ok) 28%, transparent);
    background: var(--ok-soft);
    color: var(--ok);
}

.error-message {
    border: 1px solid color-mix(in srgb, var(--bad) 28%, transparent);
    background: var(--bad-soft);
    color: var(--bad);
}

.view-mode-notice {
    border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
    background: var(--warn-soft);
    color: var(--warn);
}

.links-table {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
}

table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 13px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover {
    background: var(--surface-2);
}

.employee-link {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.employee-link:hover {
    color: var(--accent);
}

.status-badge,
.stage-badge,
.status-completed,
.status-current,
.status-pending,
.status-answered,
.status-not-answered,
.correct-indicator {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.status-badge.completed,
.status-badge.active,
.status-completed,
.status-answered,
.correct-indicator,
.correct-indicator.correct {
    background: var(--ok-soft);
    color: var(--ok);
}

.status-badge.in-progress,
.status-current,
.stage-badge {
    background: var(--accent-soft);
    color: var(--accent);
}

.status-badge.inactive,
.status-not-answered,
.correct-indicator.incorrect {
    background: var(--bad-soft);
    color: var(--bad);
}

.status-pending {
    background: var(--chip);
    color: var(--muted);
}

.stage-1,
.stage-2,
.stage-3,
.stage-4,
.stage-5,
.stage-6,
.stage-7,
.stage-8,
.stage-9,
.stage-10 {
    background: var(--product-soft);
    color: var(--product-color);
}

.progress-container {
    display: grid;
    gap: 8px;
}

.progress-bar,
.progress-bar-small {
    overflow: hidden;
    border-radius: 999px;
    background: var(--chip);
}

.progress-bar {
    height: 12px;
}

.progress-bar-small {
    height: 8px;
    min-width: 130px;
}

.progress-fill,
.progress-fill-small {
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.progress-text,
.progress-info,
.stage-percent,
.poll-correct,
.poll-text {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.progress-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.stage-text {
    color: var(--ink2);
    font-weight: 700;
}

.poll-correct {
    color: var(--ok);
    font-family: var(--mono);
}

.bot-status,
.stage-progress,
.poll-progress {
    display: grid;
    gap: 6px;
}

.action-buttons-compact {
    display: flex;
    gap: 6px;
}

.icon-btn {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink2);
    text-decoration: none;
}

.icon-btn:hover {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
}

.icon-btn-green:hover {
    border-color: color-mix(in srgb, var(--ok) 28%, transparent);
    background: var(--ok-soft);
    color: var(--ok);
}

.icon-btn-blue:hover {
    border-color: color-mix(in srgb, var(--info) 28%, transparent);
    background: var(--info-soft);
    color: var(--info);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination-pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.pagination-page {
    width: 38px;
    padding: 0;
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink2);
}

.pagination-page.active,
.pagination-page:hover,
.pagination-btn:hover {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
}

.pagination-btn {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink2);
}

.pagination-dots {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    color: var(--faint);
}

.pagination-info {
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.employee-details {
    display: grid;
    gap: 18px;
}

.info-card {
    padding: 20px;
}

.info-card h3 {
    margin-bottom: 14px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.info-item {
    display: grid;
    min-width: 0;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-2);
    padding: 12px;
}

.info-item span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-weight: 700;
}

.schema-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 20px;
    color: var(--muted);
}

.schema-list strong,
.info-item span,
.bot-date,
.stage-percent,
.poll-text {
    font-family: var(--mono);
}

.stages-list,
.polls-list,
.stage-messages,
.poll-options {
    display: grid;
    gap: 12px;
}

.stage-item,
.poll-item,
.poll-result,
.message-full,
.option {
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-2);
}

.stage-item,
.poll-item {
    padding: 14px;
}

.poll-result {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
}

.poll-result.correct {
    border-color: color-mix(in srgb, var(--ok) 28%, transparent);
    background: var(--ok-soft);
    color: var(--ok);
}

.poll-result.incorrect {
    border-color: color-mix(in srgb, var(--bad) 28%, transparent);
    background: var(--bad-soft);
    color: var(--bad);
}

.stage-header,
.poll-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.stage-number,
.poll-stage {
    display: inline-flex;
    min-height: 26px;
    align-items: center;
    border-radius: 999px;
    background: var(--product-soft);
    color: var(--product-color);
    font-size: 12px;
    font-weight: 800;
    padding: 4px 9px;
}

.stage-title,
.poll-question {
    color: var(--ink);
    font-weight: 700;
}

.stage-message,
.message-text,
.message-preview {
    color: var(--ink2);
}

.message-preview {
    display: grid;
    gap: 8px;
}

.toggle-message {
    align-self: start;
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font-weight: 700;
    padding: 0;
}

.message-full {
    display: none;
    margin-top: 8px;
    padding: 12px;
}

.available-polls {
    margin-top: 14px;
}

.available-poll {
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    padding: 12px;
}

.poll-options {
    margin-top: 10px;
}

.option {
    padding: 10px;
}

.option.selected {
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

.no-data {
    border: 1px dashed var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface-2);
    color: var(--muted);
    padding: 18px;
    text-align: center;
}

.days-after,
.answer-date {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
}

.back-link {
    margin-top: 14px;
}

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.login-theme {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20;
}

.login-container {
    width: min(100%, 440px);
}

.login-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-card);
    padding: 28px;
}

.login-header {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.login-header .bark-logo {
    margin-bottom: 8px;
}

.login-header h1 {
    margin-bottom: 0;
}

.login-header p {
    margin: 0;
}

.login-icon {
    display: none;
}

.login-form {
    margin-top: 22px;
}

.login-btn {
    position: relative;
    width: 100%;
    min-height: 46px;
    justify-content: space-between;
    padding: 0 16px;
}

.btn-icon {
    font-size: 18px;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #fff;
    border-radius: 50%;
    flex: 0 0 auto;
    animation: login-spin 0.8s linear infinite;
}

.login-btn.is-loading {
    pointer-events: none;
    cursor: wait;
    opacity: 0.92;
    transform: none;
}

.login-btn.is-loading .btn-icon {
    display: none;
}

.login-btn.is-loading .btn-spinner {
    display: inline-block;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}

.login-notice {
    margin: 18px 0 0;
}

.login-footer {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.login-footer p {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
}

.product-meta {
    display: grid;
    gap: 3px;
    color: var(--faint);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.public-footer {
    width: min(100% - 48px, 980px);
    margin: -28px auto 48px;
}

.message-card {
    min-height: 0;
}

.public-header {
    display: flex;
    width: min(100%, 980px);
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 auto;
    padding: 24px;
}

.public-header__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.public-header__title {
    display: grid;
    justify-items: end;
    gap: 2px;
    color: var(--muted);
    text-align: right;
}

.public-header__title span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.public-header__title strong {
    color: var(--ink);
    font-size: 15px;
}

.checklist-container {
    width: min(100% - 48px, 980px);
    margin: 0 auto 48px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.checklist-header {
    padding: 24px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.checklist-header p {
    margin: 0 0 18px;
    color: var(--muted);
}

.info-row {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
    border-top: 1px solid var(--line);
    padding: 10px 0;
}

.info-row:first-of-type {
    border-top: 0;
}

.info-row span {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-weight: 700;
}

.day-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.day-tab {
    display: inline-flex;
    min-width: max-content;
    flex: 1 0 auto;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid transparent;
    padding: 0 16px;
    color: var(--ink2);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.day-tab:hover {
    background: var(--chip);
    color: var(--ink);
}

.day-tab.active {
    border-bottom-color: var(--accent);
    background: var(--surface);
    color: var(--accent);
}

.form-content {
    padding: 24px;
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.question-block {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
    animation: fadeIn 0.24s ease;
}

.question-block label {
    color: var(--ink2);
    font-weight: 700;
}

.question-block textarea[readonly] {
    background: var(--surface-2);
    color: var(--ink2);
    cursor: default;
}

.save-btn {
    width: auto;
    min-width: 220px;
    max-width: 360px;
    min-height: 46px;
    margin-top: 8px;
}

.checklist-container > .success-message,
.checklist-container > .view-mode-notice {
    margin: 18px 24px 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 820px) {
    .app-shell {
        display: block;
    }

    .bark-sidebar {
        position: sticky;
        z-index: 120;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 14px 16px;
        gap: 12px;
    }

    .bark-sidebar__group {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .bark-sidebar__group-label,
    .bark-sidebar__note,
    .bark-sidebar__footer {
        display: none;
    }

    .bark-sidebar__item {
        min-height: 36px;
        padding: 8px 10px;
    }

    .bark-sidebar__bottom {
        margin-top: 0;
    }

    .app-topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .user-info {
        justify-content: flex-start;
    }

    .container {
        padding: 20px 16px 36px;
    }

    .page-overview {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .page-tabs {
        align-self: flex-start;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .section,
    .info-card,
    .login-card {
        padding: 18px;
    }

    .form-row,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .assignment-form,
    .search-form {
        align-items: stretch;
        flex-direction: column;
    }

    .section__header {
        flex-direction: column;
    }

    .assignment-form > .btn {
        align-self: stretch;
    }

    .public-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px 16px;
    }

    .public-header__meta {
        width: 100%;
        align-items: flex-start;
        justify-content: space-between;
    }

    .public-header__title {
        justify-items: start;
        text-align: left;
    }

    .checklist-container {
        width: min(100% - 32px, 980px);
    }

    .public-footer {
        width: min(100% - 32px, 980px);
    }

    .checklist-header,
    .form-content {
        padding: 18px;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 13px;
    }

    .login-body {
        padding: 16px;
    }

    .login-theme {
        position: static;
        justify-self: end;
        margin-bottom: 12px;
    }

    .btn,
    .login-btn,
    .save-btn {
        white-space: normal;
    }

    .page-tabs {
        width: 100%;
    }

    .page-tab {
        flex: 1 1 0;
    }

    .save-btn {
        width: 100%;
        max-width: none;
    }

    .action-buttons-compact {
        flex-wrap: wrap;
    }
}

/* ===== bark-manager-v2 cabinet shell parity ===== */
.num {
    font-family: var(--mono);
    font-feature-settings: "tnum" 1;
    letter-spacing: 0;
}

.eyebrow,
.bark-sidebar__group-label,
.page-eyebrow {
    color: var(--faint);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card,
.section,
.info-card,
.metric-card {
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

body.app-body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    overscroll-behavior: none;
}

.dash {
    position: fixed;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    background: var(--bg);
}

.dash-main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    background: var(--bg);
    padding: 28px 28px 40px;
}

.dash-content {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.dash-scrim,
.dash-mobilebar {
    display: none;
}

.dash-mobilebar {
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.bark-sidebar {
    position: relative;
    top: auto;
    display: flex;
    width: 244px;
    height: 100dvh;
    min-height: 0;
    flex: 0 0 244px;
    flex-direction: column;
    gap: 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    background: var(--sidebar-bg);
    padding: 20px 14px 14px;
}

.bark-sidebar__brand {
    flex: none;
    padding: 2px 8px 16px;
}

.bark-sidebar .bark-logo {
    min-width: 0;
}

.bark-sidebar .bark-logo__word,
.dash-mobilebar .bark-logo__word {
    font-size: 15.5px;
}

.bark-sidebar .bark-logo__subtitle,
.dash-mobilebar .bark-logo__subtitle {
    font-size: 8.5px;
}

.bark-sidebar__search {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--field);
    color: var(--faint);
    font-size: 12.5px;
    padding: 8px 11px;
    text-decoration: none;
}

.bark-sidebar__search:hover {
    border-color: var(--accent-line);
    color: var(--accent);
}

.bark-sidebar__search .num {
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--faint);
    font-size: 10.5px;
    padding: 0 5px;
}

.bark-sidebar__group {
    display: grid;
    flex: none;
    gap: 2px;
    margin: 0 -4px 0;
    padding: 0 4px;
}

.bark-sidebar__group + .bark-sidebar__group {
    margin-top: 10px;
}

.bark-sidebar__group-label {
    margin: 0;
    padding: 2px 12px 5px;
    font-size: 8.5px;
    letter-spacing: 0.09em;
}

.bark-sidebar__item {
    display: flex;
    align-items: center;
    gap: 11px;
    border-radius: 10px;
    color: var(--ink2);
    font-size: 13.5px;
    font-weight: 500;
    padding: 9px 12px;
    text-decoration: none;
}

.bark-sidebar__item:hover {
    background: var(--chip);
    color: var(--ink2);
}

.bark-sidebar__item--active,
.bark-sidebar__item--active:hover {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.bark-sidebar__note {
    border: 0;
    border-radius: 10px;
    background: var(--field);
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    padding: 10px 12px;
}

.bark-sidebar__footer {
    flex: none;
    margin-top: auto;
    border-top: 1px solid var(--line-2);
    color: var(--faint);
    font-size: 10.5px;
    line-height: 1.55;
    padding: 12px 6px 0;
}

.bark-sidebar__footer strong {
    color: var(--muted);
    font-weight: 600;
}

.topbar {
    display: grid;
    grid-template-areas: "greet actions" "meta meta";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 24px;
    margin-bottom: 22px;
}

.topbar-greet {
    grid-area: greet;
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--ink);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.18;
}

.topbar-greet .greet-txt {
    min-width: 0;
}

.topbar-actions {
    position: relative;
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-meta {
    grid-area: meta;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 12.5px;
}

.topbar-meta b {
    color: var(--ink2);
    font-weight: 600;
}

.user-chip {
    display: inline-flex;
    max-width: 260px;
    height: 36px;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: var(--ink2);
    font-size: 13px;
    font-weight: 600;
    padding: 0 13px 0 10px;
    white-space: nowrap;
}

.user-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bark-icon-btn {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--surface) 68%, transparent);
    box-shadow: var(--shadow-card);
    color: var(--ink2);
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.bark-icon-btn:hover {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent);
}

.bark-theme-switch {
    border-radius: 10px;
    background: var(--field);
}

.bark-theme-switch button {
    width: 36px;
    height: 30px;
    border-radius: 8px;
}

.btn {
    border-radius: 10px;
}

.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 48px;
}

.page-overview {
    align-items: flex-start;
    margin-bottom: 18px;
}

.page-overview h1 {
    font-family: var(--sans);
    font-size: 25px;
    font-weight: 600;
    letter-spacing: 0;
}

.page-overview p {
    font-size: 13.5px;
    line-height: 1.5;
}

.metric-grid {
    gap: 14px;
    margin-bottom: 18px;
}

.metric-card {
    padding: 18px;
}

.metric-card strong {
    color: var(--kpi);
}

.section {
    margin-bottom: 18px;
}

.section:target {
    scroll-margin-top: 18px;
}

@media (max-width: 900px) {
    body.app-body {
        height: 100dvh;
    }

    .dash > .bark-sidebar {
        position: fixed;
        z-index: 60;
        top: 0;
        bottom: 0;
        left: 0;
        width: 244px;
        max-width: 82vw;
        height: auto;
        padding-top: calc(20px + env(safe-area-inset-top));
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
        transform: translateX(-100%);
        transition: transform 0.22s ease;
    }

    .dash.nav-open > .bark-sidebar {
        box-shadow: var(--shadow-pop);
        transform: none;
    }

    .dash.nav-open .dash-scrim {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: block;
        background: rgba(0, 0, 0, 0.45);
    }

    .dash-mobilebar {
        display: flex;
    }

    .dash-main {
        padding: calc(14px + env(safe-area-inset-top)) 16px max(0px, env(safe-area-inset-bottom));
    }

    .dash-content {
        max-width: none;
    }

    .bark-sidebar__group {
        display: grid;
    }

    .bark-sidebar__group-label,
    .bark-sidebar__note,
    .bark-sidebar__footer {
        display: block;
    }

    .topbar {
        column-gap: 14px;
    }

    .topbar-greet {
        font-size: 20px;
    }

    .topbar-actions {
        align-self: start;
    }

    .topbar-actions .btn span {
        display: none;
    }

    .topbar-actions .btn {
        width: 36px;
        min-height: 36px;
        padding: 0;
    }

    .topbar-meta {
        gap: 4px 8px;
        font-size: 11.5px;
        margin-top: 8px;
    }

    .container {
        padding-bottom: 32px;
    }

    .page-overview {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .page-tabs {
        align-self: flex-start;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .topbar {
        grid-template-areas: "greet" "actions" "meta";
        grid-template-columns: 1fr;
        row-gap: 10px;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }

    .user-chip {
        max-width: 100%;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .topbar-greet {
        font-size: 18px;
    }
}
