/* ============================================================
   Full View Creator — Admin Page
   Uses theme.css tokens — light bg, dark text, beige accents
   ============================================================ */

/* ---------- Page layout ---------- */
.fv-page {
    display: flex;
    height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    overflow: hidden;
}

.fv-main {
    flex: 1;
    width: 100%;
    padding: 2.5rem 2.5rem 4rem;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-width: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fv-main::-webkit-scrollbar {
    width: 0;
    height: 0;
}

/* ---------- Header ---------- */
.fv-header {
    margin-bottom: 2.25rem;
}

.fv-header-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.55rem;
}

.fv-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.4rem;
    color: var(--color-text);
    line-height: 1.15;
}

.fv-subtitle {
    font-size: 0.88rem;
    color: var(--color-muted);
    margin: 0;
    max-width: 56ch;
    line-height: 1.6;
}

/* ---------- Step card ---------- */
.fv-step {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
}

.fv-step-heading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.fv-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 1px solid var(--border-strong);
    color: var(--color-text);
    font-size: 0.72rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fv-step-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-dim);
}

.fv-ws-row {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
}

.fv-inline-status {
    margin-top: 0.7rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text-dim);
    font-size: 0.76rem;
    line-height: 1.45;
}

.fv-inline-status--compact {
    margin: 0;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    border-top: 1px solid var(--color-border);
    border-radius: 0;
    padding: 0.45rem 1.25rem;
}

.fv-status--ok {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.24);
    color: #166534;
}

.fv-status--warn {
    background: rgba(234, 179, 8, 0.14);
    border-color: rgba(217, 119, 6, 0.26);
    color: #854d0e;
}

.fv-status--error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.22);
    color: #991b1b;
}

.fv-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: min(360px, calc(100vw - 1.5rem));
    pointer-events: none;
}

.fv-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.62rem 0.72rem;
    border-radius: 0.8rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
    box-shadow: var(--shadow);
    color: var(--color-text);
    font-size: 0.82rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.fv-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fv-toast.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.fv-toast-icon {
    font-size: 1rem;
    margin-top: 0.02rem;
    flex-shrink: 0;
}

.fv-toast-text {
    min-width: 0;
    word-break: break-word;
}

.fv-toast--ok {
    border-color: rgba(34, 197, 94, 0.32);
    background: rgba(34, 197, 94, 0.13);
    color: #166534;
}

.fv-toast--warn {
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(251, 191, 36, 0.17);
    color: #854d0e;
}

.fv-toast--error {
    border-color: rgba(239, 68, 68, 0.32);
    background: rgba(239, 68, 68, 0.14);
    color: #991b1b;
}

/* ---------- Form controls ---------- */
.fv-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-dim);
    margin-bottom: 0.4rem;
}

.fv-select {
    flex: 1;
    padding: 0.6rem 2.4rem 0.6rem 0.85rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.88rem;
    font-family: var(--font-body);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.fv-select:focus {
    outline: none;
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(22, 35, 56, 0.08);
}

.fv-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.88rem;
    font-family: var(--font-body);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.fv-input::placeholder { color: var(--color-muted); }

.fv-input:focus {
    outline: none;
    border-color: var(--color-text);
    box-shadow: 0 0 0 3px rgba(22, 35, 56, 0.08);
}

.fv-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 0.3rem;
    line-height: 1.45;
}

/* ---------- Builder card ---------- */
.fv-builder {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Builder top bar */
.fv-builder-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--color-surface-strong);
}

.fv-builder-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.fv-builder-ws-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fv-builder-badge {
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.18rem 0.5rem;
    background: var(--color-surface);
    color: var(--color-text-dim);
    border: 1px solid var(--color-border);
    border-radius: 99px;
    white-space: nowrap;
}

.fv-builder-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1 1 320px;
    min-width: 0;
    max-width: 100%;
}

/* Active / Live toggle */
.fv-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    user-select: none;
    padding: 0.32rem 0.7rem;
    border-radius: 99px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
    transition: border-color 0.15s, background 0.15s;
}
.fv-toggle-wrap:hover {
    border-color: var(--border-strong);
    background: var(--color-surface);
}

