h1:focus {
    outline: none;
}

:root {
    /* Accents — единственный action-цвет: teal. Coral/amber — только семантика warning */
    --po-delu-coral: #d87b32;
    --po-delu-coral-soft: #fff3e6;
    --po-delu-teal: #0f766e;
    --po-delu-teal-text: #0f766e;
    --po-delu-teal-soft: #e6f4f2;
    --po-delu-teal-hover: #115e59;
    --po-delu-amber: #f3a24d;
    --po-delu-amber-deep: #cc741d;

    /* Заливка акцентных контролов и текст на ней (контраст AA на 12px) */
    --po-delu-accent-fill: #0f766e;
    --po-delu-accent-fill-hover: #115e59;
    --po-delu-on-accent: #ffffff;

    /* Neutrals & Surfaces - Light */
    --po-delu-graphite: #171715;
    --po-delu-text: #232320;
    --po-delu-text-strong: #171715;
    --po-delu-muted: #73736b;
    --po-delu-border: #e5e5e1;
    --po-delu-border-strong: #d4d4cf;
    --po-delu-surface: #fafaf9;
    --po-delu-surface-card: #ffffff;
    --po-delu-surface-hover: #f4f4f2;
    --po-delu-surface-stripe: #fafaf9;

    /* Shell (Header) - Light */
    --po-delu-shell: #ffffff;
    --po-delu-shell-surface: #f4f4f2;
    --po-delu-shell-border: #e5e5e1;
    --po-delu-shell-text: #171715;
    --po-delu-shell-muted: #73736b;

    /* Form field control tokens */
    --po-delu-input-bg: #ffffff;
    --po-delu-input-border: #d4d4cf;
    --po-delu-input-text: #232320;
    --po-delu-input-focus-border: #0f766e;
    --po-delu-input-focus-ring: rgba(15, 118, 110, 0.18);

    /* Aurora Mesh background tokens - Light */
    --po-delu-aurora-1: radial-gradient(circle, rgba(189, 226, 216, 0.75) 0%, rgba(189, 226, 216, 0.4) 35%, rgba(189, 226, 216, 0.12) 55%, transparent 70%);
    --po-delu-aurora-2: radial-gradient(circle, rgba(255, 225, 191, 0.8) 0%, rgba(255, 225, 191, 0.45) 35%, rgba(255, 225, 191, 0.15) 55%, transparent 70%);
    --po-delu-aurora-3: radial-gradient(circle, rgba(199, 236, 227, 0.7) 0%, rgba(199, 236, 227, 0.35) 35%, rgba(199, 236, 227, 0.1) 55%, transparent 70%);
    --po-delu-aurora-4: radial-gradient(circle, rgba(254, 215, 170, 0.6) 0%, rgba(254, 215, 170, 0.35) 35%, rgba(254, 215, 170, 0.08) 55%, transparent 70%);
    --po-delu-auth-card-bg: #ffffff;
    --po-delu-auth-card-border: #e5e5e1;
    --po-delu-auth-card-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
    --po-delu-auth-card-highlight: rgba(255, 255, 255, 0.9);
    --po-delu-auth-alert-bg: rgba(185, 28, 28, 0.06);
    --po-delu-auth-alert-border: rgba(185, 28, 28, 0.25);
    --po-delu-auth-alert-text: #b91c1c;
    --po-delu-auth-warning-bg: rgba(180, 83, 9, 0.10);
    --po-delu-auth-warning-border: rgba(180, 83, 9, 0.35);
    --po-delu-auth-warning-text: #92400e;

    /* Semantics & Status - Light */
    --po-delu-danger: #b91c1c;
    --po-delu-danger-soft: rgba(185, 28, 28, 0.08);
    --po-delu-danger-hover: #991b1b;
    --po-delu-on-danger: #ffffff;
    --po-delu-success: #15803d;
    --po-delu-success-soft: rgba(21, 128, 61, 0.10);
    --po-delu-warning: #b45309;
    --po-delu-warning-soft: rgba(180, 83, 9, 0.10);

    /* Radii & Shadows */
    --po-delu-radius-xs: 4px;
    --po-delu-radius-sm: 6px;
    --po-delu-radius-md: 8px;
    --po-delu-radius-lg: 10px;
    --po-delu-radius-full: 9999px;
    --po-delu-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --po-delu-shadow-card: none;
    --po-delu-shadow-raised: 0 2px 8px rgba(23, 23, 21, 0.08);
    --po-delu-shadow-overlay: 0 16px 40px rgba(23, 23, 21, 0.16);
    --po-delu-shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.10);
    --po-delu-shadow-header: 0 -0.25rem 1rem rgba(23, 23, 21, 0.12);
    --po-delu-surface-raised: #ffffff;
    --po-delu-surface-overlay: #ffffff;
    --po-delu-overlay-bg: rgba(23, 23, 21, 0.52);
    --po-delu-surface-accent-panel: linear-gradient(135deg, #ffffff 0%, #f7fbfb 100%);
    --po-delu-border-accent-panel: #cbdedc;
    --po-delu-recording-ring: rgba(239, 68, 68, 0.7);
    --po-delu-recording-ring-end: rgba(220, 38, 38, 0);

    /* Spacing scale */
    --po-delu-space-1: 4px;
    --po-delu-space-2: 8px;
    --po-delu-space-3: 12px;
    --po-delu-space-4: 16px;
    --po-delu-space-5: 24px;
    --po-delu-space-6: 32px;

    /* Typography */
    --po-delu-text-xs: 0.78rem;
    --po-delu-text-sm: 0.86rem;
    --po-delu-text-md: 0.93rem;
    --po-delu-text-lg: 1rem;
    --po-delu-text-xl: 1.35rem;
    --po-delu-font-weight-medium: 500;
    --po-delu-font-weight-semibold: 650;

    /* Motion */
    --po-delu-motion-fast: 150ms ease;
    --po-delu-motion-base: 200ms ease;

    /* Z-index layers */
    --po-delu-z-header: 100;
    --po-delu-z-dropdown: 500;
    --po-delu-z-modal: 1000;

    /* Focus */
    --po-delu-focus-ring: 0 0 0 2px var(--po-delu-surface), 0 0 0 4px var(--po-delu-teal);
}

html {
    color-scheme: light;
    font-size: 14px;
}

