/* New campaigns module styles — GLOBAL, fully namespaced under .campaigns-index / .campaign-view /
   .campaign-editor so nothing leaks to other admin pages. (This app's host App.razor does not link the
   Blazor CSS-isolation bundle, so component .razor.css files are inert — these live here instead.) */

/* ============================ shared palette ============================ */
.campaigns-index,
.campaign-view,
.campaign-editor {
    --blue: #336699;
    --navy: #333366;
    --line: #dde2e8;
    --line2: #e9edf1;
    --muted: #687483;
    --green: #008b78;
}

/* Breadcrumb (shared look) */
.campaigns-index .crumb,
.campaign-view .crumb,
.campaign-editor .crumb {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin: 0 0 1rem;
    color: #788390;
    font-size: .72rem;
}

.campaign-view .crumb a,
.campaign-editor .crumb a {
    color: var(--blue);
    text-decoration: none;
}

.campaigns-index .crumb strong,
.campaign-view .crumb strong,
.campaign-editor .crumb strong {
    font-weight: 600;
    color: #46515f;
}

.campaigns-index .crumb .slash,
.campaign-view .crumb .slash,
.campaign-editor .crumb .slash {
    color: #b6bdc6;
}

/* Surfaces (shared) */
.campaigns-index .surface,
.campaign-view .surface,
.campaign-editor .surface {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: 0 2px 8px #1f2c3c0a;
}

