        /* Верхняя навигационная панель */
        /* --- ШАПКА (десктопный макет) --- */
        .topbar-shell {
            width: 100%;
            padding: 16px 24px 0;
            display: flex;
            justify-content: center;
            flex-shrink: 0;
            position: relative;
            z-index: 120;
        }
        .topbar {
            width: 100%;
            max-width: 1440px;
            background: var(--bg-panel);
            border: 1px solid var(--border);
            border-radius: var(--radius-lg);
            padding: 10px 16px;
            box-shadow: var(--shadow-sm);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            position: relative;
            z-index: 60;
            overflow: visible;
            flex-wrap: nowrap;
        }
        .topbar-left {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-shrink: 0;
            min-width: 0;
        }
        .brand-group,
        .brand-pill {
            display: inline-flex;
            align-items: center;
            gap: 9px;
            min-width: 0;
        }
        .brand-logo,
        .brand-pill {
            font-weight: 800;
            font-size: var(--fs-md);
            letter-spacing: -0.02em;
            color: var(--text-primary);
            white-space: nowrap;
            user-select: none;
        }
        .brand-mark,
        .brand-ring {
            width: 28px;
            height: 28px;
            border-radius: 9px;
            background: linear-gradient(135deg, #2f6bff 0%, #1f56e5 100%);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(47, 107, 255, 0.3);
            flex-shrink: 0;
            color: #fff;
            overflow: hidden;
        }
        .brand-ring::after {
            content: "";
            width: 10px;
            height: 10px;
            border-radius: 50%;
            border: 3px solid #fff;
        }
        .brand-mark-svg { display: none; }
        body.realm-life .brand-mark,
        body.realm-life .brand-ring {
            background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
            box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
        }
        .topbar-v-sep {
            width: 1px;
            height: 20px;
            background: var(--border);
            flex-shrink: 0;
        }
        .realm-switch,
        .topbar .realm-pill-toggle {
            display: inline-flex;
            align-items: center;
            background: var(--bg-subtle);
            border: 1px solid var(--border);
            padding: 2px;
            border-radius: 999px;
            gap: 2px;
            flex-shrink: 0;
            width: auto;
            min-width: 0;
            margin: 0;
        }
        .realm-switch button,
        .topbar .realm-opt {
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: var(--fs-xs);
            font-weight: 700;
            padding: 5px 12px;
            border-radius: 999px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            min-height: 0;
            min-width: 0;
            transition: all 0.15s ease;
        }
        .topbar .realm-opt .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
            opacity: 0.5;
        }
        .realm-switch button.active,
        .topbar .realm-opt.active[data-realm="work"] {
            background: var(--bg-panel);
            color: var(--accent);
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
        }
        .topbar .realm-opt.active[data-realm="work"] .dot,
        .topbar .realm-opt.active[data-realm="life"] .dot { opacity: 1; }
        body.realm-life .realm-switch button.active,
        .topbar .realm-opt.active[data-realm="life"] {
            background: var(--bg-panel);
            color: var(--life, #0f766e);
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
        }

        /* Центр: капсула смены */
        .topbar-center,
        .cal-widget {
            position: relative;
            display: flex;
            justify-content: center;
            flex: 1 1 260px;
            max-width: 380px;
            min-width: 230px;
            z-index: 160;
        }
        .workday-widget,
        .shift-capsule {
            width: 100%;
            height: 40px;
            background: var(--bg-subtle);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 0 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            font-family: inherit;
            color: var(--text-primary);
            text-align: left;
            transition: all 0.16s ease;
        }
        .workday-widget:hover,
        .shift-capsule:hover {
            border-color: var(--border-strong, #cbd5e1);
            background: #f8fafc;
        }
        .cal-widget.open .workday-widget,
        .cal-widget.open .shift-capsule {
            border-color: var(--accent);
            background: var(--bg-panel);
            box-shadow: 0 0 0 3px var(--accent-soft);
        }
        body.realm-life .cal-widget.open .workday-widget,
        body.realm-life .cal-widget.open .shift-capsule {
            border-color: var(--life, #0f766e);
            box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
        }
        .clock-box,
        .shift-clock {
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: var(--fs-base);
            font-weight: 750;
            color: var(--text-primary);
            letter-spacing: -0.02em;
            padding-right: 10px;
            border-right: 1px solid var(--border-strong, #cbd5e1);
            flex-shrink: 0;
        }
        .workday-progress-col,
        .shift-info-inline {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .workday-meta,
        .shift-info-top {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            font-size: var(--fs-xs);
            line-height: 1;
        }
        .workday-date-title,
        .shift-date-txt {
            font-weight: 700;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .workday-shift-line,
        .shift-meta-txt {
            font-size: var(--fs-xs);
            font-weight: 600;
            color: var(--text-secondary);
            white-space: nowrap;
        }
        .workday-shift-line { display: none; }
        .progress-bar-bg,
        .shift-track {
            width: 100%;
            height: 3px;
            background: rgba(148, 163, 184, 0.22);
            border-radius: 999px;
            overflow: hidden;
        }
        .progress-bar-fill,
        .shift-track-fill {
            height: 100%;
            width: 0%;
            background: var(--accent);
            opacity: 0.6;
            border-radius: 999px;
            transition: width 0.35s ease, background 0.2s ease;
        }
        body.realm-life .progress-bar-fill,
        body.realm-life .shift-track-fill {
            background: var(--life, #0f766e);
        }
        .cal-widget-stats { display: contents; }
        .cal-stat-pill,
        .shift-count-badge {
            font-size: var(--fs-xs);
            font-weight: 750;
            padding: 2px 7px;
            border-radius: 999px;
            background: var(--accent-soft);
            color: var(--accent);
            flex-shrink: 0;
            white-space: nowrap;
        }
        body.realm-life .cal-stat-pill,
        body.realm-life .shift-count-badge {
            background: rgba(15, 118, 110, 0.12);
            color: #0f766e;
        }
        .cal-widget-chevron,
        .shift-chevron {
            width: 14px;
            height: 14px;
            color: var(--text-muted);
            transition: transform 0.2s ease;
            flex-shrink: 0;
        }
        .cal-widget.open .cal-widget-chevron,
        .cal-widget.open .shift-chevron {
            transform: rotate(180deg);
            color: var(--accent);
        }

        .topbar-actions,
        .topbar-right {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }
        .split-capture-btn,
        .add-task-group {
            display: inline-flex;
            align-items: stretch;
            height: 38px;
            border-radius: 10px;
            background: var(--accent-soft);
            border: 1px solid rgba(37, 99, 235, 0.28);
            overflow: hidden;
            transition: all 0.15s ease;
            gap: 0;
        }
        .split-capture-btn:hover,
        .add-task-group:hover {
            border-color: rgba(37, 99, 235, 0.45);
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
        }
        .btn-add-task,
        .split-main-action {
            border: none;
            background: transparent;
            color: var(--accent);
            font-family: inherit;
            font-size: var(--fs-sm);
            font-weight: 700;
            padding: 0 12px;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            border-radius: 0;
            height: 100%;
            box-shadow: none;
        }
        .btn-add-task:hover,
        .split-main-action:hover {
            background: rgba(37, 99, 235, 0.1);
            color: var(--accent);
            border-color: transparent;
        }
        .btn-add-task.is-open {
            background: var(--accent);
            color: #fff;
        }
        .btn-add-task .icon { width: 14px; height: 14px; }
        .btn-add-mic,
        .split-mic-action {
            border: none;
            border-left: 1px solid rgba(37, 99, 235, 0.2);
            background: rgba(37, 99, 235, 0.08);
            color: var(--accent);
            width: 36px;
            height: 100%;
            border-radius: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: none;
            padding: 0;
            flex-shrink: 0;
            transform: none;
        }
        .btn-add-mic:hover,
        .split-mic-action:hover {
            background: var(--accent);
            color: #fff;
            transform: none;
        }
        .btn-add-mic .icon { width: 14px; height: 14px; }

        .btn-quick-start,
        .work-state-pill {
            height: 38px;
            border-radius: 10px;
            padding: 0 12px;
            font-family: inherit;
            font-size: var(--fs-sm);
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            cursor: pointer;
            border: 1px solid rgba(5, 150, 105, 0.3);
            background: rgba(5, 150, 105, 0.1);
            color: var(--success);
            max-width: none;
            transition: all 0.16s ease;
        }
        .btn-quick-start:hover,
        .work-state-pill.is-idle:hover {
            background: var(--success);
            border-color: var(--success);
            color: #fff;
        }
        .btn-quick-start.is-active-work,
        .work-state-pill.is-working {
            background: rgba(220, 38, 38, 0.1);
            border-color: rgba(220, 38, 38, 0.35);
            color: var(--danger);
        }
        .btn-quick-start.is-active-work:hover,
        .work-state-pill.is-working:hover {
            background: var(--danger);
            color: #fff;
        }
        .work-live-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: currentColor;
            animation: blinkDot 1.1s infinite;
            flex-shrink: 0;
        }
        .work-state-timer {
            font-family: ui-monospace, SFMono-Regular, monospace;
            font-weight: 800;
            font-size: var(--fs-sm);
            padding-left: 4px;
            border-left: 1px solid currentColor;
            opacity: 0.9;
        }
        .btn-quick-start .icon { width: 14px; height: 14px; }

        /* Кнопки и элементы управления */
        button, .btn {
            cursor: pointer;
            font-family: inherit;
            font-size: var(--fs-sm);
            font-weight: 600;
            padding: 7px 12px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text-primary);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
            white-space: nowrap;
        }

        button:hover {
            background: var(--bg-card-hover);
            border-color: #94a3b8;
        }

        button:focus-visible {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-soft);
        }

        .btn-icon-only {
            padding: 7px;
        }

        .btn-primary {
            background: var(--accent);
            border-color: var(--accent);
            color: #ffffff;
        }
        .btn-primary:hover {
            background: var(--accent-hover);
            border-color: var(--accent-hover);
        }

        .btn-success {
            background: var(--success-soft);
            border-color: rgba(5, 150, 105, 0.35);
            color: var(--success);
        }
        .btn-success:hover {
            background: var(--success);
            border-color: var(--success);
            color: #ffffff;
        }

        .btn-quick-start .label-full {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        body.realm-life .btn-quick-start:not(.is-active-work) {
            display: none !important;
        }

        .topbar-menu {
            position: relative;
        }
        .topbar-menu-btn,
        .topbar-icon-btn {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--bg-panel);
            color: var(--text-secondary);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            background: var(--bg-panel);
            border: 1px solid var(--border);
            color: var(--text-secondary);
        }
        .topbar-menu-btn:hover,
        .topbar-menu.open .topbar-menu-btn {
            background: var(--bg-subtle);
            border-color: rgba(37, 99, 235, 0.35);
            color: var(--accent);
        }
        .topbar-menu-btn .menu-lines {
            display: flex;
            flex-direction: column;
            gap: 4px;
            width: 16px;
        }
        .topbar-menu-btn .menu-lines span {
            display: block;
            height: 2px;
            width: 100%;
            border-radius: 2px;
            background: currentColor;
        }
        .topbar-menu-dropdown {
            display: none;
            position: absolute;
            right: 0;
            top: calc(100% + 6px);
            z-index: 160;
            min-width: 220px;
            padding: 6px;
            background: var(--bg-panel);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: var(--shadow-lg);
        }
        .topbar-menu.open .topbar-menu-dropdown {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .topbar-menu-item {
            width: 100%;
            justify-content: flex-start;
            background: transparent;
            border-color: transparent;
            color: var(--text-primary);
            font-weight: 600;
            padding: 9px 10px;
            border-radius: 8px;
        }
        .topbar-menu-item:hover {
            background: var(--accent-soft);
            border-color: transparent;
            color: var(--accent);
        }
        .topbar-menu-item .icon {
            color: var(--text-secondary);
        }
        .topbar-menu-item:hover .icon {
            color: var(--accent);
        }

        .btn-warning {
            background: var(--warning-soft);
            border-color: rgba(217, 119, 6, 0.35);
            color: var(--warning);
        }
        .btn-warning:hover {
            background: var(--warning);
            border-color: var(--warning);
            color: #ffffff;
        }

        .btn-ghost {
            background: transparent;
            border-color: transparent;
            color: var(--text-secondary);
        }
        .btn-ghost:hover {
            background: var(--bg-subtle);
            border-color: var(--border);
            color: var(--text-primary);
        }

        .btn-danger-ghost {
            background: transparent;
            border-color: transparent;
            color: var(--text-muted);
            padding: 5px;
        }
        .btn-danger-ghost:hover {
            background: var(--danger-soft);
            border-color: transparent;
            color: var(--danger);
        }

        /* Контейнер рабочей области */
        .workspace {
            max-width: 1440px;
            width: 100%;
            margin: 0 auto;
            padding: 16px 24px 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            flex: 1;
            min-height: 0;
            overflow: hidden;
        }

        /* Модалка добавления задачи — поверх страницы */
        #captureModal.modal-backdrop {
            z-index: 180;
            background: rgba(15, 23, 42, 0.45);
            align-items: center;
            justify-content: center;
            padding: 20px;
            overflow-y: auto;
        }

        .capture-grab {
            display: none;
        }
        .capture-dialog {
            background: var(--bg-panel);
            border: 1px solid rgba(203, 213, 225, 0.8);
            border-radius: 18px;
            max-width: 560px;
            width: 100%;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 0;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14), 0 2px 10px rgba(15, 23, 42, 0.06);
            position: relative;
            max-height: min(92vh, 780px);
            overflow: visible;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.36s cubic-bezier(0.32, 0.72, 0, 1);
        }
        .capture-dialog.is-voice-active {
            border-color: var(--danger);
            box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1), 0 20px 50px rgba(15, 23, 42, 0.14);
        }

        .capture-card-form {
            display: flex;
            flex-direction: column;
            min-height: 0;
            flex: 1;
            overflow: visible;
            border-radius: inherit;
            background: inherit;
        }
        .capture-card-scroll {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            border-radius: 18px 18px 0 0;
        }

        .card-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 18px 8px;
            gap: 10px;
            flex-shrink: 0;
        }
        .realm-pill-toggle {
            display: inline-flex;
            align-items: center;
            background: var(--bg-subtle);
            border: 1px solid var(--border);
            padding: 2px;
            border-radius: 999px;
            gap: 2px;
        }
        .realm-opt {
            border: none;
            background: transparent;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: var(--fs-xs);
            font-weight: 700;
            padding: 4px 11px;
            border-radius: 999px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.15s ease;
        }
        .realm-opt .dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: currentColor;
            opacity: 0.5;
        }
        .realm-opt.active[data-realm="work"] {
            background: var(--bg-panel);
            color: var(--accent);
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
        }
        .realm-opt.active[data-realm="work"] .dot { opacity: 1; }
        .realm-opt.active[data-realm="life"] {
            background: var(--bg-panel);
            color: #0f766e;
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
        }
        .realm-opt.active[data-realm="life"] .dot { opacity: 1; }
        .topbar-right {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .voice-smart-btn,
        .btn-assemble-task {
            border: 1px solid rgba(37, 99, 235, 0.25);
            background: var(--accent-soft);
            color: var(--accent);
            font-family: inherit;
            font-size: var(--fs-xs);
            font-weight: 700;
            padding: 6px 12px;
            border-radius: 999px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.15s ease;
            white-space: nowrap;
        }
        .voice-smart-btn:hover,
        .btn-assemble-task:hover {
            background: rgba(37, 99, 235, 0.15);
            border-color: rgba(37, 99, 235, 0.4);
        }
        .voice-smart-btn.recording,
        .voice-smart-btn.is-listening,
        .btn-assemble-task.is-listening {
            background: var(--danger);
            border-color: var(--danger);
            color: #fff;
            animation: pulseRec 1.4s infinite;
        }
        @keyframes pulseRec {
            0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
            50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
        }
        .capture-close-btn {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: none;
            background: transparent;
            color: var(--text-muted);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
        }
        .capture-close-btn:hover {
            background: var(--bg-subtle);
            color: var(--text-primary);
        }
        .capture-close-btn .icon { width: 16px; height: 16px; }

        .voice-live-banner {
            display: none;
            margin: 4px 18px 6px;
            padding: 10px 14px;
            border-radius: 12px;
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #991b1b;
            font-size: var(--fs-sm);
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-shrink: 0;
        }
        .capture-dialog.is-voice-active .voice-live-banner { display: flex; }
        .voice-wave {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            height: 16px;
        }
        .voice-wave span {
            width: 3px;
            height: 8px;
            border-radius: 99px;
            background: var(--danger);
            animation: waveBounce 0.7s ease-in-out infinite;
        }
        .voice-wave span:nth-child(2) { animation-delay: 0.15s; height: 14px; }
        .voice-wave span:nth-child(3) { animation-delay: 0.3s; height: 10px; }
        .voice-wave span:nth-child(4) { animation-delay: 0.1s; height: 16px; }
        @keyframes waveBounce {
            0%, 100% { transform: scaleY(0.45); }
            50% { transform: scaleY(1.15); }
        }

        .card-main {
            padding: 6px 20px 14px;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .title-row {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .title-input,
        #captureModal #newTaskTitle {
            width: 100%;
            border: none !important;
            background: transparent !important;
            box-shadow: none !important;
            font-family: inherit;
            font-size: var(--fs-xl);
            font-weight: 650;
            color: var(--text-primary);
            outline: none;
            line-height: 1.35;
            letter-spacing: -0.015em;
            padding: 4px 0 !important;
            border-radius: 0 !important;
        }
        .title-input::placeholder,
        #captureModal #newTaskTitle::placeholder {
            color: var(--text-muted);
            font-weight: 500;
        }
        .inline-mic-btn {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            padding: 0;
        }
        .inline-mic-btn:hover {
            background: var(--bg-subtle);
            color: var(--accent);
        }
        .inline-mic-btn.is-listening {
            background: var(--danger);
            color: #fff;
        }
        .inline-mic-btn .icon { width: 16px; height: 16px; }

        .desc-box { display: none; position: relative; }
        .desc-box.open { display: block; }
        .desc-textarea,
        #captureModal #newTaskDesc {
            width: 100%;
            border: 1px solid transparent;
            background: var(--bg-subtle);
            border-radius: 8px;
            padding: 9px 12px;
            font-family: inherit;
            font-size: var(--fs-base);
            color: var(--text-primary);
            resize: none;
            min-height: 58px;
            outline: none;
            line-height: 1.45;
        }
        .desc-textarea:focus,
        #captureModal #newTaskDesc:focus {
            background: var(--bg-panel);
            border-color: var(--border);
            box-shadow: 0 0 0 3px var(--accent-soft);
        }

        .steps-box {
            display: none;
            background: var(--bg-subtle);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 8px 10px;
            flex-direction: column;
            gap: 6px;
        }
        .steps-box.open { display: flex; }
        .steps-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: var(--fs-xs);
            font-weight: 700;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.04em;
            padding: 0 2px 2px;
        }
        .step-item,
        .capture-step-row {
            display: flex;
            align-items: center;
            gap: 8px;
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 6px 8px;
        }
        .step-num,
        .capture-step-num {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--accent-soft);
            color: var(--accent);
            font-size: var(--fs-xs);
            font-weight: 700;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .step-item input,
        .capture-step-row input {
            border: none !important;
            background: transparent !important;
            box-shadow: none !important;
            flex: 1;
            font-family: inherit;
            font-size: var(--fs-base);
            color: var(--text-primary);
            outline: none;
            padding: 2px 0 !important;
            min-width: 0;
        }
        .step-add-row {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 2px 4px;
        }
        .step-add-row input {
            flex: 1;
            border: none !important;
            background: transparent !important;
            box-shadow: none !important;
            font-family: inherit;
            font-size: var(--fs-sm);
            color: var(--text-primary);
            outline: none;
            padding: 4px 2px !important;
            min-width: 0;
        }
        .step-add-row input::placeholder { color: var(--text-muted); }

        .progressive-triggers {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
            padding-top: 2px;
        }
        .ghost-add-chip {
            border: 1px dashed #cbd5e1;
            background: transparent;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: var(--fs-xs);
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 999px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 5px;
            transition: all 0.15s ease;
        }
        .ghost-add-chip:hover {
            border-style: solid;
            border-color: var(--accent);
            color: var(--accent);
            background: var(--accent-soft);
        }
        .ghost-add-chip.active {
            border-style: solid;
            background: var(--bg-subtle);
            color: var(--text-primary);
            border-color: #cbd5e1;
        }
        .ghost-add-chip .icon { width: 14px; height: 14px; }

        .attributes-bar {
            padding: 10px 20px;
            display: flex;
            align-items: center;
            gap: 7px;
            flex-wrap: wrap;
            border-top: 1px solid var(--border);
            background: var(--bg-card);
            position: relative;
            flex-shrink: 0;
            overflow: visible;
            z-index: 8;
        }
        .attr-chip {
            border: 1px solid var(--border);
            background: var(--bg-panel);
            color: var(--text-secondary);
            font-family: inherit;
            font-size: var(--fs-sm);
            font-weight: 600;
            padding: 6px 11px;
            border-radius: 9px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: all 0.15s ease;
            user-select: none;
        }
        .attr-chip:hover {
            border-color: #94a3b8;
            color: var(--text-primary);
        }
        .attr-chip.selected-primary,
        .attr-chip.has-value {
            background: var(--accent-soft);
            border-color: rgba(37, 99, 235, 0.35);
            color: var(--accent);
        }
        .attr-chip.selected-amber {
            background: rgba(217, 119, 6, 0.1);
            border-color: rgba(217, 119, 6, 0.35);
            color: var(--warning);
        }
        .attr-chip .icon { width: 14px; height: 14px; }

        .capture-popover {
            display: none;
            position: absolute;
            top: calc(100% + 8px);
            left: 16px;
            z-index: 50;
            background: var(--bg-panel);
            border: 1px solid var(--border);
            border-radius: 16px;
            box-shadow: var(--shadow-lg);
            padding: 8px;
            min-width: 240px;
            flex-direction: column;
            gap: 2px;
        }
        .capture-popover.open { display: flex; }
        .pop-item {
            border: none;
            background: transparent;
            color: var(--text-primary);
            font-family: inherit;
            font-size: var(--fs-base);
            font-weight: 650;
            padding: 10px 12px;
            border-radius: 10px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            text-align: left;
            gap: 12px;
        }
        .pop-item:hover { background: var(--bg-card-hover); }
        .pop-item small {
            color: var(--text-muted);
            font-weight: 500;
            font-size: var(--fs-xs);
        }

        .card-footer {
            padding: 12px 20px;
            border-top: 1px solid var(--border);
            background: var(--bg-panel);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            flex-wrap: wrap;
            flex-shrink: 0;
            border-radius: 0 0 18px 18px;
            position: relative;
            z-index: 1;
        }
        .capacity-pill {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: var(--fs-xs);
            color: var(--text-secondary);
            font-weight: 500;
            min-width: 0;
        }
        .slot-dots {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            flex-shrink: 0;
        }
        .slot-dot {
            width: 8px;
            height: 8px;
            border-radius: 2px;
            background: var(--border);
        }
        .slot-dot.filled { background: var(--accent); }
        .slot-dot.warn { background: var(--warning); }
        .slot-dot.danger { background: var(--danger); }
        .footer-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-left: auto;
        }
        .kbd-hint {
            font-size: var(--fs-xs);
            color: var(--text-muted);
            margin-right: 4px;
        }
        .btn-submit-capture {
            border: none;
            background: var(--accent);
            color: #fff;
            font-family: inherit;
            font-size: var(--fs-base);
            font-weight: 700;
            padding: 9px 18px;
            border-radius: 10px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
            transition: all 0.15s ease;
        }
        .btn-submit-capture:hover {
            background: var(--accent-hover);
            transform: translateY(-1px);
        }
        .capture-hidden-fields {
            position: absolute;
            width: 0;
            height: 0;
            overflow: hidden;
            opacity: 0;
            pointer-events: none;
        }
        #captureModal > .capture-popover,
        #captureModal > .capture-cal-pop {
            position: fixed;
            z-index: 200;
            display: none;
        }
        #captureModal > .capture-popover.open,
        #captureModal > .capture-cal-pop.open {
            display: flex;
        }
        #captureModal > .capture-cal-pop.open {
            display: block;
        }
        #captureModal > .capture-cal-pop {
            padding: 14px;
            border-radius: 18px;
            border: 1px solid rgba(226, 232, 240, 0.95);
            box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18), 0 2px 10px rgba(15, 23, 42, 0.06);
            background: #fff;
            width: min(320px, calc(100vw - 24px));
        }
        #captureModal > .capture-cal-pop .cal-month-panel {
            border: none;
            padding: 0;
            background: transparent;
            border-radius: 0;
        }
        #captureModal > .capture-cal-pop .cal-month-title {
            font-size: var(--fs-md);
            font-weight: 750;
            letter-spacing: -0.02em;
        }
        #captureModal > .capture-cal-pop .cal-weekdays {
            gap: 4px;
            margin-bottom: 6px;
        }
        #captureModal > .capture-cal-pop .cal-weekdays span {
            font-size: var(--fs-xs);
            color: var(--text-muted);
        }
        #captureModal > .capture-cal-pop .cal-grid {
            gap: 5px;
        }
        #captureModal > .capture-cal-pop .cal-day {
            height: 36px;
            border-radius: 10px;
            background: #f1f5f9;
            font-size: var(--fs-sm);
            font-weight: 650;
        }
        #captureModal > .capture-cal-pop .cal-day.is-today {
            border-color: rgba(37, 99, 235, 0.55);
            background: #fff;
            color: var(--text-primary);
            box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
        }
        #captureModal > .capture-cal-pop .cal-day.is-today:hover:not(:disabled):not(.is-peek) {
            background: var(--accent-soft);
            color: var(--accent);
        }
        #captureModal > .capture-cal-pop .cal-day.is-peek {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent);
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
        }
        #captureModal > .capture-cal-pop .cal-day.is-peek:hover:not(:disabled) {
            background: var(--accent-hover);
            border-color: var(--accent-hover);
            color: #fff;
        }
        #captureModal > .capture-cal-pop .cal-day.is-friday:not(.is-peek) {
            color: var(--accent);
        }
        #captureModal > .capture-cal-pop .date-picker-actions {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid #e2e8f0;
        }
        #captureModal > .capture-cal-pop .date-picker-actions .btn-ghost {
            border-radius: 10px;
            padding: 8px 12px;
            font-size: var(--fs-sm);
            font-weight: 650;
            color: var(--text-primary);
            border: 1px solid transparent;
            background: transparent;
        }
        #captureModal > .capture-cal-pop .date-picker-actions .btn-ghost:hover {
            background: #f1f5f9;
        }

        .capture-field-label {
            display: block;
            font-size: var(--fs-sm);
            font-weight: 600;
            text-transform: none;
            letter-spacing: 0;
            color: var(--text-secondary);
            margin-bottom: 6px;
        }

        .capture-desc {
            width: 100%;
            min-height: 64px;
            resize: vertical;
            padding: 10px 12px;
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            background: var(--bg-subtle);
            color: var(--text-primary);
            font: inherit;
            line-height: 1.45;
        }
        .capture-desc:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-soft);
        }

        .capture-steps {
            border: none;
            border-radius: 0;
            background: transparent;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .capture-step-row {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .capture-step-row input {
            flex: 1;
            padding: 7px 10px;
            font-size: var(--fs-base);
        }

        .capture-step-num {
            width: 22px;
            text-align: center;
            font-size: var(--fs-xs);
            font-weight: 700;
            color: var(--text-muted);
            font-variant-numeric: tabular-nums;
        }

        .capture-steps-add {
            display: flex;
            gap: 6px;
        }

        .capture-steps-add input {
            flex: 1;
            padding: 7px 10px;
            font-size: var(--fs-base);
        }

        .capture-steps-empty {
            font-size: var(--fs-xs);
            color: var(--text-muted);
            padding: 4px 6px;
        }

        .capture-footer-row {
            display: flex;
            align-items: center;
            justify-content: stretch;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 4px;
            padding-top: 4px;
        }
        .capture-footer-row .btn-primary {
            width: 100%;
            min-height: 46px;
            justify-content: center;
            border-radius: 12px;
            font-size: var(--fs-md);
        }

        .task-desc {
            font-size: var(--fs-sm);
            color: var(--text-secondary);
            line-height: 1.4;
            margin-top: 2px;
            white-space: pre-wrap;
        }


        @keyframes dictationPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.55; }
        }

        .field-with-mic {
            position: relative;
        }
        .field-with-mic textarea,
        .field-with-mic input[type="text"] {
            padding-right: 40px;
            width: 100%;
        }
        .field-with-mic .input-mic-btn {
            position: absolute;
            right: 4px;
            top: 0;
            bottom: 0;
            margin-block: auto;
            height: 30px;
            width: 30px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transform: none;
            gap: 0;
        }
        /* Описание: микрофон внутри поля, слева от полосы скролла */
        .field-with-mic.textarea-mic {
            display: block;
            position: relative;
        }
        .field-with-mic.textarea-mic textarea {
            width: 100%;
            padding-right: 54px;
            scrollbar-gutter: stable;
        }
        .field-with-mic.textarea-mic .input-mic-btn {
            position: absolute;
            right: 20px;
            top: 8px;
            bottom: auto;
            margin-block: 0;
            z-index: 2;
        }
        .input-mic-btn.is-listening {
            color: #fff;
            background: var(--danger);
            border-radius: 8px;
            animation: dictationPulse 1s ease-in-out infinite;
            width: 30px;
            padding: 0;
        }
        input.is-dictating-field,
        textarea.is-dictating-field {
            border-color: var(--danger) !important;
            box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
            caret-color: transparent;
        }
        .dictation-status {
            position: fixed;
            left: 50%;
            bottom: max(18px, env(safe-area-inset-bottom));
            transform: translateX(-50%);
            z-index: 420;
            display: none;
            align-items: center;
            gap: 10px;
            padding: 10px 12px 10px 14px;
            border-radius: 999px;
            background: #0f172a;
            color: #fff;
            box-shadow: var(--shadow-lg);
            font-size: var(--fs-sm);
            font-weight: 600;
            max-width: calc(100vw - 24px);
        }
        .dictation-status.active { display: inline-flex; }
        body.voice-capture-open .dictation-status { display: none !important; }
        .dictation-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #ef4444;
            animation: dictationPulse 1s ease-in-out infinite;
            flex-shrink: 0;
        }
        .dictation-status-text {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        /* Мобильный нижний dock: одна полоса «добавить + голос» */
        .mobile-add-fab {
            display: none;
            position: fixed;
            left: max(var(--mobile-dock-side), env(safe-area-inset-left, 0px));
            right: max(var(--mobile-dock-side), env(safe-area-inset-right, 0px));
            top: auto;
            bottom: var(--mobile-bottom-inset);
            transform: none;
            z-index: 260;
            flex-direction: row;
            align-items: center;
            gap: 0;
            pointer-events: none;
            padding: 0;
            margin: 0;
            width: auto;
            box-sizing: border-box;
        }
        .mobile-add-fab > * { pointer-events: auto; }
        .mobile-dock-bar {
            display: flex;
            align-items: center;
            gap: 2px;
            width: 100%;
            height: var(--mobile-dock-h);
            padding: 4px 4px 4px 14px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: var(--bg-panel);
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
            box-sizing: border-box;
        }
        .mobile-add-fab-main {
            flex: 1;
            min-width: 0;
            width: auto;
            height: 100%;
            border-radius: 999px;
            border: none;
            background: transparent;
            color: var(--text-primary);
            box-shadow: none;
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            gap: 10px;
            padding: 0 8px 0 2px;
            cursor: pointer;
            font-family: inherit;
            font-size: var(--fs-sm);
            font-weight: 600;
            transition: background 0.15s ease, color 0.15s ease;
        }
        .mobile-add-fab-main:hover,
        .mobile-add-fab-main:active {
            background: var(--bg-subtle);
            width: auto;
            transform: none;
        }
        .mobile-add-fab-main .icon {
            width: 18px;
            height: 18px;
            color: var(--accent);
            flex-shrink: 0;
            transition: none;
        }
        .mobile-add-fab-main-label {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: var(--text-secondary);
            font-weight: 550;
        }
        .mobile-add-fab.is-open .mobile-dock-bar {
            border-color: var(--accent);
        }
        .mobile-add-fab-menu {
            display: none;
        }
        .mobile-add-fab-opt {
            display: none;
        }
        .mobile-add-fab-opt.is-mic {
            display: inline-flex;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            box-shadow: none;
            align-items: center;
            justify-content: center;
            padding: 0;
            cursor: pointer;
            flex-shrink: 0;
        }
        .mobile-add-fab-opt.is-mic:hover,
        .mobile-add-fab-opt.is-mic:active {
            background: var(--accent-soft);
            color: var(--accent);
        }
        .mobile-add-fab-opt.is-mic .icon {
            width: 18px;
            height: 18px;
        }

        /* Нижняя панель голосового сбора задачи */
        .voice-capture-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 430;
            align-items: flex-end;
            justify-content: center;
            background: rgba(15, 23, 42, 0.42);
            padding: 0;
        }
        .voice-capture-overlay.active {
            display: flex;
        }
        .voice-capture-sheet {
            width: 100%;
            max-width: 480px;
            margin: 0 auto;
            border-radius: 22px 22px 0 0;
            background: var(--bg-panel);
            color: var(--text-primary);
            border-top: 1px solid var(--border);
            padding: 18px 20px max(22px, env(safe-area-inset-bottom));
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.16);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            animation: voiceSheetUp 0.28s ease;
        }
        @keyframes voiceSheetUp {
            from { transform: translateY(24px); opacity: 0.6; }
            to { transform: translateY(0); opacity: 1; }
        }
        .voice-capture-bars {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            height: 48px;
            margin-top: 4px;
        }
        .voice-capture-bars span {
            width: 4px;
            height: 12px;
            border-radius: 999px;
            background: var(--accent);
            animation: voiceBarPulse 1s ease-in-out infinite;
        }
        .voice-capture-bars span:nth-child(1) { animation-delay: 0s; }
        .voice-capture-bars span:nth-child(2) { animation-delay: 0.1s; }
        .voice-capture-bars span:nth-child(3) { animation-delay: 0.2s; }
        .voice-capture-bars span:nth-child(4) { animation-delay: 0.05s; }
        .voice-capture-bars span:nth-child(5) { animation-delay: 0.15s; }
        .voice-capture-bars span:nth-child(6) { animation-delay: 0.25s; }
        .voice-capture-bars span:nth-child(7) { animation-delay: 0.12s; }
        .voice-capture-overlay.is-hearing .voice-capture-bars span {
            background: var(--success);
            animation-duration: 0.55s;
        }
        @keyframes voiceBarPulse {
            0%, 100% { height: 10px; opacity: 0.55; }
            50% { height: 36px; opacity: 1; }
        }
        .voice-capture-label {
            font-size: var(--fs-lg);
            font-weight: 700;
            text-align: center;
            color: var(--text-primary);
        }
        .voice-capture-hint {
            font-size: var(--fs-sm);
            color: var(--text-secondary);
            text-align: center;
            line-height: 1.35;
            max-width: 300px;
        }
        .voice-capture-transcript {
            width: 100%;
            max-height: min(28vh, 180px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            margin-top: 2px;
            padding: 12px 14px;
            border-radius: 14px;
            background: var(--bg-subtle);
            border: 1px solid var(--border-subtle);
            text-align: left;
            font-size: var(--fs-md);
            line-height: 1.45;
            color: var(--text-primary);
            word-break: break-word;
        }
        .voice-capture-transcript[hidden] { display: none !important; }
        .voice-capture-transcript .vc-final { color: var(--text-primary); }
        .voice-capture-transcript .vc-interim {
            color: var(--accent);
            font-style: italic;
        }
        .voice-capture-transcript.is-empty {
            color: var(--text-muted);
            font-style: italic;
            text-align: center;
        }
        .voice-capture-actions {
            display: flex;
            gap: 10px;
            width: 100%;
            margin-top: 6px;
        }
        .voice-capture-actions button {
            flex: 1;
            min-height: 48px;
            border-radius: 14px;
            font-weight: 700;
            font-size: var(--fs-md);
            border: none;
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
        }
        .voice-capture-stop {
            background: var(--danger) !important;
            color: #fff !important;
            box-shadow: 0 6px 16px rgba(220, 38, 38, 0.28);
        }
        .voice-capture-cancel {
            background: var(--bg-subtle) !important;
            color: var(--text-primary) !important;
            border: 1px solid var(--border) !important;
        }
        html[data-theme="dark"] .voice-capture-overlay {
            background: rgba(0, 0, 0, 0.62);
        }
        html[data-theme="dark"] .voice-capture-sheet {
            background: var(--bg-panel);
            border-top-color: var(--border);
            box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.55);
        }
        html[data-theme="dark"] .voice-capture-cancel {
            background: var(--bg-subtle) !important;
            border-color: var(--border) !important;
            color: var(--text-primary) !important;
        }
        html[data-theme="dark"] .voice-capture-stop {
            background: #dc2626 !important;
            color: #fff !important;
        }

        /* Подтверждение разбора голоса */
        .voice-parse-overlay {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 435;
            align-items: flex-end;
            justify-content: center;
            background: rgba(11, 15, 25, 0.5);
        }
        .voice-parse-overlay.active { display: flex; }
        .voice-parse-sheet {
            width: 100%;
            max-width: 480px;
            max-height: min(86vh, 720px);
            margin: 0 auto;
            border-radius: 22px 22px 0 0;
            background: var(--bg-card, #fff);
            color: var(--text-primary);
            padding: 18px 18px max(18px, env(safe-area-inset-bottom));
            box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.28);
            display: flex;
            flex-direction: column;
            gap: 12px;
            animation: voiceSheetUp 0.28s ease;
        }
        .voice-parse-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        .voice-parse-head h3 {
            margin: 0;
            font-size: var(--fs-lg);
            font-weight: 750;
        }
        .voice-parse-raw {
            font-size: var(--fs-sm);
            color: var(--text-secondary);
            line-height: 1.35;
            max-height: 3.2em;
            overflow: hidden;
        }
        .voice-parse-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
            padding: 28px 10px 18px;
        }
        .voice-parse-loading[hidden],
        .voice-parse-list[hidden],
        .voice-parse-actions[hidden],
        .voice-parse-raw[hidden] {
            display: none !important;
        }
        .voice-parse-spinner {
            width: 52px;
            height: 52px;
            border-radius: 50%;
            border: 3px solid rgba(59, 130, 246, 0.2);
            border-top-color: #3b82f6;
            animation: voiceParseSpin 0.85s linear infinite;
        }
        @keyframes voiceParseSpin {
            to { transform: rotate(360deg); }
        }
        .voice-parse-loading-text {
            font-weight: 650;
            font-size: var(--fs-md);
        }
        .voice-parse-dots span {
            display: inline-block;
            width: 6px;
            height: 6px;
            margin: 0 2px;
            border-radius: 50%;
            background: #3b82f6;
            animation: voiceParseDot 1.1s ease-in-out infinite;
        }
        .voice-parse-dots span:nth-child(2) { animation-delay: 0.15s; }
        .voice-parse-dots span:nth-child(3) { animation-delay: 0.3s; }
        @keyframes voiceParseDot {
            0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
            40% { opacity: 1; transform: translateY(-4px); }
        }
        .voice-parse-list {
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
            min-height: 0;
            flex: 1;
        }
        .voice-parse-card {
            border: 1px solid var(--border-subtle, rgba(0,0,0,0.08));
            border-radius: 14px;
            padding: 12px 14px;
            background: var(--bg-elevated, rgba(127,127,127,0.06));
        }
        .voice-parse-card-title {
            font-weight: 700;
            font-size: var(--fs-md);
            margin: 0 0 8px;
            color: var(--text-primary);
        }
        .voice-parse-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
        }
        .voice-parse-chip {
            font-size: var(--fs-xs);
            font-weight: 650;
            padding: 4px 8px;
            border-radius: 999px;
            background: rgba(59, 130, 246, 0.12);
            color: var(--text-primary);
        }
        .voice-parse-steps {
            margin: 8px 0 0;
            padding-left: 1.1em;
            font-size: var(--fs-sm);
            color: var(--text-secondary);
        }
        .voice-parse-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .voice-parse-actions button {
            flex: 1;
            min-width: 110px;
            min-height: 46px;
            border-radius: 14px;
            font-weight: 700;
            font-size: var(--fs-md);
            border: none;
            cursor: pointer;
        }
        .voice-parse-confirm {
            background: var(--accent);
            color: #fff;
        }
        .voice-parse-edit {
            background: var(--accent-soft);
            color: var(--text-primary);
        }
        .voice-parse-cancel-btn {
            background: var(--bg-subtle);
            color: var(--text-primary);
            border: 1px solid var(--border) !important;
        }
        html[data-theme="dark"] .voice-parse-overlay {
            background: rgba(0, 0, 0, 0.62);
        }
        html[data-theme="dark"] .voice-parse-sheet {
            background: var(--bg-panel);
            border-top: 1px solid var(--border);
        }
        html[data-theme="dark"] .voice-parse-card {
            background: var(--bg-subtle);
            border-color: var(--border);
        }

        /* 7.7: индикатор сети и синхронизации в шапке */
        .sync-badge {
            height: 30px;
            border-radius: 999px;
            padding: 0 11px 0 9px;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            font-size: var(--fs-xs);
            font-weight: 600;
            white-space: nowrap;
            border: 1px solid var(--border-subtle);
            background: var(--bg-subtle);
            color: var(--text-secondary);
            flex-shrink: 0;
            user-select: none;
        }
        .sync-badge[hidden] { display: none; }
        .sync-badge-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: currentColor;
            flex-shrink: 0;
        }
        .sync-badge-short { display: none; }
        .sync-badge.is-offline {
            border-color: rgba(217, 119, 6, 0.35);
            background: var(--warning-soft);
            color: var(--warning);
        }
        .sync-badge.is-syncing { color: var(--accent); border-color: rgba(37, 99, 235, 0.3); background: var(--accent-soft); }
        .sync-badge.is-syncing .sync-badge-dot { animation: blinkDot 1.1s infinite; }
        html[data-theme="dark"] .sync-badge.is-offline { color: #fbbf24; border-color: rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.1); }
        html[data-theme="dark"] .sync-badge.is-syncing { color: #93c5fd; border-color: rgba(147, 197, 253, 0.3); background: rgba(147, 197, 253, 0.1); }
        .ai-bot-chat-input.is-offline textarea::placeholder { color: var(--warning); opacity: 1; }
        .ai-bot-chat-input.is-offline .send,
        .ai-bot-chat-input.is-offline .input-mic-btn { opacity: 0.45; cursor: not-allowed; }
