:root {
    --sidebar-width: 270px;
    --panel-bg: #ffffff;
    --line: #e5e7eb;
    --sidebar-bg: #111827;
    --accent: #0EB295;
    --accent-dark: #0a8e78;
    --accent-soft: rgba(14, 178, 149, .1);
    --accent-soft-strong: rgba(14, 178, 149, .18);
    --accent-contrast: #e9fbf7;
    --accent-contrast-strong: #d5f7ef;
    --accent-ink: #064e43;
    --bs-primary: #0EB295;
    --bs-primary-rgb: 14, 178, 149;
    --bs-link-color: #0a8e78;
    --bs-link-hover-color: #087361;

    /* Automation semantic palette — type identity, not global brand/status replacement. */
    --automation-product-enrichment: #0EB295;
    --automation-product-enrichment-bg: #EAF8F4;
    --automation-variant-options: #0EB295;
    --automation-variant-options-bg: #EAF8F4;
    --automation-ai-content: #8B5CF6;
    --automation-ai-content-bg: #F3EEFF;
    --automation-seo: #3B82F6;
    --automation-seo-bg: #EAF2FF;
    --automation-collection: #27B58A;
    --automation-collection-bg: #EDF9F5;
    --automation-publish: #F97316;
    --automation-publish-bg: #FFF1E8;
    --automation-collection-blog: #F59E0B;
    --automation-collection-blog-bg: #FFF6E5;
    --automation-scheduled-topic: #4F46E5;
    --automation-scheduled-topic-bg: #EEF0FF;

    /* App-wide semantic status palette — shared by Products, Automations, Reviews and Admin status labels. */
    --status-active: #16A36A;
    --status-active-bg: #EAF8F1;
    --status-draft: #667085;
    --status-draft-bg: #F2F4F7;
    --status-inactive: #98A2B3;
    --status-inactive-bg: #F5F7FA;
    --status-optimized: #0EB295;
    --status-optimized-bg: #EAF8F4;
    --status-needs-review: #E68A2E;
    --status-needs-review-bg: #FFF3E6;
    --status-published: #16A36A;
    --status-published-bg: #EAF8F1;
    --status-processing: #3B82F6;
    --status-processing-bg: #EAF2FF;
    --status-synced: #0EA5A8;
    --status-synced-bg: #E9F8F8;
    --status-failed: #E5484D;
    --status-failed-bg: #FDECEC;
    --status-not-started: #98A2B3;
    --status-not-started-bg: #F5F7FA;
    --status-pending: #E68A2E;
    --status-pending-bg: #FFF3E6;
    --status-approved: #16A36A;
    --status-approved-bg: #EAF8F1;
}

/* Shared semantic status label. Color never carries meaning alone; text remains visible. */
.skuze-status {
    --status-color: var(--status-inactive);
    --status-bg: var(--status-inactive-bg);
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    min-height: 1.55rem;
    padding: .22rem .5rem;
    border: 1px solid color-mix(in srgb, var(--status-color) 12%, transparent);
    border-radius: .48rem;
    background: var(--status-bg) !important;
    color: var(--status-color) !important;
    font-size: .65rem;
    font-weight: 680;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: none;
}
.skuze-status.is-active { --status-color: var(--status-active); --status-bg: var(--status-active-bg); }
.skuze-status.is-draft { --status-color: var(--status-draft); --status-bg: var(--status-draft-bg); }
.skuze-status.is-inactive { --status-color: var(--status-inactive); --status-bg: var(--status-inactive-bg); }
.skuze-status.is-optimized { --status-color: var(--status-optimized); --status-bg: var(--status-optimized-bg); }
.skuze-status.is-needs-review { --status-color: var(--status-needs-review); --status-bg: var(--status-needs-review-bg); }
.skuze-status.is-published { --status-color: var(--status-published); --status-bg: var(--status-published-bg); }
.skuze-status.is-processing { --status-color: var(--status-processing); --status-bg: var(--status-processing-bg); }
.skuze-status.is-synced { --status-color: var(--status-synced); --status-bg: var(--status-synced-bg); }
.skuze-status.is-failed { --status-color: var(--status-failed); --status-bg: var(--status-failed-bg); }
.skuze-status.is-not-started { --status-color: var(--status-not-started); --status-bg: var(--status-not-started-bg); }
.skuze-status.is-pending { --status-color: var(--status-pending); --status-bg: var(--status-pending-bg); }
.skuze-status.is-approved { --status-color: var(--status-approved); --status-bg: var(--status-approved-bg); }

body {
    min-height: 100vh;
}


body {
    background:
        radial-gradient(circle at 8% 4%, rgba(14, 178, 149, .09), transparent 28rem),
        linear-gradient(180deg, #f3fbf9 0%, #f7f9fb 32rem, #f4f7f7 100%);
    color: #1f2937;
}

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

a:hover {
    color: #087361;
}

.btn {
    border-radius: .9rem;
    font-weight: 600;
    box-shadow: none;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #087361;
    --bs-btn-active-border-color: #087361;
    --bs-btn-focus-shadow-rgb: 14, 178, 149;
}

.btn-outline-primary {
    --bs-btn-color: var(--accent);
    --bs-btn-border-color: rgba(14, 178, 149, .38);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--accent-dark);
    --bs-btn-active-border-color: var(--accent-dark);
    --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: 14, 178, 149;
}

.progress-bar,
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(14, 178, 149, .42);
    box-shadow: 0 0 0 .2rem rgba(14, 178, 149, .14);
}

.card,
.card-soft,
.surface-subtle,
.stat-card,
.onboarding-step {
    box-shadow: 0 12px 28px rgba(15, 23, 42, .04);
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    padding: 1rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.app-sidebar .app-brand {
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #fff;
}

.app-brand-icon {
    width: 2rem;
    height: 2rem;
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}

.app-sidebar .nav-link {
    color: rgba(255,255,255,.88);
    border-radius: .95rem;
    padding: .8rem .95rem;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.app-sidebar .nav-link i,
.app-bottom-nav i,
.card-icon,
.section-icon,
.btn i {
    line-height: 1;
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link:hover {
    background: rgba(14, 178, 149, .18);
    color: #fff;
}

.app-main {
    flex: 1;
}

.page-dot {
    width: .6rem;
    height: .6rem;
    border-radius: 999px;
    background: var(--accent);
    display: inline-block;
}

.card-soft,
.onboarding-step,
.stat-card {
    border: 1px solid rgba(14, 178, 149, .12);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
}

.stat-card .card-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.2rem;
}

.section-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent);
}

.app-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-around;
    padding: .45rem .25rem calc(.45rem + env(safe-area-inset-bottom));
    z-index: 1040;
}

.app-bottom-nav a {
    text-decoration: none;
    color: #6b7280;
    font-size: .78rem;
    padding: .35rem .4rem;
    min-width: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
}

.app-bottom-nav a i {
    font-size: 1.1rem;
}

.app-bottom-nav a.active {
    color: var(--accent);
    font-weight: 600;
}

.app-bottom-nav a.active i,
.app-bottom-nav a.active span {
    color: var(--accent);
}

.onboarding-step {
    padding: .9rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.onboarding-step.done {
    border-color: rgba(25,135,84,.25);
    background: #f6fffa;
}

.onboarding-step .status-icon {
    font-size: 1.2rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.auth-brand-lockup {
    justify-content: center;
}

.auth-brand-image {
    display: block;
    width: min(100%, 18rem);
    height: auto;
}

.pre-wrap,
pre {
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .app-main .container-fluid {
        padding-bottom: 5.25rem !important;
    }
}


.inline-form { display: inline; }
.nav-logout-form { margin: 0; }
.nav-link-button { width: 100%; border: 0; background: transparent; text-align: left; }
.nav-link-button:hover { background: rgba(220,53,69,.08); }
.review-code { white-space: pre-wrap; word-break: break-word; background: #f8f9fa; border: 1px solid rgba(0,0,0,.06); border-radius: 1rem; padding: .85rem 1rem; min-height: 5rem; margin: 0; }
.field-diff { border: 1px solid rgba(14, 178, 149, .11); border-radius: 1rem; padding: 1rem; background: linear-gradient(180deg, #fff, #fbfefd); }
.field-diff.is-accent { background: linear-gradient(180deg, var(--accent-contrast), #fff); border-color: rgba(14, 178, 149, .22); }
.field-diff.is-accent .display-6 { color: var(--accent-ink); }

.prompt-preset-card{cursor:pointer;transition:all .15s ease-in-out}.prompt-preset-card:hover{transform:translateY(-1px)}

.page-subtitle {
    max-width: 60rem;
}

.editor-surface .html-it-editor,
.editor-surface .html-it-wrapper {
    border-radius: 1rem;
}

.content-panel,
.option-panel,
.review-summary-card {
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 1rem;
    background: #fff;
}

.settings-ai-status-panel {
    padding: 1.1rem 1.2rem;
}

.content-panel {
    padding: 1rem;
}

.option-panel {
    padding: 1rem;
}

.option-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: flex-start;
}

.option-name-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .65rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.option-value-chip {
    display: inline-flex;
    align-items: center;
    padding: .3rem .6rem;
    border-radius: 999px;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,.08);
    font-size: .9rem;
}

.option-stack {
    display: grid;
    gap: .75rem;
}

.option-stack-empty {
    border: 1px dashed rgba(0,0,0,.12);
    border-radius: 1rem;
    padding: 1rem;
    color: #6c757d;
    background: #f8f9fa;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.review-field-card {
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
}

.review-field-card .review-field-head {
    padding: 1rem 1rem .75rem;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.review-compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
}

.review-pane {
    padding: 1rem;
}

.review-pane.is-editable,
.review-pane.is-current {
    background: linear-gradient(180deg, rgba(14, 178, 149, .07), rgba(14, 178, 149, .025));
}

.review-pane.is-old {
    background: linear-gradient(180deg, rgba(15, 23, 42, .025), rgba(255,255,255,.98));
}

.review-pane + .review-pane {
    border-left: 1px solid rgba(0,0,0,.06);
}

.review-pane-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6c757d;
    margin-bottom: .5rem;
    font-weight: 600;
}

.review-value-box {
    min-height: 5rem;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: .9rem;
    background: #f8f9fa;
    padding: .85rem 1rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.review-value-box.is-html {
    white-space: normal;
}

.review-value-box.is-code {
    font-family: var(--bs-font-monospace);
    font-size: .875rem;
}

.review-value-box.is-empty {
    color: #6c757d;
    font-style: italic;
}

.review-html-preview > *:last-child {
    margin-bottom: 0;
}

.review-json-details summary {
    cursor: pointer;
    user-select: none;
}

.review-edit-form {
    display: block;
}

.review-suggested-textarea {
    min-height: 7rem;
    border-radius: 1rem;
    resize: vertical;
}

.review-suggested-html {
    min-height: 14rem;
}

.review-pane .html-it-wrapper,
.review-pane .html-it-editor {
    border-radius: 1rem;
}

.review-option-editor-stack {
    display: grid;
    gap: .85rem;
}

.review-option-editor-card {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .9);
    padding: .95rem;
}

.review-option-editor-values {
    display: grid;
    gap: .75rem;
}

.review-option-editor-value + .review-option-editor-value {
    padding-top: .25rem;
}

.compact-muted {
    color: #6c757d;
    font-size: .9rem;
}


.prompt-template-textarea {
    min-height: 20rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.55;
    white-space: pre-wrap;
    resize: vertical;
}

.prompt-template-textarea:focus {
    box-shadow: 0 0 0 .2rem rgba(14, 178, 149, 0.15);
}

.code-editor-block {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 1rem;
    background: #0f172a;
    overflow: hidden;
}

.code-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.03);
}

.code-editor-shell {
    display: grid;
    grid-template-columns: auto 1fr;
    min-height: 20rem;
    background: #0f172a;
}

.code-editor-gutter {
    min-width: 3.5rem;
    padding: 1rem .65rem 1rem 1rem;
    border-right: 1px solid rgba(255,255,255,.08);
    color: rgba(255,255,255,.45);
    text-align: right;
    font-family: var(--bs-font-monospace);
    font-size: .9rem;
    line-height: 1.6;
    overflow: hidden;
    user-select: none;
    white-space: pre;
}

.code-editor-gutter span {
    display: block;
}

.code-editor-surface {
    min-width: 0;
}

.code-editor-textarea {
    width: 100%;
    min-height: 20rem;
    border: 0;
    border-radius: 0;
    resize: vertical;
    background: #0f172a;
    color: #e2e8f0;
    font-family: var(--bs-font-monospace);
    font-size: .95rem;
    line-height: 1.6;
    padding: 1rem;
    box-shadow: none !important;
    white-space: pre;
    overflow: auto;
}

.code-editor-textarea:focus {
    background: #0f172a;
    color: #f8fafc;
}

.code-editor-textarea::placeholder {
    color: rgba(226,232,240,.45);
}

.review-field-card.is-priority {
    grid-column: 1 / -1;
}

.review-option-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

.review-option-meta .badge {
    font-weight: 500;
}

@media (max-width: 767.98px) {
    .code-editor-shell {
        grid-template-columns: 2.9rem 1fr;
    }

    .code-editor-gutter {
        min-width: 2.9rem;
        padding-left: .55rem;
        padding-right: .45rem;
    }
}


html {
    overflow-x: clip;
}

body {
    overflow-x: clip;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

.app-layout,
.app-main,
.app-main > .container-fluid,
.row > [class*="col"],
.card,
.card-body,
.content-panel,
.option-panel,
.review-summary-card,
.review-field-card,
.review-pane,
.code-editor-block,
.code-editor-shell,
.table-responsive,
.html-it-editor,
.html-it-wrapper {
    min-width: 0;
}

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

.app-sidebar {
    overflow-y: auto;
    overscroll-behavior: contain;
}

.app-main .container-fluid {
    width: min(100%, 1440px);
    margin-inline: auto;
    padding-inline: clamp(1rem, 2vw, 1.5rem);
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.page-toolbar > * {
    min-width: 0;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: stretch;
}

.page-actions .inline-form {
    display: block;
}

.page-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}

.surface-subtle {
    border: 1px solid rgba(14, 178, 149, .14);
    border-radius: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg, var(--accent-contrast), #f8fafc);
    height: 100%;
}

.btn {
    white-space: normal;
}

.btn > span,
.badge,
code,
.compact-muted,
.text-muted,
.review-value-box,
.review-code,
.option-value-chip,
.option-name-badge,
.table-responsive .table td,
.table-responsive .table th {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.form-control,
.form-select,
.html-it-editor,
.html-it-wrapper {
    max-width: 100%;
}

.input-group,
.pagination {
    flex-wrap: wrap;
}

.input-group > .form-control,
.input-group > .form-select {
    min-width: 0;
}

.table-responsive {
    border-radius: 1rem;
    max-width: 100%;
}

.table-responsive .table {
    margin-bottom: 0;
    min-width: 720px;
}

.table-responsive .btn {
    white-space: nowrap;
}

.review-html-preview {
    overflow-wrap: anywhere;
}

.code-editor-toolbar .small {
    flex: 1 1 16rem;
}

.code-editor-toolbar .badge {
    flex: 0 0 auto;
}

.app-page-topbar {
    align-items: center;
}

.min-w-0 {
    min-width: 0;
}

.rule-run-header-status {
    flex: 1 1 28rem;
    max-width: 34rem;
    margin-left: auto;
}

.rule-run-header-card {
    border: 1px solid rgba(14, 178, 149, .18);
    border-radius: .9rem;
    background: linear-gradient(180deg, rgba(233, 251, 247, .96), rgba(255, 255, 255, .98));
    padding: .65rem .8rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}

.rule-run-pulse {
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(14, 178, 149, .32);
    flex: 0 0 auto;
    animation: rule-run-pulse 1.8s infinite;
}

.rule-run-meta {
    font-size: .75rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rule-run-progress {
    height: .35rem;
    background: rgba(14, 178, 149, .12);
}

@keyframes rule-run-pulse {
    0% { box-shadow: 0 0 0 0 rgba(14, 178, 149, .32); }
    70% { box-shadow: 0 0 0 .45rem rgba(14, 178, 149, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 178, 149, 0); }
}

.app-bottom-nav a span {
    line-height: 1.15;
    text-align: center;
}

.cursor-pointer {
    cursor: pointer;
}

@media (max-width: 991.98px) {
    .rule-run-header-status {
        flex-basis: 100%;
        max-width: none;
        width: 100%;
        margin-left: 0;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions > *,
    .page-actions .inline-form,
    .page-actions .inline-form .btn,
    .page-actions > .btn {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .app-main .container-fluid {
        padding-inline: .9rem;
    }

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

    .review-compare {
        grid-template-columns: 1fr;
    }

    .review-pane + .review-pane {
        border-left: 0;
        border-top: 1px solid rgba(0,0,0,.06);
    }

    .table-responsive .table {
        min-width: 640px;
    }

    .content-panel,
    .option-panel,
    .surface-subtle {
        padding: .9rem;
    }

    .code-editor-toolbar {
        padding: .7rem .85rem;
    }
}

.admin-secret-row {
    display: flex;
    gap: .6rem;
    align-items: stretch;
}

.admin-secret-row .form-control {
    min-width: 0;
}

.admin-secret-row .btn {
    flex: 0 0 auto;
}

.admin-accordion .accordion-button {
    border-radius: 1rem !important;
    gap: 1rem;
}

.admin-user-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .75rem 1rem;
    width: 100%;
}

.admin-user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.admin-log-block {
    max-height: 24rem;
    overflow: auto;
}

@media (max-width: 767.98px) {
    .admin-secret-row {
        flex-direction: column;
    }
}

.admin-subnav-wrap {
    display: grid;
    gap: .85rem;
}

.admin-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.admin-subnav-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: #334155;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: .95rem;
    padding: .7rem .95rem;
    font-weight: 600;
}

.admin-subnav-link:hover,
.admin-subnav-link.active {
    color: var(--accent);
    border-color: rgba(14, 178, 149, .22);
    background: var(--accent-soft);
}

.admin-alert-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-alert-card {
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    padding: 1rem;
}

.admin-alert-warning {
    border-color: rgba(255, 193, 7, .28);
    background: #fffdf5;
}

.admin-alert-critical {
    border-color: rgba(220, 53, 69, .2);
    background: #fff8f8;
}

.admin-alert-ok {
    border-color: rgba(25, 135, 84, .18);
    background: #f8fffb;
}

.admin-kv-list {
    display: grid;
    gap: .75rem;
}

.admin-kv-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px dashed rgba(15, 23, 42, .08);
    padding-bottom: .75rem;
}

.admin-kv-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-bar-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    gap: .75rem;
    min-height: 168px;
    align-items: end;
}

.admin-bar {
    display: grid;
    gap: .4rem;
    justify-items: center;
    min-width: 0;
}

.admin-bar-value,
.admin-bar-label {
    font-size: .76rem;
    text-align: center;
    line-height: 1.15;
    color: #64748b;
    word-break: break-word;
}

.admin-bar-column {
    width: 100%;
    min-height: 12px;
    height: var(--bar-height, 4%);
    border-radius: .9rem .9rem .35rem .35rem;
    background: rgba(14, 178, 149, .18);
    position: relative;
    overflow: hidden;
}

.admin-bar-column::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(14, 178, 149, .82);
}

.admin-bar-success .admin-bar-column::after { background: rgba(25, 135, 84, .82); }
.admin-bar-danger .admin-bar-column::after { background: rgba(220, 53, 69, .82); }
.admin-bar-warning .admin-bar-column::after { background: rgba(255, 193, 7, .82); }
.admin-bar-secondary .admin-bar-column::after { background: rgba(100, 116, 139, .82); }

.admin-usage-list {
    display: grid;
    gap: .85rem;
}

.admin-usage-item {
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: .9rem;
    padding: .85rem;
    background: #fff;
}

.admin-progress {
    height: .7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
}

.admin-inline-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.admin-form-stack {
    display: grid;
    gap: 1rem;
}

.admin-user-accordion .accordion-item {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}

.admin-user-accordion .accordion-item + .accordion-item {
    margin-top: .85rem;
}

.admin-user-accordion .accordion-button {
    border: 0;
    box-shadow: none;
    align-items: flex-start;
}

.admin-user-accordion .accordion-button:not(.collapsed) {
    background: rgba(14, 178, 149, .05);
    color: inherit;
}

.admin-user-title {
    display: grid;
    gap: .15rem;
    width: 100%;
}

.admin-switch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.admin-log-viewer {
    margin: 0;
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #0f172a;
    color: #e2e8f0;
    max-height: 26rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: .82rem;
}

@media (max-width: 991.98px) {
    .admin-bar-chart {
        grid-template-columns: repeat(7, minmax(36px, 1fr));
    }
}

@media (max-width: 767.98px) {
    .admin-subnav {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .admin-subnav-link {
        justify-content: center;
    }

    .admin-kv-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-switch-grid {
        flex-direction: column;
    }

    .admin-bar-chart {
        gap: .55rem;
    }
}


body.is-admin-page .app-main .container-fluid {
    padding-bottom: 6rem;
}

.admin-shell-layout {
    display: block;
}

.admin-shell-main .container-fluid {
    max-width: 1600px;
}

.admin-page-topbar {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(248,250,252,.95) 0%, rgba(255,255,255,.98) 100%);
}


.admin-workspace {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.admin-workspace-sidebar {
    min-width: 0;
}

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

.admin-side-nav,
.admin-bottom-nav {
    scroll-snap-type: x proximity;
}


.admin-nav-brand {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.admin-side-nav {
    display: grid;
    gap: .65rem;
}

.admin-side-link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .75rem;
    align-items: flex-start;
    text-decoration: none;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1rem;
    padding: .85rem .9rem;
    background: #fff;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.admin-side-link:hover,
.admin-side-link.active {
    border-color: rgba(14, 178, 149, .24);
    background: rgba(14, 178, 149, .06);
    color: var(--accent);
}

.admin-side-link:hover {
    transform: translateY(-1px);
}

.admin-side-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .75rem;
    background: var(--accent-soft);
}

.admin-side-copy {
    display: block;
    margin-top: .15rem;
    font-size: .82rem;
    line-height: 1.35;
    color: #64748b;
}

.admin-mobile-nav-card {
    position: sticky;
    top: .5rem;
    z-index: 10;
}

.admin-workspace-main {
    min-width: 0;
}

.admin-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, .96);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    justify-content: flex-start;
    gap: .15rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: .45rem .25rem calc(.5rem + env(safe-area-inset-bottom));
    z-index: 1050;
}

.admin-bottom-nav a {
    flex: 1 0 68px;
    scroll-snap-align: start;
    text-decoration: none;
    color: rgba(255,255,255,.72);
    font-size: .72rem;
    padding: .35rem .35rem;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
    text-align: center;
}

.admin-bottom-nav a i {
    font-size: 1.08rem;
}

.admin-bottom-nav a.active {
    color: #fff;
    font-weight: 600;
    background: rgba(14, 178, 149, .18);
    border-radius: 1rem;
}

.admin-chart {
    display: grid;
    gap: .65rem;
}

.admin-chart-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 1rem;
    color: #64748b;
    font-size: .8rem;
}

.admin-chart-meta span {
    white-space: nowrap;
}

.admin-chart-svg {
    width: 100%;
    height: 220px;
    display: block;
}

.admin-chart-grid {
    stroke: rgba(15, 23, 42, .08);
    stroke-width: 1;
}

.admin-chart-axis {
    stroke: rgba(15, 23, 42, .16);
    stroke-width: 1.2;
}

.admin-chart-axis-text,
.admin-chart-label,
.admin-chart-value {
    fill: #64748b;
    font-size: 11px;
    font-family: var(--bs-body-font-family);
}

.admin-chart-label {
    font-size: 10px;
}

.admin-chart-value {
    font-weight: 700;
}

.admin-chart-bar {
    fill: rgba(14, 178, 149, .86);
}

.admin-chart-primary .admin-chart-bar { fill: rgba(14, 178, 149, .86); }
.admin-chart-success .admin-chart-bar { fill: rgba(25, 135, 84, .84); }
.admin-chart-danger .admin-chart-bar { fill: rgba(220, 53, 69, .84); }
.admin-chart-warning .admin-chart-bar { fill: rgba(255, 193, 7, .92); }
.admin-chart-secondary .admin-chart-bar { fill: rgba(100, 116, 139, .84); }

.admin-chart-empty {
    border: 1px dashed rgba(15, 23, 42, .12);
    border-radius: 1rem;
    padding: 1rem;
    text-align: center;
    color: #64748b;
    background: #f8fafc;
}

.admin-cron-accordion .accordion-item {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}

.admin-cron-accordion .accordion-item + .accordion-item {
    margin-top: .85rem;
}

.admin-cron-accordion .accordion-button {
    box-shadow: none;
    padding: 1rem 1.1rem;
}

.admin-cron-accordion .accordion-button:not(.collapsed) {
    background: rgba(14, 178, 149, .05);
    color: inherit;
}

.admin-cron-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

@media (max-width: 991.98px) {
    .admin-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .admin-cron-head {
        flex-direction: column;
    }

    .admin-chart-svg {
        height: 200px;
    }
}


.rules-filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.rules-filter-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    text-decoration: none;
    color: #334155;
    border: 1px solid rgba(15, 23, 42, .08);
    background: #fff;
    border-radius: 1rem;
    padding: .8rem 1rem;
    min-width: 148px;
    font-weight: 600;
    transition: all .15s ease;
}

.rules-filter-link:hover,
.rules-filter-link.active {
    color: var(--accent);
    border-color: rgba(14, 178, 149, .24);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.rules-filter-count {
    min-width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, .06);
    color: inherit;
    font-size: .86rem;
}

.rules-card-list {
    display: grid;
    gap: 1rem;
}

.rule-list-card {
    padding: 1.1rem;
}

.rule-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rule-card-title-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.rule-card-symbol {
    flex: 0 0 auto;
}

.rule-card-description {
    font-size: .98rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rule-card-actions {
    flex: 0 0 auto;
    min-width: min(100%, 26rem);
}

.rule-card-actions .row-action-cluster {
    justify-content: flex-end;
}

.rule-card-actions .btn,
.rule-card-actions .inline-form .btn {
    border-radius: .9rem;
}

.rule-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: 1rem;
}

.rule-summary-item,
.rule-panel {
    border: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
    border-radius: 1rem;
    padding: .95rem 1rem;
    min-width: 0;
}

.rule-summary-label,
.rule-panel-label {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: .55rem;
}

.rule-summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    min-width: 0;
    word-break: break-word;
}

.rule-summary-meta {
    color: #64748b;
    font-size: .88rem;
    margin-top: .35rem;
    min-height: 1.35rem;
}

.rule-card-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: .8rem;
}

.rule-chip-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.rule-chip-wrap .badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .72rem;
    border-radius: .85rem;
    font-weight: 600;
}

.rule-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .52rem .8rem;
    border-radius: .9rem;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid rgba(15, 23, 42, .08);
}

.rule-chip i {
    font-size: .92rem;
}

.rule-chip-neutral {
    background: #fff;
    color: #0f172a;
    border-color: rgba(15, 23, 42, .12);
}