html.dark,
[data-theme="dark"] {
    color-scheme: dark;

    /* Accents */
    --po-delu-coral: #f3a24d;
    --po-delu-coral-soft: rgba(243, 162, 77, 0.15);
    --po-delu-teal: #0d9488;
    --po-delu-teal-text: #5fd0c4;
    --po-delu-teal-soft: rgba(45, 212, 191, 0.12);
    --po-delu-teal-hover: #14b8a6;
    --po-delu-amber: #f3a24d;
    --po-delu-amber-deep: #d8872f;

    /* Заливка акцентных контролов и текст на ней (контраст AA на 12px) */
    --po-delu-accent-fill: #0f766e;
    --po-delu-accent-fill-hover: #115e59;
    --po-delu-on-accent: #ffffff;

    /* Neutrals & Surfaces - Dark */
    --po-delu-graphite: #e2e2dd;
    --po-delu-text: #e2e2dd;
    --po-delu-text-strong: #f5f5f2;
    --po-delu-muted: #8a8a82;
    --po-delu-border: #2d2d2a;
    --po-delu-border-strong: #3a3a36;
    --po-delu-surface: #161615;
    --po-delu-surface-card: #1e1e1c;
    --po-delu-surface-hover: #262624;
    --po-delu-surface-stripe: #1a1a18;

    /* Shell (Header) - Dark */
    --po-delu-shell: #1e1e1c;
    --po-delu-shell-surface: #262624;
    --po-delu-shell-border: #2d2d2a;
    --po-delu-shell-text: #f5f5f2;
    --po-delu-shell-muted: #8a8a82;

    /* Form field control tokens */
    --po-delu-input-bg: #1a1a18;
    --po-delu-input-border: #3a3a36;
    --po-delu-input-text: #e2e2dd;
    --po-delu-input-focus-border: #0d9488;
    --po-delu-input-focus-ring: rgba(13, 148, 136, 0.28);

    /* Aurora Mesh background tokens - Dark */
    --po-delu-aurora-1: radial-gradient(circle, rgba(30, 109, 92, 0.55) 0%, rgba(30, 109, 92, 0.3) 30%, rgba(30, 109, 92, 0.1) 55%, transparent 70%);
    --po-delu-aurora-2: radial-gradient(circle, rgba(243, 162, 77, 0.3) 0%, rgba(243, 162, 77, 0.15) 35%, rgba(243, 162, 77, 0.05) 55%, transparent 65%);
    --po-delu-aurora-3: radial-gradient(circle, rgba(47, 142, 122, 0.45) 0%, rgba(47, 142, 122, 0.22) 35%, rgba(47, 142, 122, 0.06) 55%, transparent 70%);
    --po-delu-aurora-4: radial-gradient(circle, rgba(204, 116, 29, 0.25) 0%, rgba(204, 116, 29, 0.12) 35%, rgba(204, 116, 29, 0.04) 55%, transparent 70%);
    --po-delu-auth-card-bg: #1e1e1c;
    --po-delu-auth-card-border: #2d2d2a;
    --po-delu-auth-card-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    --po-delu-auth-card-highlight: rgba(255, 255, 255, 0.5);
    --po-delu-auth-alert-bg: rgba(248, 113, 113, 0.10);
    --po-delu-auth-alert-border: rgba(248, 113, 113, 0.3);
    --po-delu-auth-alert-text: #fca5a5;
    --po-delu-auth-warning-bg: rgba(251, 191, 36, 0.10);
    --po-delu-auth-warning-border: rgba(251, 191, 36, 0.35);
    --po-delu-auth-warning-text: #fde68a;

    /* Semantics & Status - Dark */
    --po-delu-danger: #f87171;
    --po-delu-danger-soft: rgba(248, 113, 113, 0.12);
    --po-delu-danger-hover: #fca5a5;
    --po-delu-on-danger: #1c1c1a;
    --po-delu-success: #4ade80;
    --po-delu-success-soft: rgba(74, 222, 128, 0.12);
    --po-delu-warning: #fbbf24;
    --po-delu-warning-soft: rgba(251, 191, 36, 0.12);

    /* Radii & Shadows - Dark */
    --po-delu-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --po-delu-shadow-card: none;
    --po-delu-shadow-raised: 0 4px 14px rgba(0, 0, 0, 0.28);
    --po-delu-shadow-overlay: 0 16px 40px rgba(0, 0, 0, 0.52);
    --po-delu-shadow-dropdown: 0 8px 24px rgba(0, 0, 0, 0.5);
    --po-delu-shadow-header: 0 -0.25rem 1rem rgba(0, 0, 0, 0.45);
    --po-delu-surface-raised: #242422;
    --po-delu-surface-overlay: #1e1e1c;
    --po-delu-overlay-bg: rgba(0, 0, 0, 0.62);
    --po-delu-surface-accent-panel: linear-gradient(135deg, #1c2220 0%, #161a19 100%);
    --po-delu-border-accent-panel: #2e3633;
    --po-delu-recording-ring: rgba(239, 68, 68, 0.7);
    --po-delu-recording-ring-end: rgba(220, 38, 38, 0);
}

body {
    color: var(--po-delu-text);
    background: var(--po-delu-surface);
    font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    text-rendering: optimizeLegibility;
}

:where(a, button, input, select, textarea, [role="button"]):focus-visible {
    box-shadow: var(--po-delu-focus-ring);
    outline: none;
}

:where(button, input, select, textarea):disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

code,
kbd,
pre,
samp {
    font-family: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    border: 0;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.icon {
    color: currentColor;
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: -0.2em;
}

.page-heading {
    align-items: center;
    display: flex;
    font-size: 1.35rem;
    font-weight: 650;
    gap: 0.65rem;
    letter-spacing: -0.015em;
    margin: 0 0 0.85rem;
}

.page-heading__icon {
    color: var(--po-delu-teal);
}

.button-icon,
a.button-icon {
    align-items: center;
    background: var(--po-delu-accent-fill);
    border: 1px solid var(--po-delu-accent-fill);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    color: var(--po-delu-on-accent);
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    gap: 0.45rem;
    height: 2.55rem;
    min-height: 2.55rem;
    justify-content: center;
    padding: 0 1.15rem;
    touch-action: manipulation;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color var(--po-delu-motion-fast), border-color var(--po-delu-motion-fast), color var(--po-delu-motion-fast), box-shadow var(--po-delu-motion-fast);
}

.button-icon:hover,
.button-icon:focus-visible,
a.button-icon:hover,
a.button-icon:focus-visible {
    background: var(--po-delu-accent-fill-hover);
    border-color: var(--po-delu-accent-fill-hover);
    color: var(--po-delu-on-accent);
}

.button-icon .icon {
    vertical-align: 0;
    flex: 0 0 auto;
}

.button-icon--secondary,
a.button-icon--secondary {
    background: var(--po-delu-surface-card) !important;
    border-color: var(--po-delu-border-strong) !important;
    color: var(--po-delu-text) !important;
}

.button-icon--secondary:hover,
.button-icon--secondary:focus-visible,
a.button-icon--secondary:hover,
a.button-icon--secondary:focus-visible {
    background: var(--po-delu-surface-hover) !important;
    border-color: var(--po-delu-border-strong) !important;
    color: var(--po-delu-text-strong) !important;
}

.button-icon--danger,
a.button-icon--danger {
    background: var(--po-delu-danger-soft) !important;
    border-color: var(--po-delu-danger) !important;
    color: var(--po-delu-danger) !important;
}

.button-icon--danger:hover,
.button-icon--danger:focus-visible,
a.button-icon--danger:hover,
a.button-icon--danger:focus-visible {
    background: var(--po-delu-danger-soft) !important;
    border-color: var(--po-delu-danger-hover) !important;
    color: var(--po-delu-danger-hover) !important;
}

.button-icon--accent,
a.button-icon--accent {
    background: var(--po-delu-accent-fill) !important;
    border-color: var(--po-delu-accent-fill) !important;
    color: var(--po-delu-on-accent) !important;
}

.button-icon--accent:hover,
.button-icon--accent:focus-visible,
a.button-icon--accent:hover,
a.button-icon--accent:focus-visible {
    background: var(--po-delu-accent-fill-hover) !important;
    border-color: var(--po-delu-accent-fill-hover) !important;
    color: var(--po-delu-on-accent) !important;
}

.button-icon--text,
a.button-icon--text {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--po-delu-teal-text) !important;
    padding: 0 0.5rem !important;
    box-shadow: none !important;
}

.button-icon--text:hover,
.button-icon--text:focus-visible,
a.button-icon--text:hover,
a.button-icon--text:focus-visible {
    background: var(--po-delu-surface-hover) !important;
    border-color: transparent !important;
    color: var(--po-delu-text-strong) !important;
}

.button-icon--icon-only,
a.button-icon--icon-only {
    min-width: 2.55rem;
    padding: 0 0.65rem;
}

/* Common form input tokens for all pages and dialogs */
input[type="text"],
input[type="search"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
select,
textarea {
    background: var(--po-delu-input-bg);
    border: 1px solid var(--po-delu-input-border);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    color: var(--po-delu-input-text);
    font: inherit;
    padding: 0.38rem 0.65rem;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
    border-color: var(--po-delu-input-focus-border);
    box-shadow: 0 0 0 3px var(--po-delu-input-focus-ring);
    outline: none;
}

.account-panel {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-lg);
    box-shadow: var(--po-delu-shadow-card);
    display: grid;
    gap: 1rem;
    max-width: 38rem;
    padding: 1.5rem;
}

.account-panel h2 {
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    margin: 0;
}

.account-panel dl {
    margin: 0;
}

.account-panel dt {
    color: var(--po-delu-muted);
    font-size: 0.8rem;
    font-weight: 650;
}

.account-panel dd {
    color: var(--po-delu-text-strong);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0.2rem 0 0;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.account-panel form {
    display: grid;
    gap: 1rem;
}

.account-panel label {
    display: grid;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 0.35rem;
}

.account-panel input[type="password"] {
    border: 1px solid var(--po-delu-input-border);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    color: var(--po-delu-input-text);
    background: var(--po-delu-input-bg);
    height: 38px;
    padding: 0 0.85rem;
    font-size: 0.95rem;
}

.account-panel input[type="password"]:focus {
    border-color: var(--po-delu-input-focus-border);
    box-shadow: 0 0 0 3px var(--po-delu-input-focus-ring);
    outline: none;
}

.account-panel button[type="submit"] {
    align-items: center;
    background: var(--po-delu-teal);
    border: 1px solid var(--po-delu-teal);
    border-radius: var(--po-delu-radius-sm);
    color: var(--po-delu-on-accent);
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    font-size: 0.88rem;
    gap: 0.5rem;
    height: 38px;
    justify-content: center;
    justify-self: start;
    min-width: 8rem;
    padding: 0 1.25rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.account-panel button[type="submit"]:hover,
.account-panel button[type="submit"]:focus-visible {
    background: var(--po-delu-teal-hover);
    border-color: var(--po-delu-teal-hover);
}

.work-page {
    display: grid;
    gap: 1rem;
}

.work-page__heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.work-page__eyebrow {
    color: var(--po-delu-muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.work-page h1,
.work-page h2,
.work-page p {
    margin-top: 0;
}

.work-page h1 {
    font-size: 1.9rem;
    margin-bottom: 0;
}

.work-page h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.work-page__heading-icon {
    color: var(--po-delu-teal);
}

.work-status,
.work-empty,
.work-list-section,
.work-action-panel,
.work-project-row {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    padding: 1rem;
    color: var(--po-delu-text);
}

.work-status {
    align-items: flex-start;
    display: flex;
    gap: 0.7rem;
}

.work-status .icon {
    color: var(--po-delu-teal);
}

.work-status p,
.work-empty p {
    color: var(--po-delu-muted);
    line-height: 1.5;
    margin-bottom: 0;
}

.work-section-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.work-muted,
.work-project-row small,
.work-task-list span,
.work-task-card small {
    color: var(--po-delu-muted);
}

.work-count {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
}

.work-task-list,
.work-card-list {
    display: grid;
    gap: 0.6rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.work-task-list li {
    align-items: baseline;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.work-task-list--full {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    padding: 1rem;
}

.work-task-list--full li {
    border-bottom: 1px solid var(--po-delu-border);
    padding-bottom: 0.6rem;
}

.work-project-list {
    display: grid;
    gap: 0.65rem;
}

.work-action-panel {
    display: grid;
    gap: 1rem;
}

.work-task-create-panel {
    background: var(--po-delu-surface-accent-panel);
    border-color: var(--po-delu-border-accent-panel);
}

html.dark .work-task-create-panel,
[data-theme="dark"] .work-task-create-panel {
    background: var(--po-delu-surface-accent-panel);
    border-color: var(--po-delu-border-accent-panel);
}

.work-action-panel__heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.work-action-panel__heading h2 {
    margin-bottom: 0;
}

.work-action-panel__badge {
    background: var(--po-delu-teal-soft);
    border: 1px solid var(--po-delu-border);
    border-radius: 999px;
    color: var(--po-delu-teal);
    font-size: 0.78rem;
    font-weight: 750;
    padding: 0.3rem 0.55rem;
    white-space: nowrap;
}

.work-form-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-form-field {
    color: var(--po-delu-text);
    display: grid;
    font-size: 0.85rem;
    font-weight: 650;
    gap: 0.35rem;
    min-width: 0;
}

.work-form-field--wide {
    grid-column: 1 / -1;
}

.work-form-field input,
.work-form-field select,
.work-form-field textarea {
    background: var(--po-delu-input-bg);
    border: 1px solid var(--po-delu-input-border);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    color: var(--po-delu-input-text);
    font: inherit;
    font-size: 0.92rem;
    height: 2.55rem;
    min-height: 2.55rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select option {
    background: var(--po-delu-input-bg);
    color: var(--po-delu-input-text);
}

.work-form-field textarea {
    min-height: 5.5rem;
    resize: vertical;
    height: auto;
}

.work-form-field--checkbox {
    align-items: center;
    align-self: end;
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    display: inline-flex;
    flex-direction: row;
    gap: 0.55rem;
    min-height: 2.55rem;
    padding: 0.55rem 0.65rem;
}

.work-form-field--checkbox input {
    accent-color: var(--po-delu-teal);
    flex: 0 0 auto;
    min-height: 1.05rem;
    width: 1.05rem;
}

.work-form-field input:disabled,
.work-form-field select:disabled,
.work-form-field textarea:disabled {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-muted);
    cursor: not-allowed;
}

.work-form-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-start;
}

.work-helper-text {
    color: var(--po-delu-muted);
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.4;
}

.work-project-row {
    align-items: center;
    color: var(--po-delu-text);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    text-decoration: none;
}

.work-project-row span:first-child {
    display: grid;
    gap: 0.2rem;
}

.work-project-row__meta {
    color: var(--po-delu-teal);
    font-size: 0.8rem;
    font-weight: 700;
}

.work-back-link {
    color: var(--po-delu-teal);
    font-weight: 600;
}

.work-command-message {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-left: 3px solid var(--po-delu-teal);
    color: var(--po-delu-text);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.work-command-message,
[role="status"] {
    animation: po-delu-soft-appear 180ms ease-out;
}

@keyframes po-delu-soft-appear {
    from {
        opacity: 0;
        transform: translateY(-0.2rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.work-board {
    display: grid;
    gap: 0.75rem;
    grid-auto-columns: minmax(16rem, 1fr);
    grid-auto-flow: column;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.work-board-column-picker {
    display: none;
}

.work-board__column {
    background: var(--po-delu-surface);
    border-top: 3px solid var(--po-delu-teal);
    border-radius: var(--po-delu-radius-sm);
    box-shadow: inset 0 0 0 1px var(--po-delu-border);
    min-height: 16rem;
    padding: 0.85rem;
}

.work-board__column h2 {
    display: flex;
    justify-content: space-between;
}

.work-board__column h2 span {
    color: var(--po-delu-muted);
    font-size: 0.9rem;
}

.work-task-card {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    box-shadow: var(--po-delu-shadow-sm);
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
    color: var(--po-delu-text);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.work-task-card[draggable="true"] {
    cursor: grab;
    user-select: none;
}

.work-task-card[draggable="true"]:active {
    cursor: grabbing;
}

.work-task-card--dragging {
    opacity: 0.45;
    transform: scale(0.98);
}

.work-board__column--drag-over {
    background: var(--po-delu-surface-hover);
    box-shadow: inset 0 0 0 2px var(--po-delu-teal);
    outline: 2px dashed var(--po-delu-teal);
    outline-offset: -3px;
}

.work-task-card:focus-within,
.work-task-card:hover {
    border-color: var(--po-delu-teal);
    box-shadow: var(--po-delu-shadow-card);
}

.work-card-actions {
    border-top: 1px solid var(--po-delu-border);
    display: grid;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding-top: 0.6rem;
}

.work-card-actions label {
    color: var(--po-delu-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.work-card-actions input,
.work-card-actions select {
    min-width: 0;
    width: 100%;
}

.work-card-actions button {
    justify-content: center;
    margin-top: 0.2rem;
}

.work-task-card__header {
    align-items: flex-start;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.work-task-card__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.65rem;
}

.work-task-card__due--overdue {
    color: var(--po-delu-danger) !important;
    font-weight: 650;
}

.work-task-card__blocker {
    background: var(--po-delu-warning-soft);
    border-radius: var(--po-delu-radius-xs);
    color: var(--po-delu-warning);
    font-size: 0.74rem;
    font-weight: 650;
    padding: 0.1rem 0.4rem;
}

.work-task-card__case-link {
    background: var(--po-delu-teal-soft);
    border-radius: var(--po-delu-radius-xs);
    color: var(--po-delu-teal-text);
    font-size: 0.75rem;
    font-weight: 650;
    padding: 0.1rem 0.45rem;
    text-decoration: none;
}

.work-priority-badge {
    border-radius: var(--po-delu-radius-full);
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.2;
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
}

.work-priority-badge--critical {
    background: var(--po-delu-danger-soft);
    color: var(--po-delu-danger);
}

.work-priority-badge--high {
    background: var(--po-delu-warning-soft);
    color: var(--po-delu-warning);
}

.work-priority-badge--normal,
.work-priority-badge--low {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-muted);
}

.work-priority-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.2;
    padding: 0.15rem 1.25rem 0.15rem 0.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23718096' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    background-size: 8px 5px;
    transition: border-color 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

.work-priority-select:hover:not(:disabled) {
    border-color: currentColor;
    filter: brightness(0.96);
}

.work-priority-select:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--po-delu-teal);
}

.work-priority-select:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.work-priority-select option {
    background: var(--po-delu-surface-card);
    color: var(--po-delu-text);
    font-weight: normal;
    padding: 0.35rem 0.5rem;
}

.work-card-menu {
    border-top: 1px solid var(--po-delu-border);
    margin-top: 0.25rem;
    padding-top: 0.35rem;
}

.work-card-menu__toggle {
    align-items: center;
    color: var(--po-delu-muted);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 650;
    gap: 0.35rem;
    list-style: none;
    padding: 0.15rem 0.35rem;
    border-radius: var(--po-delu-radius-xs);
    user-select: none;
}

.work-card-menu__toggle::-webkit-details-marker {
    display: none;
}

.work-card-menu__toggle:hover,
.work-card-menu__toggle:focus-visible {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-text-strong);
}

.work-my-day-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.work-my-day-stat {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
}

.work-my-day-stat--danger {
    border-color: var(--po-delu-danger);
    background: var(--po-delu-danger-soft);
}

.work-my-day-stat__label {
    color: var(--po-delu-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.work-my-day-stat__value {
    color: var(--po-delu-text-strong);
    font-size: 1.45rem;
    font-weight: 750;
    line-height: 1.1;
}

.work-my-day-stat--danger .work-my-day-stat__value {
    color: var(--po-delu-danger);
}

.work-my-day-list {
    gap: 0.65rem;
}

.work-my-day-list li.work-my-day-item {
    align-items: stretch;
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    display: grid;
    gap: 0.45rem;
    justify-content: stretch;
    padding: 0.75rem 0.85rem;
}

.work-my-day-item__main {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
}

.work-my-day-item__title {
    color: var(--po-delu-text-strong);
    font-weight: 700;
}

.work-my-day-item__badges {
    align-items: center;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.work-my-day-item__meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
}

.work-my-day-item__due {
    color: var(--po-delu-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.work-my-day-item__due--overdue {
    color: var(--po-delu-danger);
    font-weight: 700;
}

.work-my-day-item__due--today {
    color: var(--po-delu-warning);
    font-weight: 700;
}

.work-my-day-item__due--muted {
    color: var(--po-delu-muted);
}

.work-my-day-item__action {
    height: 2rem !important;
    min-height: 2rem !important;
    font-size: 0.8rem !important;
    padding: 0 0.75rem !important;
    margin-left: auto;
}

.work-board__load-more {
    justify-self: start;
}

.work-task-card strong a {
    color: var(--po-delu-text-strong);
}

.work-task-details {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    color: var(--po-delu-text);
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    margin: 0;
}

.work-task-details div {
    border-bottom: 1px solid var(--po-delu-border);
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem 1rem;
}

.work-task-details dt,
.work-field span {
    color: var(--po-delu-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.work-task-details dd {
    margin: 0;
}

.work-task-description {
    border-left: 3px solid var(--po-delu-teal);
    padding: 0.2rem 0 0.2rem 1rem;
}

.work-task-description p {
    line-height: 1.55;
    margin-bottom: 0;
    white-space: pre-wrap;
}

.work-collaboration {
    border-top: 1px solid var(--po-delu-border);
    display: grid;
    gap: 0.85rem;
    padding-top: 1rem;
}

.work-collaboration__heading {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.work-collaboration__heading h2,
.work-collaboration__comments h3,
.work-collaboration__attachments h3 {
    margin: 0;
}

.work-collaboration__heading h2 {
    font-size: 1.15rem;
}

.work-collaboration__comments h3,
.work-collaboration__attachments h3 {
    font-size: 1rem;
}

.work-collaboration__layout {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr);
}

.work-collaboration__comments,
.work-collaboration__attachments {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.work-field {
    display: grid;
    gap: 0.35rem;
}

.work-field textarea {
    box-sizing: border-box;
    min-height: 6rem;
    resize: vertical;
    width: 100%;
}

.work-comment-context {
    align-items: center;
    background: var(--po-delu-surface-hover);
    border-radius: var(--po-delu-radius-sm);
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.55rem 0.75rem;
}

.work-comment-list,
.work-attachment-list {
    display: grid;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.work-comment {
    border-top: 1px solid var(--po-delu-border);
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem 0;
}

.work-comment__meta {
    align-items: baseline;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.work-comment__meta time,
.work-comment__reply-reference,
.work-attachment-list span {
    color: var(--po-delu-muted);
    font-size: 0.8rem;
}

.work-comment__body,
.work-comment__tombstone {
    line-height: 1.5;
    margin-bottom: 0;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.work-comment__tombstone {
    color: var(--po-delu-muted);
    font-style: italic;
}

.work-comment__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.work-text-command {
    background: transparent;
    border: 0;
    color: var(--po-delu-teal);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.work-text-command--danger {
    color: var(--po-delu-danger);
}

.work-text-command:disabled {
    cursor: default;
    opacity: 0.55;
}

.work-voice-composer,
.work-image-composer {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    color: var(--po-delu-text);
    display: grid;
    gap: 0.65rem;
    margin-top: 0.8rem;
    padding: 0.85rem;
}

.work-voice-composer[data-voice-state="recording"] {
    border-color: var(--po-delu-danger);
    box-shadow: 0 0 0 1px var(--po-delu-danger-soft), 0 2px 8px var(--po-delu-danger-soft);
}

.work-voice-composer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.work-voice-recording-indicator {
    display: none;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--po-delu-danger);
    font-variant-numeric: tabular-nums;
}

.work-voice-composer[data-voice-state="recording"] .work-voice-recording-indicator {
    display: inline-flex;
}

.work-voice-recording-indicator__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--po-delu-danger);
    box-shadow: 0 0 0 0 var(--po-delu-recording-ring);
    animation: voice-recording-pulse 1.4s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes voice-recording-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 var(--po-delu-recording-ring);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px var(--po-delu-recording-ring-end);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 var(--po-delu-recording-ring-end);
    }
}

.work-voice-composer[data-voice-state="uploaded"],
.work-voice-composer[data-voice-state="stopped"] {
    border-color: var(--po-delu-teal);
}

.work-voice-composer__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.work-image-composer__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.work-image-composer__selector {
    color: var(--po-delu-teal);
    cursor: pointer;
    display: grid;
    font-weight: 600;
    gap: 0.25rem;
}

.work-image-composer__selector input {
    color: var(--po-delu-text);
    font: inherit;
    max-width: 100%;
}

.work-image-composer__selector input:disabled {
    cursor: default;
    opacity: 0.55;
}

.work-attachment-list li {
    align-items: start;
    border-top: 1px solid var(--po-delu-border);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 0.75rem 0;
}

.work-attachment-list__details {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.work-attachment-list strong {
    overflow-wrap: anywhere;
}

.work-attachment-list__actions {
    align-items: end;
    display: grid;
    gap: 0.45rem;
    justify-items: end;
}

.work-attachment-download {
    color: var(--po-delu-teal);
    flex: 0 0 auto;
    font-weight: 600;
}

.work-attachment-player {
    max-width: 18rem;
    width: 18rem;
}

.work-voice-comment__player-row {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    position: relative;
    max-width: 100%;
}

.work-comment-menu {
    position: relative;
    display: inline-block;
}

.work-comment-menu__toggle {
    align-items: center;
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-xs);
    color: var(--po-delu-muted);
    cursor: pointer;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    list-style: none;
    padding: 0;
    user-select: none;
    width: 2rem;
}

.work-comment-menu__toggle::-webkit-details-marker {
    display: none;
}

.work-comment-menu__toggle:hover,
.work-comment-menu__toggle:focus-visible {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-text-strong);
}

.work-comment-menu__dropdown {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    box-shadow: var(--po-delu-shadow-dropdown);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 8rem;
    padding: 0.3rem;
    position: absolute;
    right: 0;
    top: calc(100% + 0.25rem);
    z-index: 65;
}

.work-comment-menu__item {
    align-items: center;
    background: transparent;
    border: none;
    border-radius: var(--po-delu-radius-xs);
    color: var(--po-delu-text);
    cursor: pointer;
    display: flex;
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.work-comment-menu__item:hover,
.work-comment-menu__item:focus-visible {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-text-strong);
}

.work-comment-menu__item--danger {
    color: var(--po-delu-danger);
}

.work-comment-menu__item--danger:hover,
.work-comment-menu__item--danger:focus-visible {
    background: var(--po-delu-danger-soft);
    color: var(--po-delu-danger);
}

.work-attachment-preview {
    border: 1px solid var(--po-delu-border);
    border-radius: 6px;
    max-height: 8rem;
    max-width: 12rem;
    object-fit: contain;
}

.work-attachment-list__command-row {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.registry-assignment-panel {
    display: grid;
    gap: 1rem;
}

.registry-assignment-summary {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.registry-assignment-summary > section {
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    margin: 0;
    padding: 0.9rem;
}

.registry-assignment-summary h3 {
    font-size: 0.95rem;
    margin: 0 0 0.65rem;
}

.registry-assignment-list {
    display: grid;
    gap: 0.55rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.registry-assignment-list li {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    display: grid;
    gap: 0.2rem;
    padding: 0.65rem 0.75rem;
    color: var(--po-delu-text);
}

.registry-assignment-list strong {
    overflow-wrap: anywhere;
}

.registry-assignment-list small {
    color: var(--po-delu-muted);
    font-size: 0.78rem;
}

.app-shell__content .registry-scope-summary,
.registry-scope-summary {
    align-items: center;
    background: var(--po-delu-surface-raised);
    border: 1px solid var(--po-delu-border);
    border-left: 3px solid var(--po-delu-teal);
    border-radius: var(--po-delu-radius-md);
    box-shadow: var(--po-delu-shadow-raised);
    color: var(--po-delu-text);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 0 0.65rem !important;
    padding: 0.65rem 1rem !important;
}

.registry-scope-summary h2,
.registry-scope-summary p {
    margin: 0;
}

.registry-scope-summary h2 {
    font-size: 0.95rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.registry-scope-summary p {
    color: var(--po-delu-muted);
    font-size: 0.8rem;
    line-height: 1.35;
    margin-top: 0.15rem;
    max-width: 48rem;
}

.registry-scope-summary__counts {
    display: flex;
    flex: 0 0 auto;
    gap: 0.5rem;
    margin: 0;
}

.registry-scope-summary__counts div {
    align-items: center;
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    display: flex;
    gap: 0.65rem;
    height: 52px;
    justify-content: space-between;
    min-width: 9rem;
    padding: 0 0.9rem;
    text-align: left;
    width: 8rem;
}

.registry-scope-summary__counts dt {
    color: var(--po-delu-muted);
    font-size: 0.76rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
}

.registry-scope-summary__counts dd {
    color: var(--po-delu-text-strong);
    font-size: 1.45rem;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    line-height: 1;
    margin: 0;
}

.registry-workbench {
    display: grid;
    gap: 0.9rem;
}

.app-shell__content .registry-search-section,
.registry-search-section {
    display: grid;
    gap: 0.45rem;
    margin: 0 0 0.65rem !important;
    padding: 0.65rem 0.95rem !important;
}

.registry-search-section h2 {
    font-size: 0.95rem;
    font-weight: 750;
    margin: 0;
}

.registry-search-form {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0;
}

.registry-search-form label {
    font-size: 0.8rem;
    gap: 0.25rem;
    margin: 0;
}

.registry-search-form input {
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    padding: 0 0.75rem;
    font-size: 0.88rem;
    border-radius: var(--po-delu-radius-sm);
}

.registry-search-form button {
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    padding: 0 1.15rem;
    font-size: 0.85rem;
    border-radius: var(--po-delu-radius-sm);
}

.registry-create-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.85fr);
}

.registry-create-card {
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    display: grid !important;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr);
    padding: 1.15rem;
}

.registry-create-card h3 {
    color: var(--po-delu-text-strong);
    font-size: 0.98rem;
    margin: 0 0 0.5rem;
}

.client-summary,
.case-summary {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-lg);
    box-shadow: var(--po-delu-shadow-card);
    margin-bottom: 0.85rem;
    padding: 1.15rem 1.25rem;
}

.client-summary h2,
.case-summary h2 {
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: -0.015em;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.client-summary__header,
.case-summary__header {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.client-summary__header h2,
.case-summary__header h2 {
    margin: 0;
}

.client-delete-card {
    background: var(--po-delu-danger-soft);
    border: 1px solid var(--po-delu-danger);
    border-radius: var(--po-delu-radius-md);
    margin-top: 1rem;
    padding: 1rem;
}

.client-delete-card__header {
    align-items: center;
    color: var(--po-delu-danger);
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.client-delete-card__header h3 {
    font-size: 1rem;
    margin: 0;
}

.client-delete-card__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.client-delete-card__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.template-import-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.template-source-path {
    align-items: center;
    display: flex;
    gap: 0.45rem;
    margin: 0.75rem 0 0;
    word-break: break-all;
}

.template-source-path .icon {
    color: var(--po-delu-teal);
}

.template-folder-picker {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border-strong);
    border-radius: var(--po-delu-radius-sm);
    margin-top: 1rem;
    padding: 1rem;
}

.template-folder-picker__header {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.template-folder-picker__header h3 {
    font-size: 1rem;
    margin: 0;
}

.template-folder-picker__current {
    font-size: 0.85rem;
    margin: 0 0 0.5rem;
    word-break: break-all;
}

.template-folder-picker__manual {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
}

.template-folder-picker__manual input {
    flex: 1 1 auto;
}

.template-upload {
    border: 1px dashed var(--po-delu-border-strong);
    border-radius: var(--po-delu-radius-sm);
    margin-top: 1rem;
    padding: 0.85rem;
}

.template-upload .work-helper-text {
    margin: 0.5rem 0 0;
}

.template-folder-picker__list {
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    list-style: none;
    margin: 0 0 0.75rem;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.25rem;
}

.template-folder-picker__entry {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-radius: var(--po-delu-radius-sm);
    color: var(--po-delu-text) !important;
    cursor: pointer;
    display: flex !important;
    font-family: inherit;
    font-size: 0.9rem;
    gap: 0.5rem;
    height: auto !important;
    min-height: 2.2rem !important;
    justify-content: flex-start !important;
    padding: 0.4rem 0.5rem !important;
    text-align: left;
    width: 100%;
}

.template-folder-picker__entry:hover,
.template-folder-picker__entry:focus-visible {
    background: var(--po-delu-surface-hover) !important;
}

.template-folder-picker__entry span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-folder-picker__entry .icon {
    color: var(--po-delu-teal);
    flex: 0 0 auto;
}

.template-folder-picker__empty {
    color: var(--po-delu-muted);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.template-folder-picker__error {
    color: var(--po-delu-danger);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.template-folder-picker__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.client-summary dl,
.case-summary dl {
    align-items: center;
    display: grid;
    gap: 0.45rem 1.25rem;
    grid-template-columns: max-content minmax(0, 1fr);
    margin: 0;
}

.client-summary dt,
.case-summary dt {
    color: var(--po-delu-muted);
    font-size: 0.78rem;
    font-weight: 650;
    margin: 0;
}

.client-summary dd,
.case-summary dd {
    color: var(--po-delu-text-strong);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    margin: 0;
}

.client-assets-total-card {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    box-shadow: var(--po-delu-shadow-sm);
    margin-top: 1rem;
    padding: 1rem 1.25rem;
}

.client-assets-total-card h2 {
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    margin: 0 0 0.4rem;
}

.client-assets-total-card__amount {
    color: var(--po-delu-text-strong);
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    line-height: 1.2;
    margin: 0.25rem 0 0.5rem;
}

.client-tabs {
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem;
}

.client-tab {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--po-delu-radius-sm);
    color: var(--po-delu-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    text-decoration: none;
    transition: background-color var(--po-delu-motion-fast), color var(--po-delu-motion-fast), box-shadow var(--po-delu-motion-fast);
}

.client-tab:hover,
.client-tab:focus-visible {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-text-strong);
}

.client-tab--active {
    background: var(--po-delu-surface-card);
    box-shadow: var(--po-delu-shadow-sm);
    color: var(--po-delu-teal);
    font-weight: 650;
}

.client-tabs a.client-tab {
    text-decoration: none;
}

/* Сегментированный переключатель стадий: общий паттерн для администрирования
   и карточки дела (одна форма контрола — один источник стилей). */
.template-catalog-stage-tabs {
    align-items: center;
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1.25rem;
    padding: 0.25rem;
}

.stage-tab {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--po-delu-radius-sm);
    color: var(--po-delu-muted);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 650;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    transition: background-color var(--po-delu-motion-fast), color var(--po-delu-motion-fast), box-shadow var(--po-delu-motion-fast);
}

.stage-tab:hover,
.stage-tab:focus-visible {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-text-strong);
}

.stage-tab--active {
    background: var(--po-delu-surface-card);
    box-shadow: var(--po-delu-shadow-sm);
    color: var(--po-delu-teal);
}

.stage-tab__count {
    background: var(--po-delu-surface-stripe);
    border-radius: var(--po-delu-radius-md);
    color: var(--po-delu-muted);
    display: inline-block;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    font-weight: 650;
    padding: 0.1rem 0.45rem;
}

.stage-tab--active .stage-tab__count {
    background: var(--po-delu-teal-soft);
    color: var(--po-delu-teal-text);
}

.template-catalog-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.template-catalog-stage-tabs {
    align-self: flex-start;
    margin-bottom: 0;
}

.template-catalog-toolbar__row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.template-catalog-search {
    flex: 1;
    max-width: 450px;
    min-width: 250px;
}

.template-catalog-search input {
    width: 100%;
}

.app-shell__content .client-tabs a.client-tab {
    color: var(--po-delu-muted) !important;
    text-decoration: none !important;
}

.app-shell__content .client-tabs a.client-tab:hover,
.app-shell__content .client-tabs a.client-tab:focus-visible {
    background: var(--po-delu-surface-hover) !important;
    color: var(--po-delu-text-strong) !important;
}

.app-shell__content .client-tabs a.client-tab--active {
    background: var(--po-delu-surface-card) !important;
    box-shadow: var(--po-delu-shadow-sm) !important;
    color: var(--po-delu-teal) !important;
}

/* Tab buttons must look exactly like the tab links (the MainLayout scoped
   "everything is a teal button" rule would otherwise paint them as pills). */
.app-shell__content .client-tabs button.client-tab {
    appearance: none !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: var(--po-delu-radius-sm) !important;
    box-shadow: none !important;
    color: var(--po-delu-muted) !important;
    display: inline-flex !important;
    font-size: 0.88rem !important;
    font-weight: 650 !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0.45rem 0.95rem !important;
    white-space: nowrap !important;
}

.app-shell__content .client-tabs button.client-tab:hover,
.app-shell__content .client-tabs button.client-tab:focus-visible {
    background: var(--po-delu-surface-hover) !important;
    color: var(--po-delu-text-strong) !important;
}

.app-shell__content .client-tabs button.client-tab--active {
    background: var(--po-delu-surface-card) !important;
    box-shadow: var(--po-delu-shadow-sm) !important;
    color: var(--po-delu-teal) !important;
}

.case-computed-field {
    border: 1px dashed var(--po-delu-border-strong);
    border-radius: var(--po-delu-radius-sm);
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.4rem 0.6rem;
}

.case-computed-field__label {
    color: var(--po-delu-muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.case-computed-field__value {
    color: var(--po-delu-text-strong);
    font-weight: 700;
}

.case-computed-field .work-helper-text {
    font-size: 0.74rem;
}

.client-form-grid {
    display: grid;
    gap: 0.55rem 0.7rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 60rem) {
    .client-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.client-form-grid label {
    color: var(--po-delu-text);
    display: grid;
    font-size: 0.84rem;
    font-weight: 650;
    gap: 0.3rem;
    min-width: 0;
}

.client-form-grid input,
.client-form-grid select,
.registry-create-card input,
.registry-create-card select {
    background: var(--po-delu-input-bg);
    border: 1px solid var(--po-delu-input-border);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    color: var(--po-delu-input-text);
    font: inherit;
    min-height: 2.3rem;
    padding: 0.38rem 0.6rem;
    width: 100%;
}

.client-empty-panel {
    background: var(--po-delu-surface-card);
    border: 1px dashed var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    padding: 1.2rem;
}

.client-empty-panel h2 {
    margin-top: 0;
}

.client-empty-panel p {
    color: var(--po-delu-muted);
    margin-bottom: 0;
}

.registry-section-heading {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

/* Classless sections (Registry pages, administration templates) share one
   rhythm: compact headings and an even vertical gap between sections. */
section[aria-labelledby]:not([class]) {
    margin-top: 1.1rem;
}

section[aria-labelledby]:not([class]) > h2 {
    font-size: 1.08rem;
    margin: 0 0 0.6rem;
}

.registry-section-heading h2,
.registry-section-heading p {
    margin: 0;
}

.registry-section-heading__meta {
    color: var(--po-delu-muted);
    font-size: 0.82rem;
    margin-top: 0.2rem !important;
}

.registry-collapse-header {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    color: var(--po-delu-text) !important;
    cursor: pointer;
    display: flex !important;
    font: inherit;
    height: auto !important;
    min-height: 0 !important;
    justify-content: space-between !important;
    padding: 0 !important;
    text-align: left;
    width: 100%;
}

.registry-collapse-header__title {
    align-items: center;
    color: var(--po-delu-text-strong);
    display: inline-flex;
    font-size: 1rem;
    font-weight: 700;
    gap: 0.5rem;
}

.registry-collapse-header__action {
    align-items: center;
    color: var(--po-delu-muted);
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 600;
    gap: 0.3rem;
}

.registry-collapse-header:hover .registry-collapse-header__title,
.registry-collapse-header:focus-visible .registry-collapse-header__title {
    color: var(--po-delu-teal);
}

.registry-collapse-header:hover .registry-collapse-header__action,
.registry-collapse-header:focus-visible .registry-collapse-header__action {
    color: var(--po-delu-teal);
}

.registry-quick-filters {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.registry-quick-filter {
    align-items: center;
    color: var(--po-delu-muted);
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 0.35rem;
}

.registry-quick-filter select {
    height: 2.2rem;
    min-height: 2.2rem;
    padding: 0.25rem 0.6rem;
    width: auto;
}

.registry-table-scroll {
    overflow-x: auto;
    overscroll-behavior: contain;
    position: relative;
    width: 100%;
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--po-delu-shell-border) var(--po-delu-surface);
}

.registry-table-scroll::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.registry-table-scroll::-webkit-scrollbar-track {
    background: var(--po-delu-surface);
}

.registry-table-scroll::-webkit-scrollbar-thumb {
    background: var(--po-delu-shell-border);
    border-radius: 4px;
}

.registry-table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--po-delu-teal);
}

.registry-data-table,
.admin-data-table {
    background: var(--po-delu-surface-card);
    border: 0;
    border-spacing: 0;
    width: 100%;
}

.registry-data-table th {
    position: relative;
    background: var(--po-delu-surface);
    box-shadow: inset 0 -1px var(--po-delu-border);
}

.registry-data-table th,
.registry-data-table td {
    font-variant-numeric: tabular-nums;
    padding: 0.5rem 0.75rem;
}

@media (min-width: 701px) {
    .registry-data-table tbody tr:nth-child(even) td {
        background: var(--po-delu-surface-stripe);
    }
}

.registry-data-table tbody tr:hover td {
    background: var(--po-delu-surface-hover) !important;
}

/* ==========================================================================
   STATUS CHIPS
   ========================================================================== */
.status-chip {
    align-items: center;
    border-radius: var(--po-delu-radius-full);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 650;
    gap: 0.4rem;
    line-height: 1.2;
    padding: 0.2rem 0.65rem;
    white-space: nowrap;
}

.status-chip__dot {
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
    height: 6px;
    width: 6px;
}

.status-chip--success {
    background: var(--po-delu-success-soft);
    color: var(--po-delu-success);
}
.status-chip--success .status-chip__dot {
    background: var(--po-delu-success);
    box-shadow: 0 0 6px var(--po-delu-success);
}

.status-chip--muted {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-muted);
}
.status-chip--muted .status-chip__dot {
    background: var(--po-delu-muted);
}

.status-chip--warning {
    background: var(--po-delu-warning-soft);
    color: var(--po-delu-warning);
}
.status-chip--warning .status-chip__dot {
    background: var(--po-delu-warning);
    box-shadow: 0 0 6px var(--po-delu-warning);
}

.status-chip--danger {
    background: var(--po-delu-danger-soft);
    color: var(--po-delu-danger);
}
.status-chip--danger .status-chip__dot {
    background: var(--po-delu-danger);
    box-shadow: 0 0 6px var(--po-delu-danger);
}

.registry-table-scroll table {
    border-collapse: separate;
    border-spacing: 0;
    display: table !important;
    margin: 0;
    min-width: 52rem;
    width: 100%;
}

.registry-data-table td:first-child a,
.registry-data-table td[data-label="Дело"] a {
    color: var(--po-delu-teal-text);
    font-weight: 750;
}

.registry-footer-link {
    margin: 0.5rem 0 0;
}

.registry-footer-link a {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.registry-empty {
    background: var(--po-delu-surface);
    border: 1px dashed var(--po-delu-border-strong);
    border-radius: var(--po-delu-radius-sm);
    color: var(--po-delu-muted);
    margin: 0;
    padding: 1rem;
}

@media (max-width: 700px) {
    .work-page__heading,
    .work-collaboration__heading {
        align-items: flex-start;
    }

    .work-page__heading:has(.work-back-link) {
        flex-wrap: wrap;
        gap: 0.45rem 0.75rem;
    }

    .work-page__heading:has(.work-back-link) > div {
        min-width: min(100%, 14rem);
    }

    .work-page__heading:has(.work-back-link) .work-back-link {
        margin-left: auto;
        white-space: nowrap;
    }

    .work-collaboration__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .work-collaboration__refresh {
        flex: 0 0 auto;
    }

    .work-attachment-list li {
        align-items: flex-start;
        grid-template-columns: minmax(0, 1fr);
    }

    .work-attachment-list__actions {
        justify-items: start;
    }

    .work-attachment-player {
        max-width: 100%;
        width: 100%;
    }

    .work-attachment-preview {
        max-width: 100%;
    }

    .work-board-column-picker {
        display: grid;
        gap: 0.35rem;
    }

    .work-board-column-picker label {
        color: var(--po-delu-muted);
        font-size: 0.8rem;
        font-weight: 600;
    }

    .work-board-column-picker select {
        width: 100%;
    }

    .work-board[data-pwa-board="true"] {
        grid-auto-columns: minmax(0, 1fr);
        grid-auto-flow: row;
        overflow-x: visible;
    }

    .work-board[data-pwa-board="true"] .work-board__column[data-mobile-selected="false"] {
        display: none;
    }

    .work-action-panel__heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.5rem;
    }

    .work-form-grid {
        grid-template-columns: 1fr;
    }

    .work-form-field--checkbox {
        align-self: stretch;
        justify-content: flex-start;
    }

    .work-form-actions .button-icon {
        width: 100%;
    }

    .registry-assignment-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .registry-scope-summary,
    .registry-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .registry-scope-summary__counts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .registry-scope-summary__counts div {
        min-width: 0;
        text-align: left;
    }

    .registry-section-heading .button-icon {
        width: 100%;
    }

    .registry-create-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .registry-create-card {
        padding: 0.85rem;
    }

    .client-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .client-summary__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .client-delete-card__actions {
        flex-direction: column;
    }

    .client-delete-card__actions .button-icon {
        justify-content: center;
        width: 100%;
    }

    .client-summary dl,
    .case-summary dl {
        grid-template-columns: minmax(0, 1fr);
    }

    .registry-table-scroll {
        max-height: none;
        overflow-x: visible;
    }

    .registry-table-scroll table {
        min-width: 0;
    }

    .registry-data-table {
        background: transparent;
        border: 0;
        border-radius: 0;
    }

    .registry-data-table thead {
        display: none;
    }

    .registry-data-table tbody,
    .registry-data-table tr,
    .registry-data-table td {
        display: block;
    }

    .registry-data-table tr {
        background: var(--po-delu-surface-card);
        border: 1px solid var(--po-delu-border);
        border-radius: var(--po-delu-radius-sm);
        box-shadow: var(--po-delu-shadow-raised);
        margin-bottom: 0.75rem;
        padding: 0.75rem 0.85rem;
    }

    .registry-data-table td {
        border-bottom: 0;
        display: grid;
        gap: 0.5rem;
        grid-template-columns: minmax(6.8rem, 38%) minmax(0, 1fr);
        padding: 0.35rem 0;
    }

    .registry-data-table td::before {
        color: var(--po-delu-muted);
        content: attr(data-label);
        font-size: 0.74rem;
        font-weight: 750;
        text-transform: uppercase;
    }

    .registry-data-table td:first-child {
        display: block;
        padding-bottom: 0.55rem;
    }

    .registry-data-table td:first-child::before {
        display: block;
        margin-bottom: 0.2rem;
    }

    .registry-data-table td:first-child a {
        font-size: 1rem;
    }

    .registry-address-form-panel {
        padding: 0.85rem;
    }

    .registry-form-buttons .button-icon {
        justify-content: center;
        width: 100%;
    }
}

.admin-nav {
    margin-top: 1rem;
}

.admin-nav__list {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    list-style: none;
    margin: 0;
    max-width: 56rem;
    padding: 0;
}

.admin-nav__link {
    align-items: center;
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    color: var(--po-delu-graphite);
    display: flex;
    font-weight: 600;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
}

.admin-nav__link:focus,
.admin-nav__link:hover {
    border-color: var(--po-delu-teal);
    color: var(--po-delu-graphite);
}

.administration-navigation {
    align-items: center;
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-left: 4px solid var(--po-delu-teal);
    border-radius: var(--po-delu-radius-lg);
    box-shadow: var(--po-delu-shadow-card);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 0 1rem;
    padding: 0.65rem 0.95rem;
}

.administration-navigation__context {
    display: grid;
    flex: 0 0 auto;
    gap: 0.1rem;
}

.administration-navigation__context span {
    color: var(--po-delu-muted);
    font-size: 0.7rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.administration-navigation__context strong {
    color: var(--po-delu-text-strong);
    font-size: 0.92rem;
}

.administration-navigation__links {
    align-items: center;
    display: flex;
    flex: 1 1 auto;
    gap: 0.25rem;
    justify-content: flex-end;
    list-style: none;
    margin: 0;
    min-width: 0;
    overflow-x: auto;
    padding: 0;
}

.administration-navigation__links li {
    min-width: 0;
}

.administration-navigation__link {
    align-items: center;
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    color: var(--po-delu-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.84rem;
    font-weight: 700;
    gap: 0.35rem;
    height: 36px;
    min-height: 36px;
    padding: 0 0.75rem;
    text-decoration: none;
    white-space: nowrap;
}

.administration-navigation__link:focus-visible,
.administration-navigation__link:hover {
    background: var(--po-delu-surface-hover);
    color: var(--po-delu-text-strong);
    outline: 2px solid var(--po-delu-teal);
    outline-offset: -2px;
}

.administration-navigation__link--active {
    background: var(--po-delu-teal-soft);
    box-shadow: inset 0 -2px var(--po-delu-teal-text);
    color: var(--po-delu-teal-text) !important;
    font-weight: 650;
}

.administration-overview {
    display: grid;
    gap: 0.9rem;
}

.administration-overview h2,
.administration-overview p {
    margin: 0;
}

.administration-overview p {
    color: var(--po-delu-muted);
    max-width: 52rem;
}

.administration-overview__actions {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.administration-overview__action {
    align-items: flex-start;
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    color: var(--po-delu-text);
    display: flex;
    gap: 0.7rem;
    padding: 0.9rem;
    text-decoration: none;
}

.administration-overview__action:hover,
.administration-overview__action:focus-visible {
    border-color: var(--po-delu-teal);
    outline: none;
}

.administration-overview__action > .icon {
    color: var(--po-delu-teal);
    margin-top: 0.1rem;
}

.administration-overview__action span {
    display: grid;
    gap: 0.25rem;
}

.administration-overview__action small {
    color: var(--po-delu-muted);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.35;
}

.admin-summary {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    margin-bottom: 1rem;
}

.app-shell__content > .admin-summary {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.admin-summary__item {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    color: var(--po-delu-text);
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
}

.admin-summary__item strong {
    color: var(--po-delu-text-strong);
    font-size: 1.5rem;
    line-height: 1.1;
}

.admin-summary__item span {
    color: var(--po-delu-muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.admin-action-panel {
    display: grid;
    gap: 0.85rem;
}

.admin-action-panel h2 {
    margin-bottom: 0;
}

.admin-table-shell {
    overflow-x: auto;
}

.admin-data-table {
    min-width: 72rem;
    table-layout: fixed;
}

.admin-data-table td {
    vertical-align: top;
}

.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) {
    width: 11rem;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
    width: 6.5rem;
}

.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3),
.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4),
.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5) {
    width: 7rem;
}

.admin-users-table th:nth-child(6),
.admin-users-table td:nth-child(6) {
    width: 13rem;
}

.admin-work-groups-table th:nth-child(1),
.admin-work-groups-table td:nth-child(1) {
    width: 7.5rem;
}

.admin-work-groups-table th:nth-child(2),
.admin-work-groups-table td:nth-child(2) {
    width: 10rem;
}

.admin-work-groups-table th:nth-child(3),
.admin-work-groups-table td:nth-child(3) {
    width: 6.5rem;
}

.admin-work-groups-table th:nth-child(5),
.admin-work-groups-table td:nth-child(5) {
    width: 29rem;
}

.admin-user-name,
.admin-group-name {
    display: grid;
    gap: 0.25rem;
}

.admin-user-name strong,
.admin-group-name strong {
    color: var(--po-delu-graphite);
    overflow-wrap: anywhere;
}

.admin-users-table td[data-label="Пользователь"] .admin-user-name strong,
.admin-work-groups-table td[data-label="Код"] .admin-id {
    overflow-wrap: normal;
    word-break: normal;
}

.admin-id {
    color: var(--po-delu-muted);
    font-size: 0.76rem;
    overflow-wrap: anywhere;
}

.admin-id--guid {
    font-variant-numeric: tabular-nums;
    overflow-wrap: normal;
    white-space: nowrap;
}

.admin-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-badge {
    background: var(--po-delu-teal-soft);
    border: 1px solid var(--po-delu-border);
    border-radius: 999px;
    color: var(--po-delu-teal-text);
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 750;
    line-height: 1.2;
    padding: 0.25rem 0.5rem;
}

.admin-badge--muted {
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    color: var(--po-delu-muted);
}

.admin-badge--danger {
    background: var(--po-delu-danger-soft);
    border: 1px solid var(--po-delu-danger);
    color: var(--po-delu-danger);
}

.admin-command-cell {
    min-width: 23rem;
}

.admin-command-stack,
.admin-membership-list {
    display: grid;
    gap: 0.75rem;
}

.admin-inline-command,
.admin-membership-card {
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    color: var(--po-delu-text);
    padding: 0.75rem;
}

.admin-inline-command {
    align-items: end;
    display: grid !important;
    gap: 0.65rem;
    grid-template-columns: minmax(8rem, 1fr) auto;
}

.admin-inline-command > label,
.admin-inline-command > fieldset {
    min-width: 0;
}

.admin-inline-command input,
.admin-inline-command select {
    box-sizing: border-box;
    width: 100%;
}

.admin-inline-command .button-icon {
    justify-content: center;
    min-height: 2.75rem;
    max-width: 12rem;
    text-align: center;
    white-space: normal;
}

.admin-inline-command--wide {
    grid-template-columns: minmax(8rem, 1fr) minmax(8rem, 1fr) auto;
}

.admin-role-command {
    grid-template-columns: minmax(12rem, 1.2fr) minmax(8rem, 1fr) auto;
}

.admin-role-list {
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    margin: 0;
    padding: 0;
}

.admin-role-list legend {
    color: var(--po-delu-muted);
    flex: 0 0 100%;
    font-size: 0.78rem;
    font-weight: 750;
}

.admin-role-list label {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: 999px;
    color: var(--po-delu-text);
    flex: 0 1 auto !important;
    font-size: 0.78rem !important;
    min-height: 2rem !important;
    padding: 0.25rem 0.55rem;
}

.admin-membership-card {
    display: grid;
    gap: 0.55rem;
}

.admin-membership-card__header {
    display: grid;
    gap: 0.15rem;
}

.admin-membership-card__forms {
    display: grid;
    gap: 0.55rem;
}

@media (max-width: 58rem) {
    .administration-navigation {
        align-items: stretch;
        flex-direction: column;
        gap: 0.55rem;
    }

    .administration-navigation__links {
        justify-content: flex-start;
    }
}

@media (max-width: 42rem) {
    .administration-navigation__links {
        display: grid;
        gap: 0.35rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-x: visible;
    }

    .administration-navigation__link {
        min-height: 2.75rem;
        white-space: normal;
        width: 100%;
    }

    .administration-navigation__link span {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .administration-overview__actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-table-shell {
        overflow-x: visible;
    }

    .admin-data-table {
        background: transparent;
        border: 0;
        min-width: 0;
    }

    .admin-data-table thead {
        display: none;
    }

    .admin-data-table tbody,
    .admin-data-table tr,
    .admin-data-table td {
        display: block;
    }

    .admin-data-table tr {
        background: var(--po-delu-surface-card);
        border: 1px solid var(--po-delu-border);
        border-radius: var(--po-delu-radius-sm);
        box-shadow: var(--po-delu-shadow-raised);
        margin-bottom: 0.85rem;
        padding: 0.8rem;
    }

    .admin-data-table td {
        border-bottom: 0;
        padding: 0.35rem 0;
    }

    .admin-data-table td:not(.admin-command-cell)::before {
        color: var(--po-delu-muted);
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 750;
        margin-bottom: 0.18rem;
        text-transform: uppercase;
    }

    .admin-command-cell {
        min-width: 0;
    }

    .admin-command-cell::before {
        color: var(--po-delu-muted);
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 750;
        margin: 0.35rem 0 0.45rem;
        text-transform: uppercase;
    }

    .admin-inline-command,
    .admin-inline-command--wide,
    .admin-role-command {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-inline-command button {
        width: 100%;
    }
}

.brand-hero,
.auth-brand {
    align-items: center;
    display: flex;
    gap: 1.25rem;
}

.brand-hero {
    background: var(--po-delu-shell);
    border: 1px solid var(--po-delu-shell-border);
    border-radius: var(--po-delu-radius-sm);
    box-shadow: var(--po-delu-shadow-overlay);
    margin: 2rem auto;
    max-width: 54rem;
    padding: 2rem;
}

.brand-hero__icon,
.auth-brand__icon {
    flex: 0 0 auto;
}

.brand-hero__icon {
    height: 6rem;
    width: 6rem;
}

.auth-brand {
    background: var(--po-delu-shell) !important;
    border-color: var(--po-delu-shell-border) !important;
    margin-bottom: 1.5rem;
}

.auth-brand__icon {
    height: 4rem;
    width: 4rem;
}

.brand-hero__eyebrow,
.auth-brand__eyebrow {
    color: var(--po-delu-shell-muted);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
    margin: 0 0 0.35rem;
}

.brand-hero h1,
.auth-brand h1 {
    color: var(--po-delu-shell-text);
    font-weight: 700;
    margin: 0;
}

.brand-hero__text {
    color: var(--po-delu-shell-muted);
    font-size: 1.1rem;
    margin: 0.6rem 0 0;
}

.home-actions {
    margin-top: 1.25rem;
}

.home-actions__link {
    color: var(--po-delu-on-accent);
    font-weight: 700;
    text-decoration: none;
}

.home-actions__link:hover,
.home-actions__link:focus-visible {
    color: var(--po-delu-on-accent);
}

.work-card-actions__cancel {
    color: var(--po-delu-danger);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--po-delu-success);
}

.invalid {
    outline: 1px solid var(--po-delu-danger);
}

.validation-message {
    color: var(--po-delu-danger);
}

.blazor-error-boundary {
    background-color: var(--po-delu-danger);
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=);
    background-repeat: no-repeat;
    background-position: 1rem;
    background-size: 1.8rem;
    padding: 1rem 1rem 1rem 3.7rem;
    color: var(--po-delu-on-accent);
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: var(--po-delu-border-strong);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* DaData suggestions & address panel */
.registry-address-form-panel {
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    margin-top: 0.9rem;
    padding: 1rem 1.1rem;
}

.registry-address-form-panel h3 {
    color: var(--po-delu-text-strong);
    font-size: 0.98rem;
    margin: 0 0 0.8rem;
}

.client-expenses-panel {
    background: var(--po-delu-surface-card);
    flex: 1 1 100%;
}

.dadata-search-box {
    position: relative;
    margin-bottom: 1rem;
}

.dadata-search-box label {
    color: var(--po-delu-muted);
    display: flex;
    flex-direction: column;
    font-size: 0.84rem;
    font-weight: 650;
    gap: 0.35rem;
    max-width: none !important;
}

.dadata-search-input-wrap {
    position: relative;
    width: 100%;
}

.dadata-search-input {
    background: var(--po-delu-input-bg);
    border: 1px solid var(--po-delu-teal);
    border-radius: var(--po-delu-radius-sm);
    box-sizing: border-box;
    color: var(--po-delu-input-text);
    font: inherit;
    font-size: 0.92rem;
    height: 2.55rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    width: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dadata-search-input:focus {
    box-shadow: 0 0 0 2px var(--po-delu-input-focus-ring);
    outline: none;
}

.dadata-spinner {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--po-delu-muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.dadata-suggestions-list {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    box-shadow: var(--po-delu-shadow-dropdown);
    list-style: none;
    margin: 0.25rem 0 0;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.35rem 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
}

.dadata-suggestion-item {
    align-items: center;
    color: var(--po-delu-text);
    cursor: pointer;
    display: flex;
    font-size: 0.88rem;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    transition: background-color 0.1s ease;
}

.dadata-suggestion-item:hover,
.dadata-suggestion-item--active {
    background: var(--po-delu-surface-hover);
}

.dadata-suggestion-item span:first-of-type {
    flex: 1 1 auto;
    min-width: 0;
}

.dadata-suggestion-postcode {
    background: var(--po-delu-teal-soft);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-xs);
    color: var(--po-delu-teal);
    flex: 0 0 auto;
    font-family: monospace;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
}

.registry-table-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    align-items: center;
    white-space: nowrap;
}

.registry-table-actions .button-icon {
    height: 1.95rem !important;
    min-height: 1.95rem !important;
    padding: 0 0.55rem !important;
    font-size: 0.78rem !important;
    gap: 0.3rem !important;
}

section[aria-labelledby="template-catalog-heading"] > table {
    display: table !important;
    width: 100%;
}

section[aria-labelledby="template-catalog-heading"] > table td {
    vertical-align: middle !important;
}

.registry-primary-tag {
    color: var(--po-delu-teal);
    font-weight: 700;
    margin-left: 0.25rem;
}

.registry-form-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.creditors-page {
    display: grid;
    gap: 1rem;
}

.creditors-section-heading,
.creditor-repayment-heading {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.creditors-section-heading h2,
.creditor-repayment-heading h3 {
    margin: 0;
}

.creditors-table td small,
.creditor-editor small,
.creditor-totals small {
    color: var(--po-delu-muted);
    display: block;
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.creditor-editor {
    background: var(--po-delu-surface-card);
}

.creditor-delete-confirmation {
    align-items: center;
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-danger);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.creditor-delete-confirmation span {
    flex: 1 1 16rem;
}

.creditor-registry-block {
    border-top: 1px solid var(--po-delu-border);
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 1rem;
}

.creditor-registry-block h3 {
    color: var(--po-delu-text-strong);
    font-size: 1rem;
    margin: 0;
}

.creditor-add-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.creditor-repayments {
    display: grid;
    gap: 0.65rem;
}

.creditor-repayment-row {
    align-items: end;
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-sm);
    display: grid;
    gap: 0.65rem;
    grid-template-columns: minmax(11rem, 1.2fr) minmax(9rem, 1fr) minmax(9rem, 1fr) auto;
    padding: 0.75rem;
}

.creditor-totals {
    background: var(--po-delu-teal-soft);
    border: 1px solid var(--po-delu-border-strong);
    border-radius: var(--po-delu-radius-sm);
    margin-top: 1rem;
    padding: 0.9rem;
}

.creditor-totals .client-form-grid > div {
    display: grid;
    gap: 0.25rem;
}

.creditor-totals span {
    color: var(--po-delu-text-strong);
    font-size: 1.05rem;
    font-weight: 700;
}

@media (max-width: 760px) {
    .creditor-repayment-row {
        grid-template-columns: 1fr;
    }

    .creditors-section-heading,
    .creditor-repayment-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Справка: панель, контекстное меню, тост, страницы /help — общий стиль приложения */
.help-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(420px, 92vw);
    background: var(--po-delu-surface-card);
    color: var(--po-delu-text);
    border: 1px solid var(--po-delu-border);
    border-right: none;
    border-radius: var(--po-delu-radius-lg) 0 0 var(--po-delu-radius-lg);
    box-shadow: var(--po-delu-shadow-dropdown);
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s 0.22s;
    z-index: 60;
    display: flex;
    flex-direction: column;
}

.help-drawer--open {
    transform: translateX(0);
    visibility: visible;
}

.help-drawer__header {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--po-delu-border);
}

.help-drawer__title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--po-delu-text-strong);
}

.help-drawer__close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--po-delu-border);
    background: var(--po-delu-surface);
    color: var(--po-delu-muted);
    border-radius: var(--po-delu-radius-sm);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.help-drawer__close:hover,
.help-drawer__close:focus-visible {
    background: var(--po-delu-surface-hover);
    border-color: var(--po-delu-border-strong);
    color: var(--po-delu-text);
    outline: none;
}

.help-drawer__body {
    flex: 1 1 auto;
    /* Flex-элемент без min-height:0 растягивается по контенту и не скроллится. */
    min-height: 0;
    padding: 1rem;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--po-delu-text);
}

.help-drawer__body table {
    border-collapse: collapse;
    margin: 0.5rem 0;
}

.help-drawer__body th,
.help-drawer__body td {
    border: 1px solid var(--po-delu-border);
    padding: 0.3rem 0.5rem;
    text-align: left;
}

.help-drawer__footer {
    flex: none;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--po-delu-border);
}

.help-drawer__full-link {
    color: var(--po-delu-teal);
    font-weight: 600;
}

.help-drawer__full-link:hover {
    color: var(--po-delu-teal-hover);
}

.help-context-menu {
    position: fixed;
    z-index: 70;
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    box-shadow: var(--po-delu-shadow-dropdown);
    padding: 0.25rem;
    min-width: 180px;
}

.help-context-menu__item {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--po-delu-text);
    text-align: left;
    padding: 0.45rem 0.6rem;
    border-radius: var(--po-delu-radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.15s ease;
}

.help-context-menu__item:hover,
.help-context-menu__item:focus-visible {
    background: var(--po-delu-surface-hover);
    outline: none;
}

.help-toast {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    background: var(--po-delu-graphite);
    color: var(--po-delu-surface-card);
    padding: 0.5rem 0.9rem;
    border-radius: var(--po-delu-radius-md);
    box-shadow: var(--po-delu-shadow-card);
    font-size: 0.88rem;
    z-index: 80;
    animation: help-toast-hide 2.5s ease forwards;
}

@keyframes help-toast-hide {
    0%, 70% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

.help-index-section {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-lg);
    box-shadow: var(--po-delu-shadow-card);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.help-index-section h2 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: var(--po-delu-text-strong);
}

.help-index-section ul {
    margin: 0;
    padding-left: 1.1rem;
}

.help-index-section a {
    color: var(--po-delu-teal);
}

.help-topic-breadcrumbs {
    font-size: 0.85rem;
    color: var(--po-delu-muted);
    margin-bottom: 0.75rem;
}

.help-topic-breadcrumbs a {
    color: var(--po-delu-teal);
}

.help-topic-body {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-lg);
    box-shadow: var(--po-delu-shadow-card);
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--po-delu-text);
}

.help-topic-body table {
    border-collapse: collapse;
    margin: 0.5rem 0;
}

.help-topic-body th,
.help-topic-body td {
    border: 1px solid var(--po-delu-border);
    padding: 0.3rem 0.5rem;
    text-align: left;
}

.documents-generate-card {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-lg);
    box-shadow: var(--po-delu-shadow-card);
    margin-top: 1.1rem;
    padding: 1.25rem 1.5rem;
}

.documents-generate-card h2 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--po-delu-text-strong);
}

.documents-generate-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
    width: 100%;
}

.documents-generate-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.25rem;
    flex: 1 1 36rem;
    margin-bottom: 0;
}

@media (max-width: 60rem) {
    .documents-generate-grid {
        flex-direction: column;
        align-items: stretch;
    }
}

.documents-generate-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--po-delu-text-strong);
    margin: 0;
}

.documents-generate-grid label:nth-child(1) {
    flex: 1.5 1 15rem;
    min-width: 13rem;
}

.documents-generate-grid label:nth-child(2) {
    flex: 1 1 10rem;
    min-width: 8rem;
}

.documents-generate-grid label:nth-child(3) {
    flex: 1.2 1 12rem;
    min-width: 10rem;
}

.documents-generate-grid select,
.documents-generate-grid input {
    width: 100%;
}

.documents-generate-form .documents-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex: 0 0 auto;
    margin: 0;
}

.documents-generate-form > p[role="status"] {
    width: 100%;
    margin: 0.25rem 0 0;
}

.documents-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.documents-forecast {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-lg);
    box-shadow: var(--po-delu-shadow-card);
    margin-top: 0.85rem;
    padding: 1.15rem 1.25rem;
}

.documents-forecast h3 {
    font-size: 1.1rem;
    font-weight: 750;
    letter-spacing: -0.015em;
    margin: 0;
}

.documents-forecast h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 1rem 0 0.35rem;
}

.documents-forecast__meta {
    color: var(--po-delu-muted);
    font-size: 0.82rem;
    margin: 0.15rem 0 0.75rem;
}

.documents-forecast__table {
    border-collapse: collapse;
    margin: 0;
    width: 100%;
}

.documents-forecast__table td {
    border: 1px solid var(--po-delu-border);
    overflow-wrap: anywhere;
    padding: 0.35rem 0.55rem;
    text-align: left;
    vertical-align: top;
}

.documents-forecast__table td:first-child {
    white-space: nowrap;
}

.documents-forecast__table code {
    background: var(--po-delu-surface-stripe);
    border-radius: var(--po-delu-radius-xs);
    padding: 0.05rem 0.3rem;
}

.documents-forecast table + table,
.documents-forecast h4 + p {
    margin-top: 0;
}

.template-sha {
    display: inline-block;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.documents-preview {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--po-delu-border);
}

.documents-preview__desk {
    margin-top: 0.75rem;
    padding: 1.25rem;
    background: var(--po-delu-surface);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    max-height: 75vh;
    overflow: auto;
    display: flex;
    justify-content: center;
}

.documents-preview__sheet {
    width: 100%;
    max-width: 52rem;
    background: #ffffff;
    color: #1c201e;
    color-scheme: light;
    font-family: "Times New Roman", "PT Serif", Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.45;
    padding: 2.5rem 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.14);
}

.documents-preview__sheet .ted-p { min-height: 1.2em; margin: 0 0 0.25rem; color: #1c201e; }
.documents-preview__sheet .ted-p--center { text-align: center; }
.documents-preview__sheet .ted-p--right { text-align: right; }
.documents-preview__sheet .ted-p--justify { text-align: justify; }
.documents-preview__sheet .ted-p--indent { text-indent: 1.5rem; }
.documents-preview__sheet .ted-p--pad-left { padding-left: 1.5rem; }
.documents-preview__sheet .ted-run--bold { font-weight: 700; }
.documents-preview__sheet .ted-run--italic { font-style: italic; }
.documents-preview__sheet .ted-run--underline { text-decoration: underline; }
.documents-preview__sheet .ted-run--large { font-size: 1.25em; font-weight: 600; }
.documents-preview__sheet .ted-badge,
.documents-preview__sheet .ted-badge--orphan { display: none !important; }
.documents-preview__sheet .ted-field-result { opacity: 1 !important; color: #1c201e !important; }
.documents-preview__sheet .ted-table {
    display: table !important;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.4rem;
    background: transparent !important;
}
.documents-preview__sheet .ted-cell,
.documents-preview__sheet td,
.documents-preview__sheet th {
    border: 1px solid #bbb !important;
    padding: 0.15rem 0.4rem !important;
    vertical-align: top;
    color: #1c201e !important;
    background: transparent !important;
}
.documents-preview__sheet tbody tr:hover,
.documents-preview__sheet tbody tr:hover td {
    background: transparent !important;
    color: #1c201e !important;
}

@media print {
    .app-shell__header, h1.page-heading, nav.administration-navigation, .administration-navigation { display: none !important; }
    .app-shell__content { padding: 0 !important; max-width: none !important; }
}

.case-template-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.case-template-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    background: var(--po-delu-surface-card);
    transition: border-color var(--po-delu-motion-fast), background-color var(--po-delu-motion-fast), box-shadow var(--po-delu-motion-fast);
}

.case-template-card:hover,
.case-template-card:focus-within {
    border-color: var(--po-delu-teal);
    box-shadow: var(--po-delu-shadow-raised);
}

.case-template-card--selected {
    border-color: var(--po-delu-teal);
    background-color: var(--po-delu-teal-soft);
}

.case-template-card__checkbox {
    margin-top: 0.15rem;
    cursor: pointer;
}

.case-template-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.case-template-card__title {
    color: var(--po-delu-text-strong);
    font-weight: 600;
    font-size: 0.95rem;
}

.case-template-card__stage,
.case-template-card__path {
    color: var(--po-delu-muted);
}

.case-template-card__stage {
    font-size: 0.8rem;
}

.case-template-card__path {
    font-family: monospace;
    font-size: 0.75rem;
    word-break: break-all;
}

.template-presets-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.case-schedule-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.schedule-summary-card {
    padding: 0.75rem 1rem;
    border-radius: var(--po-delu-radius-md);
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.schedule-summary-card__value {
    font-size: 1.5rem;
    font-weight: 700;
}

.schedule-summary-card__label {
    font-size: 0.8rem;
    color: var(--po-delu-muted);
}

.schedule-summary-card--success .schedule-summary-card__value { color: var(--po-delu-success); }
.schedule-summary-card--warning .schedule-summary-card__value { color: var(--po-delu-warning); }
.schedule-summary-card--danger .schedule-summary-card__value { color: var(--po-delu-danger); }

.case-schedule-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.case-schedule-item-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.case-deadline-override-card {
    background: var(--po-delu-surface-card);
    border: 1px solid var(--po-delu-border);
    border-radius: var(--po-delu-radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
}

/* Empty state — единый паттерн «нет данных» */
.empty-state {
    border: 1px dashed var(--po-delu-border-strong);
    border-radius: var(--po-delu-radius-md);
    color: var(--po-delu-muted);
    padding: var(--po-delu-space-6);
    text-align: center;
}

.empty-state .icon {
    color: var(--po-delu-muted);
}

.empty-state__title {
    color: var(--po-delu-text-strong);
    font-weight: var(--po-delu-font-weight-semibold);
    margin: 0 0 var(--po-delu-space-1);
}

.empty-state p {
    margin: 0;
}

.empty-state__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: var(--po-delu-space-2);
    justify-content: center;
    margin-top: var(--po-delu-space-4);
}

/* Skeleton — плейсхолдер загрузки */
.skeleton {
    animation: po-delu-skeleton 1.4s ease infinite;
    background: linear-gradient(90deg, var(--po-delu-surface-hover) 25%, var(--po-delu-surface-card) 50%, var(--po-delu-surface-hover) 75%);
    background-size: 200% 100%;
    border-radius: var(--po-delu-radius-sm);
    min-height: 1em;
}

@keyframes po-delu-skeleton {
    to {
        background-position: -200% 0;
    }
}


