/* Безумно. — личный кабинет. No external fonts, images or runtime assets. */
:root {
  --canvas: #f4f5f0;
  --surface: #ffffff;
  --surface-soft: #f8f9f5;
  --ink: #202a25;
  --ink-strong: #17231c;
  --muted: #657069;
  --line: #e0e5db;
  --line-strong: #cbd3c5;
  --forest: #263f2e;
  --forest-deep: #1d3024;
  --lime: #d4ee97;
  --lime-light: #eef6de;
  --success: #28513b;
  --warning: #87531b;
  --warning-bg: #fff5e4;
  --danger: #a43b35;
  --danger-bg: #fff0ed;
  --info: #365e7a;
  --info-bg: #edf4f8;
  --radius: 12px;
  --radius-small: 7px;
  --shadow-dialog: 0 24px 80px rgb(19 33 23 / 22%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; font-size: .875rem; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, input, select, textarea, a { -webkit-tap-highlight-color: transparent; }
button, a, summary, input, select, textarea { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--forest); text-underline-offset: .2em; }
a:hover { color: #152d20; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #568329;
  outline-offset: 3px;
}
input:focus, select:focus, textarea:focus { border-color: #749259; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--ink-strong); }
h1 { margin-bottom: .4rem; font-size: clamp(1.65rem, 2.7vw, 2rem); line-height: 1.2; font-weight: 680; letter-spacing: -.035em; }
h2 { font-size: 1.125rem; line-height: 1.4; font-weight: 650; letter-spacing: -.015em; }
h3 { font-size: 1rem; line-height: 1.45; font-weight: 650; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.35em; }
svg { display: block; flex-shrink: 0; }
.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr-only, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: .8rem 1rem; color: var(--ink-strong); background: var(--lime); border-radius: var(--radius-small); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.app-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 32px 18px 24px; color: #ecf0e8; background: var(--forest-deep); }
.brand { display: flex; flex-direction: column; gap: 3px; color: white; text-decoration: none; padding: 0 13px; }
.brand:hover { color: white; }
.brand-word { font-size: 32px; line-height: 1; font-weight: 850; letter-spacing: -.07em; }
.brand-dot { color: var(--lime); }
.brand-caption { margin-top: 8px; color: #b8c6b9; font-size: .7rem; font-weight: 450; letter-spacing: .015em; }
.main-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 50px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 13px; border-radius: var(--radius-small); color: #cbd5cc; font-weight: 520; text-decoration: none; }
.nav-link .icon { color: #aebbaf; }
.nav-link:hover { background: #2b4131; color: white; }
.nav-link.is-active { background: var(--lime); color: var(--forest-deep); }
.nav-link.is-active .icon { color: var(--forest-deep); }
.sidebar-footer { display: grid; gap: 24px; margin-top: auto; padding: 36px 13px 0; }
.sidebar-timezone { display: grid; gap: 6px; font-size: .75rem; color: #d3ded2; }
.sidebar .eyebrow { margin: 0; color: #a7b8a9; font-size: .625rem; }
.timezone-offset { margin-left: 6px; color: #a7b8a9; }
.logout-form { margin: 0; }
.logout-button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; color: #cbd5cc; background: none; border: 0; font-size: .8rem; }
.logout-button:hover { color: white; }
.workspace { min-width: 0; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 36px; background: rgb(255 255 255 / 70%); border-bottom: 1px solid var(--line); }
.source-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .75rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
.source-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.source-details { flex-basis: 100%; font-size: .6875rem; }
.source-details > summary { width: fit-content; cursor: pointer; color: var(--forest); padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.source-details p { margin: 6px 0; max-width: 740px; }
.status-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--success); }
.status-dot-pending { background: #8f9a89; }
.owner-label { display: flex; align-items: center; gap: 9px; color: #536050; font-size: .75rem; flex-shrink: 0; }
.owner-avatar { display: grid; width: 31px; height: 31px; place-items: center; background: #e7eadf; border: 1px solid #dce2d4; border-radius: 50%; font-size: .75rem; font-weight: 650; }
.main-content { max-width: 1640px; margin-inline: auto; padding: 32px 36px 0; min-width: 0; }
.main-content:focus:not(:focus-visible), .auth-card:focus:not(:focus-visible) { outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 25px; }
.heading-copy { flex: 1 1 330px; min-width: 0; }
.eyebrow { margin-bottom: 10px; font-size: .625rem; line-height: 1.4; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.page-subtitle { margin-bottom: 0; font-size: .8125rem; line-height: 1.65; color: var(--muted); max-width: 680px; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; max-width: 100%; min-height: 42px; padding: 10px 15px; border: 1px solid transparent; border-radius: var(--radius-small); font-weight: 600; font-size: .8125rem; line-height: 1.4; text-decoration: none; text-align: center; background: transparent; color: var(--ink); transition: background-color .15s, border-color .15s; }
.button-primary { color: white; background: var(--forest); border-color: var(--forest); }
.button-primary:hover { color: white; background: #152f1e; border-color: #152f1e; }
.button-secondary { color: var(--ink); background: white; border-color: var(--line-strong); }
.button-secondary:hover { color: var(--ink-strong); background: var(--surface-soft); border-color: #a9b79f; }
.button-danger { color: var(--danger); background: var(--danger-bg); border-color: #e9beb5; }
.button-danger:hover { color: #82241f; background: #fce2dc; border-color: #d68e82; }
.button:disabled { opacity: .55; }
.button-icon { min-width: 42px; width: 42px; padding: 10px; background: white; border-color: var(--line-strong); }
.button-icon:hover { background: #edf0e6; }
.button-link, .text-link { background: none; color: var(--forest); border: 0; padding: 4px 0; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; font-weight: 550; }
.button-small { min-height: 36px; padding: 7px 11px; font-size: .75rem; }
.button-quiet { color: var(--forest); background: transparent; border-color: transparent; padding-inline: 7px; }
.button-quiet:hover { color: var(--forest-deep); background: var(--surface-soft); border-color: var(--line); }
.filters-panel { margin-bottom: 22px; padding: 0 18px 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #ebefe5; }
.filters-panel:not([open]) { padding-bottom: 0; }
.filters-panel > summary { display: flex; align-items: center; gap: 12px; padding: 14px 0; min-height: 44px; list-style: none; cursor: pointer; font-size: .75rem; font-weight: 600; }
.filters-panel > summary::-webkit-details-marker { display: none; }
.filter-summary-note { font-size: .6875rem; font-weight: 400; color: var(--muted); }
.disclosure-icon { width: 15px; height: 15px; margin-left: auto; transition: transform .15s; }
.filters-panel[open] .disclosure-icon { transform: rotate(180deg); }
.filters-form { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.6fr) minmax(150px, 1fr) auto; align-items: end; gap: 16px; }
.date-filter { padding: 0; margin: 0; min-width: 0; border: 0; }
.date-filter legend, .branch-filter > label { display: block; margin-bottom: 7px; padding: 0; font-size: .6875rem; color: #53614c; font-weight: 550; }
.date-range { display: flex; gap: 8px; flex-wrap: wrap; }
.date-range > label { display: flex; flex: 1 1 7.5rem; min-width: 0; align-items: center; gap: 6px; }
.date-range > label > span { font-size: .6875rem; color: var(--muted); }
.range-separator { display: none; }
.date-range input { width: 100%; min-width: 0; min-height: 38px; padding: 7px 8px; font-size: .75rem; }
.branch-filter { min-width: 0; }
.branch-filter select { min-height: 38px; padding: 7px 26px 7px 10px; font-size: .75rem; }
.filter-submit { min-height: 38px; padding: 8px 12px; font-size: .75rem; }
.filter-hint { margin-top: 10px; font-size: .6875rem; line-height: 1.5; color: var(--muted); }
.page-status:empty, .commands-panel:empty { display: none; }
.page-status { margin: 0 0 18px; font-size: .8125rem; color: var(--muted); }
.page-status .notice { margin-bottom: 0; }
.page-content { display: grid; gap: 22px; min-width: 0; }
.page-content > *, .grid-two > *, .metric-grid > * { min-width: 0; }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; overflow-wrap: anywhere; container-type: inline-size; container-name: hiring-panel; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-header h2, .panel-header h3, .section-title { margin-bottom: 0; }
.section-title { display: flex; align-items: center; gap: 9px; font-size: 1rem; font-weight: 650; }
.section-description, .panel-subtitle { margin: 5px 0 0; font-size: .75rem; color: var(--muted); }
.section-count { display: inline-flex; min-width: 22px; height: 22px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); font-size: .6875rem; color: var(--muted); }
.grid-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11.25rem), 1fr)); gap: 1px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.metric { position: relative; padding: 20px 22px; background: white; min-width: 0; }
.metric > h2, .metric > h3, .metric-label { display: block; margin: 0 0 10px; color: var(--muted); font-weight: 500; font-size: .75rem; line-height: 1.5; letter-spacing: 0; }
.metric-value { margin: 0 0 7px; color: var(--ink-strong); font-size: clamp(1.6rem, 2.4vw, 2rem); line-height: 1.25; letter-spacing: -.04em; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-value small, .metric-unit { font-size: .75rem; letter-spacing: 0; font-weight: 450; color: var(--muted); }
.metric-unavailable { color: #858e7d; font-weight: 450; }
.metric-value.metric-unavailable { font-size: 1.2rem; line-height: 1.45; letter-spacing: -.02em; }
.metric-note { font-size: .6875rem; line-height: 1.5; color: var(--muted); margin: 6px 0 0; }
.metric .badge { margin-top: 6px; }
.metric details { margin-top: 9px; font-size: .6875rem; }
.metric details > summary { color: var(--muted); cursor: pointer; padding-block: 3px; }
.metric details p { margin-top: 8px; }
.badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; padding: 4px 8px; border: 1px solid transparent; border-radius: 5px; font-size: .6875rem; line-height: 1.35; font-weight: 550; white-space: normal; vertical-align: middle; }
.status-fresh, .status-known, .status-executed, .status-active, .status-retained, .status-approved { background: #edf5e6; color: #315630; border-color: #dbe9d0; }
.status-unknown, .status-uncertain, .status-stale, .status-partial { background: var(--warning-bg); color: var(--warning); border-color: #f0dbb4; }
.status-immature, .status-registered, .status-pending, .status-draft { background: #eef0f2; color: #58626e; border-color: #dde2e7; }
.status-accepted, .status-proposed, .status-awaiting_approval { background: var(--info-bg); color: var(--info); border-color: #d4e4ee; }
.status-rejected, .status-error, .status-failed, .status-blocked, .status-stopped { background: var(--danger-bg); color: var(--danger); border-color: #f0d0c8; }
.notice { padding: 14px 16px; margin-bottom: 16px; border: 1px solid #d6e1ce; border-left: 3px solid #91aa75; border-radius: var(--radius-small); color: #475340; background: #f4f8ed; font-size: .8125rem; line-height: 1.6; overflow-wrap: anywhere; }
.notice strong { display: inline; font-weight: 650; }
.notice p { margin-top: 5px; }
.notice ul { margin-bottom: 0; }
.notice-error { background: var(--danger-bg); color: #8b352d; border-color: #edc6ba; border-left-color: #bc6655; }
.notice-warning { background: var(--warning-bg); color: #80551f; border-color: #ead6ae; border-left-color: #ba8a39; }
.notice-info { background: var(--info-bg); color: #35556b; border-color: #ccdeeb; border-left-color: #7495b2; }
.empty-state, .loading-state { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 28px 24px; color: var(--muted); font-size: .8125rem; }
.empty-state h2, .empty-state h3, .loading-state h2 { margin: 0; color: var(--ink); font-size: .9375rem; }
.empty-state p, .loading-state p { margin: 0; max-width: 580px; }
.empty-state .button { margin-top: 10px; }
.panel > .empty-state { padding: 20px 0 10px; }
.loading-state { min-height: 180px; justify-content: center; }
.loading-spinner { display: inline-block; width: 22px; height: 22px; margin-bottom: 6px; border: 2px solid var(--line); border-top-color: var(--forest); border-radius: 50%; animation: loading-spin .9s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.record-list { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.record-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.record-row:first-child { padding-top: 0; }
.record-row:last-child { padding-bottom: 0; border-bottom: 0; }
.row-main { flex: 1; min-width: 0; }
.row-main h3, .row-main h4 { margin-bottom: 5px; font-size: .875rem; }
.row-main p { margin: 5px 0 0; font-size: .75rem; color: var(--muted); }
.row-main > strong, .row-title { display: block; color: var(--ink); font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 7px; font-size: .6875rem; color: var(--muted); }
.table-wrap, .table-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-color: #c2ccb9 transparent; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .8125rem; font-variant-numeric: tabular-nums; }
.data-table th { padding: 10px 12px; background: #f5f7f1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #697265; font-size: .6875rem; line-height: 1.45; font-weight: 550; }
.data-table th:first-child { border-top-left-radius: 5px; }
.data-table th:last-child { border-top-right-radius: 5px; }
.data-table td { padding: 15px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcf8; }
.data-table td:first-child { font-weight: 550; }
.data-table td:first-child small { display: block; font-weight: 400; color: var(--muted); }
.data-table .numeric, .align-right { text-align: right; }
.data-table td .button { font-size: .6875rem; min-height: 36px; padding: 7px 10px; }
.data-table td .row-actions { justify-content: flex-start; }
.data-table .nowrap { white-space: nowrap; }
.cell-content { min-width: 0; overflow-wrap: anywhere; }
.cell-content > .badge { margin-top: 5px; }
.cell-content > .badge:first-child { margin-top: 0; }
.definition-list { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr); gap: 10px 20px; font-size: .8125rem; }
.definition-list dt { color: var(--muted); }
.definition-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; margin: 16px 0; }
.detail-grid > div { min-width: 0; }
.detail-grid dt, .detail-label { display: block; margin-bottom: 4px; font-size: .6875rem; color: var(--muted); }
.detail-grid dd { margin: 0; font-size: .8125rem; font-weight: 550; overflow-wrap: anywhere; }
.detail-grid p { margin-bottom: 0; }
.detail-grid .wide { grid-column: 1 / -1; }
.evidence-list { display: grid; gap: 9px; padding-left: 0; list-style: none; font-size: .75rem; }
.evidence-list li { overflow-wrap: anywhere; }
.evidence-list a, .evidence-list button { text-align: left; }
.funnel-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(80px, 1.5fr) auto; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .8125rem; }
.funnel-row:last-child { border: 0; }
.funnel-track { height: 8px; width: 100%; overflow: hidden; background: #edf0e7; border-radius: 3px; }
.funnel-meter { display: block; appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 8px; border: 0; border-radius: 3px; background: #edf0e7; accent-color: #718e53; }
.funnel-meter::-webkit-meter-bar { height: 8px; background: #edf0e7; border: 0; border-radius: 3px; box-shadow: none; }
.funnel-meter::-webkit-meter-optimum-value { background: #718e53; border-radius: 3px; }
.funnel-meter::-moz-meter-bar { background: #718e53; border-radius: 3px; }
.funnel-row:nth-child(-n+3) .funnel-meter::-webkit-meter-optimum-value { background: var(--forest); }
.funnel-row:nth-child(-n+3) .funnel-meter::-moz-meter-bar { background: var(--forest); }
.funnel-fill { display: block; height: 100%; min-width: 0; max-width: 100%; background: #718e53; border-radius: 3px; }
.funnel-row:nth-child(-n+3) .funnel-fill { background: var(--forest); }
.funnel-label { display: flex; align-items: baseline; gap: 10px; }
.funnel-label strong { font-size: .75rem; font-weight: 550; }
.funnel-index { min-width: 16px; color: #8c9784; font-size: .625rem; font-variant-numeric: tabular-nums; }
.funnel-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.funnel-value small { display: block; font-size: .625rem; color: var(--muted); font-weight: 400; line-height: 1.5; margin-top: 2px; }
.funnel-detail { display: block; margin-top: 3px; color: var(--muted); font-size: .6875rem; }
.commands-panel { display: grid; gap: 12px; margin-top: 22px; }
.command-card { border: 1px solid var(--line-strong); border-left: 3px solid #8b9f75; border-radius: var(--radius-small); background: white; padding: 16px 18px; font-size: .8125rem; overflow-wrap: anywhere; }
.command-card h3, .command-card h4 { font-size: .875rem; margin-bottom: 8px; }
.command-card p { margin-bottom: 8px; color: var(--muted); }
.command-card .badge { margin: 0 6px 4px 0; }
.command-card pre, pre.evidence { max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; }
.receipt-text { padding: 12px; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-soft); color: #46543e; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .6875rem; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.command-card details { margin-top: 12px; }
.command-card details > summary { padding-block: 4px; font-size: .75rem; cursor: pointer; color: var(--forest); }
.command-id, .monospace, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; overflow-wrap: anywhere; }
.command-id { color: var(--muted); }
.command-progress { display: flex; flex-wrap: wrap; gap: 9px; padding: 0; list-style: none; font-size: .6875rem; }
.action-dialog { width: min(720px, calc(100% - 32px)); max-width: none; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); margin: auto; padding: 0; color: var(--ink); background: var(--surface); border: 1px solid #d7dfcf; border-radius: 16px; box-shadow: var(--shadow-dialog); overflow-y: auto; overscroll-behavior: contain; }
.action-dialog::backdrop { background: rgb(20 32 23 / 46%); backdrop-filter: blur(2px); }
.dialog-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; border-bottom: 1px solid var(--line); background: white; }
.dialog-header h2 { margin: 0; font-size: 1.15rem; }
.dialog-close { flex-shrink: 0; min-width: 36px; width: 36px; min-height: 36px; padding: 7px; border-color: transparent; background: var(--surface-soft); }
.dialog-content { padding: 24px; }
.dialog-content > :first-child { margin-top: 0; }
.dialog-content > :last-child { margin-bottom: 0; }
.dialog-content h3 { margin-top: 22px; margin-bottom: 10px; }
.dialog-content ul { color: var(--muted); font-size: .8125rem; }
.dialog-content > p { font-size: .8125rem; color: var(--muted); }
.dialog-content .panel { padding: 16px; margin-bottom: 16px; background: var(--surface-soft); }
.experiment-summary { padding: 0 0 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.experiment-summary > h3:first-child { margin-top: 0; }
.experiment-summary p { font-size: .8125rem; }
.command-form { margin-top: 18px; }
.command-form > .field-help { margin-top: 14px; }
.draft-notice { margin-top: 0; font-size: .75rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
fieldset.form-field { margin: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-soft); gap: 10px; }
fieldset.form-field > legend { padding: 0 5px; }
.form-field > .form-field + .form-field { margin-top: 12px; }
.form-grid > [data-episode-new], .form-grid > [data-event-fields] { display: grid; gap: 16px; }
.form-field > label, .form-field > legend { color: #394535; font-size: .75rem; font-weight: 600; }
.form-field-wide, .form-field.wide, .form-field.full-width, .form-grid > .notice, .form-grid > .form-actions { grid-column: 1 / -1; }
.form-field .required-marker { margin-left: 5px; color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { display: block; width: 100%; max-width: 100%; min-height: 44px; padding: 10px 11px; color: var(--ink); background: white; border: 1px solid var(--line-strong); border-radius: var(--radius-small); box-shadow: 0 1px 2px rgb(25 39 23 / 2%); }
input::placeholder, textarea::placeholder { color: #909889; }
input[type="date"], input[type="datetime-local"], input[type="number"] { min-width: 0; font-variant-numeric: tabular-nums; }
input[readonly] { color: var(--muted); background: var(--surface-soft); }
input:disabled, select:disabled, textarea:disabled { background: #f2f4ed; color: #6f7869; opacity: 1; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--forest); vertical-align: middle; }
textarea { min-height: 94px; resize: vertical; line-height: 1.6; }
.checkbox-field, .confirmation-field { display: flex; align-items: flex-start; gap: 10px; font-size: .8125rem; }
.checkbox-field input, .confirmation-field input { margin-top: 3px; }
.field-help, .field-errors { color: var(--muted); font-size: .6875rem; line-height: 1.55; }
.field-help ul { margin: 0; padding-left: 1.2em; }
.field-errors { color: var(--danger); }
.field-errors ul, .errorlist { padding-left: 1.2em; margin: 0; }
.has-errors input, .has-errors select, .has-errors textarea, input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #bc7667; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-actions .field-help { flex-basis: 100%; }
.form-actions .button { min-height: 44px; }
.form-grid + .form-actions { margin-top: 24px; }
.form-error { color: var(--danger); font-size: .8125rem; }
.muted, .text-muted { color: var(--muted); }
.text-warning { color: var(--warning); }
.small-text, .small { font-size: .75rem; }
.stack { display: grid; gap: 16px; }
.cluster { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spaced { margin-top: 16px; }
.content-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-top: 30px; padding: 20px 0 24px; border-top: 1px solid var(--line); font-size: .625rem; color: #7a8374; }
.auth-page { min-height: 100vh; background: #f0f2e9; }
.auth-shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 60px 24px 24px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 40px; color: var(--forest-deep); }
.auth-brand .brand-word { font-size: 38.4px; }
.auth-brand .brand-dot { color: #7d9f47; }
.auth-brand .brand-caption { color: var(--muted); margin-top: 11px; }
.auth-card { width: min(100%, 430px); padding: 34px; border: 1px solid #dbe3d1; border-radius: 16px; background: white; box-shadow: 0 8px 30px rgb(29 48 36 / 4%); }
.auth-card-setup { width: min(100%, 520px); }
.auth-card h1 { font-size: 1.65rem; letter-spacing: -.035em; }
.auth-description { margin-top: 11px; margin-bottom: 25px; color: var(--muted); font-size: .8125rem; line-height: 1.7; }
.auth-form { display: grid; gap: 18px; }
.auth-form .notice { margin-bottom: 0; }
.auth-submit { width: 100%; margin-top: 4px; min-height: 46px; justify-content: space-between; }
.auth-footnote { margin-top: 22px; color: var(--muted); font-size: .6875rem; line-height: 1.7; }
.auth-back { display: inline-block; margin-top: 16px; font-size: .75rem; }
.auth-footer { margin-top: auto; padding-top: 40px; color: #7a8374; font-size: .6875rem; text-align: center; }
.setup-secret { word-break: break-all; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface-soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.setup-provisioning { margin-bottom: 24px; }
.setup-provisioning > .field-help { margin-top: 14px; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-small); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; }
@media (min-width: 1600px) {
  .main-content { padding-inline: 48px; }
  .topbar { padding-inline: 48px; }
}
@media (max-width: 1250px) {
  .filters-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .branch-filter { width: 100%; }
  .filter-submit { justify-self: end; align-self: end; }
  .main-content { padding-inline: 26px; }
  .topbar { padding-inline: 26px; }
}
@media (max-width: 1050px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 23px 16px; height: auto; padding: 23px 24px 15px; }
  .brand { padding: 0; }
  .brand-word { font-size: 30.4px; }
  .brand-caption { font-size: .625rem; margin-top: 5px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; gap: 7px; }
  .nav-link { justify-content: center; min-height: 46px; padding: 10px 9px; font-size: .8125rem; gap: 8px; }
  .sidebar-footer { margin: 0; padding: 0; display: flex; align-items: center; gap: 22px; }
  .sidebar-timezone { display: none; }
  .logout-button { font-size: .75rem; }
  .topbar { min-height: 56px; padding-block: 12px; }
  .main-content { padding-top: 27px; }
  .grid-two { gap: 18px; }
}
@media (max-width: 760px) {
  .grid-two { grid-template-columns: minmax(0, 1fr); }
  .main-content { padding-inline: 20px; }
  .topbar { padding-inline: 20px; }
  .page-heading { gap: 15px; }
  .heading-copy { flex-basis: 100%; }
  .page-actions { width: 100%; }
  .page-actions > .button-icon { margin-left: auto; }
  .filters-panel { padding-inline: 15px; }
  .panel { padding: 20px; }
  .record-row { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .record-row > .row-actions { width: 100%; justify-content: flex-start; }
  .metric { padding: 18px; }
  .metric-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.75rem), 1fr)); }
  .detail-grid { gap: 14px; }
}
@container hiring-panel (max-width: 64rem) {
  /* data-label carries the desktop heading into the mobile card. */
  .data-table:has(td[data-label]) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .data-table:has(td[data-label]), .data-table:has(td[data-label]) tbody { display: block; width: 100%; }
  .data-table:has(td[data-label]) tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .data-table:has(td[data-label]) tr:first-child { padding-top: 0; }
  .data-table:has(td[data-label]) tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .data-table:has(td[data-label]) td { display: grid; grid-template-columns: minmax(95px, .8fr) minmax(0, 1.2fr); align-items: start; gap: 12px; padding: 7px 0; border: 0; text-align: left; }
  .data-table td[data-label]::before { content: attr(data-label); font-size: .6875rem; font-weight: 400; color: var(--muted); }
  .data-table td .row-actions { display: flex; }
  .data-table:not(:has(td[data-label])) { min-width: 560px; }
  .panel:has(> .data-table:not(:has(td[data-label]))) { overflow-x: auto; }
}
@media (min-width: 360px) and (max-width: 760px) {
  .metric-grid > .metric:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  body { font-size: .875rem; }
  .sidebar { padding: 20px 16px 12px; gap: 21px 12px; }
  .main-nav { gap: 4px; }
  .nav-link { flex-direction: column; gap: 6px; padding: 10px 3px; min-height: 68px; font-size: .6875rem; line-height: 1.25; text-align: center; }
  .nav-link .icon { width: 18px; height: 18px; }
  .nav-link span { min-height: 2.5em; display: flex; align-items: center; }
  .logout-button { gap: 6px; }
  .logout-button .icon { width: 17px; height: 17px; }
  .brand-word { font-size: 28.8px; }
  .topbar { padding: 11px 16px; gap: 12px; }
  .source-status { font-size: .6875rem; }
  .owner-label > span:last-child { display: none; }
  .owner-avatar { width: 28px; height: 28px; }
  .main-content { padding: 24px 16px 0; }
  .page-heading { margin-bottom: 20px; }
  .page-subtitle { font-size: .75rem; }
  .page-actions { gap: 7px; }
  .page-actions > .button { padding-inline: 12px; font-size: .75rem; }
  .page-actions > .button-icon { padding-inline: 10px; }
  .filter-summary-note { display: none; }
  .filters-form { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .filters-panel > summary { padding-block: 13px; }
  .filter-submit { width: 100%; }
  .date-range > label { flex-basis: 8rem; }
  .page-content { gap: 16px; }
  .panel { padding: 18px 16px; }
  .panel-header { gap: 10px; margin-bottom: 16px; }
  .panel-header > .button { font-size: .6875rem; min-height: 36px; padding: 7px 10px; }
  .section-title { font-size: .9375rem; }
  .metric { padding: 17px 14px; }
  .metric-value { font-size: 1.6rem; }
  .metric-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.75rem), 1fr)); }
  .metric > h2, .metric > h3, .metric-label { font-size: .6875rem; }
  .funnel-row { grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 9px; }
  .funnel-track { grid-row: 2; grid-column: 1 / -1; height: 6px; }
  .funnel-meter { grid-row: 2; grid-column: 1 / -1; height: 6px; }
  .funnel-meter::-webkit-meter-bar { height: 6px; }
  .funnel-row > :last-child:not(.funnel-track) { grid-column: 2; grid-row: 1; }
  .action-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .dialog-header { padding: 16px; }
  .dialog-header h2 { font-size: 1.05rem; }
  .dialog-content { padding: 19px 16px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { font-size: 1rem; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .form-actions .field-help { order: 1; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .definition-list { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .definition-list dd { margin-bottom: 10px; }
  .content-footer { margin-top: 24px; padding-top: 17px; }
  .auth-shell { padding: 36px 16px 24px; }
  .auth-brand { margin-bottom: 30px; }
  .auth-card { padding: 26px 22px; border-radius: 12px; }
  .auth-card h1 { font-size: 1.5rem; }
  .auth-footer { padding-top: 30px; }
  .recovery-codes { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .page-actions, .filters-panel, .content-footer, .row-actions, .commands-panel, .action-dialog { display: none !important; }
  .app-shell { display: block; }
  .main-content { padding: 0; }
  .panel, .metric-grid { break-inside: avoid; }
  body { background: white; font-size: 11pt; }
}