.fv-toggle-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-dim);
}

.fv-toggle {
    position: relative;
    width: 34px;
    height: 19px;
    flex-shrink: 0;
}

.fv-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.fv-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--color-surface);
    border: 1px solid var(--border-strong);
    border-radius: 99px;
    transition: background 0.2s, border-color 0.2s;
}

.fv-toggle-slider::before {
    content: '';
    position: absolute;
    height: 13px;
    width: 13px;
    left: 2px;
    top: 2px;
    background: var(--color-muted);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.fv-toggle input:checked + .fv-toggle-slider {
    background: var(--color-text);
    border-color: var(--color-text);
}

.fv-toggle input:checked + .fv-toggle-slider::before {
    transform: translateX(15px);
    background: var(--color-bg-elevated);
}

/* Share URL bar */
.fv-share-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}

.fv-share-bar-icon {
    color: var(--color-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.fv-share-bar-input {
    flex: 1;
    padding: 0.32rem 0.65rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.78rem;
    font-family: 'Courier New', monospace;
    min-width: 0;
}

.fv-share-bar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    min-height: 30px;
    padding: 0.28rem 0.62rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-elevated);
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.fv-share-bar-action iconify-icon {
    font-size: 0.9rem;
}

.fv-share-bar-action:hover {
    color: var(--color-text);
    border-color: var(--border-strong);
    background: var(--color-surface);
}

.fv-share-bar-action--primary {
    background: var(--color-text);
    border-color: var(--color-text);
    color: var(--color-bg-elevated);
}

.fv-share-bar-action--primary:hover {
    background: #1a2a42;
    border-color: #1a2a42;
    color: #fff;
}

/* Info strip */
.fv-info-strip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    font-size: 0.75rem;
    color: var(--color-muted);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.fv-info-strip iconify-icon { font-size: 0.85rem; flex-shrink: 0; }

.fv-branding-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1.3fr) auto minmax(240px, 1fr);
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    background:
        radial-gradient(circle at top left, rgba(81, 125, 173, 0.14), transparent 42%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 248, 252, 0.98) 100%);
}

.fv-branding-copy {
    min-width: 0;
}

.fv-branding-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-dim);
    margin-bottom: 0.35rem;
}

.fv-branding-sub {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--color-muted);
    max-width: 60ch;
}

.fv-branding-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 74px;
    padding: 0.8rem 0.95rem;
    border-radius: 20px;
    border: 1px solid rgba(120, 143, 170, 0.28);
    background: linear-gradient(135deg, rgba(28, 38, 56, 0.96) 0%, rgba(37, 44, 57, 0.96) 100%);
    box-shadow: 0 12px 30px rgba(20, 28, 43, 0.14);
}

.fv-branding-preview-logo-shell {
    width: 54px;
    height: 54px;
    padding: calc(8px * var(--fv-header-logo-scale, 1) * var(--fv-header-logo-padding-scale, 1)) calc(12px * var(--fv-header-logo-scale, 1) * var(--fv-header-logo-padding-scale, 1));
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.fv-branding-preview-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 0;
    box-sizing: border-box;
}

.fv-branding-preview-logo-placeholder {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.fv-branding-preview-text {
    min-width: 0;
}

.fv-branding-preview-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.fv-branding-preview-sub {
    margin-top: 0.18rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.66);
}

.fv-branding-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
}

.fv-branding-btn-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.fv-branding-size-grid,
.fv-branding-space-grid {
    width: 100%;
    max-width: 280px;
    align-self: stretch;
    display: grid;
    gap: 0.55rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(120, 143, 170, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.46);
}

.fv-branding-size-field {
    display: grid;
    gap: 0.3rem;
}

.fv-branding-size-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-dim);
}

.fv-branding-size-value {
    color: var(--fv-accent);
    font-variant-numeric: tabular-nums;
}

.fv-branding-size-range {
    width: 100%;
    margin: 0;
    accent-color: #5d9eff;
}

.fv-branding-status {
    max-width: 280px;
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--color-muted);
    text-align: right;
}

.fv-branding-status.is-ok {
    color: #166534;
}

