body { font-family: 'Inter', 'Kantumruy Pro', sans-serif; }
        .active-tab { border-bottom: 2px solid #127327; color: #127327; font-weight: 600; }
        #designerWorkspace:empty,
        #designerToolbar:empty,
        #designerFormBuilder:empty,
        #designerFormPreview:empty,
        #designerNotificationEditor:empty,
        #designerSlaPolicyEditor:empty,
        #designerEvidenceEditor:empty,
        #designerError:empty,
        #reviewList:empty,
        #reviewControls:empty,
        #reviewDiff:empty,
        #reviewError:empty,
        #calendarError:empty,
        #serviceCatalogCards:empty {
            display: none !important;
        }
        #designerCanvas:empty {
            display: none !important;
        }
        /* Stage (palette + canvas + inspector) is shown only once a package is rendered on the canvas. */
        #designerStage:has(#designerCanvas:empty) {
            display: none !important;
        }
        #designerInspector:empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 420px;
            text-align: center;
            color: #64748b;
            background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
            border-style: dashed;
        }
        #designerInspector:empty::before {
            content: "Nhấp vào một Node trên sơ đồ luồng bên trái để cấu hình chi tiết bước xử lý, người nhận việc (Assignee Resolver), phân nhánh điều kiện (SafeExpression) hoặc thời hạn SLA (dueHours). Để nối 2 bước: nhấp chấm tròn (port) ở đáy node nguồn rồi nhấp vào node đích.";
            font-size: 0.82rem;
            line-height: 1.55;
            max-width: 280px;
            padding: 1.25rem;
            background: #f1f5f9;
            border-radius: 0.75rem;
            border: 1px solid #e2e8f0;
            color: #334155;
            font-weight: 500;
        }
        button[data-def-card="1"] {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: space-between;
            text-align: left;
            padding: 1rem 1.15rem;
            border-radius: 0.85rem;
            border: 1px solid #e2e8f0;
            background: #ffffff;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
            transition: all 0.16s ease;
            font-weight: 700;
            color: #0f172a;
            font-size: 0.92rem;
            line-height: 1.35;
            min-height: 6.5rem;
            width: 100%;
        }
        button[data-def-card="1"]:hover {
            border-color: #127327;
            background: #f0fdf4;
            box-shadow: 0 6px 14px -3px rgba(18, 115, 39, 0.12);
            transform: translateY(-1px);
        }
        button[data-def-card="1"]::before {
            content: attr(data-code);
            display: inline-block;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 0.68rem;
            font-weight: 700;
            color: #127327;
            background: #dcfce7;
            border: 1px solid #bbf7d0;
            padding: 0.12rem 0.5rem;
            border-radius: 9999px;
            margin-bottom: 0.45rem;
            letter-spacing: 0.02em;
        }
        button[data-def-card="1"]::after {
            content: attr(data-meta);
            display: block;
            font-size: 0.72rem;
            font-weight: 500;
            color: #64748b;
            margin-top: 0.55rem;
            padding-top: 0.45rem;
            border-top: 1px dashed #e2e8f0;
            width: 100%;
        }
        label[data-hint] {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 0.74rem;
            color: #64748b;
        }
        label[data-hint]::before {
            content: attr(data-hint) " · ";
            font-family: 'Inter', 'Kantumruy Pro', sans-serif;
            font-weight: 700;
            font-size: 0.8rem;
            color: #0f172a;
        }
        /* Visual workflow designer: node cards */
        .workflow-node-card {
            position: relative;
            width: 230px;
            background: #ffffff;
            border-radius: 14px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
            transition: box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
        }
        .workflow-node-card:hover {
            box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.12);
            border-color: #cbd5e1;
        }
        .workflow-node-card.selected {
            border-color: #127327;
            outline: 2px solid #127327;
            box-shadow: 0 0 0 4px rgba(18, 115, 39, 0.15);
        }
        .workflow-node-card.status-completed {
            border-color: #127327;
        }
        .workflow-node-card.status-completed .node-header {
            background: #dcfce7;
        }
        .workflow-node-card.status-current {
            border-color: #2563eb;
            outline: 2px solid #2563eb;
            box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.18);
        }
        .workflow-node-card.status-rejected {
            border-color: #ef4444;
        }
        .workflow-node-card.status-pending {
            opacity: 0.65;
            background: #fafafa;
        }
        .workflow-node-card.status-paused {
            border-color: #f59e0b;
            background: #fffbeb;
        }
        .workflow-node-card.status-active {
            border-color: #2563eb;
            outline: 2px solid #2563eb;
            box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.18);
        }
        /* Node outcome branches */
        .node-branches .branch-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 7px;
            border: 1px solid transparent;
            font-size: 11px;
            font-weight: 600;
            padding: 4px 8px;
        }
        .branch-row.approve {
            color: #127327;
            background: #f0fdf4;
            border-color: #bbf7d0;
        }
        .branch-row.reject {
            color: #dc2626;
            background: #fef2f2;
            border-color: #fecaca;
        }
        /* Rounded connector wires (SVG paths) */
        .wire-path {
            fill: none;
            stroke: #cbd5e1;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        .wire-path.completed {
            stroke: #127327;
            stroke-width: 2.2;
        }
        .wire-path.active {
            stroke: #2563eb;
            stroke-width: 2.4;
            stroke-dasharray: 4, 3;
            animation: flowDash 1s linear infinite;
        }
        .wire-path.rejected {
            stroke: #ef4444;
            stroke-width: 2.2;
        }
        .wire-path.skipped {
            stroke: #94a3b8;
            stroke-width: 1.5;
            stroke-dasharray: 4, 4;
            opacity: 0.6;
        }
        @keyframes flowDash {
            to { stroke-dashoffset: -14; }
        }
        /* Collapsible side panels */
        .palette-panel,
        .inspector-panel {
            transition: width 0.25s ease, min-width 0.25s ease, margin 0.25s ease, opacity 0.2s ease, border-width 0.25s ease;
        }
        .palette-panel.collapsed {
            width: 0 !important;
            min-width: 0 !important;
            overflow: hidden;
            border-right: none;
            opacity: 0;
            pointer-events: none;
            margin: 0 !important;
            border-width: 0;
            max-height: 0;
        }
        .inspector-panel.collapsed {
            width: 0 !important;
            min-width: 0 !important;
            overflow: hidden;
            border-left: none;
            opacity: 0;
            pointer-events: none;
            margin: 0 !important;
            border-width: 0;
            max-height: 0;
        }
        .panel-expand-btn {
            position: absolute;
            top: 14px;
            z-index: 25;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            padding: 6px 11px;
            font-size: 11px;
            font-weight: 700;
            color: #334155;
            cursor: pointer;
            display: none;
            align-items: center;
            gap: 6px;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
        }
        .panel-expand-btn.left { left: 14px; }
        .panel-expand-btn.right { right: 14px; }
        .panel-expand-btn.visible { display: inline-flex; }
        /* Connection ports */
        .port {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #94a3b8;
            border: 2px solid #ffffff;
            box-shadow: 0 0 0 1px #cbd5e1;
            position: absolute;
            cursor: crosshair;
            z-index: 15;
        }
        .no-scrollbar::-webkit-scrollbar {
            display: none;
        }
        .no-scrollbar {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        /* TASK-030: Semantic Light/Dark Mode (WCAG AA >= 4.5:1) */
        [data-theme-icon="sun"] { display: none; }
        [data-theme-icon="moon"] { display: inline-block; }
        html.dark [data-theme-icon="sun"] { display: inline-block; }
        html.dark [data-theme-icon="moon"] { display: none; }
        html.dark body {
            background-color: #0b141a !important;
            color: #e6f0f4 !important;
        }
        html.dark header {
            background-color: #102028 !important;
            border-color: #243b47 !important;
        }
        html.dark .bg-white,
        html.dark .bg-white\/90 {
            background-color: #13232c !important;
        }
        html.dark .bg-gradient-to-r,
        html.dark .bg-gradient-to-br,
        html.dark .bg-gradient-to-l {
            background-image: none !important;
            background-color: #152833 !important;
        }
        html.dark .bg-gray-50,
        html.dark .bg-gray-50\/60,
        html.dark .bg-slate-50,
        html.dark .bg-slate-50\/70,
        html.dark .bg-gray-100,
        html.dark .bg-slate-100 {
            background-color: #182b36 !important;
        }
        html.dark .bg-gray-200 {
            background-color: #223845 !important;
        }
        html.dark .bg-emerald-50,
        html.dark .bg-green-50,
        html.dark .bg-emerald-50\/30,
        html.dark .bg-emerald-100,
        html.dark .bg-green-100 {
            background-color: rgba(18, 115, 39, 0.28) !important;
        }
        html.dark .bg-blue-50,
        html.dark .bg-blue-100,
        html.dark .bg-sky-50,
        html.dark .bg-sky-50\/70,
        html.dark .bg-indigo-50,
        html.dark .bg-indigo-100 {
            background-color: rgba(30, 64, 175, 0.28) !important;
        }
        html.dark .bg-purple-50,
        html.dark .bg-purple-100 {
            background-color: rgba(107, 33, 168, 0.30) !important;
        }
        html.dark .bg-amber-50,
        html.dark .bg-amber-100,
        html.dark .bg-yellow-50,
        html.dark .bg-yellow-100 {
            background-color: rgba(180, 83, 9, 0.30) !important;
        }
        html.dark .bg-red-50,
        html.dark .bg-red-100 {
            background-color: rgba(153, 27, 27, 0.32) !important;
        }
        html.dark #notificationPopover {
            background-color: #13232c !important;
            border-color: #263f4d !important;
            color-scheme: dark;
        }
        html.dark .border-gray-100,
        html.dark .border-gray-200,
        html.dark .border-gray-300,
        html.dark .border-slate-200,
        html.dark .border-emerald-200,
        html.dark .border-indigo-200,
        html.dark .border-amber-200,
        html.dark .border-amber-300 {
            border-color: #263f4d !important;
        }
        html.dark .divide-gray-100 > :not([hidden]) ~ :not([hidden]),
        html.dark .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
            border-color: #243b47 !important;
        }
        html.dark .text-gray-900,
        html.dark .text-gray-800,
        html.dark .text-slate-900,
        html.dark .text-slate-800,
        html.dark .text-sky-950,
        html.dark .text-amber-950 {
            color: #f1f7fa !important;
        }
        html.dark .text-gray-700,
        html.dark .text-gray-600,
        html.dark .text-slate-700,
        html.dark .text-slate-600 {
            color: #c2d4de !important;
        }
        html.dark .text-gray-500,
        html.dark .text-gray-400,
        html.dark .text-slate-500 {
            color: #93aebc !important;
        }
        html.dark .text-\[\#127327\],
        html.dark .text-green-700,
        html.dark .text-green-800,
        html.dark .text-emerald-800,
        html.dark .text-emerald-700 {
            color: #4ade80 !important;
        }
        html.dark .text-yellow-800,
        html.dark .text-amber-700,
        html.dark .text-amber-800,
        html.dark .text-amber-900 {
            color: #fde68a !important;
        }
        html.dark .text-blue-700,
        html.dark .text-blue-800,
        html.dark .text-sky-900,
        html.dark .text-indigo-700,
        html.dark .text-indigo-800,
        html.dark .text-cyan-700 {
            color: #93c5fd !important;
        }
        html.dark .text-purple-700,
        html.dark .text-purple-800 {
            color: #d8b4fe !important;
        }
        html.dark .text-red-700,
        html.dark .text-red-600 {
            color: #fca5a5 !important;
        }
        html.dark input:not([type="checkbox"]):not([type="radio"]),
        html.dark select,
        html.dark textarea {
            background-color: #0f1d25 !important;
            color: #f1f7fa !important;
            border-color: #2d4a59 !important;
        }
        html.dark option {
            background-color: #13232c;
            color: #f1f7fa;
        }
        html.dark #designerInspector:empty {
            background: #13232c !important;
            color: #93aebc !important;
        }
        html.dark #designerInspector:empty::before {
            background: #182b36 !important;
            border-color: #263f4d !important;
            color: #c2d4de !important;
        }
        html.dark button[data-def-card="1"] {
            background: #13232c !important;
            border-color: #263f4d !important;
            color: #f1f7fa !important;
        }
        html.dark button[data-def-card="1"]:hover {
            border-color: #22c55e !important;
            background: #183229 !important;
        }
        html.dark .active-tab {
            border-bottom-color: #4ade80 !important;
            color: #4ade80 !important;
        }