/* Badges (shared) */
.campaigns-index .badge-pill,
.campaign-view .badge-pill,
.campaign-editor .badge-pill {
    display: inline-flex;
    align-items: center;
    padding: .22rem .65rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

/* dot removed from status pills */
.campaigns-index .badge-pill .dot,
.campaign-view .badge-pill .dot,
.campaign-editor .badge-pill .dot {
    display: none;
}

.campaigns-index .badge-live,
.campaign-view .badge-live,
.campaign-editor .badge-live {
    background: #e8f5f1;
    color: #087663;
}

.campaigns-index .badge-draft,
.campaign-view .badge-draft,
.campaign-editor .badge-draft {
    background: #f4f0e9;
    color: #7e6538;
}

/* Default (neutral) / Active status cells (shared) */
/* Rounded status pills (Default Yes / No, Active / Inactive) */
.campaigns-index .badge-neutral,
.campaign-view .badge-neutral,
.campaign-editor .badge-neutral {
    display: inline-flex;
    align-items: center;
    padding: .22rem .65rem;
    border-radius: 999px;
    background: #eef3f7;
    color: #446a8d;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.campaigns-index .state-active,
.campaign-view .state-active,
.campaign-editor .state-active {
    display: inline-flex;
    align-items: center;
    padding: .22rem .65rem;
    border-radius: 999px;
    background: #e8f5f1;
    color: #087663;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.campaigns-index .badge-off,
.campaign-view .badge-off,
.campaign-editor .badge-off {
    display: inline-flex;
    align-items: center;
    padding: .22rem .65rem;
    border-radius: 999px;
    background: #f2f3f5;
    color: #697586;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.campaigns-index .na,
.campaign-view .na,
.campaign-editor .na {
    color: #a3abb4;
    font-size: .72rem;
}

/* Channel tag (shared) */
.campaigns-index .channel-tag,
.campaign-view .channel-tag {
    display: inline-flex;
    padding: .18rem .6rem;
    margin: 0 .25rem .25rem 0;
    background: #edf3f7;
    color: #4b6b87;
    border-radius: 999px;
    font-size: .68rem;
    white-space: nowrap;
}

/* Primary / ghost buttons (shared) */
.campaign-view .btn-primary-nav,
.campaign-editor .btn-primary-nav,
.campaigns-index .btn-primary-nav {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .85rem;
    border: 1px solid var(--navy);
    border-radius: 2px;
    background: var(--navy);
    color: #fff;
    font-size: .76rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.campaign-view .btn-primary-nav:hover,
.campaign-editor .btn-primary-nav:hover,
.campaigns-index .btn-primary-nav:hover {
    background: #272751;
    color: #fff;
}

.campaign-view .btn-ghost,
.campaign-editor .btn-ghost {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .85rem;
    border: 1px solid #aeb7c1;
    border-radius: 2px;
    background: #fff;
    color: #384452;
    font-size: .76rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.campaign-view .btn-ghost:hover,
.campaign-editor .btn-ghost:hover {
    background: #f1f4f6;
    color: #384452;
}

.campaign-view .btn-danger-soft,
.campaign-editor .btn-danger-soft {
    background: #b23a41;
    border: 1px solid #b23a41;
    color: #fff;
    border-radius: 2px;
    font-size: .76rem;
    font-weight: 600;
    cursor: pointer;
}

/* Publish / Unpublish: solid fill, white text, no hover change — green to publish, red to unpublish. */
.campaign-view .btn-publish,
.campaign-editor .btn-publish,
.campaign-view .btn-unpublish,
.campaign-editor .btn-unpublish {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 .85rem;
    border: 1px solid;
    border-radius: 2px;
    font-size: .76rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
}

.campaign-view .btn-publish,
.campaign-editor .btn-publish {
    background: #3f9d6a;
    border-color: #3f9d6a;
}

.campaign-view .btn-unpublish,
.campaign-editor .btn-unpublish {
    background: #c05a60;
    border-color: #c05a60;
}

/* ============================ Index ============================ */
.campaigns-index .page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.campaigns-index .page-head h1 {
    margin: 0;
    color: #252a33;
    font-size: 1.5rem;
    line-height: 1.25;
    letter-spacing: -.025em;
    font-weight: 700;
}

.campaigns-index .subtitle {
    margin: .3rem 0 0;
    color: var(--muted);
    font-size: .78rem;
}

.campaigns-index .filter-slot {
    margin-bottom: 1rem;
}

.campaigns-index .surface {
    overflow: hidden;
}

.campaigns-index .campaigns-table {
    width: 100%;
    margin: 0;
}

.campaigns-index .campaigns-table thead th {
    background: var(--blue);
    color: #fff;
    text-align: left;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
    padding: .6rem .7rem;
    border: 0;
}

.campaigns-index .campaigns-table tbody td {
    padding: .55rem .7rem;
    border-bottom: 1px solid var(--line2);
    color: #45505e;
    font-size: .76rem;
    vertical-align: middle;
}

.campaigns-index .campaigns-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.campaigns-index .campaigns-table tbody tr:hover {
    background: #eef3f7;
}

.campaigns-index .campaign-name {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.campaigns-index .campaign-name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Row action: text-only "Design" link (no background, no icon) in brand purple, with a soft tinted
   hover that mirrors the read-only view's .btn-danger-soft (same shape, purple instead of red). */
.campaigns-index .btn-design {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 .7rem;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: #6d28d9;
    font-size: .76rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.campaigns-index .btn-design:hover {
    background: #f3effc;
    border-color: #d9ccf5;
    color: #5b21b6;
}

.campaigns-index .table-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .6rem .8rem;
    flex-wrap: wrap;
}

.campaigns-index .result-count {
    color: #788390;
    font-size: .7rem;
    white-space: nowrap;
}

.campaigns-index .empty-state {
    width: 100%;
    padding: 2.4rem 1rem;
}

.campaigns-index .empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid #dbe5ec;
    border-radius: 50%;
    background: #f4f8fb;
    color: var(--blue);
    font-size: 1.3rem;
}

/* ============================ Read-only detail ============================ */

.campaign-view .audit-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.campaign-view .eyebrow {
    text-transform: uppercase;
    letter-spacing: .09em;
    font-size: .62rem;
    font-weight: 700;
    color: #8a94a0;
    margin-bottom: .35rem;
}

/* Breadcrumb under the campaign title (read-only view + editor) */
.crumbs {
    margin-top: .3rem;
    font-size: .74rem;
    font-weight: 600;
    color: #8a94a0;
}

.crumbs a {
    color: #8a94a0;
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--primary-color, #336699);
    text-decoration: underline;
}

/* Channel selector (above the table, below the filters) */
.campaigns-index .channel-select {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .75rem 0 1rem;
    font-size: .8rem;
}

.campaigns-index .channel-select label {
    font-weight: 600;
    color: #585857;
}

.campaigns-index .channel-select select {
    min-width: 230px;
    padding: .4rem .6rem;
    border: 1px solid #d5dde5;
    border-radius: 6px;
    background: #fff;
    font-size: .8rem;
    color: #333;
    cursor: pointer;
}

.campaign-view .audit-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.campaign-view .audit-title h1 {
    margin: 0;
    font-size: 1.6rem;
    letter-spacing: -.02em;
    color: #252a33;
    font-weight: 700;
}

.campaign-view .audit-actions {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
}

.campaign-view .view-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #c9cbd0;
    margin-bottom: 1rem;
}

.campaign-view .view-tabs button {
    position: relative;
    min-height: 39px;
    padding: 0 .9rem;
    border: 0;
    background: transparent;
    color: #65717f;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
}

.campaign-view .view-tabs button.active {
    color: var(--navy);
    background: #e9e7e7;
}

.campaign-view .view-tabs button.active:after {
    position: absolute;
    content: "";
    height: 2px;
    bottom: -1px;
    left: 0;
    right: 0;
    background: var(--blue);
}

.campaign-view .audit-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 2px 8px #1f2c3c0a;
    margin-bottom: 1rem;
    overflow: hidden;
}

.campaign-view .audit-card-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.1rem;
    border-bottom: 1px solid var(--line2);
    background: #f8fafc;
    font-weight: 700;
    font-size: .82rem;
    color: #2a3340;
}

.campaign-view .audit-card-head .ic {
    color: #5a6673;
}

.campaign-view .audit-card-head .card-note {
    margin-left: auto;
    font-weight: 400;
    font-size: .68rem;
    color: #9aa4b0;
}

.campaign-view .audit-card-body {
    padding: .2rem 1.1rem 1rem;
}

.campaign-view .group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 2.5rem;
}

.campaign-view .group {
    padding: 1rem 0 .4rem;
}

.campaign-view .group-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    font-size: .6rem;
    font-weight: 700;
    color: #8a94a0;
    margin-bottom: .8rem;
}

.campaign-view .group-label:after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line2);
}