.fv-branding-status.is-error {
    color: #991b1b;
}

/* ---------- Tab rows ---------- */
.fv-tabs-list {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 140px;
    background: var(--color-bg);
}

/* Empty state */
.fv-tabs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3.5rem 2rem;
    color: var(--color-muted);
    text-align: center;
}

.fv-tabs-empty iconify-icon {
    font-size: 2.5rem;
    color: var(--color-accent-strong);
}

.fv-tabs-empty p {
    font-size: 0.875rem;
    color: var(--color-muted);
    line-height: 1.55;
    max-width: 26ch;
}

.fv-tabs-empty strong { color: var(--color-text); }

/* Tab row */
.fv-tab-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    cursor: grab;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    user-select: none;
}

.fv-tab-row:hover {
    border-color: var(--border-strong);
    background: var(--color-surface-strong);
    box-shadow: 0 1px 4px rgba(22, 35, 56, 0.07);
}

.fv-tab-row:active { cursor: grabbing; }

.fv-tab-row.dragging {
    opacity: 0.3;
    border-style: dashed;
}

.fv-tab-row.drag-over {
    border-color: var(--color-text);
    background: var(--bg-elev-1);
}

.fv-tab-row--hidden { opacity: 0.45; }

.fv-row-drag {
    color: var(--color-accent-strong);
    flex-shrink: 0;
    cursor: grab;
    font-size: 1rem;
    display: flex;
    align-items: center;
    padding: 0 2px;
    transition: color 0.15s;
}

.fv-tab-row:hover .fv-row-drag { color: var(--color-muted); }

/* Icon bubble */
.fv-row-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    flex-shrink: 0;
    color: var(--color-text);
    overflow: hidden;
}