.rule-chip-feature {
    background: rgba(14, 178, 149, .10);
    color: #0b6b5b;
    border-color: rgba(14, 178, 149, .24);
}

.rule-chip-remove {
    background: rgba(245, 158, 11, .12);
    color: #8a4b00;
    border-color: rgba(245, 158, 11, .28);
}

.rule-health-panel {
    background: linear-gradient(180deg, rgba(14,178,149,.05), rgba(255,255,255,.98));
}

.rule-health-metric {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.rule-health-value {
    flex: 0 0 auto;
    min-width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 1.25rem;
    font-weight: 800;
}

.rules-table .badge i {
    margin-right: .2rem;
}

.row-action-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.row-action-cluster .btn,
.row-action-cluster .inline-form {
    flex: 0 0 auto;
}

.rules-empty-state {
    border: 1px dashed rgba(15, 23, 42, .12);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.95));
}

.large-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
}

@media (max-width: 1199.98px) {
    .rule-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rule-card-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .rules-filter-link {
        flex: 1 1 calc(50% - .75rem);
        min-width: 0;
    }

    .rule-card-top {
        flex-direction: column;
    }

    .rule-card-actions {
        width: 100%;
        min-width: 0;
    }

    .rule-card-actions .row-action-cluster {
        justify-content: stretch;
    }

    .row-action-cluster {
        justify-content: stretch;
    }

    .row-action-cluster .btn,
    .row-action-cluster .inline-form,
    .row-action-cluster .inline-form .btn {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .rules-filter-link {
        flex-basis: 100%;
    }

    .rule-summary-grid {
        grid-template-columns: 1fr;
    }

    .rule-list-card {
        padding: .95rem;
    }

    .rule-health-metric {
        align-items: flex-start;
    }
}

.review-page-summary {
    align-items: stretch;
}

.review-rule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.review-rule-card {
    overflow: hidden;
}

.review-rule-metric {
    min-width: 7.5rem;
    border: 1px solid rgba(14, 178, 149, .14);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(14, 178, 149, .09), rgba(14, 178, 149, .04));
    padding: .9rem 1rem;
    text-align: center;
}

.review-rule-metric-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 700;
    color: var(--accent);
}

.review-rule-metric-label {
    margin-top: .35rem;
    color: #64748b;
    font-size: .82rem;
    font-weight: 600;
}

.review-rule-stats {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.review-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .75rem;
    border-radius: 999px;
    font-size: .87rem;
    font-weight: 600;
    border: 1px solid rgba(15, 23, 42, .08);
}

.review-status-pill.is-review {
    background: rgba(245, 158, 11, .12);
    color: #9a6700;
}

.review-status-pill.is-rejected {
    background: rgba(220, 53, 69, .10);
    color: #b42318;
}

.review-status-pill.is-processed {
    background: rgba(14, 178, 149, .10);
    color: var(--accent);
}

.review-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: 1rem;
}

.review-tab-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: #475569;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 999px;
    padding: .65rem .9rem;
    font-weight: 600;
}

.review-tab-link span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    height: 1.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .06);
    font-size: .82rem;
}

.review-tab-link.active {
    color: var(--accent);
    background: rgba(14, 178, 149, .08);
    border-color: rgba(14, 178, 149, .24);
}

.review-tab-link.active span {
    background: rgba(14, 178, 149, .14);
}

.review-item-card {
    overflow: hidden;
}

.review-item-card summary {
    list-style: none;
}

.review-item-card summary::-webkit-details-marker {
    display: none;
}

.review-item-summary {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.25rem 1rem;
    cursor: pointer;
}

.review-item-summary:hover {
    background: rgba(14, 178, 149, .03);
}

.review-item-summary-main {
    min-width: 0;
    flex: 1 1 auto;
}

.review-item-summary-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: transform .15s ease, background-color .15s ease, color .15s ease;
}

.review-item-card[open] .review-item-summary-icon {
    transform: rotate(180deg);
    background: rgba(14, 178, 149, .08);
    color: var(--accent);
}

.review-detail-grid {
    display: grid;
    gap: 1rem;
}

.review-item-footer {
    border-top: 1px solid rgba(15, 23, 42, .08);
    padding-top: 1rem;
}

.review-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: flex-end;
}

.review-item-actions .btn {
    min-height: 2.8rem;
}

@media (min-width: 1200px) {
    .review-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-field-card.is-priority {
        grid-column: span 2;
    }
}

@media (max-width: 991.98px) {
    .review-item-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-item-summary-icon {
        align-self: flex-end;
    }
}

@media (max-width: 767.98px) {
    .review-tab-nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .review-tab-link {
        justify-content: space-between;
    }

    .review-item-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .review-item-actions .btn {
        width: 100%;
    }
}

/* User guidance polish */
.info-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    border: 1px solid rgba(14, 178, 149, .24);
    background: rgba(14, 178, 149, .09);
    color: var(--accent);
    font-size: .78rem;
    vertical-align: middle;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.info-button:hover,
.info-button:focus {
    background: rgba(14, 178, 149, .16);
    border-color: rgba(14, 178, 149, .38);
    color: var(--accent-dark);
    transform: translateY(-1px);
}

.info-modal-card {
    border: 0;
    border-radius: 1.35rem;
    overflow: hidden;
    box-shadow: 0 1.25rem 3.5rem rgba(15, 23, 42, .18);
}

.info-modal-steps {
    display: grid;
    gap: .7rem;
    padding-left: 1.25rem;
}

.info-modal-steps li {
    padding-left: .2rem;
    color: #334155;
}

.user-guide-card {
    border: 1px solid rgba(14, 178, 149, .14);
    background: linear-gradient(135deg, rgba(14, 178, 149, .08), rgba(255,255,255,.95) 42%, rgba(241, 245, 249, .8));
}

.user-guide-card .guide-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .4rem .7rem;
    border-radius: 999px;
    background: rgba(14, 178, 149, .10);
    color: #0b6b5b;
    font-size: .82rem;
    font-weight: 700;
}

.friendly-check-list {
    display: grid;
    gap: .7rem;
}

.friendly-check-list .friendly-check {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    padding: .8rem .9rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 1rem;
    background: rgba(255,255,255,.74);
}

.friendly-check-list .friendly-check i {
    color: var(--accent);
    margin-top: .15rem;
}

.info-button-lg {
    width: 2.35rem;
    height: 2.35rem;
    font-size: .95rem;
}


.rule-diagnostics-card {
    background: linear-gradient(135deg, rgba(14, 178, 149, .06), rgba(255,255,255,.96) 42%, rgba(14, 178, 149, .045));
}

.rule-diagnostics-card .badge.text-bg-success {
    background-color: var(--accent) !important;
}

.app-notification-host {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1090;
    width: min(26rem, calc(100vw - 2rem));
    pointer-events: none;
}

.app-live-notification {
    pointer-events: auto;
    transition: opacity .2s ease, transform .2s ease;
}

.app-live-notification.is-leaving {
    opacity: 0;
    transform: translateY(-.35rem);
}

/* Automations */
.app-sidebar-section-label {
    margin: 1rem .95rem .35rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255,255,255,.09);
    color: rgba(255,255,255,.42);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

/* Overview */
.automation-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .25rem 0 .9rem;
}

.automation-overview-title {
    font-size: 1.55rem;
    font-weight: 750;
    letter-spacing: -.025em;
    margin: 0;
}

.automation-overview-subtitle {
    color: #64748b;
    max-width: 52rem;
    margin-top: .3rem;
}

.automation-stat-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15,23,42,.035);
    overflow: hidden;
    margin-bottom: 1rem;
}

.automation-stat-item {
    min-height: 5.1rem;
    padding: .95rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    position: relative;
}

.automation-stat-item + .automation-stat-item { border-left: 1px solid rgba(148,163,184,.16); }
.automation-stat-label { color: #64748b; font-size: .76rem; font-weight: 650; }
.automation-stat-value { font-size: 1.55rem; line-height: 1; font-weight: 760; letter-spacing: -.03em; margin-top: .3rem; }
.automation-stat-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-dark);
    background: rgba(14,178,149,.08);
    flex: 0 0 auto;
}

.automation-overview-panel,
.automation-activity-card {
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15,23,42,.035);
}

.automation-overview-panel-head,
.automation-activity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(148,163,184,.14);
}

.automation-list-stack { display: grid; }

.automation-list-row {
    display: grid;
    grid-template-columns: minmax(14rem, 1.4fr) minmax(14rem, 1fr) auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    color: inherit;
    border-bottom: 1px solid rgba(148,163,184,.12);
    transition: background .16s ease;
}

.automation-list-row:last-child { border-bottom: 0; }
.automation-list-row:hover { color: inherit; background: rgba(248,250,252,.8); }
.automation-list-row-title { font-weight: 700; color: #1f2937; }
.automation-list-row-desc { color: #64748b; font-size: .78rem; margin-top: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.automation-list-row-meta { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; color: #64748b; font-size: .76rem; }
.automation-list-row-meta span { display: inline-flex; align-items: center; gap: .3rem; }

.automation-list-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.automation-list-card { display: block; padding: 1rem; color: inherit; border: 1px solid rgba(148,163,184,.2); border-radius: 1rem; background: #fff; }
.automation-list-card:hover { color: inherit; border-color: rgba(14,178,149,.3); }

.automation-mini-flow { display: flex; align-items: center; min-height: 2rem; }
.automation-mini-node {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: .62rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148,163,184,.22);
    background: #fff;
    color: #475569;
    font-size: .8rem;
}
.automation-mini-node.trigger,
.automation-mini-line { width: .9rem; height: 1px; background: #cbd5e1; }

.automation-template-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .75rem;
    padding: 1rem 1.15rem 1.15rem;
}

.automation-template-card {
    min-height: 8.3rem;
    padding: .9rem;
    border-radius: .9rem;
    background: #fbfcfd;
    border: 1px solid rgba(148,163,184,.18);
    display: flex;
    flex-direction: column;
}
.automation-template-card .btn { margin-top: auto; }

.automation-empty-state,
.automation-activity-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #64748b;
}
.automation-activity-empty { display: flex; align-items: center; justify-content: center; gap: .5rem; }

/* Builder shell */
.automation-appbar {
    min-height: 4.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .9rem;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: 1rem;
    background: rgba(255,255,255,.96);
    box-shadow: 0 8px 24px rgba(15,23,42,.03);
}

.automation-appbar-main,
.automation-appbar-actions { display: flex; align-items: center; gap: .65rem; }
.automation-appbar-title { font-size: 1.08rem; font-weight: 750; max-width: 34rem; letter-spacing: -.01em; }
.automation-appbar-eyebrow,
.automation-inspector-eyebrow,
.automation-modal-eyebrow { color: #94a3b8; font-size: .68rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }

.automation-back-link,
.automation-icon-button {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: .78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(148,163,184,.18);
    background: #fff;
    color: #475569;
}
.automation-back-link:hover { color: var(--accent-dark); border-color: rgba(14,178,149,.28); background: rgba(14,178,149,.04); }

.automation-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700;
    border: 1px solid transparent;
}
.automation-status-pill span { width: .42rem; height: .42rem; border-radius: 999px; background: currentColor; }
.automation-status-pill.is-active { color: var(--status-active); background: var(--status-active-bg); border-color: rgba(22,163,106,.16); }
.automation-status-pill.is-paused { color: var(--status-pending); background: var(--status-pending-bg); border-color: rgba(230,138,46,.18); }

.automation-studio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22rem;
    min-height: 34rem;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 1.05rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15,23,42,.035);
    overflow: hidden;
}