.campaign-view .group-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem 2.5rem;
}

.campaign-view .fld {
    min-width: 120px;
}

.campaign-view .fld-label {
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: .6rem;
    font-weight: 700;
    color: #7b8591;
    margin-bottom: .3rem;
}

.campaign-view .fld-value {
    color: #2d3742;
    font-size: .82rem;
    font-weight: 600;
}

.campaign-view .audit-card-foot {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    padding: .75rem 1.1rem;
    border-top: 1px solid var(--line2);
    background: #fafbfc;
}

.campaign-view .preview-shell {
    background: #eef1f4;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 1rem;
}

.campaign-view .preview-frame {
    width: 100%;
    min-height: 560px;
    border: 0;
    background: #fff;
    box-shadow: 0 3px 13px #1c2b3c12;
}

.campaign-view .empty-preview {
    padding: 2rem;
    text-align: center;
}


/* ============================ Editor ============================ */
.campaign-editor .editor-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.campaign-editor .editor-head h1 {
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -.025em;
    color: #252a33;
    font-weight: 700;
}

.campaign-editor .editor-head p {
    margin: .35rem 0 0;
    color: var(--muted);
    font-size: .76rem;
}

.campaign-editor .editor-head-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex: none;
}

/* Tabs + action buttons share one row, sitting on the full-width underline */
.campaign-editor .ed-tabsrow {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    border-bottom: 1px solid #c9cbd0;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.campaign-editor .ed-tabsrow .ed-tabs.nav-pills {
    border-bottom: 0;
    margin-bottom: 0;
}