.fv-row-name {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fv-row-type {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--color-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.fv-row-actions {
    display: flex;
    gap: 0.2rem;
    flex-shrink: 0;
}

.fv-row-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--color-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.fv-row-btn:hover {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}

.fv-row-btn--delete:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ---------- Dialogs ---------- */
/* Override backdrop to use theme styling */
.fv-dialog-backdrop {
    background: rgba(22, 35, 56, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.fv-tab-dialog,
.fv-icon-picker-modal {
    background: var(--color-bg-elevated) !important;
    border: 1px solid var(--color-border) !important;
    color: var(--color-text) !important;
    box-shadow: 0 8px 40px rgba(22, 35, 56, 0.12) !important;
}

.fv-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.1rem 0;
}

.fv-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.fv-field-inline {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.fv-field-inline .fv-label { margin: 0; }

.fv-icon-preview-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.fv-icon-preview {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background:
        linear-gradient(45deg, rgba(22, 35, 56, 0.045) 25%, transparent 25%, transparent 75%, rgba(22, 35, 56, 0.045) 75%),
        linear-gradient(45deg, rgba(22, 35, 56, 0.045) 25%, transparent 25%, transparent 75%, rgba(22, 35, 56, 0.045) 75%),
        var(--color-surface);
    background-position: 0 0, 8px 8px, 0 0;
    background-size: 16px 16px, 16px 16px, auto;
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--color-text);
    flex-shrink: 0;
}

.fv-icon-preview-media,
.fv-sidebar-preview-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
}

.fv-icon-preview-media iconify-icon,
.fv-sidebar-preview-icon iconify-icon {
    font-size: 1.4rem;
}

.fv-icon-preview-media img,
.fv-sidebar-preview-icon img,
.fv-row-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.fv-sidebar-preview-card {
    width: 110px;
    min-height: 102px;
    padding: 0.7rem 0.5rem 0.55rem;
    border-radius: 14px;
    border: 1px solid rgba(83, 127, 173, 0.35);
    background: linear-gradient(180deg, rgba(24, 42, 71, 0.96) 0%, rgba(13, 24, 44, 0.96) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 12px 28px rgba(10, 18, 30, 0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    user-select: none;
}

.fv-sidebar-preview-icon-shell {
    width: 100%;
    height: 56px;
    position: relative;
    border-radius: 10px;
    border: 1px dashed rgba(151, 195, 238, 0.36);
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.fv-sidebar-preview-icon-shell.is-dragging {
    cursor: grabbing;
}

.fv-sidebar-preview-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translate(calc(-50% + var(--fv-preview-icon-offset-x, 0px)), calc(-50% + var(--fv-preview-icon-offset-y, 0px)));
    transition: transform 0.08s linear;
    pointer-events: none;
}

.fv-sidebar-preview-label {
    width: 100%;
    color: rgba(245, 249, 255, 0.94);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    word-break: break-word;
}

.fv-icon-align-row {
    margin-top: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ---------- Icon picker ---------- */
.fv-icon-picker-backdrop {
    background: rgba(22, 35, 56, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.fv-icon-picker-modal {
    max-width: 660px;
    width: 95vw;
    max-height: 80vh;
    overflow-y: auto;
    padding: 1.75rem;
}

.fv-icon-picker-modal::-webkit-scrollbar { width: 4px; }
.fv-icon-picker-modal::-webkit-scrollbar-thumb {
    background: var(--color-accent-strong);
    border-radius: 99px;
}

.fv-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.fv-icon-picker-hint {
    margin-top: -0.45rem;
    margin-bottom: 0.35rem;
}

.fv-icon-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.6rem 0.3rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.12s, background 0.12s, transform 0.1s;
}

.fv-icon-cell iconify-icon {
    font-size: 1.3rem;
    color: var(--color-text);
}

.fv-icon-cell span {
    font-size: 0.6rem;
    color: var(--color-muted);
    text-align: center;
    line-height: 1.2;
    max-width: 68px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fv-icon-cell:hover {
    border-color: var(--border-strong);
    background: var(--color-surface-strong);
    transform: scale(1.04);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .fv-main { padding: 1.25rem 1rem calc(5.9rem + env(safe-area-inset-bottom, 0px)); }
    .fv-ws-row { flex-direction: column; }
    .fv-builder-header { flex-direction: column; align-items: flex-start; }
    .fv-branding-bar { grid-template-columns: 1fr; }
    .fv-branding-preview { width: 100%; max-width: 100%; }
    .fv-branding-actions { align-items: flex-start; }
    .fv-branding-btn-row { justify-content: flex-start; }
    .fv-branding-size-grid,
    .fv-branding-space-grid { max-width: 100%; }
    .fv-branding-status { max-width: none; text-align: left; }
    .fv-row-type { display: none; }
    .fv-icon-grid { grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); }

    .fv-page .dashboard-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 0;
        border-right: none;
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -8px 20px rgba(22, 35, 56, 0.12);
        z-index: 140;
    }

    .fv-page .dashboard-sidebar.sidebar-collapsed {
        width: 100%;
        min-width: 0;
    }

    .fv-page .sidebar-toggle,
    .fv-page .sidebar-footer,
    .fv-page .sidebar-upload-wrap {
        display: none;
    }

    .fv-page .sidebar-nav {
        margin-top: 0;
        padding: 0.4rem 0.45rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
        flex-direction: row;
        align-items: stretch;
        gap: 0.22rem;
        overflow-x: hidden;
        overflow-y: hidden;
        flex-wrap: nowrap;
    }

    .fv-page .sidebar-link {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        margin-right: 0;
        padding: 0.42rem 0.18rem;
        border-radius: var(--radius-sm);
        border: 1px solid transparent;
        flex-direction: column;
        justify-content: center;
        gap: 0.28rem;
    }

    .fv-page .sidebar-link.active {
        border-left-width: 1px;
        border-left-color: var(--border-strong);
        background: var(--color-bg-elevated);
    }

    .fv-page .sidebar-icon {
        width: 20px;
        height: 20px;
    }

    .fv-page .sidebar-icon svg {
        width: 18px;
        height: 18px;
    }

    .fv-page .dashboard-sidebar .sidebar-text {
        opacity: 1;
        width: auto;
        overflow: visible;
        padding: 0;
        margin: 0;
        white-space: nowrap;
        text-align: center;
        font-size: 0.56rem;
        line-height: 1.15;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fv-page .sidebar-collapsed .sidebar-link[data-tooltip]::after {
        display: none;
    }
}