.automation-stage { min-width: 0; background: #fbfcfd; display: flex; flex-direction: column; }
.automation-stage-toolbar {
    min-height: 4.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid rgba(148,163,184,.14);
    background: #fff;
}
.automation-stage-title { font-weight: 730; color: #1f2937; }
.automation-flow-shell { flex: 1; min-height: 0; padding: .85rem; display: flex; }
.automation-flow-canvas {
    min-height: 24rem;
    width: 100%;
    overflow-x: auto;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 2.2rem 1.1rem 2.5rem;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: .95rem;
    background-color: #fcfdfd;
    background-image: radial-gradient(rgba(100,116,139,.16) .65px, transparent .65px);
    background-size: 18px 18px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.automation-flow-canvas::-webkit-scrollbar { height: 7px; }
.automation-flow-canvas::-webkit-scrollbar-track { background: transparent; }
.automation-flow-canvas::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

.automation-flow-node {
    width: 9.2rem;
    min-width: 9.2rem;
    min-height: 9.2rem;
    padding: .8rem;
    border-radius: .9rem;
    background: #fff;
    border: 1px solid #dbe4ea;
    box-shadow: 0 6px 16px rgba(15,23,42,.035);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: .42rem;
    position: relative;
    color: #1f2937;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.automation-flow-node:hover { color: #1f2937; border-color: #c6d2dc; transform: translateY(-1px); }
.automation-trigger-node { border-color: rgba(14,178,149,.3); background: linear-gradient(180deg, rgba(14,178,149,.055), #fff 52%); }
.automation-node-kicker {
    position: absolute;
    top: -.62rem;
    left: .7rem;
    padding: .16rem .42rem;
    border-radius: 999px;
    background: #e9f9f5;
    color: #087361;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .07em;
}
.automation-node-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14,178,149,.08);
    color: var(--accent-dark);
    font-size: 1.05rem;
}
.automation-flow-node strong { font-size: .86rem; line-height: 1.3; }
.automation-node-meta { color: #7b8797; font-size: .67rem; line-height: 1.35; }
.automation-node-disabled { color: #64748b; background: #f1f5f9; border-radius: 999px; padding: .15rem .4rem; font-size: .58rem; font-weight: 700; }


.automation-flow-node.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14,178,149,.09), 0 10px 22px rgba(15,23,42,.055);
}
.automation-step-node.is-disabled { opacity: .52; }
.automation-step-node.is-drag-over { box-shadow: 0 0 0 3px rgba(14,178,149,.14); }
.automation-step-main { width: 100%; color: inherit; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.automation-step-main:hover { color: inherit; }
.automation-drag-handle { position: absolute; top: .45rem; right: .45rem; color: #a6b1bf; cursor: grab; font-size: .8rem; }
.automation-flow-connector {
    min-width: 2.8rem;
    display: flex;
    align-items: center;
    position: relative;
    color: #9aa7b6;
}
.automation-flow-connector span { flex: 1; height: 1px; background: #cbd5e1; transition: background .15s ease; }
.automation-flow-connector i { display: flex; font-style: normal; font-size: .7rem; margin-left: -.1rem; }
.automation-connector-add {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(.86);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    border: 1px solid rgba(14,178,149,.24);
    background: #fff;
    color: var(--accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    box-shadow: 0 5px 15px rgba(15,23,42,.08);
    transition: opacity .14s ease, transform .14s ease, box-shadow .14s ease;
    z-index: 3;
}
.automation-flow-connector:hover span,
.automation-flow-connector:focus-within span { background: rgba(14,178,149,.48); }
.automation-flow-connector:hover .automation-connector-add,
.automation-connector-add:focus-visible,
.automation-flow-connector:focus-within .automation-connector-add {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.automation-connector-add:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 7px 18px rgba(14,178,149,.2);
}
.automation-flow-connector-tail { min-width: 3.2rem; }
.automation-flow-connector-tail i { display: none; }
.automation-flow-empty {
    min-width: 13rem;
    min-height: 8rem;
    margin-left: 2rem;
    padding: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    color: #475569;
    border: 1px dashed rgba(148,163,184,.42);
    border-radius: .9rem;
    background: rgba(255,255,255,.78);
}
.automation-flow-empty small { display: block; color: #94a3b8; margin-top: .2rem; }
.automation-stage-footer {
    min-height: 2.8rem;
    display: flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1rem;
    color: #7b8797;
    font-size: .72rem;
    border-top: 1px solid rgba(148,163,184,.12);
    background: rgba(255,255,255,.86);
}

/* Inspector */
.automation-inspector {
    background: #fff;
    border-left: 1px solid rgba(148,163,184,.16);
    min-width: 0;
    padding: 1rem;
}
.automation-inspector-head { display: flex; align-items: flex-start; gap: .7rem; padding-bottom: .9rem; border-bottom: 1px solid rgba(148,163,184,.14); margin-bottom: .95rem; }
.automation-inspector-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .72rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    background: #f1f5f9;
    color: #475569;
}
.automation-inspector-form { display: block; }
.automation-field-group { margin-bottom: .9rem; }
.automation-field-group .form-label { margin-bottom: .35rem; font-size: .75rem; color: #475569; font-weight: 650; }
.automation-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.automation-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.automation-check-option {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .65rem;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: .75rem;
    background: #fbfcfd;
    font-size: .78rem;
}
.automation-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem .75rem;
    border: 1px solid rgba(148,163,184,.17);
    border-radius: .8rem;
    background: #fbfcfd;
}
.automation-switch-row strong { display: block; font-size: .78rem; color: #334155; }
.automation-switch-row small { display: block; color: #94a3b8; font-size: .66rem; line-height: 1.35; margin-top: .12rem; }
.automation-trigger-summary,
.automation-inline-status {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .7rem .75rem;
    border-radius: .8rem;
    background: #f8fafc;
    color: #64748b;
    font-size: .72rem;
    border: 1px solid rgba(148,163,184,.14);
}
.automation-trigger-summary { margin-top: .8rem; }
.automation-trigger-summary strong { display: block; color: #334155; font-size: .72rem; }
.automation-trigger-summary small { display: block; color: #7b8797; margin-top: .1rem; }
.automation-inline-status.is-success { background: rgba(14,178,149,.06); color: #087361; border-color: rgba(14,178,149,.16); }
.automation-inline-status.is-warning { background: rgba(245,158,11,.07); color: #92400e; border-color: rgba(245,158,11,.18); }
.automation-inspector-secondary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .9rem; margin-top: .9rem; border-top: 1px solid rgba(148,163,184,.14); }
.automation-reorder-buttons { display: flex; gap: .35rem; }
.automation-reorder-buttons form { margin: 0; }

/* Activity + modals */
.automation-revision-chip { display: inline-flex; align-items: center; padding: .3rem .55rem; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: .68rem; font-weight: 700; }
.automation-run-table thead th { color: #94a3b8; font-size: .67rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; border-bottom-color: rgba(148,163,184,.14); }
.automation-run-table tbody td { font-size: .78rem; border-bottom-color: rgba(148,163,184,.1); }
.automation-run-status { display: inline-flex; align-items: center; padding: .22rem .48rem; border-radius: .48rem; font-size: .65rem; font-weight: 700; text-transform: capitalize; background: var(--status-inactive-bg); color: var(--status-inactive); }
.automation-run-status.is-completed { color: var(--status-approved); background: var(--status-approved-bg); }
.automation-run-status.is-failed { color: var(--status-failed); background: var(--status-failed-bg); }
.automation-run-status.is-cancelled { color: var(--status-inactive); background: var(--status-inactive-bg); }
.automation-run-status.is-running { color: var(--status-processing); background: var(--status-processing-bg); }
.automation-run-status.is-queued { color: var(--status-pending); background: var(--status-pending-bg); }
.automation-modal-content { border: 0; border-radius: 1rem; box-shadow: 0 24px 70px rgba(15,23,42,.16); }
.automation-step-library { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.automation-step-library-item .btn {
    min-height: 5.25rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .8rem;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: .85rem;
    background: #fbfcfd;
}
.automation-step-library-item .btn:hover { border-color: rgba(14,178,149,.28); background: rgba(14,178,149,.025); }
.automation-step-library-item strong { display: block; font-size: .82rem; color: #334155; }
.automation-step-library-item small { display: block; color: #7b8797; font-size: .68rem; line-height: 1.35; margin-top: .15rem; }
.automation-library-arrow { color: var(--accent-dark); }

/* Run detail stays compact */
.automation-run-products { display: grid; gap: 1rem; }
.automation-run-product { border: 1px solid rgba(148,163,184,.2); border-radius: 1rem; padding: 1rem; background: #fff; }
.automation-run-step-list { display: grid; gap: .6rem; }
.automation-run-step { display: flex; align-items: flex-start; gap: .75rem; padding: .8rem; border-radius: .8rem; background: #fff; border: 1px solid #e5e7eb; }
.automation-run-step-icon { margin-top: .05rem; color: var(--accent); }
.automation-run-step.is-failed .automation-run-step-icon { color: #dc2626; }
.whitespace-pre-line { white-space: normal; }

@media (max-width: 1199.98px) {
    .automation-studio { grid-template-columns: minmax(0, 1fr) 20rem; }
    .automation-template-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .automation-list-row { grid-template-columns: minmax(13rem, 1.2fr) minmax(12rem, 1fr) auto; }
    .automation-list-row .automation-row-last-run { display: none; }
}

@media (max-width: 991.98px) {
    .automation-studio { grid-template-columns: 1fr; }
    .automation-inspector { border-left: 0; border-top: 1px solid rgba(148,163,184,.16); }
    .automation-stat-strip { grid-template-columns: 1fr 1fr; }
    .automation-stat-item:nth-child(3) { border-left: 0; border-top: 1px solid rgba(148,163,184,.16); }
    .automation-stat-item:nth-child(4) { border-top: 1px solid rgba(148,163,184,.16); }
    .automation-list-row { grid-template-columns: 1fr auto; }
    .automation-list-row .automation-row-flow,
    .automation-list-row .automation-row-last-run { display: none; }
    .automation-template-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .automation-overview-head,
    .automation-appbar { align-items: flex-start; flex-direction: column; }
    .automation-appbar-actions { width: 100%; flex-wrap: wrap; }
    .automation-appbar-actions .btn:not(.automation-icon-button) { flex: 1 1 auto; }
    .automation-stage-toolbar { align-items: flex-start; }
    .automation-flow-canvas { min-height: 20rem; padding: 1.8rem .8rem 2.2rem; }
    .automation-flow-node { min-width: 8.5rem; width: 8.5rem; min-height: 8.7rem; }
    .automation-field-grid,
    .automation-option-grid,
    .automation-step-library { grid-template-columns: 1fr; }
    .automation-stat-strip { grid-template-columns: 1fr 1fr; }
    .automation-stat-item { min-height: 4.5rem; padding: .8rem; }
    .automation-template-strip { grid-template-columns: 1fr; }
    .automation-list-row { grid-template-columns: 1fr; }
    .automation-list-row > .text-end { text-align: left !important; }
    .automation-inspector-secondary { align-items: flex-start; flex-direction: column; }
    .automation-connector-add { opacity: 1; transform: translate(-50%, -50%) scale(.92); }
}

/* Automations v1.1.6.0 — execution controls, previews and generated content */

.automation-count-dot {
    position: absolute;
    top: -.3rem;
    right: -.3rem;
    min-width: 1.05rem;
    height: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 .22rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    border: 2px solid #fff;
    font-size: .56rem;
    font-weight: 800;
    line-height: 1;
}
.automation-count-dot.is-warning { background: #d97706; }

.automation-weekday-picker {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .3rem;
}
.automation-weekday-picker label { margin: 0; cursor: pointer; }
.automation-weekday-picker input { position: absolute; opacity: 0; pointer-events: none; }
.automation-weekday-picker span {
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: .6rem;
    background: #fff;
    color: #64748b;
    font-size: .65rem;
    font-weight: 700;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.automation-weekday-picker input:checked + span {
    border-color: rgba(14,178,149,.32);
    background: rgba(14,178,149,.07);
    color: #087361;
}
.automation-weekday-picker input:focus-visible + span { box-shadow: 0 0 0 .18rem rgba(14,178,149,.14); }

.automation-run-status.is-waiting,
.automation-run-status.is-waiting_approval { color: var(--status-pending); background: var(--status-pending-bg); }
.automation-run-status.is-rejected { color: var(--status-failed); background: var(--status-failed-bg); }
.automation-run-status.is-approved { color: var(--status-approved); background: var(--status-approved-bg); }
.automation-run-status.is-running { color: var(--status-processing); background: var(--status-processing-bg); }

.automation-run-step.is-waiting { border-color: rgba(245,158,11,.24); background: #fffdf8; }
.automation-run-step.is-waiting .automation-run-step-icon { color: #d97706; }
.automation-run-step.is-rejected { border-color: rgba(239,68,68,.18); background: #fffafa; }
.automation-run-step.is-rejected .automation-run-step-icon { color: #dc2626; }
.automation-approval-inline {
    border: 1px solid rgba(245,158,11,.18);
    background: rgba(245,158,11,.055);
    border-radius: .75rem;
    padding: .7rem;
    color: #78350f;
}

.automation-output-details { border-top: 1px solid rgba(148,163,184,.13); padding-top: .55rem; }
.automation-output-details summary { cursor: pointer; color: #64748b; font-size: .7rem; font-weight: 650; list-style: none; }
.automation-output-details summary::-webkit-details-marker { display: none; }
.automation-output-details summary::before { content: '›'; display: inline-block; margin-right: .35rem; transition: transform .15s ease; }
.automation-output-details[open] summary::before { transform: rotate(90deg); }
.automation-output-details pre {
    margin: .6rem 0 0;
    max-height: 18rem;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: .65rem;
    padding: .65rem;
    background: #f8fafc;
    color: #475569;
    font-size: .65rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.automation-test-steps { display: grid; gap: .65rem; }
.automation-test-step {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .85rem;
    border: 1px solid rgba(148,163,184,.17);
    border-radius: .85rem;
    background: #fff;
}
.automation-preview-chip {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .22rem .45rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: .62rem;
    font-weight: 700;
}
.automation-test-image { max-width: 28rem; overflow: hidden; border-radius: .85rem; border: 1px solid #e2e8f0; background: #f8fafc; }
.automation-test-image img { display: block; width: 100%; height: auto; max-height: 24rem; object-fit: contain; }
.automation-content-preview { border: 1px solid rgba(148,163,184,.15); border-radius: .75rem; background: #fbfcfd; padding: .7rem; }

.automation-approval-list { display: grid; }
.automation-approval-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: .9rem 1rem;
    border-bottom: 1px solid rgba(148,163,184,.12);
}
.automation-approval-row:last-child { border-bottom: 0; }
.automation-approval-note { padding: .55rem .65rem; border-radius: .65rem; background: #f8fafc; color: #64748b; font-size: .72rem; }
.automation-approval-actions { display: flex; align-items: center; gap: .4rem; }
.automation-approval-actions form { margin: 0; }

.automation-content-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1rem; align-items: start; }
.automation-asset-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .65rem; }
.automation-asset-card { overflow: hidden; border: 1px solid rgba(148,163,184,.17); border-radius: .8rem; background: #fff; }
.automation-asset-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: #f8fafc; }
.automation-blog-list { display: grid; }
.automation-blog-row { padding: .9rem 1rem; border-bottom: 1px solid rgba(148,163,184,.12); }
.automation-blog-row:last-child { border-bottom: 0; }
.automation-blog-body { margin-top: .75rem; padding: .8rem; border: 1px solid #e2e8f0; border-radius: .75rem; background: #fff; color: #334155; font-size: .78rem; line-height: 1.65; }
.automation-blog-body > :last-child { margin-bottom: 0; }

@media (max-width: 991.98px) {
    .automation-content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .automation-weekday-picker { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .automation-approval-row { grid-template-columns: 1fr; }
    .automation-approval-actions { justify-content: flex-start; }
    .automation-asset-grid { grid-template-columns: 1fr; }
}
.automation-step-search { position: relative; }
.automation-step-search > span { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #94a3b8; z-index: 2; pointer-events: none; }
.automation-step-search .form-control { padding-left: 2.2rem; background: #fbfcfd; border-color: #e2e8f0; }

/* v1.1.6.1 — review hub + generated content refinement */
.automation-choice-stack { display: grid; gap: .55rem; }
.automation-choice-row {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: .7rem;
    align-items: flex-start;
    padding: .72rem .78rem;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: .75rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.automation-choice-row:hover { border-color: rgba(14,178,149,.3); background: rgba(14,178,149,.025); }
.automation-choice-row:has(.form-check-input:checked) { border-color: rgba(14,178,149,.38); background: rgba(14,178,149,.05); box-shadow: inset 0 0 0 1px rgba(14,178,149,.06); }
.automation-choice-row .form-check-input { margin-top: .15rem; }
.automation-choice-row strong { display: block; font-size: .78rem; color: #1f2937; }
.automation-choice-row small { display: block; margin-top: .18rem; color: #64748b; font-size: .68rem; line-height: 1.45; }

.automation-asset-body { padding: .75rem; }
.automation-asset-actions { display: grid; gap: .45rem; }
.automation-inline-note { display: flex; align-items: flex-start; gap: .4rem; color: #64748b; font-size: .66rem; line-height: 1.4; }
.automation-inline-note .bi { color: var(--accent-dark); margin-top: .05rem; }
.automation-preview-chip.is-success { background: rgba(14,178,149,.09); color: var(--accent-dark); }
.automation-blog-summary-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.automation-blog-editor { border-top: 1px solid rgba(148,163,184,.13); padding-top: .85rem; }
.automation-blog-editor-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }

.review-hub-tabs {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: .9rem;
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 24px rgba(15,23,42,.025);
}
.review-hub-tab {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.35rem;
    padding: .48rem .72rem;
    border-radius: .68rem;
    color: #64748b;
    text-decoration: none;
    font-size: .76rem;
    font-weight: 650;
}
.review-hub-tab:hover { color: #334155; background: #f8fafc; }
.review-hub-tab.active { color: var(--accent-dark); background: var(--accent-soft); }
.review-hub-tab strong { min-width: 1.35rem; padding: .12rem .38rem; border-radius: 999px; background: #fff; color: inherit; font-size: .62rem; text-align: center; }
.review-automation-shell { display: grid; gap: 1rem; }
.review-automation-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.review-automation-stats { max-width: 34rem; }
.review-automation-panel { overflow: hidden; }
.review-automation-batch-actions { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.review-automation-select { display: flex; align-items: center; justify-content: center; width: 1.7rem; }
.review-automation-select-placeholder { width: 1.7rem; }
.review-automation-panel .automation-approval-row { grid-template-columns: auto minmax(0,1fr) auto; }
.review-automation-panel .automation-approval-row.is-resolved { opacity: .72; background: #fbfcfd; }

@media (max-width: 767.98px) {
    .automation-blog-summary-row,
    .review-automation-head { flex-direction: column; align-items: stretch; }
    .automation-blog-editor-actions { justify-content: stretch; }
    .automation-blog-editor-actions .btn { flex: 1 1 auto; }
    .review-hub-tabs { display: flex; width: 100%; }
    .review-hub-tab { flex: 1 1 0; justify-content: center; }
    .review-automation-panel .automation-approval-row { grid-template-columns: auto minmax(0,1fr); }
    .review-automation-panel .automation-approval-actions { grid-column: 2; }
    .review-automation-batch-actions { width: 100%; }
    .review-automation-batch-actions .btn { flex: 1 1 auto; }
}

/* v1.1.6.2 migration center + notification center */
.app-notification-button {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(15, 23, 42, .09);
    border-radius: 12px;
    background: rgba(255,255,255,.78);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-decoration: none;
    flex: 0 0 auto;
}
.app-notification-button:hover { color: #0b8f79; border-color: rgba(14,178,149,.3); background: #fff; }
.app-notification-button > span {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #0EB295;
    color: #fff;
    font-size: 10px;
    line-height: 18px;
    font-weight: 700;
    box-shadow: 0 0 0 3px #f8fafc;
}
.notification-center-shell { max-width: 980px; margin: 0 auto; }
.notification-center-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.notification-filter-tabs { display:inline-flex; gap:4px; padding:4px; border:1px solid rgba(15,23,42,.08); background:rgba(255,255,255,.72); border-radius:12px; }
.notification-filter-tabs a { display:flex; align-items:center; gap:7px; padding:7px 12px; border-radius:9px; color:#64748b; text-decoration:none; font-size:.875rem; font-weight:600; }
.notification-filter-tabs a.active { color:#0b8f79; background:#fff; box-shadow:0 1px 3px rgba(15,23,42,.07); }
.notification-filter-tabs a span { display:inline-flex; min-width:20px; height:20px; align-items:center; justify-content:center; border-radius:999px; background:#e7f8f4; color:#087d6c; font-size:11px; }
.notification-list { overflow:hidden; border:1px solid rgba(15,23,42,.08); border-radius:18px; background:#fff; box-shadow:0 12px 34px rgba(15,23,42,.04); }
.notification-row { display:flex; gap:14px; padding:17px 18px; border-bottom:1px solid rgba(15,23,42,.06); position:relative; }
.notification-row:last-child { border-bottom:0; }
.notification-row.is-unread { background:linear-gradient(90deg, rgba(14,178,149,.055), rgba(255,255,255,0) 58%); }
.notification-row.is-unread::before { content:""; position:absolute; left:0; top:16px; bottom:16px; width:3px; border-radius:0 3px 3px 0; background:#0EB295; }
.notification-row-icon { width:38px; height:38px; flex:0 0 38px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:#f1f5f9; color:#64748b; }
.notification-row-icon.is-success { background:#e8f8f4; color:#0b8f79; }
.notification-row-icon.is-warning { background:#fff7e6; color:#b7791f; }
.notification-row-icon.is-info { background:#edf7ff; color:#3276a8; }
.notification-row-body { min-width:0; flex:1; }
.notification-row-title { font-weight:700; color:#1f2937; margin-bottom:2px; }
.notification-row-message { color:#64748b; font-size:.91rem; line-height:1.45; }
.notification-row-actions { display:flex; align-items:center; gap:14px; }
.notification-row-actions form { margin:0; }
.notification-empty { min-height:230px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; color:#94a3b8; text-align:center; padding:30px; }
.notification-empty i { font-size:1.5rem; }
.notification-empty strong { color:#475569; }

.admin-migration-hero { display:flex; align-items:center; justify-content:space-between; gap:28px; padding:22px 24px; border:1px solid rgba(14,178,149,.16); border-radius:20px; background:linear-gradient(120deg, rgba(14,178,149,.08), rgba(255,255,255,.92) 54%, rgba(241,245,249,.78)); box-shadow:0 12px 34px rgba(15,23,42,.035); }
.admin-migration-eyebrow { color:#0b8f79; font-size:.78rem; font-weight:800; letter-spacing:.03em; text-transform:uppercase; display:flex; align-items:center; gap:7px; margin-bottom:7px; }
.admin-migration-summary { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.admin-migration-summary > div { min-width:95px; padding:10px 12px; border:1px solid rgba(15,23,42,.07); border-radius:13px; background:rgba(255,255,255,.82); }
.admin-migration-summary span { display:block; color:#94a3b8; font-size:.72rem; margin-bottom:2px; }
.admin-migration-summary strong { font-size:1.08rem; color:#273244; }
.migration-safety-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.migration-safety-grid > div { display:flex; align-items:flex-start; gap:10px; padding:11px 12px; border-radius:12px; background:#f8fafc; border:1px solid rgba(15,23,42,.055); color:#0b8f79; }
.migration-safety-grid span { min-width:0; }
.migration-safety-grid strong { display:block; color:#334155; font-size:.83rem; }
.migration-safety-grid small { display:block; color:#7c899a; line-height:1.35; margin-top:2px; }
.admin-migration-up-to-date { display:flex; align-items:center; gap:11px; border-radius:13px; padding:13px 14px; background:#edf9f6; color:#0b8f79; }
.admin-migration-up-to-date i { font-size:1.15rem; }
.admin-migration-up-to-date strong, .admin-migration-up-to-date span { display:block; }
.admin-migration-up-to-date span { color:#60756f; font-size:.82rem; }
.admin-migration-steps { padding-left:1.1rem; display:grid; gap:8px; }
.admin-migration-table code { color:#334155; font-size:.79rem; }
.admin-migration-latest { border:1px solid rgba(15,23,42,.07); border-radius:12px; padding:12px 14px; background:#f8fafc; display:grid; gap:7px; }
.automation-inspector-utility-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; padding-top:12px; border-top:1px solid rgba(15,23,42,.07); }

@media (max-width: 767.98px) {
    .notification-center-head, .admin-migration-hero { align-items:stretch; flex-direction:column; }
    .admin-migration-summary { justify-content:flex-start; }
    .migration-safety-grid { grid-template-columns:1fr; }
    .notification-row { padding:15px; }
    .notification-row time { display:none; }
}

/* v1.1.6.3 — migration reconciliation states */
.migration-reconcile-note { display:flex; align-items:flex-start; gap:11px; padding:13px 14px; border:1px solid rgba(14,178,149,.18); border-radius:13px; background:linear-gradient(135deg, rgba(14,178,149,.08), rgba(255,255,255,.92)); color:#0b8f79; }
.migration-reconcile-note > i { margin-top:2px; font-size:1.05rem; }
.migration-reconcile-note strong, .migration-reconcile-note span { display:block; }
.migration-reconcile-note strong { color:#334155; font-size:.88rem; }
.migration-reconcile-note span { color:#64748b; font-size:.8rem; line-height:1.45; margin-top:2px; }
.migration-mode-badge { color:#087765; background:rgba(14,178,149,.11); border:1px solid rgba(14,178,149,.2); }
@media (max-width: 575.98px) {
    .admin-migration-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
    .admin-migration-summary > div { min-width:0; }
}

/* Automation v1.1.6.4: keep advanced scheduling available without adding visual clutter. */
.automation-advanced-panel {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    background: rgba(248, 250, 252, .72);
    overflow: hidden;
}
.automation-advanced-panel > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .8rem .9rem;
    font-weight: 650;
    color: #334155;
    user-select: none;
}
.automation-advanced-panel > summary::-webkit-details-marker { display: none; }
.automation-advanced-panel > summary::after {
    content: '›';
    margin-left: auto;
    transform: rotate(90deg);
    transition: transform .16s ease;
    color: #94a3b8;
}
.automation-advanced-panel[open] > summary::after { transform: rotate(270deg); }
.automation-advanced-body {
    padding: .15rem .9rem .9rem;
    border-top: 1px solid rgba(15, 23, 42, .06);
}
.automation-inspector-utility-row { flex-wrap: wrap; justify-content: flex-start; }
.admin-migration-backup {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 12px;
    padding: .7rem .85rem;
    background: rgba(248, 250, 252, .75);
}
.admin-migration-backup > summary {
    cursor: pointer;
    font-weight: 650;
    color: #475569;
    list-style: none;
}
.admin-migration-backup > summary::-webkit-details-marker { display: none; }
.migration-plan-list > div:last-child { border-bottom: 0 !important; }

/* Automations — typed variables + IF/ELSE workflow styling */
.automation-flow-group { display: flex; align-items: center; gap: .7rem; flex: 0 0 auto; }
.automation-flow-group.has-branches { align-items: stretch; }

.automation-branch-board {
    width: 24rem;
    min-width: 24rem;
    border: 1px solid rgba(99,102,241,.14);
    border-radius: .95rem;
    padding: .7rem;
    background: linear-gradient(180deg, rgba(248,250,252,.98), rgba(255,255,255,.98));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    box-shadow: 0 6px 18px rgba(15,23,42,.025);
}
.automation-branch-lane { min-width: 0; border-radius: .78rem; border: 1px solid rgba(148,163,184,.16); background: #fff; overflow: hidden; }
.automation-branch-lane.is-if { border-top: 2px solid rgba(14,178,149,.7); }
.automation-branch-lane.is-else { border-top: 2px solid rgba(100,116,139,.45); }
.automation-branch-lane-head { min-height: 2rem; padding: .42rem .55rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: #64748b; font-size: .62rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; background: #fbfcfd; border-bottom: 1px solid rgba(148,163,184,.12); }
.automation-branch-lane-head small { min-width: 1.15rem; height: 1.15rem; padding: 0 .28rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: #eef2f6; color: #64748b; font-size: .58rem; }
.automation-branch-lane-body { min-height: 7rem; padding: .5rem; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: .35rem; }
.automation-branch-step { display: flex; align-items: center; gap: .48rem; min-width: 0; padding: .52rem .55rem; border-radius: .64rem; border: 1px solid rgba(148,163,184,.16); background: #fff; color: #334155; text-decoration: none; transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease; }
.automation-branch-step:hover { color: #1f2937; border-color: rgba(14,178,149,.28); box-shadow: 0 4px 12px rgba(15,23,42,.04); transform: translateY(-1px); }
.automation-branch-step.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(14,178,149,.08); }
.automation-branch-step.is-disabled { opacity: .5; }
.automation-branch-step-icon { width: 1.7rem; height: 1.7rem; flex: 0 0 1.7rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .5rem; background: #f1f5f9; color: #64748b; }
.automation-branch-step strong { display: block; min-width: 0; max-width: 8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.automation-branch-step small { display: block; color: #94a3b8; font-size: .58rem; margin-top: .05rem; }
.automation-branch-mini-connector { align-self: center; height: .75rem; display: inline-flex; color: #b0bac7; font-size: .62rem; }
.automation-branch-add,
.automation-branch-add-empty { align-self: center; border: 1px dashed rgba(14,178,149,.35); color: var(--accent-dark); background: rgba(14,178,149,.025); border-radius: .55rem; font-size: .64rem; min-height: 1.85rem; padding: .25rem .5rem; }
.automation-branch-add { width: 1.8rem; height: 1.8rem; padding: 0; border-radius: 999px; }
.automation-branch-add:hover,
.automation-branch-add-empty:hover { background: rgba(14,178,149,.08); border-color: rgba(14,178,149,.5); }
.automation-branch-join { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: .35rem; color: #94a3b8; font-size: .6rem; font-weight: 700; padding-top: .05rem; }

.automation-branch-summary { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: .35rem .45rem; align-items: center; padding: .6rem .65rem; border: 1px solid rgba(148,163,184,.16); border-radius: .7rem; background: #fbfcfd; color: #64748b; font-size: .66rem; }
.automation-branch-summary .is-if,
.automation-branch-summary .is-else { display: inline-flex; align-items: center; justify-content: center; min-width: 2.7rem; border-radius: 999px; padding: .18rem .4rem; font-weight: 800; font-size: .58rem; }
.automation-branch-summary .is-if { color: #087361; background: #e9f9f5; }
.automation-branch-summary .is-else { color: #475569; background: #eef2f6; }

.automation-variable-panel { border: 1px solid rgba(148,163,184,.16); border-radius: .75rem; background: #fbfcfd; overflow: hidden; }
.automation-variable-panel summary { list-style: none; cursor: pointer; min-height: 2.7rem; padding: .62rem .7rem; display: flex; align-items: center; gap: .45rem; color: #475569; font-size: .72rem; font-weight: 750; }
.automation-variable-panel summary::-webkit-details-marker { display: none; }
.automation-variable-panel summary small { margin-left: auto; max-width: 55%; color: #94a3b8; font-size: .58rem; font-weight: 500; text-align: right; }
.automation-variable-panel-body { border-top: 1px solid rgba(148,163,184,.12); padding: .65rem; background: #fff; }
.automation-variable-chips { display: grid; grid-template-columns: 1fr; gap: .35rem; max-height: 14rem; overflow: auto; }
.automation-variable-chip { width: 100%; border: 1px solid rgba(148,163,184,.14); border-radius: .58rem; background: #fff; padding: .42rem .5rem; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: .5rem; color: #475569; }
.automation-variable-chip:hover { border-color: rgba(14,178,149,.3); background: rgba(14,178,149,.025); }
.automation-variable-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .66rem; font-weight: 700; }
.automation-variable-chip small { flex: 0 0 auto; color: #94a3b8; font-size: .53rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.automation-library-branch-disabled { display: none !important; }

@media (max-width: 991.98px) {
    .automation-flow-group.has-branches { align-items: center; }
    .automation-branch-board { width: 20rem; min-width: 20rem; }
}
.automation-branch-mini-add { align-self: center; width: 1.4rem; height: 1.4rem; border-radius: 999px; border: 1px solid rgba(14,178,149,.22); background: #fff; color: var(--accent-dark); padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: .55rem; opacity: .65; }
.automation-branch-mini-add:hover { opacity: 1; background: rgba(14,178,149,.07); border-color: rgba(14,178,149,.45); }
.automation-run-status.is-skipped { color: var(--status-not-started); background: var(--status-not-started-bg); }
.automation-run-step.is-skipped { border-color: rgba(148,163,184,.16); background: #fbfcfd; opacity: .82; }
.automation-run-step.is-skipped .automation-run-step-icon { color: #94a3b8; }

/* Automations v1.1.6.6 — mobile studio parity + cache-safe editor shell */
.automation-mobile-canvas-hint,
.automation-inspector-close,
.automation-inspector-backdrop { display: none; }

@media (max-width: 767.98px) {
    .page-automation_edit .app-main .container-fluid {
        padding-left: .7rem !important;
        padding-right: .7rem !important;
    }

    .automation-appbar {
        padding: .7rem;
        gap: .65rem;
        border-radius: 1rem;
        background: rgba(255,255,255,.97);
        box-shadow: 0 10px 28px rgba(15,23,42,.045);
    }
    .automation-appbar-main { width: 100%; align-items: flex-start; }
    .automation-appbar-main .min-w-0 { flex: 1 1 auto; min-width: 0; }
    .automation-appbar-title { max-width: calc(100vw - 9rem); font-size: 1rem; line-height: 1.25; }
    .automation-appbar-actions {
        width: calc(100% + .1rem);
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: .05rem .05rem .28rem;
        margin: 0 -.05rem -.18rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }
    .automation-appbar-actions::-webkit-scrollbar { display: none; }
    .automation-appbar-actions > *,
    .automation-appbar-actions .btn:not(.automation-icon-button) { flex: 0 0 auto !important; }
    .automation-appbar-actions .btn { min-height: 2.42rem; border-radius: .78rem; }
    .automation-status-pill { font-size: .64rem; }

    .automation-studio {
        display: block;
        min-height: 0;
        overflow: hidden;
        border-radius: 1rem;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15,23,42,.04);
    }
    .automation-stage { min-height: 0; background: #fbfcfd; }
    .automation-stage-toolbar {
        min-height: 0;
        padding: .72rem .78rem .55rem;
        align-items: center;
        flex-direction: row;
        gap: .65rem;
    }
    .automation-stage-toolbar > div:first-child { min-width: 0; }
    .automation-stage-title { font-size: .9rem; }
    .automation-stage-toolbar .small { font-size: .66rem; line-height: 1.35; margin-top: .08rem; }
    .automation-stage-toolbar .btn { flex: 0 0 auto; white-space: nowrap; }

    .automation-mobile-canvas-hint {
        display: flex;
        align-items: center;
        gap: .4rem;
        margin: .48rem .68rem 0;
        color: #64748b;
        font-size: .63rem;
        line-height: 1.3;
    }
    .automation-mobile-canvas-hint i { color: var(--accent-dark); }

    .automation-flow-shell { padding: .55rem; min-width: 0; overflow: hidden; }
    .automation-flow-canvas {
        width: 100%;
        min-height: 19rem;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        align-items: center;
        padding: 2.1rem .8rem 2.3rem;
        border-radius: .9rem;
        scroll-snap-type: x proximity;
        scroll-padding-inline: .9rem;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y;
        background-size: 16px 16px;
    }
    .automation-flow-canvas::after {
        content: '';
        flex: 0 0 .15rem;
        width: .15rem;
        height: 1px;
    }
    .automation-flow-node {
        width: 8.65rem;
        min-width: 8.65rem;
        min-height: 9rem;
        padding: .76rem .68rem;
        border-radius: .88rem;
        scroll-snap-align: center;
        box-shadow: 0 7px 18px rgba(15,23,42,.045);
    }
    .automation-flow-node strong { font-size: .8rem; }
    .automation-node-meta { font-size: .62rem; }
    .automation-node-icon { width: 2.3rem; height: 2.3rem; }
    .automation-flow-node.is-selected { box-shadow: 0 0 0 3px rgba(14,178,149,.11), 0 10px 22px rgba(15,23,42,.06); }
    .automation-flow-group { scroll-snap-align: center; gap: .55rem; }
    .automation-flow-connector { min-width: 2.55rem; }
    .automation-flow-connector-tail { min-width: 2.8rem; }
    .automation-connector-add {
        opacity: 1;
        width: 1.6rem;
        height: 1.6rem;
        transform: translate(-50%, -50%) scale(.92);
        box-shadow: 0 4px 12px rgba(15,23,42,.07);
    }
    .automation-drag-handle { display: none; }
    .automation-branch-board { width: 18.5rem; min-width: 18.5rem; padding: .55rem; gap: .5rem; scroll-snap-align: center; }
    .automation-branch-lane-body { min-height: 6.6rem; padding: .42rem; }
    .automation-branch-step strong { max-width: 6.5rem; }
    .automation-stage-footer { min-height: 0; padding: .5rem .72rem; font-size: .62rem; line-height: 1.35; }

    .automation-inspector {
        display: block;
        position: fixed;
        left: .55rem;
        right: .55rem;
        bottom: calc(.55rem + env(safe-area-inset-bottom));
        z-index: 1048;
        max-height: min(80vh, 46rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 1rem .9rem .95rem;
        border: 1px solid rgba(148,163,184,.22);
        border-radius: 1.05rem;
        background: rgba(255,255,255,.985);
        box-shadow: 0 28px 70px rgba(15,23,42,.22);
        transform: translateY(calc(100% + 2rem));
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform .2s ease, opacity .18s ease, visibility .18s ease;
    }
    .automation-inspector.is-mobile-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .automation-inspector-head { padding-right: 2.6rem; }
    .automation-inspector-close {
        position: absolute;
        top: .75rem;
        right: .72rem;
        width: 2.1rem;
        height: 2.1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: 1px solid rgba(148,163,184,.18);
        border-radius: .68rem;
        background: #f8fafc;
        color: #64748b;
        z-index: 2;
    }
    .automation-inspector-close:active { background: #eef2f6; }
    .automation-inspector-secondary { padding-bottom: .15rem; }
    .automation-reorder-buttons { width: 100%; }
    .automation-reorder-buttons form { flex: 1 1 0; }
    .automation-reorder-buttons .btn { width: 100%; }

    .automation-inspector-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1045;
        border: 0;
        background: rgba(15,23,42,.34);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    .automation-inspector-backdrop.is-mobile-open { display: block; }
    body.automation-inspector-open { overflow: hidden; touch-action: none; }

    .automation-activity-card { border-radius: 1rem; }
    .automation-activity-head { gap: .65rem; }
}

@media (max-width: 389.98px) {
    .automation-appbar-actions .btn span:not(.automation-count-dot) { display: none; }
    .automation-appbar-actions .btn:not(.automation-icon-button) { width: 2.45rem; padding-left: 0; padding-right: 0; justify-content: center; }
    .automation-stage-toolbar .small { display: none; }
    .automation-flow-node { width: 8.15rem; min-width: 8.15rem; }
    .automation-branch-board { width: 17.5rem; min-width: 17.5rem; }
}

/* v1.1.6.7: compact app-style live toasts and keyboard focus for Workflow Studio. */
.app-live-notification {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3.5rem;
    padding: .8rem .95rem;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    background: rgba(255,255,255,.98);
    color: #1f2937;
    box-shadow: 0 14px 36px rgba(15,23,42,.13) !important;
    backdrop-filter: blur(12px);
}
.app-live-notification.alert-success { border-color: rgba(14,178,149,.24); }
.app-live-notification.alert-warning { border-color: rgba(245,158,11,.28); }
.app-live-notification.alert-danger { border-color: rgba(220,53,69,.24); }
.app-live-notification-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(14,178,149,.10);
    color: var(--accent);
}
.app-live-notification.alert-warning .app-live-notification-icon { background: rgba(245,158,11,.11); color: #b77900; }
.app-live-notification.alert-danger .app-live-notification-icon { background: rgba(220,53,69,.10); color: #dc3545; }
.app-live-notification-copy { font-weight: 650; line-height: 1.35; }

.automation-flow-canvas .automation-trigger-node:focus-visible,
.automation-flow-canvas .automation-step-main:focus-visible,
.automation-flow-canvas .automation-branch-step:focus-visible,
.automation-flow-canvas .automation-connector-add:focus-visible,
.automation-flow-canvas .automation-branch-add:focus-visible,
.automation-flow-canvas .automation-branch-mini-add:focus-visible,
.automation-flow-canvas .automation-branch-add-empty:focus-visible {
    outline: 3px solid rgba(14,178,149,.28);
    outline-offset: 4px;
    box-shadow: 0 0 0 1px rgba(14,178,149,.18);
}


/* v1.1.6.9: in-place Workflow Studio refresh state. */
[data-automation-editor-shell] .automation-studio,
[data-automation-editor-shell] .automation-activity-card { transition: opacity .16s ease, filter .16s ease; }
[data-automation-editor-shell].is-refreshing .automation-studio,
[data-automation-editor-shell].is-refreshing .automation-activity-card { opacity: .68; filter: saturate(.92); pointer-events: none; }

/* Automation versions + analytics */
.automation-version-pill,
.automation-draft-pill,
.automation-version-current {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    padding: .42rem .62rem;
    white-space: nowrap;
}
.automation-version-pill { background: var(--status-published-bg); color: var(--status-published); border: 1px solid rgba(22,163,106,.16); }
.automation-draft-pill { background: var(--status-draft-bg); color: var(--status-draft); border: 1px solid rgba(102,112,133,.16); }
.automation-version-current { background: rgba(14,178,149,.10); color: var(--bs-primary); padding: .3rem .5rem; }
.automation-version-list { display: grid; gap: .75rem; }
.automation-version-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    background: var(--bs-body-bg);
}
@media (max-width: 767.98px) {
    .automation-version-row { align-items: flex-start; flex-direction: column; }
    .automation-version-row form, .automation-version-row .btn { width: 100%; }
}

/* v1.1.7.1 — nested Automation branches stay compact and app-like. */
.automation-branch-step-stack { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.automation-branch-step-stack.has-nested-branch { padding: .25rem; border-radius: .72rem; background: rgba(248,250,252,.72); border: 1px solid rgba(148,163,184,.12); }
.automation-branch-board.is-nested { width: 100%; min-width: 0; margin-top: .1rem; padding: .42rem; gap: .4rem; border-radius: .72rem; background: #f8fafc; box-shadow: none; grid-template-columns: minmax(0, 1fr); }
.automation-branch-board.is-nested .automation-branch-lane-body { min-height: 4.8rem; padding: .36rem; gap: .3rem; }
.automation-branch-board.is-nested .automation-branch-step { padding: .42rem .46rem; }
.automation-branch-board.is-nested .automation-branch-step strong { max-width: 6.4rem; font-size: .65rem; }
.automation-branch-board.is-nested .automation-branch-step small { font-size: .54rem; }
.automation-branch-board.is-nested .automation-branch-step-icon { width: 1.45rem; height: 1.45rem; flex-basis: 1.45rem; }
.automation-nested-level { margin-left: auto; flex: 0 0 auto; border-radius: 999px; padding: .14rem .32rem; background: #eef2f6; color: #64748b; font-size: .52rem; font-weight: 800; }
.automation-branch-board[data-branch-depth="3"] { background: #f6f8fa; }
.automation-option-grid-single { grid-template-columns: 1fr; }

@media (max-width: 767.98px) {
    .automation-branch-board.is-nested .automation-branch-lane-body { min-height: 4.2rem; }
}

/* Automations v1.1.7.2 — explicit path branching, AI tag modes and prompt helper. */
.automation-branch-fork {
    grid-column: 1 / -1;
    position: relative;
    min-height: 2.6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    justify-items: center;
    margin: -.1rem .15rem .05rem;
    color: #94a3b8;
}
.automation-branch-fork-node {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 1.65rem;
    height: 1.65rem;
    border-radius: .42rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(99,102,241,.26);
    color: #4f46e5;
    box-shadow: 0 4px 12px rgba(15,23,42,.04);
    z-index: 2;
}
.automation-branch-fork-node svg,
.automation-branch-fork-node i { transform: rotate(-45deg); }
.automation-branch-fork-track {
    position: absolute;
    top: .8rem;
    left: 25%;
    width: 50%;
    height: 1.2rem;
    border-top: 1px solid rgba(99,102,241,.28);
}
.automation-branch-fork-track::before,
.automation-branch-fork-track::after {
    content: '';
    position: absolute;
    top: 0;
    height: 1.15rem;
    width: 1px;
    background: rgba(99,102,241,.28);
}
.automation-branch-fork-track::before { left: 0; }
.automation-branch-fork-track::after { right: 0; }
.automation-branch-fork-label {
    position: relative;
    z-index: 2;
    min-width: 3.2rem;
    border-radius: 999px;
    padding: .18rem .46rem;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(148,163,184,.16);
    font-size: .55rem;
    font-weight: 850;
    letter-spacing: .04em;
}
.automation-branch-fork-label.is-if { color: #087361; border-color: rgba(14,178,149,.24); background: #f0fbf8; }
.automation-branch-fork-label.is-else { color: #475569; background: #f8fafc; }
.automation-branch-lane { position: relative; }
.automation-branch-lane::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -1px;
    width: 1px;
    height: .38rem;
    transform: translateY(-100%);
    background: rgba(99,102,241,.22);
}
.automation-branch-join {
    position: relative;
    min-height: 1.8rem;
}
.automation-branch-join::before {
    content: '';
    position: absolute;
    top: -.45rem;
    left: 25%;
    width: 50%;
    height: .45rem;
    border-bottom: 1px solid rgba(99,102,241,.20);
    border-left: 1px solid rgba(99,102,241,.20);
    border-right: 1px solid rgba(99,102,241,.20);
    border-radius: 0 0 .45rem .45rem;
}
.automation-branch-board.is-nested .automation-branch-fork { min-height: 2.1rem; }
.automation-branch-board.is-nested .automation-branch-fork-track { left: 18%; width: 64%; }
.automation-branch-board.is-nested .automation-branch-fork-label { font-size: .49rem; min-width: 2.65rem; }

.automation-mode-cards { display: grid; gap: .55rem; }
.automation-mode-card {
    position: relative;
    min-height: 4rem;
    padding: .7rem .75rem;
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: center;
    gap: .7rem;
    border: 1px solid rgba(148,163,184,.18);
    border-radius: .82rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.automation-mode-card:hover { border-color: rgba(14,178,149,.30); background: #fcfffe; }
.automation-mode-card.is-selected { border-color: rgba(14,178,149,.52); background: rgba(14,178,149,.035); box-shadow: 0 0 0 2px rgba(14,178,149,.06); }
.automation-mode-card input { position: absolute; opacity: 0; pointer-events: none; }
.automation-mode-icon { width: 2rem; height: 2rem; border-radius: .62rem; display: inline-flex; align-items: center; justify-content: center; color: var(--accent-dark); background: rgba(14,178,149,.08); }
.automation-mode-card strong { display: block; color: #334155; font-size: .72rem; }
.automation-mode-card small { display: block; color: #8491a3; font-size: .61rem; line-height: 1.35; margin-top: .12rem; }
.automation-ai-helper-button { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; border-radius: .58rem; }

@media (max-width: 767.98px) {
    .automation-branch-fork { min-height: 2.35rem; }
    .automation-branch-board { padding-top: .6rem; }
    .automation-ai-helper-button { padding-left: .48rem; padding-right: .48rem; font-size: .65rem; }
}

/* Automations v1.1.7.2 — visual branch split, Skuze-style Paths/Flow clarity */
.automation-flow-group.has-branches {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0 .15rem;
}
.automation-flow-group.has-branches > .automation-step-node {
    position: relative;
    z-index: 3;
    margin-bottom: .15rem;
}
.automation-branch-board {
    position: relative;
    width: 30rem;
    min-width: 30rem;
    padding: .65rem .75rem .72rem;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    gap: .65rem .8rem;
    border-color: rgba(99,102,241,.12);
    background: linear-gradient(180deg, rgba(248,250,252,.96), rgba(255,255,255,.99));
    box-shadow: 0 10px 28px rgba(15,23,42,.035);
}
.automation-branch-fork {
    grid-column: 1 / -1;
    position: relative;
    min-height: 3.55rem;
    margin: -.18rem .8rem -.05rem;
}
.automation-branch-fork-node {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f46e5;
    background: #fff;
    border: 1px solid rgba(99,102,241,.25);
    box-shadow: 0 4px 12px rgba(79,70,229,.08);
    z-index: 2;
}
.automation-branch-fork-track {
    position: absolute;
    left: 25%;
    right: 25%;
    top: 1.72rem;
    height: 1.35rem;
    border-top: 1.5px solid rgba(99,102,241,.28);
}
.automation-branch-fork-track::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -1.72rem;
    height: 1.72rem;
    border-left: 1.5px solid rgba(99,102,241,.28);
}
.automation-branch-fork-track i {
    position: absolute;
    top: -1px;
    height: 1.35rem;
    border-left: 1.5px solid rgba(99,102,241,.28);
}
.automation-branch-fork-track i:first-child { left: 0; }
.automation-branch-fork-track i:last-child { right: 0; }
.automation-branch-fork-label {
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    min-width: 3rem;
    padding: .18rem .48rem;
    border-radius: 999px;
    text-align: center;
    font-size: .55rem;
    line-height: 1;
    font-weight: 850;
    letter-spacing: .045em;
}
.automation-branch-fork-label.is-if { left: 25%; color: #087361; background: #e9f9f5; }
.automation-branch-fork-label.is-else { left: 75%; color: #475569; background: #eef2f6; }
.automation-branch-lane {
    position: relative;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(15,23,42,.02);
}
.automation-branch-lane.is-if::before,
.automation-branch-lane.is-else::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -.66rem;
    height: .66rem;
    border-left: 1.5px solid rgba(99,102,241,.22);
}
.automation-branch-lane.is-if .automation-branch-lane-head { color: #087361; background: rgba(14,178,149,.045); }
.automation-branch-lane.is-else .automation-branch-lane-head { color: #556274; background: #f8fafc; }
.automation-branch-join {
    position: relative;
    min-height: 3rem;
    padding-top: 1.8rem;
    margin: -.05rem .8rem 0;
    color: #64748b;
}
.automation-branch-join::before {
    content: '';
    position: absolute;
    left: 25%;
    right: 25%;
    top: 0;
    border-top: 1.5px solid rgba(99,102,241,.22);
}
.automation-branch-join::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    height: 1.55rem;
    border-left: 1.5px solid rgba(99,102,241,.22);
}
.automation-branch-join > span {
    position: relative;
    z-index: 1;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(99,102,241,.18);
    color: #6366f1;
}
.automation-branch-board.is-nested {
    width: 100%;
    min-width: 0;
    padding: .5rem;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
}
.automation-branch-board.is-nested .automation-branch-fork { min-height: 3.2rem; margin-left: .35rem; margin-right: .35rem; }
.automation-branch-board.is-nested .automation-branch-fork-label { min-width: 2.5rem; font-size: .5rem; }
.automation-branch-board.is-nested .automation-branch-join { margin-left: .35rem; margin-right: .35rem; }

@media (max-width: 991.98px) {
    .automation-branch-board { width: 27rem; min-width: 27rem; }
}
@media (max-width: 767.98px) {
    .automation-branch-board { width: 25rem; min-width: 25rem; }
    .automation-branch-board.is-nested { width: 21rem; min-width: 21rem; }
    .automation-branch-fork { margin-left: .45rem; margin-right: .45rem; }
    .automation-branch-join { margin-left: .45rem; margin-right: .45rem; }
}

/* Automations v1.1.7.3 — IF stays on the main horizontal flow; ELSE continues on a second row below. */
.automation-flow-canvas {
    align-items: flex-start;
}
.automation-flow-connector {
    margin-top: 4.58rem;
}
.automation-flow-group.has-branches {
    flex-direction: row;
    align-items: flex-start;
    gap: .72rem;
    padding: 0;
}
.automation-flow-group.has-branches > .automation-step-node {
    margin-bottom: 0;
}
.automation-flow-group.has-branches > .automation-branch-board {
    margin-top: 0;
}
.automation-branch-board {
    width: max-content;
    min-width: 19rem;
    max-width: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .72rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.automation-branch-fork {
    display: none !important;
}
.automation-branch-lane {
    width: 100%;
    min-width: 19rem;
    min-height: 9.2rem;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: visible;
    border: 0;
    border-radius: .82rem;
    background: transparent;
    box-shadow: none;
}
.automation-branch-lane.is-if,
.automation-branch-lane.is-else {
    border-top: 0;
}
.automation-branch-lane.is-if::before,
.automation-branch-lane.is-else::before {
    content: '';
    position: absolute;
    left: -.72rem;
    top: 4.58rem;
    width: .72rem;
    height: 1px;
    border: 0;
    background: rgba(99,102,241,.24);
    transform: none;
}
.automation-branch-lane.is-else::after {
    content: '';
    position: absolute;
    left: -.72rem;
    top: calc(-.72rem - 4.58rem);
    width: 1px;
    height: calc(4.58rem + .72rem + 4.58rem);
    background: rgba(99,102,241,.24);
}
.automation-branch-lane-head {
    flex: 0 0 4.7rem;
    width: 4.7rem;
    min-height: 9.2rem;
    padding: .58rem .52rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    text-align: center;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: .78rem 0 0 .78rem;
    background: #fff;
}
.automation-branch-lane.is-if .automation-branch-lane-head {
    color: #087361;
    border-color: rgba(14,178,149,.25);
    background: #f3fcf9;
}
.automation-branch-lane.is-else .automation-branch-lane-head {
    color: #556274;
    background: #f8fafc;
}
.automation-branch-lane-head > span {
    max-width: 100%;
    line-height: 1.25;
}
.automation-branch-lane-head small {
    min-width: 1.25rem;
    height: 1.25rem;
    margin: 0;
}
.automation-branch-lane-body {
    flex: 1 1 auto;
    min-width: 14.3rem;
    min-height: 9.2rem;
    padding: .46rem .55rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: .48rem;
    border: 1px solid rgba(148,163,184,.16);
    border-left: 0;
    border-radius: 0 .78rem .78rem 0;
    background: rgba(255,255,255,.94);
    overflow: visible;
}
.automation-branch-step-stack {
    flex: 0 0 auto;
    min-width: 0;
}
.automation-branch-step-stack.has-nested-branch {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: .52rem;
    padding: .34rem;
    background: rgba(248,250,252,.82);
}
.automation-branch-step {
    width: 8.15rem;
    min-width: 8.15rem;
    min-height: 6.7rem;
    padding: .62rem .58rem;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    border-radius: .76rem;
}
.automation-branch-step-icon {
    width: 2rem;
    height: 2rem;
    flex-basis: 2rem;
}
.automation-branch-step strong {
    max-width: 7rem;
    white-space: normal;
    line-height: 1.25;
}
.automation-branch-step small {
    line-height: 1.3;
}
.automation-branch-mini-add,
.automation-branch-add {
    flex: 0 0 auto;
}
.automation-branch-add-empty {
    flex: 0 0 auto;
    min-width: 7.4rem;
    min-height: 3rem;
}
.automation-branch-join {
    position: absolute;
    right: -.2rem;
    top: 3.86rem;
    min-height: 0;
    margin: 0;
    padding: 0;
    transform: translateX(100%);
    color: #64748b;
    font-size: .55rem;
    white-space: nowrap;
}
.automation-branch-join::before,
.automation-branch-join::after {
    display: none;
}
.automation-branch-join > span {
    width: 1.45rem;
    height: 1.45rem;
    margin-right: .25rem;
}
.automation-branch-board.is-nested {
    width: max-content;
    min-width: 17rem;
    padding: 0;
    grid-template-columns: none;
    background: transparent;
}
.automation-branch-board.is-nested .automation-branch-lane {
    min-width: 17rem;
    min-height: 7.1rem;
}
.automation-branch-board.is-nested .automation-branch-lane-head {
    flex-basis: 4rem;
    width: 4rem;
    min-height: 7.1rem;
}
.automation-branch-board.is-nested .automation-branch-lane-body {
    min-width: 12.5rem;
    min-height: 7.1rem;
    padding: .4rem .48rem;
}
.automation-branch-board.is-nested .automation-branch-lane.is-if::before,
.automation-branch-board.is-nested .automation-branch-lane.is-else::before {
    top: 3.55rem;
}
.automation-branch-board.is-nested .automation-branch-lane.is-else::after {
    top: calc(-.72rem - 3.55rem);
    height: calc(3.55rem + .72rem + 3.55rem);
}
.automation-branch-board.is-nested .automation-branch-step {
    width: 7.2rem;
    min-width: 7.2rem;
    min-height: 5.8rem;
}
.automation-branch-board.is-nested .automation-branch-join {
    top: 2.75rem;
}

@media (max-width: 767.98px) {
    .automation-flow-canvas {
        align-items: flex-start;
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }
    .automation-flow-connector {
        margin-top: 4.5rem;
    }
    .automation-flow-group.has-branches {
        align-items: flex-start;
        gap: .58rem;
    }
    .automation-branch-board,
    .automation-branch-board.is-nested {
        width: max-content;
        min-width: 17.5rem;
        padding: 0;
        scroll-snap-align: start;
    }
    .automation-branch-lane {
        min-width: 17.5rem;
    }
    .automation-branch-lane-head {
        flex-basis: 4.25rem;
        width: 4.25rem;
    }
    .automation-branch-lane-body {
        min-width: 13rem;
        padding: .4rem .45rem;
    }
    .automation-branch-step {
        width: 7.6rem;
        min-width: 7.6rem;
    }
    .automation-branch-step strong {
        max-width: 6.6rem;
    }
    .automation-branch-join {
        display: none;
    }
}
.automation-branch-mini-add-start {
    opacity: .78;
}

/* Automations v1.1.7.4 — centered main flow with flat horizontal IF/ELSE lanes.
   Normal steps never resize the Studio: the canvas owns horizontal overflow.
   Extra vertical room is added only when an IF/ELSE exists. */
.automation-studio,
.automation-stage,
.automation-flow-shell,
.automation-flow-canvas {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}
.automation-studio,
.automation-stage,
.automation-flow-shell {
    overflow: hidden;
}
.automation-flow-canvas {
    width: 100%;
    align-items: center !important;
    overflow-x: auto;
    overflow-y: hidden;
}
.automation-flow-canvas.has-branching {
    min-height: 31rem;
    overflow-x: auto;
    overflow-y: auto;
}
.automation-flow-connector {
    margin-top: 0 !important;
    align-self: center;
}
.automation-flow-group.has-branches {
    --skuze-branch-node: 9.2rem;
    --skuze-branch-gap: .82rem;
    height: var(--skuze-branch-node);
    flex-direction: row !important;
    align-items: center !important;
    gap: .72rem !important;
    padding: 0 !important;
    overflow: visible;
    position: relative;
}
.automation-flow-group.has-branches > .automation-step-node {
    align-self: center;
    margin: 0 !important;
}
.automation-flow-group.has-branches > .automation-branch-board {
    align-self: flex-start;
    margin: 0 0 calc(-1 * (var(--skuze-branch-node) + var(--skuze-branch-gap))) 0 !important;
}
.automation-branch-board {
    --skuze-branch-node: 9.2rem;
    --skuze-branch-gap: .82rem;
    position: relative;
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    height: calc((var(--skuze-branch-node) * 2) + var(--skuze-branch-gap));
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: max-content !important;
    grid-template-rows: var(--skuze-branch-node) var(--skuze-branch-node) !important;
    row-gap: var(--skuze-branch-gap) !important;
    column-gap: 0 !important;
    align-items: stretch;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}
.automation-branch-board::after {
    content: '';
    position: absolute;
    left: -.72rem;
    top: calc(var(--skuze-branch-node) / 2);
    width: 1px;
    height: calc(var(--skuze-branch-node) + var(--skuze-branch-gap));
    background: rgba(99,102,241,.24);
    pointer-events: none;
}
.automation-branch-fork,
.automation-branch-join {
    display: none !important;
}
.automation-branch-lane {
    position: relative;
    width: 100% !important;
    min-width: max-content !important;
    height: var(--skuze-branch-node) !important;
    min-height: var(--skuze-branch-node) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.automation-branch-lane::before,
.automation-branch-lane.is-if::before,
.automation-branch-lane.is-else::before {
    content: '' !important;
    position: absolute !important;
    z-index: 0;
    left: -.72rem !important;
    top: 50% !important;
    width: calc(100% + .72rem) !important;
    height: 1px !important;
    border: 0 !important;
    background: rgba(99,102,241,.20) !important;
    transform: none !important;
    pointer-events: none;
}
.automation-branch-lane.is-else::after {
    display: none !important;
}
.automation-branch-lane-head {
    position: relative;
    z-index: 2;
    flex: 0 0 4.7rem !important;
    width: 4.7rem !important;
    height: var(--skuze-branch-node) !important;
    min-height: var(--skuze-branch-node) !important;
    padding: .62rem .48rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .42rem !important;
    text-align: center;
    border: 1px solid rgba(148,163,184,.18) !important;
    border-radius: .9rem !important;
    background: #fff !important;
    box-shadow: 0 6px 16px rgba(15,23,42,.03);
}
.automation-branch-lane.is-if .automation-branch-lane-head {
    color: #087361 !important;
    border-color: rgba(14,178,149,.28) !important;
    background: linear-gradient(180deg, rgba(14,178,149,.06), #fff 58%) !important;
}
.automation-branch-lane.is-else .automation-branch-lane-head {
    color: #556274 !important;
    background: linear-gradient(180deg, rgba(100,116,139,.045), #fff 58%) !important;
}
.automation-branch-lane-head > span {
    max-width: 100%;
    font-size: .59rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.automation-branch-lane-head small {
    min-width: 1.28rem !important;
    height: 1.28rem !important;
    margin: 0 !important;
    padding: 0 .28rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2f6;
    color: #64748b;
    font-size: .58rem;
}
.automation-branch-lane-body {
    position: relative;
    z-index: 1;
    flex: 1 0 auto !important;
    width: max-content;
    min-width: 4.1rem !important;
    height: var(--skuze-branch-node) !important;
    min-height: var(--skuze-branch-node) !important;
    padding: 0 0 0 .5rem !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: .5rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
}
.automation-branch-step-stack {
    position: relative;
    z-index: 2;
    flex: 0 0 auto !important;
    min-width: 0;
}
.automation-branch-step-stack.has-nested-branch {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: .58rem !important;
    padding: 0 !important;
    background: transparent !important;
}
.automation-branch-step {
    position: relative;
    z-index: 2;
    width: var(--skuze-branch-node) !important;
    min-width: var(--skuze-branch-node) !important;
    height: var(--skuze-branch-node) !important;
    min-height: var(--skuze-branch-node) !important;
    padding: .8rem !important;
    border-radius: .9rem !important;
    border: 1px solid #dbe4ea !important;
    background: #fff !important;
    box-shadow: 0 6px 16px rgba(15,23,42,.035) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: .42rem !important;
    text-align: center !important;
    color: #1f2937 !important;
}
.automation-branch-step:hover {
    color: #1f2937 !important;
    border-color: #c6d2dc !important;
    transform: translateY(-1px);
}
.automation-branch-step.is-selected {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(14,178,149,.08), 0 6px 16px rgba(15,23,42,.035) !important;
}
.automation-branch-step-icon {
    width: 2.4rem !important;
    height: 2.4rem !important;
    flex: 0 0 2.4rem !important;
    border-radius: .75rem !important;
    background: rgba(14,178,149,.08) !important;
    color: var(--accent-dark) !important;
    font-size: 1.05rem;
}
.automation-branch-step > span:not(.automation-branch-step-icon):not(.automation-nested-level) {
    min-width: 0;
}
.automation-branch-step strong {
    display: block !important;
    max-width: 7.6rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal !important;
    font-size: .78rem !important;
    line-height: 1.3 !important;
}
.automation-branch-step small {
    display: block !important;
    margin-top: .1rem !important;
    color: #7b8797 !important;
    font-size: .63rem !important;
    line-height: 1.3 !important;
}
.automation-branch-mini-add,
.automation-branch-add {
    position: relative;
    z-index: 3;
    flex: 0 0 1.45rem !important;
    width: 1.45rem !important;
    height: 1.45rem !important;
    min-width: 1.45rem;
    min-height: 1.45rem;
    align-self: center !important;
    padding: 0 !important;
    border-radius: 999px !important;
    border: 1px solid rgba(14,178,149,.25) !important;
    background: #fff !important;
    color: var(--accent-dark) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    opacity: .78 !important;
}
.automation-branch-mini-add:hover,
.automation-branch-add:hover {
    opacity: 1 !important;
    background: #eefbf8 !important;
}
.automation-branch-add-empty {
    position: relative;
    z-index: 2;
    flex: 0 0 var(--skuze-branch-node) !important;
    width: var(--skuze-branch-node) !important;
    min-width: var(--skuze-branch-node) !important;
    height: var(--skuze-branch-node) !important;
    min-height: var(--skuze-branch-node) !important;
    padding: .75rem !important;
    border: 1px dashed rgba(14,178,149,.36) !important;
    border-radius: .9rem !important;
    background: rgba(255,255,255,.92) !important;
    color: var(--accent-dark) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    text-align: center;
}
.automation-branch-board.is-nested {
    --skuze-branch-node: 7.2rem;
    --skuze-branch-gap: .62rem;
    align-self: flex-start;
    margin: 0 0 calc(-1 * (var(--skuze-branch-node) + var(--skuze-branch-gap))) 0 !important;
}
.automation-branch-board.is-nested .automation-branch-lane-head {
    flex-basis: 3.8rem !important;
    width: 3.8rem !important;
}
.automation-branch-board.is-nested .automation-branch-step {
    width: var(--skuze-branch-node) !important;
    min-width: var(--skuze-branch-node) !important;
    height: var(--skuze-branch-node) !important;
    min-height: var(--skuze-branch-node) !important;
    padding: .55rem !important;
}
.automation-branch-board.is-nested .automation-branch-step-icon {
    width: 2rem !important;
    height: 2rem !important;
    flex-basis: 2rem !important;
}
.automation-branch-board.is-nested .automation-branch-step strong {
    max-width: 6rem !important;
    font-size: .69rem !important;
}
.automation-branch-board.is-nested .automation-branch-step small {
    font-size: .56rem !important;
}
.automation-branch-board.is-nested .automation-branch-add-empty {
    width: var(--skuze-branch-node) !important;
    min-width: var(--skuze-branch-node) !important;
    height: var(--skuze-branch-node) !important;
    min-height: var(--skuze-branch-node) !important;
}

@media (max-width: 767.98px) {
    .automation-flow-canvas {
        align-items: center !important;
        padding-top: 1.8rem !important;
        padding-bottom: 2.1rem !important;
    }
    .automation-flow-canvas.has-branching {
        min-height: 29rem;
    }
    .automation-flow-connector {
        margin-top: 0 !important;
    }
    .automation-flow-group.has-branches {
        align-items: center !important;
        gap: .58rem !important;
    }
    .automation-branch-board,
    .automation-branch-board.is-nested {
        width: max-content !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 0 !important;
        scroll-snap-align: none !important;
    }
    .automation-branch-lane {
        min-width: max-content !important;
    }
    .automation-branch-join {
        display: none !important;
    }
}

/* v1.1.7.6 — branch-row alignment, viewport-preserving editor refresh and UI action polish. */
.automation-branch-board {
    display: block !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    height: var(--skuze-branch-node) !important;
    overflow: visible !important;
}
.automation-branch-lane {
    width: max-content !important;
    min-width: 0 !important;
}
.automation-branch-lane.is-if {
    position: relative !important;
    inset: auto !important;
}
.automation-branch-lane.is-else {
    position: absolute !important;
    left: 0 !important;
    top: calc(var(--skuze-branch-node) + var(--skuze-branch-gap)) !important;
}
.automation-branch-lane-body {
    flex: 0 0 auto !important;
    width: max-content !important;
    min-width: 0 !important;
}
/*
 * Keep the first real branch card on the same x-coordinate as the first
 * main-flow card after an empty IF lane. The start + stays on the connector,
 * while the extra spacing equals the normal main-flow connector width.
 */
.automation-branch-mini-add-start:not(.automation-branch-mini-add-empty) {
    margin-right: 2.3rem !important;
}

/* Step inspector actions: one consistent compact control surface instead of
   mixed link-buttons and two-line move buttons. */
.automation-inspector-secondary {
    display: block !important;
    padding-top: .95rem !important;
    margin-top: 1rem !important;
}
.automation-inspector-action-label {
    margin-bottom: .55rem;
    color: #94a3b8;
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.automation-inspector-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .5rem;
}
.automation-inspector-action-grid form {
    min-width: 0;
    margin: 0;
}
.automation-inspector-action-wide {
    grid-column: 1 / -1;
}
.automation-inspector-action-button {
    width: 100%;
    min-width: 0;
    min-height: 2.7rem;
    padding: .45rem .58rem;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: .75rem;
    background: #f8fafc;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .48rem;
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color .14s ease, background-color .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.automation-inspector-action-button:hover:not(:disabled),
.automation-inspector-action-button:focus-visible:not(:disabled) {
    border-color: rgba(14,178,149,.28);
    background: #f0fbf8;
    color: #087361;
    box-shadow: 0 5px 14px rgba(15,23,42,.045);
}
.automation-inspector-action-button:active:not(:disabled) {
    transform: translateY(1px);
}
.automation-inspector-action-button:disabled {
    cursor: not-allowed;
    opacity: .46;
}
.automation-inspector-action-icon {
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 1.75rem;
    border-radius: .56rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2f6;
    color: #64748b;
}
.automation-inspector-action-button:hover:not(:disabled) .automation-inspector-action-icon,
.automation-inspector-action-button:focus-visible:not(:disabled) .automation-inspector-action-icon {
    background: rgba(14,178,149,.1);
    color: #087361;
}
.automation-inspector-action-button.is-danger {
    background: rgba(239,68,68,.035);
    border-color: rgba(239,68,68,.14);
    color: #b42318;
}
.automation-inspector-action-button.is-danger .automation-inspector-action-icon {
    background: rgba(239,68,68,.075);
    color: #b42318;
}
.automation-inspector-action-button.is-danger:hover,
.automation-inspector-action-button.is-danger:focus-visible {
    background: rgba(239,68,68,.075);
    border-color: rgba(239,68,68,.22);
    color: #9f1c13;
}

/* Small cross-app action audit fixes: keep icon buttons aligned, let action
   groups wrap safely and avoid tall wrapped table actions. */
.row-action-cluster .btn,
.review-item-actions .btn,
.automation-approval-actions .btn,
.notification-row-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
}
.automation-approval-actions,
.notification-row-actions {
    flex-wrap: wrap;
}
.notification-row-actions {
    gap: .45rem;
}
.notification-mark-read {
    color: #475569;
}
.table-responsive .btn.btn-sm {
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .automation-inspector-action-grid {
        gap: .45rem;
    }
    .automation-inspector-action-button {
        min-height: 2.8rem;
        font-size: .7rem;
    }
    .automation-branch-mini-add-start:not(.automation-branch-mini-add-empty) {
        margin-right: 2.05rem !important;
    }
}
@media (max-width: 767.98px) {
    .automation-flow-group.has-branches,
    .automation-branch-board:not(.is-nested) {
        --skuze-branch-node: 8.65rem;
    }
}
@media (max-width: 389.98px) {
    .automation-flow-group.has-branches,
    .automation-branch-board:not(.is-nested) {
        --skuze-branch-node: 8.15rem;
    }
}

/* Skuze Copilot v1 -------------------------------------------------------
   Restricted app agent: visually distinct from a general-purpose chat UI.
   It is only rendered for users who pass the server-side Copilot gate. */
.admin-copilot-toggle {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(14,178,149,.16);
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(14,178,149,.065), rgba(255,255,255,.95) 58%);
    display: flex;
    align-items: flex-start;
    gap: .85rem;
}
.admin-copilot-icon {
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 2.65rem;
    filter: drop-shadow(0 6px 12px rgba(14,178,149,.12));
}

.skuze-copilot {
    --copilot-panel-width: 430px;
    position: fixed;
    right: 1.15rem;
    bottom: 1.15rem;
    z-index: 1044;
    pointer-events: none;
}
.skuze-copilot-launcher,
.skuze-copilot-panel {
    pointer-events: auto;
}
.skuze-copilot-launcher {
    min-height: 3.55rem;
    padding: .48rem .78rem .48rem .5rem;
    border: 1px solid rgba(14,178,149,.22);
    border-radius: 1.15rem;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 42px rgba(15,23,42,.15), 0 0 0 1px rgba(255,255,255,.82) inset;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: .62rem;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.skuze-copilot-launcher:hover,
.skuze-copilot-launcher:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(14,178,149,.38);
    box-shadow: 0 20px 46px rgba(15,23,42,.18), 0 0 0 4px rgba(14,178,149,.07);
}
.skuze-copilot-launcher-icon,
.skuze-copilot-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.skuze-copilot-launcher-icon {
    width: 2.55rem;
    height: 2.55rem;
}
.skuze-copilot-launcher-icon img,
.skuze-copilot-avatar img,
.skuze-copilot-message-icon img {
    width: 100%;
    height: 100%;
    display: block;
}
.skuze-copilot-launcher-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
}
.skuze-copilot-launcher-copy strong {
    font-size: .82rem;
    font-weight: 800;
}
.skuze-copilot-launcher-copy small {
    margin-top: .25rem;
    color: #64748b;
    font-size: .65rem;
    font-weight: 650;
}
.skuze-copilot.is-open .skuze-copilot-launcher {
    opacity: 0;
    transform: translateY(8px) scale(.96);
    pointer-events: none;
}

.skuze-copilot-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(var(--copilot-panel-width), calc(100vw - 2rem));
    height: min(720px, calc(100vh - 2.3rem));
    min-height: 500px;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: 1.35rem;
    background: rgba(255,255,255,.985);
    box-shadow: 0 28px 75px rgba(15,23,42,.22), 0 0 0 1px rgba(255,255,255,.9) inset;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.985);
    transform-origin: right bottom;
    transition: opacity .16s ease, visibility .16s ease, transform .16s ease;
}
.skuze-copilot.is-open .skuze-copilot-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.skuze-copilot-header {
    padding: .9rem .9rem .82rem;
    border-bottom: 1px solid #edf1f4;
    background: linear-gradient(135deg, rgba(14,178,149,.075), rgba(255,255,255,.98) 62%);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
}
.skuze-copilot-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .7rem;
}
.skuze-copilot-avatar {
    width: 2.55rem;
    height: 2.55rem;
}
.skuze-copilot-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .42rem;
    color: #0f172a;
    line-height: 1.2;
}
.skuze-copilot-title-row strong {
    font-size: .9rem;
}
.skuze-copilot-scope {
    padding: .22rem .42rem;
    border: 1px solid rgba(14,178,149,.18);
    border-radius: 999px;
    background: rgba(14,178,149,.085);
    color: #087361;
    font-size: .57rem;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.skuze-copilot-subtitle {
    max-width: 295px;
    margin-top: .25rem;
    color: #64748b;
    font-size: .66rem;
    line-height: 1.35;
}
.skuze-copilot-close {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border: 1px solid transparent;
    border-radius: .66rem;
    background: transparent;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.skuze-copilot-close:hover,
.skuze-copilot-close:focus-visible {
    border-color: #e2e8f0;
    background: #fff;
    color: #0f172a;
}

.skuze-copilot-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .9rem;
    background: linear-gradient(180deg, #fbfefd 0%, #f8fafc 100%);
    scrollbar-width: thin;
}
.skuze-copilot-message {
    margin-bottom: .8rem;
    display: flex;
    align-items: flex-start;
    gap: .48rem;
}
.skuze-copilot-message.is-user {
    justify-content: flex-end;
}
.skuze-copilot-message-icon {
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 1.75rem;
    margin-top: .12rem;
}
.skuze-copilot-bubble {
    max-width: 86%;
    padding: .66rem .74rem;
    border: 1px solid #e5eaf0;
    border-radius: .9rem .9rem .9rem .28rem;
    background: #fff;
    color: #334155;
    box-shadow: 0 6px 17px rgba(15,23,42,.035);
    font-size: .75rem;
    line-height: 1.48;
}
.skuze-copilot-message.is-user .skuze-copilot-bubble {
    border-color: rgba(14,178,149,.18);
    border-radius: .9rem .9rem .28rem .9rem;
    background: #eafaf6;
    color: #075d4f;
}
.skuze-copilot-message.is-error .skuze-copilot-bubble {
    border-color: rgba(239,68,68,.16);
    background: #fff7f7;
    color: #9f1c13;
}
.skuze-copilot-bubble strong {
    display: block;
    margin-bottom: .22rem;
    color: #0f172a;
    font-size: .78rem;
}
.skuze-copilot-bubble p {
    margin: 0;
}
.skuze-copilot-suggestions {
    margin: .15rem 0 .9rem 2.25rem;
    display: grid;
    gap: .42rem;
}
.skuze-copilot-suggestions button {
    width: 100%;
    min-height: 2.45rem;
    padding: .48rem .62rem;
    border: 1px solid rgba(148,163,184,.2);
    border-radius: .78rem;
    background: rgba(255,255,255,.78);
    color: #475569;
    display: flex;
    align-items: center;
    gap: .52rem;
    text-align: left;
    font-size: .69rem;
    font-weight: 700;
    transition: border-color .14s ease, background-color .14s ease, color .14s ease;
}
.skuze-copilot-suggestions button i {
    color: var(--accent-dark);
}
.skuze-copilot-suggestions button:hover:not(:disabled),
.skuze-copilot-suggestions button:focus-visible:not(:disabled) {
    border-color: rgba(14,178,149,.3);
    background: #f2fcf9;
    color: #075d4f;
}
.skuze-copilot-status {
    margin: .2rem 0 .8rem 2.25rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: .48rem;
    font-size: .69rem;
}
.skuze-copilot-status .spinner-border {
    width: .82rem;
    height: .82rem;
    border-width: .12em;
    color: var(--accent);
}

.skuze-copilot-plan {
    margin: .35rem 0 1rem 2.25rem;
    border: 1px solid rgba(14,178,149,.2);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15,23,42,.06);
    overflow: hidden;
}
.skuze-copilot-plan.is-created {
    border-color: rgba(14,178,149,.34);
}
.skuze-copilot-plan-head {
    padding: .76rem .78rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .6rem;
}
.skuze-copilot-plan-head > div {
    min-width: 0;
}
.skuze-copilot-plan-kicker {
    display: block;
    margin-bottom: .16rem;
    color: #0a8e78;
    font-size: .57rem;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}
.skuze-copilot-plan-head strong {
    display: block;
    color: #0f172a;
    font-size: .82rem;
    line-height: 1.25;
}
.skuze-copilot-plan-head p {
    margin: .28rem 0 0;
    color: #64748b;
    font-size: .66rem;
    line-height: 1.4;
}
.skuze-copilot-plan-safe {
    flex: 0 0 auto;
    padding: .25rem .43rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    font-size: .57rem;
    font-weight: 800;
}
.skuze-copilot-plan-meta {
    padding: 0 .78rem .72rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .45rem;
}
.skuze-copilot-plan-meta > div {
    min-width: 0;
    padding: .5rem .56rem;
    border-radius: .68rem;
    background: #f8fafc;
}
.skuze-copilot-plan-meta span,
.skuze-copilot-plan-meta strong {
    display: block;
}
.skuze-copilot-plan-meta span {
    color: #94a3b8;
    font-size: .55rem;
    font-weight: 750;
    text-transform: uppercase;
}
.skuze-copilot-plan-meta strong {
    margin-top: .13rem;
    color: #334155;
    font-size: .66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.skuze-copilot-plan-section-title {
    padding: .52rem .78rem .38rem;
    border-top: 1px solid #edf1f4;
    color: #94a3b8;
    font-size: .57rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.skuze-copilot-plan-steps {
    padding: 0 .78rem .55rem;
}
.skuze-copilot-plan-step {
    --copilot-step-depth: 0;
    position: relative;
    min-height: 2.65rem;
    margin-left: calc(var(--copilot-step-depth) * .72rem);
    padding: .4rem .46rem;
    border-bottom: 1px solid #f0f3f6;
    display: flex;
    align-items: center;
    gap: .48rem;
}
.skuze-copilot-plan-step:last-child {
    border-bottom: 0;
}
.skuze-copilot-plan-step-index {
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 1.55rem;
    border: 1px solid rgba(14,178,149,.16);
    border-radius: .5rem;
    background: rgba(14,178,149,.07);
    color: #087361;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .57rem;
    font-weight: 850;
}
.skuze-copilot-plan-step-copy {
    min-width: 0;
    flex: 1;
}
.skuze-copilot-plan-step-copy > strong {
    display: block;
    color: #334155;
    font-size: .68rem;
    line-height: 1.25;
}
.skuze-copilot-plan-step-meta {
    margin-top: .2rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .3rem;
    font-size: .57rem;
}
.skuze-copilot-branch-pill,
.skuze-copilot-setup-pill {
    padding: .12rem .28rem;
    border-radius: 999px;
    font-size: .49rem;
    font-weight: 850;
    letter-spacing: .03em;
}
.skuze-copilot-branch-pill.is-if {
    background: rgba(14,178,149,.09);
    color: #087361;
}
.skuze-copilot-branch-pill.is-else {
    background: #eef2ff;
    color: #4f46e5;
}
.skuze-copilot-setup-pill {
    background: #fff7ed;
    color: #c2410c;
}
.skuze-copilot-plan-warnings {
    margin: .1rem .78rem .75rem;
    padding: .58rem .66rem;
    border: 1px solid #fed7aa;
    border-radius: .7rem;
    background: #fffaf3;
    color: #9a4510;
    font-size: .62rem;
    line-height: 1.4;
}
.skuze-copilot-plan-warnings > strong {
    display: block;
    margin-bottom: .28rem;
    font-size: .62rem;
}
.skuze-copilot-plan-warnings ul {
    margin: 0;
    padding-left: 1rem;
}
.skuze-copilot-plan-actions {
    min-height: 3.6rem;
    padding: .65rem .78rem;
    border-top: 1px solid #edf1f4;
    background: #fbfcfd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}
.skuze-copilot-plan-actions > span {
    color: #94a3b8;
    font-size: .58rem;
    font-weight: 650;
}
.skuze-copilot-created {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}
.skuze-copilot-created > span {
    color: #087361;
    font-size: .63rem;
    font-weight: 700;
    line-height: 1.35;
}

.skuze-copilot-composer {
    padding: .7rem;
    border-top: 1px solid #e9eef2;
    background: #fff;
}
.skuze-copilot-composer textarea {
    width: 100%;
    min-height: 4.8rem;
    max-height: 9rem;
    resize: vertical;
    padding: .7rem .76rem;
    border: 1px solid #dfe5eb;
    border-radius: .88rem;
    outline: 0;
    background: #fbfcfd;
    color: #1f2937;
    font-size: .74rem;
    line-height: 1.45;
    transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}
.skuze-copilot-composer textarea:focus {
    border-color: rgba(14,178,149,.42);
    background: #fff;
    box-shadow: 0 0 0 .2rem rgba(14,178,149,.1);
}
.skuze-copilot-composer textarea::placeholder {
    color: #a0abba;
}
.skuze-copilot-composer-footer {
    margin-top: .55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .55rem;
}
.skuze-copilot-composer-footer > span {
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: .28rem;
    font-size: .56rem;
    font-weight: 650;
}
.skuze-copilot-composer-footer > span i {
    color: #0a8e78;
}

@media (max-width: 767.98px) {
    .skuze-copilot {
        right: .72rem;
        bottom: calc(4.75rem + env(safe-area-inset-bottom));
    }
    .skuze-copilot-launcher {
        min-height: 3.2rem;
        padding-right: .65rem;
    }
    .skuze-copilot-launcher-icon {
        width: 2.25rem;
        height: 2.25rem;
    }
    .skuze-copilot-launcher-copy small {
        display: none;
    }
    .skuze-copilot-panel {
        position: fixed;
        left: .6rem;
        right: .6rem;
        top: max(.6rem, env(safe-area-inset-top));
        bottom: calc(4.55rem + env(safe-area-inset-bottom));
        width: auto;
        height: auto;
        min-height: 0;
        transform-origin: center bottom;
    }
    .skuze-copilot-subtitle {
        max-width: 235px;
    }
    .skuze-copilot-plan,
    .skuze-copilot-suggestions,
    .skuze-copilot-status {
        margin-left: 0;
    }
}

@media (max-width: 389.98px) {
    .skuze-copilot-panel {
        left: .35rem;
        right: .35rem;
    }
    .skuze-copilot-header {
        padding: .72rem;
    }
    .skuze-copilot-title-row {
        gap: .3rem;
    }
    .skuze-copilot-scope {
        font-size: .51rem;
    }
    .skuze-copilot-plan-meta {
        grid-template-columns: 1fr;
    }
    .skuze-copilot-composer-footer > span {
        display: none;
    }
    .skuze-copilot-composer-footer {
        justify-content: flex-end;
    }
}
.admin-copilot-toggle > .d-flex {
    width: 100%;
}

/* v1.1.7.10 brand icon polish */
.app-nav-custom-icon {
    width: 1.08rem;
    height: 1.08rem;
    display: block;
    flex: 0 0 1.08rem;
    object-fit: contain;
}
.app-sidebar .nav-link .app-nav-custom-icon {
    filter: brightness(0) invert(1);
    opacity: .92;
}
.app-sidebar .nav-link.active .app-nav-custom-icon,
.app-sidebar .nav-link:hover .app-nav-custom-icon {
    opacity: 1;
}
.app-bottom-nav .app-nav-custom-icon {
    width: 1.18rem;
    height: 1.18rem;
}
.app-bottom-nav a:not(.active) .app-nav-custom-icon {
    filter: grayscale(1);
    opacity: .7;
}
.automation-brand-icon {
    width: 1.18rem;
    height: 1.18rem;
    display: block;
    object-fit: contain;
}
.skuze-copilot-launcher-icon img,
.skuze-copilot-avatar img,
.skuze-copilot-message-icon img,
.admin-copilot-icon {
    object-fit: contain;
}
.skuze-copilot-launcher-icon img,
.skuze-copilot-avatar img {
    filter: drop-shadow(0 6px 12px rgba(14,178,149,.16));
}
.skuze-copilot-message-icon img {
    border-radius: .58rem;
}

/* v1.1.7.23 — stable Automation canvas + independently scrollable inspector.
   On desktop the inspector must never make the Workflow Studio taller and
   shift the canvas. The Studio owns a viewport-bounded height; only the
   inspector scrolls vertically while the workflow keeps its position. */
@media (min-width: 992px) {
    .page-automation_edit .automation-studio {
        height: clamp(40rem, calc(100dvh - 11.5rem), 56rem);
        min-height: 40rem;
        max-height: 56rem;
        align-items: stretch;
    }

    .page-automation_edit .automation-stage,
    .page-automation_edit .automation-inspector {
        height: 100%;
        min-height: 0;
    }

    .page-automation_edit .automation-stage {
        overflow: hidden;
    }

    .page-automation_edit .automation-flow-shell {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
    }

    .page-automation_edit .automation-flow-canvas {
        height: 100%;
        min-height: 0;
    }

    .page-automation_edit .automation-flow-canvas.has-branching {
        min-height: 0;
    }

    .page-automation_edit .automation-inspector {
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
    }

    .page-automation_edit .automation-inspector::-webkit-scrollbar {
        width: 7px;
    }

    .page-automation_edit .automation-inspector::-webkit-scrollbar-track {
        background: transparent;
    }

    .page-automation_edit .automation-inspector::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 999px;
    }
}

/* v1.1.7.24 — Automation-first management dashboard. */
.dashboard-management-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}
.dashboard-eyebrow,
.dashboard-panel-eyebrow {
    color: #087361;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.dashboard-management-title {
    margin: .2rem 0 .35rem;
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
    font-weight: 750;
    letter-spacing: -.035em;
    color: #0f172a;
}
.dashboard-management-subtitle {
    color: #64748b;
    max-width: 760px;
}
.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}
.dashboard-kpi-card {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .9rem;
    padding: 1.1rem;
    border: 1px solid rgba(15, 23, 42, .075);
    border-radius: 1.15rem;
    background: linear-gradient(180deg, #fff 0%, #fbfefd 100%);
    color: #0f172a;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .045);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
a.dashboard-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(14, 178, 149, .26);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
}
.dashboard-kpi-card.is-attention {
    border-color: rgba(245, 158, 11, .28);
    background: linear-gradient(180deg, #fff 0%, #fffdf7 100%);
}
.dashboard-kpi-icon,
.dashboard-panel-icon {
    width: 2.65rem;
    height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: .9rem;
    background: rgba(14, 178, 149, .09);
    color: #087361;
    font-size: 1.15rem;
}
.dashboard-kpi-label {
    color: #64748b;
    font-size: .78rem;
    font-weight: 650;
}
.dashboard-kpi-value {
    display: flex;
    align-items: baseline;
    gap: .18rem;
    margin-top: .1rem;
    color: #0f172a;
    font-size: 1.85rem;
    font-weight: 780;
    line-height: 1.05;
    letter-spacing: -.045em;
}
.dashboard-kpi-value span {
    color: #94a3b8;
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: 0;
}
.dashboard-kpi-note {
    margin-top: .25rem;
    color: #94a3b8;
    font-size: .72rem;
}
.dashboard-health-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .075);
    border-radius: 1rem;
    background: #fff;
}
.dashboard-health-strip > div {
    min-width: 0;
    display: grid;
    gap: .15rem;
    padding: .85rem 1rem;
    border-right: 1px solid rgba(15, 23, 42, .065);
}
.dashboard-health-strip > div:last-child { border-right: 0; }
.dashboard-health-strip span {
    overflow: hidden;
    color: #64748b;
    font-size: .71rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-health-strip strong {
    color: #0f172a;
    font-size: 1.03rem;
}
.dashboard-panel {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, .075);
    border-radius: 1.2rem;
    background: #fff;
    box-shadow: 0 14px 38px rgba(15, 23, 42, .035);
}
.dashboard-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.2rem .5rem;
}
.dashboard-panel-head.is-compact { padding-bottom: 1rem; }
.dashboard-panel-head h2 {
    margin: .18rem 0 .2rem;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 750;
    letter-spacing: -.015em;
}
.dashboard-panel-head p {
    margin: 0;
    color: #64748b;
    font-size: .8rem;
    line-height: 1.45;
}
.dashboard-chart-wrap {
    padding: .25rem 1rem .9rem;
}
.dashboard-chart-wrap .admin-chart-meta {
    padding: .2rem .25rem 0;
}
.dashboard-chart-wrap .admin-chart-svg {
    height: 235px;
}
.dashboard-chart-wrap .admin-chart-primary .admin-chart-bar {
    fill: rgba(14, 178, 149, .86);
}
.dashboard-chart-empty,
.dashboard-empty-row {
    margin: .75rem 1rem 1rem;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    border: 1px dashed rgba(15, 23, 42, .12);
    border-radius: .95rem;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-size: .82rem;
}
.dashboard-empty-row { min-height: 120px; }
.dashboard-line-chart { padding: .1rem .15rem 0; }
.dashboard-chart-meta {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .2rem .3rem 0;
    color: #64748b;
    font-size: .75rem;
}
.dashboard-line-svg {
    width: 100%;
    height: 235px;
    display: block;
}
.dashboard-chart-grid {
    stroke: rgba(15, 23, 42, .075);
    stroke-width: 1;
}
.dashboard-chart-axis-text,
.dashboard-chart-label {
    fill: #64748b;
    font-size: 10px;
    font-family: var(--bs-body-font-family);
}
.dashboard-line-path {
    fill: none;
    stroke: #0EB295;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dashboard-line-dot {
    fill: #fff;
    stroke: #0EB295;
    stroke-width: 3;
}
.dashboard-run-table-wrap { border-top: 1px solid rgba(15, 23, 42, .055); }
.dashboard-run-table > :not(caption) > * > * {
    padding: .78rem .9rem;
    border-color: rgba(15, 23, 42, .055);
}
.dashboard-run-table thead th {
    color: #64748b;
    background: #fbfcfd;
    font-size: .7rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.dashboard-run-table tbody tr:last-child td { border-bottom: 0; }
.dashboard-result-success,
.dashboard-result-error {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    padding: .2rem .38rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 750;
}
.dashboard-result-success { color: #087361; background: #e9f9f5; }
.dashboard-result-error { margin-left: .25rem; color: #b91c1c; background: #fef2f2; }
.dashboard-top-list { padding: .15rem .9rem 1rem; }
.dashboard-top-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .82rem .35rem;
    color: #0f172a;
    border-bottom: 1px solid rgba(15, 23, 42, .055);
}
.dashboard-top-item:last-child { border-bottom: 0; }
.dashboard-top-item:hover strong { color: #087361; }
.dashboard-top-rank {
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .65rem;
    background: rgba(14, 178, 149, .08);
    color: #087361;
    font-size: .72rem;
    font-weight: 800;
}
.dashboard-top-copy { min-width: 0; display: grid; gap: .12rem; }
.dashboard-top-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .84rem; transition: color .15s ease; }
.dashboard-top-copy small { color: #94a3b8; font-size: .7rem; }
.dashboard-top-rate {
    min-width: 2.85rem;
    text-align: center;
    padding: .28rem .45rem;
    border-radius: 999px;
    color: #087361;
    background: #e9f9f5;
    font-size: .72rem;
    font-weight: 800;
}
.dashboard-top-rate.has-errors { color: #92400e; background: #fff7ed; }
.dashboard-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    padding: .1rem 1rem 1rem;
}
.dashboard-action-grid > a {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: .7rem;
    padding: .78rem;
    border: 1px solid rgba(15, 23, 42, .07);
    border-radius: .9rem;
    color: #0f172a;
    text-decoration: none;
    background: #fbfdfd;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.dashboard-action-grid > a:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 178, 149, .24);
    background: rgba(14, 178, 149, .045);
}
.dashboard-action-grid > a > i { color: #087361; font-size: 1rem; }
.dashboard-action-grid span { min-width: 0; display: grid; }
.dashboard-action-grid strong { font-size: .78rem; }
.dashboard-action-grid small { overflow: hidden; color: #94a3b8; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-store-summary {
    margin: 0 1rem 1rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    padding: .8rem .9rem;
    border-radius: .9rem;
    background: rgba(14, 178, 149, .055);
    border: 1px solid rgba(14, 178, 149, .12);
}
.dashboard-store-summary.is-warning { background: #fffaf0; border-color: rgba(245, 158, 11, .16); }
.dashboard-store-dot { width: .58rem; height: .58rem; border-radius: 999px; background: #0EB295; box-shadow: 0 0 0 5px rgba(14, 178, 149, .1); }
.dashboard-store-summary.is-warning .dashboard-store-dot { background: #f59e0b; box-shadow: 0 0 0 5px rgba(245, 158, 11, .1); }
.dashboard-store-summary div { min-width: 0; display: grid; }
.dashboard-store-summary strong { overflow: hidden; color: #0f172a; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-store-summary small { color: #64748b; font-size: .68rem; }
.dashboard-store-summary a { color: #087361; }

@media (max-width: 1199.98px) {
    .dashboard-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-health-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-health-strip > div:nth-child(3n) { border-right: 0; }
    .dashboard-health-strip > div:nth-child(-n+3) { border-bottom: 1px solid rgba(15, 23, 42, .065); }
}
@media (max-width: 767.98px) {
    .dashboard-management-head { flex-direction: column; }
    .dashboard-management-head .d-flex { width: 100%; }
    .dashboard-management-head .btn { flex: 1 1 auto; }
    .dashboard-kpi-grid { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .dashboard-kpi-card { grid-template-columns: 1fr; align-items: start; padding: .9rem; gap: .55rem; }
    .dashboard-kpi-icon { width: 2.2rem; height: 2.2rem; border-radius: .75rem; font-size: .95rem; }
    .dashboard-kpi-value { font-size: 1.5rem; }
    .dashboard-health-strip { grid-template-columns: 1fr 1fr; }
    .dashboard-health-strip > div { border-right: 1px solid rgba(15, 23, 42, .065); border-bottom: 1px solid rgba(15, 23, 42, .065); }
    .dashboard-health-strip > div:nth-child(2n) { border-right: 0; }
    .dashboard-health-strip > div:nth-last-child(-n+2) { border-bottom: 0; }
    .dashboard-panel-head { padding: 1rem .95rem .45rem; }
    .dashboard-chart-wrap { padding: .2rem .4rem .75rem; overflow-x: auto; }
    .dashboard-chart-wrap .admin-chart-svg,
    .dashboard-line-svg { min-width: 560px; height: 215px; }
    .dashboard-chart-meta { padding-left: .65rem; padding-right: .65rem; }
    .dashboard-action-grid { grid-template-columns: 1fr; }
}

/* Automations v1.1.7.25 — management index redesign (content area only; global sidebar unchanged) */
.page-automations .app-main .container-fluid {
    max-width: 100%;
}

.automation-index-page {
    --automation-index-border: rgba(148, 163, 184, .24);
    --automation-index-soft-border: rgba(148, 163, 184, .16);
    --automation-index-text: #0f172a;
    --automation-index-muted: #64748b;
    padding: .1rem 0 1.75rem;
}

.automation-index-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.35rem;
}

.automation-index-title {
    margin: 0;
    color: var(--automation-index-text);
    font-size: 1.65rem;
    line-height: 1.15;
    font-weight: 780;
    letter-spacing: -.035em;
}

.automation-index-subtitle {
    margin: .35rem 0 0;
    color: var(--automation-index-muted);
    font-size: .92rem;
    line-height: 1.5;
}

.automation-index-header-copy { min-width: 0; }

.automation-index-header-side {
    min-width: 0;
    display: grid;
    gap: .95rem;
    justify-items: end;
}

.automation-index-header-tools,
.automation-index-header-actions {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.automation-index-whatsnew,
.automation-index-circle-button,
.automation-index-profile,
.automation-index-running-pill {
    min-height: 2.65rem;
    border: 1px solid var(--automation-index-border);
    border-radius: .72rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .015);
    text-decoration: none;
}

.automation-index-whatsnew {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: 0 .95rem;
    color: #0a8f79;
    font-size: .85rem;
    font-weight: 650;
}

.automation-index-whatsnew:hover { color: #087a68; background: rgba(14, 178, 149, .03); }

.automation-index-circle-button {
    width: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #506078;
    position: relative;
}

.automation-index-circle-button:hover { color: #0f172a; background: #f8fafc; }

.automation-index-circle-button--bell > span {
    position: absolute;
    top: -.24rem;
    right: -.18rem;
    min-width: 1.12rem;
    height: 1.12rem;
    padding: 0 .25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ff5b5b;
    color: #fff;
    font-size: .61rem;
    font-weight: 700;
    border: 2px solid #fff;
}

.automation-index-profile {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    padding: 0 .85rem 0 .45rem;
    color: #152238;
}

.automation-index-profile-avatar {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e6f8f3;
    color: #0d9e87;
    font-size: .8rem;
    font-weight: 750;
}

.automation-index-profile-name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .84rem;
    font-weight: 650;
}

.automation-index-profile > i { color: #64748b; font-size: .78rem; }

.automation-index-running-pill {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: 0 .9rem;
    color: #1467cc;
    font-size: .8rem;
    font-weight: 650;
    background: #f8fbff;
}

.automation-index-running-pill:hover { color: #0f5db5; background: #f1f7ff; }

.automation-index-running-pulse {
    width: .58rem;
    height: .58rem;
    border-radius: 999px;
    background: #3b82f6;
    box-shadow: 0 0 0 0 rgba(59, 130, 246, .28);
    animation: automationRunningPulse 1.8s infinite;
}

@keyframes automationRunningPulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .3); }
    70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.automation-index-create {
    min-height: 2.72rem;
    padding-inline: 1.18rem;
    border-radius: .7rem;
    box-shadow: 0 10px 22px rgba(14, 178, 149, .18);
    white-space: nowrap;
    font-weight: 680;
}

.automation-index-toolbar {
    display: grid;
    grid-template-columns: minmax(17rem, 1fr) minmax(10rem, 12rem) minmax(10rem, 12rem) auto;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.05rem;
}

.automation-index-search,
.automation-index-select,
.automation-index-view {
    min-height: 2.75rem;
    border: 1px solid var(--automation-index-border);
    border-radius: .55rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .015);
}

.automation-index-search {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 0 .85rem;
    color: #7c8ba1;
}

.automation-index-search > i {
    flex: 0 0 auto;
    font-size: .96rem;
}

.automation-index-search input {
    width: 100%;
    min-width: 0;
    height: 2.65rem;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #334155;
    font-size: .86rem;
}

.automation-index-search input::placeholder { color: #738096; opacity: 1; }

.automation-index-select {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .45rem;
    padding: 0 .75rem;
    color: #475569;
}

.automation-index-select > span {
    color: #64748b;
    font-size: .77rem;
    font-weight: 500;
}

.automation-index-select select {
    appearance: none;
    width: 100%;
    min-width: 0;
    height: 2.65rem;
    padding: 0 1rem 0 .15rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: #182235;
    font-size: .8rem;
    font-weight: 650;
    cursor: pointer;
}

.automation-index-select > i { color: #64748b; font-size: .72rem; pointer-events: none; }

.automation-index-view {
    display: flex;
    align-items: center;
    padding-left: .8rem;
    overflow: hidden;
}

.automation-index-view > span {
    padding-right: .65rem;
    color: #64748b;
    font-size: .77rem;
}

.automation-index-view a {
    width: 2.6rem;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--automation-index-soft-border);
    color: #52627a;
    text-decoration: none;
    transition: color .14s ease, background .14s ease;
}

.automation-index-view a:hover { color: var(--accent-dark); background: rgba(14, 178, 149, .035); }
.automation-index-view a.is-active { color: var(--accent); background: rgba(14, 178, 149, .06); }

.automation-index-status-tabs {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: 1.15rem;
}

.automation-index-status-tab {
    min-height: 2.55rem;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .8rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: .62rem;
    background: #fff;
    color: #526078;
    font-size: .79rem;
    text-decoration: none;
    transition: border-color .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}

.automation-index-status-tab:hover {
    color: #334155;
    border-color: rgba(14, 178, 149, .26);
    background: rgba(14, 178, 149, .025);
}

.automation-index-status-tab.is-selected {
    color: #087a68;
    border-color: rgba(14, 178, 149, .55);
    background: rgba(14, 178, 149, .035);
    box-shadow: inset 0 0 0 1px rgba(14, 178, 149, .04);
}

.automation-index-status-tab small {
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f2f5f8;
    color: #64748b;
    font-size: .67rem;
    font-weight: 700;
}

.automation-index-status-tab.is-selected small { background: #dff7f1; color: #078773; }
.automation-index-status-dot { width: .48rem; height: .48rem; border-radius: 999px; background: #a6b1c1; }
.automation-index-status-tab.is-active .automation-index-status-dot { background: var(--status-active); }
.automation-index-status-tab.is-draft .automation-index-status-dot { background: var(--status-draft); }
.automation-index-status-tab.is-running .automation-index-status-dot { background: var(--status-processing); }
.automation-index-status-tab.is-failed .automation-index-status-dot { background: var(--status-failed); }
.automation-index-status-tab.is-inactive .automation-index-status-dot { background: var(--status-inactive); }

.automation-index-table-wrap {
    width: 100%;
    border: 1px solid var(--automation-index-soft-border);
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .02);
}

.automation-index-table-head,
.automation-index-row {
    display: grid;
    grid-template-columns: 2.6rem minmax(15rem, 1.7fr) minmax(10rem, .95fr) minmax(9.5rem, .9fr) minmax(6.8rem, .66fr) minmax(5.8rem, .55fr) minmax(8rem, .8fr) 3.2rem;
    align-items: center;
    gap: .8rem;
}

.automation-index-table-head {
    min-height: 3.55rem;
    padding: 0 .7rem;
    border-bottom: 1px solid var(--automation-index-border);
    color: #172033;
    font-size: .72rem;
    font-weight: 700;
}

.automation-index-table-body { width: 100%; }

.automation-index-row {
    min-height: 5.35rem;
    padding: .68rem .7rem;
    border-bottom: 1px solid var(--automation-index-soft-border);
    transition: background .14s ease;
}

.automation-index-row:last-child { border-bottom: 0; }
.automation-index-row:hover { background: #fcfefe; }

.automation-index-row-icon {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    border-radius: .72rem;
    background: rgba(14, 178, 149, .075);
    color: #0b9a83;
    font-size: 1rem;
    text-decoration: none;
}

.automation-index-row-icon:hover { color: #087a68; }

.automation-index-row-title {
    display: inline-block;
    max-width: 100%;
    color: #10192b;
    font-size: .88rem;
    font-weight: 720;
    line-height: 1.35;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.automation-index-row-title:hover { color: #087a68; }
.automation-index-row-description {
    margin-top: .2rem;
    color: #64748b;
    font-size: .75rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.automation-index-cell {
    min-width: 0;
    color: #526078;
    font-size: .76rem;
    line-height: 1.35;
}

.automation-index-trigger { color: #4f5f77; }
.automation-index-number { color: #334155; font-variant-numeric: tabular-nums; }

.automation-index-status {
    min-height: 1.65rem;
    display: inline-flex;
    align-items: center;
    padding: .25rem .52rem;
    border-radius: .36rem;
    font-size: .68rem;
    font-weight: 680;
    white-space: nowrap;
}

.automation-index-status.is-active { color: var(--status-active); background: var(--status-active-bg); }
.automation-index-status.is-running { color: var(--status-processing); background: var(--status-processing-bg); }
.automation-index-status.is-draft { color: var(--status-draft); background: var(--status-draft-bg); }
.automation-index-status.is-failed { color: var(--status-failed); background: var(--status-failed-bg); }
.automation-index-status.is-inactive { color: var(--status-inactive); background: var(--status-inactive-bg); }

.automation-index-success {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #415169;
    font-size: .76rem;
    font-variant-numeric: tabular-nums;
}

.automation-index-sparkline {
    width: 3.65rem;
    height: 1.45rem;
    flex: 0 0 auto;
    overflow: visible;
    color: var(--accent);
}

.automation-index-sparkline polyline {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.automation-index-sparkline.is-warning { color: #f97316; }

.automation-index-actions { justify-self: end; }
.automation-index-more {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: #516078;
}
.automation-index-more:hover,
.automation-index-more[aria-expanded="true"] { color: #0f172a; background: #f3f6f8; }

.automation-index-empty {
    min-height: 7.3rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.1rem;
    padding: 1.35rem 1.8rem;
    border-radius: .9rem;
    background: #fff;
}

.automation-index-empty-icon {
    width: 3.8rem;
    height: 3.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(14, 178, 149, .09), rgba(14, 178, 149, .025));
}

.automation-index-empty-icon img { width: 2rem; height: 2rem; object-fit: contain; }
.automation-index-empty h2 { margin: 0; color: #172033; font-size: .92rem; font-weight: 720; }
.automation-index-empty p { margin: .25rem 0 0; color: #64748b; font-size: .79rem; }
.automation-index-empty-card { margin-top: .5rem; border: 1px solid var(--automation-index-border); }

.automation-index-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
}

.automation-index-card {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--automation-index-border);
    border-radius: .85rem;
    background: #fff;
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.automation-index-card:hover {
    border-color: rgba(14, 178, 149, .28);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
    transform: translateY(-1px);
}

.automation-index-card-top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-bottom: .8rem; }
.automation-index-card-description { min-height: 2.4rem; margin: .28rem 0 .85rem; color: #64748b; font-size: .76rem; line-height: 1.5; }
.automation-index-card-meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding: .7rem 0; border-top: 1px solid var(--automation-index-soft-border); color: #64748b; font-size: .7rem; }
.automation-index-card-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.automation-index-card-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .55rem; padding: .8rem 0; }
.automation-index-card-stats div { min-width: 0; }
.automation-index-card-stats small { display: block; color: #8a96a7; font-size: .62rem; margin-bottom: .16rem; }
.automation-index-card-stats strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344257; font-size: .72rem; font-weight: 700; }

@media (max-width: 1399.98px) {
    .automation-index-table-head,
    .automation-index-row {
        grid-template-columns: 2.5rem minmax(13rem, 1.65fr) minmax(9rem, .9fr) minmax(8rem, .82fr) minmax(6.5rem, .65fr) minmax(5rem, .5fr) minmax(7.2rem, .72fr) 2.8rem;
        gap: .65rem;
    }
    .automation-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1199.98px) {
    .automation-index-toolbar { grid-template-columns: minmax(14rem, 1fr) minmax(9rem, 10.5rem) minmax(9rem, 10.5rem) auto; }
    .automation-index-view { justify-self: end; }
    .automation-index-table-head,
    .automation-index-row {
        grid-template-columns: 2.5rem minmax(13rem, 1.55fr) minmax(9rem, .92fr) minmax(6.5rem, .65fr) minmax(5rem, .5fr) minmax(7rem, .7fr) 2.8rem;
    }
    .automation-index-table-head > :nth-child(4),
    .automation-index-row > :nth-child(4) { display: none; }
}

@media (max-width: 991.98px) {
    .automation-index-toolbar { grid-template-columns: minmax(0, 1fr) minmax(9rem, 11rem) minmax(9rem, 11rem); }
    .automation-index-search { grid-column: 1 / -1; }
    .automation-index-view { grid-column: auto; }
    .automation-index-table-head,
    .automation-index-row {
        grid-template-columns: 2.5rem minmax(12rem, 1.55fr) minmax(8rem, .8fr) minmax(6rem, .65fr) minmax(6.5rem, .7fr) 2.8rem;
    }
    .automation-index-table-head > :nth-child(3),
    .automation-index-row > :nth-child(3) { display: none; }
    .automation-index-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767.98px) {
    .automation-index-page { padding-bottom: 1rem; }
    .automation-index-header { align-items: stretch; flex-direction: column; margin-bottom: 1rem; }
    .automation-index-header-side { justify-items: stretch; }
    .automation-index-header-tools,
    .automation-index-header-actions { justify-content: flex-start; }
    .automation-index-whatsnew { flex: 1 1 auto; justify-content: center; }
    .automation-index-profile { flex: 1 1 auto; justify-content: center; }
    .automation-index-title { font-size: 1.45rem; }
    .automation-index-subtitle { font-size: .84rem; }
    .automation-index-create { width: 100%; }
    .automation-index-toolbar { grid-template-columns: 1fr 1fr; gap: .65rem; }
    .automation-index-search { grid-column: 1 / -1; }
    .automation-index-select { min-width: 0; }
    .automation-index-view { grid-column: 1 / -1; justify-self: stretch; justify-content: flex-end; }
    .automation-index-view > span { margin-right: auto; }
    .automation-index-status-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; scrollbar-width: none; }
    .automation-index-status-tabs::-webkit-scrollbar { display: none; }
    .automation-index-status-tab { flex: 0 0 auto; }
    .automation-index-table-wrap { border: 0; background: transparent; }
    .automation-index-table-head { display: none; }
    .automation-index-table-body { display: grid; gap: .7rem; }
    .automation-index-row {
        min-height: 0;
        grid-template-columns: 2.55rem minmax(0, 1fr) auto;
        grid-template-areas:
            "icon main actions"
            "icon status status"
            "meta meta success";
        gap: .55rem .7rem;
        padding: .9rem;
        border: 1px solid var(--automation-index-border) !important;
        border-radius: .8rem;
        background: #fff;
    }
    .automation-index-row > :nth-child(1) { grid-area: icon; align-self: start; }
    .automation-index-row > :nth-child(2) { grid-area: main; }
    .automation-index-row > :nth-child(3) { display: block; grid-area: meta; }
    .automation-index-row > :nth-child(4) { display: none; }
    .automation-index-row > :nth-child(5) { grid-area: status; }
    .automation-index-row > :nth-child(6) { display: none; }
    .automation-index-row > :nth-child(7) { grid-area: success; justify-self: end; }
    .automation-index-row > :nth-child(8) { grid-area: actions; align-self: start; }
    .automation-index-success .automation-index-sparkline { display: none; }
    .automation-index-trigger { font-size: .7rem; }
    .automation-index-empty { grid-template-columns: 1fr; text-align: center; justify-items: center; }
    .automation-index-grid { grid-template-columns: 1fr; }
}

@media (max-width: 479.98px) {
    .automation-index-toolbar { grid-template-columns: 1fr; }
    .automation-index-search,
    .automation-index-view { grid-column: auto; }
    .automation-index-card-stats { grid-template-columns: 1fr 1fr; }
    .automation-index-card-stats div:last-child { grid-column: 1 / -1; }
}

/* The redesigned Automations index owns its own page header; keep the global sidebar intact. */
.page-automations .app-page-topbar { display: none; }
.page-automations .app-main > .container-fluid { padding-top: 1.9rem !important; }
@media (min-width: 768px) {
    .automation-index-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        align-items: start;
    }
    .automation-index-header > div { grid-column: 1 / -1; grid-row: 1; }
    .automation-index-create { grid-column: 2; grid-row: 2; margin-top: .55rem; }
}
@media (max-width: 767.98px) {
    .page-automations .app-main > .container-fluid { padding-top: 1rem !important; }
}

@media (max-width: 991.98px) {
    .automation-index-header-side { justify-items: stretch; }
    .automation-index-header-tools,
    .automation-index-header-actions { justify-content: flex-start; }
}

/* Skuze design foundation v1.1.7.27 — light premium SaaS direction */
:root {
    --sidebar-width: 240px;
    --skuze-page-bg: #F8FAFB;
    --skuze-surface: #FFFFFF;
    --skuze-surface-soft: #F4F7F8;
    --skuze-border: #E6EAEE;
    --skuze-border-soft: #EEF2F4;
    --skuze-text: #182433;
    --skuze-text-secondary: #5F6C7B;
    --skuze-text-muted: #8A96A3;
    --skuze-text-disabled: #B4BDC6;
    --accent-dark: #0C9D83;
}

body.app-shell {
    background: var(--skuze-page-bg);
    color: var(--skuze-text);
}

.app-sidebar {
    width: var(--sidebar-width);
    background: #fff;
    color: var(--skuze-text);
    border-right: 1px solid var(--skuze-border);
    padding: 1.15rem 1rem;
    box-shadow: none;
}

.app-sidebar .app-brand {
    color: var(--skuze-text);
    font-size: 1.22rem;
    margin-bottom: 1.25rem;
    padding-inline: .25rem;
}

.app-sidebar .nav-link {
    position: relative;
    color: #344054;
    border-radius: .72rem;
    padding: .72rem .78rem;
    gap: .72rem;
    font-size: .91rem;
}

.app-sidebar .nav-link i { color: #667085; }
.app-sidebar .nav-link:hover {
    background: #F7FAFB;
    color: var(--skuze-text);
}
.app-sidebar .nav-link.active {
    background: #EAF8F4;
    color: var(--skuze-text);
    font-weight: 650;
}
.app-sidebar .nav-link.active i { color: #0EB295; }
.app-sidebar .nav-link.active::after {
    content: '';
    position: absolute;
    right: -.05rem;
    top: .55rem;
    bottom: .55rem;
    width: 3px;
    border-radius: 999px;
    background: #0EB295;
}
.app-sidebar-section-label {
    border-top-color: var(--skuze-border-soft);
    color: var(--skuze-text-muted);
}
.app-sidebar .nav-link .app-nav-custom-icon {
    filter: grayscale(1);
    opacity: .72;
}
.app-sidebar .nav-link.active .app-nav-custom-icon,
.app-sidebar .nav-link:hover .app-nav-custom-icon {
    filter: none;
    opacity: 1;
}

/* Products v1.1.7.27 — management catalog redesign */
.page-products .app-page-topbar { display: none; }
.page-products .app-main > .container-fluid {
    max-width: 100%;
    padding: 2rem clamp(1.25rem, 2.3vw, 2.25rem) 2.5rem !important;
}

.products-management-page {
    --products-border: var(--skuze-border);
    --products-border-soft: var(--skuze-border-soft);
    --products-text: var(--skuze-text);
    --products-secondary: var(--skuze-text-secondary);
    min-width: 0;
}

.products-management-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
}
.products-management-header-copy h1 {
    margin: 0;
    color: var(--products-text);
    font-size: 1.9rem;
    line-height: 1.15;
    font-weight: 780;
    letter-spacing: -.035em;
}
.products-management-header-copy p {
    margin: .42rem 0 0;
    color: var(--products-secondary);
    font-size: .93rem;
    line-height: 1.5;
}
.products-management-header-side {
    display: grid;
    justify-items: end;
    gap: 1rem;
}
.skuze-page-tools {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.skuze-page-tool,
.skuze-page-profile {
    min-height: 2.62rem;
    border: 1px solid var(--products-border);
    border-radius: .72rem;
    background: #fff;
    color: #526078;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}
.skuze-page-tool {
    width: 2.62rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.skuze-page-tool--label {
    width: auto;
    gap: .5rem;
    padding: 0 .85rem;
    color: #344054;
    font-size: .8rem;
    font-weight: 620;
}
.skuze-page-tool:hover,
.skuze-page-profile:hover { color: var(--products-text); background: #FAFCFC; }
.skuze-page-tool--notification > span {
    position: absolute;
    top: -.25rem;
    right: -.22rem;
    min-width: 1.12rem;
    height: 1.12rem;
    padding: 0 .23rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #E5484D;
    color: #fff;
    font-size: .59rem;
    font-weight: 760;
}
.skuze-page-profile {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: 0 .78rem 0 .42rem;
    color: var(--products-text);
}
.skuze-page-profile-avatar {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #EAF8F4;
    color: #0C9D83;
    font-size: .76rem;
    font-weight: 760;
}
.skuze-page-profile-name {
    max-width: 10rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .82rem;
    font-weight: 650;
}
.skuze-page-profile > i { color: #667085; font-size: .72rem; }
.products-sync-button {
    min-height: 2.8rem;
    padding-inline: 1.1rem;
    border-radius: .72rem;
    font-weight: 680;
    box-shadow: 0 8px 18px rgba(14, 178, 149, .14);
}

.products-filter-card {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(10rem, 12rem) minmax(13rem, .65fr) auto auto;
    align-items: center;
    gap: .7rem;
    padding: .75rem;
    margin-bottom: .8rem;
    border: 1px solid var(--products-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}
.products-filter-search,
.products-filter-select {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    border: 1px solid var(--products-border);
    border-radius: .72rem;
    background: #fff;
    color: var(--skuze-text-muted);
}
.products-filter-search { padding: 0 .82rem; }
.products-filter-search input {
    width: 100%;
    min-width: 0;
    height: 2.65rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--products-text);
    font-size: .82rem;
}
.products-filter-search input::placeholder { color: var(--skuze-text-muted); opacity: 1; }
.products-filter-select {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0 .72rem;
    color: var(--products-secondary);
}
.products-filter-select > span { font-size: .75rem; }
.products-filter-select select {
    appearance: none;
    width: 100%;
    height: 2.65rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--products-text);
    font-size: .79rem;
    font-weight: 650;
}
.products-filter-select > i { font-size: .68rem; }
.products-filter-apply {
    min-height: 2.75rem;
    border: 1px solid var(--products-border);
    border-radius: .72rem;
    background: #fff;
    color: var(--products-text);
    font-size: .78rem;
}
.products-filter-reset {
    color: var(--products-secondary);
    font-size: .76rem;
    text-decoration: none;
}

.products-status-tabs {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    overflow-x: auto;
    padding: 0 .75rem;
    margin-bottom: .95rem;
    border: 1px solid var(--products-border-soft);
    border-radius: .9rem;
    background: #fff;
    scrollbar-width: none;
}
.products-status-tabs::-webkit-scrollbar { display: none; }
.products-status-tabs a {
    position: relative;
    min-height: 3.3rem;
    display: inline-flex;
    align-items: center;
    gap: .48rem;
    color: #526078;
    text-decoration: none;
    white-space: nowrap;
    font-size: .79rem;
}
.products-status-tabs a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: transparent;
}
.products-status-tabs a strong {
    min-width: 1.5rem;
    height: 1.45rem;
    padding: 0 .4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #F1F3F5;
    color: #687586;
    font-size: .65rem;
    font-weight: 730;
}
.products-status-tabs a.is-active { color: #0C9D83; font-weight: 650; }
.products-status-tabs a.is-active::after { background: #0EB295; }
.products-status-tabs a.is-active strong { background: #EAF8F4; color: #0C9D83; }
.products-status-tabs a.is-danger.is-active { color: #E5484D; }
.products-status-tabs a.is-danger.is-active::after { background: #E5484D; }
.products-status-tabs a.is-danger.is-active strong { background: #FDECEC; color: #E5484D; }

.products-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .8rem;
    margin-bottom: .95rem;
}
.products-stat-card {
    min-width: 0;
    min-height: 7.2rem;
    padding: 1rem;
    border: 1px solid var(--products-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}
.products-stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    color: var(--products-secondary);
    font-size: .76rem;
    font-weight: 620;
}
.products-stat-card-top i {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .55rem;
    background: #F4F7F8;
    color: #667085;
}
.products-stat-card > strong {
    display: block;
    margin-top: .55rem;
    color: var(--products-text);
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 760;
    letter-spacing: -.025em;
}
.products-stat-card > small { display: block; margin-top: .45rem; color: var(--skuze-text-muted); font-size: .68rem; }
.products-stat-card.tone-success .products-stat-card-top i { color: var(--status-active); background: var(--status-active-bg); }
.products-stat-card.tone-sync .products-stat-card-top i { color: var(--status-synced); background: var(--status-synced-bg); }
.products-stat-card.tone-warning .products-stat-card-top i { color: var(--status-needs-review); background: var(--status-needs-review-bg); }
.products-stat-card.tone-info .products-stat-card-top i { color: var(--status-processing); background: var(--status-processing-bg); }
.products-stat-card.tone-neutral .products-stat-card-top i { color: var(--status-draft); background: var(--status-draft-bg); }

.products-deleted-notice {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: 1rem 1.1rem;
    margin-bottom: .95rem;
    border: 1px solid #F2D5D7;
    border-radius: .9rem;
    background: #FFF9F9;
    color: #A83238;
}
.products-deleted-notice p { margin: .2rem 0 0; color: #7A5759; font-size: .76rem; }

.products-table-card {
    border: 1px solid var(--products-border);
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .025);
}
.products-bulk-toolbar {
    min-height: 3.45rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--products-border-soft);
}
.products-bulk-selection {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 7rem;
    color: var(--products-secondary);
    font-size: .73rem;
}
.products-bulk-action-select {
    position: relative;
    min-width: 13rem;
    min-height: 2.35rem;
    display: flex;
    align-items: center;
    border: 1px solid var(--products-border);
    border-radius: .62rem;
    background: #fff;
}
.products-bulk-action-select select {
    appearance: none;
    width: 100%;
    height: 2.3rem;
    padding: 0 2rem 0 .75rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: #344054;
    font-size: .72rem;
}
.products-bulk-action-select i { position: absolute; right: .7rem; color: #667085; font-size: .66rem; pointer-events: none; }
.products-bulk-run {
    min-height: 2.35rem;
    border: 1px solid var(--products-border);
    border-radius: .62rem;
    font-size: .72rem;
    background: #fff;
}
.products-table-range { margin-left: auto; color: #667085; font-size: .7rem; white-space: nowrap; }
.products-pager-button {
    width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--products-border);
    border-radius: .58rem;
    background: #fff;
    color: #526078;
    text-decoration: none;
}
.products-pager-button:hover { color: #0C9D83; border-color: rgba(14, 178, 149, .35); }
.products-pager-button.is-disabled { color: #C3CBD3; background: #FAFBFC; }
.products-bulk-message { margin: .75rem; }
.products-table-scroll { min-width: 0; overflow-x: auto; }
.products-table-head,
.products-table-row {
    min-width: 960px;
    display: grid;
    grid-template-columns: 2.15rem minmax(17rem, 1.65fr) minmax(5.7rem, .6fr) minmax(7.5rem, .75fr) minmax(10.5rem, 1fr) minmax(6.5rem, .65fr) minmax(9rem, .8fr) 2.8rem;
    align-items: center;
    gap: .65rem;
}
.products-table-head {
    min-height: 3rem;
    padding: 0 .75rem;
    border-bottom: 1px solid var(--products-border);
    background: #FCFDFD;
    color: #475467;
    font-size: .69rem;
    font-weight: 700;
}
.products-table-row {
    min-height: 4.65rem;
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--products-border-soft);
    color: #526078;
    font-size: .73rem;
    transition: background .14s ease;
}
.products-table-row:last-child { border-bottom: 0; }
.products-table-row:hover { background: #FCFEFD; }
.products-table-check { justify-self: center; }
.products-product-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .75rem;
}
.products-product-thumb {
    width: 2.9rem;
    height: 2.9rem;
    flex: 0 0 2.9rem;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--products-border-soft);
    border-radius: .65rem;
    background: #F7F9FA;
    color: #A0AAB5;
    text-decoration: none;
}
.products-product-thumb > span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.products-product-thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.products-product-copy { min-width: 0; }
.products-product-title {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--products-text);
    font-size: .78rem;
    font-weight: 690;
    text-decoration: none;
}
.products-product-title:hover { color: #0C9D83; }
.products-product-meta { margin-top: .12rem; color: #7A8694; font-size: .66rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.products-product-submeta { margin-top: .12rem; color: #9AA4AF; font-size: .62rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.products-status-badge,
.products-review-badge {
    min-height: 1.55rem;
    display: inline-flex;
    align-items: center;
    padding: .22rem .48rem;
    border-radius: .45rem;
    font-size: .64rem;
    font-weight: 680;
    white-space: nowrap;
}
.products-status-badge.is-active { color: var(--status-active); background: var(--status-active-bg); }
.products-status-badge.is-draft { color: var(--status-draft); background: var(--status-draft-bg); }
.products-status-badge.is-archived { color: var(--status-inactive); background: var(--status-inactive-bg); }
.products-status-badge.is-deleted { color: var(--status-failed); background: var(--status-failed-bg); }
.products-review-badge.is-needs-review { color: var(--status-needs-review); background: var(--status-needs-review-bg); }
.products-review-badge.is-approved { color: var(--status-approved); background: var(--status-approved-bg); }
.products-review-badge.is-optimized { color: var(--status-optimized); background: var(--status-optimized-bg); }
.products-review-badge.is-failed { color: var(--status-failed); background: var(--status-failed-bg); }
.products-review-badge.is-inactive { color: var(--status-inactive); background: var(--status-inactive-bg); }
.products-empty-value { color: #A8B1BB; }
.products-automation-cell,
.products-source-cell {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .42rem;
    color: #526078;
}
.products-automation-cell img { width: .92rem; height: .92rem; flex: 0 0 .92rem; }
.products-automation-cell > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.products-manual-icon { color: #83909D; }
.products-source-icon {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .42rem;
    background: #EAF8F1;
    color: #1FA971;
    font-size: .7rem;
}
.products-updated-cell { color: #667085; white-space: nowrap; }
.products-actions { justify-self: end; }
.products-more-button {
    width: 2.15rem;
    height: 2.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: .58rem;
    background: transparent;
    color: #526078;
}
.products-more-button:hover,
.products-more-button[aria-expanded="true"] { background: #F4F7F8; color: var(--products-text); }
.products-empty-state {
    min-height: 9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    padding: 2rem;
    color: var(--products-secondary);
    text-align: left;
}
.products-empty-state > span {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .8rem;
    background: #EAF8F4;
    color: #0EB295;
    font-size: 1.05rem;
}
.products-empty-state h2 { margin: 0; color: var(--products-text); font-size: .9rem; font-weight: 700; }
.products-empty-state p { margin: .2rem 0 0; font-size: .72rem; }
.products-pagination-footer {
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem .85rem;
    border-top: 1px solid var(--products-border-soft);
    color: #667085;
    font-size: .7rem;
}
.products-pagination-footer > div { display: flex; align-items: center; gap: .45rem; }
.products-page-current {
    min-width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(14,178,149,.55);
    border-radius: .58rem;
    color: #0C9D83;
    font-weight: 700;
}

@media (max-width: 1280px) {
    .products-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .products-filter-card { grid-template-columns: minmax(16rem, 1fr) minmax(10rem, 11rem) minmax(12rem, .75fr) auto; }
    .products-filter-reset { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 991.98px) {
    .page-products .app-main > .container-fluid { padding-top: 1.1rem !important; }
    .products-management-header { flex-direction: column; align-items: stretch; }
    .products-management-header-side { justify-items: stretch; }
    .skuze-page-tools { justify-content: flex-start; }
    .products-management-header-side form .products-sync-button { width: 100%; }
    .products-filter-card { grid-template-columns: 1fr 1fr; }
    .products-filter-search:first-child { grid-column: 1 / -1; }
    .products-filter-tag { grid-column: 1 / -1; }
    .products-filter-reset { grid-column: auto; align-self: center; }
}

@media (max-width: 767.98px) {
    .page-products .app-main > .container-fluid { padding-inline: .85rem !important; }
    .products-management-header-copy h1 { font-size: 1.55rem; }
    .products-management-header-copy p { font-size: .83rem; }
    .skuze-page-tool--label { flex: 1 1 auto; justify-content: center; }
    .skuze-page-profile { flex: 1 1 auto; justify-content: center; }
    .products-filter-card { grid-template-columns: 1fr; padding: .65rem; }
    .products-filter-search:first-child,
    .products-filter-tag { grid-column: auto; }
    .products-filter-apply { width: 100%; }
    .products-stat-grid { grid-template-columns: 1fr 1fr; }
    .products-bulk-toolbar { flex-wrap: wrap; }
    .products-bulk-selection { min-width: 0; }
    .products-bulk-action-select { flex: 1 1 11rem; min-width: 0; }
    .products-table-range { order: 5; margin-left: 0; width: 100%; }
    .products-table-scroll { overflow: visible; }
    .products-table-head { display: none; }
    .products-table-body { display: grid; gap: .7rem; padding: .7rem; background: #F8FAFB; }
    .products-table-row {
        min-width: 0;
        display: grid;
        grid-template-columns: 2rem minmax(0, 1fr) auto;
        grid-template-areas:
            "check product actions"
            ". status status"
            ". review review"
            ". automation automation"
            ". source source"
            ". updated updated";
        gap: .5rem .65rem;
        padding: .8rem;
        border: 1px solid var(--products-border) !important;
        border-radius: .85rem;
        background: #fff;
    }
    .products-table-row > :nth-child(1) { grid-area: check; }
    .products-table-row > :nth-child(2) { grid-area: product; }
    .products-table-row > :nth-child(3) { grid-area: status; }
    .products-table-row > :nth-child(4) { grid-area: review; }
    .products-table-row > :nth-child(5) { grid-area: automation; }
    .products-table-row > :nth-child(6) { grid-area: source; }
    .products-table-row > :nth-child(7) { grid-area: updated; }
    .products-table-row > :nth-child(8) { grid-area: actions; }
    .products-table-row > :nth-child(n+3):nth-child(-n+7)::before {
        display: inline-block;
        width: 5.5rem;
        color: #98A2B3;
        font-size: .62rem;
        font-weight: 600;
    }
    .products-pagination-footer { align-items: flex-start; }
}

@media (max-width: 520px) {
    .products-stat-grid { grid-template-columns: 1fr; }
    .products-status-tabs { gap: 1.15rem; }
    .products-product-thumb { width: 2.6rem; height: 2.6rem; flex-basis: 2.6rem; }
}

/* Products v1.1.7.28 — AJAX catalog pagination + Shopify brand source */
.products-shopify-source {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    color: #526078;
    text-decoration: none;
}
.products-shopify-source:hover { color: #182433; }
.products-shopify-source img { width: 1.15rem; height: 1.15rem; object-fit: contain; flex: 0 0 1.15rem; }
[data-products-ajax-region] { position: relative; transition: opacity .15s ease; }
[data-products-ajax-region].is-loading { opacity: .48; pointer-events: none; }
[data-products-ajax-region].is-loading::after {
    content: '';
    position: absolute;
    top: .75rem;
    right: .85rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid #D8E5E3;
    border-top-color: #0EB295;
    border-radius: 999px;
    animation: skuzeProductsSpin .7s linear infinite;
}
@keyframes skuzeProductsSpin { to { transform: rotate(360deg); } }
.products-rows-per-page {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: #667085;
}
.products-rows-per-page { position: relative; }
.products-rows-per-page select {
    appearance: none;
    min-width: 4rem;
    height: 2.25rem;
    padding: 0 1.8rem 0 .65rem;
    border: 1px solid var(--products-border);
    border-radius: .58rem;
    background: #fff;
    color: #182433;
    font-size: .7rem;
    outline: none;
}
.products-rows-per-page > i { position: absolute; right: .65rem; color: #667085; font-size: .62rem; pointer-events: none; }
.products-pagination-pages { display: flex; align-items: center; gap: .3rem !important; }
.products-page-link,
.products-page-current,
.products-page-ellipsis {
    min-width: 2.2rem;
    height: 2.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .58rem;
    font-size: .7rem;
    text-decoration: none;
}
.products-page-link { color: #526078; border: 1px solid transparent; }
.products-page-link:hover { color: #0C9D83; background: #F6FBF9; border-color: #DCEFEA; }
.products-page-current { border: 1px solid rgba(14,178,149,.55); background: #F4FBF9; color: #0C9D83; font-weight: 700; }
.products-page-ellipsis { color: #8A96A3; }

/* Product edit v1.1.7.28 — Shopify-connected management editor */
.page-product_edit .app-page-topbar { display: none; }
.page-product_edit .app-main > .container-fluid {
    max-width: 100%;
    padding: 1.85rem clamp(1.1rem, 2.2vw, 2.15rem) 2.75rem !important;
}
.product-editor-page {
    --pe-border: #E6EAEE;
    --pe-border-soft: #EEF2F4;
    --pe-text: #182433;
    --pe-secondary: #5F6C7B;
    --pe-muted: #8A96A3;
    min-width: 0;
}
.product-editor-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
}
.product-editor-header-copy { min-width: 0; }
.product-editor-back {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    margin-bottom: .85rem;
    color: #0C9D83;
    font-size: .78rem;
    font-weight: 650;
    text-decoration: none;
}
.product-editor-back:hover { color: #087E6A; }
.product-editor-header h1 {
    margin: 0;
    color: var(--pe-text);
    font-size: 1.8rem;
    line-height: 1.15;
    font-weight: 780;
    letter-spacing: -.035em;
}
.product-editor-header p { margin: .35rem 0 0; color: var(--pe-secondary); font-size: .9rem; }
.product-editor-header-actions { display: flex; align-items: center; gap: .62rem; flex-wrap: wrap; justify-content: flex-end; }
.product-editor-secondary,
.product-editor-save-top {
    min-height: 2.7rem;
    border-radius: .7rem;
    padding-inline: .9rem;
    font-size: .78rem;
    font-weight: 650;
}
.product-editor-secondary { border: 1px solid var(--pe-border); background: #fff; color: #344054; }
.product-editor-secondary:hover { border-color: #D9E0E5; background: #FAFCFC; color: #182433; }
.product-editor-shopify-mark { width: 1rem; height: 1rem; object-fit: contain; }
.product-editor-save-top { box-shadow: 0 8px 18px rgba(14,178,149,.14); }
.product-editor-more {
    width: 2.7rem;
    height: 2.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pe-border);
    border-radius: .7rem;
    background: #fff;
    color: #526078;
}
.product-editor-more:hover,
.product-editor-more[aria-expanded="true"] { background: #F8FAFB; color: #182433; }
.product-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(18rem, .86fr);
    gap: 1.35rem;
    align-items: start;
}
.product-editor-main,
.product-editor-sidebar { min-width: 0; display: grid; gap: 1rem; }
.product-editor-sidebar { position: sticky; top: 1rem; }
.product-editor-card {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--pe-border);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.025);
}
.product-editor-card-head {
    min-height: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .95rem;
}
.product-editor-card-head h2 { margin: 0; color: var(--pe-text); font-size: .88rem; font-weight: 730; }
.product-editor-card-head p { margin: .24rem 0 0; color: var(--pe-muted); font-size: .7rem; line-height: 1.45; }
.product-editor-card-head > a { color: #0C9D83; font-size: .7rem; font-weight: 650; text-decoration: none; }
.product-editor-fields { display: grid; gap: .85rem; }
.product-editor-fields.two-col { grid-template-columns: 1fr 1fr; }
.product-editor-fields label,
.product-editor-description,
.product-editor-option-card label,
.product-editor-variant-fields label,
.product-editor-inventory-levels label,
.product-editor-status-select { display: grid; gap: .4rem; min-width: 0; }
.product-editor-fields label > span,
.product-editor-description > span,
.product-editor-option-card label > span,
.product-editor-variant-fields label > span,
.product-editor-inventory-levels label > span,
.product-editor-status-select > span {
    color: #344054;
    font-size: .69rem;
    font-weight: 650;
}
.product-editor-fields label > span b { color: #E5484D; }
.product-editor-page .form-control,
.product-editor-page .form-select {
    min-height: 2.5rem;
    border-color: var(--pe-border);
    border-radius: .62rem;
    color: #263445;
    font-size: .76rem;
    box-shadow: none;
}
.product-editor-page .form-control:focus,
.product-editor-page .form-select:focus { border-color: rgba(14,178,149,.7); box-shadow: 0 0 0 3px rgba(14,178,149,.09); }
.product-editor-description { margin-top: .9rem; }
.product-editor-description textarea { min-height: 11rem; }
.product-editor-meta-pill {
    min-height: 1.7rem;
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #F4F7F8;
    color: #667085;
    font-size: .63rem;
    white-space: nowrap;
}
.product-editor-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .8rem; }
.product-editor-option-card { padding: .8rem; border: 1px solid var(--pe-border-soft); border-radius: .78rem; background: #FCFDFD; }
.product-editor-option-values { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; margin-top: .65rem; }
.product-editor-variant-list { display: grid; gap: .75rem; }
.product-editor-variant-card { padding: .85rem; border: 1px solid var(--pe-border-soft); border-radius: .8rem; background: #FCFDFD; }
.product-editor-variant-title { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .72rem; }
.product-editor-variant-title strong { color: var(--pe-text); font-size: .76rem; }
.product-editor-variant-title span { color: var(--pe-muted); font-size: .65rem; }
.product-editor-variant-fields { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .65rem; }
.product-editor-variant-switches { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; margin-top: .7rem; }
.product-editor-variant-switches .form-check { display: flex; align-items: center; gap: .45rem; margin: 0; min-height: 1.7rem; }
.product-editor-variant-switches span { color: #526078; font-size: .68rem; }
.product-editor-page .form-check-input:checked { background-color: #0EB295; border-color: #0EB295; }
.product-editor-inventory-levels { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--pe-border-soft); }
.product-editor-inventory-summary { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--pe-border-soft); color: #667085; font-size: .68rem; }
.product-editor-scope-note { display: flex; align-items: flex-start; gap: .5rem; padding: .7rem .8rem; margin: -.15rem 0 .8rem; border: 1px solid #DDE9F8; border-radius: .65rem; background: #F7FAFF; color: #5A6C82; font-size: .68rem; }
.product-editor-seo { padding: 0; overflow: hidden; }
.product-editor-seo summary { min-height: 3.25rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: 0 1rem; color: var(--pe-text); font-size: .82rem; font-weight: 700; cursor: pointer; list-style: none; }
.product-editor-seo summary::-webkit-details-marker { display: none; }
.product-editor-seo[open] summary i { transform: rotate(180deg); }
.product-editor-seo .product-editor-fields { padding: 0 1rem 1rem; }
.product-editor-status-card .product-editor-card-head { align-items: center; padding-bottom: .85rem; border-bottom: 1px solid var(--pe-border-soft); }
.product-editor-status-select { margin-bottom: .85rem; }
.product-editor-detail-list { display: grid; gap: .72rem; margin: 0; }
.product-editor-detail-list > div { display: grid; grid-template-columns: minmax(7rem,.8fr) minmax(0,1.2fr); gap: .8rem; align-items: start; }
.product-editor-detail-list dt { color: #667085; font-size: .67rem; font-weight: 500; }
.product-editor-detail-list dd { margin: 0; color: #344054; font-size: .68rem; font-weight: 570; min-width: 0; overflow-wrap: anywhere; }
.product-editor-detail-list dd a { color: #0C9D83; text-decoration: none; }
.product-editor-sync-dot { width: .48rem; height: .48rem; display: inline-block; margin-right: .38rem; border-radius: 999px; background: #1FA971; }
.product-editor-source { display: inline-flex; align-items: center; gap: .4rem; color: #344054 !important; }
.product-editor-source img { width: 1rem; height: 1rem; object-fit: contain; }
.product-editor-image-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .5rem; }
.product-editor-image-grid figure { position: relative; aspect-ratio: 1; margin: 0; overflow: hidden; border: 1px solid var(--pe-border-soft); border-radius: .62rem; background: #F7F9FA; }
.product-editor-image-grid img { width: 100%; height: 100%; object-fit: cover; }
.product-editor-image-grid figure > span { position: absolute; top: .32rem; left: .32rem; z-index: 1; padding: .17rem .38rem; border-radius: .38rem; background: #0EB295; color: #fff; font-size: .55rem; font-weight: 700; }
.product-editor-image-empty { min-height: 6rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; border: 1px dashed #DCE3E8; border-radius: .72rem; color: #8A96A3; font-size: .68rem; }
.product-editor-image-count { margin-top: .65rem; color: #0C9D83; font-size: .67rem; }
.product-editor-inline-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem; color: #0C9D83; font-size: .68rem; font-weight: 650; text-decoration: none; }
.product-editor-empty-copy { color: #7A8694; font-size: .7rem; line-height: 1.5; }

@media (max-width: 1280px) {
    .product-editor-layout { grid-template-columns: minmax(0,1.5fr) minmax(17rem,.8fr); }
    .product-editor-variant-fields { grid-template-columns: 1fr 1fr; }
    .product-editor-inventory-levels { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 991.98px) {
    .page-product_edit .app-main > .container-fluid { padding-top: 1.1rem !important; }
    .product-editor-header { align-items: stretch; flex-direction: column; }
    .product-editor-header-actions { justify-content: flex-start; }
    .product-editor-layout { grid-template-columns: 1fr; }
    .product-editor-sidebar { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .product-editor-sidebar > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .page-product_edit .app-main > .container-fluid { padding-inline: .85rem !important; }
    .product-editor-header h1 { font-size: 1.55rem; }
    .product-editor-header-actions .btn { flex: 1 1 auto; }
    .product-editor-save-top { order: -1; width: 100%; }
    .product-editor-fields.two-col,
    .product-editor-option-grid,
    .product-editor-option-values,
    .product-editor-variant-fields,
    .product-editor-inventory-levels,
    .product-editor-sidebar { grid-template-columns: 1fr; }
    .product-editor-sidebar > :last-child { grid-column: auto; }
    .product-editor-detail-list > div { grid-template-columns: 1fr; gap: .18rem; }
    .product-editor-image-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .products-pagination-footer { align-items: stretch; flex-direction: column; }
    .products-pagination-pages { justify-content: flex-end; flex-wrap: wrap; }
}
.product-editor-image-alt-list { display: grid; gap: .48rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--pe-border-soft); }
.product-editor-image-alt-list label { display: grid; gap: .3rem; }
.product-editor-image-alt-list label > span { color: #667085; font-size: .62rem; font-weight: 620; }
.product-editor-image-alt-list .form-control { min-height: 2.15rem; font-size: .68rem; }

.product-editor-variant-limit {
    display:flex; align-items:flex-start; gap:.55rem; margin:0 1.25rem 1rem; padding:.72rem .85rem;
    border:1px solid #fde2bd; border-radius:12px; background:#fff8ed; color:#8a5a1d; font-size:.78rem; line-height:1.45;
}
.product-editor-variant-limit > i { margin-top:.08rem; color:#e68a2e; }
.product-editor-variant-limit a { margin-left:auto; flex:0 0 auto; color:#0c9d83; font-weight:650; text-decoration:none; }

/* Automations v1.1.7.29 — create modal + AJAX template browser */
.automation-create-dialog {
    max-width: 37rem;
}

.automation-create-content,
.automation-template-browser-content {
    border: 1px solid rgba(230, 234, 238, .9);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 28px 80px rgba(16, 24, 40, .18);
    overflow: hidden;
}

.automation-create-head,
.automation-template-browser-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.55rem 1.7rem 1rem;
}

.automation-create-head h2,
.automation-template-browser-head h2 {
    margin: 0;
    color: #182433;
    font-size: 1.28rem;
    line-height: 1.25;
    font-weight: 760;
    letter-spacing: -.025em;
}

.automation-template-browser-head p {
    margin: .35rem 0 0;
    color: #5f6c7b;
    font-size: .84rem;
    line-height: 1.45;
}

.automation-template-close {
    width: 2.3rem;
    height: 2.3rem;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: .7rem;
    background: transparent;
    color: #344054;
    font-size: .94rem;
}

.automation-template-close:hover {
    background: #f4f7f8;
    color: #182433;
}

.automation-template-close:focus-visible,
.automation-create-scratch-card:focus-visible,
.automation-create-featured-card:focus-visible,
.automation-template-browser-card:focus-visible,
.automation-template-category-tabs button:focus-visible,
.automation-browse-all-link:focus-visible {
    outline: 3px solid rgba(14, 178, 149, .18);
    outline-offset: 2px;
}

.automation-create-body {
    padding: 0 1.7rem 1.55rem;
}

.automation-create-scratch-form,
.automation-create-featured-form {
    margin: 0;
}

.automation-create-scratch-card,
.automation-create-featured-card {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    text-align: left;
    color: inherit;
}

.automation-create-scratch-card {
    min-height: 7rem;
    padding: 1.15rem 1.25rem;
    border: 1px solid #0EB295;
    border-radius: .85rem;
    background: linear-gradient(180deg, rgba(234, 248, 244, .48), rgba(255, 255, 255, .96));
}

.automation-create-scratch-card:hover {
    border-color: #0C9D83;
    background: #f8fdfb;
}

.automation-create-scratch-icon,
.automation-template-card-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .7rem;
    border: 1px solid rgba(14, 178, 149, .12);
    background: #EAF8F4;
    color: #0C9D83;
    font-size: 1.12rem;
}

.automation-create-scratch-icon img {
    width: 1.35rem;
    height: 1.35rem;
}

.automation-create-title-row {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}

.automation-create-scratch-copy strong,
.automation-create-featured-copy strong {
    color: #182433;
    font-size: .92rem;
    font-weight: 730;
    line-height: 1.35;
}

.automation-create-scratch-copy small,
.automation-create-featured-copy small {
    display: block;
    margin-top: .25rem;
    color: #5F6C7B;
    font-size: .77rem;
    line-height: 1.45;
}

.automation-template-recommended {
    min-height: 1.4rem;
    display: inline-flex;
    align-items: center;
    padding: .15rem .48rem;
    border-radius: 999px;
    background: #EAF8F4;
    color: #0C9D83;
    font-size: .63rem;
    line-height: 1;
    font-weight: 720;
    white-space: nowrap;
}

.automation-create-chevron {
    color: #182433;
    font-size: .92rem;
}

.automation-create-section-title {
    margin: 1.25rem 0 .72rem;
    color: #182433;
    font-size: .82rem;
    font-weight: 720;
}

.automation-create-featured-list {
    display: grid;
    gap: .55rem;
}

.automation-create-featured-card {
    min-height: 6.35rem;
    padding: .95rem 1rem;
    border: 1px solid #E6EAEE;
    border-radius: .8rem;
    background: #fff;
}

.automation-create-featured-card:hover {
    border-color: rgba(14, 178, 149, .38);
    background: #fcfefd;
}

.automation-create-featured-copy {
    min-width: 0;
}

.automation-create-featured-meta {
    margin-top: .48rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    flex-wrap: wrap;
    color: #6D7886;
    font-size: .68rem;
}

.automation-create-featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: .34rem;
}

.automation-create-featured-meta img,
.automation-template-browser-card-meta img {
    width: .86rem;
    height: .86rem;
    flex: 0 0 auto;
}


.automation-browse-all-link {
    margin-top: .9rem;
    padding: .2rem 0;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border: 0;
    background: transparent;
    color: #0C9D83;
    font-size: .8rem;
    font-weight: 700;
}

.automation-browse-all-link:hover {
    color: #087d6b;
}

.automation-template-browser-dialog {
    width: min(61rem, calc(100vw - 2rem));
    max-width: 61rem;
}

.automation-template-browser-content {
    max-height: calc(100vh - 2rem);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.automation-template-browser-controls {
    padding: 0 1.7rem .9rem;
}

.automation-template-search {
    min-height: 2.9rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .65rem;
    padding: 0 .82rem;
    border: 1px solid #E6EAEE;
    border-radius: .7rem;
    background: #fff;
    color: #7c8998;
}

.automation-template-search:focus-within {
    border-color: rgba(14, 178, 149, .62);
    box-shadow: 0 0 0 3px rgba(14, 178, 149, .08);
}

.automation-template-search input {
    width: 100%;
    min-width: 0;
    height: 2.75rem;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #182433;
    font-size: .82rem;
}

.automation-template-search input::placeholder {
    color: #8A96A3;
}

.automation-template-search-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #dbe5e7;
    border-top-color: #0EB295;
    border-radius: 999px;
    opacity: 0;
    animation: automationTemplateSpin .7s linear infinite;
}

.automation-template-search-spinner.is-visible { opacity: 1; }

@keyframes automationTemplateSpin { to { transform: rotate(360deg); } }

.automation-template-category-tabs {
    display: flex;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
    margin-top: .85rem;
}

.automation-template-category-tabs button {
    min-height: 2.25rem;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .8rem;
    border: 1px solid #E6EAEE;
    border-radius: .62rem;
    background: #fff;
    color: #526078;
    font-size: .72rem;
    font-weight: 600;
}

.automation-template-category-tabs button:hover {
    border-color: rgba(14, 178, 149, .28);
    color: #344054;
}

.automation-template-category-tabs button.is-active {
    border-color: #EAF8F4;
    background: #EAF8F4;
    color: #0C9D83;
}

.automation-template-browser-results {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 0 1.7rem 1.15rem;
}

.automation-template-browser-results[aria-busy="true"] {
    opacity: .62;
    transition: opacity .12s ease;
}

.automation-template-browser-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.automation-template-browser-card {
    min-height: 8rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: .9rem;
    padding: 1rem;
    border: 1px solid #E6EAEE;
    border-radius: .82rem;
    background: #fff;
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.automation-template-browser-card:hover {
    border-color: rgba(14, 178, 149, .34);
    background: #fcfefd;
}

.automation-template-browser-card.is-selected {
    border-color: #0EB295;
    background: rgba(234, 248, 244, .35);
    box-shadow: inset 0 0 0 1px rgba(14, 178, 149, .06);
}

.automation-template-browser-card-copy {
    min-width: 0;
}

.automation-template-browser-card-title-row {
    display: flex;
    align-items: center;
    gap: .48rem;
    flex-wrap: wrap;
}

.automation-template-browser-card h3 {
    margin: 0;
    color: #182433;
    font-size: .88rem;
    line-height: 1.35;
    font-weight: 730;
}

.automation-template-browser-card p {
    min-height: 2.35rem;
    margin: .25rem 0 .72rem;
    color: #5F6C7B;
    font-size: .74rem;
    line-height: 1.45;
}

.automation-template-browser-card-meta {
    display: flex;
    align-items: center;
    gap: .8rem;
    flex-wrap: wrap;
    color: #687587;
    font-size: .67rem;
}

.automation-template-browser-card-meta > span {
    display: inline-flex;
    align-items: center;
    gap: .34rem;
}

.automation-template-use-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    padding: .15rem 0;
    border: 0;
    background: transparent;
    color: #0C9D83;
    font-size: .68rem;
    font-weight: 720;
}

.automation-template-use-link:hover {
    color: #087d6b;
}

.automation-template-browser-empty {
    min-height: 13rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .85rem;
    padding: 2rem;
    border: 1px dashed #E6EAEE;
    border-radius: .9rem;
    background: #F8FAFB;
    text-align: left;
}

.automation-template-browser-empty-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .7rem;
    background: #EAF8F4;
    color: #0C9D83;
}

.automation-template-browser-empty strong {
    color: #182433;
    font-size: .82rem;
}

.automation-template-browser-empty p {
    margin: .2rem 0 0;
    color: #5F6C7B;
    font-size: .72rem;
}

.automation-template-browser-footer {
    min-height: 4.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1.7rem;
    border-top: 1px solid #E6EAEE;
    background: rgba(255, 255, 255, .98);
}

.automation-template-browser-footer form { margin: 0; }

.automation-template-scratch-footer {
    min-height: 2.65rem;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    border: 1px solid #D9E0E5;
    border-radius: .68rem;
    background: #fff;
    color: #344054;
    font-size: .72rem;
    font-weight: 650;
}

.automation-template-scratch-footer:hover {
    border-color: rgba(14, 178, 149, .34);
    color: #0C9D83;
}

.automation-template-browser-footer-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    min-width: 0;
}

.automation-template-browser-footer-main > span {
    color: #7A8794;
    font-size: .67rem;
    white-space: nowrap;
}

.automation-template-browser-footer-main .btn-primary {
    min-height: 2.65rem;
    border-radius: .68rem;
    padding-inline: 1rem;
    font-size: .72rem;
    font-weight: 680;
}

.automation-template-browser-footer-main .btn-primary:disabled {
    opacity: .48;
}

@media (max-width: 767.98px) {
    .automation-create-dialog,
    .automation-template-browser-dialog {
        width: auto;
        margin: .7rem;
    }

    .automation-create-head,
    .automation-template-browser-head {
        padding: 1.15rem 1.1rem .85rem;
    }

    .automation-create-body,
    .automation-template-browser-controls,
    .automation-template-browser-results {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .automation-create-scratch-card,
    .automation-create-featured-card {
        gap: .75rem;
        padding: .9rem;
    }

    .automation-create-scratch-icon,
    .automation-template-card-icon {
        width: 2.65rem;
        height: 2.65rem;
    }

    .automation-create-featured-meta { gap: .6rem; }

    .automation-template-browser-grid {
        grid-template-columns: 1fr;
    }

    .automation-template-browser-content {
        max-height: calc(100vh - 1.4rem);
    }

    .automation-template-browser-footer {
        align-items: stretch;
        flex-direction: column;
        padding: .8rem 1.1rem;
    }

    .automation-template-browser-footer-main {
        align-items: stretch;
        flex-direction: column;
        gap: .55rem;
    }

    .automation-template-browser-footer-main > span {
        white-space: normal;
    }

    .automation-template-browser-footer form,
    .automation-template-browser-footer .btn {
        width: 100%;
    }
}


/* Automations v1.1.7.30 — centralized semantic workflow/type palette.
   Skuze brand/focus/selection remains #0EB295; these tokens identify Automation purpose. */
.tone-product-enrichment,
.tone-product {
    --automation-tone: var(--automation-product-enrichment);
    --automation-tone-bg: var(--automation-product-enrichment-bg);
    --automation-tone-border: rgba(14, 178, 149, .24);
}
.tone-variant-options {
    --automation-tone: var(--automation-variant-options);
    --automation-tone-bg: var(--automation-variant-options-bg);
    --automation-tone-border: rgba(14, 178, 149, .24);
}
.tone-ai-content,
.tone-ai {
    --automation-tone: var(--automation-ai-content);
    --automation-tone-bg: var(--automation-ai-content-bg);
    --automation-tone-border: rgba(139, 92, 246, .24);
}
.tone-seo {
    --automation-tone: var(--automation-seo);
    --automation-tone-bg: var(--automation-seo-bg);
    --automation-tone-border: rgba(59, 130, 246, .24);
}
.tone-collection {
    --automation-tone: var(--automation-collection);
    --automation-tone-bg: var(--automation-collection-bg);
    --automation-tone-border: rgba(39, 181, 138, .24);
}
.tone-publish {
    --automation-tone: var(--automation-publish);
    --automation-tone-bg: var(--automation-publish-bg);
    --automation-tone-border: rgba(249, 115, 22, .24);
}
.tone-collection-blog,
.tone-content {
    --automation-tone: var(--automation-collection-blog);
    --automation-tone-bg: var(--automation-collection-blog-bg);
    --automation-tone-border: rgba(245, 158, 11, .24);
}
.tone-scheduled-topic {
    --automation-tone: var(--automation-scheduled-topic);
    --automation-tone-bg: var(--automation-scheduled-topic-bg);
    --automation-tone-border: rgba(79, 70, 229, .24);
}
/* Utility workflow steps keep their established functional language. */
.tone-trigger { --automation-tone: #0EB295; --automation-tone-bg: #EAF8F4; --automation-tone-border: rgba(14,178,149,.24); }
.tone-review { --automation-tone: #D97706; --automation-tone-bg: #FFF7E8; --automation-tone-border: rgba(217,119,6,.22); }
.tone-delay { --automation-tone: #0284C7; --automation-tone-bg: #EAF7FF; --automation-tone-border: rgba(2,132,199,.22); }
.tone-condition,
.tone-branch { --automation-tone: #4F46E5; --automation-tone-bg: #EEF0FF; --automation-tone-border: rgba(79,70,229,.22); }
.tone-variable { --automation-tone: #0E7490; --automation-tone-bg: #ECF8FB; --automation-tone-border: rgba(14,116,144,.22); }

/* Shared type surfaces: overview, template modals, Studio inspector/library and mini nodes. */
.automation-index-row-icon[class*="tone-"],
.automation-template-card-icon[class*="tone-"],
.automation-template-browser-card-icon[class*="tone-"],
.automation-inspector-icon[class*="tone-"],
.automation-mini-node[class*="tone-"] {
    color: var(--automation-tone, #0C9D83);
    background: var(--automation-tone-bg, #EAF8F4);
    border-color: var(--automation-tone-border, rgba(14,178,149,.2));
}

.automation-step-node[class*="tone-"] {
    border-color: var(--automation-tone-border, rgba(148,163,184,.2));
}
.automation-step-node[class*="tone-"] .automation-node-icon {
    color: var(--automation-tone, #0C9D83);
    background: var(--automation-tone-bg, #EAF8F4);
}

.automation-branch-step[class*="tone-"] .automation-branch-step-icon {
    color: var(--automation-tone, #0C9D83);
    background: var(--automation-tone-bg, #EAF8F4);
}

/* Keep selected/focus state brand-led; type color remains visible in the icon tile. */
.automation-step-node.is-selected,
.automation-branch-step.is-selected {
    border-color: var(--accent);
}

/* Run history shows both status and type without letting type color replace failure/wait states. */
.automation-run-step[class*="tone-"]:not(.is-failed):not(.is-rejected):not(.is-waiting):not(.is-skipped) {
    box-shadow: inset 3px 0 0 var(--automation-tone, #0EB295);
}

.automation-analytics-step-identity {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
}
.automation-analytics-step-identity .automation-inspector-icon {
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: .62rem;
}
.automation-analytics-step-identity > span:last-child { min-width: 0; }
.automation-analytics-step-identity strong,
.automation-analytics-step-identity small { display: block; }
.automation-analytics-step-identity small { margin-top: .12rem; color: #8A96A3; font-size: .68rem; }


/* v1.1.7.31 — Automation overview type identity + app-wide status alignment. */
.automation-index-row[class*="tone-"],
.automation-index-card[class*="tone-"] {
    --automation-row-accent: var(--automation-tone, #0EB295);
    --automation-row-soft: var(--automation-tone-bg, #EAF8F4);
}
.automation-index-row[class*="tone-"] {
    box-shadow: inset 3px 0 0 color-mix(in srgb, var(--automation-row-accent) 72%, transparent);
}
.automation-index-row[class*="tone-"] .automation-index-row-icon,
.automation-index-card[class*="tone-"] .automation-index-row-icon {
    color: var(--automation-row-accent) !important;
    background: var(--automation-row-soft) !important;
    border: 1px solid color-mix(in srgb, var(--automation-row-accent) 16%, transparent);
}
.automation-index-row[class*="tone-"]:hover {
    background: color-mix(in srgb, var(--automation-row-soft) 32%, #fff);
}
.automation-index-card[class*="tone-"] {
    border-top: 3px solid color-mix(in srgb, var(--automation-row-accent) 70%, transparent);
}

/* Existing app components mapped onto the single semantic status palette. */
.review-status-pill.is-review { color: var(--status-needs-review); background: var(--status-needs-review-bg); border-color: rgba(230,138,46,.18); }
.review-status-pill.is-rejected { color: var(--status-failed); background: var(--status-failed-bg); border-color: rgba(229,72,77,.18); }
.review-status-pill.is-processed { color: var(--status-approved); background: var(--status-approved-bg); border-color: rgba(22,163,106,.16); }
.automation-preview-chip.is-success { color: var(--status-approved); background: var(--status-approved-bg); }
.automation-inline-status.is-success { color: var(--status-approved); background: var(--status-approved-bg); border-color: rgba(22,163,106,.16); }
.automation-inline-status.is-warning { color: var(--status-pending); background: var(--status-pending-bg); border-color: rgba(230,138,46,.18); }

/* Product Metafields Automation step */
.automation-metafield-list { display: grid; gap: .85rem; }
.automation-metafield-row {
    padding: 1rem;
    border: 1px solid var(--border, #E6EAEE);
    border-radius: .85rem;
    background: #fff;
}
.automation-metafield-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .8rem;
    color: #182433;
    font-size: .82rem;
}
.automation-metafield-row-head .btn { width: 2rem; height: 2rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* Plans & pricing v1.1.7.41 */
.page-plans .app-page-topbar { margin-bottom: 1.25rem !important; }
.pricing-page-shell { max-width: 1380px; margin: 0 auto; }
.pricing-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
    gap: 2rem;
    align-items: center;
    padding: 2.35rem 2.5rem;
    border: 1px solid rgba(14,178,149,.16);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at 88% 8%, rgba(14,178,149,.16), transparent 18rem),
        linear-gradient(135deg, #FFFFFF 0%, #F4FBF9 58%, #EBF9F5 100%);
}
.pricing-hero::after {
    content: '';
    position: absolute;
    right: -5rem;
    bottom: -7rem;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    border: 1px solid rgba(14,178,149,.12);
    box-shadow: 0 0 0 2.8rem rgba(14,178,149,.035), 0 0 0 5.6rem rgba(14,178,149,.025);
    pointer-events: none;
}
.pricing-hero-copy, .pricing-hero-note { position: relative; z-index: 1; }
.pricing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #0C8D77;
    font-size: .75rem;
    font-weight: 750;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.pricing-hero h1 { max-width: 760px; margin: .65rem 0 .75rem; font-size: clamp(2rem, 4vw, 3.35rem); line-height: 1.02; letter-spacing: -.045em; font-weight: 760; color: #172331; }
.pricing-hero-copy > p { max-width: 760px; margin: 0; color: var(--skuze-text-secondary); font-size: 1.04rem; line-height: 1.7; }
.pricing-hero-note { display: flex; align-items: flex-start; gap: .9rem; padding: 1.15rem; border: 1px solid rgba(14,178,149,.18); border-radius: 1rem; background: rgba(255,255,255,.8); box-shadow: 0 12px 32px rgba(15,23,42,.04); }
.pricing-hero-note-icon { width: 2.6rem; height: 2.6rem; border-radius: .85rem; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; background: #EAF8F4; color: #0C9D83; font-size: 1.18rem; }
.pricing-hero-note strong, .pricing-hero-note span { display: block; }
.pricing-hero-note strong { color: var(--skuze-text); margin-bottom: .24rem; }
.pricing-hero-note span { color: var(--skuze-text-secondary); font-size: .86rem; line-height: 1.55; }

.pricing-current { border-color: var(--skuze-border); box-shadow: none; }
.pricing-current-main { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.pricing-current-plan-line { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .22rem; }
.pricing-current-plan-line strong { font-size: 1.42rem; color: var(--skuze-text); }
.pricing-current-plan-line span, .pricing-current-meta { color: var(--skuze-text-secondary); font-size: .84rem; }
.pricing-current-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; flex-wrap: wrap; }
.pricing-override-note, .pricing-verify-note { display: flex; align-items: flex-start; gap: .55rem; border-radius: .75rem; padding: .7rem .8rem; font-size: .8rem; line-height: 1.5; }
.pricing-override-note { background: #FFF8E8; color: #765A16; border: 1px solid #F6E5B5; }
.pricing-verify-note { background: #F5F8FA; color: var(--skuze-text-secondary); border: 1px solid var(--skuze-border); }

.pricing-plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.pricing-plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.35rem;
    border: 1px solid var(--skuze-border);
    border-radius: 1.18rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15,23,42,.035);
}
.pricing-plan-card.is-recommended { border-color: rgba(14,178,149,.48); box-shadow: 0 16px 38px rgba(14,178,149,.09); }
.pricing-plan-card.is-effective { box-shadow: inset 0 0 0 1px rgba(14,178,149,.12), 0 10px 28px rgba(15,23,42,.035); }
.pricing-plan-ribbon { position: absolute; top: -.72rem; left: 1rem; padding: .28rem .62rem; border-radius: 999px; background: #0EB295; color: #fff; font-size: .67rem; font-weight: 750; letter-spacing: .02em; box-shadow: 0 6px 14px rgba(14,178,149,.18); }
.pricing-plan-card-head { min-height: 205px; }
.pricing-plan-icon { width: 2.45rem; height: 2.45rem; border-radius: .8rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; background: #F2F7F7; color: #405260; font-size: 1.08rem; }
.pricing-plan-card.is-recommended .pricing-plan-icon { background: #EAF8F4; color: #0C9D83; }
.pricing-plan-name-row { display: flex; align-items: center; justify-content: space-between; gap: .45rem; min-height: 2rem; }
.pricing-plan-name-row h2 { margin: 0; font-size: 1.24rem; font-weight: 740; letter-spacing: -.02em; color: var(--skuze-text); }
.pricing-plan-tagline { min-height: 2.8rem; margin: .45rem 0 .8rem; color: var(--skuze-text-secondary); font-size: .84rem; line-height: 1.55; }
.pricing-plan-price { display: flex; align-items: baseline; min-height: 3.4rem; color: var(--skuze-text); }
.pricing-plan-price strong { font-size: 2.45rem; line-height: 1; font-weight: 760; letter-spacing: -.055em; }
.pricing-plan-currency { align-self: flex-start; margin-top: .35rem; margin-right: .12rem; color: var(--skuze-text-secondary); font-weight: 700; }
.pricing-plan-period { margin-left: .28rem; color: var(--skuze-text-muted); font-size: .77rem; }
.pricing-plan-trial { min-height: 1.4rem; color: #0C8D77; font-size: .72rem; font-weight: 650; }
.pricing-plan-metrics { margin: .95rem 0 .9rem; border-top: 1px solid var(--skuze-border-soft); border-bottom: 1px solid var(--skuze-border-soft); }
.pricing-plan-metrics > div { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 2.48rem; border-bottom: 1px solid var(--skuze-border-soft); font-size: .77rem; }
.pricing-plan-metrics > div:last-child { border-bottom: 0; }
.pricing-plan-metrics span { display: inline-flex; align-items: center; gap: .4rem; min-width: 0; color: var(--skuze-text-secondary); }
.pricing-plan-metrics span i { color: #7D8A96; }
.pricing-plan-metrics strong { color: var(--skuze-text); font-size: .75rem; font-weight: 700; text-align: right; }
.pricing-metric-custom-icon { width: 1rem; height: 1rem; opacity: .72; filter: grayscale(1); }
.pricing-plan-audience { display: flex; align-items: flex-start; gap: .48rem; min-height: 4rem; color: var(--skuze-text-secondary); font-size: .76rem; line-height: 1.5; }
.pricing-plan-audience i { margin-top: .18rem; color: #0EB295; flex: 0 0 auto; }
.pricing-plan-cta { margin-top: auto; padding-top: .45rem; }
.pricing-plan-cta .btn { min-height: 2.7rem; }

.pricing-explainer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.pricing-explainer-card { display: flex; align-items: flex-start; gap: 1rem; padding: 1.3rem 1.4rem; border: 1px solid var(--skuze-border); border-radius: 1rem; background: #fff; }
.pricing-explainer-card h2 { margin: .05rem 0 .35rem; font-size: .98rem; font-weight: 720; color: var(--skuze-text); }
.pricing-explainer-card p { margin: 0; color: var(--skuze-text-secondary); font-size: .8rem; line-height: 1.62; }

.pricing-comparison { overflow: hidden; border-color: var(--skuze-border); box-shadow: none; }
.pricing-comparison-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 1.4rem 1.5rem 1.1rem; border-bottom: 1px solid var(--skuze-border); }
.pricing-comparison-head h2 { margin: .25rem 0 0; font-size: 1.08rem; color: var(--skuze-text); }
.pricing-comparison-head > span { max-width: 420px; color: var(--skuze-text-muted); font-size: .72rem; text-align: right; }
.pricing-table { min-width: 760px; }
.pricing-table th, .pricing-table td { padding: .82rem 1rem; border-color: var(--skuze-border-soft); font-size: .77rem; text-align: center; }
.pricing-table thead th { background: #FAFCFC; color: var(--skuze-text); font-weight: 720; }
.pricing-table th:first-child { min-width: 230px; text-align: left; padding-left: 1.5rem; }
.pricing-table tbody th { color: var(--skuze-text-secondary); font-weight: 600; }
.pricing-table td { color: var(--skuze-text); }
.pricing-check { display: inline-flex; align-items: center; justify-content: center; width: 1.45rem; height: 1.45rem; border-radius: 999px; background: #EAF8F4; color: #0C9D83; }

.pricing-bottom-cta { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.55rem 1.7rem; border: 1px solid rgba(14,178,149,.18); border-radius: 1.12rem; background: linear-gradient(120deg, #F4FBF9, #FFFFFF); }
.pricing-bottom-cta h2 { margin: .28rem 0 .3rem; font-size: 1.16rem; color: var(--skuze-text); }
.pricing-bottom-cta p { max-width: 720px; margin: 0; color: var(--skuze-text-secondary); font-size: .8rem; line-height: 1.55; }

@media (max-width: 1199.98px) {
    .pricing-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pricing-plan-card-head { min-height: 190px; }
}
@media (max-width: 991.98px) {
    .pricing-hero { grid-template-columns: 1fr; padding: 1.75rem; }
    .pricing-current-main, .pricing-bottom-cta { align-items: flex-start; flex-direction: column; }
    .pricing-current-actions { justify-content: flex-start; }
}
@media (max-width: 767.98px) {
    .page-plans .app-page-topbar { display: none; }
    .pricing-page-shell { padding-top: .25rem; }
    .pricing-hero { padding: 1.35rem; border-radius: 1rem; }
    .pricing-hero h1 { font-size: 2rem; }
    .pricing-plan-grid, .pricing-explainer-grid { grid-template-columns: 1fr; }
    .pricing-plan-card { padding: 1.2rem; }
    .pricing-plan-card-head { min-height: 0; }
    .pricing-plan-tagline { min-height: 0; }
    .pricing-plan-audience { min-height: 0; margin-bottom: .65rem; }
    .pricing-current .card-body { padding: 1.2rem !important; }
    .pricing-current-actions, .pricing-current-actions > *, .pricing-current-actions .btn { width: 100%; }
    .pricing-current-actions form { display: block !important; }
    .pricing-comparison-head { align-items: flex-start; flex-direction: column; padding: 1.15rem; }
    .pricing-comparison-head > span { text-align: left; }
    .pricing-bottom-cta { padding: 1.3rem; }
    .pricing-bottom-cta .btn { width: 100%; }
}

/* v1.1.7.43 — merchant-safe Skuze Credit UX */
.automation-credit-badge{display:inline-flex;align-items:center;gap:.3rem;margin-top:.35rem;padding:.22rem .45rem;border-radius:999px;font-size:.62rem;font-weight:700;line-height:1.1;white-space:nowrap;background:rgba(14,178,149,.09);color:#087c69;border:1px solid rgba(14,178,149,.16)}
.automation-credit-badge.is-free{background:#f5f7f9;color:#667085;border-color:#e5e9ee}
.automation-credit-badge svg,.automation-credit-inline svg,.automation-run-credit svg{width:.8rem;height:.8rem}
.automation-credit-inline{display:flex!important;align-items:center;gap:.25rem;margin-top:.18rem;color:#087c69!important;font-weight:650}
.automation-credit-panel{display:flex;align-items:flex-start;gap:.7rem;margin:0 0 1rem;padding:.75rem .8rem;border:1px solid rgba(14,178,149,.18);background:rgba(14,178,149,.06);border-radius:.85rem;color:#175c51}
.automation-credit-panel.is-free{border-color:#e6eaee;background:#f8fafb;color:#667085}
.automation-credit-panel-icon{display:inline-flex;align-items:center;justify-content:center;width:1.9rem;height:1.9rem;border-radius:.65rem;background:#fff;box-shadow:0 1px 3px rgba(16,24,40,.08);flex:0 0 auto}
.automation-credit-panel strong,.automation-credit-panel small{display:block}.automation-credit-panel small{margin-top:.12rem;font-size:.72rem;line-height:1.4;color:inherit;opacity:.8}
.automation-run-credit{display:inline-flex;align-items:center;gap:.25rem;color:#087c69;font-weight:650}
.pricing-usage-head h2{margin:.25rem 0 .35rem;font-size:1.2rem}.pricing-usage-head p{margin:0;color:#667085;max-width:760px}
.pricing-usage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin-top:1.2rem}.pricing-usage-meter{padding:1rem;border:1px solid #e8ecef;border-radius:1rem;background:#fbfcfc}.pricing-usage-meter>div:first-child{font-size:.86rem;margin-bottom:.65rem}.pricing-usage-meter .progress{height:.5rem;background:#e9efee;margin-bottom:.55rem}.pricing-usage-meter small{color:#667085}.pricing-usage-activity{border-top:1px solid #edf0f2;padding-top:1rem}
@media(max-width:767.98px){.pricing-usage-grid{grid-template-columns:1fr}.pricing-usage-activity .table{min-width:620px}.automation-credit-badge{font-size:.58rem}}

/* v1.1.7.44 — merchant extra-usage controls */
.pricing-overage-control{border-color:rgba(14,178,149,.18)}
.pricing-overage-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1.25rem}
.pricing-overage-head p{max-width:760px;font-size:.8rem;line-height:1.55}
.pricing-overage-price-note{display:flex;flex-direction:column;align-items:flex-end;min-width:150px;padding:.75rem .9rem;border:1px solid var(--skuze-border-soft);border-radius:.85rem;background:#fbfcfc}
.pricing-overage-price-note strong{font-size:1.05rem;color:var(--skuze-text)}
.pricing-overage-price-note span{font-size:.68rem;color:var(--skuze-text-muted)}
.pricing-overage-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem}
.pricing-overage-stat{display:flex;flex-direction:column;gap:.2rem;padding:.85rem .95rem;border:1px solid var(--skuze-border-soft);border-radius:.85rem;background:#fbfcfc}
.pricing-overage-stat span{font-size:.7rem;color:var(--skuze-text-muted)}
.pricing-overage-stat strong{font-size:.95rem;color:var(--skuze-text)}
.pricing-overage-progress{padding:.8rem .95rem;border-radius:.85rem;background:#fbfcfc;border:1px solid var(--skuze-border-soft)}
.pricing-overage-progress .progress{height:.5rem;background:#e9efee}
.pricing-overage-locked{display:flex;align-items:flex-start;gap:.75rem;padding:1rem;border:1px solid #e7ebef;border-radius:.9rem;background:#fafbfc;color:#475467}
.pricing-overage-locked>i,.pricing-overage-locked>svg{margin-top:.15rem;flex:0 0 auto}.pricing-overage-locked strong,.pricing-overage-locked span{display:block}.pricing-overage-locked span{margin-top:.15rem;font-size:.76rem;color:#667085}
.pricing-overage-form{padding-top:.2rem;border-top:1px solid var(--skuze-border-soft)}
.pricing-overage-switch{display:flex;align-items:flex-start;gap:.65rem;padding-left:0}.pricing-overage-switch .form-check-input{margin:.2rem 0 0;flex:0 0 auto}.pricing-overage-switch label{display:block}.pricing-overage-switch label span{display:block;margin-top:.15rem;font-size:.74rem;color:#667085;line-height:1.45}
@media(max-width:991.98px){.pricing-overage-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767.98px){.pricing-overage-head{flex-direction:column}.pricing-overage-price-note{align-items:flex-start;width:100%}.pricing-overage-grid{grid-template-columns:1fr 1fr}}
@media(max-width:479.98px){.pricing-overage-grid{grid-template-columns:1fr}}