.campaign-editor .ed-tabsrow .editor-head-actions {
    padding-bottom: 7px;
}

/* Tabs (Bootstrap nav-pills restyled to mockup underline tabs) */
.campaign-editor .ed-tabs.nav-pills {
    gap: 0;
    border-bottom: 1px solid #c9cbd0;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
}

.campaign-editor .ed-tabs.nav-pills .nav-link {
    position: relative;
    min-height: 39px;
    padding: 0 .9rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #65717f;
    font-size: .78rem;
    font-weight: 600;
}

.campaign-editor .ed-tabs.nav-pills .nav-link.active {
    background: #e9e7e7;
    color: var(--navy);
}

.campaign-editor .ed-tabs.nav-pills .nav-link.active:after {
    position: absolute;
    content: "";
    height: 2px;
    bottom: -1px;
    left: 0;
    right: 0;
    background: var(--blue);
}

.campaign-editor .editor-card {
    overflow: hidden;
}

/* Only the General form card allows overflow so the SimpleSelector dropdown can float out of it;
   the Design card keeps overflow hidden (the builder manages its own sticky layout). */
.campaign-editor .form-card {
    overflow: visible;
}

/* SimpleSelector (Bootstrap dropdown) must float above the card and the sticky action bar */
.campaign-editor .form-card .dropdown-menu {
    z-index: 2000;
}

.campaign-editor .editor-card-head {
    padding: .9rem 1.1rem;
    border-bottom: 1px solid var(--line2);
}

.campaign-editor .editor-card-head h2 {
    margin: 0;
    color: var(--navy);
    font-size: .85rem;
}

.campaign-editor .editor-card-head p {
    margin: .25rem 0 0;
    color: var(--muted);
    font-size: .72rem;
}

.campaign-editor .editor-form {
    padding: 1rem 1.1rem;
}

.campaign-editor .ed-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem 1rem;
}

.campaign-editor .ed-field.full {
    grid-column: 1 / -1;
}

.campaign-editor .ed-field .form-label {
    display: block;
    margin: 0 0 .3rem;
    color: #4b5663;
    font-size: .7rem;
    font-weight: 700;
}

/* Builder (Design tab) */
.campaign-editor .sc-builder-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--line2);
    font-weight: 700;
    font-size: .82rem;
    color: var(--navy);
}

.campaign-editor .sc-builder-head i {
    color: var(--blue);
}

.campaign-editor .sc-builder-head .sc-builder-hint {
    margin-left: auto;
    font-weight: 500;
    font-size: .72rem;
    color: #a79f93;
}

.campaign-editor .sc-builder-mount {
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    isolation: isolate;
}

/* Design board goes full-bleed (edge to edge) to maximize canvas like Wix/Elementor.
   Counteracts the layout padding: 3rem (outer .px-lg-5) + .75rem (inner .container-fluid)
   on lg+, 1.5rem below. No 100vw, so no scrollbar-induced horizontal scroll. */
.campaign-editor #v-pills-setup > .surface {
    margin-top: -1rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

/* Hide the redundant "Design board" header strip so the canvas rises to the top
   (the tab already says "Design"; the toolbar becomes the top row). */
.campaign-editor #v-pills-setup .sc-builder-head {
    display: none;
}

@media (min-width: 992px) {
    .campaign-editor #v-pills-setup > .surface {
        margin-left: -3.75rem;
        margin-right: -3.75rem;
    }
}

/* Action bar */
.campaign-editor .actionbar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    margin-top: 1rem;
    padding: .7rem .9rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 5px;
    box-shadow: 0 -3px 12px #202b360a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}

.campaign-editor .actionbar-buttons {
    display: flex;
    gap: .45rem;
}

.campaign-editor .btn-block-inline {
    min-height: 34px;
    padding: 0 .85rem;
}

/* Default / Active settings — compact inline switches, side by side */
.campaign-editor .switch-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
}