/* Release v2.9: Inline Attachment Preview Lightbox & Command Palette Polish */
#attachmentPreviewBody iframe {
    min-height: 70vh;
}
#attachmentPreviewBody img {
    max-height: 75vh;
    object-fit: contain;
}

/* Release v2.13.0 (TASK-044): Interactive On-Screen Contextual Guided Walkthrough */
#interactiveGuideOverlay:not(.hidden) {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1.25rem;
    z-index: 70;
    display: flex;
    justify-content: center;
    pointer-events: none;
}
#interactiveGuideCard {
    pointer-events: auto;
    border-width: 2px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(18, 115, 39, 0.2);
}
.interactive-guide-highlight {
    position: relative;
    z-index: 45 !important;
    border-radius: 0.75rem;
    box-shadow: 0 0 0 4px #127327, 0 0 0 10px rgba(18, 115, 39, 0.22), 0 12px 28px -4px rgba(18, 115, 39, 0.28) !important;
    transition: box-shadow 0.25s ease;
}
html.dark .interactive-guide-highlight {
    box-shadow: 0 0 0 4px #4ade80, 0 0 0 10px rgba(74, 222, 128, 0.25), 0 12px 28px -4px rgba(74, 222, 128, 0.35) !important;
}
html.dark #interactiveGuideCard {
    background-color: #13232c !important;
    border-color: #22c55e !important;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(74, 222, 128, 0.35);
}

