﻿html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans, 'Vazirmatn', 'Figtree', 'Segoe UI', Tahoma, sans-serif);
    background: var(--color-bg, #F3F4F6);
    color: var(--color-text, #111827);
}

html[dir="rtl"], .admin-body--rtl { direction: rtl; text-align: right; }
html[dir="ltr"], .admin-body--ltr { direction: ltr; text-align: left; }

* { box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

/* Shell: sidebar on the inline-start edge (RIGHT in RTL, LEFT in LTR) */
.admin-shell {
    display: grid;
    grid-template-columns: 272px 1fr;
    min-height: 100vh;
    background: var(--color-bg, #F3F4F6);
}

.admin-sidebar {
    background: var(--color-surface, #fff);
    border-inline-end: 1px solid var(--color-border, #E5E7EB);
    padding: 1rem .85rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .65rem .75rem 1rem;
    border-bottom: 1px solid var(--color-border, #E5E7EB);
}
.admin-brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary, #22C55E), var(--color-accent, #0EA5E9));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .85rem;
    box-shadow: 0 8px 18px color-mix(in srgb, var(--color-primary, #22C55E) 28%, transparent);
}
.admin-brand__logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #E5E7EB);
}
.admin-brand__text { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.admin-brand__sub { color: var(--color-muted, #9CA3AF); font-size: .72rem; font-weight: 600; }

.admin-nav-section { margin-top: .35rem; }
.admin-nav-section__title {
    color: var(--color-muted, #9CA3AF);
    font-size: .72rem;
    font-weight: 700;
    padding: .55rem .85rem .35rem;
    letter-spacing: .04em;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.admin-nav a.nav-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .72rem .85rem;
    border-radius: 12px;
    color: var(--color-muted, #4B5563);
    font-weight: 600;
    font-size: .92rem;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
    border: 1px solid transparent;
}
.admin-nav a.nav-item:hover {
    background: var(--color-bg-muted, #F9FAFB);
    color: var(--color-text, #111827);
}
.admin-nav a.nav-item.active {
    background: var(--color-primary-soft, #EFF6FF);
    color: var(--color-primary-deep, #2563EB);
    border-color: var(--color-border-soft, #DBEAFE);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--color-primary, #2563EB) 6%, transparent);
}
.nav-ico {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: currentColor;
}
.nav-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.admin-lang {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .5rem .65rem;
}
.admin-lang a {
    font-size: .72rem;
    font-weight: 700;
    color: var(--color-muted, #6B7280);
    padding: .28rem .5rem;
    border-radius: 8px;
    border: 1px solid var(--color-border, #E5E7EB);
    background: var(--color-surface, #fff);
}
.admin-lang a.is-active,
.admin-lang a:hover {
    color: var(--color-primary-deep, #2563EB);
    background: var(--color-primary-soft, #EFF6FF);
    border-color: var(--color-border-soft, #BFDBFE);
}

.admin-userchip {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .85rem;
    border-top: 1px solid var(--color-border, #E5E7EB);
    border-radius: 14px;
    background: var(--color-bg-muted, #F9FAFB);
}
.admin-userchip__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent, #A78BFA), var(--color-primary, #60A5FA));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .8rem;
}
.admin-userchip__meta { font-size: .78rem; color: var(--color-muted, #6B7280); }
.admin-userchip__name { font-weight: 700; color: var(--color-text, #111827); font-size: .88rem; }

.admin-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--color-surface, #fff);
    border-bottom: 1px solid var(--color-border, #E5E7EB);
    padding: .85rem 1.35rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 20;
}
.admin-nav-check {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.admin-nav-toggle,
.admin-nav-close,
.admin-nav-backdrop,
.admin-sidebar__mobile-head { display: none; }
.admin-search {
    flex: 1;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: .55rem;
    background: var(--color-bg-muted, #F9FAFB);
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: 12px;
    padding: .55rem .85rem;
    color: var(--color-muted, #9CA3AF);
}
.admin-search input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    color: var(--color-text, #111827);
}
.admin-header__actions {
    display: flex;
    align-items: center;
    gap: .55rem;
}
.admin-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--color-border, #E5E7EB);
    background: var(--color-surface, #fff);
    display: grid;
    place-items: center;
    color: var(--color-muted, #4B5563);
    cursor: pointer;
}
.admin-icon-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-content { padding: 1.25rem 1.35rem 2rem; }

.admin-pagehead {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.15rem;
}
.admin-pagehead h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.admin-crumb {
    color: var(--color-muted, #9CA3AF);
    font-size: .82rem;
    margin-top: .25rem;
}
.admin-pagehead__actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: 11px;
    padding: .55rem .95rem;
    font-weight: 700;
    font-size: .88rem;
    border: 1px solid var(--color-border, #E5E7EB);
    background: var(--color-surface, #fff);
    color: var(--color-text, #374151);
    cursor: pointer;
}
.btn-primary {
    background: var(--color-primary, #22C55E);
    border-color: var(--color-primary, #22C55E);
    color: #fff;
    border-radius: var(--button-radius, var(--radius-md, 12px));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--color-primary, #22C55E) 25%, transparent);
}
.btn-primary:hover { filter: brightness(1.03); }
.btn-orange {
    background: #EA580C;
    border-color: #EA580C;
    color: #fff;
    box-shadow: 0 8px 18px color-mix(in srgb, #EA580C 28%, transparent);
}
.btn-orange:hover { filter: brightness(1.05); }
.btn-ghost:hover { background: var(--color-bg-muted, #F9FAFB); }
.btn-danger {
    background: var(--color-danger, #DC2626);
    border-color: var(--color-danger, #DC2626);
    color: #fff;
}
.btn-sm { padding: .35rem .65rem; font-size: .78rem; }

.form-input {
    width: 100%;
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: var(--radius-sm, 8px);
    padding: .45rem .65rem;
    background: var(--color-surface, #fff);
    color: var(--color-text, #111827);
}

/* Theme manager */
.theme-tabs {
    display: flex;
    gap: .5rem;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}
.theme-tabs__btn {
    border: 1px solid var(--color-border, #E5E7EB);
    background: var(--color-surface, #fff);
    border-radius: 999px;
    padding: .55rem 1rem;
    font-weight: 700;
    cursor: pointer;
    color: var(--color-muted, #4B5563);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.theme-tabs__btn.is-active {
    background: var(--color-primary, #22C55E);
    border-color: var(--color-primary, #22C55E);
    color: #fff;
}
.theme-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}
.theme-list__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}
.theme-list__items {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}
.theme-list__items li {
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    padding: .55rem;
    background: var(--color-bg-muted, #F8FAFC);
}
.theme-list__items li.is-selected { border-color: var(--color-primary, #22C55E); }
.theme-list__items li.is-active-theme { box-shadow: inset 3px 0 0 var(--color-success, #22C55E); }
.theme-list__select {
    display: flex;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    padding: .25rem;
}
.theme-list__select em {
    font-style: normal;
    font-size: .72rem;
    color: var(--color-success, #22C55E);
}
.theme-list__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .45rem;
}
.theme-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: end;
    margin-bottom: 1rem;
}
.theme-editor__toolbar label {
    display: grid;
    gap: .3rem;
    font-size: .82rem;
    font-weight: 600;
}
.theme-preview {
    display: block;
    padding: 1rem;
    border-radius: var(--radius-md, 12px);
    background: var(--bg-page, var(--color-bg));
    border: 1px solid var(--color-border, #E5E7EB);
    margin-bottom: 1rem;
    font-family: var(--font-sans);
}
.theme-preview__card {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    padding: 1rem;
}
.theme-preview__title {
    margin: 0 0 .35rem;
    font-family: var(--font-display, var(--font-sans));
    font-weight: 800;
}
.theme-preview__text {
    margin: 0 0 .75rem;
    color: var(--color-muted, #6B7280);
    font-size: .9rem;
}
.theme-preview__swatches {
    display: flex;
    gap: .45rem;
    margin-bottom: .85rem;
}
.theme-preview__swatch {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--color-border, #E5E7EB);
}
.theme-preview__controls {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
}
.theme-scope-hint {
    margin: 0 0 1rem;
    color: var(--color-muted, #6B7280);
    font-size: .88rem;
}
.theme-acc {
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: var(--radius-md, 12px);
    margin-bottom: .75rem;
    background: var(--color-surface, #fff);
}
.theme-acc__head {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    text-align: start;
}
.theme-acc__chev {
    width: .45rem;
    height: .45rem;
    border-inline-end: 2px solid var(--color-muted, #9CA3AF);
    border-bottom: 2px solid var(--color-muted, #9CA3AF);
    transform: rotate(45deg);
    transition: transform .15s ease;
}
.theme-acc.is-open .theme-acc__chev {
    transform: rotate(-135deg);
}
.theme-acc__body { padding: 0 1rem 1rem; }
.theme-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.theme-fields--colors { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.theme-fields label {
    display: grid;
    gap: .35rem;
    font-size: .82rem;
    font-weight: 600;
}
.theme-color-row {
    display: grid;
    gap: .35rem;
}
.theme-color-row__inputs {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: .45rem;
    align-items: center;
}
.theme-fields input[type="color"] {
    width: 100%;
    height: 36px;
    padding: 0;
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: 8px;
    background: var(--color-surface, #fff);
}
.theme-empty { color: var(--color-muted, #6B7280); }
.theme-chrome {
    margin-top: .5rem;
    padding: .75rem 1rem;
}
.theme-chrome__hint { color: var(--color-muted, #6B7280); font-size: .88rem; }
.theme-chrome a { color: var(--color-primary-deep, #2563EB); text-decoration: underline; }
.dash-legend {
    display: flex;
    justify-content: space-around;
    font-size: .82rem;
    color: var(--color-muted, #6B7280);
}
.dash-mod-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dash-mod-list li {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--color-border, #F3F4F6);
}
.dash-mod-list li:last-child { border-bottom: 0; }
.dash-muted { color: var(--color-muted, #9CA3AF); }
.dash-health { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.dash-health li { padding: .45rem 0; display: flex; justify-content: space-between; }

.theme-sections details {
    display: none;
}

/* Semantic buttons + controls */
.vs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--button-radius, var(--radius-md, 12px));
    padding: .55rem 1rem;
    font-weight: 700;
    cursor: pointer;
}
.vs-btn--success { background: var(--color-success, #22C55E); color: #fff; }
.vs-btn--warning { background: var(--color-warning, #D97706); color: #fff; }
.vs-btn--danger { background: var(--color-danger, #DC2626); color: #fff; }
[data-button-style="pill"] .vs-btn,
.theme-preview[style*="--button-style:pill"] .vs-btn,
.vs-btn { border-radius: calc(var(--radius-md, 12px) * 1); }
.vs-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
}
.vs-check input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--color-primary, #22C55E);
}
.vs-check--rounded input { border-radius: 4px; }
.vs-check--square input { border-radius: 0; }
.vs-check--filled input:checked { accent-color: var(--color-primary-deep, #10B981); }
.vs-switch {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    cursor: pointer;
}
.vs-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.vs-switch span {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: var(--color-border, #E5E7EB);
    position: relative;
    transition: background var(--motion-duration, 280ms) var(--motion-easing, ease);
}
.vs-switch span::after {
    content: "";
    position: absolute;
    inset-block: 3px;
    inset-inline-start: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: inset-inline-start var(--motion-duration, 280ms) var(--motion-easing, ease);
}
.vs-switch input:checked + span { background: var(--color-primary, #22C55E); }
.vs-switch input:checked + span::after { inset-inline-start: 21px; }
.vs-switch--material span { border-radius: 6px; }
.vs-switch--minimal span { height: 8px; margin-block: 8px; }
.vs-switch--minimal span::after { inset-block: -5px; }

.sv-alert {
    border-radius: var(--radius-md, 12px);
    padding: .9rem 1.1rem;
    margin: 1rem 0;
}
.sv-alert--ok {
    background: var(--color-success-soft, var(--color-primary-soft));
    color: var(--color-success, var(--color-primary-deep));
    border: 1px solid color-mix(in srgb, var(--color-success, #22C55E) 25%, transparent);
}
.sv-alert--err {
    background: var(--color-danger-soft, #fef2f2);
    color: var(--color-danger, #b91c1c);
    border: 1px solid color-mix(in srgb, var(--color-danger, #fecaca) 40%, transparent);
}

@media (max-width: 980px) {
    .theme-layout { grid-template-columns: 1fr; }
    .theme-fields,
    .theme-fields--colors { grid-template-columns: 1fr; }
}

.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .9rem;
    margin-bottom: 1rem;
}
.kpi-card {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: 16px;
    padding: 1rem 1.05rem;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
    display: flex;
    gap: .85rem;
    align-items: flex-start;
}
.kpi-ico {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    font-weight: 800;
    font-size: .8rem;
    color: #fff;
}
.kpi-ico.pink { background: var(--color-danger, #DC2626); }
.kpi-ico.green { background: var(--color-success, #16A34A); }
.kpi-ico.purple { background: var(--color-secondary, #0F172A); }
.kpi-ico.blue { background: var(--color-primary, #22C55E); }
.kpi-label { color: var(--color-muted, #6B7280); font-size: .82rem; margin: 0 0 .2rem; }
.kpi-value { font-size: 1.45rem; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.kpi-trend { font-size: .75rem; font-weight: 700; margin-top: .3rem; }
.kpi-trend.up { color: var(--color-success, #16A34A); }
.kpi-trend.down { color: var(--color-danger, #DC2626); }

.dash-grid {
    display: grid;
    grid-template-columns: .9fr 1.4fr;
    gap: .9rem;
    margin-bottom: .9rem;
}
.dash-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1.1fr 1fr;
    gap: .9rem;
    margin-bottom: .9rem;
}
.dash-grid-bottom {
    display: grid;
    grid-template-columns: .85fr 1.6fr;
    gap: .9rem;
}

.admin-card {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: 16px;
    padding: 1.1rem;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
}
.admin-card h3 {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 800;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    padding-top: .5rem;
}
.chart-bars span {
    flex: 1;
    border-radius: 8px 8px 4px 4px;
    background: linear-gradient(180deg, var(--color-accent, #38BDF8), var(--color-primary, #6366F1));
    opacity: .9;
    min-width: 0;
}
.chart-bars--week span {
    background: linear-gradient(180deg, var(--color-success, #34D399), var(--color-accent, #0EA5E9));
}
.donut {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: conic-gradient(var(--color-primary, #38BDF8) 0 62%, var(--color-accent, #F472B6) 62% 100%);
    display: grid;
    place-items: center;
    position: relative;
}
.donut::after {
    content: attr(data-center);
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--color-surface, #fff);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.05rem;
}

.table-wrap { overflow: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.admin-table th {
    text-align: start;
    color: var(--color-muted, #6B7280);
    font-weight: 700;
    padding: .65rem .5rem;
    border-bottom: 1px solid var(--color-border, #F3F4F6);
    white-space: nowrap;
}
.admin-table td {
    padding: .7rem .5rem;
    border-bottom: 1px solid var(--color-bg-muted, #F9FAFB);
    vertical-align: middle;
}
.admin-table tr:hover td { background: var(--color-bg-muted, #F9FAFB); }

.pill {
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}
.pill-blue { background: var(--color-primary-soft, #DBEAFE); color: var(--color-primary-deep, #1D4ED8); }
.pill-green { background: var(--color-success-soft, #DCFCE7); color: var(--color-success, #15803D); }
.pill-purple { background: color-mix(in srgb, var(--color-accent, #A78BFA) 18%, var(--color-surface, #fff)); color: var(--color-accent, #6D28D9); }
.pill-orange { background: var(--color-warning-soft, #FFEDD5); color: var(--color-warning, #C2410C); }
.pill-gray { background: var(--color-bg-muted, #F3F4F6); color: var(--color-muted, #4B5563); }
.pill-red { background: var(--color-danger-soft, #FEE2E2); color: var(--color-danger, #B91C1C); }

.form-row { display: grid; gap: .75rem; margin-bottom: 1rem; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.field label { display: block; font-weight: 700; font-size: .82rem; margin-bottom: .35rem; color: var(--color-text, #374151); }
.field input, .field select {
    width: 100%;
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: 11px;
    padding: .65rem .8rem;
    background: var(--color-surface, #fff);
}
.field input:focus, .field select:focus {
    outline: none;
    border-color: #93C5FD;
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.role-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.role-checks label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    padding: .35rem .7rem;
    font-size: .8rem;
    font-weight: 600;
    background: #fff;
    cursor: pointer;
}
.msg-ok { color: #15803D; font-weight: 700; margin: .5rem 0; }
.msg-err { color: #B91C1C; font-weight: 700; margin: .5rem 0; }

.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: .85rem;
}
.perm-card {
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 1rem;
    background: #fff;
}
.perm-card h4 { margin: 0 0 .35rem; font-size: .95rem; }
.perm-card p { margin: 0 0 .75rem; color: #6B7280; font-size: .82rem; }
.perm-card ul { margin: 0; padding: 0; list-style: none; }
.perm-card li {
    font-size: .78rem;
    color: #374151;
    padding: .25rem 0;
    border-top: 1px dashed #F3F4F6;
    font-family: ui-monospace, Consolas, monospace;
}

/* Page builder */
.builder-stats .kpi-card__value { font-size: 1.6rem; }
.builder-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: .85rem;
    flex-wrap: wrap;
}
.builder-search {
    max-width: 280px;
    width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 11px;
    padding: .55rem .8rem;
    background: #fff;
}
.builder-muted { color: #9CA3AF; font-size: .75rem; margin-top: .2rem; }
.builder-slug {
    font-size: .82rem;
    background: #F3F4F6;
    padding: .2rem .45rem;
    border-radius: 6px;
    color: #374151;
}
.builder-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.builder-empty { text-align: center; color: #9CA3AF; padding: 2rem .5rem !important; }
.btn-sm { padding: .4rem .7rem; font-size: .8rem; border-radius: 9px; }
.builder-link {
    background: none;
    border: none;
    color: #2563EB;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}
.builder-editor-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .85rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
}
.builder-editor-bar__left,
.builder-editor-bar__right {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}
.builder-select {
    border: 1px solid #E5E7EB;
    border-radius: 9px;
    padding: .35rem .55rem;
    margin-inline-start: .35rem;
}
.builder-check {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    font-weight: 600;
    color: #4B5563;
    cursor: pointer;
}
.builder-workspace {
    display: grid;
    grid-template-columns: 200px 200px minmax(0, 1fr) 260px;
    gap: .85rem;
    align-items: start;
    min-height: 70vh;
}
.builder-panel { padding: .9rem; max-height: calc(100vh - 180px); overflow: auto; }
.builder-panel h3 { margin: 0 0 .35rem; font-size: .95rem; }
.builder-hint { margin: 0 0 .75rem; color: #9CA3AF; font-size: .75rem; line-height: 1.45; }
.builder-palette { display: flex; flex-direction: column; gap: .35rem; }
.builder-widget {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    text-align: start;
    border: 1px dashed #D1D5DB;
    background: #F9FAFB;
    border-radius: 10px;
    padding: .5rem .65rem;
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    cursor: grab;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.builder-widget:hover {
    border-color: #86EFAC;
    background: #F0FDF4;
    box-shadow: 0 2px 8px rgba(34,197,94,.12);
}
.builder-widget__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22C55E;
    flex-shrink: 0;
}
.builder-nav { display: flex; flex-direction: column; gap: .2rem; }
.builder-nav__item {
    border: none;
    background: transparent;
    text-align: start;
    padding: .45rem .55rem;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    color: #4B5563;
    cursor: pointer;
}
.builder-nav__item:hover { background: #F3F4F6; }
.builder-nav__item.is-active { background: #ECFDF5; color: #15803D; }
.builder-nav__nested { padding-inline-start: .75rem; display: flex; flex-direction: column; gap: .15rem; }
.builder-canvas-wrap { padding: 1rem; }
.builder-canvas-head,
.builder-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}
.builder-canvas {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: .75rem;
    min-height: 220px;
    border: 2px dashed #E5E7EB;
    border-radius: 14px;
    background:
        linear-gradient(180deg, #FAFBFC 0%, #F3F4F6 100%);
}
.builder-dropzone {
    display: grid;
    place-items: center;
    min-height: 160px;
    color: #9CA3AF;
    font-weight: 600;
    font-size: .9rem;
    text-align: center;
    padding: 1rem;
}
.builder-block {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    margin: 0 0 .55rem;
    padding: .65rem .75rem;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.builder-block:hover { border-color: #A7F3D0; }
.builder-block.is-selected {
    border-color: #22C55E;
    box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}
.builder-block__bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}
.builder-block__type {
    font-weight: 800;
    font-size: .82rem;
    color: #111827;
    background: #ECFDF5;
    color: #166534;
    padding: .2rem .5rem;
    border-radius: 6px;
}
.builder-block__text {
    flex: 1;
    min-width: 0;
    color: #6B7280;
    font-size: .82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.builder-block__ops { display: flex; gap: .2rem; margin-inline-start: auto; }
.btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    color: #4B5563;
}
.btn-icon:hover:not(:disabled) { background: #F3F4F6; }
.btn-icon:disabled { opacity: .4; cursor: not-allowed; }
.builder-children {
    list-style: none;
    margin: .55rem 0 0;
    padding: 0;
    border-top: 1px dashed #F3F4F6;
    padding-top: .45rem;
}
.builder-child {
    display: flex;
    gap: .5rem;
    align-items: center;
    padding: .4rem .5rem;
    border-radius: 8px;
    font-size: .78rem;
    color: #6B7280;
    margin-bottom: .2rem;
}
.builder-child strong { color: #374151; }
.builder-child.is-selected { background: #ECFDF5; }
.builder-preview {
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 1.1rem;
    background: #fff;
    min-height: 120px;
}
.builder-json {
    width: 100%;
    min-height: 120px;
    margin-top: .85rem;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: .75rem;
    font-family: ui-monospace, Consolas, monospace;
    font-size: .78rem;
    direction: ltr;
}
.builder-hr {
    border: none;
    border-top: 1px solid #F3F4F6;
    margin: 1rem 0;
}
.builder-revisions { margin-top: .65rem; display: flex; flex-direction: column; gap: .4rem; }
.builder-rev {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .45rem .5rem;
    background: #F9FAFB;
    border-radius: 10px;
    font-size: .8rem;
}

@media (max-width: 1400px) {
    .builder-workspace {
        grid-template-columns: 180px minmax(0, 1fr) 240px;
    }
    .builder-workspace > aside:nth-child(2) { display: none; }
}
@media (max-width: 1100px) {
    .builder-workspace { grid-template-columns: 1fr; }
    .builder-panel { max-height: none; }
}

@media (max-width: 1200px) {
    .kpi-row { grid-template-columns: repeat(2, 1fr); }
    .dash-grid, .dash-grid-3, .dash-grid-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    html, body.admin-body {
        overflow-x: clip;
        max-width: 100%;
    }
    html:has(#admin-nav-check:checked) {
        overflow: hidden;
    }
    .admin-shell {
        grid-template-columns: minmax(0, 1fr);
        min-height: 100dvh;
        overflow-x: clip;
    }
    .admin-main { min-width: 0; max-width: 100%; }
    .admin-nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        border: 1px solid #E5E7EB;
        border-radius: 10px;
        background: #fff;
        padding: 0;
        cursor: pointer;
    }
    .admin-nav-toggle span {
        display: block;
        width: 18px;
        height: 2px;
        margin-inline: auto;
        background: #111827;
        border-radius: 2px;
    }
    .admin-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 40;
    }
    .admin-nav-check:checked ~ .admin-nav-backdrop { display: block; }
    /* Drawer hangs off inline-start (right in RTL). Do not pin inset-inline-end â€” in RTL that is the LEFT edge. */
    .admin-sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        inset-inline-end: auto;
        width: min(272px, 86vw);
        height: 100dvh;
        z-index: 50;
        transform: translate3d(-110%, 0, 0);
        visibility: hidden;
        pointer-events: none;
        transition: transform .22s ease, visibility .22s ease;
        border-inline-end: 1px solid #E5E7EB;
        border-bottom: none;
        box-shadow: none;
    }
    html[dir="rtl"] .admin-sidebar,
    .admin-body--rtl .admin-sidebar,
    .admin-shell[dir="rtl"] .admin-sidebar {
        transform: translate3d(110%, 0, 0);
    }
    .admin-nav-check:checked ~ .admin-sidebar {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        pointer-events: auto;
        box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
    }
    .admin-sidebar__mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: .35rem .75rem .75rem;
        font-weight: 800;
    }
    .admin-nav-close {
        display: inline-grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background: #F3F4F6;
        cursor: pointer;
        font-size: 1.4rem;
        line-height: 1;
        color: #4B5563;
    }
    .admin-header {
        padding: .7rem .75rem;
        gap: .45rem;
    }
    .admin-header__actions .admin-icon-btn { display: none; }
    .admin-search {
        min-width: 0;
        max-width: none;
        padding: .45rem .65rem;
    }
    .admin-search input { font-size: 1rem; }
    .admin-pagehead {
        flex-wrap: wrap;
        gap: .75rem;
    }
    .admin-pagehead h1 { font-size: 1.25rem; }
    .admin-pagehead__actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .kpi-row { grid-template-columns: 1fr; }
    .admin-content { padding: .85rem .75rem 1.4rem; }
    .form-row.cols-2,
    .form-row.cols-3 { grid-template-columns: 1fr; }
    .fb-action-row { grid-template-columns: 1fr; }
    .admin-table th,
    .admin-table td { white-space: nowrap; }
    input, select, textarea { max-width: 100%; }
}

@media (max-width: 560px) {
    .admin-search { display: none; }
    .admin-header__actions .admin-userchip__avatar {
        width: 32px;
        height: 32px;
        font-size: .72rem;
    }
    .admin-pagehead__actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .admin-pagehead__actions .btn {
        width: 100%;
        justify-content: center;
    }
    .kpi-card { padding: .85rem .8rem; }
    .kpi-value { font-size: 1.25rem; }
    .chart-bars { gap: 4px; height: 120px; }
}

/* Row modal + visual columns */
.builder-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.builder-modal {
    width: min(560px, 100%);
    background: #fff;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 24px 48px rgba(15,23,42,.18);
    padding: 1.25rem 1.35rem;
}
.builder-modal h3 { margin: 0 0 .35rem; font-size: 1.1rem; font-weight: 800; }
.builder-modal__hint { color: #6B7280; font-size: .82rem; margin: 0 0 1rem; }
.builder-modal__actions {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.builder-span-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: .65rem;
}
.builder-span-grid .field input[readonly] {
    background: #F3F4F6;
    color: #15803D;
    font-weight: 700;
}
.builder-modal__error {
    color: #B91C1C;
    font-weight: 700;
    font-size: .85rem;
    margin-top: .5rem;
}

.builder-row-visual {
    display: flex;
    gap: .45rem;
    width: 100%;
    margin-top: .55rem;
    min-height: 110px;
}
.builder-col-slot {
    position: relative;
    border: 2px solid #EF4444;
    border-radius: 10px;
    background: rgba(239, 68, 68, .04);
    min-height: 100px;
    padding: .45rem .4rem 1.4rem;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.builder-col-slot.is-selected,
.builder-col-slot.is-drop-target:hover {
    border-color: #22C55E;
    background: rgba(34, 197, 94, .06);
    box-shadow: 0 0 0 2px rgba(34,197,94,.15);
}
.builder-col-slot__badge {
    position: absolute;
    top: .3rem;
    inset-inline-start: .35rem;
    font-size: .68rem;
    font-weight: 800;
    color: #B91C1C;
    background: #fff;
    border: 1px solid #FECACA;
    border-radius: 6px;
    padding: .1rem .35rem;
}
.builder-col-remove {
    position: absolute;
    bottom: .3rem;
    inset-inline-end: .3rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: #EF4444;
    color: #fff;
    font-weight: 800;
    font-size: .85rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 2;
}
.builder-col-remove:hover { filter: brightness(1.08); }
.builder-col-slot__drop {
    min-height: 64px;
    border: 1px dashed rgba(239,68,68,.35);
    border-radius: 8px;
    margin-top: 1.35rem;
    padding: .35rem;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}
.builder-col-slot__empty {
    color: #9CA3AF;
    font-size: .75rem;
    text-align: center;
    padding: 1rem .25rem;
}
.builder-col-item {
    display: flex;
    align-items: center;
    gap: .35rem;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: .35rem .45rem;
    font-size: .75rem;
    cursor: pointer;
}
.builder-col-item.is-selected {
    border-color: #22C55E;
    box-shadow: 0 0 0 2px rgba(34,197,94,.18);
}
.builder-col-item__remove {
    margin-inline-start: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: #EF4444;
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
}
.builder-image-preview {
    width: 100%;
    max-height: 140px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    margin: .35rem 0 .65rem;
    background: #F9FAFB;
}
.builder-upload-row {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin-bottom: .75rem;
}

/* Form builder */
.fb-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; }
.fb-meta { margin-bottom: 1rem; padding: 1rem 1.1rem; }
.fb-meta__checks { display: flex; align-items: end; min-height: 100%; padding-bottom: .15rem; }
.fb-req { color: var(--color-danger, #DC2626); }
.fb-list__head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.fb-list__head h3 { margin: 0; }
.fb-empty { margin: 0; font-size: .85rem; }
.fb-form-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; max-height: 70vh; overflow: auto; }
.fb-form-list__item {
    width: 100%; text-align: start; border: 1px solid var(--color-border, #E5E7EB); background: var(--color-bg-muted, #F9FAFB);
    border-radius: var(--radius-md, 10px); padding: .55rem .65rem; cursor: pointer; color: var(--color-text, #374151);
    display: flex; flex-direction: column; gap: .15rem;
}
.fb-form-list__item strong { font-size: .88rem; }
.fb-form-list__item small { color: var(--color-muted, #9CA3AF); font-size: .72rem; direction: ltr; }
.fb-form-list__item:hover { background: var(--color-primary-soft, #F3F4F6); border-color: var(--color-border, #D1D5DB); }
.fb-form-list__item.is-active {
    background: var(--color-primary-soft, #ECFDF5);
    border-color: var(--color-primary, #86EFAC);
    color: var(--color-primary-deep, #166534);
}
.fb-tabs { display: flex; gap: .35rem; margin-bottom: .75rem; flex-wrap: wrap; }
.fb-tabs__btn {
    border: 1px solid var(--color-border, #E5E7EB); background: var(--color-surface, #fff); border-radius: 999px; padding: .4rem .95rem;
    font-weight: 700; cursor: pointer; color: var(--color-muted, #4B5563);
}
.fb-tabs__btn.is-active {
    background: var(--color-primary, #111827); color: #fff; border-color: var(--color-primary, #111827);
}
.fb-design { display: grid; grid-template-columns: 200px minmax(0, 1fr) 280px; gap: .75rem; align-items: start; }
.fb-hint { margin: 0 0 .65rem; font-size: .78rem; line-height: 1.45; }
.fb-palette__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.fb-palette__btn {
    border: 1px dashed var(--color-border, #D1D5DB); background: var(--color-surface, #fff); border-radius: 8px; padding: .45rem .3rem; font-size: .78rem;
    font-weight: 700; cursor: grab; color: var(--color-text, #374151);
}
.fb-palette__btn:hover {
    border-color: var(--color-primary, #22C55E);
    background: var(--color-primary-soft, #F0FDF4);
}
.fb-check { display: flex; align-items: center; gap: .45rem; font-size: .85rem; margin: .45rem 0; }
.fb-canvas-wrap { display: flex; flex-direction: column; gap: var(--fb-row-gap, .75rem); }
.fb-row {
    border: 1px solid var(--color-border, #E5E7EB); border-radius: var(--radius-md, 12px);
    background: var(--color-surface, #fff); overflow: hidden; position: relative;
}
.fb-row.is-active { border-color: var(--color-primary, #22C55E); box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary, #22C55E) 18%, transparent); }
.fb-row__bar {
    display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem .7rem;
    background: var(--color-bg-muted, #F9FAFB); border-bottom: 1px solid var(--color-border, #E5E7EB);
    font-weight: 700; font-size: .8rem; flex-wrap: wrap;
}
.fb-row__cols { display: flex; gap: .5rem; padding: .65rem; min-height: 110px; }
.fb-col {
    position: relative; border: 2px dashed var(--color-border, #E5E7EB); border-radius: var(--radius-md, 10px); padding: .65rem .5rem .45rem;
    background: linear-gradient(180deg, var(--color-surface, #FAFBFC), var(--color-bg-muted, #F3F4F6)); min-height: 100px; cursor: pointer;
}
.fb-col.is-target {
    border-color: var(--color-primary, #22C55E);
    background: var(--color-primary-soft, #F0FDF4);
}
.fb-col__badge {
    position: absolute; top: .3rem; inset-inline-end: .35rem; font-size: .65rem; font-weight: 800;
    color: var(--color-muted, #6B7280); background: var(--color-surface, #fff); border-radius: 6px; padding: 0 .3rem;
    border: 1px solid var(--color-border, #E5E7EB);
}
.fb-col__tools { display: flex; flex-wrap: wrap; gap: .2rem; margin-bottom: .35rem; }
.fb-col__target {
    font-size: .68rem; font-weight: 800; color: var(--color-primary-deep, #15803D); margin-bottom: .35rem;
}
.fb-col__hint { margin-top: .4rem; color: var(--color-muted, #9CA3AF); font-size: .68rem; font-weight: 600; text-align: center; }
.fb-field-chip {
    display: flex; align-items: center; gap: .4rem; background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: 8px; padding: .4rem .5rem; margin-bottom: .35rem; cursor: pointer; position: relative;
}
.fb-field-chip__text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.fb-field-chip__text strong { font-size: .8rem; }
.fb-field-chip__text small { color: var(--color-muted, #9CA3AF); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-field-chip.is-active {
    border-color: var(--color-primary, #22C55E);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary, #22C55E) 15%, transparent);
}
.fb-layer-btns { display: flex; align-items: center; gap: .15rem; flex-shrink: 0; }
.fb-shape-select {
    max-width: 7.5rem; font-size: .72rem; padding: .15rem .3rem; border-radius: 6px;
    border: 1px solid var(--color-border, #E5E7EB); background: var(--color-surface, #fff);
}
.fb-minus {
    width: 20px; height: 20px; border: none; border-radius: 50%; background: var(--color-danger, #EF4444); color: #fff;
    font-weight: 800; cursor: pointer; flex-shrink: 0; line-height: 1;
}
.fb-shape-rect { border-radius: 0 !important; }
.fb-shape-rounded { border-radius: var(--radius-md, 12px) !important; }
.fb-shape-soft { border-radius: var(--radius-lg, 16px) !important; }
.fb-shape-pill { border-radius: 999px !important; }
.fb-shape-circle { border-radius: 50% !important; }
.fb-shape-oval { border-radius: 50% / 40% !important; }
.fb-shape-diamond { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.fb-shape-hexagon { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }
.fb-shape-triangle { clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.fb-preview { margin-top: .75rem; }
.builder-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: .65rem; }
.fb-preview__spacing {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-bottom: .85rem;
    padding: .75rem .85rem;
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--color-border, #E2E8F0);
    background: var(--color-bg-muted, #F8FAFC);
}
.fb-preview__spacing .field { margin: 0; }
.fb-preview__spacing label { font-size: .78rem; font-weight: 700; color: var(--color-muted, #64748B); }
.fb-preview__surface {
    background:
      radial-gradient(1200px 400px at 10% -10%, color-mix(in srgb, var(--color-primary, #22C55E) 16%, transparent), transparent 60%),
      var(--color-bg, #FCFDFE);
    border-radius: var(--radius-xl, 20px);
    border: 1px solid var(--color-border, #E2E8F0);
    padding: 1.35rem 1.1rem 1.6rem;
    box-shadow: var(--shadow-md, 0 8px 24px rgba(15, 23, 42, .06));
}
.fb-preview__frame {
    max-width: 760px;
    margin-inline: auto;
}
.fb-preview__body {
    padding: 1.35rem 1.45rem 1.5rem;
    background: var(--color-surface, #fff);
    border-radius: var(--radius-lg, 16px);
    border: 1px solid var(--color-border, #E5E7EB);
    color: var(--color-text, #0F172A);
    box-shadow: var(--shadow-lg, 0 14px 36px rgba(15, 23, 42, .1));
}
.fb-preview__body .vs-form { pointer-events: none; }
.fb-preview__surface .vs-form {
  display: flex !important;
  flex-direction: column !important;
  gap: var(--vs-form-row-gap, 0.5cm) !important;
  margin: var(--vs-form-margin, 0.5cm) !important;
  color: var(--color-text, #0F172A);
}
.fb-preview__surface .vs-form-row {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  background: transparent;
  border: none;
  box-sizing: border-box;
  position: relative;
}
.fb-preview__surface .vs-form-col {
  box-sizing: border-box;
  min-width: 0;
  background: transparent;
  border: none;
  position: relative;
  display: flex !important;
  flex-direction: column !important;
}
.fb-preview__surface .vs-form-field {
  margin: 0 !important;
  box-sizing: border-box;
  box-shadow: 0 1px 3px color-mix(in srgb, var(--color-text, #0F172A) 8%, transparent);
}
.fb-preview__surface .vs-form-shape-rect { border-radius: 0; }
.fb-preview__surface .vs-form-shape-rounded { border-radius: var(--radius-md, 12px); }
.fb-preview__surface .vs-form-shape-soft { border-radius: var(--radius-lg, 16px); }
.fb-preview__surface .vs-form-shape-pill { border-radius: 999px; }
.fb-preview__surface .vs-form-shape-circle { border-radius: 50%; }
.fb-preview__surface .vs-form-shape-oval { border-radius: 50% / 40%; }
.fb-preview__surface .vs-form-shape-diamond { clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); }
.fb-preview__surface .vs-form-shape-hexagon { clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); }
.fb-preview__surface .vs-form-shape-triangle { clip-path: polygon(50% 0%, 100% 100%, 0% 100%); }
.fb-preview__surface .vs-form-label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .92rem; }
.fb-preview__surface .vs-form input,
.fb-preview__surface .vs-form textarea,
.fb-preview__surface .vs-form select {
  width: 100%;
  padding: .65rem .85rem;
  border: 1px solid var(--color-border, #D1D5DB);
  border-radius: var(--radius-md, 10px);
  background: var(--color-bg-muted, #F8FAFC);
  color: var(--color-text, #0F172A);
}
.fb-preview__surface .vs-form-hint { color: var(--color-muted, #64748B); }
.fb-preview__surface .vs-form__actions { margin-top: .25rem; display: flex; justify-content: flex-start; }
.fb-preview__surface .vs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary, #22C55E);
  color: #fff !important;
  border: none;
  border-radius: var(--radius-md, 10px);
  padding: .8rem 1.55rem;
  font-weight: 700;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--color-primary, #22C55E) 28%, transparent);
}
.fb-preview__surface .vs-button--primary { background: var(--color-primary, #22C55E); }
.fb-inspector-section { margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--color-border, #E5E7EB); }
.fb-inspector-section h4 { margin: 0 0 .55rem; font-size: .9rem; }
.fb-bg-row { display: flex; align-items: center; gap: .5rem; }
.fb-image-thumb {
    margin: .35rem 0 .75rem;
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: var(--radius-md, 10px);
    overflow: hidden;
    background: var(--color-bg-muted, #F8FAFC);
    max-width: 100%;
}
.fb-image-thumb img { display: block; width: 100%; max-height: 140px; object-fit: contain; }
@media (max-width: 900px) {
  .fb-preview__spacing { grid-template-columns: 1fr; }
}
.fb-action-row { display: grid; grid-template-columns: 190px 1fr; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.fb-action-row input { width: 100%; }
.fb-style-panel h3, .fb-style-panel h4 { margin-top: 0; }
.fb-style-panel h4 { margin: 1.25rem 0 .5rem; font-size: .95rem; }
.fb-subs-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.fb-inspector h4 { margin: 1rem 0 .5rem; font-size: .9rem; }
@media (max-width: 1200px) {
    .fb-shell, .fb-design { grid-template-columns: 1fr; }
}

/* Menu builder */
.mb-meta { margin-bottom: 1rem; padding: 1rem 1.1rem; }
.mb-meta__seo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px dashed #E5E7EB;
}
.mb-meta__seo .field { margin: 0; }
.mb-meta__schema { margin: 0 0 .35rem; white-space: nowrap; }
.mb-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; }
.mb-list { position: sticky; top: 1rem; }
.mb-delete { width: 100%; margin-top: .75rem; color: #B91C1C; }
.mb-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.mb-presets h3 { margin: 0 0 .35rem; }
.mb-presets__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .65rem;
}
.mb-preset-card {
    text-align: start;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    border-radius: 12px;
    padding: .75rem .85rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    color: #374151;
}
.mb-preset-card strong { font-size: .9rem; }
.mb-preset-card span { font-size: .75rem; color: #6B7280; line-height: 1.4; }
.mb-preset-card:hover { border-color: #22C55E; background: #F0FDF4; }
.mb-preset-card--ghost { border-style: dashed; background: #fff; }
.mb-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: .75rem;
    align-items: start;
}
.mb-tree-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.mb-tree-list--nested { margin-top: .35rem; padding-inline-start: .85rem; border-inline-start: 2px solid #E5E7EB; }
.mb-node__row { display: flex; align-items: center; gap: .35rem; }
.mb-node__select {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: .45rem;
    border: 1px solid #E5E7EB; background: #fff; border-radius: 10px;
    padding: .45rem .6rem; cursor: pointer; text-align: start; color: #374151;
}
.mb-node.is-active > .mb-node__row > .mb-node__select {
    border-color: #22C55E; box-shadow: 0 0 0 2px rgba(34,197,94,.15);
}
.mb-node__select strong { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-node__ops { display: flex; gap: .15rem; flex-shrink: 0; }
.mb-type {
    font-size: .65rem; font-weight: 800; border-radius: 999px; padding: .15rem .45rem;
    background: #F3F4F6; color: #4B5563; flex-shrink: 0;
}
.mb-type--mega { background: #DBEAFE; color: #1D4ED8; }
.mb-type--image { background: #FCE7F3; color: #BE185D; }
.mb-type--simple { background: #ECFDF5; color: #166534; }
.mb-seo-pill { background: #FEF3C7; color: #92400E; font-size: .65rem; }
.mb-inspector-wrap { position: sticky; top: 1rem; padding: 0; overflow: hidden; }
.mb-inspector { padding: 1rem 1.05rem; }
.mb-inspector__head {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    margin-bottom: .65rem;
}
.mb-inspector__head h3 { margin: 0; font-size: 1rem; }
.mb-inspector__empty {
    text-align: center; padding: 1.5rem .75rem; color: #6B7280;
}
.mb-inspector__empty-icon {
    width: 48px; height: 48px; margin: 0 auto .75rem; border-radius: 12px;
    background: #F3F4F6; display: grid; place-items: center; font-size: 1.25rem; color: #9CA3AF;
}
.mb-inspector__empty p { margin: 0 0 .35rem; font-size: .9rem; color: #374151; }
.mb-inspector__tabs {
    display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .85rem;
    padding: .25rem; background: #F3F4F6; border-radius: 10px;
}
.mb-inspector__tabs button {
    border: none; background: transparent; border-radius: 8px;
    padding: .35rem .55rem; font-size: .78rem; font-weight: 700;
    color: #6B7280; cursor: pointer;
}
.mb-inspector__tabs button.is-active {
    background: #fff; color: #111827; box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.mb-inspector h4 { margin: 1rem 0 .5rem; font-size: .9rem; }
.mb-inspector .field { margin-bottom: .65rem; }
.mb-inspector__actions {
    display: flex; flex-wrap: wrap; gap: .4rem;
    margin-top: .95rem; padding-top: .75rem; border-top: 1px solid #E5E7EB;
}
.mb-link-field__url {
    margin: .35rem 0 0; font-size: .72rem; color: #6B7280;
    word-break: break-all;
}
.mb-seo-warn { margin: .35rem 0 0; font-size: .78rem; color: #B45309; }
.mb-seo-hints {
    list-style: none; margin: .75rem 0 0; padding: 0;
    display: flex; flex-direction: column; gap: .35rem;
}
.mb-seo-hints li {
    font-size: .78rem; border-radius: 8px; padding: .45rem .55rem;
    background: #F9FAFB; color: #4B5563;
}
.mb-seo-hints li.is-err { background: #FEF2F2; color: #B91C1C; }
.mb-seo-hints li.is-warn { background: #FFFBEB; color: #92400E; }
.mb-seo-hints li.is-ok { background: #F0FDF4; color: #166534; }
.mb-preview__bar {
    display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start;
    padding: .85rem; background: #F9FAFB; border-radius: 12px; border: 1px solid #E5E7EB;
    min-height: 72px;
}
.mb-preview__item { position: relative; }
.mb-preview__top {
    display: inline-flex; align-items: center; gap: .35rem;
    border: none; background: transparent; font-weight: 700; color: #111827; cursor: pointer;
    padding: .35rem .55rem; border-radius: 8px;
}
.mb-preview__top:hover { background: #fff; }
.mb-preview__badge {
    font-style: normal; font-size: .65rem; background: #FEF3C7; color: #92400E;
    border-radius: 999px; padding: .1rem .4rem;
}
.mb-preview__drop {
    list-style: none; margin: .35rem 0 0; padding: .4rem .55rem;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 10px; min-width: 140px;
}
.mb-preview__drop li { font-size: .8rem; padding: .2rem 0; color: #4B5563; }
.mb-preview__mega {
    margin-top: .4rem; padding: .75rem; background: #fff; border: 1px solid #E5E7EB;
    border-radius: 12px; display: grid; grid-template-columns: 1fr 180px; gap: .75rem; min-width: 420px;
}
.mb-preview__mega-cols {
    display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: .65rem;
}
.mb-preview__col { display: flex; flex-direction: column; gap: .2rem; }
.mb-preview__col strong { font-size: .8rem; }
.mb-preview__col span { font-size: .72rem; color: #6B7280; }
.mb-preview__featured {
    border-radius: 10px; background: #F3F4F6; padding: .55rem; display: flex; flex-direction: column; gap: .35rem;
}
.mb-preview__featured img { width: 100%; height: 72px; object-fit: cover; border-radius: 8px; background: #E5E7EB; }
.mb-preview__featured p { margin: 0; font-size: .72rem; color: #6B7280; }
.mb-preview__images {
    margin-top: .4rem; display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: .5rem;
    background: #fff; border: 1px solid #E5E7EB; border-radius: 12px; padding: .65rem; min-width: 340px;
}
.mb-preview__card { display: flex; flex-direction: column; gap: .25rem; }
.mb-preview__card img, .mb-preview__ph {
    width: 100%; height: 64px; object-fit: cover; border-radius: 8px; background: #E5E7EB;
}
.mb-preview__card strong { font-size: .78rem; }
.mb-preview__card small { color: #6B7280; font-size: .68rem; line-height: 1.35; }
@media (max-width: 1200px) {
    .mb-shell, .mb-workspace, .mb-presets__grid, .mb-meta__seo { grid-template-columns: 1fr; }
    .mb-inspector-wrap { position: static; }
}

/* Product admin */
.pb-meta { margin-bottom: 1rem; padding: 1rem 1.1rem; }
.pb-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1rem; align-items: start; }
.pb-list { position: sticky; top: 1rem; }
.pb-main { display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.pb-row {
    display: grid; grid-template-columns: 1fr 1fr auto auto; gap: .4rem; align-items: center;
    margin: .4rem 0; padding: .45rem; background: #F9FAFB; border-radius: 10px; border: 1px solid #E5E7EB;
}
.pb-moves { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.pb-moves li {
    display: grid; grid-template-columns: 90px 60px 1fr auto; gap: .5rem; font-size: .82rem;
    padding: .4rem .55rem; background: #F9FAFB; border-radius: 8px;
}
.pb-seo-preview {
    margin-top: 1rem; padding: 1rem; border-radius: 12px; background: #F9FAFB; border: 1px solid #E5E7EB;
}
.pb-seo-preview__title { color: #1a0dab; font-size: 1.05rem; font-weight: 600; }
.pb-seo-preview__url { color: #006621; font-size: .8rem; direction: ltr; text-align: start; }
.pb-seo-preview__desc { color: #4d5156; font-size: .85rem; margin-top: .25rem; }
.pb-card-preview {
    display: grid; grid-template-columns: 120px 1fr; gap: .85rem; align-items: start;
    padding: .75rem; background: #F9FAFB; border-radius: 12px; border: 1px solid #E5E7EB;
}
.pb-card-preview img, .pb-card-preview__ph {
    width: 120px; height: 90px; object-fit: cover; border-radius: 10px; background: #E5E7EB;
}
.pb-card-preview strong { display: block; margin: .35rem 0; }
.pb-card-preview p { margin: 0; color: #6B7280; font-size: .85rem; }
.pb-card-preview em { font-style: normal; font-weight: 700; color: #166534; }
.lte { margin-bottom: .65rem; }
.lte__tabs { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .35rem 0 .45rem; }
.lte__tab {
    border: 1px solid #E5E7EB; background: #F9FAFB; border-radius: 999px; padding: .2rem .7rem;
    font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; color: #4B5563;
    display: inline-flex; align-items: center; gap: .25rem;
}
.lte__tab.is-active { background: #111827; color: #fff; border-color: #111827; }
.lte__dot { width: .4rem; height: .4rem; border-radius: 50%; background: #22c55e; display: inline-block; }
.lte__tab.is-active .lte__dot { background: #86efac; }
.lte__ai { margin-inline-start: auto; }
.fb-quill-host { min-height: 140px; background: #fff; border-radius: 8px; margin-bottom: .75rem; }
.fb-quill-host .ql-toolbar { border-radius: 8px 8px 0 0; }
.fb-quill-host .ql-container { min-height: 100px; border-radius: 0 0 8px 8px; font-family: inherit; }
.fb-option-row {
  display: grid; grid-template-columns: 48px 1fr auto auto; gap: .35rem; align-items: center; margin-bottom: .35rem;
}
.fb-option-row__idx { width: 48px; text-align: center; }
.fb-option-media { margin: 0 0 .75rem; padding: .5rem .65rem; background: #F8FAFC; border-radius: 10px; border: 1px solid #E5E7EB; }
.fb-media-kinds { display: flex; gap: .35rem; margin: .4rem 0; flex-wrap: wrap; }
.fb-media-kinds button {
  border: 1px solid #E5E7EB; background: #fff; border-radius: 8px; padding: .25rem .65rem;
  font: inherit; font-size: .78rem; cursor: pointer;
}
.fb-media-kinds button.is-active { background: #111827; color: #fff; border-color: #111827; }
.fb-style-panel h4 { margin: 1.25rem 0 .5rem; }
@media (max-width: 1100px) {
    .pb-shell, .pb-row { grid-template-columns: 1fr; }
}

/* Elementor-like builder workspace */
.eb-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 290px) minmax(0, 1fr) minmax(250px, 290px);
  gap: .75rem;
  align-items: stretch;
  min-height: calc(100vh - 220px);
}
.eb-panel {
  background: var(--eb-panel-bg, #fff);
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: .75rem;
  overflow: auto;
  max-height: calc(100vh - 180px);
}
.eb-panel h3 { margin: 0 0 .65rem; font-size: .92rem; }
.eb-palette__search input {
  width: 100%; border: 1px solid #E5E7EB; border-radius: 8px; padding: .45rem .65rem; margin-bottom: .5rem;
}
.eb-palette__group { margin-bottom: .5rem; border: 1px solid #F3F4F6; border-radius: 8px; }
.eb-palette__group summary {
  cursor: pointer; padding: .45rem .6rem; font-weight: 700; font-size: .78rem; color: #374151; list-style: none;
}
.eb-palette__items { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; padding: .35rem .45rem .55rem; }
.eb-palette__item {
  display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
  border: 1px solid #E5E7EB; background: #FAFAFA; border-radius: 8px; padding: .45rem .5rem;
  font-size: .72rem; font-weight: 600; cursor: grab; text-align: start; color: #111827;
}
.eb-palette__item:hover { border-color: #9CA3AF; background: #fff; }
.eb-palette__icon {
  width: .55rem; height: .55rem; border-radius: 2px; background: #6B7280;
}
.eb-palette__icon[data-cat="Layout"] { background: #0F766E; }
.eb-palette__icon[data-cat="Commerce"] { background: #B45309; }
.eb-palette__icon[data-cat="Business"] { background: #1D4ED8; }
.eb-palette__icon[data-cat="Forms"] { background: #BE185D; }
.eb-palette__icon[data-cat="Media"] { background: #7C3AED; }
.eb-nav__row {
  display: flex; align-items: center; gap: .25rem; border-radius: 6px;
}
.eb-nav__row.is-active { background: #F3F4F6; }
.eb-nav__twist {
  width: 1.1rem; border: none; background: transparent; cursor: pointer; font-size: .7rem; color: #6B7280;
}
.eb-nav__twist.is-empty { display: inline-block; width: 1.1rem; }
.eb-nav__item {
  flex: 1; display: block; text-align: start; border: none; background: transparent;
  padding: .35rem .45rem; border-radius: 6px; font-size: .78rem; cursor: pointer; color: #374151;
}
.eb-nav__item.is-active, .eb-nav__item:hover { background: #F3F4F6; font-weight: 700; }
.eb-nav__actions { display: flex; gap: .1rem; }
.eb-nav__ico {
  border: none; background: transparent; font-size: .65rem; font-weight: 700; color: #9CA3AF; cursor: pointer; padding: .15rem .25rem;
}
.eb-nav__ico.is-on { color: #0F766E; }
.eb-nav__warn { color: #B45309; font-weight: 800; margin-inline-start: .2rem; }
.eb-nav__rename { flex: 1; font-size: .75rem; padding: .2rem .35rem; border: 1px solid #D1D5DB; border-radius: 4px; }
.eb-nav__nested { padding-inline-start: .75rem; border-inline-start: 2px solid #E5E7EB; margin: .15rem 0 .15rem .35rem; }
.eb-palette__badge {
  font-size: .58rem; font-weight: 800; color: #0F766E; background: #CCFBF1; border-radius: 3px; padding: 0 .25rem;
}
.eb-unit-row { display: flex; gap: .35rem; align-items: center; }
.eb-unit-row input { flex: 1; }
.eb-unit-row select { width: 4.2rem; font-size: .75rem; }
.eb-quickbar {
  position: absolute; z-index: 20; display: none; gap: .2rem;
  background: #111827; border-radius: 6px; padding: .2rem; box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.eb-quickbar__btn {
  border: none; background: transparent; color: #F9FAFB; font-size: .75rem; padding: .25rem .4rem; cursor: pointer; border-radius: 4px;
}
.eb-quickbar__btn:hover { background: #374151; }
.eb-checklist { list-style: none; padding: 0; margin: .75rem 0; display: grid; gap: .4rem; }
.eb-checklist li { font-size: .85rem; padding: .4rem .55rem; border-radius: 6px; background: #F9FAFB; }
.eb-checklist .is-ok { color: #047857; }
.eb-checklist .is-block { color: #B91C1C; background: #FEF2F2; }
.eb-checklist .is-warn { color: #B45309; background: #FFFBEB; }
.eb-canvas { position: relative; }
.eb-canvas-wrap { display: flex; flex-direction: column; gap: .5rem; min-height: 420px; }
.eb-canvas-toolbar { display: flex; justify-content: space-between; align-items: center; }
.eb-canvas-toolbar__label { font-weight: 700; font-size: .85rem; }
.eb-canvas {
  border: 1px dashed #D1D5DB; border-radius: 10px; background: #F9FAFB; min-height: 380px; padding: 1rem;
  transition: box-shadow .2s ease;
}
.eb-canvas.has-selection { box-shadow: inset 0 0 0 1px #0F766E33; }
.eb-canvas__empty {
  display: grid; place-items: center; min-height: 280px; color: #9CA3AF; font-size: .9rem; text-align: center;
}
.eb-canvas__html { background: #fff; border-radius: 8px; padding: .75rem; }
.eb-canvas.is-live-preview {
  border-style: solid;
  border-color: #E5E7EB;
  background: #fff;
}
.eb-canvas.is-live-preview .eb-canvas__html { padding: 0; }
.eb-canvas.is-live-preview .vs-ed-node,
.eb-canvas.is-live-preview .vs-ed-container {
  outline: none !important;
  background: transparent !important;
  border: none !important;
  min-height: 0 !important;
}
.eb-canvas.is-live-preview .vs-ed-add,
.eb-canvas.is-live-preview .vs-ed-drop-hint,
.eb-canvas.is-live-preview .eb-hover-label,
.eb-canvas.is-live-preview .eb-insert-line,
.eb-canvas.is-live-preview .eb-quickbar { display: none !important; }

/* Keep Bootstrap grid working despite editor wrappers */
.vs-row > .vs-ed-node,
.row.vs-row > .vs-ed-node,
.eb-canvas__html .row > .vs-ed-node {
  display: contents;
}

.vs-ed-node { position: relative; outline: 1px dashed transparent; transition: outline-color .15s ease; }
.eb-canvas.is-editing .vs-ed-node:hover { outline-color: #94A3B8; }
.eb-canvas.is-editing .vs-ed-node.is-selected { outline: 2px solid #0F766E; outline-offset: 2px; }
.vs-hide-mobile { }
.eb-inspector__tabs { display: flex; gap: .25rem; margin-bottom: .75rem; border-bottom: 1px solid #E5E7EB; padding-bottom: .35rem; }
.eb-inspector__tabs button {
  border: none; background: transparent; padding: .35rem .55rem; font-size: .78rem; font-weight: 700;
  color: #6B7280; cursor: pointer; border-radius: 6px;
}
.eb-inspector__tabs button.is-active { background: #111827; color: #fff; }
.eb-inspector__type { font-size: .8rem; font-weight: 800; margin-bottom: .65rem; color: #0F766E; }
.eb-inspector__body .field { margin-bottom: .55rem; }
.eb-inspector__thumb { max-width: 100%; border-radius: 8px; margin: .35rem 0; }
.eb-inspector__thumb--sm { width: 40px; height: 40px; object-fit: cover; margin: 0; flex-shrink: 0; }
.eb-child-row { display: flex; gap: .25rem; align-items: center; margin-bottom: .35rem; }
.eb-faq-item { border: 1px solid #E5E7EB; border-radius: 8px; padding: .5rem; margin-bottom: .5rem; background: #FAFAFA; }
.eb-product-pick { max-height: 180px; overflow: auto; display: flex; flex-direction: column; gap: .25rem; margin-top: .35rem; }
.eb-icon-picker { display: flex; flex-direction: column; gap: .4rem; }
.eb-icon-picker__row { display: flex; gap: .4rem; align-items: center; }
.eb-icon-picker__preview {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid #E5E7EB; border-radius: 8px; background: #fff; overflow: hidden;
}
.eb-icon-picker__preview svg { width: 22px; height: 22px; }
.eb-icon-modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 80; display: grid; place-items: center; }
.eb-icon-modal__dialog {
  width: min(720px, 94vw); max-height: 85vh; background: #fff; border-radius: 12px;
  display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.eb-icon-modal__head { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid #E5E7EB; }
.eb-icon-modal__body { padding: .75rem 1rem; overflow: auto; }
.eb-icon-modal__filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem; }
.eb-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .5rem; }
.eb-icon-tile {
  border: 1px solid #E5E7EB; border-radius: 8px; background: #fff; padding: .5rem .25rem;
  display: flex; flex-direction: column; align-items: center; gap: .25rem; cursor: pointer; min-height: 72px;
}
.eb-icon-tile:hover { border-color: #0F766E; }
.eb-icon-tile svg { width: 24px; height: 24px; }
.eb-icon-tile span { font-size: .65rem; color: #64748B; text-align: center; word-break: break-all; }
.eb-check { display: flex; align-items: center; gap: .4rem; font-size: .82rem; margin-bottom: .4rem; cursor: pointer; }
.eb-hr { border: none; border-top: 1px solid #E5E7EB; margin: .85rem 0; }
.eb-hint { color: #9CA3AF; font-size: .8rem; }
.eb-templates { max-height: 140px; overflow: auto; }
@media (max-width: 1200px) {
  .eb-workspace { grid-template-columns: 1fr 1fr; }
  .eb-panel--canvas { grid-column: 1 / -1; }
}

/* Elementor Pro-like chrome */
.eb-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .65rem .85rem; margin-bottom: .75rem; background: #111827; color: #F9FAFB; border-radius: 12px;
}
.eb-topbar__left, .eb-topbar__right, .eb-topbar__center { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.eb-topbar .builder-link { color: #93C5FD; }
.eb-topbar .btn-ghost {
  background: #1F2937;
  color: #F9FAFB;
  border-color: #4B5563;
}
.eb-topbar .btn-ghost:hover:not(:disabled) {
  background: #374151;
  color: #fff;
  border-color: #6B7280;
}
.eb-topbar .btn-ghost:disabled {
  opacity: 0.45;
  color: #9CA3AF;
  cursor: not-allowed;
}
.eb-topbar .btn-ghost.is-active,
.eb-topbar__right .btn.is-active {
  background: #ECFDF5;
  color: #0F766E;
  border-color: #99F6E4;
}
.eb-topbar .btn-primary {
  color: #fff;
}
.builder-staging-link a { font-weight: 700; text-decoration: underline; }
.eb-device-switch { display: inline-flex; gap: .2rem; background: #F3F4F6; border-radius: 8px; padding: .15rem; }
.eb-device-switch button {
  border: none; background: transparent; padding: .3rem .55rem; border-radius: 6px; font-size: .75rem; font-weight: 700; cursor: pointer; color: #4B5563;
}
.eb-topbar .eb-device-switch { background: #1F2937; }
.eb-topbar .eb-device-switch button { color: #D1D5DB; }
.eb-topbar .eb-device-switch button.is-active { background: #374151; color: #F9FAFB; }
.eb-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; font-size: .78rem; }
.eb-breadcrumb__item { border: none; background: transparent; color: #6B7280; cursor: pointer; font-weight: 600; padding: .15rem .3rem; border-radius: 4px; }
.eb-breadcrumb__item.is-active, .eb-breadcrumb__item:hover { color: #0F766E; background: #F0FDFA; }
.eb-breadcrumb__sep { color: #D1D5DB; }
.eb-insert-line {
  position: absolute; height: 2px; background: #0F766E; z-index: 40; pointer-events: none; box-shadow: 0 0 0 1px #fff;
}
.eb-insert-line.is-inside { height: 0; border: 2px dashed #0F766E; min-height: 24px; background: #0F766E22; }
.eb-hover-label {
  position: absolute; z-index: 41; background: #0F766E; color: #fff; font-size: .65rem; font-weight: 700;
  padding: .1rem .35rem; border-radius: 3px; pointer-events: none;
}
.eb-ctx {
  position: fixed; z-index: 1000; min-width: 180px; background: #fff; border: 1px solid #E5E7EB; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .35rem; display: flex; flex-direction: column;
}
.eb-ctx button {
  border: none; background: transparent; text-align: start; padding: .45rem .65rem; border-radius: 6px; font: inherit; font-size: .82rem; cursor: pointer;
}
.eb-ctx button:hover { background: #F3F4F6; }
.eb-ctx button.is-danger { color: #B91C1C; }
.eb-ctx-backdrop { position: fixed; inset: 0; z-index: 999; }
.eb-tpl-modal { max-width: 640px; width: 92vw; }
.eb-tpl-tabs { display: flex; gap: .35rem; margin-bottom: .75rem; }
.eb-tpl-tabs button { border: 1px solid #E5E7EB; background: #F9FAFB; border-radius: 8px; padding: .35rem .7rem; cursor: pointer; font-weight: 700; font-size: .78rem; }
.eb-tpl-tabs button.is-active { background: #111827; color: #fff; border-color: #111827; }
.eb-tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; max-height: 320px; overflow: auto; }
.eb-tpl-card {
  border: 1px solid #E5E7EB; background: #FAFAFA; border-radius: 10px; padding: .75rem; text-align: start; cursor: pointer;
  display: flex; flex-direction: column; gap: .25rem;
}
.eb-tpl-card:hover { border-color: #0F766E; }
.eb-tpl-card span { font-size: .7rem; color: #9CA3AF; }
.eb-style-group { margin-bottom: 1rem; }
.eb-style-group h4 { margin: 0 0 .45rem; font-size: .78rem; color: #6B7280; }
.eb-spacing-box {
  position: relative; border: 1px dashed #D1D5DB; border-radius: 8px; padding: 1.6rem 1.8rem; background: #F9FAFB;
  display: grid; grid-template-columns: 1fr; gap: .35rem;
}
.eb-spacing-inner { border: 1px solid #E5E7EB; border-radius: 6px; padding: .5rem; background: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.eb-sp { width: 100%; border: 1px solid #E5E7EB; border-radius: 4px; padding: .2rem .35rem; font-size: .72rem; }
.eb-palette__star { margin-inline-start: auto; opacity: .5; font-size: .7rem; }
.eb-palette__item.is-fav .eb-palette__star { opacity: 1; color: #B45309; }
.eb-quick-insert { background: #ECFDF5; color: #065F46; font-size: .75rem; padding: .35rem .5rem; border-radius: 6px; margin-bottom: .5rem; font-weight: 700; }
.vs-ed-node.is-multi { outline: 2px dashed #F59E0B; outline-offset: 2px; }
.pill-red { background: #FEE2E2; color: #991B1B; }

/* Builder UX Flex Phase â€” inspector chrome */
.eb-inspector__tabs button {
  display: inline-flex; align-items: center; gap: .3rem; flex: 1; justify-content: center;
  border-bottom: 2px solid transparent; border-radius: 0; padding: .45rem .35rem;
}
.eb-inspector__tabs button.is-active {
  background: transparent; color: #111827; border-bottom-color: #111827;
}
.eb-tab-ico { font-size: .85rem; opacity: .85; }
.eb-hint--tight { margin: .25rem 0 0; font-size: .72rem; }
.eb-btn-row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: flex-start; }
.eb-segmented {
  display: flex; flex-wrap: wrap; gap: .2rem; background: #F3F4F6; border-radius: 8px; padding: .2rem;
}
.eb-icon-btn {
  border: none; background: transparent; min-width: 2rem; height: 1.85rem; padding: 0 .4rem;
  border-radius: 6px; cursor: pointer; font-size: .72rem; font-weight: 700; color: #4B5563;
}
.eb-icon-btn.is-active { background: #fff; color: #0F766E; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.eb-icon-group { margin-bottom: .65rem; }
.eb-icon-group__label {
  display: flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 700; color: #6B7280; margin-bottom: .3rem;
}
.eb-unit-control { margin-bottom: .65rem; }
.eb-unit-control__head {
  display: flex; justify-content: space-between; align-items: center; font-size: .75rem; font-weight: 700; color: #6B7280; margin-bottom: .25rem;
}
.eb-unit-control__device { font-size: .7rem; opacity: .7; }
.eb-unit-control__slider { width: 100%; margin-top: .35rem; accent-color: #0F766E; }
.eb-color-control { margin-bottom: .65rem; }
.eb-color-control__label { display: block; font-size: .75rem; font-weight: 700; color: #6B7280; margin-bottom: .25rem; }
.eb-color-control__row { display: flex; gap: .35rem; align-items: center; }
.eb-color-control__swatch {
  width: 2.1rem; height: 2.1rem; padding: 0; border: 1px solid #E5E7EB; border-radius: 6px; background: transparent; cursor: pointer;
}
.eb-color-control__hex { flex: 1; min-width: 0; }
.eb-color-control__token { width: 5.5rem; font-size: .72rem; }
.eb-gap-row { display: flex; gap: .35rem; align-items: flex-end; }
.eb-gap-link {
  border: 1px solid #E5E7EB; background: #fff; border-radius: 6px; height: 2.1rem; width: 2.1rem; cursor: pointer; margin-bottom: .55rem;
}
.eb-gap-link.is-active { border-color: #0F766E; background: #ECFDF5; }
.eb-structure-picker {
  border: 1px dashed #D1D5DB; border-radius: 10px; padding: .65rem; background: #fff; margin-top: .5rem;
}
.eb-structure-picker__head {
  display: grid; grid-template-columns: 1.5rem 1fr 1.5rem; align-items: center; margin-bottom: .55rem; font-size: .8rem;
}
.eb-structure-picker__nav { border: none; background: transparent; cursor: pointer; color: #6B7280; }
.eb-structure-picker__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem;
}
.eb-structure-preset {
  border: 1px solid #E5E7EB; background: #F9FAFB; border-radius: 6px; padding: .45rem; cursor: pointer; min-height: 2.4rem;
}
.eb-structure-preset:hover { border-color: #0F766E; background: #ECFDF5; }
.eb-structure-preset__bars { display: flex; gap: 3px; height: 1.35rem; width: 100%; }
.eb-structure-preset__bar { background: #9CA3AF; border-radius: 2px; min-width: 4px; }
.eb-media-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 1rem;
}
.eb-media-modal__dialog {
  width: min(640px, 100%); max-height: min(80vh, 720px); overflow: hidden;
  background: #fff; border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
  display: flex; flex-direction: column;
  border: 1px solid #E2E8F0;
}
.eb-media-modal__dialog--wide { width: min(980px, 100%); max-height: min(88vh, 860px); }
.eb-media-modal__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; padding: 1rem 1.15rem .85rem; border-bottom: 1px solid #E5E7EB; flex: 0 0 auto;
}
.eb-media-modal__head strong {
  display: block; font-size: 1.05rem; font-weight: 800; color: #0F172A;
}
.eb-media-modal__sub {
  margin: .3rem 0 0; font-size: .8rem; color: #64748B; line-height: 1.45; font-weight: 500;
}
.eb-media-modal__close {
  width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center;
  flex: 0 0 auto; line-height: 1;
}
.eb-media-modal__tabs {
  display: flex; gap: .35rem; padding: .55rem .85rem;
  border-bottom: 1px solid #F1F5F9; flex: 0 0 auto; background: #F8FAFC;
}
.eb-media-modal__tabs button {
  border: 1px solid transparent; background: transparent;
  padding: .45rem .85rem; border-radius: 999px;
  font-weight: 700; font-size: .78rem; color: #64748B; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.eb-media-modal__tabs button:hover { background: #fff; color: #0F172A; border-color: #E2E8F0; }
.eb-media-modal__tabs button.is-active {
  background: #0F766E; color: #fff; border-color: #0F766E;
  box-shadow: 0 6px 16px rgba(15, 118, 110, .22);
}
.eb-media-modal__layout { display: flex; min-height: 0; flex: 1 1 auto; overflow: hidden; }
.eb-media-modal__sidebar {
  width: 210px; flex: 0 0 auto; border-inline-end: 1px solid #EEF2F7;
  background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
  padding: .75rem .6rem; overflow: auto; display: flex; flex-direction: column; gap: .2rem;
}
.eb-media-modal__sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .45rem; padding: 0 .2rem; font-size: .76rem; color: #475569;
}
.eb-media-modal__sidebar-head strong { font-size: .78rem; color: #334155; }
.eb-media-folder {
  border: none; background: transparent; text-align: start;
  padding: .48rem .6rem; border-radius: 10px;
  font-size: .78rem; font-weight: 700; color: #475569; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.eb-media-folder:hover { background: rgba(15, 118, 110, .1); color: #0F766E; }
.eb-media-folder.is-active {
  background: #0F766E; color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, .2);
}
.eb-media-folder-new {
  display: flex; flex-direction: column; gap: .35rem;
  margin-bottom: .55rem; padding: .5rem; border-radius: 10px;
  background: #fff; border: 1px solid #E2E8F0;
}
.eb-media-modal__body {
  padding: 1rem 1.1rem 1.2rem; overflow: auto; flex: 1 1 auto; min-width: 0;
  background: #fff;
}
.eb-media-alert {
  margin: 0 0 .85rem; padding: .7rem .85rem; border-radius: 10px;
  background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA;
  font-size: .82rem; font-weight: 600; line-height: 1.55;
}
.eb-media-breadcrumb {
  margin: 0; font-size: .8rem; color: #64748B; font-weight: 600;
}
.eb-media-breadcrumb strong { color: #0F172A; }
.eb-hint { margin: .35rem 0 0; font-size: .76rem; color: #94A3B8; }
.eb-media-toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: .65rem; margin-bottom: .85rem;
}
.eb-media-toolbar__controls {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
}
.eb-media-search { width: min(180px, 100%) !important; min-height: 2.2rem; }
.eb-media-filter { width: auto !important; min-width: 7.5rem; min-height: 2.2rem; }
.eb-media-view-toggle {
  display: inline-flex; border: 1px solid #E2E8F0; border-radius: 10px; overflow: hidden; background: #fff;
}
.eb-media-view-toggle button {
  border: none; background: transparent; padding: .4rem .55rem; cursor: pointer; color: #64748B; font-size: .85rem;
}
.eb-media-view-toggle button.is-active { background: #0F172A; color: #fff; }
.eb-media-upload { display: grid; gap: .75rem; max-width: 36rem; margin: .25rem auto 0; }
.eb-media-dropzone {
  position: relative; display: grid; place-items: center; gap: .4rem;
  min-height: 180px; padding: 1.5rem 1.25rem; text-align: center; cursor: pointer;
  border: 2px dashed #94A3B8; border-radius: 16px;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(15, 118, 110, .08), transparent 60%),
    #F8FAFC;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.eb-media-dropzone:hover,
.eb-media-dropzone:focus-within {
  border-color: #0F766E;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(15, 118, 110, .14), transparent 60%),
    #F0FDFA;
  box-shadow: 0 10px 28px rgba(15, 118, 110, .08);
}
.eb-media-dropzone__input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
  font-size: 0;
}
.eb-media-dropzone__icon {
  width: 2.75rem; height: 2.75rem; border-radius: 999px; display: grid; place-items: center;
  background: #0F766E; color: #fff; font-size: 1.15rem; font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 118, 110, .28);
}
.eb-media-dropzone__title {
  font-weight: 800; color: #0F172A; font-size: .95rem; line-height: 1.4;
}
.eb-media-dropzone__hint { font-size: .78rem; color: #64748B; max-width: 18rem; line-height: 1.5; }
.eb-media-progress {
  margin: 0; text-align: center; font-size: .85rem; font-weight: 700; color: #0F766E;
}
.eb-media-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .7rem;
}
.eb-media-tile {
  border: 1px solid #E5E7EB; border-radius: 12px; background: #fff;
  padding: .4rem; cursor: pointer; text-align: start;
  display: flex; flex-direction: column; gap: .35rem; min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.eb-media-tile:hover {
  border-color: #0F766E;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  transform: translateY(-1px);
}
.eb-media-tile__preview {
  position: relative; display: block; aspect-ratio: 4 / 3;
  border-radius: 9px; overflow: hidden; background: #F1F5F9;
}
.eb-media-tile__preview img {
  width: 100%; height: 100%; object-fit: cover; display: block; background: #E5E7EB;
}
.eb-media-tile__glyph {
  display: grid; place-items: center; width: 100%; height: 100%; min-height: 72px;
  font-size: .72rem; font-weight: 800; color: #475569; letter-spacing: .02em;
  background: linear-gradient(145deg, #E2E8F0, #F8FAFC);
}
.eb-media-tile__overlay {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(15, 23, 42, .45); color: #fff; font-size: .78rem; font-weight: 800;
  opacity: 0; transition: opacity .15s ease;
}
.eb-media-tile:hover .eb-media-tile__overlay { opacity: 1; }
.eb-media-tile__meta { min-width: 0; padding: 0 .15rem .1rem; }
.eb-media-tile__name {
  display: block; font-size: .74rem; font-weight: 700; color: #0F172A;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eb-media-tile__kind {
  display: block; font-size: .68rem; color: #64748B; margin-top: .15rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.eb-media-tile span { margin-top: 0; }
.eb-media-list { display: flex; flex-direction: column; gap: .4rem; }
.eb-media-list__row {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  border: 1px solid #E5E7EB; border-radius: 12px; padding: .5rem .65rem;
  background: #fff; cursor: pointer; text-align: start;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.eb-media-list__row:hover { border-color: #0F766E; box-shadow: 0 6px 16px rgba(15, 23, 42, .06); }
.eb-media-list__thumb {
  width: 56px; height: 44px; border-radius: 8px; overflow: hidden; background: #F1F5F9;
  display: grid; place-items: center; flex: 0 0 auto;
}
.eb-media-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.eb-media-list__info { flex: 1 1 auto; min-width: 0; }
.eb-media-list__pick {
  font-size: .72rem; font-weight: 800; color: #0F766E; flex: 0 0 auto;
}
.eb-media-empty {
  display: grid; place-items: center; gap: .75rem; min-height: 180px;
  border: 1px dashed #CBD5E1; border-radius: 14px; color: #64748B;
  background: #F8FAFC; text-align: center; padding: 1.5rem;
}
.eb-media-empty p { margin: 0; font-size: .9rem; }
.eb-media-skeleton {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .7rem;
}
.eb-media-skeleton__cell {
  aspect-ratio: 4 / 3; border-radius: 12px;
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: eb-media-shimmer 1.2s ease-in-out infinite;
}
@keyframes eb-media-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@media (max-width: 720px) {
  .eb-media-modal__layout { flex-direction: column; }
  .eb-media-modal__sidebar {
    width: 100%; max-height: 140px; border-inline-end: none;
    border-bottom: 1px solid #EEF2F7;
  }
}

.media-field { margin: .35rem 0 .75rem; }
.media-field__label { display: block; font-size: .8rem; font-weight: 700; color: #334155; margin-bottom: .35rem; }
.media-field__row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.media-field__thumb {
  width: 88px; height: 66px; border-radius: 10px; border: 1px solid #E5E7EB; background: #F8FAFC;
  overflow: hidden; display: grid; place-items: center; flex: 0 0 auto;
}
.media-field__thumb.is-empty { border-style: dashed; color: #94A3B8; }
.media-field__thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-field__kind { font-size: .72rem; font-weight: 800; color: #64748B; }
.media-field__actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.media-field__url { margin-top: .45rem; width: 100%; }
.media-field__adv-toggle { opacity: .85; }

.gallery-tabs {
  display: flex; flex-wrap: nowrap; gap: .3rem; padding: .55rem .75rem; overflow-x: auto;
  border-bottom: 1px solid #EEF2F7; background: #FCFCFD;
}
.gallery-tabs__item {
  flex: 0 0 auto; border: 1px solid transparent; background: transparent; color: #64748B;
  border-radius: 999px; padding: .35rem .7rem; font-size: .76rem; font-weight: 800; cursor: pointer;
}
.gallery-tabs__item:hover { background: #F1F5F9; color: #0F172A; }
.gallery-tabs__item.is-active { background: var(--es-accent-soft); color: var(--es-accent); border-color: #99F6E4; }

.es-panel__head-status { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .35rem; }
.es-panel__foot .es-panel__foot-spacer { margin-inline-end: auto; }
.gallery-item-row__thumb {
  width: 40px; height: 32px; border-radius: 6px; overflow: hidden; background: #E2E8F0; flex: 0 0 auto;
}
.gallery-item-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.spm-filter { display: flex; gap: .3rem; flex-wrap: wrap; margin-inline-start: .5rem; }
.spm-filter button {
  border: 1px solid #E5E7EB; background: #fff; border-radius: 999px; padding: .3rem .65rem;
  font-size: .72rem; font-weight: 800; color: #64748B; cursor: pointer;
}
.spm-filter button.is-active { background: #0F172A; color: #fff; border-color: #0F172A; }
.vs-ed-container { min-height: 48px; }
.eb-canvas.is-editing .vs-ed-container:empty,
.eb-canvas.is-editing .vs-ed-container:not(:has(.vs-ed-node)):not(:has(.vs-ed-add)):not(:has(.vs-ed-drop-hint)),
.eb-canvas.is-editing .vs-ed-node[data-vs-type="container"]:has(.vs-ed-add),
.eb-canvas.is-editing .vs-ed-node[data-vs-type="column"]:has(.vs-ed-drop-hint) {
  background-image: linear-gradient(135deg, #F8FAFC 25%, transparent 25%),
    linear-gradient(225deg, #F8FAFC 25%, transparent 25%),
    linear-gradient(45deg, #F8FAFC 25%, transparent 25%),
    linear-gradient(315deg, #F8FAFC 25%, #fff 25%);
  background-size: 16px 16px;
  border: 1px dashed #CBD5E1;
  border-radius: 8px;
}
.eb-canvas.is-editing .vs-ed-node[data-vs-type="column"] {
  min-height: 72px;
  outline: 1px dashed #CBD5E1;
  outline-offset: -2px;
  background: transparent;
  border-radius: 6px;
}
.eb-canvas.is-editing .vs-ed-node[data-vs-type="column"] .vs-column {
  min-height: 64px;
  outline: none;
  background: transparent;
}
.eb-canvas.is-editing .vs-ed-node[data-vs-type="column"].is-selected {
  outline: 2px solid #0F766E;
  background: #ECFDF522;
}
.vs-ed-add,
.vs-ed-drop-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  width: 100%;
  min-height: 56px;
  margin: .25rem 0;
  border: 1px dashed #94A3B8;
  border-radius: 8px;
  background: #F8FAFC;
  color: #64748B;
  font: inherit;
  cursor: pointer;
  padding: .5rem;
}
.vs-ed-drop-hint {
  cursor: default;
  border-color: #94A3B8;
  background: #F8FAFC;
  color: #64748B;
}
.vs-ed-add:hover {
  background: #CCFBF1;
}
.vs-ed-add__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: #0F766E;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
}
.vs-ed-drop-hint .vs-ed-add__icon {
  background: #94A3B8;
}
.vs-ed-add__label {
  font-size: .78rem;
  font-weight: 600;
}
.eb-structure-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .28);
  padding: 1rem;
}
.eb-structure-overlay__card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .2);
  padding: .25rem;
}
.eb-row-cols {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.eb-row-cols__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .8rem;
}
.eb-row-cols__item select { max-width: 5rem; }
.vs-locked { opacity: .65; pointer-events: none; }
.vs-ed-node.is-dragging { opacity: .45; }
.eb-canvas__empty {
  gap: .75rem; padding: 2rem 1rem;
  background: linear-gradient(180deg, #F8FAFC 0%, #fff 100%);
  border-radius: 12px;
}
.eb-canvas__empty-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.eb-palette__search input {
  width: 100%; border: 1px solid #E5E7EB; border-radius: 8px; padding: .55rem .75rem; font-size: .85rem;
  background: #fff;
}
.eb-palette__items { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.eb-palette__item {
  display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center;
  border: 1px solid #E5E7EB; border-radius: 8px; padding: .55rem .35rem; background: #fff; cursor: grab;
  font-size: .72rem; font-weight: 700; color: #374151; min-height: 4.2rem;
}
.eb-palette__item:hover { border-color: #0F766E; background: #F0FDFA; }
.eb-palette__icon {
  width: 1.6rem; height: 1.6rem; border-radius: 6px; background: #E5E7EB;
  mask: none;
}
.eb-palette__icon[data-cat="Layout"] { background: #0F766E; }
.eb-palette__icon[data-cat="Basic"] { background: #334155; }
.eb-palette__icon[data-cat="Media"] { background: #B45309; }
.eb-palette__icon[data-cat="Commerce"] { background: #7C3AED; }
.eb-palette__star { margin-inline-start: 0; position: absolute; inset-inline-end: .25rem; inset-block-start: .15rem; }
.eb-palette__item { position: relative; }
.vs-container--full { width: 100%; max-width: 100%; }
.vs-button--sm { font-size: .8rem; padding: .25rem .55rem; }
.vs-button--lg { font-size: 1.05rem; padding: .65rem 1.15rem; }
.vs-button__icon { margin-inline-end: .35rem; }

/* ========== Element settings / Slider admin UI ========== */
.es-page {
  --es-accent: #0F766E;
  --es-accent-soft: #ECFDF5;
  --es-border: #E5E7EB;
  --es-muted: #6B7280;
  --es-surface: #ffffff;
  --es-soft: #F8FAFC;
  --es-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.es-page__head { margin-bottom: 1.25rem; }
.es-toast {
  border-radius: 12px; padding: .7rem 1rem; margin-bottom: .9rem; font-weight: 600; font-size: .9rem;
}
.es-toast--ok { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.es-toast--err { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.es-seg {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.15rem;
  padding: .4rem; background: #F1F5F9; border-radius: 14px; border: 1px solid #E2E8F0;
}
.es-seg__item {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 0; background: transparent; color: #475569;
  border-radius: 10px; padding: .45rem .8rem; font-size: .82rem; font-weight: 700; cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.es-seg__item em {
  font-style: normal; min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; background: #E2E8F0; color: #475569; font-size: .72rem;
}
.es-seg__item:hover { background: #fff; color: #0F172A; }
.es-seg__item.is-active {
  background: #fff; color: var(--es-accent); box-shadow: 0 1px 3px rgba(15,23,42,.08);
}
.es-seg__item.is-active em { background: var(--es-accent-soft); color: var(--es-accent); }

.es-layout {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .95fr);
  gap: 1.1rem; align-items: start;
}
.es-layout--card-design {
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.85fr);
}
@media (max-width: 1100px) { .es-layout { grid-template-columns: 1fr; } }

.es-panel--wide { max-width: none; }
.es-advanced-json {
  margin-top: 1rem;
  border: 1px solid var(--es-border);
  border-radius: 12px;
  padding: .55rem .75rem;
  background: #F8FAFC;
}
.es-advanced-json summary {
  cursor: pointer;
  font-weight: 700;
  font-size: .85rem;
  color: #475569;
}
.es-advanced-json .field { margin-top: .65rem; }

.eb-card-design-block {
  margin-top: .75rem;
}
.eb-inspector .eb-card-design-block .pcd-root {
  font-size: .92rem;
}
.eb-inspector .eb-card-design-block .pcd-live,
.eb-inspector .eb-card-design-block .pcd-canvas-wrap {
  max-width: 100%;
  overflow: auto;
}

.es-library__meta {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem;
}
.es-library__meta strong { font-size: .95rem; }
.es-chip {
  font-size: .75rem; font-weight: 700; color: #475569; background: #F1F5F9;
  border: 1px solid #E2E8F0; border-radius: 999px; padding: .2rem .55rem;
}

.es-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .85rem;
}
.es-card {
  border: 1px solid var(--es-border); border-radius: 16px; background: var(--es-surface);
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.es-card:hover { transform: translateY(-2px); box-shadow: var(--es-shadow); border-color: #CBD5E1; }
.es-card.is-active { border-color: var(--es-accent); box-shadow: 0 0 0 3px rgba(15,118,110,.15); }
.es-card.is-off { opacity: .62; }
.es-card__preview {
  min-height: 118px; max-height: 150px; overflow: hidden; background:
    linear-gradient(160deg, #F8FAFC 0%, #EEF2FF 100%);
  padding: .65rem; border-bottom: 1px solid #EEF2F7;
}
.es-card__preview--media { padding: 0; }
.es-card__preview--media img { width: 100%; height: 140px; object-fit: cover; display: block; }
.es-card__placeholder {
  height: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .25rem; color: #64748B; font-weight: 700; background: linear-gradient(145deg, #F1F5F9, #E2E8F0);
}
.es-card__placeholder small { font-weight: 600; opacity: .8; }
.es-card__body { padding: .85rem; display: flex; flex-direction: column; gap: .45rem; }
.es-card__title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.es-card__title-row strong { font-size: .92rem; line-height: 1.35; }
.es-card__meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.es-card__actions { display: flex; gap: .35rem; margin-top: .25rem; }

.es-badge {
  display: inline-flex; align-items: center; border-radius: 999px; padding: .15rem .5rem;
  font-size: .7rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap;
}
.es-badge--ok { background: #DCFCE7; color: #166534; }
.es-badge--warn { background: #FEF3C7; color: #92400E; }
.es-badge--muted { background: #F1F5F9; color: #64748B; }
.es-badge--kind { background: #CCFBF1; color: #0F766E; }

.es-key {
  display: inline-flex; align-items: center; max-width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem; color: #334155; background: #F8FAFC; border: 1px solid #E2E8F0;
  border-radius: 8px; padding: .15rem .45rem; overflow: hidden; text-overflow: ellipsis;
}
.es-key--lg { font-size: .78rem; padding: .3rem .55rem; }

.es-icon-btn {
  width: 2rem; height: 2rem; border-radius: 10px; border: 1px solid #E5E7EB;
  background: #fff; color: #475569; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.es-icon-btn:hover { background: #F8FAFC; color: #0F172A; border-color: #CBD5E1; }
.es-icon-btn:disabled { opacity: .4; cursor: not-allowed; }
.es-icon-btn--danger:hover { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }

.es-panel {
  position: sticky; top: .75rem;
  background: var(--es-surface); border: 1px solid var(--es-border); border-radius: 18px;
  box-shadow: var(--es-shadow); overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 2rem);
}
.es-panel__head {
  display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start;
  padding: 1rem 1.1rem; border-bottom: 1px solid #EEF2F7;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}
.es-panel__head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.es-panel__sub { margin: .25rem 0 0; color: var(--es-muted); font-size: .8rem; }
.es-panel__body { padding: 1rem 1.1rem; overflow: auto; flex: 1; }
.es-panel__foot {
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .5rem; padding: .85rem 1.1rem;
  border-top: 1px solid #EEF2F7; background: #FCFCFD;
}

.es-section { margin-bottom: 1.15rem; }
.es-section__title {
  margin: 0 0 .65rem; font-size: .78rem; font-weight: 800; color: #64748B;
  text-transform: none; letter-spacing: .02em;
}
.es-section__head {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .55rem;
}
.es-section__head .es-section__title { margin: 0; }

.es-fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
@media (max-width: 520px) { .es-fields-2 { grid-template-columns: 1fr; } }

.es-input, .es-panel .field input, .es-panel .field select, .es-panel .field textarea {
  width: 100%; border: 1px solid #E5E7EB; border-radius: 11px; padding: .55rem .7rem;
  background: #fff; font-size: .88rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.es-input:focus, .es-panel .field input:focus, .es-panel .field select:focus, .es-panel .field textarea:focus {
  outline: none; border-color: #5EEAD4; box-shadow: 0 0 0 3px rgba(15,118,110,.12);
}
.es-input--mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; }
.es-hint-inline { color: #94A3B8; font-weight: 600; font-size: .75rem; }

.es-code {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem; border: 1px solid #E5E7EB; border-radius: 12px; padding: .7rem;
  background: #0B1220; color: #E2E8F0; resize: vertical; line-height: 1.45;
}
.es-code--scroll { max-height: 180px; overflow: auto; display: block; }

.es-live-preview__frame {
  border: 1px solid #E2E8F0; border-radius: 14px; padding: .85rem;
  background:
    linear-gradient(90deg, rgba(148,163,184,.12) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(rgba(148,163,184,.12) 1px, transparent 1px) 0 0 / 16px 16px,
    #F8FAFC;
  min-height: 88px;
}

.es-btn-cta { border-radius: 12px !important; font-weight: 800 !important; }
.es-btn-soft { border-radius: 12px !important; }
.es-ico { display: inline-flex; line-height: 1; }

.es-empty {
  border: 1px dashed #CBD5E1; border-radius: 18px; background: #F8FAFC;
  padding: 2.2rem 1.25rem; text-align: center; color: #64748B;
}
.es-empty__icon {
  width: 3rem; height: 3rem; margin: 0 auto .75rem; border-radius: 14px;
  display: grid; place-items: center; background: #fff; border: 1px solid #E2E8F0;
  color: var(--es-accent); font-size: 1.25rem; font-weight: 800;
}
.es-empty h3 { margin: 0 0 .35rem; color: #0F172A; font-size: 1.05rem; }
.es-empty p { margin: 0 0 1rem; font-size: .88rem; }

.es-field-switch { display: flex; flex-direction: column; justify-content: flex-end; }
.es-switch {
  display: inline-flex; align-items: center; gap: .55rem; cursor: pointer; user-select: none; margin-top: .15rem;
}
.es-switch input { position: absolute; opacity: 0; pointer-events: none; }
.es-switch__ui {
  width: 2.4rem; height: 1.35rem; border-radius: 999px; background: #CBD5E1; position: relative;
  transition: background .15s ease;
}
.es-switch__ui::after {
  content: ""; position: absolute; top: 2px; inset-inline-start: 2px;
  width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.15); transition: inset-inline-start .15s ease;
}
.es-switch input:checked + .es-switch__ui { background: var(--es-accent); }
.es-switch input:checked + .es-switch__ui::after { inset-inline-start: calc(100% - 1.15rem); }
.es-switch__label { font-size: .85rem; font-weight: 700; color: #334155; }

.es-device-row, .es-btn-row, .es-inline-add, .es-publish-actions {
  display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .35rem 0 .75rem;
}
.es-check-pill {
  display: inline-flex; align-items: center; gap: .35rem; border: 1px solid #E5E7EB;
  background: #fff; border-radius: 999px; padding: .35rem .7rem; font-size: .8rem; font-weight: 700; cursor: pointer;
}
.es-check-pill input { accent-color: var(--es-accent); }

.slider-tabs {
  display: flex; flex-wrap: nowrap; gap: .3rem; padding: .55rem .75rem; overflow-x: auto;
  border-bottom: 1px solid #EEF2F7; background: #FCFCFD;
}
.slider-tabs__item {
  flex: 0 0 auto; border: 1px solid transparent; background: transparent; color: #64748B;
  border-radius: 999px; padding: .35rem .7rem; font-size: .76rem; font-weight: 800; cursor: pointer;
}
.slider-tabs__item:hover { background: #F1F5F9; color: #0F172A; }
.slider-tabs__item.is-active { background: var(--es-accent-soft); color: var(--es-accent); border-color: #99F6E4; }

.slider-slide-row {
  display: flex; gap: .35rem; align-items: center; margin-bottom: .4rem;
  padding: .35rem; border-radius: 12px; border: 1px solid transparent; background: #F8FAFC;
}
.slider-slide-row.is-active { background: var(--es-accent-soft); border-color: #99F6E4; }
.slider-slide-row__main {
  flex: 1; text-align: right; border: 0; background: transparent; cursor: pointer;
  font-weight: 700; font-size: .85rem; color: #0F172A; padding: .35rem .45rem;
}

.slider-preview-toolbar { display: flex; gap: .3rem; flex-wrap: wrap; }
.slider-preview-toolbar button {
  border: 1px solid #E5E7EB; background: #fff; border-radius: 999px; padding: .28rem .65rem;
  font-size: .74rem; font-weight: 800; cursor: pointer; color: #475569;
}
.slider-preview-toolbar button.is-active { background: var(--es-accent); color: #fff; border-color: var(--es-accent); }
.slider-preview--desktop { max-width: 100%; }
.slider-preview--tablet { max-width: 768px; margin-inline: auto; }
.slider-preview--mobile { max-width: 390px; margin-inline: auto; }
.es-preview-block { margin-top: .5rem; }

.vs-element-preset, .vs-global-block { width: 100%; }
.vs-preset-stripe {
  display: flex; gap: 1rem; align-items: center; justify-content: center; padding: .85rem 1rem;
  background: linear-gradient(90deg, #ECFDF5, #CCFBF1); border-radius: 10px; font-weight: 600; color: #0F766E;
}
.spm-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 80;
}
.stm-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 80;
}
.stm-modal {
  position: fixed; inset-inline: 50%; top: 6vh; transform: translateX(-50%);
  width: min(960px, calc(100vw - 2rem)); max-height: 86vh;
  background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(15,23,42,.25);
  z-index: 81; display: flex; flex-direction: column; overflow: hidden;
}
.stm-modal__head {
  display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start;
  padding: 1rem 1.1rem; border-bottom: 1px solid #EEF2F7;
}
.stm-modal__head h3 { margin: 0; font-size: 1.05rem; }
.stm-modal__head p { margin: .25rem 0 0; color: #64748B; font-size: .82rem; }
.stm-modal__toolbar { padding: .75rem 1.1rem; border-bottom: 1px solid #F1F5F9; }
.stm-grid {
  padding: .85rem; overflow: auto; display: grid; gap: .75rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.stm-card {
  display: flex; flex-direction: column; text-align: right; border: 1px solid #E5E7EB;
  border-radius: 14px; background: #fff; padding: 0; overflow: hidden; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.stm-card:hover { border-color: #99F6E4; box-shadow: 0 6px 18px rgba(15,118,110,.08); }
.stm-card__thumb {
  height: 110px; background: #F1F5F9; display: grid; place-items: center; overflow: hidden;
  color: #64748B; font-size: .75rem; font-weight: 800;
}
.stm-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.stm-card__body { padding: .7rem .75rem; display: flex; flex-direction: column; gap: .3rem; }
.stm-card__body p { margin: 0; color: #64748B; font-size: .78rem; line-height: 1.45; }
.stm-form { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.stm-form__actions { display: flex; justify-content: flex-end; gap: .5rem; }
.stm-catalog { margin: .35rem 0 .75rem; padding: .75rem; border: 1px solid #EEF2F7; border-radius: 14px; background: #F8FAFC; }
.stm-inline-grid {
  display: grid; gap: .55rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.stm-inline-card {
  display: flex; flex-direction: column; text-align: right; border: 1px solid #E5E7EB;
  border-radius: 12px; background: #fff; padding: 0; overflow: hidden; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.stm-inline-card:hover { border-color: #99F6E4; box-shadow: 0 6px 16px rgba(15,118,110,.08); }
.stm-inline-card__thumb {
  height: 72px; background: #F1F5F9; display: grid; place-items: center; overflow: hidden;
  color: #64748B; font-size: .7rem; font-weight: 800;
}
.stm-inline-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.stm-inline-card__body {
  padding: .5rem .55rem; display: flex; flex-direction: column; gap: .2rem; align-items: flex-start;
}
.stm-inline-card__body strong { font-size: .82rem; }
.spm-modal {
  position: fixed; inset-inline: 50%; top: 8vh; transform: translateX(-50%);
  width: min(720px, calc(100vw - 2rem)); max-height: 80vh;
  background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(15,23,42,.25);
  z-index: 81; display: flex; flex-direction: column; overflow: hidden;
}
.spm-modal__head {
  display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start;
  padding: 1rem 1.1rem; border-bottom: 1px solid #EEF2F7;
}
.spm-modal__head h3 { margin: 0; font-size: 1.05rem; }
.spm-modal__head p { margin: .25rem 0 0; color: #64748B; font-size: .82rem; }
.spm-modal__toolbar { padding: .75rem 1.1rem; border-bottom: 1px solid #F1F5F9; }
.spm-modal__list { padding: .75rem; overflow: auto; display: flex; flex-direction: column; gap: .5rem; }
.spm-item {
  display: flex; gap: .75rem; text-align: right; border: 1px solid #E5E7EB; border-radius: 14px;
  background: #fff; padding: .65rem; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease;
}
.spm-item:hover { border-color: #99F6E4; box-shadow: 0 6px 18px rgba(15,118,110,.08); }
.spm-item.is-active { border-color: #0F766E; background: #ECFDF5; }
.spm-item__thumb {
  width: 88px; height: 58px; border-radius: 10px; overflow: hidden; flex: 0 0 auto;
  background: #F1F5F9; display: grid; place-items: center; color: #64748B; font-size: .72rem; font-weight: 800;
}
.spm-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.spm-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.spm-item__meta { display: flex; flex-wrap: wrap; gap: .3rem; }
.spm-item__warn {
  font-size: .78rem; font-weight: 700; color: #92400E; background: #FFFBEB;
  border: 1px solid #FDE68A; border-radius: 8px; padding: .3rem .5rem;
}
.spm-selected {
  border: 1px solid #CCFBF1; background: #F0FDFA; border-radius: 12px; padding: .7rem .8rem; margin-bottom: .55rem;
}
.spm-selected__main { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }

.eb-gallery-item-pick {
  display: flex; flex-direction: column; gap: .35rem; max-height: 280px; overflow: auto;
  border: 1px solid #E5E7EB; border-radius: 12px; padding: .45rem; background: #fff;
}
.eb-gallery-item-pick__toolbar {
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .25rem;
}
.eb-gallery-item-pick__row {
  display: flex; gap: .55rem; align-items: center; padding: .35rem .4rem; border-radius: 8px; cursor: pointer;
}
.eb-gallery-item-pick__row:hover { background: #F1F5F9; }
.eb-gallery-item-pick__thumb {
  width: 44px; height: 34px; border-radius: 6px; overflow: hidden; background: #E2E8F0; flex: 0 0 auto;
}
.eb-gallery-item-pick__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eb-gallery-item-pick__meta { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.eb-gallery-item-pick__meta strong { font-size: .82rem; }
.eb-catalog-edit { margin: .75rem 0 1rem; }
.eb-catalog-edit__list { display: flex; flex-direction: column; gap: .55rem; margin-top: .55rem; max-height: 420px; overflow: auto; }
.eb-catalog-edit__card {
  border: 1px solid #E5E7EB; border-radius: 12px; padding: .65rem .7rem; background: #FCFCFD;
}
.eb-catalog-edit__actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.eb-catalog-edit__ok { color: #0F766E; font-weight: 700; }
.eb-catalog-edit__err { color: #B91C1C; font-weight: 700; }

.conn-panel { margin-top: 1rem; padding: 1.1rem 1.25rem; max-width: 960px; }
.conn-panel__row { margin-bottom: 1rem; }
.conn-switch {
  display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; cursor: pointer;
}
.conn-switch input { width: 1.1rem; height: 1.1rem; }
.conn-test-box {
  margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid #E5E7EB;
}
.conn-test-box h3 { margin: 0 0 .75rem; font-size: .95rem; }
.msg-err { color: #B91C1C; font-weight: 700; margin: .5rem 0; }

.theme-tabs--sub { margin: 0 0 1rem; }
.sps-pattern-toolbar {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.sps-pattern-title { margin: 0 0 .35rem; font-size: 1.05rem; }
.sps-pattern-lead { margin: 0; color: #64748B; font-size: .9rem; max-width: 36rem; line-height: 1.5; }
.sps-pattern-actions { display: flex; gap: .35rem; flex-wrap: wrap; }
.sps-pill {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700;
  background: #F1F5F9; color: #64748B;
}
.sps-pill--ok { background: #CCFBF1; color: #0F766E; }

.sps-pattern-overlay {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(2px);
}
.sps-pattern-dialog {
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sps-pattern-dialog__head {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; gap: .75rem; align-items: flex-start;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #EEF2F7;
  background: linear-gradient(180deg, #F8FAFC 0%, #fff 100%);
}
.sps-pattern-dialog__head h3 { margin: 0; font-size: 1.08rem; }
.sps-pattern-dialog__head p { margin: .3rem 0 0; color: #64748B; font-size: .82rem; }
.sps-pattern-dialog__scroll {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  -webkit-overflow-scrolling: touch;
}
.sps-pattern-dialog__foot {
  flex: 0 0 auto;
  display: flex; justify-content: flex-end; gap: .5rem;
  padding: .85rem 1.15rem;
  border-top: 1px solid #F1F5F9;
  background: #FCFCFD;
}
.sps-card-block {
  border: 1px solid #E8EDF3;
  border-radius: 14px;
  padding: .85rem 1rem;
  background: #FCFCFD;
}
.sps-meta-grid {
  display: grid;
  grid-template-columns: auto 1.2fr 1fr;
  gap: .75rem 1rem;
  align-items: end;
}
@media (max-width: 720px) {
  .sps-meta-grid { grid-template-columns: 1fr; }
}
.sps-meta-grid__active { padding-bottom: .55rem; }
.sps-pattern-compose {
  display: grid; grid-template-columns: 1.45fr 1fr; gap: 1rem;
  padding: 0; border: none; background: transparent;
}
@media (max-width: 800px) {
  .sps-pattern-compose { grid-template-columns: 1fr; }
}
.sps-body { min-height: 11rem; resize: vertical; font-family: inherit; line-height: 1.65; }
.sps-body--drag { outline: 2px dashed #0F766E; background: #F0FDFA; }
.sps-var-panel {
  border: 1px solid #E8EDF3; border-radius: 14px; padding: .75rem .85rem; background: #F8FAFC;
}
.sps-var-panel h4 { margin: 0 0 .2rem; font-size: .9rem; }
.sps-var-hint { margin: 0 0 .55rem; color: #94A3B8; font-size: .75rem; }
.sps-var-list { display: flex; flex-wrap: wrap; gap: .4rem; max-height: 14rem; overflow: auto; }
.sps-var-chip {
  border: 1px solid #E2E8F0; background: #fff; border-radius: 999px; padding: .32rem .65rem;
  font-size: .78rem; cursor: grab; color: #0F172A; transition: border-color .12s, background .12s;
}
.sps-var-chip:hover { border-color: #99F6E4; background: #F0FDFA; }
.sps-var-chip:active { cursor: grabbing; }
.sps-accordion {
  border: 1px solid #E5E7EB; border-radius: 12px; padding: .65rem .85rem; background: #FCFCFD;
}
.sps-accordion summary { font-weight: 700; cursor: pointer; }
.sps-check-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .45rem .75rem; margin-top: .65rem;
}
.sps-check-grid label {
  display: flex; align-items: center; gap: .4rem; font-size: .88rem;
  padding: .35rem .45rem; border-radius: 8px;
}
.sps-check-grid label.is-picked { background: #F0FDFA; }
.sps-cond-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .65rem; }
@media (max-width: 800px) {
  .sps-cond-cols { grid-template-columns: 1fr; }
}
.sps-cond-cols h4 { margin: 0 0 .5rem; font-size: .85rem; }
.sps-cond-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .45rem; align-items: center; }
.sps-cond-row .form-input { min-width: 5.5rem; flex: 1; }
.sps-sched { display: flex; flex-direction: column; gap: .65rem; margin-top: .65rem; }
.sps-delay-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.sps-pattern-test { margin-top: 1.25rem; }
.sps-pattern-test__grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: .75rem; margin-bottom: .75rem;
}
@media (max-width: 720px) {
  .sps-pattern-test__grid { grid-template-columns: 1fr; }
}

/* Special Product Settings (sps-) */
.sps-lead {
    margin: .45rem 0 0;
    color: #6B7280;
    font-size: .92rem;
    max-width: 42rem;
    line-height: 1.5;
}
.sps-card {
    margin-bottom: 1rem;
}
.sps-card--agent {
    border-color: #C7E7D4;
    background: linear-gradient(180deg, #F7FBF8 0%, #fff 55%);
}
.sps-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.sps-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}
.sps-card__desc {
    margin: .35rem 0 0;
    color: #6B7280;
    font-size: .86rem;
    line-height: 1.55;
    max-width: 40rem;
}
.sps-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: 1rem;
}
.sps-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .28rem .7rem;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}
.sps-badge--ok {
    background: #E8F8EE;
    color: #166534;
}
.sps-badge--warn {
    background: #FFF7ED;
    color: #9A3412;
}
.sps-agent-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem 1.4rem;
    margin-bottom: .25rem;
}
.sps-meta-item {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.sps-meta-label {
    font-size: .75rem;
    color: #9CA3AF;
    font-weight: 600;
}
.sps-hint {
    margin: 0;
    color: #6B7280;
    font-size: .86rem;
    line-height: 1.55;
}
.sps-hint code {
    font-size: .8rem;
    background: #F3F4F6;
    padding: .1rem .35rem;
    border-radius: 6px;
}
.sps-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}
.sps-field { min-width: 220px; }
.sps-muted { color: #6B7280; margin: 0; }
.sps-table code { font-size: .8rem; }
.sps-method {
    display: inline-block;
    min-width: 3.2rem;
    text-align: center;
    font-weight: 700;
    font-size: .78rem;
    padding: .15rem .4rem;
    border-radius: 6px;
    background: #F3F4F6;
}
.sps-method--get { background: #E8F8EE; color: #166534; }
.sps-method--post { background: #EFF6FF; color: #1D4ED8; }
.sps-method--put { background: #FFF7ED; color: #9A3412; }
.sps-method--delete { background: #FEF2F2; color: #B91C1C; }
.sps-method--patch { background: #F5F3FF; color: #5B21B6; }

.sps-card--catalog {
    border-color: #D6E4FF;
    background: linear-gradient(180deg, #F7FAFF 0%, #fff 42%);
}
.sps-catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
}
.sps-catalog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1.1rem;
    align-items: center;
    color: #64748B;
    font-size: .8rem;
    margin: 0 0 .65rem;
}
.sps-catalog-sort-hint {
    color: #475569;
    background: #F1F5F9;
    border-radius: 999px;
    padding: .15rem .55rem;
    font-weight: 600;
}
.sps-catalog-wrap {
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    overflow: auto;
    max-height: min(72vh, 760px);
    background: #fff;
}
.sps-table--catalog {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 980px;
}
.sps-table--catalog thead th {
    position: sticky;
    background: #F8FAFC;
    z-index: 2;
    font-size: .78rem;
    color: #64748B;
    white-space: nowrap;
    vertical-align: bottom;
    border-bottom: 1px solid #E2E8F0;
    padding: .35rem .55rem;
}
.sps-th-sort th { top: 0; z-index: 3; }
.sps-th-filters th {
    top: 2.35rem;
    z-index: 2;
    background: #F1F5F9;
    padding-top: .35rem;
    padding-bottom: .45rem;
}
.sps-th-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    padding: .2rem .1rem;
    cursor: pointer;
}
.sps-th-btn:hover { color: #0F172A; }
.sps-th-btn.is-sorted { color: #1D4ED8; }
.sps-th-arrow { font-size: .72rem; opacity: .55; }
.sps-th-btn.is-sorted .sps-th-arrow { opacity: 1; }
.sps-col-filter {
    width: 100%;
    min-width: 4.5rem;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: .32rem .45rem;
    font: inherit;
    font-size: .78rem;
    background: #fff;
    color: #0F172A;
}
.sps-col-filter:focus {
    outline: 2px solid #BFDBFE;
    border-color: #93C5FD;
}
.sps-table--catalog tbody td {
    padding: .55rem .55rem;
    border-bottom: 1px solid #F1F5F9;
    vertical-align: middle;
}
.sps-table--catalog tbody tr:hover { background: #F8FBFF; }
.sps-row--localized { background: linear-gradient(90deg, #F0FDFA 0%, #fff 28%); }
.sps-td-title { min-width: 11rem; max-width: 18rem; }
.sps-ep-title {
    font-weight: 800;
    font-size: .9rem;
    display: block;
    color: #0F172A;
    line-height: 1.35;
}
.sps-ep-title--empty { color: #94A3B8; font-weight: 600; }
.sps-ep-title-en {
    display: block;
    margin-top: .12rem;
    font-size: .78rem;
    color: #64748B;
    font-weight: 500;
}
.sps-ep-fallback {
    display: block;
    margin-top: .15rem;
    font-size: .72rem;
    color: #94A3B8;
}
.sps-ep-langs {
    display: inline-flex;
    gap: .25rem;
    margin-top: .28rem;
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: #0F766E;
    background: #CCFBF1;
    border-radius: 999px;
    padding: .08rem .4rem;
}
.sps-route { word-break: break-all; font-size: .78rem; color: #334155; }
.sps-ep-resblock { display: flex; flex-direction: column; gap: .1rem; }
.sps-ep-res { font-weight: 700; font-size: .82rem; color: #0F172A; }
.sps-ep-op { color: #64748B; font-size: .75rem; }
.sps-pill {
    display: inline-block;
    padding: .14rem .5rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}
.sps-pill--risk { background: #F1F5F9; color: #334155; }
.sps-pill--life { background: #EEF2FF; color: #3730A3; }
.sps-empty-cell { text-align: center; color: #94A3B8; padding: 1.5rem !important; }
.sps-edit-btn { min-width: 4.2rem; }
.sps-th-actions { text-align: center; }

.sps-ep-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
}
.sps-ep-modal {
    width: min(640px, 100%);
    max-height: min(90vh, 820px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    border: 1px solid #E5E7EB;
}
.sps-ep-modal__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #F1F5F9;
}
.sps-ep-modal__head h3 { margin: 0; font-size: 1.05rem; font-weight: 800; }
.sps-ep-modal__head p {
    margin: .4rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
    color: #64748B;
    font-size: .84rem;
}
.sps-ep-modal__body {
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.sps-ep-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: .55rem;
    padding: .85rem 1.15rem 1.1rem;
    border-top: 1px solid #F1F5F9;
}
.sps-alert--ok {
    background: #E8F8EE;
    color: #166534;
    border: 1px solid #BBF7D0;
    border-radius: 10px;
    padding: .65rem .85rem;
    margin-bottom: .85rem;
    font-size: .88rem;
}
.sps-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-end;
}
.sps-btn-danger {
    color: #B91C1C !important;
    border-color: #FECACA !important;
}
.sps-panel {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #FAFAFA;
}
.sps-panel__title {
    margin: 0 0 .75rem;
    font-size: .95rem;
    font-weight: 800;
}
.sps-scopes {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem 1rem;
}
.sps-alert {
    border-radius: 12px;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.sps-alert--error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}
.sps-alert--warn {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

/* Admin OTP login */
.admin-otp-shell {
    min-height: 100vh;
    font-family: var(--font-sans, "Vazirmatn", "Figtree", sans-serif);
}
.admin-otp {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.75rem 1rem;
    background:
        radial-gradient(ellipse 90% 70% at 12% 8%, color-mix(in srgb, var(--color-primary) 16%, transparent), transparent 55%),
        radial-gradient(ellipse 70% 55% at 92% 88%, color-mix(in srgb, var(--color-secondary) 7%, transparent), transparent 50%),
        var(--bg-page, var(--color-bg, #F8FAFC));
    overflow: hidden;
}
.admin-otp__glow {
    position: absolute;
    inset: auto auto 12% 8%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--color-primary) 18%, transparent), transparent 70%);
    filter: blur(8px);
    pointer-events: none;
    animation: adminGlowPulse 6.5s ease-in-out infinite;
}

@keyframes adminGlowPulse {
    0% { transform: scale(.98); opacity: .7; }
    50% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(.98); opacity: .7; }
}
.admin-otp__card {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    width: min(420px, 100%);
    background: var(--color-surface, rgba(255,255,255,.92));
    border: 1px solid var(--color-border, #E5E7EB);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .08);
    padding: 1.85rem 1.65rem 1.7rem;
    backdrop-filter: blur(8px);
}
.admin-otp__header {
    display: flex;
    gap: .95rem;
    align-items: center;
    margin-bottom: 1.45rem;
}
.admin-otp__mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #22C55E, #15803D);
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow: 0 10px 24px rgba(21, 128, 61, .28);
}
.admin-otp__logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #E5E7EB;
}
.admin-otp__eyebrow {
    margin: 0;
    font-size: .78rem;
    font-weight: 600;
    color: #6B7280;
    letter-spacing: .04em;
}
.admin-otp__title {
    margin: .1rem 0;
    font-size: 1.55rem;
    font-weight: 800;
    color: #0F172A;
    font-family: "Outfit", "Vazirmatn", sans-serif;
}
.admin-otp__lead {
    margin: 0;
    color: #64748B;
    font-size: .92rem;
    line-height: 1.45;
}
.admin-otp__field {
    margin-bottom: 1rem;
}
.admin-otp__field label {
    display: block;
    margin-bottom: .4rem;
    font-size: .88rem;
    font-weight: 600;
    color: #334155;
}
.admin-otp__input {
    width: 100%;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    padding: .78rem .9rem;
    font: inherit;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.admin-otp__input:focus {
    outline: none;
    border-color: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}
.admin-otp__input--code {
    letter-spacing: .35em;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    direction: ltr;
    position: relative;
    z-index: 3;
    pointer-events: auto;
}
.admin-otp__btn {
    width: 100%;
    border: 0;
    border-radius: var(--button-radius, 12px);
    padding: .85rem 1rem;
    font: inherit;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--color-primary) 25%, transparent);
}
.admin-otp__btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}
.admin-otp__btn:not(:disabled):hover {
    filter: brightness(1.04);
}
.admin-otp__alert {
    border-radius: 12px;
    padding: .7rem .85rem;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.admin-otp__alert--err {
    background: #FEF2F2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}
.admin-otp__alert--ok {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}
.admin-otp__masked {
    margin: 0 0 1rem;
    color: #64748B;
    font-size: .92rem;
}
.admin-otp__dev {
    margin: 0 0 1rem;
    padding: .55rem .75rem;
    border-radius: 10px;
    background: #FFFBEB;
    border: 1px dashed #F59E0B;
    color: #92400E;
    font-size: .85rem;
}
.admin-otp__remember {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 1rem;
    color: #475569;
    font-size: .9rem;
}
.admin-otp__footer-actions {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1rem;
}
.admin-otp__link {
    border: 0;
    background: transparent;
    color: #15803D;
    font: inherit;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    padding: 0;
}
.admin-otp__link:disabled {
    color: #94A3B8;
    cursor: not-allowed;
}
@media (max-width: 560px) {
    .admin-otp { padding: 1rem .75rem; }
    .admin-otp__card { padding: 1.35rem 1.1rem 1.25rem; border-radius: 18px; }
    .admin-otp__header { gap: .75rem; margin-bottom: 1.15rem; }
    .admin-otp__title { font-size: 1.35rem; }
    .admin-otp__bg-art { opacity: .35; transform: scale(.85); }
}

/* Animated background art (SVG) for admin OTP login */
.admin-otp__bg-art {
    position: absolute;
    top: 10%;
    left: 8%;
    width: clamp(160px, 22vw, 260px);
    height: auto;
    opacity: .75;
    pointer-events: none;
    z-index: 0;
    transform: translateZ(0);
    color: var(--color-primary);
    filter: drop-shadow(0 18px 30px color-mix(in srgb, var(--color-primary) 18%, transparent));
}

.admin-otp__bg-art svg {
    width: 100%;
    height: auto;
}

.admin-otp__bg-art * {
    pointer-events: none;
}

.admin-otp__art-phone {
    transform-origin: 50% 50%;
    animation: adminArtFloat 7.5s ease-in-out infinite;
}

.admin-otp__art-stroke {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: adminArtStroke 2.8s ease-in-out infinite;
}

.admin-otp__art-bubble {
    animation: adminArtBubble 3.8s ease-in-out infinite;
    transform-origin: 154px 60px;
}

@keyframes adminArtFloat {
    0% { transform: translateY(0) rotate(-2deg) scale(1); opacity: .78; }
    50% { transform: translateY(-16px) rotate(2deg) scale(1.03); opacity: .92; }
    100% { transform: translateY(0) rotate(-2deg) scale(1); opacity: .78; }
}

@keyframes adminArtStroke {
    0% { stroke-dashoffset: 220; opacity: .55; }
    55% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: -30; opacity: .75; }
}

@keyframes adminArtBubble {
    0% { transform: translateX(0) translateY(0) scale(1); opacity: .65; }
    50% { transform: translateX(-8px) translateY(6px) scale(1.05); opacity: .95; }
    100% { transform: translateX(0) translateY(0) scale(1); opacity: .65; }
}

/* Soften motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .admin-otp__art-phone,
    .admin-otp__art-stroke,
    .admin-otp__art-bubble {
        animation: none !important;
    }

    .admin-otp__glow {
        animation: none !important;
    }
}

/* â€”â€” Store profile settings â€”â€” */
.sp-lead { margin: .35rem 0 0; color: var(--color-muted, #6B7280); font-size: .9rem; max-width: 42rem; }
.sp-grid { display: grid; gap: 1rem; margin-top: 1rem; }
.sp-panel { padding: 1.15rem 1.25rem; }
.sp-panel--brand { max-width: 1100px; }
.sp-section-title { margin: 0 0 .85rem; font-size: 1.05rem; }
.sp-section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.sp-section-head .sp-section-title { margin: 0; }
.sp-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.sp-field-wide { grid-column: 1 / -1; }
.sp-textarea { min-height: 4.5rem; resize: vertical; width: 100%; }
.sp-empty, .sp-hint { color: var(--color-muted, #6B7280); font-size: .9rem; }
.sp-muted { color: var(--color-subtle, #9CA3AF); font-size: .82rem; }
.sp-list { display: flex; flex-direction: column; gap: .55rem; }
.sp-list__item {
    display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
    padding: .75rem .85rem; border: 1px solid var(--color-border, #E5E7EB); border-radius: 12px; background: var(--color-bg-muted, #F9FAFB);
}
.sp-list__item.is-primary {
    border-color: color-mix(in srgb, var(--color-primary, #22C55E) 45%, #E5E7EB);
    background: color-mix(in srgb, var(--color-primary, #22C55E) 8%, #fff);
}
.sp-list__body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.sp-list__actions { display: flex; flex-wrap: wrap; gap: .35rem; flex-shrink: 0; }
.sp-editor {
    margin-top: 1rem; padding: 1rem; border-radius: 14px;
    border: 1px dashed var(--color-border, #D1D5DB); background: var(--color-surface, #fff);
}
.sp-editor h4 { margin: 0 0 .75rem; }
.sp-editor__actions { display: flex; gap: .5rem; margin-top: 1rem; }
.sp-check { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .9rem; }
.sp-brand-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 1.25rem; align-items: start; }
.sp-brand-preview__card {
    position: sticky; top: 1rem; padding: 1.25rem; border-radius: 16px;
    background: linear-gradient(160deg, #0F172A, #14532D 120%);
    color: #fff; text-align: center; box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}
.sp-brand-preview__logo { max-width: 96px; max-height: 96px; object-fit: contain; margin: 0 auto .75rem; border-radius: 12px; background: #fff; padding: .35rem; }
.sp-brand-preview__mark {
    width: 64px; height: 64px; margin: 0 auto .75rem; border-radius: 16px;
    display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
    background: linear-gradient(135deg, var(--color-primary, #22C55E), var(--color-accent, #0EA5E9));
}
.sp-brand-preview__name { font-size: 1.25rem; font-weight: 800; }
.sp-brand-preview__slogan { margin-top: .4rem; opacity: .85; font-size: .88rem; line-height: 1.5; }
.sp-table-wrap { overflow: auto; border: 1px solid #E5E7EB; border-radius: 14px; }
.sp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sp-table th, .sp-table td { padding: .75rem .85rem; border-bottom: 1px solid #F3F4F6; text-align: start; vertical-align: middle; }
.sp-table th { background: #F9FAFB; font-size: .78rem; color: #6B7280; text-transform: none; }
.sp-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center;
    background: #E5E7EB; font-weight: 700; font-size: .85rem;
}
.sp-avatar--empty { color: #374151; }
.sp-switch { display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; }
.sp-modal-backdrop {
    position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .45);
    display: grid; place-items: center; padding: 1rem;
}
.sp-modal {
    width: min(560px, 100%); max-height: min(90vh, 720px); overflow: auto;
    background: var(--color-surface, #fff); border-radius: 18px; padding: 1.15rem 1.25rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
}
.sp-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.sp-modal__head h3 { margin: 0; font-size: 1.05rem; }
.sp-modal--sm { width: min(420px, 100%); }
.ug-modal { width: min(740px, 100%); }
.products-groups-modal { width: min(820px, 100%); }
.products-groups-modal--wide { width: min(1100px, 100%); max-height: min(92vh, 900px); display: flex; flex-direction: column; }
.pg-layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 1rem; min-height: 420px; flex: 1; overflow: hidden; }
.pg-tree-panel { border: 1px solid var(--admin-border, #E5E7EB); border-radius: 12px; display: flex; flex-direction: column; overflow: hidden; background: #FAFAFA; }
.pg-tree-toolbar { display: flex; flex-wrap: wrap; gap: .35rem; padding: .65rem; border-bottom: 1px solid var(--admin-border, #E5E7EB); background: #fff; }
.pg-tree { overflow: auto; flex: 1; padding: .35rem 0; }
.pg-tree-row { display: flex; align-items: center; gap: .35rem; padding: .4rem .55rem; cursor: pointer; border-radius: 8px; margin: 0 .35rem; user-select: none; }
.pg-tree-row:hover { background: #F3F4F6; }
.pg-tree-row.is-selected { background: #FFEDD5; color: #9A3412; }
.pg-tree-toggle { width: 1.25rem; border: 0; background: transparent; cursor: pointer; color: #6B7280; padding: 0; line-height: 1; }
.pg-tree-toggle--spacer { display: inline-block; width: 1.25rem; }
.pg-tree-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; color: #6B7280; min-width: 2.5rem; }
.pg-tree-row.is-selected .pg-tree-code { color: #C2410C; }
.pg-tree-name { font-weight: 600; font-size: .9rem; }
.pg-detail-panel { border: 1px solid var(--admin-border, #E5E7EB); border-radius: 12px; padding: 1rem; overflow: auto; background: #fff; }
.pg-draft h4, .pg-detail-head h4 { margin: 0 0 .5rem; }
.pg-image-row { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: end; margin-bottom: .75rem; }
.pg-ctx-menu { position: fixed; z-index: 80; min-width: 11rem; background: #fff; border: 1px solid #E5E7EB; border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); padding: .35rem; display: flex; flex-direction: column; }
.pg-ctx-menu button { border: 0; background: transparent; text-align: right; padding: .55rem .7rem; border-radius: 8px; cursor: pointer; font: inherit; }
.pg-ctx-menu button:hover { background: #FFF7ED; color: #C2410C; }
@media (max-width: 860px) {
  .pg-layout { grid-template-columns: 1fr; min-height: 0; }
  .pg-tree-panel { max-height: 240px; }
}
.products-page .products-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.products-toolbar__title {
    display: flex;
    align-items: center;
    gap: .55rem;
}
.products-toolbar__title h3 { margin: 0; font-size: 1.05rem; }
.products-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}
.products-filter {
    min-width: 9rem;
    border: 1px solid #E5E7EB;
    border-radius: 11px;
    padding: .55rem .75rem;
    background: #fff;
    font: inherit;
}
.products-table .products-col-num { width: 2.5rem; color: #9CA3AF; }
.products-table .products-col-thumb { width: 3.25rem; }
.products-thumb {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    object-fit: cover;
    display: block;
    background: #F3F4F6;
}
.products-thumb--empty {
    display: grid;
    place-items: center;
    color: #D1D5DB;
    font-size: .9rem;
}
.products-name { font-size: .95rem; }
.products-price { white-space: nowrap; font-variant-numeric: tabular-nums; }
.products-group-select {
    max-width: 11rem;
    border: 1px solid #E5E7EB;
    border-radius: 9px;
    padding: .35rem .5rem;
    font: inherit;
    font-size: .85rem;
    background: #fff;
}
.products-actions { flex-wrap: wrap; }
.products-empty {
    text-align: center;
    padding: 2rem 1rem !important;
}
.products-empty .btn { margin-top: .65rem; }
.products-subgroup-name { padding-inline-start: .75rem; font-weight: 600; color: #4B5563; }
.ug-role-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: 1rem;
}
.ug-draft {
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    background: #F8FAFC;
}
.ug-draft strong { display: block; font-size: .92rem; }
.ug-draft__row {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .65rem;
    align-items: center;
}
.ug-draft__row input {
    flex: 1 1 12rem;
    min-width: 0;
    border: 1px solid #E5E7EB;
    border-radius: 11px;
    padding: .55rem .8rem;
}
.geo-sel { width: 100%; }
.geo-sel__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem 1rem; }
.geo-sel__ctrl { display: flex; gap: .4rem; align-items: stretch; }
.geo-sel__ctrl .form-input { flex: 1; min-width: 0; }
.geo-map { display: grid; gap: .55rem; }
.geo-map__toolbar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.geo-map__coords { font-size: .82rem; color: #6B7280; font-family: ui-monospace, monospace; }
.geo-map__canvas {
    height: 280px; border-radius: 14px; border: 1px solid #E5E7EB; overflow: hidden; background: #E5E7EB;
}
@media (max-width: 900px) {
    .sp-fields { grid-template-columns: 1fr; }
    .sp-brand-layout { grid-template-columns: 1fr; }
    .sp-list__item { flex-direction: column; }
    .geo-sel__row { grid-template-columns: 1fr; }
}


/* Sepidar Dashboard Template editor (sdt-) inside special-product-settings */
.sdt-shell {
    border-color: #e7e5e4;
    background:
        linear-gradient(165deg, rgba(204, 251, 241, .35) 0%, transparent 38%),
        linear-gradient(180deg, #fafaf9 0%, #fff 42%);
    border-radius: 18px;
    overflow: hidden;
}
.sdt-shell > .sps-card__head {
    padding-bottom: .35rem;
}
.sdt-systems {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .35rem;
    border-radius: 14px;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
}
.sdt-pill {
    border: 1px solid transparent;
    background: transparent;
    color: #57534e;
    border-radius: 10px;
    padding: .42rem .95rem;
    font: inherit;
    font-size: .86rem;
    font-weight: 650;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.sdt-pill:hover {
    border-color: #d6d3d1;
    color: #1c1917;
    background: #fff;
}
.sdt-pill.is-active {
    background: #fff;
    border-color: #99f6e4;
    color: #0f766e;
    box-shadow: 0 1px 2px rgba(28, 25, 23, .06);
}
.sdt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .95rem;
    padding: .65rem .75rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e7e5e4;
}
.sdt-devices {
    display: inline-flex;
    padding: .2rem;
    border-radius: 12px;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
    gap: .15rem;
}
.sdt-device {
    border: 0;
    background: transparent;
    color: #78716c;
    border-radius: 10px;
    padding: .4rem .85rem;
    font: inherit;
    font-size: .84rem;
    font-weight: 650;
    cursor: pointer;
}
.sdt-device.is-active {
    background: #fff;
    color: #1c1917;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.sdt-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.sdt-hint {
    margin: 0 0 .85rem;
    padding: .65rem .85rem;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: .84rem;
    line-height: 1.5;
}
.sdt-toast {
    margin: 0 0 .85rem;
    padding: .65rem .85rem;
    border-radius: 12px;
    font-size: .88rem;
    font-weight: 650;
}
.sdt-toast--ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.sdt-workspace {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
@media (max-width: 960px) {
    .sdt-workspace { grid-template-columns: 1fr; }
}
.sdt-palette {
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    background: #fff;
    padding: .85rem;
    max-height: 640px;
    overflow: auto;
}
.sdt-palette__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .65rem;
}
.sdt-palette__head h3 { margin: 0; font-size: .95rem; }
.sdt-palette__head span { font-size: .75rem; color: #9CA3AF; font-weight: 650; }
.sdt-palette__locked { margin: 0; color: #9CA3AF; font-size: .84rem; line-height: 1.45; }
.sdt-palette__list { display: flex; flex-direction: column; gap: .4rem; }
.sdt-widget-add {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    width: 100%;
    text-align: right;
    border: 1px dashed #D1D5DB;
    background: #F9FAFB;
    border-radius: 12px;
    padding: .55rem .6rem;
    cursor: pointer;
    font: inherit;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.sdt-widget-add:hover {
    border-color: #818CF8;
    background: #EEF2FF;
    transform: translateY(-1px);
}
.sdt-widget-add__plus {
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #EEF2FF;
    color: #4338CA;
    font-weight: 800;
    flex-shrink: 0;
}
.sdt-widget-add__text { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.sdt-widget-add__text strong { font-size: .82rem; color: #111827; }
.sdt-widget-add__text small { color: #9CA3AF; font-size: .72rem; }
.sdt-canvas-wrap { min-width: 0; }
.sdt-canvas {
    background:
        radial-gradient(900px 420px at 100% 0%, rgba(45, 212, 191, .12), transparent 55%),
        radial-gradient(700px 380px at 0% 100%, rgba(251, 146, 60, .08), transparent 50%),
        #0B1220;
    color: #E8EEF7;
    border-radius: 18px;
    padding: 1rem;
    min-height: 420px;
    border: 1px solid rgba(148, 163, 184, .18);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
}
.sdt-canvas--tablet { max-width: 768px; margin-inline: auto; }
.sdt-canvas--mobile { max-width: 390px; margin-inline: auto; }
.sdt-empty {
    min-height: 280px;
    display: grid;
    place-content: center;
    gap: .75rem;
    text-align: center;
    color: #94A3B8;
}
.sdt-row-block { margin-bottom: .95rem; }
.sdt-row { display: grid; gap: .75rem; }
.sdt-cell {
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 14px;
    padding: .75rem .8rem;
    background: linear-gradient(180deg, #151C2C, #1A2336);
    min-height: 108px;
    transition: border-color .15s ease, transform .15s ease;
}
.sdt-cell:hover {
    border-color: rgba(45, 212, 191, .35);
    transform: translateY(-1px);
}
.sdt-cell__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
}
.sdt-cell__top strong { font-size: .86rem; font-weight: 700; }
.sdt-cell__remove {
    border: 0;
    background: rgba(248, 113, 113, .12);
    color: #FCA5A5;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.sdt-cell__remove:hover { background: rgba(248, 113, 113, .22); }
.sdt-cell__meta { margin-top: .35rem; font-size: .72rem; color: #94A3B8; }
.sdt-cell__spark {
    margin-top: .65rem;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(90deg, rgba(45,212,191,.35), rgba(251,146,60,.25), rgba(45,212,191,.15));
    opacity: .85;
}
.sdt-cell__live {
    margin-top: .45rem;
    min-height: 6rem;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(15, 23, 42, .35);
}
.sdt-cell__live .dash-card {
    box-shadow: none;
    border: 0;
    background: transparent;
}
.sdt-row-meta { margin-top: .45rem; color: #94A3B8; font-size: .8rem; }
.sdt-row-meta label { display: inline-flex; align-items: center; gap: .45rem; }
.sdt-cols {
    width: auto;
    min-width: 7rem;
    display: inline-block;
    background: #151C2C;
    color: #E8EEF7;
    border-color: rgba(148, 163, 184, .28);
}

/* Dashboard template: inspector + DnD */
.sdt-workspace--3 {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(220px, 260px);
}
@media (max-width: 1100px) {
    .sdt-workspace--3 { grid-template-columns: 1fr; }
}
.sdt-inspector {
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    background: #fff;
    padding: .85rem;
    position: sticky;
    top: 1rem;
    max-height: 70vh;
    overflow: auto;
}
.sdt-inspector__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
}
.sdt-inspector__head h3 { margin: 0; font-size: .95rem; }
.sdt-inspector__title {
    margin: 0 0 .75rem;
    font-weight: 750;
    font-size: .92rem;
}
.sdt-inspector__body { display: flex; flex-direction: column; gap: .65rem; }
.sdt-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .78rem;
    color: #6B7280;
    font-weight: 650;
}
.sdt-colors { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sdt-colors input[type=color] {
    width: 100%;
    height: 2.2rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: .15rem;
    background: #fff;
}
.sdt-inspector__delete { margin-top: .35rem; }
.sdt-cell.is-selected {
    border-color: rgba(99, 102, 241, .65) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, .25);
}
.sdt-cell--kpi { border-color: rgba(45, 212, 191, .45); }
.sdt-cell--warn { border-color: rgba(251, 146, 60, .55); }
.sdt-cell--glass {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(26,35,54,.9));
    backdrop-filter: blur(6px);
}
.sdt-cell__handle {
    border: 0;
    background: rgba(148,163,184,.12);
    color: #94A3B8;
    border-radius: 8px;
    cursor: grab;
    padding: .1rem .35rem;
    font-size: .75rem;
    letter-spacing: -.05em;
}
.sdt-cell__handle:active { cursor: grabbing; }
.sdt-cell__slot {
    position: absolute;
    inset-inline-start: -4px;
    top: 0;
    bottom: 0;
    width: 8px;
}
.sdt-cell { position: relative; }
.sdt-row__tail {
    min-height: 8px;
    grid-column: 1 / -1;
}
.sdt-drop-zone.is-over,
.sdt-row-block:has(.sdt-cell.is-selected) {
    outline-offset: 2px;
}
.sdt-drop-zone.is-over {
    outline: 2px dashed rgba(45, 212, 191, .55);
    border-radius: 14px;
}
.sdt-widget-add { cursor: grab; }
.sdt-widget-add:active { cursor: grabbing; }
.btn-sm { padding: .25rem .55rem; font-size: .78rem; }
.btn-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.sdt-inspector__tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}
.sdt-inspector__section {
    margin: 0.35rem 0 0.15rem;
    font-size: 0.78rem;
    font-weight: 750;
    color: #374151;
    text-transform: none;
}
.sdt-inspector__note {
    margin: 0.25rem 0 0;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #6B7280;
}
.sdt-inspector__filters {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.sdt-filter-skeleton {
    min-height: 72px;
    border-radius: 10px;
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: sdt-shimmer 1.2s ease-in-out infinite;
}
@keyframes sdt-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.sdt-filter-ms {
    margin-bottom: 0.15rem;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #F9FAFB;
    overflow: hidden;
}
.sdt-filter-ms__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.55rem 0;
}
.sdt-filter-ms__label {
    font-size: 0.76rem;
    color: #6B7280;
    font-weight: 650;
}
.sdt-filter-ms__clear {
    border: 0;
    background: transparent;
    color: #6366F1;
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}
.sdt-filter-ms__search {
    margin: 0.35rem 0.55rem;
    width: calc(100% - 1.1rem);
}
.sdt-filter-ms__list {
    max-height: 140px;
    overflow: auto;
    padding: 0 0.35rem 0.45rem;
}
.sdt-filter-ms__item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.35rem;
    border-radius: 8px;
    font-size: 0.78rem;
    cursor: pointer;
}
.sdt-filter-ms__item.is-on {
    background: rgba(99, 102, 241, 0.1);
}
.sdt-filter-ms__item--all {
    font-weight: 650;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 0.2rem;
    padding-bottom: 0.35rem;
}
.sdt-filter-ms__code {
    margin-inline-start: auto;
    color: #9CA3AF;
    font-size: 0.7rem;
}
.sdt-filter-ms__empty {
    padding: 0.5rem;
    color: #9CA3AF;
    font-size: 0.75rem;
}

.pgw-panel { max-width: 1100px; }
.pgw-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.1rem;
}
.pgw-head h2 { margin: 0 0 .35rem; font-size: 1.12rem; }
.pgw-head p { margin: 0; color: #64748B; max-width: 38rem; line-height: 1.55; font-size: .92rem; }
.pgw-empty {
    text-align: center; padding: 2.4rem 1rem; border: 1px dashed #E2E8F0; border-radius: 18px; background: #F8FAFC;
}
.pgw-empty__mark {
    width: 3.2rem; height: 3.2rem; margin: 0 auto .75rem; border-radius: 16px;
    display: grid; place-items: center; font-size: 1.4rem; font-weight: 800;
    background: linear-gradient(135deg, #ECFDF5, #EFF6FF); color: #0F766E;
}
.pgw-empty h3 { margin: 0 0 .35rem; }
.pgw-empty p { color: #64748B; max-width: 26rem; margin: 0 auto 1rem; }
.pgw-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .85rem;
}
.pgw-card {
    border: 1px solid #E5E7EB; border-radius: 16px; padding: 1rem; background: #fff;
    display: flex; flex-direction: column; gap: .7rem;
}
.pgw-card header { display: flex; gap: .7rem; align-items: center; }
.pgw-card h3 { margin: 0; font-size: .98rem; }
.pgw-card header p { margin: .15rem 0 0; color: #64748B; font-size: .82rem; }
.pgw-card__logo {
    width: 2.5rem; height: 2.5rem; border-radius: 12px; display: grid; place-items: center;
    font-weight: 800; color: #fff; flex: 0 0 auto;
    background: #334155;
}
.pgw-card__logo--zarinpal { background: linear-gradient(135deg, #F59E0B, #EA580C); }
.pgw-card__logo--sep { background: linear-gradient(135deg, #0EA5E9, #2563EB); }
.pgw-card__logo--mellat { background: linear-gradient(135deg, #DC2626, #7F1D1D); }
.pgw-card__badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.pgw-card__hint { margin: 0; color: #64748B; font-size: .8rem; }
.pgw-card__actions { display: flex; gap: .4rem; margin-top: auto; }
.pgw-pill-demo { background: #FEF3C7; color: #B45309; }
.pgw-dialog { width: min(640px, 100%); }
.pgw-dialog--sm { width: min(420px, 100%); }
.pgw-pick { display: grid; gap: .65rem; }
.pgw-pick__card {
    text-align: right; border: 1px solid #E5E7EB; background: #fff; border-radius: 14px;
    padding: .9rem 1rem; cursor: pointer; display: grid; gap: .25rem;
}
.pgw-pick__card strong { font-size: .98rem; }
.pgw-pick__card span { color: #64748B; font-size: .82rem; }
.pgw-pick__card:hover, .pgw-pick__card.is-on {
    border-color: #93C5FD; box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.pgw-toggles { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; margin: .35rem 0 .65rem; }
.pgw-seg { display: inline-flex; border: 1px solid #E5E7EB; border-radius: 999px; overflow: hidden; }
.pgw-seg button {
    border: 0; background: #fff; padding: .4rem .9rem; font-weight: 700; cursor: pointer; color: #64748B;
}
.pgw-seg button.is-on { background: #EFF6FF; color: #1D4ED8; }

.sdt-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: 0 0 1.15rem;
    padding: .3rem;
    border-radius: 14px;
    background: #f5f5f4;
    border: 1px solid #e7e5e4;
}
.sdt-subtabs .sdt-pill {
    flex: 1 1 auto;
    text-align: center;
    min-width: 7.5rem;
}
.mdb-branding__h {
    margin: 1.25rem 0 .65rem;
    font-size: 1rem;
    font-weight: 750;
    color: #312E81;
}
.vs-rich-editor { margin-bottom: 1rem; }
.vs-rich-editor__label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: .3rem;
}
.vs-rich-editor__hint {
    margin: 0 0 .4rem;
    color: #6B7280;
    font-size: .78rem;
}
.mdb-branding__val { font-size: .8rem; color: #4F46E5; font-weight: 700; }

.sdt-display-settings { margin-top: .5rem; }
.sdt-display-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.sdt-display-card {
  border: 1px solid #e7e5e4;
  border-radius: 14px;
  background: #fff;
  padding: 1rem 1.1rem 1.15rem;
}
.sdt-display-card__title {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #1c1917;
}
.sdt-display-options {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-top: .75rem;
}
.sdt-display-option {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: .55rem;
  row-gap: .1rem;
  align-items: center;
  padding: .65rem .75rem;
  border: 1px solid #e7e5e4;
  border-radius: 10px;
  cursor: pointer;
  background: #fafaf9;
}
.sdt-display-option input { grid-row: 1 / span 2; margin: 0; }
.sdt-display-option span { font-weight: 600; color: #292524; font-size: .9rem; }
.sdt-display-option small { grid-column: 2; color: #78716c; font-size: .78rem; }
.sdt-display-option.is-active {
  border-color: #2dd4bf;
  background: #f0fdfa;
  box-shadow: 0 0 0 1px rgba(45, 212, 191, .25);
}
.sdt-display-card--preview { margin-top: 1rem; }
.sdt-display-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.sdt-display-preview-table th,
.sdt-display-preview-table td {
  border-bottom: 1px solid #e7e5e4;
  padding: .55rem .4rem;
  text-align: start;
}
.sdt-display-preview-table th { color: #78716c; font-weight: 600; }
.mdb-preview {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #E0E7FF;
    margin: .4rem 0 1rem;
}
.mdb-preview__stage {
    position: relative;
    min-height: 220px;
    background: #0b1220;
}
.mdb-preview__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,18,32,.15), rgba(11,18,32,.72));
    pointer-events: none;
}
.mdb-preview__logo {
    position: absolute;
    transform: translate(-50%, -50%);
    max-height: 42%;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}
.mdb-preview__copy {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    color: #fff;
    font-size: .86rem;
    line-height: 1.65;
    text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.mdb-preview__copy a { color: #99f6e4; }
.mdb-preview__copy img { max-width: 100%; border-radius: 10px; }
.mdb-notif {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: .75rem;
    align-items: center;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: .85rem 1rem;
    margin-bottom: 1rem;
}
.mdb-notif__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(145deg, #2dd4bf, #0f766e);
}
.mdb-notif__body strong { display: block; font-size: .9rem; }
.mdb-notif__body p { margin: .15rem 0 0; color: #64748B; font-size: .8rem; }
.mdb-notif__img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.pol-dialog { width: min(1080px, 100%); max-height: min(94vh, 920px); }
.pol-dialog--xl {
    width: min(1240px, 100%);
    height: min(96vh, 980px);
    max-height: min(96vh, 980px);
}
.pol-disc-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: .85rem 1.15rem;
    overflow: hidden;
}
.pol-disc-header {
    flex: 0 1 auto;
    max-height: 34%;
    overflow: auto;
    padding-bottom: .25rem;
}
.pol-disc-steps {
    flex: 1 1 auto;
    min-height: 18rem;
    display: flex;
    flex-direction: column;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    background: #F8FAFC;
    overflow: hidden;
}
.pol-disc-steps__bar {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
    padding: .7rem .9rem .55rem;
    border-bottom: 1px solid #E5E7EB;
    background: #fff;
}
.pol-disc-detail-title { margin: 0; font-size: .95rem; }
.pol-disc-steps__bar .builder-muted { margin: .2rem 0 0; }
.pol-disc-grid-wrap {
    flex: 1 1 auto;
    min-height: 12rem;
    overflow: auto;
    background: #fff;
}
.pol-disc-table { margin: 0; }
.pol-disc-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #EEF2FF;
    color: #3730A3;
    border-bottom: 1px solid #C7D2FE;
}
.pol-disc-table td, .pol-disc-table th { vertical-align: middle; }
.pol-disc-num { width: 2.2rem; color: #94A3B8; font-weight: 800; text-align: center; }
.pol-disc-empty { text-align: center; color: #94A3B8; padding: 2rem .75rem !important; }
.pol-disc-select, .pol-disc-table input[type="number"] { width: 100%; min-width: 7rem; }
.pol-disc-product { min-width: 11rem; }
.pol-disc-pct { display: flex; align-items: center; gap: .35rem; }
.pol-disc-pct span { font-weight: 800; color: #64748B; }
.pol-disc-ship { white-space: nowrap; }
.pol-disc-table input.money-input { min-width: 7.5rem; }
.pol-head-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem 1rem;
}
.pol-head-grid .field--span2 { grid-column: span 2; }
.pol-disc-page {
    display: grid;
    gap: 1.15rem;
}
.pol-panel { padding: 0; overflow: hidden; }
.pol-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.15rem .95rem;
    border-bottom: 1px solid #EEF2F7;
}
.pol-panel__head h3 { margin: 0; font-size: 1.02rem; }
.pol-panel__head p {
    margin: .28rem 0 0;
    color: #64748B;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.5;
}
.pol-panel--policy { border-color: #E0E7FF; }
.pol-panel--policy .pol-panel__head {
    background: linear-gradient(180deg, #EEF2FF 0%, #fff 100%);
}
.pol-panel--coupon { border-color: #FFEDD5; }
.pol-panel--coupon .pol-panel__head {
    background: linear-gradient(180deg, #FFF7ED 0%, #fff 100%);
}
.pol-panel .table-wrap { margin: 0; border: 0; border-radius: 0; }
.pol-panel .admin-table { margin: 0; }
.pol-empty {
    margin: 1rem 1.15rem 1.15rem;
    padding: 1.6rem 1rem;
    text-align: center;
    border: 1px dashed #E2E8F0;
    border-radius: 14px;
    background: #F8FAFC;
}
.pol-empty strong { display: block; font-size: .95rem; }
.pol-empty p { margin: .35rem 0 0; color: #64748B; font-size: .84rem; }
.pol-empty--coupon {
    border-color: #FED7AA;
    background: #FFFBEB;
}
.pol-code {
    display: inline-flex;
    align-items: center;
    padding: .18rem .55rem;
    border-radius: 8px;
    background: #FFF7ED;
    color: #C2410C;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 800;
    font-size: .82rem;
    letter-spacing: .04em;
}
.pol-row-actions { white-space: nowrap; }
.pol-mode-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    margin-top: .4rem;
}
.pol-mode-card {
    text-align: start;
    border: 1px solid #E5E7EB;
    background: #fff;
    border-radius: 14px;
    padding: .75rem .85rem;
    cursor: pointer;
    color: #334155;
}
.pol-mode-card strong { display: block; font-size: .86rem; margin-bottom: .3rem; }
.pol-mode-card span { display: block; font-size: .75rem; color: #64748B; line-height: 1.5; font-weight: 500; }
.pol-mode-card.is-on {
    border-color: #22C55E;
    background: #F0FDF4;
    box-shadow: 0 0 0 3px color-mix(in srgb, #22C55E 18%, transparent);
}
.pol-mode-card--exclusive.is-on {
    border-color: #EA580C;
    background: #FFF7ED;
    box-shadow: 0 0 0 3px color-mix(in srgb, #EA580C 16%, transparent);
}
.pol-dialog--coupon .sps-pattern-dialog__head {
    background: linear-gradient(180deg, #FFF7ED, #fff);
    border-bottom: 1px solid #FFEDD5;
}
.pol-mode-radios { display: flex; flex-direction: column; gap: .45rem; margin-top: .35rem; }
.pol-mode-radios label { display: flex; align-items: flex-start; gap: .45rem; font-size: .85rem; line-height: 1.45; cursor: pointer; }
.pol-mode-radios em { display: block; font-style: normal; color: #64748B; font-weight: 500; font-size: .78rem; }
.pol-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.pol-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
    background: #EEF2FF; color: #3730A3;
}
.pol-chip button { border: 0; background: transparent; cursor: pointer; font-weight: 800; color: inherit; }
.pol-soon {
    padding: 2rem 1rem; text-align: center; color: #64748B;
    border: 1px dashed #E2E8F0; border-radius: 16px; background: #F8FAFC;
}
.pol-subtabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: .25rem 0 1rem; }
.pol-subtabs button {
    border: 1px solid #E5E7EB; background: #fff; border-radius: 999px;
    padding: .4rem .9rem; font-weight: 700; cursor: pointer; color: #64748B;
}
.pol-subtabs button.is-on { background: #111827; color: #fff; border-color: #111827; }
.pol-pick { max-height: 14rem; overflow: auto; border: 1px solid #E5E7EB; border-radius: 12px; padding: .5rem .75rem; }
.pol-pick label { display: flex; gap: .5rem; align-items: center; padding: .35rem 0; }
.pol-head-grid .field .builder-muted { display: block; margin-top: .25rem; font-size: .75rem; }
input.money-input {
    direction: ltr;
    text-align: right;
    font-variant-numeric: tabular-nums;
    width: 100%;
}
.pol-amount-table input.money-input { min-width: 8.5rem; }
.pol-price-table th.pol-th-sort { cursor: pointer; user-select: none; }
.pol-price-table th.pol-th-sort.is-on { color: #047857; }
.pol-price-table tr.pol-filters th { font-weight: 500; background: #F0FDF4; }
.pol-col-filter {
    width: 100%; min-width: 4.2rem; font-size: .75rem; font-weight: 500;
    padding: .28rem .45rem; border: 1px solid #D1FAE5; border-radius: 8px; background: #fff;
}
.pol-col-filter:focus { outline: 2px solid color-mix(in srgb, #22C55E 35%, transparent); border-color: #22C55E; }
.pol-check { width: 2.2rem; text-align: center; }
.pol-price-table tr.is-selected td { background: #ECFDF5; }
.pol-price-table tr.is-catalog td { background: linear-gradient(90deg, #F0FDF4 0%, #fff 42%); }
.pol-price-table tr:hover td { background: #F8FAFC; }
.pol-tax-yes { color: #047857; font-weight: 800; }
.pol-tax-no { color: #64748B; font-size: .82rem; font-weight: 600; }
.pol-panel--price { border-color: #BBF7D0; }
.pol-panel--price .pol-panel__head {
    background: linear-gradient(180deg, #ECFDF5 0%, #fff 100%);
}
.pol-price-page { display: grid; gap: 1rem; }
.pol-price-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
}
.pol-price-legend article {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: .85rem .95rem;
}
.pol-price-legend p {
    margin: .4rem 0 0;
    color: #64748B;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.5;
}
.pol-price-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .65rem 1rem;
    padding: .85rem 1.15rem 0;
}
.pol-price-search { flex: 1 1 16rem; min-width: 12rem; }
.pol-price-search span {
    display: block; font-size: .75rem; font-weight: 700; color: #64748B; margin-bottom: .3rem;
}
.pol-price-search input {
    width: 100%;
    border: 1px solid #D1FAE5;
    border-radius: 11px;
    padding: .5rem .75rem;
    background: #fff;
}
.pol-price-sel { color: #64748B; font-size: .8rem; font-weight: 700; margin-inline-start: auto; }
.pol-price-wrap { overflow: auto; }
.pol-sku {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem;
    font-weight: 700;
    color: #334155;
    background: #F1F5F9;
    padding: .12rem .4rem;
    border-radius: 6px;
}
.pol-prod { display: flex; flex-direction: column; gap: .15rem; }
.pol-prod small { color: #64748B; font-size: .75rem; font-weight: 500; }
.pol-price-amt {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #14532D;
    letter-spacing: -.02em;
}
.pol-price-cur { display: block; font-size: .7rem; color: #94A3B8; font-weight: 700; }
.pol-price-acts-h { min-width: 8.5rem; }
.pol-act-del { color: #B91C1C !important; }
.pol-act-del:hover { background: #FEF2F2 !important; }
.pol-empty--price { border-color: #BBF7D0; background: #F0FDF4; }
.pol-dialog--price .sps-pattern-dialog__head {
    background: linear-gradient(180deg, #ECFDF5, #fff);
    border-bottom: 1px solid #D1FAE5;
}
.pol-dialog--confirm { max-width: 28rem; }
@media (max-width: 900px) {
    .pol-price-legend { grid-template-columns: 1fr; }
    .pol-head-grid { grid-template-columns: 1fr; }
    .pol-head-grid .field--span2 { grid-column: auto; }
    .pol-mode-cards { grid-template-columns: 1fr; }
}

/* Storefront product card design (admin preview) */
.card-design-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 900px) {
    .card-design-grid { grid-template-columns: 1fr; }
}
.card-design-toggles {
    display: grid;
    gap: .65rem;
}
.card-design-preview-wrap .sps-card__head {
    align-items: flex-start;
    gap: 1rem;
}
.card-design-preview {
    display: flex;
    justify-content: center;
    padding: 1.25rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, .08), transparent 45%),
        #F8FAFC;
    border-radius: 16px;
}
.card-design-preview .sv-product-card {
    width: min(320px, 100%);
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: var(--product-card-radius, 16px);
    overflow: hidden;
    box-shadow: var(--product-card-shadow, 0 8px 24px rgba(15, 23, 42, .08));
    display: flex;
    flex-direction: column;
}
.card-design-preview .sv-product-card__preview {
    aspect-ratio: var(--product-card-image-ratio, 4/3);
    min-height: 140px;
    background: linear-gradient(145deg, #1E293B, #334155 55%, #0F766E);
    color: #fff;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
}
.card-design-preview__img {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 40%, rgba(255,255,255,.12));
}
.card-design-preview .sv-product-card__preview small,
.card-design-preview .sv-product-card__preview strong {
    position: relative;
    z-index: 1;
}
.card-design-preview .sv-product-card__body {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.card-design-preview .sv-tag {
    display: inline-flex;
    width: fit-content;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: #EFF6FF;
    color: #1D4ED8;
    font-size: .75rem;
    font-weight: 600;
}
.card-design-preview h3 { margin: 0; font-size: 1.05rem; }
.card-design-preview__desc { margin: 0; color: #64748B; font-size: .9rem; line-height: 1.5; }
.card-design-preview .sv-product-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
    justify-content: space-between;
    margin-top: .25rem;
}
.card-design-preview .sv-price { font-weight: 700; }
.card-design-preview .sv-btn {
    border: 0;
    border-radius: 10px;
    padding: .45rem .85rem;
    background: #0F766E;
    color: #fff;
    font: inherit;
}
.card-design-preview .sv-product-card--horizontal { flex-direction: row; width: min(480px, 100%); }
.card-design-preview .sv-product-card--horizontal .sv-product-card__preview {
    width: 42%;
    aspect-ratio: auto;
    min-height: 100%;
}
.card-design-preview .sv-product-card--compact .sv-product-card__body { padding: .85rem; }
.card-design-preview .sv-product-card--featured {
    border-color: #99F6E4;
    box-shadow: 0 12px 32px rgba(15, 118, 110, .18);
}

/* Product card designer v2 */
.pcd-root {
    display: grid; gap: 1.15rem;
    --pcd-teal: #0F766E;
    --pcd-teal-soft: #CCFBF1;
    --pcd-ink: #0F172A;
    --pcd-muted: #64748B;
    --pcd-line: #E2E8F0;
    --pcd-surface: #FFFFFF;
    --pcd-stage: #F1F5F9;
}
.pcd-tabs {
    display: flex; flex-wrap: wrap; gap: .35rem;
    background: linear-gradient(180deg, #F8FAFC, #EEF2F7);
    border: 1px solid var(--pcd-line);
    border-radius: 16px; padding: .4rem;
}
.pcd-tabs__btn {
    border: 0; background: transparent; border-radius: 12px;
    padding: .6rem 1.15rem; font: inherit; font-weight: 700; color: #475569; cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.pcd-tabs__btn:hover { color: var(--pcd-teal); background: rgba(15,118,110,.06); }
.pcd-tabs__btn.is-active {
    background: var(--pcd-surface); color: var(--pcd-teal);
    box-shadow: 0 2px 10px rgba(15,23,42,.08);
}
.pcd-pick { display: grid; gap: .85rem; }
.pcd-pick__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .85rem;
}
.pcd-pick__card {
    position: relative;
    display: grid; gap: .55rem;
    text-align: right;
    border: 1px solid var(--pcd-line);
    border-radius: 16px;
    background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
    padding: .75rem;
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.pcd-pick__card:hover {
    border-color: #99F6E4;
    box-shadow: 0 10px 24px rgba(15, 118, 110, .1);
    transform: translateY(-1px);
}
.pcd-pick__card.is-selected {
    border-color: var(--pcd-teal);
    box-shadow: 0 0 0 2px rgba(15, 118, 110, .18);
    background: #F0FDFA;
}
.pcd-pick__preview {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 110px;
    margin: 0 auto;
    overflow: hidden;
    pointer-events: none;
    border: 1px solid #E2E8F0 !important;
    box-shadow: none !important;
}
.pcd-pick__el {
    position: absolute;
    box-sizing: border-box;
    pointer-events: none;
}
.pcd-pick__ph {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .75rem; color: #94A3B8;
}
.pcd-pick__meta {
    display: grid; gap: .2rem;
}
.pcd-pick__meta strong { font-size: .9rem; color: var(--pcd-ink); }
.pcd-pick__meta code {
    font-size: .68rem; color: #64748B;
    background: #F1F5F9; border-radius: 6px; padding: .1rem .35rem; width: fit-content;
}
.pcd-pick__meta span { font-size: .72rem; color: var(--pcd-muted); }
.pcd-pick__badge {
    position: absolute; top: .55rem; left: .55rem;
    background: var(--pcd-teal); color: #fff;
    font-size: .65rem; font-weight: 800;
    border-radius: 999px; padding: .15rem .5rem;
}
.pcd-pick__actions {
    display: flex; flex-wrap: wrap; gap: .65rem; align-items: center;
    padding-top: .35rem; border-top: 1px solid var(--pcd-line);
}
.pcd-pick__hint { font-size: .78rem; color: var(--pcd-muted); }
.pcd-pick__empty {
    padding: 1.25rem; text-align: center;
    border: 1px dashed var(--pcd-line); border-radius: 14px; background: #F8FAFC;
}
.pcd-pick__empty p { margin: 0 0 .75rem; color: var(--pcd-muted); }
.pcd-subtitle {
    margin: 1rem 0 .45rem; font-size: .82rem; font-weight: 800;
    color: var(--pcd-teal); letter-spacing: .02em;
}
.pcd-style {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
    gap: 1rem; align-items: start;
}
@media (max-width: 960px) {
    .pcd-style { grid-template-columns: 1fr; }
}
.pcd-dim { display: flex; gap: .5rem; align-items: center; }
.pcd-corner-row {
    display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .4rem 0;
}
.pcd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1rem;
    align-items: start;
    direction: ltr;
}
.pcd-layout .pcd-canvas-wrap,
.pcd-layout .pcd-palette { direction: rtl; }
@media (max-width: 1100px) {
    .pcd-layout { grid-template-columns: 1fr; }
}
.es-panel--wide .pcd-layout {
    grid-template-columns: minmax(0, 1fr) 200px;
}
@media (max-width: 900px) {
    .es-panel--wide .pcd-layout { grid-template-columns: 1fr; }
}
.pcd-palette {
    background: var(--pcd-surface);
    border: 1px solid var(--pcd-line);
    border-radius: 18px;
    padding: 1rem .85rem;
    box-shadow: 0 8px 24px rgba(15,23,42,.04);
    position: sticky; top: .75rem;
}
.pcd-palette h3 { margin: 0 0 .35rem; font-size: 1rem; color: var(--pcd-ink); }
.pcd-palette__hint { margin: 0 0 .75rem; font-size: .75rem; color: var(--pcd-muted); line-height: 1.45; }
.pcd-palette__grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
}
.pcd-palette__item {
    border: 1px solid var(--pcd-line); border-radius: 14px;
    background: linear-gradient(180deg, #FCFDFE, #F8FAFC);
    padding: .55rem .35rem; font-size: .7rem; font-weight: 600;
    cursor: grab; text-align: center; color: #334155;
    transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.pcd-palette__item:hover {
    border-color: #99F6E4; background: #F0FDFA; color: var(--pcd-teal);
    transform: translateY(-1px); box-shadow: 0 6px 14px rgba(15,118,110,.1);
}
.pcd-palette__item:active { cursor: grabbing; }
.pcd-palette__icon {
    display: flex; align-items: center; justify-content: center;
    height: 38px; margin: 0 auto .35rem;
    background: linear-gradient(160deg, #F0FDFA, #E8EEF5);
    border: 1px solid #DCE5EF; border-radius: 12px;
    font-size: .88rem; font-weight: 800; color: var(--pcd-teal);
}
.pcd-palette__icon[data-type="image"] { font-size: 1.2rem; }
.pcd-canvas-wrap { display: grid; gap: .65rem; min-width: 0; }
.pcd-stage__meta {
    display: flex; flex-wrap: wrap; gap: .45rem .75rem; align-items: baseline;
    font-size: .85rem; color: #334155;
}
.pcd-stage__meta strong { font-size: .95rem; color: var(--pcd-ink); }
.pcd-stage__badge {
    display: inline-flex; align-items: center;
    background: var(--pcd-teal-soft); border: 1px solid #99F6E4; border-radius: 999px;
    padding: .2rem .7rem; font-size: .75rem; color: var(--pcd-teal); font-weight: 700;
}
.pcd-stage {
    position: relative;
    display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: .65rem;
    padding: 1.35rem;
    background:
        radial-gradient(circle at 20% 20%, rgba(15,118,110,.08), transparent 40%),
        linear-gradient(45deg, #E2E8F0 25%, transparent 25%) -6px 0 / 12px 12px,
        linear-gradient(-45deg, #E2E8F0 25%, transparent 25%) -6px 0 / 12px 12px,
        linear-gradient(45deg, transparent 75%, #E2E8F0 75%) -6px 0 / 12px 12px,
        linear-gradient(-45deg, transparent 75%, #E2E8F0 75%) -6px 0 / 12px 12px,
        var(--pcd-stage);
    border: 1px solid var(--pcd-line);
    border-radius: 20px;
    overflow: visible;
    min-height: 320px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.pcd-stage__ruler {
    font-size: .7rem; color: var(--pcd-muted); align-self: flex-end;
    background: #fff; border: 1px solid var(--pcd-line); border-radius: 999px;
    padding: .15rem .55rem;
}
.pcd-stage__tip { margin: 0; font-size: .8rem; color: var(--pcd-muted); }
.pcd-canvas {
    position: relative;
    box-sizing: border-box;
    background: #fff;
    border: 1.5px solid #0F172A;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    flex: 0 0 auto;
    cursor: default;
    direction: ltr;
    transition: box-shadow .15s ease, outline-color .15s ease;
    max-width: 100%;
}
.pcd-canvas.is-drop-target {
    outline: 2px dashed var(--pcd-teal);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
}
.pcd-canvas.is-dragging { cursor: grabbing; }
.pcd-canvas.is-dragging .pcd-node { pointer-events: none; }
.pcd-canvas.is-dragging .pcd-node.is-dragging { pointer-events: auto; }
.pcd-canvas__empty {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .35rem; color: #94A3B8; font-size: .85rem; pointer-events: none;
    text-align: center; padding: 1rem; direction: rtl;
}
.pcd-node {
    position: absolute; box-sizing: border-box;
    border: 1px solid transparent;
    background: rgba(15, 118, 110, .06);
    cursor: grab;
    min-width: 12px; min-height: 12px;
}
.pcd-node:hover { border-color: #5EEAD4; }
.pcd-node.is-selected {
    border: 2px solid #16A34A;
    box-shadow: 0 0 0 1px #fff inset, 0 8px 20px rgba(22,163,74,.15);
    z-index: 20 !important;
}
.pcd-node.is-dragging {
    cursor: grabbing;
    opacity: .94;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .2);
}
.pcd-node__chrome {
    position: absolute; left: 0; top: -1.4rem;
    pointer-events: none; opacity: 0; transition: opacity .12s ease;
    direction: rtl;
}
.pcd-node.is-selected .pcd-node__chrome,
.pcd-node:hover .pcd-node__chrome { opacity: 1; }
.pcd-node__label {
    display: inline-block;
    font-size: .65rem; font-weight: 700; color: #fff;
    background: #16A34A; border-radius: 5px 5px 0 0;
    padding: .12rem .45rem; white-space: nowrap;
}
.pcd-node__media-btn {
    position: absolute; inset-inline-end: 4px; bottom: 4px; z-index: 4;
    border: 0; border-radius: 8px; padding: .25rem .5rem;
    background: rgba(15,23,42,.82); color: #fff; font: inherit; font-size: .68rem; font-weight: 700;
    cursor: pointer;
}
.pcd-node__media-btn:hover { background: var(--pcd-teal); }
.pcd-handle {
    position: absolute; width: 10px; height: 10px; background: #fff;
    border: 2px solid #16A34A; border-radius: 2px; z-index: 3;
    opacity: 0; pointer-events: none; box-sizing: border-box;
}
.pcd-node.is-selected .pcd-handle { opacity: 1; pointer-events: auto; }
.pcd-handle[data-pcd-handle="nw"] { top: -5px; left: -5px; cursor: nwse-resize; }
.pcd-handle[data-pcd-handle="n"] { top: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.pcd-handle[data-pcd-handle="ne"] { top: -5px; right: -5px; cursor: nesw-resize; }
.pcd-handle[data-pcd-handle="e"] { top: calc(50% - 5px); right: -5px; cursor: ew-resize; }
.pcd-handle[data-pcd-handle="se"] { bottom: -5px; right: -5px; cursor: nwse-resize; }
.pcd-handle[data-pcd-handle="s"] { bottom: -5px; left: calc(50% - 5px); cursor: ns-resize; }
.pcd-handle[data-pcd-handle="sw"] { bottom: -5px; left: -5px; cursor: nesw-resize; }
.pcd-handle[data-pcd-handle="w"] { top: calc(50% - 5px); left: -5px; cursor: ew-resize; }
.pcd-node__preview,
.pcd-node__textedit {
    direction: rtl;
    width: 100%; height: 100%;
    box-sizing: border-box;
    border: 0; background: transparent;
    resize: none; outline: none;
    font: inherit; padding: 2px 4px;
    overflow: hidden;
}
.pcd-node__textedit { cursor: text; background: rgba(255,255,255,.9); }
.pcd-node__img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.pcd-node__img-ph {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: .68rem; color: #64748B; text-align: center; padding: .35rem;
    background: repeating-linear-gradient(45deg, #F1F5F9, #F1F5F9 6px, #E2E8F0 6px, #E2E8F0 12px);
    direction: rtl;
}
.pcd-node__dynlist,
.pcd-live-el__dynlist {
    width: 100%; height: 100%; overflow: auto; direction: rtl;
    font-size: .72rem; color: var(--pcd-ink, #0f172a); pointer-events: none;
}
.pcd-node__dynlist .sv-product-info-items,
.pcd-live-el__dynlist .sv-product-info-items,
.pcd-node__dynlist .sv-card-info-items,
.pcd-live-el__dynlist .sv-card-info-items {
    list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem;
}
.pcd-node__dynlist .sv-product-info-item,
.pcd-live-el__dynlist .sv-product-info-item {
    display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0;
}
.pcd-node__dynlist .sv-product-info-item__media,
.pcd-live-el__dynlist .sv-product-info-item__media {
    object-fit: cover; border-radius: 6px; flex-shrink: 0;
}
.pcd-node__dynlist .sv-card-attributes,
.pcd-live-el__dynlist .sv-card-attributes {
    margin: 0; display: grid; gap: .25rem;
}
.pcd-node__dynlist .sv-card-attributes__row,
.pcd-live-el__dynlist .sv-card-attributes__row {
    display: grid; grid-template-columns: minmax(2.8rem, auto) 1fr; gap: .2rem .4rem; align-items: center;
}
.pcd-node__dynlist .sv-card-attributes__row dt,
.pcd-live-el__dynlist .sv-card-attributes__row dt { margin: 0; font-weight: 700; }
.pcd-node__dynlist .sv-card-attributes__row dd,
.pcd-live-el__dynlist .sv-card-attributes__row dd { margin: 0; }
.pcd-node__dynlist .sv-card-attributes__color,
.pcd-live-el__dynlist .sv-card-attributes__color {
    display: inline-flex; align-items: center; gap: .3rem;
}
.pcd-node__dynlist .sv-card-attributes__color > span:first-child,
.pcd-live-el__dynlist .sv-card-attributes__color > span:first-child {
    display: inline-block; width: .7rem; height: .7rem; border-radius: 999px; border: 1px solid #E2E8F0;
}
.pcd-inspector-dock {
    margin-top: .15rem;
    border: 1px solid #CBD5E1 !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
    background: linear-gradient(180deg, #FFFFFF, #F8FAFC);
}
.pcd-inspector-dock__head {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
    align-items: flex-start; margin-bottom: .75rem;
    padding-bottom: .65rem; border-bottom: 1px solid var(--pcd-line);
}
.pcd-inspector-dock__head h3 { margin: 0; font-size: 1rem; color: var(--pcd-ink); }
.pcd-inspector-dock__sub { margin: .25rem 0 0; font-size: .75rem; color: var(--pcd-muted); }
.pcd-inspector-dock__actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.pcd-inspector-dock__body { max-height: 380px; overflow: auto; padding-inline-end: .25rem; }
.pcd-inspector-dock__body .pcd-subtitle { margin: .85rem 0 .35rem; font-size: .8rem; }
.pcd-fmt, .pcd-align, .pcd-shapes, .pcd-pad {
    display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .5rem 0;
}
.pcd-fmt button, .pcd-align button, .pcd-shapes button {
    border: 1px solid var(--pcd-line); background: #fff; border-radius: 8px;
    min-width: 2rem; padding: .35rem .55rem; cursor: pointer;
}
.pcd-fmt button.is-on, .pcd-align button.is-on, .pcd-shapes button.is-on {
    background: var(--pcd-teal-soft); border-color: #5EEAD4; color: var(--pcd-teal);
}
.pcd-sep { width: 1px; height: 1.4rem; background: var(--pcd-line); margin: 0 .25rem; }
.pcd-pad label { display: inline-flex; gap: .25rem; align-items: center; font-size: .85rem; }
.pcd-pad input { width: 3.2rem; }
.pcd-content-toggles { display: grid; gap: .75rem; margin-top: 1rem; }
.pcd-check {
    display: flex; align-items: center; gap: .65rem; font-weight: 600; color: var(--pcd-ink);
}
.pcd-check input {
    width: 1.15rem; height: 1.15rem; accent-color: #16A34A;
}
.pcd-live {
    border: 1px solid var(--pcd-line);
    border-radius: 20px;
    background:
        radial-gradient(circle at 90% 10%, rgba(15,118,110,.08), transparent 35%),
        linear-gradient(180deg, #FFFFFF, #F8FAFC);
    padding: 1.15rem 1.25rem 1.35rem;
    box-shadow: 0 14px 36px rgba(15,23,42,.06);
}
.pcd-live__head {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
    align-items: flex-start; margin-bottom: 1rem;
}
.pcd-live__title { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--pcd-ink); }
.pcd-live__desc { margin: .3rem 0 0; font-size: .8rem; color: var(--pcd-muted); }
.pcd-live__stage {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .65rem;
    padding: 1.35rem;
    border-radius: 16px;
    background:
        linear-gradient(45deg, #E2E8F0 25%, transparent 25%) 0 0 / 14px 14px,
        linear-gradient(-45deg, #E2E8F0 25%, transparent 25%) 0 0 / 14px 14px,
        #EEF2F7;
    min-height: 240px;
}
.pcd-live__frame {
    flex: 0 0 auto;
    box-sizing: border-box;
    background: #fff;
    border: 1.5px solid #0F172A;
    box-shadow: 0 12px 28px rgba(15,23,42,.12);
}
.pcd-live__size {
    font-size: .72rem; color: var(--pcd-muted);
    background: #fff; border: 1px solid var(--pcd-line); border-radius: 999px;
    padding: .15rem .55rem;
}
.pcd-live__empty {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .35rem; padding: 1rem; text-align: center; direction: rtl; color: #475569;
}
.pcd-live__empty em { font-size: .75rem; color: #94A3B8; font-style: normal; }
.pcd-live-el {
    position: absolute; box-sizing: border-box;
    overflow: hidden;
    pointer-events: none;
}
.pcd-live-el__text {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    direction: rtl; overflow: hidden; padding: 2px;
}
.pcd-live-el img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcd-live-el__ph {
    width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, #F1F5F9, #F1F5F9 6px, #E2E8F0 6px, #E2E8F0 12px);
}
.pcd-live-el__line { width: 100%; height: 100%; box-sizing: border-box; }
.pcd-live-el__line.is-h { border-top-style: solid; border-top-width: 2px; height: 0 !important; align-self: center; }
.pcd-live-el__line.is-v { border-left-style: solid; border-left-width: 2px; width: 0 !important; }
.pcd-live-el__shape {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-size: .65rem; color: #64748B; direction: rtl;
}
.pcd-live__price { font-weight: 800; color: var(--pcd-teal); }
.pcd-media-pick { display: grid; gap: .55rem; }
.pcd-media-pick__thumb {
    width: 100%; max-width: 220px; max-height: 120px; object-fit: cover;
    border-radius: 12px; border: 1px solid var(--pcd-line);
}
.pcd-media-pick__actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pcd-media-pick__url {
    width: 100%; box-sizing: border-box; border: 1px solid var(--pcd-line);
    border-radius: 10px; padding: .45rem .6rem; font: inherit;
}
.pcd-root:focus { outline: none; }
.pcd-root:focus-visible { box-shadow: 0 0 0 2px rgba(15,118,110,.25); border-radius: 12px; }
.card-design-preview-wrap .card-design-preview {
    display: flex; justify-content: center; padding: 1.25rem;
    background: #F1F5F9; border-radius: 14px;
}

/* Product info items (general tab) */
.pii-item {
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    background: #F8FAFC;
    padding: .85rem 1rem;
    margin-bottom: .75rem;
    display: grid;
    gap: .65rem;
}
.pii-item__row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
}
.pii-item__strike { margin-bottom: .35rem; white-space: nowrap; }
.pii-item__fmt {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
}
.pii-item__fmt select,
.pii-item__fmt input[type="number"] {
    min-height: 2rem;
}
.pii-item__fmt button {
    border: 1px solid #E2E8F0;
    background: #fff;
    border-radius: 8px;
    min-width: 2rem;
    padding: .3rem .45rem;
    cursor: pointer;
}
.pii-item__fmt button.is-on {
    background: #CCFBF1;
    border-color: #5EEAD4;
    color: #0F766E;
}
.pii-item__media {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
}
.pii-type-note {
    display: flex; flex-wrap: wrap; gap: .5rem .85rem; align-items: center;
    margin-bottom: 1rem; padding: .65rem .85rem;
    border: 1px dashed #99F6E4; border-radius: 12px; background: #F0FDFA;
    font-size: .85rem; color: #0F766E;
}
.pii-type-note strong { font-weight: 800; }

.pai-need {
    margin-bottom: 1.15rem;
    padding: .85rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #F9FAFB;
}
.pai-need textarea {
    width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 11px;
    padding: .65rem .8rem;
    font: inherit;
    resize: vertical;
    min-height: 5.5rem;
}
.pai-need__opts {
    display: flex;
    flex-wrap: wrap;
    gap: .85rem 1.25rem;
    margin: .65rem 0 .75rem;
}
.pai-need__preview {
    margin-top: .75rem;
    padding: .75rem .85rem;
    border-radius: 10px;
    border: 1px dashed #99F6E4;
    background: #F0FDFA;
    font-size: .9rem;
    color: #134E4A;
}
.pai-need__preview strong { display: block; margin-bottom: .35rem; }
.pai-need__preview p { margin: .35rem 0 0; }
.pai-ai-images {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .85rem 1rem;
    margin-bottom: 1.15rem;
    padding: .85rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #F9FAFB;
}
.pai-ai-images__gen {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem .75rem;
}
.pai-ai-images__count {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .88rem;
    color: #374151;
}
.pai-ai-images__count input {
    width: 3.25rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: .35rem .4rem;
    text-align: center;
    font: inherit;
}
.pai-ai-images__cands {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.pai-ai-cand {
    width: 9.5rem;
}
.pai-ai-cand__preview {
    aspect-ratio: 1;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    background: #F3F4F6;
    overflow: hidden;
    display: grid;
    place-items: center;
}
.pai-ai-cand__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pai-ai-cand__actions {
    display: flex;
    gap: .35rem;
    margin-top: .4rem;
}
.pai-ai-cand__actions .btn {
    flex: 1;
    justify-content: center;
    padding: .3rem .4rem;
    font-size: .8rem;
}

/* AI Page Copilot */
.eb-ai-topbtn { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; color: #fff !important; border: none !important; }
.eb-ai-modal { max-width: 640px; width: min(96vw, 640px); }
.eb-ai-modal--with-history { max-width: 920px; width: min(98vw, 920px); }
.eb-ai-modal__layout { display: grid; grid-template-columns: 240px 1fr; gap: .75rem; min-height: 280px; }
.eb-ai-history { border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; display: flex; flex-direction: column; min-height: 0; }
.eb-ai-history__head { display: flex; align-items: center; justify-content: space-between; padding: .5rem .65rem; border-bottom: 1px solid #e2e8f0; font-size: .85rem; font-weight: 600; }
.eb-ai-history__empty { padding: .75rem; margin: 0; font-size: .8rem; }
.eb-ai-history__list { list-style: none; margin: 0; padding: .35rem; overflow: auto; flex: 1; max-height: 360px; }
.eb-ai-history__item { display: flex; align-items: stretch; gap: .15rem; margin-bottom: .25rem; border-radius: 6px; }
.eb-ai-history__item.is-active { background: #eef2ff; }
.eb-ai-history__pick { flex: 1; text-align: right; border: none; background: transparent; padding: .35rem .45rem; cursor: pointer; border-radius: 6px; }
.eb-ai-history__pick:hover { background: #eef2ff; }
.eb-ai-history__prompt { display: block; font-size: .78rem; color: #334155; line-height: 1.35; }
.eb-ai-history__meta { display: block; font-size: .7rem; color: #94a3b8; margin-top: .15rem; }
.eb-ai-history__badge { display: inline-block; margin-right: .25rem; padding: 0 .3rem; border-radius: 3px; background: #e2e8f0; color: #475569; }
.eb-ai-history__badge--ok { background: #dcfce7; color: #166534; }
.eb-ai-history__badge--err { background: #fee2e2; color: #991b1b; }
.eb-ai-history__delete { border: none; background: transparent; color: #94a3b8; cursor: pointer; padding: 0 .35rem; font-size: 1rem; line-height: 1; }
.eb-ai-history__delete:hover { color: #ef4444; }
.eb-ai-repreview { margin-top: .5rem; }
.eb-ai-modal__head h3 { margin: 0 0 .25rem; }
.eb-ai-prompt { min-height: 120px; resize: vertical; font-family: inherit; }
.eb-ai-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.eb-ai-presets { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .75rem; }
.eb-ai-chip { border: 1px solid #e2e8f0; background: #f8fafc; border-radius: 999px; padding: .25rem .65rem; font-size: .78rem; cursor: pointer; }
.eb-ai-chip:hover { background: #eef2ff; border-color: #c7d2fe; }
.eb-ai-progress { margin-top: .75rem; }
.eb-ai-progress__bar { height: 4px; background: linear-gradient(90deg, #6366f1, #a78bfa, #6366f1); background-size: 200% 100%; animation: eb-ai-shimmer 1.2s linear infinite; border-radius: 4px; }
.eb-ai-progress__msg { font-size: .85rem; color: #64748b; margin: .4rem 0 0; }
@keyframes eb-ai-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.eb-ai-diff-modal { max-width: 960px; width: min(98vw, 960px); }
.eb-ai-diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; max-height: 50vh; overflow: auto; }
.eb-ai-diff-frame { border: 1px solid #e2e8f0; border-radius: 8px; padding: .5rem; min-height: 120px; background: #fff; font-size: .85rem; overflow: auto; }
.eb-ai-warnings { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.eb-ai-warn-chip { font-size: .75rem; background: #fef3c7; color: #92400e; padding: .15rem .45rem; border-radius: 4px; }
.eb-ai-style-panel { margin-bottom: .75rem; padding: .5rem; background: #f8fafc; border-radius: 8px; border: 1px dashed #c7d2fe; }
.eb-ai-style-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.eb-quickbar__btn--ai { background: #eef2ff; color: #4f46e5; font-weight: 600; }