.campaign-editor .switch-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.campaign-editor .switch-field .form-label {
    margin: 0;
}

/* Toggle switch */
.campaign-editor .sw {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    flex: none;
    margin: 0;
}

.campaign-editor .sw input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.campaign-editor .sw-track {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: #aab3bd;
    transition: background-color .15s;
    cursor: pointer;
}

.campaign-editor .sw-track:after {
    position: absolute;
    content: "";
    left: 3px;
    top: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px #0003;
    transition: transform .15s;
}

.campaign-editor .sw input:checked + .sw-track {
    background: var(--green);
}

.campaign-editor .sw input:checked + .sw-track:after {
    transform: translateX(16px);
}

/* Date policy note */
.campaign-editor .date-policy {
    padding: .7rem .75rem;
    border-left: 3px solid var(--green);
    background: #eff8f5;
    color: #386f65;
    font-size: .68rem;
    line-height: 1.5;
    border-radius: 0 4px 4px 0;
}

.campaign-editor .date-policy strong {
    display: block;
    margin-bottom: .15rem;
    color: #216f60;
}

/* ============================ responsive ============================ */
@media (max-width: 680px) {
    .campaign-editor .sc-builder-head .sc-builder-hint {
        display: none;
    }
}

@media (max-width: 760px) {
    .campaign-view .group-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .campaign-editor .ed-fields {
        grid-template-columns: 1fr;
    }
}

/* --- Drag-to-reorder (single-channel view) --- */
.campaigns-index .grip-col { width: 34px; }
.campaigns-index .order-col { width: 96px; }
.campaigns-index .order-cell {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.campaigns-index .order-arrows {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
}
.campaigns-index .order-arrows button {
    border: 1px solid #d5dde5;
    background: #fff;
    color: #5c6b7a;
    width: 22px;
    height: 15px;
    line-height: 1;
    font-size: .58rem;
    padding: 0;
    cursor: pointer;
}
.campaigns-index .order-arrows button:first-child { border-radius: 5px 5px 0 0; }
.campaigns-index .order-arrows button:last-child { border-radius: 0 0 5px 5px; border-top: 0; }
.campaigns-index .order-arrows button:hover:not(:disabled) { background: #eaf0f6; color: #336699; }
.campaigns-index .order-arrows button:disabled { opacity: .35; cursor: default; }
.campaigns-index tr.reorderable { cursor: default; }
.campaigns-index .row-grip {
    cursor: grab;
    color: #95a1ad;
    font-size: 1rem;
    user-select: none;
    display: inline-block;
    line-height: 1;
}
.campaigns-index .row-grip:active { cursor: grabbing; }
.campaigns-index tr.reorderable:hover .row-grip { color: #336699; }
.campaigns-index .order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eaf0f6;
    color: #24476b;
    font-weight: 700;
    font-size: .78rem;
}

.campaigns-index tr.reorderable td { user-select: none; }
.campaigns-index tr.reorderable .campaign-name { -webkit-user-drag: none; }
.campaigns-index tr.drag-over { box-shadow: inset 0 2px 0 #336699; }

.campaigns-index tr.sc-dragging { opacity: .45; background: #f4f8fc; }

.campaigns-index tr.sc-drop-before { box-shadow: inset 0 2px 0 #336699; }
.campaigns-index tr.sc-drop-after { box-shadow: inset 0 -2px 0 #336699; }

/* --- Design workspace (vistas + idiomas) --- */
.design-ws { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.design-ws .ws-tree { padding: 12px; border-radius: 12px; }
.ws-tree-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ws-tree-head span { font-weight: 700; color: #24476b; font-size: .85rem; }
.ws-add-btn { background: #333366; color: #fff; border: 0; border-radius: 7px; font-size: .74rem; font-weight: 700; padding: .35rem .6rem; cursor: pointer; }
.ws-adder { background: #eaf0f6; border: 1px solid #d7e3ef; border-radius: 9px; padding: 10px; margin-bottom: 10px; }
.ws-adder label { display: block; font-size: .7rem; font-weight: 700; color: #24476b; margin: 4px 0 2px; }
.ws-adder select { width: 100%; padding: .4rem .5rem; border: 1px solid #d5dde5; border-radius: 6px; font-size: .8rem; background: #fff; }
.ws-add-confirm { margin-top: 9px; width: 100%; background: #336699; color: #fff; border: 0; border-radius: 7px; font-size: .78rem; font-weight: 700; padding: .45rem; cursor: pointer; }
.ws-hint-empty { font-size: .76rem; color: #8c99a4; margin: 0; }
.ws-empty { font-size: .78rem; color: #95a1ad; padding: 10px 4px; margin: 0; }
.ws-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ws-item { display: flex; align-items: center; gap: 7px; border: 1px solid #e4e9ef; border-radius: 9px; padding: 8px 10px; cursor: pointer; background: #fff; }
.ws-item:hover { border-color: #b9ccdf; }
.ws-item.on { border-color: #336699; background: #eaf0f6; }
.ws-item-name { font-weight: 700; color: #24476b; font-size: .82rem; }
.ws-lang { font-size: .62rem; font-weight: 800; background: #eef1f4; color: #55606a; border-radius: 5px; padding: .06rem .36rem; }
.ws-status { font-size: .6rem; font-weight: 800; border-radius: 999px; padding: .06rem .42rem; }
.ws-status.on { background: #e8f6ee; color: #3f9d6a; }
.ws-status.empty { background: #fcf3dd; color: #b0790a; }
.ws-del { margin-left: auto; border: 0; background: transparent; color: #b6c0cb; font-size: .9rem; cursor: pointer; line-height: 1; }
.ws-del:hover { color: #c05a60; }
.ws-canvas { padding: 0; min-height: 320px; border-radius: 12px; overflow: hidden; }
.ws-canvas-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 320px; color: #95a1ad; }
.ws-canvas-empty i { font-size: 1.8rem; color: #c3cedb; }
.ws-canvas-empty p { margin: 0; font-size: .85rem; }
@media (max-width: 820px) { .design-ws { grid-template-columns: 1fr; } }

/* --- Design workspace collapse --- */
.ws-head-actions { display: inline-flex; align-items: center; gap: 6px; }
.ws-collapse, .ws-expand { border: 1px solid #d5dde5; background: #fff; color: #5c6b7a; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ws-collapse { width: 28px; height: 28px; font-size: .72rem; }
.ws-collapse:hover, .ws-expand:hover { background: #eaf0f6; color: #336699; }
.design-ws.tree-collapsed { grid-template-columns: 46px 1fr; }
.design-ws.tree-collapsed .ws-tree { padding: 8px; display: flex; justify-content: center; align-items: flex-start; }
.ws-expand { width: 30px; height: 34px; font-size: .8rem; }

/* --- Design workspace v2: combo strip on top (no width stolen from canvas) --- */
.design-ws { display: flex; flex-direction: column; gap: 10px; }
.ws-bar { display: flex; align-items: center; gap: 10px; }
.ws-bar-combos { display: flex; align-items: center; gap: 6px; overflow-x: auto; flex: 1 1 auto; padding-bottom: 2px; scrollbar-width: thin; }
.ws-bar-empty { font-size: .78rem; color: #95a1ad; }
.ws-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e4e9ef; background: #fff; border-radius: 999px; padding: .34rem .7rem; font-size: .78rem; cursor: pointer; white-space: nowrap; flex: 0 0 auto; }
.ws-pill:hover { border-color: #b9ccdf; }
.ws-pill.on { border-color: #336699; background: #eaf0f6; }
.ws-pill-dot { width: 8px; height: 8px; border-radius: 50%; }
.ws-pill-dot.saved { background: #3f9d6a; }
.ws-pill-dot.unsaved { background: #e0b64a; }
.ws-pill-dot.empty { background: #c7cdd4; }
.ws-pill-name { font-weight: 700; color: #24476b; }
.ws-pill-lang { font-size: .64rem; font-weight: 800; color: #7a8794; text-transform: uppercase; }
.ws-pill-x { color: #b6c0cb; font-size: .72rem; line-height: 1; padding-left: 2px; }
.ws-pill-x:hover { color: #c05a60; }
.ws-bar-add { position: relative; flex: 0 0 auto; }
.ws-add-btn { background: #333366; color: #fff; border: 0; border-radius: 8px; font-size: .78rem; font-weight: 700; padding: .45rem .75rem; cursor: pointer; white-space: nowrap; }
.ws-adder-pop { position: absolute; right: 0; top: calc(100% + 6px); width: 240px; background: #fff; border: 1px solid #d5dde5; border-radius: 10px; box-shadow: 0 12px 30px rgba(16,24,40,.14); padding: 12px; z-index: 40; }
.ws-adder-pop label { display: block; font-size: .7rem; font-weight: 700; color: #24476b; margin: 4px 0 2px; }
.ws-adder-pop select { width: 100%; padding: .4rem .5rem; border: 1px solid #d5dde5; border-radius: 6px; font-size: .8rem; background: #fff; }
.ws-adder-pop .ws-add-confirm { margin-top: 10px; width: 100%; background: #336699; color: #fff; border: 0; border-radius: 7px; font-size: .78rem; font-weight: 700; padding: .45rem; cursor: pointer; }
.ws-canvas { width: 100%; }

/* --- Language tabs (primary axis) --- */
.ws-langs { display: inline-flex; gap: 3px; background: #eef1f4; border-radius: 9px; padding: 3px; flex: 0 0 auto; }
.ws-lang-tab { border: 0; background: transparent; color: #5c6b7a; font-size: .76rem; font-weight: 700; padding: .32rem .7rem; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.ws-lang-tab:hover { color: #24476b; }
.ws-lang-tab.on { background: #fff; color: #24476b; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.ws-bar-divider { width: 1px; align-self: stretch; background: #e4e9ef; margin: 2px 2px; flex: 0 0 auto; }

/* --- Language select (replaces tabs; handles 3+ languages) --- */
.ws-lang-select { display: inline-flex; flex-direction: column; gap: 2px; flex: 0 0 auto; }
.ws-lang-select label { font-size: .64rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #8c99a4; }
.ws-lang-select select { padding: .4rem .6rem; border: 1px solid #d5dde5; border-radius: 8px; font-size: .8rem; background: #fff; color: #24476b; font-weight: 700; cursor: pointer; }

/* --- Campaign read-only: views+languages chips & preview combo picker --- */
.campaign-view .fld-wide { flex: 1 1 100%; }
.campaign-view .views-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.campaign-view .view-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #e4e9ef; border-radius: 999px; padding: .3rem .7rem; background: #fff; }
.campaign-view .view-chip .vc-view { font-weight: 700; color: #24476b; font-size: .82rem; }
.campaign-view .view-chip .vc-lang { font-size: .64rem; font-weight: 800; text-transform: uppercase; color: #7a8794; }
.campaign-view .view-chip .vc-dot { width: 8px; height: 8px; border-radius: 50%; }
.campaign-view .view-chip.is-set .vc-dot { background: #3f9d6a; }
.campaign-view .view-chip.is-empty .vc-dot { background: #c7cdd4; }

.campaign-view .preview-combos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.campaign-view .preview-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e4e9ef; background: #fff; border-radius: 999px; padding: .34rem .7rem; cursor: pointer; }
.campaign-view .preview-pill:hover { border-color: #b9ccdf; }
.campaign-view .preview-pill.on { border-color: #336699; background: #eaf0f6; }
.campaign-view .preview-pill .pp-view { font-weight: 700; color: #24476b; font-size: .8rem; }
.campaign-view .preview-pill .pp-lang { font-size: .62rem; font-weight: 800; text-transform: uppercase; color: #7a8794; }
