:root {
  --imp-bg:       #111316;
  --imp-surface:  #1a1d21;
  --imp-surface2: #1d2327;
  --imp-panel:    #2a2e33;
  --imp-border:   #3a3f44;
  --imp-dim:      #555;
  --imp-muted:    #999;
  --imp-text:     #e0e0e0;
  --imp-light:    #f5f5f5;
  --imp-white:    #fff;
}

.impulse-wrap *:focus,
.impulse-wrap *:focus-visible,
.impulse-editor *:focus,
.impulse-editor *:focus-visible,
.instinctor-wrap *:focus,
.instinctor-wrap *:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.impulse-wrap ::selection,
.impulse-editor ::selection,
.instinctor-wrap ::selection {
    background: #555;
    color: #fff;
}
.impulse-wrap ::-moz-selection,
.impulse-editor ::-moz-selection,
.instinctor-wrap ::-moz-selection {
    background: #555;
    color: #fff;
}

.impulse-editor [data-tip],
.impulse-editor [data-tip]:hover,
.impulse-editor [data-tip]:focus,
.impulse-editor [data-tip]:focus-visible,
.impulse-editor [data-tip]:focus-within,
.impulse-editor [data-tip]:active,
.instinctor-wrap [data-tip],
.instinctor-wrap [data-tip]:hover,
.instinctor-wrap [data-tip]:focus,
.instinctor-wrap [data-tip]:focus-visible,
.instinctor-wrap [data-tip]:focus-within,
.instinctor-wrap [data-tip]:active {
    outline: none !important;
    box-shadow: none !important;
}

.instinctor-wrap [data-tip]::before,
.instinctor-wrap [data-tip]::after,
.instinctor-wrap [data-tip]:hover::before,
.instinctor-wrap [data-tip]:hover::after,
.impulse-editor [data-tip]::before,
.impulse-editor [data-tip]::after,
.impulse-editor [data-tip]:hover::before,
.impulse-editor [data-tip]:hover::after {
    content: none !important;
    display: none !important;
    border: none !important;
    outline: none !important;
    background: none !important;
    box-shadow: none !important;
}

.impulse-wrap, .impulse-editor, .impulse-modal, .instinctor-wrap {
    
    --btn-bg: var(--imp-border);
    --btn-border: var(--imp-border);
    --btn-color: var(--imp-muted);
    --btn-hover-bg: #4a4f54;
    --btn-hover-color: var(--imp-text);
    --btn-active-bg: var(--imp-text);
    --btn-active-color: var(--imp-surface2);
    --btn-height: 27px;
    --btn-font: 11px;
    --btn-radius: 3px;
    
    --slider-track: var(--imp-border);
    --slider-track-h: 4px;
    --slider-thumb: var(--imp-white);
    --slider-thumb-size: 9px;
    --slider-thumb-ring: 0 0 0 2px var(--imp-panel), 0 0 0 3px #888;
}

.impulse-btn-group button.active,
.impulse-btn-group-sm button.active,
.impulse-btn-sm.active,
.impulse-view-toggle.active,
.impulse-product-view-toggle button.active,
.impulse-product-type-toggle button.active,
.impulse-category-btn.active,
.impulse-section-anim-effect-btn.active,
.impulse-editor .impulse-btn-group button.active,
.impulse-border-side-btn.active,
.impulse-pcard-toggle {
    background: var(--btn-active-bg) !important;
    border: none !important;
    color: var(--btn-active-color) !important;
    border-radius: var(--btn-radius);
    cursor: pointer;
    font-size: var(--btn-font);
    height: var(--btn-height);
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
}
.impulse-pcard-toggle:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-color);
}
.impulse-pcard-toggle.active {
    background: var(--btn-active-bg) !important;
    color: var(--btn-active-color) !important;
}

.impulse-btn-group button.active:hover,
.impulse-btn-group-sm button.active:hover,
.impulse-btn-sm.active:hover,
.impulse-section-anim-effect-btn.active:hover,
.impulse-border-side-btn.active:hover,
.impulse-editor .impulse-btn-group button.active:hover {
    background: var(--btn-active-bg) !important;
    color: var(--btn-active-color) !important;
}

.impulse-btn-group button:hover,
.impulse-btn-group-sm button:hover,
.impulse-btn-sm:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-color);
}

.impulse-wrap { max-width: 1600px; }

.impulse-editor *::-webkit-scrollbar { display: none; }
.impulse-editor * { scrollbar-width: none; -ms-overflow-style: none; }

.impulse-editor button:focus,
.impulse-editor [type="button"]:focus,
.impulse-editor [role="button"]:focus,
.impulse-wrap button:focus,
.impulse-wrap [type="button"]:focus,
.impulse-modal button:focus,
.impulse-pricing-modal button:focus,
.impulse-icon-picker-modal button:focus,
.impulse-icon-option:focus {
    outline: none !important;
    box-shadow: none !important;
}

.impulse-wrap .wp-picker-container,
.impulse-wrap .wp-picker-holder,
.impulse-wrap .iris-picker,
.impulse-editor .wp-picker-container,
.impulse-editor .wp-picker-holder,
.impulse-editor .iris-picker {
    display: none !important;
}

.impulse-mobile-blocker {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--imp-surface);
    z-index: 999999;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}
.impulse-mobile-blocker-content {
    max-width: 320px;
}
.impulse-mobile-blocker h2 {
    color: var(--imp-white);
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 12px;
}
.impulse-mobile-blocker p {
    color: var(--imp-muted);
    font-size: 14px;
    margin: 0 0 8px;
    line-height: 1.5;
}
.impulse-mobile-blocker-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 20px;
    background: var(--imp-panel);
    color: var(--imp-white);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: background 0.2s;
}
.impulse-mobile-blocker-btn:hover {
    background: var(--imp-border);
    color: var(--imp-white);
}
@media (pointer: coarse) and (max-width: 1024px) {
    .impulse-mobile-blocker { display: flex; }
    .impulse-editor .impulse-topbar,
    .impulse-editor .impulse-main { display: none; }
}

.impulse-slider-row {
    display: flex;
    align-items: center;
    position: relative;
}

.impulse-slider-row input[type="range"] {
    width: 114px;
    height: var(--slider-track-h, 4px);
    -webkit-appearance: none;
    appearance: none;
    background: var(--imp-border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.impulse-slider-row input[type="range"]::-webkit-slider-runnable-track {
    height: var(--slider-track-h, 4px);
    background: transparent;
    border-radius: 2px;
}

.impulse-slider-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px;
    height: 11px;
    background: var(--imp-white);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -3.5px;
    box-shadow: 0 0 0 2px var(--imp-panel);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.impulse-slider-row:hover input[type="range"]::-webkit-slider-thumb,
.impulse-slider-row input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1);
}

.impulse-slider-row input[type="range"]::-moz-range-track {
    height: var(--slider-track-h, 4px);
    background: var(--imp-border);
    border-radius: 2px;
    border: none;
}
.impulse-slider-row input[type="range"]::-moz-range-progress {
    height: var(--slider-track-h, 4px);
    background: var(--imp-muted);
    border-radius: 2px;
}
.impulse-slider-row input[type="range"]::-moz-range-thumb {
    width: 11px;
    height: 11px;
    background: var(--imp-white);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 2px var(--imp-panel);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.impulse-slider-row:hover input[type="range"]::-moz-range-thumb,
.impulse-slider-row input[type="range"]:active::-moz-range-thumb {
    transform: scale(1);
}

.impulse-slider-value {
    font-size: 10px;
    color: #888;
    cursor: ew-resize;
    user-select: none;
    white-space: nowrap;
    border-radius: 3px;
    padding: 0px 4px;
    line-height: 1.3;
    margin-left: auto;
    transition: background 0.15s, color 0.15s;
}
.impulse-slider-value:hover {
    background: var(--imp-panel);
    color: var(--imp-text);
}

.impulse-slider-value-input {
    width: 36px !important;
    height: 14px !important;
    font-size: 10px !important;
    color: var(--imp-text);
    background: var(--imp-panel);
    border: 1px solid var(--imp-dim);
    border-radius: 2px;
    padding: 0 3px !important;
    text-align: right;
    outline: none;
    margin-left: auto;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 14px !important;
    -moz-appearance: textfield;
}
.impulse-slider-value-input::-webkit-inner-spin-button,
.impulse-slider-value-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.impulse-setting-row.inline-slider {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 14px 18px;
    column-gap: 6px;
    max-width: 114px;
}
.impulse-setting-row.inline-slider > label {
    grid-row: 1;
    grid-column: 1;
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    line-height: 14px;
    align-self: center;
}
.impulse-setting-row.inline-slider > .impulse-slider-value {
    grid-row: 1;
    grid-column: 2;
    font-size: 11px;
    line-height: 14px;
    align-self: center;
    text-align: right;
    margin: 0;
}
.impulse-setting-row.inline-slider > .impulse-slider-row {
    grid-row: 2;
    grid-column: 1 / -1;
    align-self: center;
    margin-top: 0;
}

.impulse-editor .impulse-slider-row {
    margin-bottom: 10px;
}

.impulse-editor .impulse-setting-row.inline-slider > label,
.impulse-editor .impulse-checkbox-stacked > label {
    color: var(--imp-muted);
}

.impulse-editor input[type="checkbox"],
.impulse-wrap input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 26px !important;
    height: 14px !important;
    min-width: 26px !important;
    min-height: 14px !important;
    border: 1px solid var(--imp-border) !important;
    border-radius: 3px !important;
    
    background-color: var(--imp-border) !important;
    background-image: radial-gradient(circle, var(--imp-dim) 0%, var(--imp-dim) 100%) !important;
    background-size: 10px 10px !important;
    background-repeat: no-repeat !important;
    background-position: 2px center !important;
    cursor: pointer !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    transition: background-position 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s, border-color 0.15s !important;
}
.impulse-editor input[type="checkbox"]:checked,
.impulse-wrap input[type="checkbox"]:checked {
    background-color: var(--imp-dim) !important;
    background-image: radial-gradient(circle, var(--imp-white) 0%, var(--imp-white) 100%) !important;
    background-position: 14px center !important;
    border-color: var(--imp-dim) !important;
}
.impulse-editor input[type="checkbox"]:focus,
.impulse-wrap input[type="checkbox"]:focus {
    outline: none !important;
    border-color: var(--imp-dim) !important;
}

.impulse-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-size, 250px), 1fr));
    gap: 20px;
    margin-top: 20px;
}

.impulse-page-card {
    background: var(--imp-white);
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s;
}

.impulse-page-card:hover {
    border-color: #ccc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.impulse-page-preview {
    aspect-ratio: 16/10;
    background: var(--imp-light);
    overflow: hidden;
    position: relative;
}

.impulse-page-preview::after {
    content: attr(data-name);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    font-size: 13px;
    color: var(--imp-muted);
    text-align: center;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    z-index: 0;
}
.impulse-page-preview:has(.impulse-preview-img)::after,
.impulse-page-preview:has(.impulse-preview-placeholder)::after,
.impulse-page-preview:has(.impulse-preview-iframe-wrap)::after {
    display: none;
}

.impulse-preview-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--imp-border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.impulse-preview-placeholder img {
    width: 48px;
    height: auto;
    object-fit: contain;
}

.impulse-preview-iframe-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--imp-light);
}
.impulse-preview-iframe-wrap iframe {
    width: 1200px;
    height: 750px;
    transform-origin: 0 0;
    border: none;
    pointer-events: none;
    display: block;
}
.impulse-preview-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--imp-light);
    transition: opacity 0.4s;
    z-index: 1;
}
.impulse-preview-loading span {
    font-size: 28px;
    font-weight: 600;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.impulse-preview-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}

.impulse-grid-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--imp-muted);
    font-size: 13px;
    background: var(--imp-surface);
    z-index: 5;
    pointer-events: none;
}

.impulse-card-status {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    cursor: pointer;
    z-index: 3;
    transition: transform 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.impulse-card-status .status-circle {
    display: block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    
    background: var(--imp-dim);
    box-shadow: 0 0 0 2px var(--imp-panel), 0 0 0 3px #888;
    transition: background 0.15s, box-shadow 0.15s;
}

.impulse-card-status:hover {
    transform: scale(1.4);
}

.impulse-card-status.is-live .status-circle {
    background: var(--imp-text);
    box-shadow: 0 0 0 2px var(--imp-panel), 0 0 0 3px #888;
}

.impulse-card-status.is-trash {
    cursor: default;
}
.impulse-card-status.is-trash .status-circle {
    background: transparent;
    box-shadow: 0 0 0 2px var(--imp-panel), 0 0 0 3px var(--imp-dim);
}
.impulse-card-status.is-trash:hover {
    transform: none;
}

.impulse-page-card.is-open {
    outline: 2px solid var(--imp-dim);
    outline-offset: -2px;
}
.impulse-page-card.is-frontpage {
    outline: 2px solid var(--imp-text);
    outline-offset: -2px;
}
.impulse-page-card.is-frontpage .impulse-page-info {
    background: var(--imp-text);
    border-top: none;
}
.impulse-page-card.is-frontpage .impulse-page-name .name-text,
.impulse-page-card.is-frontpage .impulse-page-name .name-input {
    color: var(--imp-surface2);
}
.impulse-page-card.is-frontpage .impulse-page-name .name-text {
    cursor: default;
}
.impulse-page-card.is-frontpage .impulse-page-name .name-input {
    display: none !important;
}

.impulse-page-card.is-sequence .impulse-page-preview::after {
    content: 'SCENE';
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #888;
    background: rgba(0,0,0,0.5);
    padding: 2px 5px;
    border-radius: 2px;
    pointer-events: none;
}

.impulse-chain-arrow {
    position: absolute;
    pointer-events: none;
    z-index: 10;
}
.impulse-chain-arrow svg { display: block; }

.impulse-page-card.is-frontpage .impulse-set-frontpage {
    color: var(--imp-surface2);
    background: #f0f0f0;
}

.impulse-page-info {
    padding: 5px 8px;
    background: var(--imp-panel);
    border-top: 1px solid var(--imp-border);
}

.impulse-page-name {
    flex: 1;
    min-width: 0;
    position: relative;
}

.impulse-page-name .name-text {
    font-size: 12px;
    font-weight: 500;
    cursor: text;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    color: var(--imp-text);
}

.impulse-page-name .name-text:hover {
    color: var(--imp-white);
}

.impulse-page-name .name-input {
    display: none;
    width: 100%;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--imp-dim);
    border-radius: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: var(--imp-white);
    outline: none;
    box-sizing: border-box;
    caret-color: var(--imp-text);
}

.impulse-page-name .name-input::selection,
.impulse-srow-rename-input::selection {
    background: var(--imp-dim);
    color: var(--imp-white);
}
.impulse-srow-rename-input {
    caret-color: var(--imp-text);
}

.impulse-main-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--imp-white);
    border: 1px solid #cccccc;
    border-radius: 6px;
    color: var(--imp-dim) !important;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.15s;
}

.impulse-main-tab:visited {
    color: var(--imp-dim) !important;
}

.impulse-main-tab:hover {
    background: var(--imp-light);
    border-color: #bbb;
    color: var(--imp-surface2) !important;
}

.impulse-main-tab:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(29,35,39,0.2);
}

.impulse-main-tab.active {
    background: var(--imp-surface2);
    border-color: var(--imp-surface2);
    color: var(--imp-white) !important;
}

.impulse-main-tab.active:hover {
    background: var(--imp-panel);
    border-color: var(--imp-panel);
    color: var(--imp-white) !important;
}

.impulse-main-tab.active:visited,
.impulse-main-tab.active:active {
    color: var(--imp-white) !important;
}

.impulse-main-tab svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.impulse-main-tab.active svg {
    stroke: var(--imp-white);
}

.impulse-page-tab {
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}

.impulse-page-tab:hover {
    color: var(--imp-surface2);
}

.impulse-page-tab.active {
    color: var(--imp-surface2);
    border-bottom-color: var(--imp-surface2);
    font-weight: 500;
}

.impulse-page-tab .count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: var(--imp-text);
    border-radius: 9px;
    font-size: 11px;
    margin-left: 6px;
}

.impulse-page-tab.active .count {
    background: var(--imp-surface2);
    color: var(--imp-white);
}

.impulse-size-slider {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.4);
}

.impulse-size-slider input[type="range"] {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--imp-border);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.impulse-size-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--imp-white);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px;
}

.impulse-size-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: var(--imp-border);
    border-radius: 2px;
}

.impulse-size-slider input[type="range"]::-moz-range-track {
    height: 4px;
    background: var(--imp-border);
    border-radius: 2px;
    border: none;
}

.impulse-size-slider input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--imp-white);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.impulse-kinetic-wt-trigger:hover { border-color: var(--imp-dim); }
.impulse-kinetic-wt-opt:hover { background: rgba(255,255,255,0.08) !important; }

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

.impulse-scrollexit-btn { transition: background 160ms ease-in-out, border-color 160ms ease-in-out; }
.impulse-scrollexit-btn:hover { background: rgba(255,255,255,0.06) !important; }
.impulse-scrollexit-btn.active { background: rgba(255,255,255,0.12) !important; border-color: var(--imp-dim, #555) !important; }
.impulse-numstep-input { height: 26px; box-sizing: border-box; }
.impulse-numstep-arrows {
    position: absolute; right: 1px; top: 1px; bottom: 1px; width: 14px;
    display: flex; flex-direction: column;
}
.impulse-numstep-up, .impulse-numstep-down {
    flex: 1 1 0; display: flex; align-items: center; justify-content: center;
    padding: 0; margin: 0; border: none; background: transparent;
    color: #999; cursor: pointer; line-height: 0;
    transition: color 160ms ease-in-out, background 160ms ease-in-out;
}
.impulse-numstep-up   { border-radius: 0 3px 0 0; }
.impulse-numstep-down { border-radius: 0 0 3px 0; }
.impulse-numstep-up:hover, .impulse-numstep-down:hover { color: #fff; background: rgba(255,255,255,0.10); }
.impulse-numstep-up:active, .impulse-numstep-down:active { background: rgba(255,255,255,0.16); }
.impulse-numstep-up svg, .impulse-numstep-down svg { display: block; }

.impulse-kinetic-size-trigger:hover { border-color: var(--imp-dim); }
.impulse-kinetic-size-opt:hover { background: rgba(255,255,255,0.08) !important; }
.impulse-kinetic-size-menu {
    max-height: 130px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    padding: 52px 0;                 
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%, #000 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 35%, #000 65%, transparent 100%);
}
.impulse-kinetic-size-menu::-webkit-scrollbar { width: 0; height: 0; }

.impulse-tip-left:hover::after {
    content: attr(data-tip);
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #000;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    line-height: 1.3;
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.impulse-select-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--imp-border);
    color: rgba(255,255,255,0.5);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    margin-right: 8px;
    padding: 0;
}
.impulse-select-toggle:hover { color: var(--imp-white); border-color: var(--imp-dim); }
.impulse-select-toggle.active { color: var(--imp-white); background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); }

.impulse-bulk-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
    padding-right: 12px;
    border-right: 1px solid var(--imp-border);
}
.impulse-bulk-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    color: var(--imp-text);
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.impulse-bulk-btn:hover { background: var(--imp-border); color: var(--imp-white); }
.impulse-bulk-btn:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
.impulse-bulk-btn-danger { color: #888; border-color: var(--imp-border); }
.impulse-bulk-btn-danger:hover { background: var(--imp-panel); border-color: var(--imp-dim); color: #888; }
.impulse-bulk-count {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    white-space: nowrap;
    min-width: 60px;
}

#impulse-empty-trash {
    margin-left: auto;
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 500;
    background: var(--imp-white);
    border: 1px solid var(--imp-dim);
    color: var(--imp-dim);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 8px;
}

#impulse-empty-trash:hover {
    background: var(--imp-dim);
    color: var(--imp-white);
}

.impulse-page-card.trashed {
    opacity: 0.85;
}

.impulse-page-card.trashed:hover {
    opacity: 1;
}

.impulse-modal-sm {
    max-width: 400px;
}

.impulse-modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--imp-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.impulse-modal-footer .instinctor-btn {
    padding: 4px 14px;
    height: 26px;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    color: var(--imp-muted);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.impulse-modal-footer .instinctor-btn:hover {
    background: var(--imp-border);
    color: var(--imp-white);
    border-color: #666;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2), 0 6px 16px rgba(0,0,0,0.1);
}

.impulse-modal-footer .instinctor-btn.instinctor-btn-primary {
    background: var(--imp-white);
    border-color: var(--imp-white);
    color: var(--imp-surface2);
}

.impulse-modal-footer .instinctor-btn.instinctor-btn-primary:hover {
    background: var(--imp-text);
    border-color: var(--imp-text);
}

#impulse-confirm-message {
    margin: 0;
    color: var(--imp-muted);
    line-height: 1.5;
}

.impulse-modal-body {
    padding: 16px;
}

.impulse-action-btn.primary,

.impulse-action-btn.primary:hover,

.impulse-status-btn {
    margin-left: auto;
    min-width: 52px;
    background: var(--imp-text);
    border-color: #cccccc;
    color: #666;
}

.impulse-status-btn .status-live { display: none; }
.impulse-status-btn .status-draft { display: inline; }

.impulse-status-btn.is-live {
    background: #888888;
    border-color: #888888;
    color: var(--imp-white);
}

.impulse-status-btn.is-live .status-live { display: inline; }
.impulse-status-btn.is-live .status-draft { display: none; }

.impulse-status-btn:hover {
    opacity: 0.9;
}

.impulse-status-btn.is-live:hover {
    background: var(--imp-border);
    border-color: var(--imp-border);
    color: var(--imp-white);
}

.impulse-empty-trash {
    background: var(--imp-white);
    border: 1px solid #cccccc;
    color: #666;
    font-size: 11px;
    padding: 6px 12px;
}

.impulse-empty-trash:hover {
    background: var(--imp-dim);
    border-color: var(--imp-dim);
    color: var(--imp-white);
}

.impulse-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: var(--imp-white);
    border: 1px solid var(--imp-text);
    border-radius: 8px;
}

.impulse-empty-state h3 { margin: 16px 0 8px; color: var(--imp-surface2); }
.impulse-empty-state p { margin: 0 0 20px; color: #666; }

html.wp-toolbar { padding-top: 0 !important; }
#wpadminbar { display: none !important; }
#adminmenumain, #adminmenuback, #adminmenuwrap { display: none !important; }
#wpcontent, #wpfooter { margin-left: 0 !important; }

body:has(.impulse-editor),
html:has(.impulse-editor) {
    overflow: hidden !important;
    height: 100vh;
}
.impulse-editor {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--imp-light);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    overflow: clip;
    box-sizing: border-box;
}

.media-modal-backdrop {
    z-index: 1000000 !important;
}
.media-modal {
    z-index: 1000001 !important;
}

.media-modal,
.media-modal * {
    pointer-events: auto !important;
}

.media-modal .media-frame,
.media-modal .media-frame-content,
.media-modal .attachments-browser,
.media-modal .media-toolbar,
.media-modal .media-toolbar-primary {
    box-sizing: content-box;
}
.media-modal .media-button,
.media-modal .button,
.media-modal .button-primary,
.media-modal .button.media-button-select {
    pointer-events: auto !important;
    cursor: pointer !important;
    opacity: 1 !important;
}
.media-modal .button[disabled],
.media-modal .button-primary[disabled] {
    pointer-events: none !important;
    opacity: 0.5 !important;
}

.impulse-editor *,
.impulse-editor *::before,
.impulse-editor *::after {
    box-sizing: border-box;
}

.impulse-screen-pro-bar {
    background: #1a1d21;
    color: #999;
    font-size: 11px;
    text-align: center;
    padding: 6px 16px;
    border-bottom: 1px solid #2a2d33;
}
.impulse-screen-pro-bar a {
    color: #e0e0e0;
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
    cursor: pointer;
}
.impulse-screen-pro-bar a:hover { color: #fff; }
#impulse-bug-submit:hover { color: var(--imp-text) !important; border-color: var(--imp-dim) !important; }

.impulse-free-banner {
    background: #1a1d21;
    color: #999;
    font-size: 11px;
    text-align: center;
    padding: 6px 16px;
    letter-spacing: 0.01em;
    border-bottom: 1px solid #2a2d33;
    flex-shrink: 0;
}

.impulse-workspace-grid.two-col-left .impulse-free-banner {
    padding-right: 296px; 
}
.impulse-free-banner a,
.impulse-free-banner .impulse-upgrade-link {
    color: #e0e0e0;
    text-decoration: none;
    margin-left: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s;
    background: transparent;
    border: none;
    padding: 0;
    font: inherit;
}
.impulse-free-banner a:hover,
.impulse-free-banner .impulse-upgrade-link:hover { color: #fff; }

.impulse-topbar {
    min-height: 56px;
    height: auto;
    background: var(--imp-surface2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0;
    flex-shrink: 0;
    position: relative;
}

.impulse-topbar-left,
.impulse-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    padding: 0 16px;
    flex-shrink: 0;
}

.impulse-page-switcher {
    position: relative;
    flex-shrink: 0;
    margin-left: -4px;
}
.impulse-page-switcher-btn {
    width: 22px;
    height: 22px;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    padding: 0;
    transition: color 0.15s ease-in-out, background 0.15s ease-in-out;
}
.impulse-page-switcher-btn:hover { color: var(--imp-text); background: var(--imp-panel); }
.impulse-page-switcher-btn.active { color: var(--imp-white); background: var(--imp-panel); }
.impulse-page-switcher-btn svg { transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1); }
.impulse-page-switcher-btn.active svg { transform: rotate(180deg); }

.impulse-page-switcher-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 160px;
    max-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--imp-surface2);
    border: 1px solid var(--imp-border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4), 0 2px 6px rgba(0,0,0,0.2);
    z-index: 99999;
    scrollbar-width: none;
    transform-origin: top left;
}
.impulse-page-switcher-dropdown::-webkit-scrollbar { display: none; }
.impulse-page-switcher-dropdown.open {
    display: block;
    animation: impulse-dropdown-enter 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes impulse-dropdown-enter {
    0%   { opacity: 0; transform: translateY(-10px) scaleY(0.92); }
    100% { opacity: 1; transform: translateY(0) scaleY(1); }
}
.impulse-page-switcher-item {
    display: flex;
    align-items: center;
    padding: 7px 12px;
    font-size: 11px;
    color: var(--imp-muted);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.1s ease-in-out, color 0.1s ease-in-out;
    gap: 8px;
}
.impulse-page-switcher-item:hover { background: var(--imp-panel); color: var(--imp-text); }
.impulse-page-switcher-item.current { color: var(--imp-white); }
.impulse-page-switcher-item.current::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--imp-white);
    flex-shrink: 0;
}
.impulse-page-switcher-item:not(.current)::before {
    content: '';
    width: 4px;
    height: 4px;
    flex-shrink: 0;
}
.impulse-page-switcher-item:first-child { border-radius: 5px 5px 0 0; }
.impulse-page-switcher-item:last-child  { border-radius: 0 0 5px 5px; }
.impulse-page-switcher-action { font-size: 11px; letter-spacing: 0.2px; }
.impulse-page-switcher-action:hover { color: var(--imp-text) !important; }

.impulse-topbar-list-row {
    flex-basis: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-top: 1px solid var(--imp-panel);
    background: var(--imp-surface2);
    flex-shrink: 0;
    overflow: hidden;
}
.impulse-topbar-center {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 56px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.impulse-workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.impulse-workspace .impulse-workspace-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr 280px;
    min-height: 0;
    height: 100%;
    background: var(--imp-surface);
}

.impulse-workspace .impulse-workspace-grid.two-col-left {
    grid-template-columns: 280px 1fr;
}

.impulse-workspace .impulse-workspace-grid .impulse-panel-center {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.impulse-workspace .impulse-workspace-grid .impulse-panel-left,
.impulse-workspace .impulse-workspace-grid .impulse-panel-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    background: var(--imp-surface);
    overflow: hidden;
    min-height: 0;
}
.impulse-workspace .impulse-workspace-grid .impulse-panel-left {
}
.impulse-workspace .impulse-workspace-grid .impulse-panel-right {
}

.impulse-dashboard-filters,

.impulse-store-grid {
    grid-template-columns: 280px 1fr 280px;
    grid-template-rows: auto 1fr;
    align-content: start;
}

.impulse-store-grid > .impulse-panel-right {
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease-in-out;
    transform: translateX(0);
    opacity: 1;
}
.impulse-workspace .impulse-store-grid.right-collapsed {
    grid-template-columns: 280px 1fr;
}
.impulse-workspace .impulse-store-grid.right-collapsed > .impulse-panel-right {
    display: none;
}

.impulse-store-grid > .impulse-panel-left,
.impulse-store-grid > .impulse-panel-center,
.impulse-store-grid > .impulse-panel-right { grid-row: 2; height: 100%; min-height: 0; }

.impulse-seo-grid {
    grid-template-columns: 280px 1fr 280px;
    height: 100%;
    overflow: hidden;
}

.impulse-seo-grid .impulse-panel-tabs {
    background: var(--imp-surface);
    border-bottom: 1px solid var(--imp-border);
}
.impulse-seo-grid .impulse-panel-tab {
    height: 38px;
    padding: 0 8px;
    color: #ccc;
    font-size: 11px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.impulse-seo-grid .impulse-panel-tab:hover {
    color: var(--imp-white);
    background: rgba(255,255,255,0.05);
}
.impulse-seo-grid .impulse-panel-tab.active {
    color: var(--imp-white);
    background: var(--imp-panel);
    border-bottom-color: var(--imp-white);
    font-weight: 600;
}

.impulse-seo-grid .impulse-panel-tab.is-default,
.impulse-store-nav-btn.is-default,
.impulse-device-tab.is-default {
    border-bottom: 2px solid rgba(255,255,255,0.45);
}
.impulse-seo-center {
    background: var(--imp-surface);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.impulse-seo-center > #seo-center-empty {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.impulse-seo-center > #seo-page-editor,
.impulse-seo-center > #traffic-dashboard {
    position: relative;
    z-index: 1;
    background: var(--imp-surface);
}

.seo-dark-input,
#seo-page-editor input[type="text"],
#seo-page-editor textarea,
#seo-redir-editor input[type="text"],
#seo-redir-editor select,
#store-seo-settings-center-inner input[type="text"],
#store-seo-settings-center-inner textarea,
#store-seo-settings-left input[type="text"],
#store-lb-schema-content input[type="text"],
.seo-settings-input {
    width: 100%;
    height: 26px !important;
    padding: 0 8px;
    font-size: 11px;
    background: var(--imp-panel) !important;
    border: 1px solid var(--imp-border) !important;
    border-radius: 3px;
    color: var(--imp-text) !important;
    box-sizing: border-box;
    box-shadow: none !important;
    outline: none;
    font-family: inherit;
}
#seo-page-editor textarea,
#seo-redir-editor textarea,
#store-seo-settings-center-inner textarea,
#store-seo-settings-left textarea,
.seo-dark-input[rows] {
    height: auto !important;
    padding: 6px 8px !important;
    line-height: 1.5;
}
.seo-dark-input:focus,
#seo-page-editor input:focus,
#seo-page-editor textarea:focus,
#store-seo-settings-center-inner input:focus,
#store-seo-settings-left input:focus,
#store-lb-schema-content input:focus {
    border-color: var(--imp-dim) !important;
    box-shadow: none !important;
    outline: none !important;
}
.seo-dark-input::placeholder,
#seo-page-editor input::placeholder,
#seo-page-editor textarea::placeholder,
#seo-redir-editor input::placeholder,
#store-seo-settings-center-inner input::placeholder,
#store-seo-settings-center-inner textarea::placeholder,
#store-seo-settings-left input::placeholder,
#store-lb-schema-content input::placeholder { color: #666; }

#store-seo-settings-center-inner button {
    height: 26px !important;
    box-sizing: border-box;
    padding: 0 10px;
    line-height: 1;
}

#cur-code-list::-webkit-scrollbar { display: none; }

.seo-field-label {
    display: block;
    font-size: 11px;
    color: var(--imp-muted);
    margin-bottom: 3px;
}

.seo-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

@media (max-width: 1200px) {
    
    .seo-settings-two-col {
        grid-template-columns: 1fr !important;
    }
    
    #seo-pages-list.grid-mode {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .store-settings-payments-grid {
        grid-template-columns: 1fr !important;
    }
}
@media (max-width: 900px) {
    
    #seo-pages-list.grid-mode {
        grid-template-columns: 1fr !important;
    }
}

.seo-editor-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}
.seo-editor-col {
    display: flex;
    flex-direction: column;
}
.seo-col-heading {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--imp-dim);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--imp-panel);
}

.impulse-seo-serp-preview {
    background: var(--imp-white);
    border-radius: 3px;
    padding: 10px 12px;
    font-family: Arial, sans-serif;
    cursor: default;
}
.seo-serp-url {
    font-size: 11px;
    color: #5f6368;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.seo-serp-url::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--imp-text);
    border-radius: 3px;
    flex-shrink: 0;
}
.seo-serp-title {
    font-size: 17px;
    color: #1a0dab;
    line-height: 1.3;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.seo-serp-title.truncated { opacity: .55; }
.seo-serp-desc {
    font-size: 12px;
    color: #4a4f54;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.seo-char-bar { height: 2px; background: var(--imp-panel); margin-top: 3px; overflow: hidden; }
.seo-char-bar-fill { height: 100%; width: 0; background: var(--imp-text); transition: width .15s, background .15s; }
.seo-char-bar-fill.warn { background: #777; }
.seo-char-bar-fill.over { background: var(--imp-dim); }
.seo-char-bar-fill.good { background: var(--imp-text); }

.seo-check-item {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 5px 0;
    font-size: 11px;
    color: #bbb;
    border-bottom: 1px solid #22252a;
    background: none;
    border-left: none;
}
.seo-check-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
    width: 17px;
    height: 17px;
}
.seo-check-item .seo-check-icon { color: var(--imp-text); }

.seo-img-row { border-bottom: 1px solid var(--imp-panel); position: relative; }
.seo-img-row-head {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    cursor: pointer;
    flex-wrap: nowrap;
}
.seo-img-row-head:hover { background: rgba(255,255,255,0.02); }
.seo-img-thumb-cell  { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 3px; overflow: hidden; box-sizing: border-box; }
.seo-img-name-cell   { flex: 1 1 160px; min-width: 0; max-width: 200px; overflow: hidden; }
.seo-img-alt-cell    { flex: 1 1 0; min-width: 0; font-size: 11px; color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-img-badge-cell  { flex: 0 0 68px; text-align: right; }
.seo-img-chevron     { flex: 0 0 14px; color: var(--imp-dim); font-size: 11px; text-align: center; transition: transform 0.2s ease-in-out; }
.seo-img-row-body {
    display: none;
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 150px;
    z-index: 10;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
}

.seo-view-btn {
    width: 24px; height: 24px; padding: 0;
    background: none; border: 1px solid var(--imp-border);
    border-radius: 3px; color: var(--imp-dim); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.1s, background 0.1s;
}
.seo-view-btn.active { background: var(--imp-panel); color: var(--imp-text); border-color: var(--imp-dim); }
.seo-view-btn:not(.active):hover { color: var(--imp-muted); }

#seo-pages-list.grid-mode {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
}
.seo-page-card {
    border-radius: 4px; overflow: hidden; cursor: pointer;
    background: var(--imp-panel); border: 2px solid transparent;
    transition: border-color 0.15s;
}
.seo-page-card:hover   { border-color: var(--imp-dim); }
.seo-page-card.active  { border-color: var(--imp-text); }
.seo-page-card-thumb   {
    overflow: hidden; background: var(--imp-surface);
    position: relative;
}
.seo-page-card-thumb img { width: 100%; height: auto; display: block; }
.seo-page-card-thumb .seo-page-card-no-thumb {
    aspect-ratio: 16/9;
    display: flex; align-items: center; justify-content: center;
}
.seo-page-card-foot {
    padding: 5px 6px; display: flex; align-items: center; gap: 4px;
}
.seo-page-card-name {
    flex: 1; min-width: 0; font-size: 10px; color: var(--imp-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seo-page-card-score { font-size: 11px; font-weight: 600; color: var(--imp-dim); flex-shrink: 0; }
.seo-page-card-score.s-high { color: var(--imp-text); }
.seo-page-card-score.s-mid  { color: var(--imp-muted); }
.seo-page-card-score.s-low  { color: #666; }

.seo-page-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid #22252a;
    transition: background .1s;
}
.seo-page-row:hover  { background: #22252a; }
.seo-page-row.active { background: var(--imp-panel); }
.seo-page-row-info   { flex: 1; min-width: 0; }
.seo-page-row-name   { font-size: 11px; color: var(--imp-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; cursor: default; }
.seo-page-row-score  { font-size: 11px; font-weight: 600; color: var(--imp-dim); flex-shrink: 0; min-width: 28px; text-align: right; }
.seo-page-row-score.s-high { color: var(--imp-text); }
.seo-page-row-score.s-mid  { color: var(--imp-muted); }
.seo-page-row-score.s-low  { color: #666; }

.seo-redirect-row {
    padding: 7px 12px;
    border-bottom: 1px solid #22252a;
    font-size: 11px;
    cursor: pointer;
    transition: background .1s;
}
.seo-redirect-row:hover  { background: #22252a; }
.seo-redirect-row.active { background: var(--imp-panel); }
.seo-redirect-from { color: var(--imp-text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-redirect-to   { color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seo-redirect-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.seo-redirect-type { font-size: 11px; color: var(--imp-dim); background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 2px; padding: 1px 4px; }
.seo-redirect-hits { font-size: 11px; color: var(--imp-dim); }
.seo-redirect-inactive { opacity: .4; }

.seo-store-info-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #22252a;
    font-size: 11px;
}
.seo-store-info-label { color: var(--imp-dim); flex-shrink: 0; }
.seo-store-info-val   { color: var(--imp-muted); text-align: right; word-break: break-all; }

.imp-list-scroll { max-height: 320px; overflow-y: auto; }
.imp-list-scroll::-webkit-scrollbar { width: 6px; }
.imp-list-scroll::-webkit-scrollbar-thumb { background: #2a2e33; border-radius: 3px; }
.imp-list-scroll::-webkit-scrollbar-track { background: transparent; }

.seo-stat-card {
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    padding: 8px 10px;
    text-align: center;
}
.seo-stat-card[data-filter], .seo-stat-card-clickable { cursor: pointer; transition: border-color .15s; }
.seo-stat-card[data-filter]:hover, .seo-stat-card-clickable:hover { border-color: #666; }
.seo-stat-card[data-filter].active, .seo-stat-card-clickable.active { border-color: var(--imp-text); background: var(--imp-panel); }
.seo-stat-card-num   { font-size: 20px; font-weight: 700; color: var(--imp-text); line-height: 1; }
.seo-stat-card-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.seo-stat-card-action { font-size: 10px; color: var(--imp-dim); margin-top: 4px; }
.seo-stat-card[data-filter]:hover .seo-stat-card-action { color: var(--imp-muted); }
.seo-fill-btn { width:100%; margin-top:4px; height:22px; font-size:10px; padding:0 6px; }
.seo-batch-progress { font-size:11px; color:#888; margin-top:6px; text-align:center; }

.seo-redir-stat-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid #22252a; font-size: 11px; }
.seo-redir-stat-label { color: #777; }
.seo-redir-stat-value { color: var(--imp-text); }

.impulse-store-nav {
    display: flex;
    background: var(--imp-surface);
    border-bottom: 1px solid var(--imp-border);
    flex-shrink: 0;
}
.impulse-store-nav-btn {
    flex: 1;
    height: 38px;
    padding: 0 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #ccc;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.impulse-store-nav-btn:hover {
    color: var(--imp-white);
    background: rgba(255,255,255,0.05);
}
.impulse-store-nav-btn.active {
    color: var(--imp-white);
    background: var(--imp-panel);
    border-bottom-color: var(--imp-white);
    font-weight: 600;
}

.impulse-store-left-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.impulse-store-left-content[data-section="settings"] {
    overflow-y: hidden;
}

.impulse-store-left-bottom {
    flex-shrink: 0;
    padding: 0 10px 10px;
    border-top: 1px solid var(--imp-panel);
}
.impulse-store-left-bottom .impulse-section-divider {
    margin: 8px 0 8px;
}
.impulse-filter-section > .impulse-section-divider:first-child {
    margin-top: 0;
}
.impulse-client-order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--imp-panel);
    cursor: pointer;
    gap: 8px;
}
.impulse-client-order-row:hover { background: rgba(255,255,255,0.02); }
.impulse-client-order-row:last-child { border-bottom: none; }
.impulse-store-left-bottom .impulse-inventory-stats {
    margin: 0;
}

.impulse-section-view { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }

.impulse-feature-card {
    background: var(--imp-panel);
    border-radius: 4px;
    border: 1px solid transparent;
    overflow: hidden;
    transition: border-color 0.15s;
}
.impulse-feature-card.expanded { border-color: var(--imp-dim); }
.impulse-feature-card-header {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    gap: 8px;
    user-select: none;
}
.impulse-feature-card-header:hover { background: var(--imp-panel); }
.impulse-feature-card.expanded .impulse-feature-card-header { background: var(--imp-panel); }
.impulse-feature-card-name { font-size: 11px; font-weight: 600; color: var(--imp-text); text-transform: uppercase; letter-spacing: 0.5px; flex: 1; }
.impulse-feature-card-stat { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.impulse-feature-card-stat-val { font-size: 13px; font-weight: 600; color: var(--imp-text); }
.impulse-feature-card-stat-label { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.4px; }
.impulse-feature-card-drag { cursor: default; color: var(--imp-dim); display: flex; align-items: center; flex-shrink: 0; }
.impulse-feature-card-body {
    display: none;
    border-top: 1px solid var(--imp-surface2);
    padding: 16px;
    flex-direction: column;
    gap: 12px;
    background: var(--imp-surface);
}
.impulse-feature-card.expanded .impulse-feature-card-body { display: flex; }

.impulse-feature-card.sortable-ghost { opacity: 0.4; }

.impulse-feature-tile {
    background: var(--imp-surface);
    border-radius: 4px;
    padding: 14px;
    cursor: default;
    border: 1px solid var(--imp-panel);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.impulse-all-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 11px;
    color: #bbb;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    transition: color 0.15s;
    border-bottom: 1px solid var(--imp-panel);
    flex-shrink: 0;
}
.impulse-all-nav-item:hover { color: var(--imp-text); background: #22252a; }
.impulse-all-nav-item.active { color: var(--imp-text); background: var(--imp-panel); }
.impulse-store-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

#products-bar-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
#products-topbar-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}
#products-topbar-controls .impulse-products-status-tabs {
    display: flex;
}
.impulse-store-section[data-section="products"] {
    background: var(--imp-surface);
}

#customers-section-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.impulse-store-section[data-section="orders"] {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.impulse-store-section[data-section="orders"] #dashboard-orders-list,
.impulse-store-section[data-section="orders"] #dashboard-returns-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin: 0;
}

#dashboard-orders-list .impulse-list-item {
    display: flex;
    align-items: center;
    padding: 6px 30px;
    border-bottom: 1px solid var(--imp-panel);
    cursor: pointer;
    gap: 8px;
    font-size: 11px;
    color: #ccc;
}
#dashboard-orders-list .impulse-list-item:hover { background: rgba(255,255,255,0.02); }
#dashboard-orders-list .impulse-list-item.active { background: #22252a; box-shadow: inset 3px 0 0 var(--imp-white); }
.impulse-list-order-num { color: var(--imp-dim); flex-shrink: 0; width: 95px; font-size: 11px; }
.impulse-list-order-customer { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--imp-text); font-weight: 500; }
.impulse-list-order-age { width: 80px; text-align: right; color: var(--imp-dim); flex-shrink: 0; font-size: 11px; }
.impulse-list-order-total { width: 70px; text-align: right; color: var(--imp-text); flex-shrink: 0; font-weight: 500; font-size: 11px; }

#orders-sort-header .orders-sort-col:hover { color: #aaa; }
#orders-sort-header .orders-sort-col.active { color: var(--imp-text); }
#orders-sort-header .sort-arrow { transition: transform 0.15s; }
#orders-sort-header .sort-arrow.asc { transform: rotate(180deg); }

#clients-center-list .impulse-list-item {
    display: flex;
    align-items: center;
    padding: 6px 30px;
    border-bottom: 1px solid var(--imp-panel);
    cursor: pointer;
    gap: 8px;
    font-size: 11px;
    color: #ccc;
}
#clients-center-list .impulse-list-item:hover { background: rgba(255,255,255,0.02); }
#clients-center-list .impulse-list-item.active { background: #22252a; box-shadow: inset 3px 0 0 var(--imp-white); }
.impulse-list-client-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--imp-text); font-weight: 500; }
.impulse-list-client-orders { flex-shrink: 0; color: #888; font-size: 11px; }
.impulse-list-client-date { width: 80px; text-align: right; color: var(--imp-dim); flex-shrink: 0; font-size: 11px; }
.impulse-list-client-total { width: 70px; text-align: right; color: var(--imp-text); flex-shrink: 0; font-weight: 500; font-size: 11px; }

#dashboard-returns-list .impulse-list-item {
    display: flex;
    align-items: center;
    padding: 6px 30px;
    border-bottom: 1px solid var(--imp-panel);
    cursor: pointer;
    gap: 8px;
    font-size: 11px;
    color: #ccc;
}
#dashboard-returns-list .impulse-list-item:hover { background: rgba(255,255,255,0.02); }
#dashboard-returns-list .impulse-list-item.active { background: #22252a; box-shadow: inset 3px 0 0 var(--imp-white); }

#bundles-center-list .impulse-list-item { padding: 6px 30px; }
#bundles-center-list .impulse-list-item:hover { background: rgba(255,255,255,0.02); }
#bundles-center-list .impulse-list-item.active { background: #22252a; box-shadow: inset 3px 0 0 var(--imp-white); }

.bkcal-day:hover { background: rgba(255,255,255,0.08) !important; }

.impulse-booking-row { transition: background 0.1s; }
.impulse-booking-row:hover { background: rgba(255,255,255,0.02); }
.impulse-booking-row.selected { background: #22252a !important; box-shadow: inset 3px 0 0 var(--imp-white); }

.impulse-store-grid.settings-active {
    grid-template-columns: 280px 1fr 280px;
}
.impulse-store-grid.settings-active .impulse-panel-left {
    overflow: visible;
    width: auto;
    min-width: 0;
}

.impulse-settings-left-row {
    margin-bottom: 5px;
}

.impulse-store-left-content[data-section="settings"] button,
.impulse-store-section[data-section="settings"] button,
#settings-email-panel button,
#settings-license-panel button,
#settings-chat-panel button {
    height: 26px;
    font-size: 11px;
    box-sizing: border-box;
}

#settings-email-panel > .impulse-section-divider,
#settings-chat-panel > .impulse-section-divider,
#settings-license-panel > .impulse-section-divider,
#settings-account-panel > .impulse-section-divider,
#settings-backup-panel > .impulse-section-divider,
#settings-support-panel > .impulse-section-divider {
    padding: 0 12px;
}

.impulse-settings-left-row > .field-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.impulse-settings-left-row + .impulse-settings-left-row {
    margin-top: 6px;
}
.impulse-store-left-content[data-section="settings"] label,
.impulse-store-section[data-section="settings"] label,
#settings-email-panel label,
#settings-license-panel label,
#settings-chat-panel label {
    font-size: 11px;
}
.impulse-store-left-content[data-section="settings"] textarea,
.impulse-store-section[data-section="settings"] textarea,
#settings-chat-panel textarea {
    font-size: 11px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    padding: 6px 8px;
    box-sizing: border-box;
    width: 100%;
}
.impulse-store-left-content[data-section="settings"] textarea:focus,
.impulse-store-section[data-section="settings"] textarea:focus,
#settings-chat-panel textarea:focus {
    outline: none;
    border-color: var(--imp-dim);
}

.impulse-store-left-content select,
.impulse-store-section select,
.impulse-settings-panel select,
.impulse-products-right-content select,
.impulse-store-right-content select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 26px;
    padding: 0 24px 0 8px;
    background: var(--imp-panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C%2Fsvg%3E") no-repeat right 6px center;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
}

.impulse-store-left-content select[style*="flex:1"],
.impulse-store-section select[style*="flex:1"],
.impulse-settings-panel select[style*="flex:1"],
.impulse-store-right-content select[style*="flex:1"] {
    width: auto;
}
.impulse-store-left-content select:focus,
.impulse-store-section select:focus,
.impulse-settings-panel select:focus,
.impulse-store-right-content select:focus {
    outline: none;
    border-color: var(--imp-dim);
}
.impulse-store-left-content select option,
.impulse-store-section select option,
.impulse-settings-panel select option,
.impulse-store-right-content select option {
    background: var(--imp-panel);
    color: var(--imp-text);
}

.impulse-store-left-content[data-section="settings"] input[type="text"],
.impulse-store-left-content[data-section="settings"] input[type="email"],
.impulse-store-left-content[data-section="settings"] input[type="tel"],
.impulse-store-left-content[data-section="settings"] input[type="number"],
.impulse-store-left-content[data-section="settings"] input[type="url"],
.impulse-store-left-content[data-section="settings"] input[type="search"],
.impulse-store-left-content[data-section="settings"] input[type="password"] {
    height: 26px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    padding: 0 8px;
    font-size: 11px;
    box-sizing: border-box;
    width: 100%;
}
.impulse-store-left-content[data-section="settings"] input[type="text"]:focus,
.impulse-store-left-content[data-section="settings"] input[type="email"]:focus,
.impulse-store-left-content[data-section="settings"] input[type="tel"]:focus,
.impulse-store-left-content[data-section="settings"] input[type="number"]:focus,
.impulse-store-left-content[data-section="settings"] input[type="url"]:focus,
.impulse-store-left-content[data-section="settings"] input[type="search"]:focus,
.impulse-store-left-content[data-section="settings"] input[type="password"]:focus {
    outline: none;
    border-color: var(--imp-dim);
}
.impulse-store-section[data-section="settings"] input[type="text"],
.impulse-store-section[data-section="settings"] input[type="email"],
.impulse-store-section[data-section="settings"] input[type="tel"],
.impulse-store-section[data-section="settings"] input[type="number"],
.impulse-store-section[data-section="settings"] input[type="url"],
.impulse-store-section[data-section="settings"] input[type="search"],
.impulse-store-section[data-section="settings"] input[type="password"] {
    height: 26px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    padding: 0 8px;
    font-size: 11px;
    box-sizing: border-box;
    width: 100%;
}
.impulse-store-section[data-section="settings"] input[type="text"]:focus,
.impulse-store-section[data-section="settings"] input[type="email"]:focus,
.impulse-store-section[data-section="settings"] input[type="tel"]:focus,
.impulse-store-section[data-section="settings"] input[type="number"]:focus,
.impulse-store-section[data-section="settings"] input[type="url"]:focus,
.impulse-store-section[data-section="settings"] input[type="search"]:focus,
.impulse-store-section[data-section="settings"] input[type="password"]:focus {
    outline: none;
    border-color: var(--imp-dim);
    box-shadow: none;
}
.impulse-store-section[data-section="settings"] input::placeholder {
    color: #666;
}

.impulse-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.impulse-checkbox-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    color: var(--imp-text);
    cursor: pointer;
    user-select: none;
}

.impulse-setting-row.impulse-checkbox-stacked,
.impulse-checkbox-stacked {
    display: grid !important;
    grid-template-rows: 14px 18px;
    grid-template-columns: 1fr;
    
    row-gap: 5px;
    align-items: center;
    justify-items: start;
    justify-content: start;
    max-width: 114px;
    margin: 0;
}
.impulse-setting-row.impulse-checkbox-stacked > label,
.impulse-checkbox-stacked > label,
.impulse-margin-grid .impulse-setting-row.impulse-checkbox-stacked > label {
    grid-row: 1;
    grid-column: 1;
    font-size: 11px;
    color: #666;
    line-height: 14px;
    align-self: center;
    justify-self: start;
    margin: 0;
    padding: 0;
    cursor: pointer;
    white-space: nowrap;
}
.impulse-setting-row.impulse-checkbox-stacked > .impulse-checkbox-stacked-row,
.impulse-checkbox-stacked > .impulse-checkbox-stacked-row {
    grid-row: 2;
    grid-column: 1;
    display: flex;
    align-items: center;
    align-self: center;
    justify-self: start;
    margin: 0;
    min-height: 14px;
}
.impulse-checkbox-stacked-row > input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    background-color: var(--imp-panel) !important;
    border: 1px solid var(--imp-border) !important;
    border-radius: 3px !important;
    padding: 0 !important;
    transition: background-color 0.15s, border-color 0.15s !important;
}
.impulse-checkbox-stacked-row > input[type="checkbox"]:checked {
    background-color: var(--imp-white) !important;
    border-color: var(--imp-dim) !important;
}
.impulse-checkbox-stacked-row > input[type="checkbox"]:focus {
    outline: none !important;
    border-color: var(--imp-dim) !important;
}
.impulse-checkbox-row input[type="checkbox"] {
    -webkit-appearance: none !important;
    appearance: none !important;
    flex-shrink: 0;
    cursor: pointer;
    margin: 0;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    background-color: var(--imp-panel) !important;
    border: 1px solid var(--imp-border) !important;
    border-radius: 3px !important;
    padding: 0 !important;
    position: relative;
    transition: background-color 0.15s, border-color 0.15s !important;
}
.impulse-checkbox-row input[type="checkbox"]:checked {
    background-color: var(--imp-white) !important;
    border-color: var(--imp-dim) !important;
}
.impulse-checkbox-row input[type="checkbox"]:focus {
    outline: none !important;
    border-color: var(--imp-dim) !important;
}
.impulse-checkbox-row span {
    line-height: 1;
    
    margin: 0;
}

input[type="checkbox"].impulse-cb-hidden {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
.impulse-cb {
    display: inline-flex;
    align-self: center;
    flex-shrink: 0;
    width: 26px;
    height: 14px;
    min-width: 26px;
    min-height: 14px;
    
    background-color: var(--imp-border);
    background-image: radial-gradient(circle, var(--imp-dim) 0%, var(--imp-dim) 100%);
    background-size: 10px 10px;
    background-repeat: no-repeat;
    background-position: 2px center;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    transition: background-position 0.18s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.15s, border-color 0.15s;
    box-sizing: border-box;
}
.impulse-cb.active {
    background-color: var(--imp-dim);
    background-image: radial-gradient(circle, var(--imp-white) 0%, var(--imp-white) 100%);
    background-position: 14px center;
    border-color: var(--imp-dim);
}
.impulse-cb.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.impulse-settings-collapse {
    cursor: pointer;
    transition: color 0.15s;
}
.impulse-settings-collapse:hover {
    color: #aaa;
}
.impulse-settings-collapse.is-open {
    color: var(--imp-text);
}

.impulse-settings-block > .impulse-panel-body,
.impulse-settings-block > div > .impulse-panel-body {
    padding-top: 12px;
}

.impulse-settings-block .impulse-scroll {
    overflow: visible;
    flex: none;
}

.impulse-settings-block[data-settings="images"] .impulse-panel-body.impulse-scroll {
    overflow-y: auto;
    max-height: 480px;
    flex: 1;
}

.impulse-settings-panel {
    display: none;
    flex-direction: column;
    height: 100%;
}
.impulse-settings-panel.active {
    display: flex;
}

.impulse-store-right-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#dashboard-detail-content .impulse-detail-section,
#customer-detail-content .impulse-detail-section {
    padding: 8px 0;
    border-bottom: 1px solid var(--imp-panel);
}
#dashboard-detail-content .impulse-detail-section:last-child,
#customer-detail-content .impulse-detail-section:last-child {
    border-bottom: none;
}

.impulse-store-grid * { scrollbar-width: none; -ms-overflow-style: none; }
.impulse-store-grid *::-webkit-scrollbar { display: none; }
#dashboard-detail-content select,
#dashboard-detail-content .impulse-select {
    width: 100%;
    height: 26px;
    padding: 0 28px 0 8px;
    background: var(--imp-panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden;
    cursor: pointer;
}
#dashboard-detail-content select:focus,
#dashboard-detail-content .impulse-select:focus {
    outline: none;
    border-color: var(--imp-dim);
}
#dashboard-detail-content select option {
    background: var(--imp-panel);
    color: var(--imp-text);
}
#dashboard-detail-content input[type="text"],
#dashboard-detail-content input[type="number"],
#customer-detail-content input[type="text"] {
    width: 100%;
    height: 26px;
    padding: 0 8px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    box-sizing: border-box;
}
#dashboard-detail-content input[type="text"]::placeholder,
#dashboard-detail-content input[type="number"]::placeholder,
#customer-detail-content input[type="text"]::placeholder { color: #666; }
#dashboard-detail-content input[type="text"]:focus,
#dashboard-detail-content input[type="number"]:focus,
#customer-detail-content input[type="text"]:focus { outline: none; border-color: var(--imp-dim); }
#dashboard-detail-content input[type="checkbox"],
#customer-detail-content input[type="checkbox"] {
    cursor: pointer;
}

.impulse-custom-select-btn {
    height: 26px;
    padding: 0 8px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
.impulse-custom-select-btn:hover { border-color: var(--imp-dim); }
.impulse-custom-select-list {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    z-index: 100;
    min-width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.impulse-custom-select-option {
    padding: 4px 10px;
    font-size: 11px;
    color: var(--imp-muted);
    cursor: pointer;
    white-space: nowrap;
}
.impulse-custom-select-option:hover { background: var(--imp-border); color: var(--imp-text); }
.impulse-custom-select-option.active { color: var(--imp-white); font-weight: 500; }

.impulse-order-status-btns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}
.impulse-order-status-btn {
    height: 26px;
    padding: 0 4px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: #888;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1;
}
.impulse-order-status-btn:hover {
    border-color: var(--imp-dim);
    color: #ccc;
}
.impulse-order-status-btn.active {
    font-weight: 500;
}
.impulse-order-status-btn.active[data-status="completed"] {
    background: var(--imp-white); border-color: var(--imp-white); color: var(--imp-surface2);
}
.impulse-order-status-btn.active[data-status="shipped"] {
    background: #888; border-color: #888; color: var(--imp-white);
}
.impulse-order-status-btn.active[data-status="processing"] {
    background: var(--imp-dim); border-color: var(--imp-dim); color: var(--imp-text);
}
.impulse-order-status-btn.active[data-status="pending"] {
    background: var(--imp-panel); border-color: #888; color: var(--imp-muted);
}
.impulse-order-status-btn.active[data-status="on-hold"] {
    background: var(--imp-panel); border-color: #888; color: #888;
}
.impulse-order-status-btn.active[data-status="refunded"] {
    background: var(--imp-panel); border-color: #666; color: #666;
}
.impulse-order-status-btn.active[data-status="cancelled"] {
    background: transparent; border-color: var(--imp-border); color: var(--imp-dim);
}
.impulse-order-status-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.orders-sort-col:hover { color: #aaa; }
.orders-sort-col.active { color: #ccc; }
.orders-sort-col .sort-arrow { transition: transform 0.15s; }
.orders-sort-col .sort-arrow.asc { transform: rotate(180deg); }

#order-status-modal {
    position: fixed !important;
    z-index: 999999 !important;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 5px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    opacity: 1;
    transform-origin: top center;
    animation: statusModalIn 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes statusModalIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}
#order-status-modal .osm-btn {
    display: block;
    height: 22px;
    padding: 0 10px;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--imp-muted);
    font-size: 11px;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
    width: 100%;
    line-height: 22px;
}
#order-status-modal .osm-btn:hover {
    background: var(--imp-border);
    color: var(--imp-text);
}
#order-status-modal .osm-btn.current {
    color: var(--imp-white);
    font-weight: 500;
}

.impulse-filter-count {
    font-size: 11px;
    color: var(--imp-muted);
    margin-left: auto;
}

.impulse-toggle {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}
.impulse-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.impulse-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--imp-border);
    border-radius: 9px;
    transition: 0.2s;
}
.impulse-toggle-slider:before {
    content: "";
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: var(--imp-muted);
    border-radius: 50%;
    transition: 0.2s;
}
.impulse-toggle input:checked + .impulse-toggle-slider {
    background: var(--imp-dim);
}
.impulse-toggle input:checked + .impulse-toggle-slider:before {
    transform: translateX(14px);
    background: var(--imp-text);
}

.impulse-ext-filter-bar {
    display: flex;
    gap: 2px;
    padding: 8px 10px 0;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.impulse-ext-filter-btn {
    height: 22px;
    padding: 0 9px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #666;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.1s;
    white-space: nowrap;
}
.impulse-ext-filter-btn:hover { color: var(--imp-muted); border-color: var(--imp-border); }
.impulse-ext-filter-btn.active { color: var(--imp-text); background: var(--imp-panel); border-color: var(--imp-border); }

.impulse-addon-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 110px);
    gap: 4px;
    max-width: 50%;
}
.impulse-addon-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 12px 8px 10px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s;
    position: relative;
}
.impulse-addon-chip:not(.active) { opacity: 0.65; }
.impulse-addon-chip:hover { opacity: 1; border-color: var(--imp-dim); background: var(--imp-panel); }
.impulse-addon-chip.active { border-top: 2px solid var(--imp-text); padding-top: 11px; }
.impulse-addon-chip.selected { border-color: #888; opacity: 1; }
.impulse-addon-chip-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    flex-shrink: 0;
}
.impulse-addon-chip.active .impulse-addon-chip-icon { color: var(--imp-text); }
.impulse-addon-chip-icon svg { width: 16px; height: 16px; }
.impulse-addon-chip-name {
    font-size: 10px;
    color: var(--imp-muted);
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
}
.impulse-addon-chip.active .impulse-addon-chip-name { color: var(--imp-text); }
.impulse-addon-chip.hidden { display: none; }

.impulse-addon-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--imp-dim);
    gap: 12px;
}
.impulse-addon-detail-empty p { font-size: 11px; color: var(--imp-dim); margin: 0; }
.impulse-addon-detail-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--imp-panel);
    border-radius: 6px;
    color: #888;
}
.impulse-addon-detail-icon.active { color: var(--imp-text); }
.impulse-addon-detail-icon svg { width: 22px; height: 22px; }
.impulse-addon-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 26px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 3px;
    border: 1px solid var(--imp-border);
    cursor: pointer;
    transition: all 0.15s;
    background: var(--imp-panel);
    color: var(--imp-muted);
}
.impulse-addon-toggle-btn:hover { border-color: var(--imp-dim); color: var(--imp-text); }
.impulse-addon-toggle-btn.is-enabled { background: var(--imp-surface); color: var(--imp-text); border-color: var(--imp-dim); }
.impulse-addon-toggle-btn.is-enabled:hover { background: var(--imp-panel); }

.imglib-card {
    user-select: none;
    -webkit-user-select: none;
    transition: border-color 0.15s;
}
.imglib-card:hover {
    border-color: var(--imp-dim) !important;
}
.imglib-card.selected {
    border-color: var(--imp-text) !important;
}

.impulse-library-media .imglib-card-caption {
    display: none;
}

.imglib-card-del {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 3;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 3px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
}
.imglib-card:hover .imglib-card-del { display: flex; }
.imglib-card-del:hover { background: rgba(0,0,0,0.85); }
.imglib-card-confirm {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20,22,25,0.85);
}
.imglib-card-confirm-yes {
    height: 26px;
    padding: 0 16px;
    border: none;
    border-radius: 3px;
    background: #fff;
    color: #1d2327;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.imglib-card-confirm-yes:hover { background: #e0e0e0; }

.impulse-pro-block-notice {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: -12px -12px 12px -12px;
    padding: 8px 12px;
    background: var(--imp-surface);
    border-bottom: 1px solid var(--imp-border);
    font-size: 11px;
    color: #888;
    line-height: 1.4;
}
.impulse-pro-block-notice a {
    color: var(--imp-muted);
    text-decoration: underline;
}
.impulse-pro-block-notice a:hover {
    color: var(--imp-text);
}

.impulse-screen-bar-panel {
    display: none;
    padding: 10px 12px;
    flex-direction: column;
    gap: 5px;
}
.impulse-screen-bar-panel.active { display: flex; }
.impulse-screen-bar-body { min-width: 0; }
.impulse-3d-grid-clip { height: 109px;  position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }

.impulse-pro-locked { opacity: 0.45; cursor: pointer; position: relative; }
.impulse-pro-locked::after {
    content: 'PRO';
    position: absolute;
    top: 2px; right: 3px;
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #999;
    pointer-events: none;
    line-height: 1;
}
.impulse-pro-locked:hover { opacity: 0.7; }
.impulse-pro-locked.active { opacity: 1; }

.impulse-tl-toggle {
    position: absolute; right: 10px; top: 2px; width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid transparent; border-radius: 3px;
    color: var(--imp-dim); cursor: pointer; padding: 0; z-index: 3;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.impulse-tl-toggle:hover { color: var(--imp-text); border-color: var(--imp-border); }
.impulse-tl-toggle.on {
    color: var(--imp-white); background: var(--imp-panel); border-color: var(--imp-border);
}
.impulse-screen-bar-panel-timeline {
    padding: 0 !important;
    position: absolute !important;
    top: 30px; left: 0; right: 0; bottom: 0;
    background: var(--imp-surface);
    z-index: 2;
}

.impulse-screen-bar-panel-timeline[data-mount="section-panel"] {
    display: block !important;
    position: static !important;
    top: auto; left: auto; right: auto; bottom: auto;
    background: transparent;
    z-index: auto;
}
.impulse-tl-simple {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 12px;
    max-height: 100%;
    overflow-y: auto;
}

.impulse-screen-bar-panel-timeline[data-mount="section-panel"] .impulse-tl-simple {
    padding: 0;
}
.impulse-tl-srow {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 6px; border-radius: 3px;
    background: var(--imp-panel);
    font-size: 11px; color: var(--imp-muted);
}
.impulse-tl-srow.selected { background: var(--imp-border); color: var(--imp-text); }
.impulse-tl-slabel {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.impulse-tl-step {
    display: inline-flex; align-items: center; gap: 6px;
    height: 22px; padding: 0 10px;
    background: var(--imp-surface); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.impulse-tl-step:hover { color: var(--imp-text); border-color: #555; }
.impulse-tl-step.on { color: var(--imp-white); border-color: var(--imp-text); background: var(--imp-panel); }
.impulse-tl-step .impulse-tl-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--imp-dim); border: 1px solid var(--imp-border);
    transition: background 0.12s, border-color 0.12s;
}
.impulse-tl-step.on .impulse-tl-dot { background: var(--imp-white); border-color: var(--imp-white); }

.impulse-tl-globals {
    display: flex; gap: 5px; align-items: center;
    width: 100%;
}

.impulse-tl-snap-all {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 1; height: 26px; padding: 0 10px;
    background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer;
    box-sizing: border-box;
    transition: color 0.12s, border-color 0.12s, background 0.12s;
}
.impulse-tl-snap-all:hover { color: var(--imp-text); border-color: var(--imp-text); }
.impulse-tl-snap-all.on { color: var(--imp-surface2); border-color: var(--imp-white); background: var(--imp-white); }
.impulse-tl-clear-all {
    
    flex: 0 0 auto; min-width: 56px;
    height: 26px; padding: 0 10px;
    background: transparent; border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-dim); font-size: 11px; cursor: pointer;
    box-sizing: border-box;
    transition: color 0.12s, border-color 0.12s;
}
.impulse-tl-clear-all:hover { color: var(--imp-text); border-color: #555; }
.impulse-tl-clear-all[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}
.impulse-tl-clear-all[disabled]:hover {
    color: var(--imp-dim);
    border-color: var(--imp-border);
}

@keyframes impulse-tl-pulse {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255,255,255,0); }
    25%  { transform: scale(1.04); box-shadow: 0 0 0 4px rgba(255,255,255,0.18); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.impulse-tl-snap-all.fired {
    animation: impulse-tl-pulse 0.32s ease-in-out;
}
.impulse-tl-easelbl {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--imp-muted);
}
.impulse-tl-srow .impulse-tl-ease-sel {
    height: 22px; background: var(--imp-surface); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-text); font-size: 11px; padding: 0 4px; cursor: pointer; min-width: 90px;
}

.impulse-tl-strip {
    background: var(--imp-surface);
    font-size: 11px;
    color: var(--imp-muted);
    user-select: none;
    position: relative;
}
.impulse-tl-row {
    display: flex;
    align-items: center;
    height: 26px;
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-tl-row:last-child { border-bottom: none; }
.impulse-tl-rows { max-height: 78px; overflow-y: auto; }
.impulse-tl-rows::-webkit-scrollbar { width: 6px; }
.impulse-tl-rows::-webkit-scrollbar-thumb { background: var(--imp-panel); border-radius: 3px; }
.impulse-tl-side {
    flex-shrink: 0;
    width: 180px;
    padding: 0 8px 0 36px; 
    display: flex;
    align-items: center;
    gap: 6px;
    border-right: 1px solid var(--imp-panel);
    height: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.impulse-tl-label {
    font-size: 11px;
    color: var(--imp-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.impulse-tl-elrow.selected .impulse-tl-label { color: var(--imp-text); }
.impulse-tl-elname {
    font-size: 11px;
    color: var(--imp-text);
    margin-left: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.impulse-tl-track {
    flex: 1;
    height: 100%;
    position: relative;
    background: var(--imp-surface);
    cursor: crosshair;
}
.impulse-tl-ruler-track {
    background: var(--imp-surface2);
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-tl-tick {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--imp-dim);
    pointer-events: none;
    padding: 0 3px;
    background: var(--imp-surface2);
}
.impulse-tl-tick-end { transform: translate(-100%, -50%); }
.impulse-tl-playhead {
    position: absolute;
    top: 0;
    bottom: -200px;      
    width: 1px;
    background: var(--imp-text);
    cursor: ew-resize;
    z-index: 3;
    pointer-events: auto;
}
.impulse-tl-playhead::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 6px;
    height: 6px;
    background: var(--imp-text);
}
.impulse-tl-kf {
    position: absolute;
    top: 50%;
    width: 9px;
    height: 9px;
    background: var(--imp-muted);
    transform: translate(-50%, -50%) rotate(45deg);
    cursor: grab;
    z-index: 2;
    transition: background 0.12s, box-shadow 0.12s;
    touch-action: none;
}
.impulse-tl-kf:active { cursor: grabbing; }
.impulse-tl-kf:hover { background: var(--imp-text); }
.impulse-tl-kf.selected {
    background: var(--imp-white);
    box-shadow: 0 0 0 2px var(--imp-surface), 0 0 0 3px var(--imp-text);
}
.impulse-tl-btn {
    height: 20px;
    min-width: 30px;
    padding: 0 6px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.impulse-tl-btn:hover { border-color: var(--imp-dim); color: var(--imp-text); }
.impulse-tl-btn.impulse-timeline-record-on {
    color: var(--imp-white);
    background: var(--imp-border);
}
.impulse-tl-btn.impulse-timeline-record-on svg {
    color: var(--imp-white);
}

.impulse-tl-kf-pop {
    position: fixed;
    z-index: 1000050;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    padding: 6px 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    font-size: 11px;
    color: var(--imp-text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.impulse-tl-kf-pop label,
.impulse-tl-kf-pop .impulse-tl-pop-caption {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--imp-muted);
}
.impulse-tl-kf-pop select {
    height: 22px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    padding: 0 4px;
    cursor: pointer;
    
    min-width: 110px;
}

.impulse-tl-kf-pop { overflow: visible; }

.impulse-custom-select-dropdown.impulse-tl-ease-sel {
    max-height: none;
    overflow-y: visible;
    width: auto !important;
    min-width: 0;
}
.impulse-custom-select-dropdown.impulse-tl-ease-sel .impulse-custom-select-option {
    padding: 2px 12px 2px 10px;
}

.impulse-context-menu.impulse-tl-compact-ctx {
    min-width: 100px;
    padding: 3px 0;
    font-size: 11px;
}
.impulse-context-menu.impulse-tl-compact-ctx .impulse-context-item {
    padding: 4px 12px;
    font-size: 11px;
}
.impulse-tl-empty {
    padding: 8px 12px;
    font-size: 11px;
    color: var(--imp-dim);
    text-align: left;
}
.impulse-tl-elrow.selected {
    background: rgba(224, 224, 224, 0.04);
}

.impulse-reveal-btn {
    height: 26px; background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer; padding: 0; box-sizing: border-box;
    transition: all 0.15s; width: 100%;
}
.impulse-reveal-btn:hover { border-color: var(--imp-dim); color: #ccc; }
.impulse-reveal-btn.active { background: var(--imp-border); color: var(--imp-text); border-color: var(--imp-dim); }

#impulse-screen-sidebar .impulse-screen-list { max-height: 180px; overflow-y: auto; scrollbar-width: none; }
#impulse-screen-sidebar .impulse-screen-list::-webkit-scrollbar { display: none; }
#impulse-screen-sidebar .impulse-srow { padding: 4px 6px; }

.impulse-panel-right button:not([disabled]):active{transform:scale(0.95);transition:transform 0.04s ease-in-out!important}
.impulse-panel-right .impulse-btn-group button:not([disabled]):active{transform:scale(0.95);transition:transform 0.04s ease-in-out!important}

.impulse-workspace-grid .impulse-panel-tabs {
    flex-shrink: 0;
    order: -1;
}

.impulse-workspace-nav {
    display: flex;
    align-items: stretch;
    gap: 8px;
    background: transparent;
    padding: 0;
    border-radius: 0;
    position: relative;
}
.impulse-workspace-nav::after {
    
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #3a3f44;
    pointer-events: none;
}

.impulse-workspace-track {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #e0e0e0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    transition: opacity 0.18s ease-in-out, transform 0.28s cubic-bezier(0.4,0,0.2,1), width 0.28s cubic-bezier(0.4,0,0.2,1);
    pointer-events: none;
    will-change: transform, width;
    z-index: 1;
}
.impulse-workspace-track.positioned { opacity: 1; }

.impulse-workspace-btn {
    position: relative;
    z-index: 2;
    padding: 10px 4px 12px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 0;
    transition: color 0.12s ease-in-out;
    user-select: none;
    white-space: nowrap;
}

.impulse-workspace-btn:hover {
    color: #aaa;
    background: transparent;
}

.impulse-workspace-btn.active {
    color: #e0e0e0;
    background: transparent;
}

.impulse-workspace-btn.dragging {
    opacity: 0.3;
}
.impulse-workspace-btn.drag-over-left {
    box-shadow: -1px 0 0 0 #e0e0e0;
}
.impulse-workspace-btn.drag-over-right {
    box-shadow: 1px 0 0 0 #e0e0e0;
}
.impulse-workspace-nav.drag-active .impulse-workspace-btn:not(.dragging) {
    cursor: default;
}

.impulse-back,
.impulse-back-wp {
    color: var(--imp-white);
    opacity: 0.7;
    transition: opacity 0.2s;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
    
    background: transparent;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    line-height: 1;
}

.impulse-brand-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--imp-white);
    opacity: 0.85;
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

.impulse-back:hover,
.impulse-back-wp:hover { opacity: 1; color: var(--imp-white); background: rgba(255,255,255,0.1); }

.impulse-page-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.impulse-title-text {
    color: var(--imp-white);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    outline: none;
    min-width: 100px;
    display: inline-block;
    transition: background 0.2s;
}

.impulse-title-text:hover {
    background: rgba(255,255,255,0.1);
}

.impulse-page-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    position: relative;
}
.impulse-page-name-edit {
    display: flex;
    align-items: center;
    gap: 6px;
}
.impulse-title-input {
    background: rgba(255,255,255,0.15) !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: var(--imp-white) !important;
    font-size: 15px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    min-width: 140px;
    outline: none !important;
    box-shadow: none !important;
}
.impulse-title-input:focus {
    border-color: rgba(255,255,255,0.5) !important;
    background: rgba(255,255,255,0.2) !important;
    color: var(--imp-white) !important;
    box-shadow: none !important;
}
.impulse-title-ok {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--imp-white);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.impulse-title-ok:hover {
    background: rgba(255,255,255,0.3);
}
.impulse-slug-link-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.4);
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    margin-left: 4px;
}
.impulse-slug-link-btn:hover {
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.1);
}
.impulse-slug-modal {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 1000;
    padding: 8px;
}
.impulse-slug-modal-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.impulse-slug-modal-row {
    display: flex;
    align-items: center;
    gap: 4px;
}
.impulse-slug-modal-prefix {
    color: var(--imp-muted);
    font-size: 11px;
    white-space: nowrap;
}
.impulse-slug-modal-input {
    background: var(--imp-panel) !important;
    border: 1px solid var(--imp-border) !important;
    color: var(--imp-text) !important;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 3px;
    min-width: 120px;
    outline: none !important;
    box-shadow: none !important;
}
.impulse-slug-modal-input:focus,
.impulse-slug-modal-input:active {
    border-color: var(--imp-dim) !important;
    background: var(--imp-panel) !important;
    color: var(--imp-text) !important;
    box-shadow: none !important;
    outline: none !important;
}
.impulse-slug-modal-btn {
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    color: var(--imp-muted);
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
}
.impulse-slug-modal-btn:hover {
    background: var(--imp-border);
    border-color: var(--imp-dim);
    color: var(--imp-white);
}
.impulse-slug-modal-btn.copied {
    background: var(--imp-border);
    color: var(--imp-white);
    border-color: var(--imp-dim);
}
.impulse-slug-ok-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 6px 10px;
}

.impulse-save-status {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s;
}
.impulse-save-status.saving {
    color: rgba(255,255,255,0.7);
}
.impulse-save-status.saved {
    color: var(--imp-text);
}

.impulse-topbar .instinctor-btn-sm {
    height: 26px;
    padding: 0 12px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-muted);
    font-size: 11px;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.impulse-topbar .instinctor-btn-sm:hover {
    background: var(--imp-border);
    color: var(--imp-white);
    border-color: #666;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2), 0 6px 16px rgba(0,0,0,0.1);
    filter: brightness(1.08);
}

.impulse-topbar .instinctor-btn-icon {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--imp-white);
    opacity: 0.7;
    transition: all 0.2s;
    font-size: 14px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.impulse-topbar .instinctor-btn-icon:hover:not(:disabled) { opacity: 1; background: rgba(255,255,255,0.1); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.impulse-topbar .instinctor-btn-icon:disabled { opacity: 0.3; cursor: not-allowed; }

.impulse-topbar-builder-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.impulse-topbar-builder-controls.impulse-hidden {
    display: none !important;
}

.impulse-topbar-builder-controls > button,
.impulse-topbar-builder-controls > .instinctor-btn-icon {
    display: flex;
    width: auto;
    height: auto;
    min-width: 32px;
    min-height: 32px;
    opacity: 0.7;
    position: static;
    align-items: center;
    justify-content: center;
}

.impulse-topbar-builder-controls > button:disabled,
.impulse-topbar-builder-controls > .instinctor-btn-icon:disabled {
    opacity: 0.3;
    pointer-events: auto;
    cursor: not-allowed;
}

.impulse-topbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    margin: 0 4px;
    display: block !important;
    visibility: visible !important;
}

.impulse-device-tabs {
    display: flex;
    border-bottom: 1px solid var(--imp-text);
    background: var(--imp-light);
    padding: 0;
}
.impulse-device-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 11px;
    transition: all 0.15s;
}
.impulse-device-tab:hover {
    color: #333;
    background: rgba(0,0,0,0.03);
}
.impulse-device-tab.active {
    color: var(--imp-surface2);
    border-bottom-color: var(--imp-surface2);
    background: var(--imp-white);
}

.impulse-panel-right .impulse-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.impulse-main {
    flex: 1;
    display: flex;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
}

.impulse-panel {
    width: 280px;
    background: var(--imp-white);
    border-right: 1px solid var(--imp-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.impulse-panel-right {
    border-right: none;
    border-left: 1px solid var(--imp-panel);
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: clip; 
    user-select: none;
    -webkit-user-select: none;
}

.impulse-panel-right input,
.impulse-panel-right textarea,
.impulse-panel-right select {
    user-select: text;
    -webkit-user-select: text;
    pointer-events: auto;
}
.impulse-panel-right textarea {
    min-height: 48px;
    overflow: hidden;
    resize: none;
    line-height: 1.5;
}
.impulse-panel-right input[type="text"],
.impulse-panel-right input[type="number"],
.impulse-panel-right input[type="url"],
.impulse-panel-right input[type="email"],
.impulse-panel-right select {
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}
.impulse-header-menu-item input[type="text"],
.impulse-header-menu-item button {
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.impulse-panel-right button {
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}

.impulse-panel-header {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.impulse-panel-header h3 {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
}

.impulse-search {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--imp-text);
    border-radius: 4px;
    font-size: 11px;
}

.impulse-panel-content {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px 16px 120px 14px;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

.impulse-panel-content::-webkit-scrollbar {
    display: none;
}

.impulse-screen-list { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.impulse-srow {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 8px; border: none; border-left: 2px solid transparent; border-radius: 3px;
    background: var(--imp-panel); cursor: pointer;
    transition: border-color 0.15s, background 0.15s, opacity 0.15s;
    user-select: none;
    min-height: 22px;
}
.impulse-srow:hover { border-left-color: var(--imp-dim); background: var(--imp-border); }
.impulse-srow.active { border-left-color: var(--imp-white); background: var(--imp-border); }
.impulse-srow.screen-hidden { opacity: 0.4; }
.impulse-srow.drag-over-above { border-top: 2px solid var(--imp-white); padding-top: 4px; }
.impulse-srow.drag-over-below { border-bottom: 2px solid var(--imp-white); padding-bottom: 4px; }
.impulse-srow.dragging { opacity: 0.3; }

.impulse-zone-divider.drag-over-above { box-shadow: inset 0 2px 0 var(--imp-white); }
.impulse-zone-divider.drag-over-below { box-shadow: inset 0 -2px 0 var(--imp-white); }

.impulse-zone-header:hover { background: #2f3338 !important; }
.impulse-zone-header:hover svg { opacity: 1 !important; }
.impulse-srow-name { font-size: 11px; color: var(--imp-text); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.impulse-srow-actions { display: flex; gap: 2px; flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.impulse-srow:hover .impulse-srow-actions { opacity: 1; }
.impulse-srow.screen-hidden .impulse-srow-actions { opacity: 1; }
.impulse-srow-btn {
    width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 2px; cursor: pointer; padding: 0;
    transition: background 0.15s;
}
.impulse-srow-btn:hover { background: var(--imp-dim); }
.impulse-srow-btn svg { width: 11px; height: 11px; }

.impulse-block-category {
    margin-bottom: 7px;
}
.impulse-block-category:first-child {
    margin-top: 7px;
}

.impulse-block-category[data-category="layout"] {
    padding-bottom: 7px;
    margin-bottom: 7px;
    border-bottom: 1px solid #2a2e33;
}

.impulse-block-grid {
    display: flex;
    flex-wrap: wrap;
    row-gap: 7px;
    column-gap: 7px;
    justify-content: center;
}
.impulse-block-grid .impulse-block {
    
    flex: 0 0 calc((100% - 14px) / 3);
    min-width: 0;
    box-sizing: border-box;
}

.impulse-block-pro {
    position: relative;
    opacity: 0.62;
    cursor: pointer;
    transition: opacity 0.18s ease-in-out, background-color 0.18s ease-in-out;
}
.impulse-block-pro:hover {
    opacity: 1;
    background-color: #f5f5f5;
}
.impulse-block-pro .impulse-block-pro-lock {
    position: absolute;
    top: 4px;
    right: 4px;
    color: #555;
    pointer-events: none;
}
.impulse-block-pro:hover .impulse-block-pro-lock {
    color: #1d2327;
}

.impulse-editor .impulse-workspace[data-workspace="impulse"] .impulse-panel-left.impulse-compact {
    width: 172px;
    min-width: 172px;
    flex: 0 0 172px;
}
.impulse-panel-left.impulse-compact .impulse-block-grid {
    row-gap: 4px;
    column-gap: 4px;
}
.impulse-panel-left.impulse-compact .impulse-block-grid .impulse-block {
    
    flex: 0 0 calc((100% - 4px) / 2);
}
.impulse-panel-left.impulse-compact .impulse-block { padding: 5px 3px; }
.impulse-panel-left.impulse-compact .impulse-block-icon svg,
.impulse-panel-left.impulse-compact .impulse-block > svg { width: 16px; height: 16px; }
.impulse-panel-left.impulse-compact .impulse-block span { font-size: 10px; }
.impulse-panel-left.impulse-compact .impulse-section-divider {
    font-size: 9px;
    margin-top: 8px;
    margin-bottom: 3px;
}

.impulse-compact-toggle {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.18s ease-in-out;
}
.impulse-compact-toggle:hover { color: var(--imp-white); }
.impulse-compact-toggle svg { transition: transform 0.22s ease-in-out; }
.impulse-panel-left.impulse-compact .impulse-compact-toggle svg { transform: rotate(180deg); }

.impulse-panel-left.impulse-compact .impulse-panel-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.impulse-panel-left.impulse-compact .impulse-panel-tabs .impulse-panel-tab { padding: 8px 4px; }
.impulse-panel-left.impulse-compact .impulse-panel-tabs .impulse-compact-toggle { margin-left: 0; width: auto; justify-self: stretch; }
.impulse-panel-left.impulse-compact .impulse-library-subtabs { display: grid; grid-template-columns: 1fr 1fr; }
.impulse-panel-left.impulse-compact .impulse-block-grid-nav .impulse-block-nav[data-element="section"] { flex: 0 0 100%; width: 100%; }

.impulse-block-grid-nav {
    display: flex;
    flex-wrap: wrap;
    row-gap: 7px;
    column-gap: 7px;
}

.impulse-block-category[data-category="layout"] .impulse-block-nav { flex: 0 0 100%; }

.impulse-block-grid-nav .impulse-block-nav[data-element="header"],
.impulse-block-grid-nav .impulse-block-nav[data-element="footer"] { flex: 0 0 calc((100% - 7px) / 2); }
.impulse-block-nav {
    flex: 1;
    padding: 6px 8px !important;
    border-radius: 4px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.impulse-block-nav svg {
    flex-shrink: 0;
}
.impulse-block-nav span {
    font-size: 11px;
}

@property --scan-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.impulse-block {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 4px;
    padding: 8px 6px;
    text-align: center;
    cursor: default;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.22s ease-in-out, background 0.18s ease-in-out;
    position: relative;
    overflow: hidden;
    --light-x: 50%;
    --light-y: 50%;
}

.impulse-block::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 4px;
    border: 1px solid transparent;
    background: conic-gradient(from var(--scan-angle), transparent 0%, transparent 60%, rgba(255,255,255,0.7) 75%, rgba(255,255,255,0.9) 78%, rgba(255,255,255,0.7) 81%, transparent 96%) border-box;
    -webkit-mask: linear-gradient(var(--imp-white) 0 0) padding-box, linear-gradient(var(--imp-white) 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 3;
    pointer-events: none;
}

.impulse-block::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 5px;
    background: radial-gradient(ellipse 120px 100px at var(--light-x) var(--light-y), rgba(255,255,255,0.07) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
    pointer-events: none;
}

.impulse-block:hover {
    background: var(--btn-hover-bg);
    border-color: var(--imp-dim);
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.12);
}
.impulse-block:hover::before {
    opacity: 1;
    animation: impulse-scan 1.8s linear infinite;
}
.impulse-block:hover::after {
    opacity: 1;
}

@keyframes impulse-scan {
    to { --scan-angle: 360deg; }
}

.impulse-block:active { cursor: grabbing; transform: translateY(0) scale(0.97); box-shadow: none; transition: transform 0.08s ease-in-out, box-shadow 0.08s ease-in-out; }

.impulse-block-icon {
    margin-bottom: 3px;
    color: #666;
    position: relative;
    z-index: 2;
}

.impulse-block span {
    font-size: 11px;
    color: var(--imp-surface2);
    display: block;
    position: relative;
    z-index: 2;
}

.impulse-panel-tabs {
    display: flex;
    border-bottom: 1px solid var(--imp-text);
    background: var(--imp-light);
    padding: 0;
}

.impulse-panel-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}

.impulse-panel-tab:hover { color: var(--imp-surface2); background: rgba(0,0,0,0.03); }
.impulse-panel-tab.active { border-bottom-color: var(--btn-active-color); }

.impulse-editor .impulse-panel {
    background: var(--imp-surface);
    border-color: #333;
}
.impulse-editor .impulse-panel-left,
.impulse-editor .impulse-panel-right {
    border-color: #333;
    background: var(--imp-surface);
}
.impulse-editor .impulse-panel-left {
    background: var(--imp-surface);
}
.impulse-editor .impulse-panel-header {
    border-color: #333;
}
.impulse-editor .impulse-panel-header h3,
.impulse-editor #impulse-settings-title {
    color: var(--imp-text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
}
.impulse-editor .impulse-block {
    background: var(--imp-panel);
    border-color: var(--imp-border);
}
.impulse-editor .impulse-block:hover {
    border-color: var(--imp-dim);
    background: var(--imp-panel);
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.12);
}
.impulse-editor .impulse-block span {
    color: var(--imp-text);
}
.impulse-editor .impulse-block-icon {
    color: var(--imp-muted);
}
.impulse-editor .impulse-block-nav svg {
    stroke: var(--imp-muted);
}

.impulse-editor .impulse-panel-tabs {
    background: var(--imp-surface);
    border-bottom-color: var(--imp-border);
}
.impulse-editor .impulse-panel-tab {
    color: #ccc;
}
.impulse-editor .impulse-panel-tab:hover {
    color: var(--imp-white);
    background: rgba(255,255,255,0.05);
}
.impulse-editor .impulse-panel-tab.active {
    color: var(--imp-white);
    background: var(--imp-panel);
    border-bottom-color: var(--imp-white);
}
.impulse-editor .impulse-search {
    background: var(--imp-panel);
    border-color: var(--imp-border);
    color: var(--imp-text);
}
.impulse-editor .impulse-search::placeholder {
    color: #666;
}
.impulse-editor .impulse-setting-row label {
    color: #ccc;
}
.impulse-editor .impulse-setting-row input[type="text"],
.impulse-editor .impulse-setting-row input[type="number"]:not(.impulse-slider-value-input),
.impulse-editor .impulse-setting-row textarea,
.impulse-editor .impulse-setting-row select {
    background: var(--imp-panel);
    border-color: var(--imp-border);
    color: var(--imp-text);
}
.impulse-editor .impulse-btn-group button {
    background: var(--imp-border);
    color: var(--btn-color);
}
.impulse-editor .impulse-btn-group button:hover {
    background: #4a4f54;
    color: var(--imp-text);
}

.impulse-editor .impulse-btn-group-style button[data-value="primary"] { background: var(--imp-white) !important; color: var(--imp-surface2) !important; }
.impulse-editor .impulse-btn-group-style button[data-value="secondary"] { background: #4a4f54 !important; color: var(--imp-text) !important; }
.impulse-editor .impulse-btn-group-style button[data-value="outline"] { background: transparent !important; color: var(--imp-text) !important; border-color: var(--imp-text) !important; }
.impulse-editor .impulse-btn-group-style button[data-value="ghost"] { background: transparent !important; color: var(--imp-text) !important; }
.impulse-editor .impulse-setting-hint {
    color: #888;
}
.impulse-editor .impulse-setting-section-header {
    background: transparent;
    color: #888;
}
.impulse-editor .impulse-setting-section-header:hover {
    opacity: 0.8;
}
.impulse-editor .impulse-setting-section-title {
    color: #888 !important;
}
.impulse-editor .impulse-setting-section-chevron {
    display: none;
}
.impulse-editor .impulse-setting-section {
    border-color: #333;
}

.impulse-editor .impulse-setting-label,
.impulse-editor .impulse-swatch-label,
.impulse-editor .impulse-color-swatch-label,
.impulse-editor .impulse-setting-row label,
.impulse-editor .impulse-tabs-editor label,
.impulse-editor .impulse-accordion-editor label,
.impulse-editor .impulse-panel-right label,
.impulse-editor .impulse-panel-right .impulse-setting-label,
.impulse-editor [class*="swatch"] label,
.impulse-editor .impulse-color-row label {
    color: #888 !important;
}

.impulse-editor .impulse-settings-subtabs {
    background: transparent;
}
.impulse-editor .impulse-settings-subtab {
    color: var(--imp-muted);
}
.impulse-editor .impulse-settings-subtab:hover {
    color: var(--imp-white);
}
.impulse-editor .impulse-settings-subtab.active {
    color: var(--imp-white);
    background: transparent;
    border-bottom: 2px solid var(--imp-white);
}

.impulse-editor .impulse-tab-item input,
.impulse-editor .impulse-accordion-item-edit input,
.impulse-editor .impulse-accordion-item-edit textarea {
    background: var(--imp-panel);
    border-color: var(--imp-border);
    color: var(--imp-text);
}

.impulse-editor .impulse-richtext-toolbar {
    background: var(--imp-panel);
    border-color: var(--imp-border);
}

.impulse-editor .impulse-richtext-toolbar > button,
.impulse-editor .impulse-richtext-buttons > button {
    color: var(--imp-muted);
}
.impulse-editor .impulse-richtext-toolbar > button:hover,
.impulse-editor .impulse-richtext-buttons > button:hover {
    color: var(--imp-white);
    background: rgba(255,255,255,0.1);
}
.impulse-editor .impulse-richtext-toolbar > button.active,
.impulse-editor .impulse-richtext-buttons > button.active {
    color: var(--imp-white);
    background: #4a4f54;
}
.impulse-editor .impulse-richtext-editor {
    background: var(--imp-panel);
    border-color: var(--imp-border);
    color: var(--imp-text);
}
.impulse-editor .impulse-richtext-editor:focus {
    border-color: #666;
}
.impulse-editor .impulse-richtext-editor:empty:before {
    color: #666;
    font-size: 11px;
}
.impulse-editor .impulse-richtext-editor a {
    color: #888;
}
.impulse-editor .impulse-richtext-html {
    background: var(--imp-surface);
    border-color: var(--imp-border);
    color: var(--imp-text);
}
.impulse-editor .impulse-richtext-html:focus {
    border-color: #666;
    background: var(--imp-panel);
}
.impulse-editor .impulse-tab-drag {
    color: #666 !important;
}
.impulse-editor .impulse-nav-item {
    color: #ccc;
}
.impulse-editor .impulse-nav-item:hover {
    background: var(--imp-panel);
}
.impulse-editor .impulse-nav-item.selected {
    background: var(--imp-border);
    color: var(--imp-white);
}

.impulse-editor .impulse-tab {
    background: var(--imp-panel);
    border-color: var(--imp-border);
    color: var(--imp-white);
}
.impulse-editor .impulse-tab:hover {
    border-color: #666;
}
.impulse-editor .impulse-tab.active {
    background: var(--imp-border);
    border-color: #666;
    color: var(--imp-white);
}

.impulse-editor select,
.impulse-editor .impulse-setting-row select,
.impulse-editor .impulse-panel-right select {
    background: var(--imp-panel) !important;
    border-color: var(--imp-border) !important;
    color: var(--imp-white) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    padding-right: 28px !important;
    height: 26px !important;
    font-size: 11px !important;
    line-height: 24px !important;
    box-sizing: border-box !important;
}
.impulse-editor select option {
    background: var(--imp-panel) !important;
    color: var(--imp-white) !important;
    padding: 8px !important;
}
.impulse-editor select option:checked,
.impulse-editor select option:hover {
    background: var(--imp-border) !important;
    color: var(--imp-white) !important;
}

.impulse-editor .impulse-preview-area {
    background: #16181c;
}
.impulse-editor .impulse-canvas {
}

.impulse-editor .impulse-setting-group {
    border-bottom-color: var(--imp-border);
}
.impulse-editor .impulse-setting-group h4 {
    color: var(--imp-muted);
}
.impulse-editor .impulse-setting-row {
    border-bottom-color: var(--imp-border);
}
.impulse-editor hr {
    border-color: var(--imp-border);
}
.impulse-editor [style*="border-bottom: 1px solid #f0f0f0"],
.impulse-editor [style*="border-bottom: 1px solid var(--imp-text)"],
.impulse-editor [style*="border-bottom:1px solid #f0f0f0"],
.impulse-editor [style*="border-bottom:1px solid var(--imp-text)"] {
    border-bottom-color: var(--imp-border) !important;
}
.impulse-editor [style*="border-top: 1px solid #f0f0f0"],
.impulse-editor [style*="border-top: 1px solid var(--imp-text)"],
.impulse-editor [style*="border-top:1px solid #f0f0f0"],
.impulse-editor [style*="border-top:1px solid var(--imp-text)"] {
    border-top-color: var(--imp-border) !important;
}

.impulse-editor .impulse-device-tabs {
    background: var(--imp-surface);
    border-bottom-color: var(--imp-border);
}
.impulse-editor .impulse-device-tab {
    color: #ccc;
}
.impulse-editor .impulse-device-tab:hover {
    color: var(--imp-white);
    background: rgba(255,255,255,0.05);
}
.impulse-editor .impulse-device-tab.active {
    color: var(--imp-white);
    background: var(--imp-panel);
    border-bottom-color: var(--imp-white);
}

.impulse-editor .impulse-social-platform {
    background: var(--imp-panel);
    border-color: var(--imp-border);
    color: var(--imp-text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
}
.impulse-editor .impulse-social-url {
    background: var(--imp-panel);
    border-color: var(--imp-border);
    color: var(--imp-text);
}
.impulse-editor .impulse-social-url::placeholder {
    color: #666;
}
.impulse-editor .impulse-remove-social,
.seo-social-remove {
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    color: var(--imp-muted);
}
.impulse-editor .impulse-remove-social:hover,
.seo-social-remove:hover {
    background: var(--imp-border);
    border-color: var(--imp-dim);
    color: var(--imp-white);
}

.impulse-editor .impulse-remove-gallery-image,
.impulse-editor .impulse-remove-carousel-image,
.impulse-editor .impulse-remove-accordion-item,
.impulse-editor .impulse-remove-icon-list-item,
.impulse-editor .impulse-remove-pricing-plan,
.impulse-editor .impulse-remove-menu-item,
.impulse-editor .impulse-remove-footer-link,
.impulse-editor .impulse-remove-image-btn,
.impulse-editor .impulse-remove-bg,
.impulse-editor .impulse-remove-section-bg-fallback,
.impulse-editor .impulse-remove-section-bg-video,
.impulse-editor .impulse-remove-icon-image,

.impulse-editor .impulse-remove-gallery-image,
.impulse-editor .impulse-remove-carousel-image,
.impulse-editor .impulse-remove-accordion-item,
.impulse-editor .impulse-remove-icon-list-item,
.impulse-editor .impulse-remove-pricing-plan,
.impulse-editor .impulse-remove-menu-item,
.impulse-editor .impulse-remove-footer-link,
.impulse-editor .impulse-remove-image-btn,
.impulse-editor .impulse-remove-bg,
.impulse-editor .impulse-remove-section-bg-fallback,
.impulse-editor .impulse-remove-section-bg-video,
.impulse-editor .impulse-remove-icon-image,
.impulse-editor .impulse-section-anim-layer-delete,
.impulse-editor .impulse-layer-action.layer-delete,
.impulse-editor .impulse-pl-remove,
.impulse-editor .impulse-field-delete,
.impulse-editor .impulse-clear-image-btn,
.impulse-editor .impulse-bundle-remove-product,
.impulse-editor .bundle-remove-product,
.impulse-editor .pricing-remove-feature,
.impulse-editor .impulse-bg-shape-remove,
.impulse-editor .block-addon-remove,
.impulse-editor .ba-option-remove,
.impulse-editor .impulse-badge-remove,
.impulse-editor .impulse-img-remove,
.impulse-editor .impulse-manual-product-remove,
.impulse-editor .impulse-nav-delete,
.impulse-editor .cg-cell-remove,
.impulse-editor .impulse-cg-row-remove,
.impulse-editor .impulse-lg-col-remove,
.impulse-editor .lg-cell-remove,
.impulse-editor .impulse-delete-category,
.impulse-editor .impulse-delete-attribute,
.impulse-editor .impulse-delete-variation,
.impulse-editor .impulse-vol-delete,
.impulse-editor .impulse-volume-delete,
.impulse-editor .impulse-mo-close{
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    flex-shrink: 0;
    background: var(--imp-panel) !important;
    border: 1px solid var(--imp-border) !important;
    border-radius: 3px;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    box-sizing: border-box;
    color: var(--imp-muted) !important;
    line-height: 1;
    font-size: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.04s;
}
.impulse-editor .impulse-remove-gallery-image:active,
.impulse-editor .impulse-remove-carousel-image:active,
.impulse-editor .impulse-remove-accordion-item:active,
.impulse-editor .impulse-remove-icon-list-item:active,
.impulse-editor .impulse-remove-pricing-plan:active,
.impulse-editor .impulse-remove-menu-item:active,
.impulse-editor .impulse-remove-footer-link:active,
.impulse-editor .impulse-remove-image-btn:active,
.impulse-editor .impulse-remove-bg:active,
.impulse-editor .impulse-remove-section-bg-fallback:active,
.impulse-editor .impulse-remove-section-bg-video:active,
.impulse-editor .impulse-remove-icon-image:active,
.impulse-editor .impulse-section-anim-layer-delete:active,
.impulse-editor .impulse-mo-close:active{ transform: scale(0.88); }

.impulse-editor .impulse-remove-gallery-image svg,
.impulse-editor .impulse-remove-carousel-image svg,
.impulse-editor .impulse-remove-accordion-item svg,
.impulse-editor .impulse-remove-icon-list-item svg,
.impulse-editor .impulse-remove-pricing-plan svg,
.impulse-editor .impulse-remove-menu-item svg,
.impulse-editor .impulse-remove-footer-link svg,
.impulse-editor .impulse-remove-image-btn svg,
.impulse-editor .impulse-remove-bg svg,
.impulse-editor .impulse-remove-section-bg-fallback svg,
.impulse-editor .impulse-remove-section-bg-video svg,
.impulse-editor .impulse-remove-icon-image svg,
.impulse-editor .impulse-section-anim-layer-delete svg,
.impulse-editor .impulse-mo-close svg{
    width: 11px !important;
    height: 11px !important;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    pointer-events: none;
}
.impulse-editor .impulse-remove-gallery-image:hover,
.impulse-editor .impulse-remove-carousel-image:hover,
.impulse-editor .impulse-remove-accordion-item:hover,
.impulse-editor .impulse-remove-icon-list-item:hover,
.impulse-editor .impulse-remove-pricing-plan:hover,
.impulse-editor .impulse-remove-menu-item:hover,
.impulse-editor .impulse-remove-footer-link:hover,
.impulse-editor .impulse-remove-image-btn:hover,
.impulse-editor .impulse-remove-bg:hover,
.impulse-editor .impulse-remove-section-bg-fallback:hover,
.impulse-editor .impulse-remove-section-bg-video:hover,
.impulse-editor .impulse-remove-icon-image:hover,
.impulse-editor .impulse-section-anim-layer-delete:hover,
.impulse-editor .impulse-layer-action.layer-delete:hover,
.impulse-editor .impulse-pl-remove:hover,
.impulse-editor .impulse-field-delete:hover,
.impulse-editor .impulse-clear-image-btn:hover,
.impulse-editor .impulse-bundle-remove-product:hover,
.impulse-editor .bundle-remove-product:hover,
.impulse-editor .pricing-remove-feature:hover,
.impulse-editor .impulse-bg-shape-remove:hover,
.impulse-editor .block-addon-remove:hover,
.impulse-editor .ba-option-remove:hover,
.impulse-editor .impulse-badge-remove:hover,
.impulse-editor .impulse-img-remove:hover,
.impulse-editor .impulse-nav-delete:hover,
.impulse-editor .cg-cell-remove:hover,
.impulse-editor .impulse-cg-row-remove:hover,
.impulse-editor .impulse-lg-col-remove:hover,
.impulse-editor .lg-cell-remove:hover,
.impulse-editor .impulse-delete-category:hover,
.impulse-editor .impulse-delete-attribute:hover,
.impulse-editor .impulse-delete-variation:hover,
.impulse-editor .impulse-vol-delete:hover,
.impulse-editor .impulse-volume-delete:hover,
.impulse-editor .impulse-mo-close:hover{
    background: var(--imp-border) !important;
    border-color: var(--imp-dim) !important;
    color: var(--imp-white) !important;
}
.impulse-editor .impulse-add-social,
.impulse-editor .impulse-panel-content .impulse-add-social {
    background: var(--imp-panel) !important;
    border: 1px solid var(--imp-border) !important;
    color: var(--imp-muted) !important;
}
.impulse-editor .impulse-add-social:hover,
.impulse-editor .impulse-panel-content .impulse-add-social:hover {
    background: var(--imp-border) !important;
    border-color: var(--imp-dim) !important;
    color: var(--imp-white) !important;
}

.impulse-editor .impulse-panel-content .instinctor-btn {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: var(--btn-color);
}
.impulse-editor .impulse-panel-content .instinctor-btn:hover {
    background: var(--btn-hover-bg);
    border-color: var(--imp-dim);
    color: var(--btn-hover-color);
}

.impulse-preview-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--imp-text);
    caret-color: transparent;
    cursor: default;
}

.impulse-canvas-scroll {
    flex: 1;
    overflow: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 0;
    background: #16181c;
    
    position: relative;
}

html:has(body.instinctor-standalone-admin),
body.instinctor-standalone-admin,
body.instinctor-standalone-admin *,
body.wp-admin .impulse-editor,
body.wp-admin .impulse-editor * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
html:has(body.instinctor-standalone-admin)::-webkit-scrollbar,
body.instinctor-standalone-admin::-webkit-scrollbar,
body.instinctor-standalone-admin ::-webkit-scrollbar,
body.instinctor-standalone-admin *::-webkit-scrollbar,
body.wp-admin .impulse-editor ::-webkit-scrollbar,
body.wp-admin .impulse-editor *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
}

.impulse-settings-cardflow {
    column-count: 2;
    column-gap: 20px;
    column-fill: balance;
}

.impulse-settings-cardflow .impulse-cardflow-pass {
    display: contents;
}
.impulse-settings-cardflow .settings-card {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin: 0 0 20px;
}

body.wp-admin .impulse-editor input[type="text"],
body.wp-admin .impulse-editor input[type="password"],
body.wp-admin .impulse-editor input[type="date"],
body.wp-admin .impulse-editor input[type="datetime"],
body.wp-admin .impulse-editor input[type="datetime-local"],
body.wp-admin .impulse-editor input[type="email"],
body.wp-admin .impulse-editor input[type="month"],
body.wp-admin .impulse-editor input[type="number"],
body.wp-admin .impulse-editor input[type="search"],
body.wp-admin .impulse-editor input[type="tel"],
body.wp-admin .impulse-editor input[type="time"],
body.wp-admin .impulse-editor input[type="url"],
body.wp-admin .impulse-editor input[type="week"],
body.wp-admin .impulse-editor select {
    min-height: 26px;
}

body.wp-admin .impulse-editor select {
    line-height: normal;
}

.impulse-editor:not(.editing) .impulse-canvas-scroll {
    padding: 0;
}

.impulse-canvas {
    background: var(--imp-surface);
    transition: width 0.3s;
    position: relative;
    caret-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}
.impulse-canvas.impulse-canvas-loading {
    box-shadow: none;
    background: transparent;
}

.impulse-canvas[data-device="desktop"] { width: calc(100% - 48px); max-width: 1920px; }
.impulse-canvas[data-device="tablet"] { width: 768px; transform-origin: top center; }

.impulse-canvas[data-device="mobile"] { width: 430px; transform-origin: top center; }

.impulse-canvas-cellborders-toggle {
    position:absolute;bottom:8px;left:8px;z-index:11;
    width:28px;height:28px;padding:0;border-radius:4px;
    background:rgba(0,0,0,0.55);border:1px solid rgba(255,255,255,0.12);
    color:#bbb;cursor:pointer;
    display:flex;align-items:center;justify-content:center;
    transition:background 0.12s,color 0.12s,border-color 0.12s;
}

.impulse-canvas-cellborders-toggle { transform:scale(var(--impulse-canvas-boost,1));transform-origin:bottom left }
.impulse-canvas-cellborders-toggle:hover { background:rgba(0,0,0,0.75);color:#fff;border-color:rgba(255,255,255,0.25) }
.impulse-canvas-cellborders-toggle.is-active { background:#fff;color:#1d2327;border-color:#fff }
.impulse-canvas-cellborders-toggle.is-active:hover { background:#e0e0e0 }

.impulse-canvas iframe {
    width: 100%;
    height: calc(100vh - 104px);
    border: none;
    display: block;
}

.impulse-canvas[data-device="tablet"] iframe {
    height: auto;
    aspect-ratio: 3 / 4;
    max-height: calc(100vh - 104px);
}
.impulse-canvas[data-device="mobile"] iframe {
    height: auto;
    aspect-ratio: 9 / 16;
    max-height: calc(100vh - 104px);
}
#impulse-load-bar {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: rgba(255,255,255,0.06);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
#impulse-load-bar.active { opacity: 1; }
#impulse-load-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #888 0%, var(--imp-text) 100%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 1px 1px 0;
}

.impulse-canvas-scroll:has(.impulse-canvas[data-screen-mode="1"]) {
    overflow: hidden;
    position: relative; 
}
.impulse-canvas[data-screen-mode="1"] {
    position: absolute;
    top: 50%;
    left: 50%;
    
    transform: translate(-50%, -50%);
    transform-origin: center center;
}

.impulse-canvas[data-screen-mode="1"][data-device="desktop"]:not([data-scroll="classic"]) {
    width: 1920px;
    height: 1080px;
    max-width: none;
}
.impulse-canvas[data-screen-mode="1"][data-device="tablet"] {
    width: 768px;
    height: 1024px;
}
.impulse-canvas[data-screen-mode="1"][data-device="mobile"] {
    
    width: 430px;
    height: 932px;
}
.impulse-canvas[data-screen-mode="1"] iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    max-height: none;
    max-width: none;
}

.impulse-canvas[data-screen-mode="1"] {
    
    transition: opacity 0.2s ease-in-out;
}
.impulse-canvas[data-screen-mode="1"]:not(.impulse-canvas-fitted) {
    opacity: 0;
    pointer-events: none;
}

.impulse-block.dragging {
    opacity: 0.5;
}

.impulse-canvas.drag-over {
    outline: 3px solid var(--imp-surface2);
    outline-offset: -3px;
    background: var(--imp-light);
}

.impulse-structure-cell.drop-target-cell{background:rgba(153,153,153,0.12)!important;outline:1px solid rgba(153,153,153,0.4);outline-offset:-1px}
.impulse-drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: none;
    pointer-events: none;
}

.impulse-canvas.drag-active .impulse-drop-overlay {
    display: block;
    pointer-events: auto;
}

.impulse-canvas {
    position: relative;
}

.impulse-canvas-tabs { display: flex; gap: 4px; }
.impulse-canvas-tab {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}
.impulse-canvas-tab:hover { color: var(--imp-white); background: rgba(255,255,255,0.1); }
.impulse-canvas-tab.active { color: var(--imp-white); background: rgba(255,255,255,0.15); }
.impulse-canvas-tab .count {
    color: rgba(255,255,255,0.4);
    margin-left: 4px;
}
.impulse-canvas-tab.active .count { color: rgba(255,255,255,0.6); }
.impulse-canvas-empty-trash {
    background: transparent;
    border: 1px solid rgba(220,38,38,0.5);
    color: #888;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 4px;
    margin-left: 8px;
}
.impulse-canvas-empty-trash:hover { background: rgba(220,38,38,0.1); border-color: var(--imp-dim); }

.impulse-page-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    padding: 24px;
    background: var(--imp-text);
}
.impulse-canvas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-size, 250px), 1fr));
    gap: 12px;
}
.impulse-canvas-grid .impulse-pg-group {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 8px;
    padding: 12px 4px 6px; margin-top: 4px;
    cursor: pointer; user-select: none;
    border-bottom: 1px solid #2a2e33;
}
.impulse-canvas-grid .impulse-pg-group:first-child { margin-top: 0; }
.impulse-pg-group .impulse-pg-caret { color: #888; font-size: 14px; width: 12px; text-align: center; line-height: 1; }
.impulse-pg-group .impulse-pg-name { color: #e0e0e0; font-size: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.impulse-pg-group .impulse-pg-count { color: #999; font-size: 11px; background: #2a2e33; border-radius: 10px; padding: 1px 8px; }

.impulse-selection-box {
    position: fixed;
    border: 1px solid rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.06);
    pointer-events: none;
    z-index: 9999;
    border-radius: 2px;
}
.impulse-canvas-grid .impulse-page-card { cursor: default; }
.impulse-canvas-grid .impulse-page-card:active { cursor: grabbing; }
.impulse-canvas-grid .impulse-page-card.sortable-ghost {
    opacity: 0.3;
}
.impulse-canvas-grid .impulse-page-card.sortable-drag {
    opacity: 1;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transform: scale(1.02);
}

.impulse-canvas-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.impulse-grid-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--imp-border);
    border-top-color: var(--imp-muted);
    border-radius: 50%;
    animation: impulse-spin 0.8s linear infinite;
}
@keyframes impulse-spin {
    to { transform: rotate(360deg); }
}

.impulse-thumb-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 35, 39, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 5;
    pointer-events: none;
}
.impulse-thumb-spinner::after {
    content: '';
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: impulse-spin 0.8s linear infinite;
}
.impulse-canvas-empty p {
    font-size: 16px;
    margin: 0;
}

.impulse-editor.editing .impulse-page-list { display: none; }
.impulse-editor.editing .impulse-canvas-header { display: none; }
.impulse-editor.editing .impulse-canvas { display: block !important; }
.impulse-editor.editing .impulse-preview-area { flex-direction: column; }
.impulse-editor.editing .impulse-canvas-scroll { padding: 12px; flex-direction: column; align-items: center; }

.impulse-editor:not(.editing) .impulse-preview-area {
    flex-direction: column;
    position: relative;
}
.impulse-editor:not(.editing) .impulse-canvas-scroll {
    padding: 0;
}

.impulse-editor:not(.editing) .impulse-workspace[data-workspace="impulse"] .impulse-panel-left,
.impulse-editor:not(.editing) .impulse-workspace[data-workspace="impulse"] .impulse-panel-right {
    display: none;
}

.impulse-editor.editing .impulse-editing-only { display: flex !important; }
.impulse-editor.editing[data-workspace="impulse"] .impulse-list-only { display: none !important; }
.impulse-editor:not(.editing) .impulse-editing-only { display: none !important; }
.impulse-editor:not(.editing) .impulse-list-only { display: flex !important; }
.impulse-editor:not(.editing) .impulse-sequences-sidebar { display: flex !important; }

.impulse-editor[data-workspace]:not([data-workspace="impulse"]) .impulse-editing-only { display: none !important; }
.impulse-editor[data-workspace]:not([data-workspace="impulse"]) .impulse-only { display: none !important; }

.impulse-editor .impulse-page-list { background: var(--imp-surface); }
.impulse-editor .impulse-canvas-empty { color: var(--imp-muted); }

.impulse-canvas-grid .impulse-page-card {
    background: var(--imp-white);
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s;
}
.impulse-canvas-grid .impulse-page-card:hover {
    border-color: var(--imp-surface2);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.impulse-editor .impulse-canvas-grid .impulse-page-card {
    background: var(--imp-panel);
    border-color: var(--imp-border);
}
.impulse-editor .impulse-canvas-grid .impulse-page-card:hover {
    border-color: var(--imp-dim);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.impulse-editor .impulse-canvas-grid .impulse-page-preview {
    background: var(--imp-surface);
    border-bottom: 1px solid var(--imp-border);
}
.impulse-editor .impulse-canvas-grid .impulse-page-preview::after {
    color: var(--imp-dim);
}

.impulse-editor .impulse-canvas-grid .impulse-card-status .status-circle {
    box-shadow: 0 0 0 2px var(--imp-light), 0 0 0 3px #888;
}
.impulse-editor .impulse-canvas-grid .impulse-card-status.is-live .status-circle {
    background: var(--imp-text);
    box-shadow: 0 0 0 2px var(--imp-light), 0 0 0 3px #888;
}
.impulse-editor .impulse-canvas-grid .impulse-card-status.is-trash .status-circle {
    box-shadow: 0 0 0 2px var(--imp-light), 0 0 0 3px #ccc;
}

.impulse-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000010;
    animation: impulse-modal-fade 0.15s ease-in-out;
}

@keyframes impulse-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.impulse-modal-content {
    background: var(--imp-surface);
    border-radius: 8px;
    width: 90%;
    animation: impulse-modal-slide 0.15s ease-in-out;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    color: var(--imp-text);
}

@keyframes impulse-modal-slide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.impulse-modal-lg { max-width: 600px; }
.impulse-modal-xl { max-width: 860px; }

.impulse-modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--imp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.impulse-modal-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--imp-white);
}

.impulse-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.impulse-modal-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.impulse-modal-body::-webkit-scrollbar { display: none; }

.impulse-modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--imp-border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.impulse-form-row {
    margin-bottom: 16px;
}

.impulse-form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--imp-surface2);
}

.impulse-form-row input[type="text"],
.impulse-form-row input[type="number"],
.impulse-form-row select,
.impulse-form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    font-size: 14px;
}

.impulse-tab {
    padding: 8px 16px;
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    background: var(--imp-white);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.impulse-tab:hover { border-color: var(--imp-surface2); }
.impulse-tab.active { background: var(--imp-surface2); color: var(--imp-white); border-color: var(--imp-surface2); }

.impulse-setting-group {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.impulse-setting-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.impulse-setting-group h4 {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
}

.impulse-editor .impulse-two-col-settings .impulse-col-label {
    color: var(--imp-muted);
}

.impulse-setting-row {
    margin-bottom: 8px;
}

.impulse-setting-row:last-child { margin-bottom: 0; }
.impulse-tiles-panel .impulse-setting-row { margin-bottom: 3px; }

.impulse-setting-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    margin-top: 10px;
    font-weight: 500;
}

.impulse-section-divider,
.impulse-setting-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.impulse-section-divider.impulse-divider-with-toggle::after { display: none; }

.impulse-hue-slider .impulse-slider-row {
    background: linear-gradient(to right,
        hsl(0,85%,60%), hsl(60,85%,60%), hsl(120,85%,60%),
        hsl(180,85%,60%), hsl(240,85%,60%), hsl(300,85%,60%), hsl(360,85%,60%));
    border-radius: 2px;
    height: 4px;
    padding: 0;
}
.impulse-hue-slider .impulse-slider-row input[type="range"] {
    background: transparent !important;
}

.impulse-setting-divider span {
    white-space: nowrap;
}
.impulse-ps-toggle:hover { color: #bbb; }

.impulse-custom-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 26px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    box-sizing: border-box;
    user-select: none;
    min-width: 0;
}
.impulse-custom-select.ics-open {
    border-color: var(--imp-dim);
}
.impulse-custom-select-value {
    flex: 1;
    min-width: 0;
    padding: 0 22px 0 8px;
    font-size: 11px;
    color: var(--imp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 24px;
}
.impulse-custom-select-arrow {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #888;
    transition: transform 0.15s;
    display: flex;
    align-items: center;
}
.impulse-custom-select.ics-open .impulse-custom-select-arrow {
    transform: translateY(-50%) rotate(180deg);
}
.impulse-custom-select-dropdown {
    position: fixed;
    z-index: 999999;
    
    height: auto !important;
    background: var(--imp-surface) !important;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
    overflow-y: auto;
    max-height: 420px;
    
    scrollbar-width: none;          
    -ms-overflow-style: none;       
}
.impulse-custom-select-dropdown::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}
.impulse-custom-select-option {
    padding: 5px 10px;
    font-size: 11px;
    color: var(--imp-muted);
    cursor: pointer;
    white-space: nowrap;
}
.impulse-custom-select-option:hover {
    background: var(--imp-panel);
    color: var(--imp-text);
}
.impulse-custom-select-option.ics-selected {
    background: var(--imp-panel);
    color: var(--imp-white);
}
.impulse-custom-select-option.ics-disabled {
    color: var(--imp-dim);
    cursor: default;
    pointer-events: none;
}

.impulse-custom-select.ics-full  { width: 100%; }
.impulse-custom-select.ics-flex1 { flex: 1; min-width: 0; }

.impulse-padding-section .impulse-section-divider,
.impulse-margins-section .impulse-section-divider {
    cursor: pointer;
}
.impulse-padding-section .impulse-section-divider:hover,
.impulse-margins-section .impulse-section-divider:hover {
    color: var(--imp-muted);
}

.impulse-section-collapse { cursor: pointer; }
.impulse-section-collapse:hover { color: #aaa; }
.impulse-section-collapse[data-collapsed="1"] { opacity: 0.6; }
.impulse-section-collapse[data-collapsed="0"] { opacity: 1; }

.impulse-padding-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    margin-bottom: 8px;
}

.impulse-padding-grid .impulse-setting-row {
    margin-bottom: 0;
    width: 100%;
}

.impulse-padding-grid .impulse-setting-row > label {
    font-size: 11px;
    margin-bottom: 6px;
    color: #666;
}

.impulse-padding-grid .impulse-slider-row {
    justify-content: flex-start;
    margin-bottom: 0;
}

.impulse-margins-section {
    margin-bottom: 8px;
}

.impulse-margin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    
    grid-auto-flow: row dense;
    gap: 8px 16px;
    margin-top: 8px;
}

.impulse-margin-grid > *:nth-child(odd):last-child {
    grid-column: 1 / -1;
}

.impulse-margin-grid .impulse-setting-row {
    margin-bottom: 0;
    width: 100%;
}

.impulse-margin-grid .impulse-setting-row > label {
    font-size: 11px;
    margin-bottom: 6px;
    color: #666;
}

.impulse-margin-grid .impulse-setting-row.inline-slider > label {
    margin-bottom: 0;
}
.impulse-margin-grid .impulse-setting-row.inline-slider > .impulse-slider-row {
    margin-top: 6px;
}

.impulse-margin-grid .impulse-slider-row {
    justify-content: flex-start;
    margin-bottom: 0;
}

.impulse-editor .impulse-margin-grid .impulse-slider-row,
.impulse-editor .impulse-padding-grid .impulse-slider-row {
    margin-bottom: 0;
}

.impulse-padding-section {
    margin-top: 12px;
    margin-bottom: 8px;
}

.impulse-editor .impulse-padding-grid .impulse-setting-row > label,
.impulse-editor .impulse-margin-grid .impulse-setting-row > label {
    color: #888;
}

.impulse-setting-right-align .impulse-setting-row {
    text-align: right;
}

div[style*="justify-content:flex-end"] > .impulse-setting-row.impulse-color-setting,
div[style*="justify-content: flex-end"] > .impulse-setting-row.impulse-color-setting {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
div[style*="justify-content:flex-end"] > .impulse-setting-row.impulse-color-setting > label,
div[style*="justify-content: flex-end"] > .impulse-setting-row.impulse-color-setting > label {
    text-align: right;
}

.impulse-align-right .impulse-setting-row {
    text-align: right;
}
.impulse-align-right .impulse-setting-row.impulse-color-setting {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.impulse-align-right .impulse-color-row {
    justify-content: flex-end;
}

.impulse-grid-selector {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
}
.impulse-grid-selector-cell {
    aspect-ratio: 2/1;
    background: var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s, transform 0.1s;
}
.impulse-grid-selector-cell:hover {
    transform: scale(1.05);
}
.impulse-grid-selector-cell.active {
    background: #85888C;
}
.impulse-grid-selector-cell.has-content {
    background: #85888C;
    cursor: default;
    position: relative;
}
.impulse-grid-selector-cell.selected {
    background: var(--imp-text) !important;
}
.impulse-grid-selector-cell.has-content:active {
    cursor: grabbing;
}
.impulse-grid-selector-cell.dragging {
    opacity: 0.4;
    outline: 2px solid #85888C;
    outline-offset: -2px;
}
.impulse-grid-selector-cell.drag-over {
    outline: 2px solid #666;
    outline-offset: -2px;
    background: rgba(102, 102, 102, 0.3) !important;
}
.impulse-grid-selector-cell.hover-active {
    background: #666;
}

.impulse-cg-editor {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.impulse-cg-row {
    display: flex;
    align-items: stretch;
    min-height: 28px;
    position: relative;
}
.impulse-cg-row-cells {
    display: flex;
    flex: 1;
    min-width: 0;
    gap: 0;
}
.impulse-cg-cell {
    min-height: 28px;
    background: var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #666;
    transition: background 0.15s;
    user-select: none;
    min-width: 0;
}

.impulse-cg-cell {
    transition: background 0.1s;
}

.impulse-cg-pcts {
    display: flex;
    gap: 2px;
    margin-bottom: 2px;
}
.cg-cell-pct {
    flex: 1;
    min-width: 0;
    min-height: 22px;
    padding: 3px 4px;
    background: var(--imp-surface2);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--imp-text);
    text-align: center;
    cursor: ew-resize;
    user-select: text;
    outline: none;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
}
.cg-cell-pct::after {
    content: '%';
    opacity: 0.5;
    margin-left: 1px;
    pointer-events: none;
}
.cg-cell-pct:hover { border-color: var(--imp-dim); }
.cg-cell-pct:focus { border-color: var(--imp-muted); background: var(--imp-panel); cursor: text; }

.impulse-cg-cell { container-type: inline-size; }
.impulse-cg-cell > .cg-cell-pct {
    flex: 0 0 auto;
    min-width: 0;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 10px;
    line-height: 1;
    color: var(--imp-muted);
    text-align: center;
    cursor: ew-resize;
    max-width: 100%;
    overflow: hidden;
}
.impulse-cg-cell > .cg-cell-pct:focus { background: transparent; border: none; color: var(--imp-text); cursor: text; }
@container (max-width: 34px) { .impulse-cg-cell > .cg-cell-pct::after { display: none; } }
.impulse-cg-cell.has-content {
    background: #85888C !important;
    cursor: default;
}
.impulse-cg-cell.selected {
    background: #6a6d72 !important;
    color: var(--imp-text);
    outline: 1px solid #999;
    outline-offset: -1px;
}
.impulse-cg-cell.dragging {
    opacity: 0.3;
}
.impulse-cg-cell.drag-over {
    outline: 2px solid #888;
    outline-offset: -2px;
    background: rgba(255,255,255,0.1) !important;
}

.impulse-editor .impulse-pricing-plan-name-wrap .impulse-remove-pricing-plan {
    position: absolute !important;
    top: 50% !important;
    right: 6px !important;
    transform: translateY(-50%) !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--imp-muted) !important;
    cursor: pointer !important;
    opacity: 0.7;
    font-size: 0;
}
.impulse-editor .impulse-pricing-plan-name-wrap .impulse-remove-pricing-plan:hover {
    opacity: 1;
    background: none !important;
    color: var(--imp-white) !important;
}
.impulse-editor .impulse-pricing-plan-name-wrap .impulse-remove-pricing-plan svg {
    width: 14px;
    height: 14px;
    display: block;
}

.impulse-editor .impulse-cg-cell .cg-cell-remove,
.impulse-editor .impulse-layout-cell .lg-cell-remove {
    display: none !important;
    position: absolute !important;
    top: 50% !important;
    right: 4px !important;
    transform: translateY(-50%) !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    color: var(--imp-white) !important;
    cursor: pointer !important;
    z-index: 2 !important;
    opacity: 0.85;
    font-size: 0;
}
.impulse-editor .impulse-cg-cell:hover .cg-cell-remove,
.impulse-editor .impulse-layout-cell:hover .lg-cell-remove { display: block !important; }
.impulse-editor .impulse-cg-cell .cg-cell-remove:hover,
.impulse-editor .impulse-layout-cell .lg-cell-remove:hover { opacity: 1; background: none !important; }
.impulse-editor .impulse-cg-cell .cg-cell-remove svg,
.impulse-editor .impulse-layout-cell .lg-cell-remove svg { width: 14px; height: 14px; display: block; }

.impulse-editor .impulse-cg-add-cell svg,
.impulse-editor .impulse-cg-add-row svg,
.impulse-editor .impulse-cg-remove-row svg,
.impulse-editor .impulse-cg-row-drag svg,
.impulse-editor .impulse-lg-add-cell svg,
.impulse-editor .impulse-lg-add-col svg { width: 14px; height: 14px; display: block; }

.impulse-cg-row-drag:hover { border-color: var(--imp-dim) !important; color: var(--imp-muted) !important; }
.impulse-cg-row-drag:active { cursor: grabbing !important; }
.impulse-cg-row.cg-row-dragging { opacity: 0.4; }
.cg-row-drop-line { height: 2px; background: var(--imp-muted); border-radius: 1px; margin: 1px 0; pointer-events: none; }
.impulse-cg-cell:hover .cg-cell-remove {
    display: block;
}

.impulse-cg-add-cell {
    width: 22px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--imp-dim);
    font-size: 14px;
    margin-left: 4px;
    transition: border-color 0.15s, color 0.15s;
}
.impulse-cg-add-cell:hover {
    border-color: #666;
    color: #888;
}
.impulse-cg-row-remove {
    visibility: hidden;
    background: transparent;
    border: none;
    padding: 0 6px;
    margin: 0;
    font-size: 18px;
    line-height: 1;
    color: rgba(130,130,130,0.8);
    cursor: pointer;
    align-self: center;
    flex-shrink: 0;
    transition: color 0.15s;
}
.impulse-cg-row-remove:hover { color: #fff; }
.impulse-cg-row:hover .impulse-cg-row-remove { visibility: visible; }
.impulse-cg-add-row {
    height: 20px;
    background: transparent;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--imp-dim);
    font-size: 14px;
    transition: border-color 0.15s, color 0.15s;
    margin-top: 2px;
}
.impulse-cg-add-row:hover {
    border-color: #666;
    color: #888;
}

.impulse-lg-editor {
    width: 100%;
}
.impulse-lg-editor-cols {
    display: flex;
    width: 100%;
    min-height: 120px;
    position: relative;
}
.impulse-lg-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    position: relative;
}
.impulse-lg-cell {
    flex: 1;
    min-height: 28px;
    background: var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #666;
    transition: background 0.15s;
    user-select: none;
}
.impulse-lg-cell:hover {
    background: #484d52;
}
.impulse-lg-cell.has-content {
    background: var(--imp-dim) !important;
    cursor: default;
}
.impulse-lg-cell.selected {
    background: #6a6d72 !important;
    color: var(--imp-text);
    outline: 1px solid #999;
    outline-offset: -1px;
}
.impulse-lg-cell.dragging {
    opacity: 0.3;
}
.impulse-lg-cell.drag-over {
    outline: 2px solid #888;
    outline-offset: -2px;
    background: rgba(255,255,255,0.1) !important;
}
.impulse-lg-cell .lg-cell-remove {
    display: none;
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #333;
    border: none;
    border-radius: 2px;
    color: var(--imp-white);
    font-size: 10px;
    line-height: 14px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}
.impulse-lg-cell:hover .lg-cell-remove {
    display: block;
}
.impulse-lg-add-cell {
    height: 20px;
    background: transparent;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--imp-dim);
    font-size: 14px;
    transition: border-color 0.15s, color 0.15s;
    margin-top: 2px;
}
.impulse-lg-add-cell:hover {
    border-color: #666;
    color: #888;
}

.impulse-lg-pcts {
    display: flex;
    gap: 2px;
    margin-bottom: 4px;
    width: 100%;
}
.lg-col-pct {
    flex: 1;
    min-width: 0;
    min-height: 22px;
    padding: 3px 4px;
    background: var(--imp-surface2);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--imp-text);
    text-align: center;
    cursor: ew-resize;
    user-select: text;
    outline: none;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
}
.lg-col-pct::after {
    content: '%';
    opacity: 0.5;
    margin-left: 1px;
    pointer-events: none;
}
.lg-col-pct:hover { border-color: var(--imp-dim); }
.lg-col-pct:focus { border-color: var(--imp-muted); background: var(--imp-panel); cursor: text; }
.impulse-lg-add-col {
    width: 22px;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--imp-dim);
    font-size: 16px;
    margin-left: 4px;
    transition: border-color 0.15s, color 0.15s;
}
.impulse-lg-add-col:hover {
    border-color: #666;
    color: #888;
}
.impulse-lg-col-header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    margin-bottom: 4px;
    position: relative;
}
.impulse-lg-col-header span {
    font-size: 9px;
    color: #666;
}
.impulse-lg-col-remove {
    display: none;
    position: absolute;
    top: -2px;
    right: 0;
    width: 14px;
    height: 14px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    color: var(--imp-white);
    opacity: 0.85;
    cursor: pointer;
    z-index: 5;
    transition: opacity 0.15s;
}
.impulse-lg-col-remove svg { width: 14px; height: 14px; display: block; }
.impulse-lg-col-remove:hover { opacity: 1; }
.impulse-lg-col:hover .impulse-lg-col-remove {
    display: flex;
}

.impulse-cell-panel-body .impulse-setting-row {
    margin-bottom: 8px;
}
.impulse-cell-panel-body .impulse-setting-row:last-child {
    margin-bottom: 0;
}

.impulse-setting-row label {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    color: #888;
}

.impulse-feature-toggle {
    flex: 0 0 auto;
}

#impulse-panel-content label {
    font-size: 11px;
    color: #888;
}

.impulse-setting-row input[type="text"],
.impulse-setting-row input[type="number"]:not(.impulse-slider-value-input),
.impulse-setting-row input[type="url"],
.impulse-setting-row select,
.impulse-setting-row textarea {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--imp-text);
    border-radius: 3px;
    font-size: 12px;
    height: 28px;
    box-sizing: border-box;
}

.impulse-setting-row select option,

.impulse-setting-row select option:checked,
.impulse-setting-row select option:hover,
.impulse-animation-controls select option:checked,

.impulse-setting-row textarea {
    height: auto;
    min-height: 40px;
    resize: none;
    overflow: hidden;
}

.impulse-richtext-wrapper {
    width: 100%;
}

.impulse-richtext-nolabel {
    display: block;
    margin-bottom: 0;
}

.impulse-richtext-nolabel > label {
    display: none;
}

.impulse-richtext-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: var(--imp-light);
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 0;
}

.impulse-richtext-tabs {
    display: flex;
    gap: 3px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-right: 4px;
}

.impulse-richtext-tab {
    padding: 0 10px;
    height: var(--btn-height, 26px);
    border: 1px solid var(--btn-border, var(--imp-border));
    background: var(--btn-bg, var(--imp-panel));
    font-size: var(--btn-font, 11px);
    font-weight: 500;
    color: var(--btn-color, var(--imp-muted));
    cursor: pointer;
    transition: all 0.15s;
    border-radius: var(--btn-radius, 3px);
    box-sizing: border-box;
    line-height: 1;
}

.impulse-richtext-tab.active {
    background: var(--imp-white);
    color: var(--imp-surface2);
    border-color: var(--imp-white);
}

.impulse-richtext-tab:hover:not(.active) {
    border-color: var(--imp-dim);
    color: var(--imp-text);
}

.impulse-richtext-buttons {
    display: flex;
    align-items: center;
    gap: 0;
}

.impulse-richtext-toolbar > button,
.impulse-richtext-buttons > button,
.impulse-weight-trigger {
    width: 24px;
    height: 26px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 12px;
    transition: all 0.1s;
}

.impulse-richtext-toolbar > button:hover,
.impulse-richtext-buttons > button:hover,
.impulse-weight-trigger:hover {
    background: var(--imp-text);
    color: #333;
}

.impulse-richtext-toolbar > button.active,
.impulse-richtext-buttons > button.active,
.impulse-weight-trigger.active {
    background: var(--imp-text);
    color: #333;
}

.impulse-weight-btn-wrap {
    position: relative;
}

.impulse-weight-popover {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out, visibility 0.3s;
    padding: 4px 0;
    min-width: 80px;
}

.impulse-weight-btn-wrap:hover .impulse-weight-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.impulse-weight-popover button {
    display: block;
    width: 100%;
    padding: 6px 12px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 11px;
    color: var(--imp-muted);
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.impulse-weight-popover button:hover {
    background: var(--imp-panel);
    color: var(--imp-white);
}

.impulse-weight-popover button.disabled {
    opacity: 0.28;
    pointer-events: none;
}

.impulse-weight-popover button.active {
    background: var(--imp-panel);
    color: var(--imp-white);
}

.impulse-weight-popover button[data-weight="300"] { font-weight: 300; }
.impulse-weight-popover button[data-weight="400"] { font-weight: 400; }
.impulse-weight-popover button[data-weight="600"] { font-weight: 600; }
.impulse-weight-popover button[data-weight="700"] { font-weight: 700; }
.impulse-weight-popover button[data-weight="reset"] {
    color: #666;
    font-style: italic;
    border-bottom: 1px solid var(--imp-border);
    margin-bottom: 2px;
    padding-bottom: 6px;
}

.impulse-weight-popover.impulse-weight-inline {
    position: static;
    top: auto;
    left: auto;
    margin: 0 0 2px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    display: flex;
    gap: 3px;
    min-width: 0;
    z-index: auto;
}
.impulse-weight-popover.impulse-weight-inline button {
    display: block;
    flex: 1;
    width: auto;
    text-align: center;
    white-space: nowrap;
    padding: 0;
    height: var(--btn-height);
    line-height: 1;
    font-size: var(--btn-font);
    border: 1px solid var(--imp-border);
    border-radius: var(--btn-radius);
    background: var(--imp-panel);
    color: var(--imp-muted);
    box-sizing: border-box;
    transition: background 0.15s ease-in-out, color 0.15s ease-in-out;
}
.impulse-weight-popover.impulse-weight-inline button:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-color);
}
.impulse-weight-popover.impulse-weight-inline button.active {
    background: var(--btn-active-bg) !important;
    color: var(--btn-active-color) !important;
    border-color: transparent;
}
.impulse-weight-popover.impulse-weight-inline button.disabled {
    opacity: 0.28;
    pointer-events: none;
}

.impulse-richtext-editor {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    font-size: 11px;
    line-height: 1.6;
    background: var(--imp-white);
    outline: none;
    box-sizing: border-box;
}

.impulse-richtext-editor:focus {
    border-color: var(--imp-muted);
}

.impulse-richtext-wrapper.has-size-slider {
    position: relative;
}

.impulse-richtext-wrapper.has-size-slider .impulse-richtext-editor,
.impulse-richtext-wrapper.has-size-slider .impulse-richtext-html {
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-bottom-color: var(--imp-border);
}

.impulse-richtext-wrapper.has-size-slider .impulse-richtext-editor:focus,
.impulse-richtext-wrapper.has-size-slider .impulse-richtext-html:focus {
    border-bottom-color: var(--imp-border);
}

.impulse-richtext-size-slider {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 10;
}

.impulse-richtext-size-slider input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.impulse-richtext-size-slider input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: transparent;
}

.impulse-richtext-size-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 9px;
    height: 9px;
    background: #888;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -2.5px;
    box-shadow: 0 0 0 2px var(--imp-panel), 0 0 0 3px #666;
}

.impulse-richtext-size-slider input[type="range"]::-moz-range-track {
    height: 4px;
    background: transparent;
    border: none;
}

.impulse-richtext-size-slider input[type="range"]::-moz-range-thumb {
    width: 9px;
    height: 9px;
    background: #888;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 0 2px var(--imp-panel), 0 0 0 3px #666;
}

.impulse-richtext-size-popup {
    position: absolute;
    bottom: 12px;
    background: var(--imp-surface2);
    color: var(--imp-white);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 100;
    transform: translateX(-50%);
}

.impulse-richtext-size-popup::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--imp-surface2);
    border-bottom: none;
}

.impulse-richtext-size-slider.dragging .impulse-richtext-size-popup {
    opacity: 1;
}

.impulse-richtext-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--imp-muted);
    font-size: 11px;
    pointer-events: none;
}

.impulse-richtext-editor a {
    color: var(--imp-surface2);
    text-decoration: underline;
}

.impulse-richtext-html {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    font-size: 12px;
    font-family: monospace;
    line-height: 1.5;
    background: var(--imp-light);
    outline: none;
    min-height: 120px;
    max-height: 400px;
    height: 240px;
    overflow-y: auto;
    box-sizing: border-box;
    resize: vertical;
}

.impulse-richtext-html:focus {
    border-color: var(--imp-muted);
    background: var(--imp-white);
}

.impulse-setting-row input[type="color"] {
    width: 28px;
    height: 28px;
    padding: 2px;
    border: 1px solid var(--imp-text);
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
}

.impulse-color-swatch {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border: 1px solid var(--imp-dim);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

input[type="color"].impulse-color-swatch {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    padding: 0;
    border: 1px solid var(--imp-dim);
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    display: block;
}
input[type="color"].impulse-color-swatch::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"].impulse-color-swatch::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.impulse-color-swatch:hover {
    opacity: 0.9;
}
.impulse-color-swatch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.impulse-color-swatch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(45deg, #ccc 25%, transparent 25%),
                      linear-gradient(-45deg, #ccc 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, #ccc 75%),
                      linear-gradient(-45deg, transparent 75%, #ccc 75%);
    background-size: 6px 6px;
    background-position: 0 0, 0 3px, 3px -3px, -3px 0px;
    pointer-events: none;
}

.impulse-color-swatch::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--swatch-color, var(--imp-white));
    pointer-events: none;
}

.impulse-color-row {
    display: flex;
    gap: 4px;
    align-items: center;
    position: relative;
}

.impulse-color-compact .impulse-color-row {
    justify-content: flex-start;
}

.impulse-color-compact .impulse-color-swatch {
    width: 100%;
    height: 26px;
    border-radius: 4px;
}

.impulse-color-row input[type="text"].impulse-color-text {
    display: none;
}

.impulse-color-row input[type="text"] {
    flex: 1;
    height: 26px;
    font-size: 12px;
    border: 1px solid #ddd;
    padding: 0 8px;
}

.impulse-color-inline {
    display: inline-flex;
    align-items: center;
}

.impulse-color-inline .impulse-color-row {
    gap: 0;
}

.impulse-color-swatch-only .impulse-color-row {
    display: inline-flex;
}

.impulse-color-swatch-only {
    display: inline-flex;
    align-items: center;
}

.impulse-color-swatch-label {
    font-size: 11px;
    color: #666;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.impulse-color-swatch-only .impulse-setting-row {
    margin-bottom: 4px;
}

.impulse-cell-image-row .impulse-setting-row {
    margin-bottom: 4px;
}

.impulse-cell-image-row .impulse-image-preview {
    max-width: 80px;
    max-height: 60px;
}

.impulse-cell-image-row .impulse-image-setting label {
    display: none;
}

.impulse-color-row input[type="text"]:focus {
    border-color: var(--imp-muted);
    outline: none;
}

.impulse-datetime-trigger {
    position: relative;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
}
.impulse-datetime-picker {
    position: fixed;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    padding: 12px;
    z-index: 100002;
    width: 240px;
    opacity: 0;
    transform: scaleY(0.8) translateY(-10px);
    transform-origin: top center;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.impulse-datetime-picker.open {
    opacity: 1;
    transform: scaleY(1) translateY(0);
    pointer-events: auto;
}
.impulse-datetime-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.impulse-datetime-picker-header button {
    width: 26px;
    height: 26px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.impulse-datetime-picker-header button:hover {
    background: var(--imp-border);
    color: var(--imp-white);
}
.impulse-datetime-picker-month {
    font-size: 12px;
    color: var(--imp-text);
    font-weight: 500;
}
.impulse-datetime-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.impulse-datetime-picker-weekdays span {
    font-size: 10px;
    color: #666;
    text-align: center;
    padding: 4px 0;
}
.impulse-datetime-picker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.impulse-datetime-picker-day {
    width: 100%;
    aspect-ratio: 1;
    background: transparent;
    border: none;
    border-radius: 3px;
    color: var(--imp-muted);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.impulse-datetime-picker-day:hover {
    background: var(--imp-border);
    color: var(--imp-white);
}
.impulse-datetime-picker-day.other-month {
    color: var(--imp-dim);
}
.impulse-datetime-picker-day.selected {
    background: var(--imp-white);
    color: var(--imp-surface2);
    font-weight: 600;
}
.impulse-datetime-picker-day.today {
    border: 1px solid var(--imp-border);
}
.impulse-datetime-picker-time {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--imp-border);
}
.impulse-datetime-picker-time input {
    flex: 1;
    height: 26px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    text-align: center;
    padding: 0;
}
.impulse-datetime-picker-time span {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
}
.impulse-datetime-picker-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}
.impulse-datetime-picker-actions button {
    flex: 1;
    height: 26px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-muted);
    font-size: 11px;
    cursor: pointer;
}
.impulse-datetime-picker-actions button:hover {
    background: var(--imp-border);
    color: var(--imp-white);
}
.impulse-datetime-picker-actions button.primary {
    background: var(--imp-white);
    border-color: var(--imp-white);
    color: var(--imp-surface2);
}
.impulse-datetime-picker-actions button.primary:hover {
    background: var(--imp-text);
}

#impulse-bookings-edit .impulse-form-row label {
    margin-bottom: 0;
    font-size: 11px;
    color: #888;
    font-weight: 600;
}

.svc-avail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    width: 100%;
    transition: opacity 0.15s;
}
.svc-avail-row.closed { opacity: 0.35; }
.svc-avail-row.closed .svc-avail-time-btn { pointer-events: none; }
.svc-avail-row.closed .svc-avail-open-cb { pointer-events: auto; opacity: 1; }
.svc-avail-day { width: 75px; flex-shrink: 0; font-size: 11px; color: #888; }
.svc-avail-time-btn {
    height: 26px;
    padding: 0 8px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    cursor: pointer;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}
.svc-avail-time-btn:hover { background: var(--imp-border); }
.svc-avail-sep { color: var(--imp-dim); font-size: 11px; flex-shrink: 0; }

.impulse-color-picker {
    position: fixed;
    top: -9999px;
    left: -9999px;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-right: none;
    border-radius: 4px 0 0 4px;
    box-shadow: -4px 2px 16px rgba(0,0,0,0.4);
    padding: 6px;
    z-index: 100000;
    width: 172px;
    opacity: 0;
    transform: translateX(20px) scale(0.95);
    transform-origin: right center;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.12s ease-in-out, transform 0.12s ease-in-out, visibility 0s linear 0.12s;
    overflow: visible;
    box-sizing: border-box;
}

.impulse-color-picker.open {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
    visibility: visible;
    transition: opacity 0.22s ease-in-out, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

.impulse-color-setting {
    position: relative;
}

.impulse-picker-gradient {
    width: 100%;
    height: 56px;
    position: relative;
    cursor: crosshair;
    border-radius: 3px;
    margin-bottom: 4px;
    touch-action: none;
}

.impulse-color-picker.dragging-gradient .impulse-picker-palette,
.impulse-color-picker.dragging-gradient .impulse-picker-tools,
.impulse-color-picker.dragging-gradient .impulse-picker-sliders,
.impulse-color-picker.dragging-hue .impulse-picker-palette,
.impulse-color-picker.dragging-hue .impulse-picker-tools,
.impulse-color-picker.dragging-hue .impulse-picker-gradient {
    pointer-events: none;
}

.impulse-picker-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--imp-white), transparent);
    border-radius: 3px;
    pointer-events: none;
}

.impulse-picker-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, #000);
    border-radius: 3px;
    pointer-events: none;
}

.impulse-picker-cursor {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid var(--imp-white);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 2px 4px rgba(0,0,0,0.3);
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

.impulse-picker-sliders {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 4px;
}

.impulse-picker-slider-row {
    display: flex;
    align-items: center;
    gap: 0;
    height: 16px;
    position: relative;
}

.impulse-picker-slider-row label {
    display: none;
}

.impulse-picker-hue {
    flex: 1;
    height: 16px;
    min-height: 16px;
    position: relative;
    cursor: pointer;
}

.impulse-picker-hue::before {
    content: '';
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    border-radius: 2px;
    background: linear-gradient(to right, 
        #ff0000 0%, #ffff00 17%, #00ff00 33%, 
        #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
    pointer-events: none;
}

.impulse-picker-alpha {
    flex: 1;
    height: 16px;
    min-height: 16px;
    position: relative;
    cursor: pointer;
}

.impulse-picker-alpha::before {
    content: '';
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    border-radius: 2px;
    background-image: linear-gradient(45deg, var(--imp-dim) 25%, transparent 25%),
                      linear-gradient(-45deg, var(--imp-dim) 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, var(--imp-dim) 75%),
                      linear-gradient(-45deg, transparent 75%, var(--imp-dim) 75%);
    background-size: 4px 4px;
    background-position: 0 0, 0 2px, 2px -2px, -2px 0px;
    background-color: #333;
    pointer-events: none;
}

.impulse-picker-alpha::after {
    content: '';
    position: absolute;
    left: 6px;
    right: 6px;
    top: 50%;
    height: 4px;
    transform: translateY(-50%);
    border-radius: 2px;
    background: var(--alpha-gradient);
    pointer-events: none;
}

.impulse-picker-thumb {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--imp-panel), 0 0 0 3px #666;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.impulse-picker-hex {
    display: flex;
}

.impulse-picker-alpha-input {
    width: 44px;
}

.impulse-picker-alpha-input input {
    width: 100%;
    height: 24px;
    font-size: 11px;
    text-align: center;
    border: 1px solid var(--imp-border);
    background: var(--imp-panel);
    color: var(--imp-text);
}

.impulse-picker-alpha-input input:focus {
    border-color: var(--imp-dim);
    background: #333;
    outline: none;
}

.impulse-picker-eyedropper {
    width: 28px;
    height: 28px;
    border: 1px solid var(--imp-border);
    background: var(--imp-panel);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 4px;
}
.impulse-picker-eyedropper:hover {
    background: var(--imp-border);
    border-color: var(--imp-dim);
}
.impulse-picker-eyedropper svg {
    width: 14px;
    height: 14px;
    stroke: var(--imp-muted);
}

.impulse-picker-tools {
    display: flex;
    gap: 5px;
    margin-top: 6px;
    align-items: center;
}
.impulse-picker-tools .impulse-picker-hex {
    flex: 1;
    min-width: 0;
}
.impulse-picker-tools .impulse-picker-hex input {
    width: 100%;
    height: 26px;
    font-size: 10px;
    font-family: monospace;
    text-align: center;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-text);
    box-sizing: border-box;
    padding: 0;
}
.impulse-picker-tools .impulse-picker-hex input:focus {
    border-color: var(--imp-dim);
    background: #333;
    outline: none;
}
.impulse-picker-tools .impulse-picker-eyedropper {
    width: 26px;
    height: 26px;
    border: 1px solid var(--imp-border);
    background: var(--imp-panel);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 3px;
    box-sizing: border-box;
    padding: 0;
}
.impulse-picker-tools .impulse-picker-eyedropper:hover {
    background: var(--imp-border);
    border-color: var(--imp-dim);
}
.impulse-picker-tools .impulse-picker-eyedropper svg {
    width: 14px;
    height: 14px;
    stroke: var(--imp-muted);
}

.impulse-picker-palette { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--imp-border); }
.impulse-picker-palette-actions { display: flex; gap: 5px; margin-top: 4px; align-items: center; }
.impulse-picker-palette-actions .impulse-picker-hex { display: flex; width: 62px; flex-shrink: 0; }
.impulse-picker-palette-actions .impulse-picker-hex input { width: 100%; height: 26px; font-size: 10px; font-family: monospace; text-align: center; border: 1px solid var(--imp-border); border-radius: 3px; background: var(--imp-panel); color: var(--imp-text); box-sizing: border-box; padding: 0; }
.impulse-picker-palette .impulse-picker-eyedropper,
.impulse-picker-palette .impulse-picker-reset { width: 26px; height: 26px; border: 1px solid var(--imp-border); background: var(--imp-panel); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 3px; box-sizing: border-box; padding: 0; }
.impulse-picker-palette .impulse-picker-apply { height: 26px; border: 1px solid var(--imp-border); background: var(--imp-panel); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 1; border-radius: 3px; box-sizing: border-box; padding: 0; }
.impulse-picker-palette .impulse-picker-eyedropper svg,
.impulse-picker-palette .impulse-picker-reset svg,
.impulse-picker-palette .impulse-picker-apply svg { width: 14px; height: 14px; stroke: var(--imp-muted); }
.impulse-picker-palette-swatches:empty { display: none; }
.impulse-picker-palette-swatches:empty + .impulse-picker-palette-header { display: none; }
.impulse-picker-palette-swatches { display: flex; flex-wrap: nowrap; gap: 5px; overflow: hidden; width: 100%; min-width: 0; }
.impulse-picker-palette-swatch:nth-child(n+6) { display: none; }
.impulse-picker-palette-swatch { width: 14px; height: 14px; cursor: pointer; border: 1px solid var(--imp-border); border-radius: 2px; position: relative; }
.impulse-picker-palette-swatch:hover { border-color: #666; }
.impulse-picker-palette-swatch::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(45deg, var(--imp-dim) 25%, transparent 25%), linear-gradient(-45deg, var(--imp-dim) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--imp-dim) 75%), linear-gradient(-45deg, transparent 75%, var(--imp-dim) 75%); background-size: 5px 5px; background-position: 0 0, 0 2.5px, 2.5px -2.5px, -2.5px 0px; border-radius: 2px; }
.impulse-picker-palette-swatch::after { content: ''; position: absolute; inset: 0; background: var(--swatch-color); border-radius: 2px; }

.impulse-font-picker{position:relative}
.impulse-font-trigger{user-select:none}
.impulse-font-trigger:hover{border-color:var(--imp-dim);background:#333}
.impulse-font-options{position:absolute;top:100%;left:0;right:0;z-index:200;background:var(--imp-surface);border:1px solid var(--imp-border);border-radius:3px;margin-top:2px;max-height:240px;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}
.impulse-font-options::-webkit-scrollbar{display:none}
.impulse-font-option{padding:6px 8px;font-size:16px;color:var(--imp-text);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.impulse-font-option:hover{background:var(--imp-panel)}
.impulse-font-option.active{background:var(--imp-border);color:var(--imp-white)}

.impulse-settings-subtabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    background: transparent;
    border-radius: 6px;
    padding: 0;
}
.impulse-settings-subtab {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    text-align: center;
}
.impulse-settings-subtab:hover {
    color: #333;
}
.impulse-settings-subtab.active {
    color: var(--imp-surface2);
    background: transparent;
    border-bottom: 2px solid var(--imp-surface2);
    border-radius: 0;
}
.impulse-subtab-content {
    display: none;
}
.impulse-subtab-content.active {
    display: block;
}
.impulse-style-subtabs-wrap {
    position: relative;
}

.impulse-btn-group {
    display: flex;
    gap: 3px;
}

.impulse-btn-group button {
    padding: 0 10px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    font-size: var(--btn-font);
    cursor: pointer;
    border-radius: var(--btn-radius);
    transition: all 0.15s;
    white-space: nowrap;
    color: var(--btn-color);
    height: var(--btn-height);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.impulse-border-side-btn {
    padding: 0 10px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    font-size: var(--btn-font);
    cursor: pointer;
    border-radius: var(--btn-radius);
    transition: all 0.15s;
    color: var(--btn-color);
    height: var(--btn-height);
    box-sizing: border-box;
}
.impulse-border-side-btn:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-color);
}

.impulse-btn-group-full {
    display: flex;
    width: 100%;
    gap: 5px;
}
.impulse-btn-group-full button {
    flex: 1;
    text-align: center;
    height: 26px;
    box-sizing: border-box;
    padding: 0;
    font-size: 11px;
}

#impulse-tip {
    position: fixed;
    z-index: 200000;
    pointer-events: none;
    background: var(--imp-surface2);
    color: var(--imp-text);
    font-size: 10px;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 4px 8px;
    border-radius: 3px;
    border: none;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
    width: 200px;
    word-break: break-word;
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
    display: none;
}
#impulse-tip.visible { opacity: 1; }

.impulse-btn-group-full[style*="grid"] {
    display: grid !important;
}
.impulse-btn-group-full[style*="grid"] button {
    height: 26px;
    box-sizing: border-box;
}

.impulse-editor .impulse-effect-btn,
.impulse-effect-presets-wrap button.impulse-effect-btn {
    height: 26px; background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer; padding: 0 4px; box-sizing: border-box;
    transition: all 0.15s; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    min-width: 0;
    display: inline-flex; align-items: center; justify-content: center;
}
.impulse-editor .impulse-effect-btn:hover,
.impulse-effect-presets-wrap button.impulse-effect-btn:hover { border-color: var(--imp-dim); color: #ccc; }
.impulse-editor .impulse-effect-btn.active,
.impulse-effect-presets-wrap button.impulse-effect-btn.active,
.impulse-btn-group button.impulse-effect-btn.active {
    background: var(--imp-white); color: var(--imp-surface2); border-color: var(--imp-white);
}

.impulse-editor .impulse-panel-right[data-element-type="icon"] .impulse-btn-group button,
.impulse-editor .impulse-panel-right[data-element-type="icon"] .instinctor-btn {
    background: var(--imp-panel) !important;
    border: 1px solid var(--imp-border) !important;
    color: var(--imp-muted) !important;
}
.impulse-editor .impulse-panel-right[data-element-type="icon"] .impulse-btn-group button:hover,
.impulse-editor .impulse-panel-right[data-element-type="icon"] .instinctor-btn:hover {
    border-color: var(--imp-dim) !important;
    color: #ccc !important;
}
.impulse-editor .impulse-panel-right[data-element-type="icon"] .impulse-btn-group button.active {
    background: var(--imp-white) !important;
    color: var(--imp-surface2) !important;
    border-color: var(--imp-white) !important;
}

.impulse-editor .impulse-panel-right[data-element-type="icon"] input[type="text"],
.impulse-editor .impulse-panel-right[data-element-type="icon"] textarea {
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    color: var(--imp-text);
}
.impulse-cloud-schema-btns button.impulse-cloud-schema-btn {
    height: 26px; background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer; padding: 0; box-sizing: border-box;
    transition: all 0.15s; width: 100%;
}
.impulse-cloud-schema-btns button.impulse-cloud-schema-btn:hover { border-color: var(--imp-dim); color: #ccc; }
.impulse-cloud-schema-btns button.impulse-cloud-schema-btn.active {
    background: var(--imp-white); color: var(--imp-surface2); border-color: var(--imp-white);
}

.impulse-btn-group button.impulse-la-preset-btn {
    height: 26px; background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer; padding: 0; box-sizing: border-box;
    transition: all 0.15s; width: 100%;
}
.impulse-btn-group button.impulse-la-preset-btn:hover { border-color: var(--imp-dim); color: #ccc; }
.impulse-btn-group button.impulse-la-preset-btn.active {
    background: var(--imp-white); color: var(--imp-surface2); border-color: var(--imp-white);
}
.impulse-neon-panel button.impulse-neon-shape {
    height: 26px; background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer; padding: 0; box-sizing: border-box;
    transition: all 0.15s; width: 100%;
}
.impulse-neon-panel button.impulse-neon-shape:hover { border-color: var(--imp-dim); color: #ccc; }
.impulse-neon-panel button.impulse-neon-shape.active { background: var(--imp-border); color: var(--imp-text); border-color: var(--imp-dim); }

.impulse-cloud-panel button.impulse-cloud-toggle {
    background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer; padding: 0; box-sizing: border-box;
    transition: all 0.15s; width: 100%;
}
.impulse-cloud-panel button.impulse-cloud-toggle:hover { border-color: var(--imp-dim); color: #ccc; }
.impulse-cloud-panel button.impulse-cloud-toggle.active { background: var(--imp-border); color: var(--imp-text); border-color: var(--imp-dim); }

.impulse-reveal-presets-wrap button.impulse-reveal-btn {
    height: 26px; background: var(--imp-panel); border: 1px solid var(--imp-border); border-radius: 3px;
    color: var(--imp-muted); font-size: 11px; cursor: pointer; padding: 0; box-sizing: border-box;
    transition: all 0.15s;
}
.impulse-reveal-presets-wrap button.impulse-reveal-btn:hover { border-color: var(--imp-dim); color: #ccc; }
.impulse-reveal-presets-wrap button.impulse-reveal-btn.active {
    background: var(--imp-border); color: var(--imp-text); border-color: var(--imp-dim);
}

.impulse-btn-group.impulse-btn-group-icons-compact {
    display: inline-flex;
    gap: 2px;
}
.impulse-btn-group.impulse-btn-group-icons-compact button {
    width: 26px;
    height: 26px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.impulse-btn-group.impulse-btn-group-icons-compact button svg {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

.impulse-btn-group.impulse-btn-group-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.impulse-btn-group.impulse-btn-group-wrap button {
    flex: 0 0 auto;
}

.impulse-btn-group.impulse-btn-group-stretch {
    display: flex;
    width: 100%;
}
.impulse-btn-group.impulse-btn-group-stretch button {
    flex: 1;
    text-align: center;
}

.impulse-btn-group.impulse-btn-group-fullwidth {
    display: flex;
    width: 100%;
}
.impulse-btn-group.impulse-btn-group-fullwidth button {
    flex: 1;
    text-align: center;
}

.impulse-inline-btngroup .impulse-btn-group {
    flex-shrink: 0;
}

.impulse-section-anim-effect-btn {
    height: var(--btn-height);
    padding: 0 4px;
    font-size: 10px;
    box-sizing: border-box;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-color);
    border-radius: var(--btn-radius);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.impulse-btn-group-fullwidth {
    display: flex;
    width: 100%;
    gap: 5px;
}
.impulse-btn-group-fullwidth button {
    flex: 1;
    height: 26px;
    padding: 0;
    font-size: 11px;
    box-sizing: border-box;
    border-radius: 3px;
}

.impulse-inline-right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.impulse-inline-right > label {
    font-size: 11px;
    color: #888;
    margin: 0;
    flex-shrink: 0;
}
.impulse-inline-right .impulse-btn-group {
    flex-shrink: 0;
}
.impulse-inline-right .impulse-btn-group button {
    padding: 4px 10px;
    font-size: 11px;
}

.impulse-card-details {
    margin-bottom: 0;
}
.impulse-card-details > div {
    padding: 2px 0 12px 0;
}
.impulse-card-details summary {
    outline: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 8px;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
}
.impulse-card-details summary::-webkit-details-marker { display: none; }
.impulse-card-details summary::before,
.impulse-card-details summary::after {
    content: '';
    flex: 1;
    height: 1px;
}
.impulse-card-details summary::before {
    background: linear-gradient(to right, transparent, var(--imp-border));
}
.impulse-card-details summary::after {
    background: linear-gradient(to left, transparent, var(--imp-border));
}
.impulse-card-details[open] summary { color: #aaa; }
.impulse-card-details .impulse-btn-group-sm button {
    min-width: 26px;
    padding: 4px 10px;
    font-size: 11px;
}

.impulse-card-details .impulse-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.impulse-card-row-single .impulse-color-swatch-only {
    flex: none;
}

.impulse-card-row-double {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 0;
}
.impulse-card-row-double > .impulse-color-swatch-only,
.impulse-card-row-double > label {
    flex: none;
}

.impulse-card-row-border > .impulse-color-swatch-only {
    flex: 0 0 auto;
}

.impulse-setting-section {
    border: none;
    padding: 0;
    margin-bottom: 0;
}
.impulse-setting-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 12px 0 8px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.impulse-setting-section-header:hover {
    opacity: 0.8;
}
.impulse-setting-section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--imp-panel);
}

.impulse-setting-section-header.impulse-divider-with-toggle::after { display: none; }
.impulse-setting-section-chevron {
    display: none;
}
.impulse-setting-section.collapsed .impulse-setting-section-chevron {
    display: none;
}
.impulse-setting-section-title {
    font-weight: 600;
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.impulse-setting-section.collapsed .impulse-setting-section-title {
    opacity: 0.5;
}
.impulse-setting-section-content {
    padding: 0 0 4px;
    max-height: 800px;
    overflow: visible;
    transition: max-height 0.5s ease-in-out, padding 0.4s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 1;
}
.impulse-setting-section.collapsed .impulse-setting-section-content {
    max-height: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.3s ease-in-out, opacity 0.2s ease-in-out;
}

.impulse-setting-section .impulse-setting-row {
    margin-bottom: 8px;
}
.impulse-setting-section .impulse-setting-row:last-child {
    margin-bottom: 0;
}

.impulse-toggle-sm {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    cursor: pointer;
}
.impulse-toggle-sm input {
    opacity: 0;
    width: 0;
    height: 0;
}
.impulse-toggle-sm span {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--imp-border);
    border-radius: 10px;
    transition: 0.2s;
}
.impulse-toggle-sm span::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    bottom: 2px;
    background: #888;
    border-radius: 50%;
    transition: 0.2s;
}
.impulse-toggle-sm input:checked + span {
    background: var(--imp-border);
}
.impulse-toggle-sm input:checked + span::before {
    transform: translateX(16px);
    background: var(--imp-white);
}

.impulse-email-subject .impulse-editable-value {
    font-size: 11px;
    color: #888;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.impulse-email-subject .impulse-editable-input {
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 2px;
    padding: 2px 6px;
    font-size: 11px;
    color: var(--imp-text);
    width: 100%;
    box-sizing: border-box;
}

.impulse-trust-badge-item {
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    margin-bottom: 8px;
    background: var(--imp-white);
    overflow: hidden;
}
.impulse-trust-badge-item:last-child {
    margin-bottom: 0;
}
.impulse-badge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    background: var(--imp-light);
    border-bottom: 1px solid transparent;
    transition: background 0.15s;
}
.impulse-trust-badge-item:not(.collapsed) .impulse-badge-header {
    border-bottom-color: var(--imp-text);
}
.impulse-badge-header:hover {
    background: #f0f0f0;
}
.impulse-badge-preview {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.impulse-badge-preview i {
    font-size: 18px;
}
.impulse-badge-preview img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.impulse-badge-label {
    flex: 1;
    font-size: 13px;
    color: var(--imp-surface2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.impulse-badge-remove {
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--imp-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.impulse-badge-remove:hover {
    background: var(--imp-panel);
    color: var(--imp-dim);
}
.impulse-badge-chevron {
    width: 12px;
    height: 12px;
    color: var(--imp-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.impulse-trust-badge-item.collapsed .impulse-badge-chevron {
    transform: rotate(-90deg);
}
.impulse-badge-content {
    padding: 12px;
    display: block;
}
.impulse-trust-badge-item.collapsed .impulse-badge-content {
    display: none;
}

.impulse-form-fields-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.impulse-form-field-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    position: relative;
    z-index: 1;
}
.impulse-form-field-item.popover-active,
.impulse-form-field-item:has(.impulse-field-popover) {
    z-index: 100;
}
.impulse-form-field-item.sortable-ghost {
    opacity: 0.4;
}
.impulse-form-field-item.sortable-drag {
    background: var(--imp-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.impulse-form-field-item .impulse-form-field-label {
    flex: 1;
    min-width: 0;
    padding: 2px 6px;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 2px;
    font-size: 11px;
    color: var(--imp-text);
    height: 26px;
    box-sizing: border-box;
}

.impulse-checkout-field-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    position: relative;
    z-index: 1;
    cursor: grab;
}
.impulse-checkout-field-item:active { cursor: grabbing; }

.impulse-field-required-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}
.impulse-field-required-toggle input[type=checkbox] { margin: 0; }
.impulse-field-required-toggle[data-locked="1"] { opacity: 0.55; cursor: default; }

.impulse-checkout-field-item.disabled .impulse-checkout-field-label {
    opacity: 0.5;
    color: #666;
}
.impulse-checkout-field-item.disabled .impulse-field-drag-handle {
    opacity: 0.5;
}

.impulse-checkout-field-item.popover-active,
.impulse-checkout-field-item:has(.impulse-field-popover) {
    z-index: 100;
}
.impulse-checkout-field-item.sortable-ghost {
    opacity: 0.4;
}
.impulse-checkout-field-item.sortable-drag .impulse-checkout-field-label {
    background: var(--imp-border);
}

.impulse-field-drag-handle {
    cursor: default;
    color: #666;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0;
    margin-right: 1px;
}
.impulse-field-drag-handle:active { cursor: grabbing; }
.impulse-field-drag-handle:hover { color: var(--imp-muted); }

.impulse-checkout-field-item .impulse-checkout-field-label {
    flex: 1;
    min-width: 0;
    padding: 0 6px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    font-size: 11px;
    color: var(--imp-text);
    height: 26px;
    box-sizing: border-box;
}

.impulse-field-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 26px;
    padding: 0;
    margin-left: -2px;
    background: transparent;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    transition: all 0.15s;
}
.impulse-field-settings-btn:hover {
    background: var(--imp-border);
    color: var(--imp-white);
}

.impulse-field-popover {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    padding: 4px;
    z-index: 1000;
    min-width: 120px;
}
.impulse-field-popover::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 8px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--imp-border);
}
.impulse-field-popover::after {
    content: '';
    position: absolute;
    top: -4px;
    right: 9px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--imp-surface);
}
.impulse-field-popover-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s;
    gap: 12px;
}
.impulse-field-popover-row:hover {
    background: var(--imp-panel);
}
.impulse-field-popover-row span {
    font-size: 11px;
    color: var(--imp-muted);
}
.impulse-field-popover-toggle {
    width: 28px;
    height: 16px;
    background: var(--imp-border);
    border-radius: 8px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}
.impulse-field-popover-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--imp-muted);
    border-radius: 50%;
    transition: transform 0.2s;
}
.impulse-field-popover-toggle.active {
    background: #666;
}
.impulse-field-popover-toggle.active::after {
    transform: translateX(12px);
    background: var(--imp-white);
}
.impulse-field-popover-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.impulse-field-popover-row.locked {
    cursor: default;
}
.impulse-field-popover-row.locked:hover {
    background: transparent;
}
.impulse-field-popover-divider {
    height: 1px;
    background: var(--imp-border);
    margin: 3px 0;
}

.impulse-field-modal-row input[type="text"],
.impulse-field-modal-row select,
.impulse-field-modal-row input:focus,
.impulse-field-modal-row select:focus,
.impulse-badge-content .impulse-setting-row {
    margin-bottom: 12px;
}
.impulse-badge-content .impulse-setting-row:last-of-type {
    margin-bottom: 0;
}
.impulse-badge-content .impulse-setting-row label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}
.impulse-badge-content input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--imp-text);
    border-radius: 4px;
    font-size: 13px;
}
.impulse-badge-content .impulse-color-input {
    display: flex;
    gap: 8px;
    align-items: center;
}
.impulse-badge-content .impulse-color-input input[type="color"] {
    width: 36px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--imp-text);
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}
.impulse-badge-content .impulse-color-input input[type="text"] {
    flex: 1;
}

.impulse-animation-preview-btn,
.impulse-text-reveal-preview-btn {
    cursor: pointer;
    color: var(--imp-muted);
    flex-shrink: 0;
    transition: opacity 0.15s;
    opacity: 0.6;
}

.impulse-animation-preview-btn:hover,
.impulse-text-reveal-preview-btn:hover {
    opacity: 1;
    color: var(--imp-white);
}

.impulse-clear-image-btn:hover {
    background: var(--imp-border);
    border-color: var(--imp-dim);
    color: var(--imp-white);
}

.impulse-setting-row.has-override > label::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

.impulse-hover-group .impulse-setting-label {
    margin-top: 0;
    margin-bottom: 8px;
}

.impulse-slider-with-unit {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.impulse-slider-with-unit input[type="range"] {
    width: 100px;
    height: var(--slider-track-h, 4px);
    -webkit-appearance: none;
    appearance: none;
    background: var(--slider-track, var(--imp-border));
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}
.impulse-slider-with-unit input[type="range"]::-webkit-slider-runnable-track {
    height: var(--slider-track-h, 4px);
    background: var(--slider-track, var(--imp-border));
    border-radius: 2px;
}
.impulse-slider-with-unit input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: var(--slider-thumb-size, 9px);
    height: var(--slider-thumb-size, 9px);
    background: var(--slider-thumb, var(--imp-white));
    border-radius: 50%;
    cursor: pointer;
    margin-top: -2.5px;
    box-shadow: var(--slider-thumb-ring, 0 0 0 2px var(--imp-panel), 0 0 0 3px #888);
}
.impulse-slider-with-unit input[type="range"]::-moz-range-track {
    height: var(--slider-track-h, 4px);
    background: var(--slider-track, var(--imp-border));
    border-radius: 2px;
    border: none;
}
.impulse-slider-with-unit input[type="range"]::-moz-range-thumb {
    width: var(--slider-thumb-size, 9px);
    height: var(--slider-thumb-size, 9px);
    background: var(--slider-thumb, var(--imp-white));
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--slider-thumb-ring, 0 0 0 2px var(--imp-panel), 0 0 0 3px #888);
}

.impulse-unit-toggle {
    display: flex;
    background: #f0f0f0;
    border-radius: 3px;
    padding: 2px;
}
.impulse-unit-toggle button {
    padding: 2px 6px;
    border: none;
    background: transparent;
    font-size: 10px;
    cursor: pointer;
    border-radius: 2px;
    color: #666;
    transition: all 0.15s;
}
.impulse-unit-toggle button.active {
    background: var(--imp-white);
    color: var(--imp-surface2);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.impulse-setting-hint {
    font-size: 11px;
    color: #888888;
    margin: 4px 0 8px;
    line-height: 1.4;
}

[data-tip] { position: relative; }
[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--imp-surface);
    color: #ccc;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    padding: 5px 9px;
    border-radius: 4px;
    border: 1px solid var(--imp-border);
    white-space: normal;
    max-width: 220px;
    width: max-content;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s, visibility 0.15s;
    z-index: 99999;
    text-align: left;
    font-style: normal;
    letter-spacing: 0;
    text-transform: none;
}
[data-tip]:hover::after { opacity: 1; visibility: visible; }

.impulse-inline-right > [data-tip]::after { left: auto; right: 0; transform: none; }

.impulse-btn-group [data-tip]::after { white-space: nowrap; }

.impulse-align-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 72px;
    height: 72px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    padding: 10px;
    box-sizing: border-box;
    margin: 0 auto;
}
.impulse-align-grid .impulse-align-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--imp-border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.12s, box-shadow 0.12s;
    place-self: center;
}
.impulse-align-grid .impulse-align-dot:hover {
    background: #666;
}
.impulse-align-grid .impulse-align-dot.active {
    background: var(--imp-white);
    box-shadow: 0 0 4px rgba(255,255,255,0.3);
}
.impulse-align-grid .impulse-align-dot.col-active {
    background: var(--imp-dim);
}

.impulse-product-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    max-height: 320px;
    overflow-y: auto;
    padding: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.impulse-product-list::-webkit-scrollbar { display: none; }
.impulse-modal-xl .impulse-product-list { grid-template-columns: repeat(7, 1fr); max-height: 400px; }

.impulse-product-list.view-list {
    grid-template-columns: 1fr;
    gap: 1px;
}
.impulse-product-list.view-list .impulse-product-item {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--imp-panel);
    background: transparent;
}
.impulse-product-list.view-list .impulse-product-item:hover { background: var(--imp-panel); }
.impulse-product-list.view-list .impulse-product-item.selected { background: var(--imp-border); }
.impulse-product-list.view-list .impulse-product-item-image { display: none; }
.impulse-product-list.view-list .impulse-product-item-info { padding: 5px 8px; }
.impulse-product-list.view-list .impulse-product-item-name { font-size: 11px; }

.impulse-product-item {
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
    background: var(--imp-panel);
}

.impulse-product-item:hover { border-color: #666; }
.impulse-product-item.selected { border-color: var(--imp-white); background: var(--imp-border); }

.impulse-product-item-image {
    width: 100%;
    height: 60px;
    background: var(--imp-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.impulse-product-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.impulse-product-item-info {
    padding: 4px 5px;
}

.impulse-product-item-name {
    display: block;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--imp-text);
    line-height: 1.3;
    text-align: left;
}

.impulse-product-view-toggle button {
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    color: var(--imp-muted);
    cursor: pointer;
    border-radius: 0;
}
.impulse-product-view-toggle button:first-child { border-radius: 3px 0 0 3px; }
.impulse-product-view-toggle button:last-child { border-radius: 0 3px 3px 0; border-left: none; }

.impulse-selected-products {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--imp-border);
}

.impulse-selected-products h4 {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--imp-muted);
    text-transform: uppercase;
}

.impulse-selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.impulse-selected-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    font-size: 11px;
    color: var(--imp-text);
}

.impulse-selected-tag button {
    width: 16px;
    height: 16px;
    background: var(--imp-border);
    border: none;
    border-radius: 2px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.impulse-icon-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0;
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border: 1px solid var(--imp-border);
    border-radius: 4px;
}

.impulse-icon-grid::-webkit-scrollbar {
    display: none;
}

.impulse-icon-item {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--imp-border);
    border-bottom: 1px solid var(--imp-border);
    cursor: pointer;
    transition: all 0.15s;
    padding: 4px;
    background: var(--imp-surface);
    color: #888;
    font-size: 22px;
}

.impulse-icon-item:nth-child(7n) {
    border-right: none;
}

.impulse-icon-item svg {
    width: 24px;
    height: 24px;
}

.impulse-icon-item:hover {
    background: var(--imp-panel);
    color: var(--imp-white);
}

.impulse-icon-item.selected {
    background: var(--imp-border);
    color: var(--imp-white);
}

.impulse-icon-copy-down {
    position: absolute;
    bottom: 1px;
    left: 1px;
    width: 0;
    height: 0;
    border-left: 6px solid #666;
    border-top: 6px solid transparent;
    border-right: 0;
    border-bottom: 0;
    cursor: pointer;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.15s;
}
.impulse-table-icon-btn:hover .impulse-icon-copy-down,
.impulse-pl-icon-btn:hover .impulse-icon-copy-down {
    opacity: 1;
}
.impulse-icon-copy-down:hover {
    border-left-color: var(--imp-white) !important;
}

.impulse-checkbox-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.impulse-cb-left {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11px;
    color: var(--imp-muted);
}

.impulse-cb-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    cursor: pointer;
    font-size: 11px;
    color: var(--imp-muted);
}

.fade-disabled {
    opacity: 0.4;
    pointer-events: none;
}
.fade-disabled input[type="checkbox"] {
    cursor: not-allowed;
}
.fade-disabled button {
    cursor: not-allowed;
}

.impulse-checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 11px;
    margin: 0;
}

.impulse-library-subtabs {
    display: flex;
    gap: 0;
    padding: 0 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--imp-border);
}
.impulse-library-subtab {
    flex: 1;
    padding: 7px 4px;
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
    text-align: center;
}
.impulse-library-subtab:hover { color: #ccc; }
.impulse-library-subtab.active { color: var(--imp-white); border-bottom-color: var(--imp-white); }
.impulse-library-content { display: none; }
.impulse-library-content.active { display: block; }

.impulse-section-template {
    background: var(--imp-light);
    border: 1px solid var(--imp-border);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.impulse-section-template:hover {
    border-color: var(--imp-surface2);
    background: var(--imp-white);
}

.impulse-template-thumb {
    height: 60px;
    background: var(--imp-text);
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.impulse-template-thumb svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 4px;
}

.impulse-section-template span {
    font-size: 12px;
    font-weight: 500;
    color: var(--imp-surface2);
}

.impulse-hover-preview {
    display: none;
    position: fixed;
    z-index: 999999;
    background: transparent;
    border: none;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    padding: 0;
    pointer-events: none;
    width: 280px;
    max-height: calc(100vh - 40px);
    overflow: hidden;
}
.impulse-hover-preview .preview-content {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
}
.impulse-hover-preview .preview-content svg {
    width: 100%;
    height: auto;
    display: block;
}
.impulse-hover-preview .preview-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.impulse-hover-preview .preview-label {
    display: none;
}

.impulse-hover-preview.preview-graphic {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}
.impulse-hover-preview.preview-graphic .preview-label {
    display: none;
}

.impulse-hover-preview.preview-media {
    background: var(--imp-surface);
    border-color: var(--imp-border);
    pointer-events: auto;
    width: 220px;
    padding: 0;
    overflow: hidden;
}
.impulse-hover-preview.preview-media .preview-content {
    position: relative;
    overflow: hidden;
}
.impulse-hover-preview.preview-media .preview-content img {
    border-radius: 0;
    max-height: 168px;
    width: 100%;
    object-fit: cover;
    display: block;
}
.impulse-hover-preview.preview-media .preview-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 8px 5px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: var(--imp-text);
    font-size: 10px;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0;
}
.impulse-media-hover-actions {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
}
.impulse-media-hover-actions button {
    flex: 1;
    height: 22px;
    font-size: 10px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    cursor: pointer;
    white-space: nowrap;
}
.impulse-media-hover-actions button:hover {
    background: var(--imp-border);
    color: var(--imp-white);
}
.impulse-media-hover-actions button.media-action-delete {
    color: #888;
    flex: 0 0 auto;
    padding: 0 8px;
}

.impulse-section-category-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    padding: 8px 0 4px;
    margin-top: 4px;
}
.impulse-section-category-label:first-child { margin-top: 0; }

.impulse-templates-panel {
    padding: 0 16px 16px;
    overflow-y: auto;
}

.impulse-editor .impulse-toolbox {
    display: inline-flex;
    align-items: center;
    border-radius: 3px;
    overflow: hidden;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
}
.impulse-editor .impulse-toolbox-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    background: var(--imp-panel) !important;
    border: none !important;
    border-left: 1px solid var(--imp-border) !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0;
    line-height: 1;
    color: var(--imp-muted) !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s, transform 0.04s;
    position: relative;
}
.impulse-editor .impulse-toolbox-btn:first-child { border-left: none !important; }
.impulse-editor .impulse-toolbox-btn:hover       { background: var(--imp-border) !important; color: var(--imp-text) !important; }
.impulse-editor .impulse-toolbox-btn:active      { transform: scale(0.88); }
.impulse-editor .impulse-toolbox-btn svg {
    width: 11px;
    height: 11px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    pointer-events: none;
    display: block;
}

.impulse-editor .impulse-toolbox-btn-drag        { cursor: grab; }
.impulse-editor .impulse-toolbox-btn-drag:active { cursor: grabbing; }
.impulse-editor .impulse-toolbox-btn-drag svg circle { fill: currentColor; stroke: none; }

.impulse-editor .impulse-toolbox-btn-eye.is-hidden       { color: var(--imp-dim) !important; }
.impulse-editor .impulse-toolbox-btn-eye.is-hidden:hover { color: var(--imp-text) !important; }

.impulse-editor .impulse-toolbox-btn[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--imp-surface2);
    color: var(--imp-text);
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10000;
    pointer-events: none;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.impulse-x-btn {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 3px;
    background: rgba(0,0,0,0.55);
    color: var(--imp-light);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.impulse-x-btn:hover {
    background: var(--imp-surface2);
    border-color: var(--imp-surface2);
    color: var(--imp-white);
}
.impulse-x-btn-overlay {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.15s;
}

.impulse-lib-group-header {
    grid-column: 1 / -1;
    padding: 10px 2px 4px;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--imp-dim);
    font-weight: 600;
    text-transform: uppercase;
}
.impulse-lib-group-header:first-child { padding-top: 2px; }

.impulse-editor .impulse-el[data-type="button"] {
    width: max-content;
    max-width: 100%;
    align-self: var(--impulse-ca, center);
}
.impulse-editor .impulse-el[data-type="button"] .impulse-button-wrap {
    width: max-content;
}

.impulse-tag-filter {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 2px 6px;
}
.impulse-tag-pill {
    height: 22px;
    padding: 0 9px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.02em;
    background: transparent;
    border: 1px solid var(--imp-border);
    border-radius: 11px;
    color: var(--imp-dim);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.impulse-tag-pill:hover {
    color: var(--imp-text);
    border-color: var(--imp-dim);
}
.impulse-tag-pill.is-active {
    background: var(--imp-text);
    color: var(--imp-surface);
    border-color: var(--imp-text);
}

.impulse-structure-panel {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

.impulse-structure-tree {
    font-size: 12px;
}

.impulse-pages-layout {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.impulse-sequences-sidebar {
    width: 280px;
    flex-shrink: 0;
    border-left: 1px solid var(--imp-panel);
    overflow-y: auto;
    background: var(--imp-surface);
    display: flex;
    flex-direction: column;
}.impulse-seq-sidebar-header {
    padding: 10px 12px 6px;
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--imp-dim);
    font-weight: 600;
    flex-shrink: 0;
}
#impulse-sequences-list { flex:1; overflow-y:auto; padding:6px 8px 12px; }
.impulse-seq-chain { margin-bottom: 12px; }

.impulse-seq-chain-item {
    display: flex; align-items: center; gap: 6px;
    padding: 0 8px; border-radius: 3px; cursor: grab;
    background: var(--imp-panel); border-left: 2px solid var(--imp-border);
    height: 26px; margin: 0 0 1px 0; font-size: 11px; color: var(--imp-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    user-select: none; transition: background 0.1s;
}
.impulse-seq-chain-item:hover { background: var(--imp-border); border-left-color: var(--imp-dim); }
.impulse-seq-chain-item.is-chain-start { border-left-color: var(--imp-text); color: var(--imp-white); }
.impulse-seq-chain-item.seq-bar-frontpage { letter-spacing: 0.08em; font-size: 10px; font-weight: 600; }
.impulse-seq-chain-item.seq-dragging { opacity: 0.35; cursor: grabbing; }
.impulse-seq-chain-item.seq-drag-over-before { border-top: 2px solid var(--imp-white); }
.impulse-seq-chain-item.seq-drag-over-after { border-bottom: 2px solid var(--imp-white); }
.impulse-seq-chain-arrow {
    padding: 1px 8px; font-size: 10px; color: var(--imp-dim);
    display: flex; align-items: center;
}
.impulse-seq-chain-arrow.seq-insert-target {
    background: var(--imp-border); border-radius: 2px; color: var(--imp-text);
}
.impulse-seq-empty { padding: 8px 4px; font-size: 11px; color: var(--imp-dim); }

.impulse-page-card.seq-highlight .impulse-page-preview { outline: 2px solid #e0e0e0; outline-offset: -2px; }

.card-next-indicator {
    position: absolute; bottom: 0; left: 0; right: 0;
    display: flex; align-items: center; gap: 4px;
    font-size: 10px; color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.45);
    padding: 3px 7px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    z-index: 3; transition: color 0.1s;
}
.card-next-indicator:hover { color: #fff; }
.card-next-indicator svg { flex-shrink: 0; opacity: 0.6; }

.impulse-structure-item {
    display: flex;
    align-items: center;
    padding: 3px 8px;
    margin: 3px 0;
    border-radius: 3px;
    cursor: pointer;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    min-height: 22px;
}

.impulse-structure-item:hover {
    background: var(--imp-border);
    border-color: var(--imp-dim);
}

.impulse-structure-item.selected {
    
    background: var(--imp-border);
    border-color: var(--imp-border);
    box-shadow: inset 2px 0 0 0 var(--imp-white);
}

.impulse-structure-item.multisel {
    background: var(--imp-border);
    box-shadow: inset 3px 0 0 0 var(--imp-white);
    outline: 1px dashed var(--imp-dim);
    outline-offset: -1px;
}
.impulse-structure-item.screen-current {
    border-left: 2px solid var(--imp-white);
    padding-left: 6px;
}
.impulse-structure-item.selected .impulse-structure-label {
    color: var(--imp-white);
}

.impulse-structure-item.drag-over {
    border: 2px solid #666;
    background: var(--imp-border);
}

.impulse-structure-item.dragging {
    opacity: 0.4;
    background: var(--imp-panel);
    border: 1px solid #666;
}

.impulse-structure-item:not(.impulse-structure-cell) {
    cursor: default;
    position: relative;
}

.impulse-structure-item:not(.impulse-structure-cell):active {
    cursor: grabbing;
}

.impulse-structure-item.drop-above::after {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #666;
    border-radius: 2px;
    z-index: 10;
}

.impulse-structure-item.drop-below::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #666;
    border-radius: 2px;
    z-index: 10;
}

.impulse-structure-item.drop-inside {
    background: var(--imp-border);
    border: 2px solid #666;
}

.impulse-structure-cell.drop-inside {
    background: var(--imp-border);
    border: 2px solid #666;
}

.impulse-structure-item.drop-escape::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -16px;
    width: 12px;
    height: 12px;
    background: #666;
    border-radius: 50%;
    transform: translateY(-50%);
    z-index: 10;
}
.impulse-structure-item.drop-escape::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    width: 8px;
    height: 2px;
    background: #666;
    transform: translateY(-50%);
    z-index: 10;
}

.impulse-structure-root-drop {
    margin-top: 12px;
    padding: 16px;
    border: 2px solid var(--imp-border);
    border-radius: 6px;
    text-align: center;
    color: #888;
    font-size: 12px;
    display: none;
}
.impulse-structure-panel.dragging .impulse-structure-root-drop {
    display: block;
}
.impulse-structure-root-drop.drag-over {
    background: rgba(255,255,255,0.05);
    border-color: #666;
    color: var(--imp-muted);
}

.impulse-structure-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--imp-text);
}

.impulse-structure-type {
    display: none;
}

.impulse-structure-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}

.impulse-structure-item:hover .impulse-structure-actions {
    opacity: 1;
}

.impulse-structure-actions button {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--imp-muted);
    border-radius: 3px;
}

.impulse-structure-actions button:hover {
    background: var(--imp-border);
    color: var(--imp-text);
}

.impulse-structure-item.structure-hidden { opacity: 0.4; }
.impulse-structure-item.structure-hidden .impulse-structure-label { text-decoration: line-through; }

.impulse-structure-children {
    margin-left: 8px;
    padding-left: 4px;
    display: none;
}
.impulse-structure-children.expanded {
    display: block;
}
.impulse-structure-toggle {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-right: 2px;
    cursor: pointer;
    color: var(--imp-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s;
}
.impulse-structure-toggle svg {
    width: 10px;
    height: 10px;
}
.impulse-structure-toggle.expanded {
    transform: rotate(90deg);
}
.impulse-structure-toggle.expanded + .impulse-structure-icon { color: #bbb; }

.impulse-structure-count {
    font-size: 10px;
    color: var(--imp-dim);
    margin-left: auto;
    flex-shrink: 0;
}

.impulse-structure-cell {
    background: var(--imp-panel);
}
.impulse-structure-cell:hover {
    background: var(--imp-border);
}

.struct-color-dot { display: none; }
.struct-color-popover { display: none; }

.struct-anchor-badge {
    font-size: 9px;
    color: var(--imp-dim);
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    padding: 1px 4px;
    margin-left: 4px;
    flex-shrink: 0;
    cursor: pointer;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.struct-anchor-badge:hover { color: var(--imp-muted); border-color: var(--imp-dim); }

.struct-rename-input {
    flex: 1;
    min-width: 0;
    height: 20px;
    padding: 0 5px;
    background: var(--imp-surface) !important;
    border: 1px solid var(--imp-dim) !important;
    border-radius: 3px;
    font-size: 11px;
    color: var(--imp-text) !important;
    box-shadow: none !important;
    outline: none;
}

.struct-anchor-input {
    width: 90px;
    flex-shrink: 0;
    height: 20px;
    padding: 0 5px;
    margin-left: 4px;
    background: var(--imp-surface) !important;
    border: 1px solid var(--imp-dim) !important;
    border-radius: 3px;
    font-size: 10px;
    color: var(--imp-text) !important;
    box-shadow: none !important;
    outline: none;
}

.struct-anchor-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #666;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.15s, color 0.1s;
}
.impulse-structure-item:hover .struct-anchor-btn { opacity: 1; }
.struct-anchor-btn:hover { color: var(--imp-text); background: var(--imp-border); }

.struct-color-popover {
    position: fixed;
    z-index: 999999;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    padding: 4px;
    display: flex;
    gap: 3px;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.struct-color-swatch {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.1s, border-color 0.1s;
    flex-shrink: 0;
}
.struct-color-swatch:hover { transform: scale(1.2); }
.struct-color-swatch.selected { border-color: var(--imp-white); }
.struct-color-swatch.clear-swatch {
    background: var(--imp-panel) !important;
    border-color: var(--imp-border);
    color: #666;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.struct-color-swatch.clear-swatch:hover { color: var(--imp-muted); border-color: var(--imp-dim); }

.struct-mini-picker {
    position: fixed;
    z-index: 999999;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    padding: 6px;
    width: 160px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    user-select: none;
}
.smp-gradient {
    width: 100%;
    height: 80px;
    position: relative;
    cursor: crosshair;
    border-radius: 3px;
    margin-bottom: 6px;
    touch-action: none;
}
.smp-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--imp-white), transparent);
    border-radius: 3px;
    pointer-events: none;
}
.smp-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, #000);
    border-radius: 3px;
    pointer-events: none;
}
.smp-cursor {
    position: absolute;
    width: 10px;
    height: 10px;
    border: 2px solid var(--imp-white);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
}
.smp-hue {
    width: 100%;
    height: 10px;
    position: relative;
    cursor: pointer;
    border-radius: 5px;
    background: linear-gradient(to right,
        #ff0000 0%, #ffff00 17%, #00ff00 33%,
        #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
}
.smp-thumb {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    background: var(--imp-white);
    border-radius: 50%;
    border: 2px solid var(--imp-white);
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.impulse-structure-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--imp-muted);
}

.impulse-panel-body {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.impulse-panel-body::-webkit-scrollbar { display: none; }

.impulse-settings-panel,

.impulse-list .impulse-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    list-style: none;
    min-height: 240px;
}
.impulse-empty-icon { margin-bottom: 16px; opacity: 0.5; }
.impulse-empty-title { font-size: 11px; margin-bottom: 8px; color: var(--imp-muted); }
.impulse-empty-desc { font-size: 11px; color: #666; }
.impulse-empty-desc { font-size: 11px; color: #666; }

.impulse-blocks-panel {
    padding: 4px 16px 16px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
}
.impulse-blocks-panel-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    flex: 1;
}
.impulse-blocks-panel::-webkit-scrollbar { display: none; }

.impulse-editor .impulse-workspace[data-workspace="impulse"] .impulse-panel-left {
    display: flex;
    flex-direction: column;
    width: 280px;
    min-width: 280px;
    overflow: hidden;
    border-right: 1px solid #333;
}

.impulse-editor .impulse-workspace[data-workspace="impulse"] .impulse-panel-left .impulse-panel-tabs,
.impulse-editor .impulse-workspace[data-workspace="impulse"] .impulse-panel-left .impulse-panel-header,
.impulse-editor .impulse-workspace[data-workspace="impulse"] .impulse-panel-left .impulse-panel-body {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.impulse-editor.editing .impulse-workspace[data-workspace="impulse"] .impulse-panel-left .impulse-panel-tabs,
.impulse-editor.editing .impulse-workspace[data-workspace="impulse"] .impulse-panel-left .impulse-panel-header,
.impulse-editor.editing .impulse-workspace[data-workspace="impulse"] .impulse-panel-left .impulse-panel-body {
    opacity: 1;
    pointer-events: auto;
}

.impulse-editor .impulse-workspace[data-workspace="impulse"] .impulse-panel-left .impulse-panel-tabs {
    flex-shrink: 0;
}

.impulse-products-manual,
.impulse-products-query {
    margin-top: 8px;
}

.impulse-category-filter { margin-top: 6px; }

.impulse-panel-content .instinctor-btn {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    color: var(--btn-color);
    padding: 0 10px;
    border-radius: var(--btn-radius);
    font-size: var(--btn-font);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    height: var(--btn-height);
    box-sizing: border-box;
}
.impulse-panel-content .instinctor-btn.instinctor-btn-sm {
    padding: 0 10px;
    font-size: var(--btn-font);
    height: var(--btn-height);
    box-sizing: border-box;
}
.impulse-panel-content .instinctor-btn:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-color);
}
.impulse-panel-content .instinctor-btn:focus {
    outline: none;
    box-shadow: none;
}

.impulse-action-buttons .instinctor-btn,
.impulse-action-buttons .instinctor-btn:focus,
.impulse-action-buttons .instinctor-btn:active,
.impulse-action-buttons .instinctor-btn.instinctor-btn-primary,
.impulse-action-buttons .instinctor-btn.instinctor-btn-primary:focus,
.impulse-action-buttons .instinctor-btn.instinctor-btn-primary:active,

.impulse-navigator {
    position: fixed;
    top: 100px;
    left: 290px;
    width: 280px;
    max-height: calc(100vh - 120px);
    background: var(--imp-white);
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 99999;
    display: none;
    overflow: hidden;
}
.impulse-navigator.active { display: block !important; }
.impulse-navigator-header {
    padding: 10px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--imp-light);
    cursor: move;
    user-select: none;
}
.impulse-navigator-header:active {
    cursor: grabbing;
}
.impulse-navigator-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}
.impulse-navigator-close:hover { color: #333; }
.impulse-navigator-body {
    padding: 8px 0;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
.impulse-nav-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: default;
    font-size: 13px;
    color: var(--imp-dim);
    gap: 6px;
    transition: background 0.15s;
    border-bottom: 1px solid transparent;
}
.impulse-nav-item:hover { background: var(--imp-light); }
.impulse-nav-item.selected { background: #f0f0f0; color: var(--imp-surface2); }
.impulse-nav-item.container-item { padding-left: 32px; }
.impulse-nav-item.nested-item { padding-left: 48px; }
.impulse-nav-item.dragging { opacity: 0.5; background: var(--imp-text); }
.impulse-nav-item.drag-over-top { border-top: 2px solid var(--imp-surface2); }
.impulse-nav-item.drag-over-bottom { border-bottom: 2px solid var(--imp-surface2); }
.impulse-nav-item.drag-over-inside { background: var(--imp-text); outline: 1px solid var(--imp-muted); outline-offset: -1px; }
.impulse-nav-drag {
    cursor: default;
    color: #bbb;
    display: flex;
    align-items: center;
    padding: 2px;
}
.impulse-nav-drag:hover { color: #666; }
.impulse-nav-drag:active { cursor: grabbing; }
.impulse-nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.6;
}
.impulse-nav-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.impulse-nav-actions {
    display: none;
    gap: 4px;
}
.impulse-nav-item:hover .impulse-nav-actions { display: flex; }
.impulse-nav-action {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--imp-muted);
    line-height: 1;
}
.impulse-nav-action:hover { color: #666; }
.impulse-nav-empty {
    padding: 20px;
    text-align: center;
    color: var(--imp-muted);
    font-size: 13px;
}
#impulse-navigator-toggle.active {
    background: var(--imp-surface2) !important;
    color: var(--imp-white) !important;
}
#impulse-navigator-toggle.active svg {
    stroke: var(--imp-white) !important;
}

.impulse-navigator {
    position: fixed;
    top: 55px;
    left: 0;
    width: 280px;
    height: calc(100vh - 55px);
    background: var(--imp-white);
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    z-index: 99999;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}
.impulse-navigator.open {
    transform: translateX(0);
}
.impulse-navigator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--imp-text);
    background: var(--imp-light);
}
.impulse-navigator-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.impulse-navigator-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}
.impulse-navigator-search {
    padding: 12px;
    border-bottom: 1px solid var(--imp-text);
}
.impulse-navigator-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    font-size: 13px;
}
.impulse-navigator-tree {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.impulse-layer {
    margin: 2px 0;
}
.impulse-layer-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #444;
    transition: background 0.15s;
}
.impulse-layer-item:hover {
    background: #f0f0f0;
}
.impulse-layer-item.selected {
    background: var(--imp-surface2);
    color: var(--imp-white);
}
.impulse-layer-toggle {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.5;
    transition: transform 0.2s;
}
.impulse-layer-toggle.expanded {
    transform: rotate(90deg);
}
.impulse-layer-toggle.empty {
    visibility: hidden;
}
.impulse-layer-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}
.impulse-layer-item.selected .impulse-layer-icon {
    opacity: 1;
}
.impulse-layer-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.impulse-layer-actions {
    display: none;
    gap: 4px;
}
.impulse-layer-item:hover .impulse-layer-actions {
    display: flex;
}
.impulse-layer-item.selected .impulse-layer-actions {
    display: flex;
}
.impulse-layer-action {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--imp-muted);
    font-size: 11px;
    line-height: 1;
}
.impulse-layer-item.selected .impulse-layer-action {
    color: rgba(255,255,255,0.7);
}
.impulse-layer-action:hover {
    color: #666;
}
.impulse-layer-item.selected .impulse-layer-action:hover {
    color: var(--imp-white);
}
.impulse-layer-children {
    margin-left: 20px;
    display: none;
}
.impulse-layer-children.expanded {
    display: block;
}

.impulse-context-menu {
    position: fixed;
    background: var(--imp-surface);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    min-width: 180px;
    z-index: 999999;
    padding: 6px 0;
    font-size: 13px;
    color: var(--imp-text);
    border: 1px solid var(--imp-panel);
    transform-origin: top left;
    
    opacity: 1;
    transform: scale(1);
    transition: opacity 120ms ease-in-out, transform 140ms cubic-bezier(0.4, 0, 0.2, 1);
}
.impulse-context-menu.is-opening {
    opacity: 0;
    transform: scale(0.94);
}
.impulse-context-item {
    display: flex;
    align-items: center;
    
    padding: 3px 16px;
    cursor: pointer;
    transition: background 0.1s;
    color: var(--imp-text);
    font-size: 12px;
    white-space: nowrap;
}
.impulse-context-item:hover {
    background: var(--imp-panel);
}

.impulse-context-menu.impulse-context-compact {
    min-width: 0;
    padding: 4px 0;
    font-size: 12px;
}
.impulse-context-menu.impulse-context-compact .impulse-context-item {
    padding: 4px 12px;
    font-size: 12px;
    line-height: 1.2;
}
.impulse-context-item.danger {
    color: var(--imp-muted);
}
.impulse-context-item.danger:hover {
    background: var(--imp-panel);
    color: var(--imp-text);
}
.impulse-context-item.disabled {
    opacity: 0.3;
    pointer-events: none;
}
.impulse-context-item .shortcut {
    margin-left: auto;
    font-size: 11px;
    color: var(--imp-dim);
    padding-left: 16px;
}
.impulse-context-divider {
    
    display: none;
}
.impulse-context-label {
    padding: 6px 16px 2px;
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.impulse-global-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.impulse-global-tabs button {
    padding: 8px 20px;
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    background: var(--imp-white);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.impulse-global-tabs button:hover {
    border-color: var(--imp-muted);
}
.impulse-global-tabs button.active {
    background: var(--imp-surface2);
    color: var(--imp-white);
    border-color: var(--imp-surface2);
}
.impulse-global-pane {
    display: none;
}
.impulse-global-pane.active {
    display: block;
}
.impulse-global-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}
.impulse-global-row label {
    width: 140px;
    font-size: 13px;
    color: #444;
}
.impulse-global-row input[type="color"] {
    width: 60px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    cursor: pointer;
}
.impulse-global-row select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    font-size: 13px;
}
.impulse-global-row input[type="range"] { flex: 1; }
.impulse-global-row input[type="number"] {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid var(--imp-text);
    border-radius: 6px;
    font-size: 13px;
}
.impulse-global-hint {
    font-size: 12px;
    color: #888;
    background: var(--imp-light);
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.impulse-setting-hint {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

.impulse-shape-item { padding: 8px 4px; flex: 0 0 calc(33.333% - 6px); box-sizing: border-box; }
.impulse-shape-item .impulse-block-icon { margin-bottom: 0; }
.impulse-image-item { padding: 4px; cursor: default; flex: 0 0 calc(33.333% - 6px); box-sizing: border-box; }
.impulse-image-item:hover { background: var(--imp-panel); border-radius: 4px; }
.impulse-image-item img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 3px; display: block; }
.impulse-media-item { padding: 4px; cursor: default; flex: 0 0 calc(33.333% - 6px); box-sizing: border-box; }
.impulse-media-item:hover { background: var(--imp-panel); border-radius: 4px; }
.impulse-media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; display: block; }

.impulse-media-item video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 3px; display: block; background: #000; }
.impulse-media-vid { position: relative; }
.impulse-media-vid::after {
    content: ''; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px;
    margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none;
    background: rgba(0,0,0,0.55) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") no-repeat center center;
}
.impulse-gfx-content { display: none; }
.impulse-gfx-content.active { display: block; }
.impulse-graphics-subtab:hover { opacity: 0.85; }

.impulse-bg-shape-item { padding-bottom:12px; margin-bottom:12px; border-bottom:1px solid var(--imp-panel); }
.impulse-bg-shape-item:last-child { border-bottom:none; margin-bottom:0; padding-bottom:0; }
.impulse-bg-shape-head { display:flex; align-items:center; gap:6px; }
.impulse-bg-shape-flip.active { background:var(--imp-text); color:var(--imp-surface2); border-color:var(--imp-text); }
.impulse-bg-shape-anchor-btn { color:var(--imp-muted); background:var(--imp-panel); border:1px solid var(--imp-border); border-radius:3px; cursor:pointer; }
.impulse-bg-shape-anchor-btn:hover { color:var(--imp-text); border-color:var(--imp-muted); }
.impulse-bg-shape-anchor-btn.active { color:var(--imp-surface2); background:var(--imp-text); border-color:var(--imp-text); }

.impulse-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--imp-surface2);
    color: var(--imp-text);
    padding: 12px 24px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: none;
}
.impulse-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.impulse-toast-error { background: var(--imp-panel); border-left: 3px solid #666; }
.impulse-toast-success { background: var(--imp-surface2); }
.impulse-toast-info { background: var(--imp-panel); }
@keyframes impulse-toast-in {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.impulse-cart-block input[type="number"],
.impulse-quantity-selector input[type="number"] {
    -moz-appearance: textfield;
}
.impulse-cart-block input[type="number"]::-webkit-outer-spin-button,
.impulse-cart-block input[type="number"]::-webkit-inner-spin-button,
.impulse-quantity-selector input[type="number"]::-webkit-outer-spin-button,
.impulse-quantity-selector input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.impulse-chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.impulse-chat-toggle:hover { border-color: var(--imp-dim); color: var(--imp-text); }
.impulse-chat-toggle.chat-toggle-on { background: var(--imp-white); border-color: var(--imp-white); color: var(--imp-surface2); font-weight: 600; }
.impulse-chat-toggle.chat-toggle-off { color: var(--imp-dim); border-color: var(--imp-border); background: var(--imp-panel); }
.impulse-chat-toggle:disabled { opacity: 0.5; cursor: wait; }

.impulse-chat-workspace {
    display: grid;
    grid-template-columns: var(--chat-left-w, 280px) 1fr var(--chat-right-w, 280px);
    height: 100%;
    background: var(--imp-surface);
    position: relative;
}

.impulse-chat-left {
    background: var(--imp-surface);
    border-right: 1px solid var(--imp-panel);
    box-shadow: 4px 0 8px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.impulse-chat-list-header {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--imp-panel);
    user-select: none;
    flex-shrink: 0;
}
.impulse-chat-left-tabs {
    display: flex;
    flex: 1;
}
.impulse-chat-left-tab {
    flex: 1;
    height: 36px;
    padding: 0 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--imp-muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    margin-bottom: -1px;
}
.impulse-chat-left-tab:hover { color: var(--imp-white); }
.impulse-chat-left-tab.active { color: var(--imp-white); border-bottom-color: var(--imp-white); font-weight: 600; }
.impulse-chat-left-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.impulse-chat-left-pane.active { display: flex; }
.impulse-chat-conversations { flex: 1; overflow-y: auto; }
.impulse-chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--imp-dim);
}
.impulse-chat-empty-state p { margin: 10px 0 0; font-size: 11px; }

.impulse-instagent-panel {
    border-top: 1px solid var(--imp-panel);
    flex-shrink: 0;
}
.impulse-instagent-header {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--imp-dim);
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-instagent-status {
    margin-left: auto;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.4px;
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
}
.impulse-instagent-status.active { color: var(--imp-text); background: rgba(255,255,255,0.08); }
.impulse-instagent-status.inactive { color: var(--imp-dim); }
.impulse-instagent-status.handoff { color: #fa8; background: rgba(200,140,80,0.08); }
.impulse-instagent-body {
    padding: 10px 12px;
    font-size: 11px;
    color: var(--imp-muted);
    line-height: 1.6;
    max-height: 180px;
    overflow-y: auto;
}
.impulse-instagent-empty { color: #444; font-size: 11px; }
.impulse-instagent-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 8px;
}
.impulse-instagent-row:last-child { margin-bottom: 0; }
.impulse-instagent-label { color: var(--imp-dim); flex-shrink: 0; }
.impulse-instagent-value { color: var(--imp-text); text-align: right; }
.impulse-instagent-divider {
    height: 1px;
    background: var(--imp-panel);
    margin: 6px 0;
}
.impulse-chat-conv-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #22252a;
    transition: background 0.15s;
}
.impulse-chat-conv-item:hover { background: #22252a; }
.impulse-chat-conv-item.active { background: var(--imp-border); }
.impulse-chat-conv-item.unread { background: #22252a; }
.impulse-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--imp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--imp-white);
    flex-shrink: 0;
}
.impulse-chat-conv-info { flex: 1; min-width: 0; }
.impulse-chat-conv-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--imp-text);
}
.impulse-chat-waiting { margin-left: auto; font-size: 10px; color: var(--imp-muted); font-weight: 600; flex-shrink: 0; }
.impulse-chat-conv-preview { font-size: 11px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.impulse-chat-note-btn {
    display: none;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: transparent;
    color: var(--imp-dim);
    cursor: pointer;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}
.impulse-chat-conv-item.active .impulse-chat-note-btn { display: flex; }
.impulse-chat-note-btn:hover { color: var(--imp-muted); border-color: var(--imp-dim); }
.impulse-chat-note-btn.has-note { color: var(--imp-text); border-color: var(--imp-dim); }
.impulse-chat-note-panel {
    padding: 8px 12px 10px;
    background: var(--imp-surface);
    border-bottom: 1px solid #22252a;
}
.impulse-chat-note-panel textarea {
    width: 100%;
    min-height: 54px;
    max-height: 120px;
    background: #22252a;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    font-family: inherit;
    padding: 6px 8px;
    resize: vertical;
    box-sizing: border-box;
    line-height: 1.5;
}
.impulse-chat-note-panel textarea:focus { outline: none; border-color: var(--imp-dim); }
.impulse-chat-note-panel-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
}

.impulse-chat-center {
    display: flex;
    flex-direction: column;
    background: var(--imp-surface);
    position: relative;
    overflow: visible;
    z-index: 1;
}
.impulse-chat-no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--imp-dim);
}
.impulse-chat-no-selection p { margin-top: 12px; font-size: 11px; }
.impulse-chat-active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.impulse-chat-header {
    background: var(--imp-surface);
    border-bottom: 1px solid var(--imp-panel);
    user-select: none;
}
.impulse-chat-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
}
.impulse-chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.impulse-chat-header-left h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--imp-white);
}
.impulse-chat-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--imp-border);
    color: var(--imp-white);
}
.impulse-chat-header-actions { display: flex; gap: 4px; align-items: center; }

.impulse-chat-visitor-info {
    padding: 6px 16px 8px;
    background: var(--imp-surface);
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-chat-visitor-info:empty,
.impulse-chat-visitor-info.all-empty { display: none; }
.impulse-chat-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.impulse-chat-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--imp-muted);
}
.impulse-chat-info-full { grid-column: 1 / -1; }
.impulse-chat-info-item svg { opacity: 0.5; flex-shrink: 0; }
.impulse-chat-info-item.hidden { display: none; }

.impulse-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    background: var(--imp-surface);
}
.impulse-chat-message {
    margin-bottom: 8px;
    max-width: 75%;
    width: fit-content;
    user-select: none;
    cursor: default;
}
.impulse-chat-message.visitor { margin-left: auto; }
.impulse-chat-message-bubble {
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.4;
    user-select: text;
    cursor: text;
}
.impulse-chat-message.admin .impulse-chat-message-bubble,
.impulse-chat-message.owner .impulse-chat-message-bubble {
    background: var(--imp-panel);
    color: var(--imp-text);
    border-radius: 6px 6px 6px 0px;
}
.impulse-chat-message.visitor .impulse-chat-message-bubble {
    background: var(--imp-border);
    color: var(--imp-text);
    border-radius: 6px 6px 0px 6px;
}
.impulse-chat-message.visitor .impulse-chat-message-time { text-align: right; }

.impulse-chat-claim-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    background: var(--imp-surface2);
    border-bottom: 1px solid var(--imp-border);
    font-size: 11px;
    min-height: 32px;
    flex-shrink: 0;
    user-select: none;
}
.impulse-chat-claim-label {
    color: #888;
    font-weight: 500;
}
.impulse-chat-claim-bar.mine .impulse-chat-claim-label { color: var(--imp-text); }
.impulse-chat-claim-bar.other .impulse-chat-claim-label { color: var(--imp-muted); }
.impulse-chat-claim-actions {
    display: flex;
    gap: 4px;
}

.impulse-chat-agent-badge {
    display: inline-block;
    font-size: 10px;
    color: #888;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 2px;
    padding: 1px 5px;
    margin-left: 4px;
    vertical-align: middle;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.impulse-chat-message.note {
    align-self: stretch;
    margin: 4px 0;
}
.impulse-chat-message.note .impulse-chat-message-bubble {
    background: transparent;
    border: 1px dashed var(--imp-border);
    border-radius: 4px;
    color: #666;
    font-size: 11px;
    font-style: italic;
    padding: 5px 10px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}
.impulse-chat-note-icon { flex-shrink: 0; opacity: 0.5; margin-top: 1px; }
.impulse-chat-message.note .impulse-chat-message-meta { justify-content: flex-start; }
.impulse-chat-note-label { font-size: 10px; color: var(--imp-dim); margin-right: 4px; }

.impulse-chat-visitor-page {
    font-size: 10px;
    color: var(--imp-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 2px 16px 4px;
    background: var(--imp-surface);
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-chat-visitor-page a {
    color: var(--imp-dim);
    text-decoration: none;
}
.impulse-chat-visitor-page a:hover { color: #888; }

.impulse-chat-compose {
    padding: 8px 12px;
    background: var(--imp-surface);
    border-top: 1px solid var(--imp-panel);
    flex-shrink: 0;
}
.impulse-chat-compose textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    background: var(--imp-panel);
    color: var(--imp-text);
    font-size: 12px;
    resize: none;
    height: 30px;
    min-height: 30px;
    max-height: 72px;
    line-height: 1.4;
    overflow-y: auto;
}
.impulse-chat-compose textarea:focus { outline: none; border-color: var(--imp-dim); }
.impulse-chat-compose-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 8px;
}
.impulse-chat-send-btn {
    height: 26px;
    padding: 0 16px;
    border: none;
    border-radius: 3px;
    background: var(--imp-border);
    color: var(--imp-white);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}
.impulse-chat-send-btn:hover { background: var(--imp-dim); }

.impulse-chat-typing-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 16px 6px;
    background: var(--imp-surface);
    flex-shrink: 0;
}
.impulse-chat-typing-indicator {
    display: flex;
    align-items: center;
    gap: 3px;
}
.impulse-chat-typing-indicator span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--imp-dim);
    animation: impulse-typing-dot 1.2s infinite ease-in-out;
}
.impulse-chat-typing-indicator span:nth-child(1) { animation-delay: 0s; }
.impulse-chat-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.impulse-chat-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes impulse-typing-dot {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
.impulse-chat-typing-label {
    font-size: 10px;
    color: var(--imp-dim);
    font-style: italic;
}

.impulse-chat-slash-menu {
    position: relative;
    background: var(--imp-surface);
    border-top: 1px solid var(--imp-panel);
    flex-shrink: 0;
    max-height: 220px;
    display: flex;
    flex-direction: column;
}
.impulse-chat-slash-search {
    padding: 6px 12px 4px;
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-chat-slash-search input {
    width: 100%;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    padding: 0 8px;
    height: 26px;
    box-sizing: border-box;
    outline: none;
}
.impulse-chat-slash-search input:focus { border-color: var(--imp-dim); }
.impulse-chat-slash-list {
    overflow-y: auto;
    flex: 1;
}
.impulse-chat-slash-item {
    padding: 5px 12px;
    font-size: 11px;
    color: var(--imp-muted);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}
.impulse-chat-slash-item:hover,
.impulse-chat-slash-item.active { background: var(--imp-panel); color: var(--imp-text); }
.impulse-chat-slash-empty {
    padding: 12px;
    font-size: 11px;
    color: var(--imp-dim);
    text-align: center;
}

.impulse-chat-right {
    background: var(--imp-surface);
    border-left: 1px solid var(--imp-panel);
    box-shadow: -4px 0 8px rgba(0,0,0,.18);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: 100%;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}
.impulse-chat-right input,
.impulse-chat-right textarea,
.impulse-chat-right select {
    user-select: text;
    -webkit-user-select: text;
    pointer-events: auto;
}
.impulse-chat-right button {
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
}

.impulse-chat-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    z-index: 10;
    background: transparent;
    transition: background 0.15s;
}
.impulse-chat-resize-handle:hover,
.impulse-chat-resize-handle.active {
    background: rgba(255,255,255,0.06);
}
.impulse-chat-resize-handle[data-edge="left"] {
    left: var(--chat-left-w, 280px);
    margin-left: -2px;
}
.impulse-chat-resize-handle[data-edge="right"] {
    right: var(--chat-right-w, 280px);
    margin-right: -3px;
}

.impulse-chat-right-content {
    flex: 1;
    min-height: 0;
    overflow-x: visible;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 12px 16px 12px 14px;
    position: relative;
}

.impulse-chat-history-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--imp-panel);
    cursor: pointer;
    transition: background 0.1s;
}
.impulse-chat-history-item:hover { background: #22252a; }
.impulse-chat-history-overlay {
    position: absolute;
    inset: 0;
    background: var(--imp-surface);
    z-index: 20;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.impulse-chat-history-overlay-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--imp-panel);
    flex-shrink: 0;
}
.impulse-chat-history-back {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-muted);
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
}
.impulse-chat-history-back:hover { background: var(--imp-panel); color: var(--imp-text); }
.impulse-chat-history-overlay-title {
    font-size: 11px;
    color: var(--imp-muted);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.impulse-chat-history-overlay-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.impulse-chat-right-content::-webkit-scrollbar {
    display: none;
}
.impulse-chat-right-panel {
    
}

.impulse-chat-quick-replies { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.impulse-chat-quick-reply {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 26px;
    cursor: pointer;
}
.impulse-qr-drag {
    cursor: default;
    color: var(--imp-dim);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 2px;
    margin-right: 1px;
}
.impulse-qr-drag:active { cursor: grabbing; }
.impulse-qr-text {
    flex: 1;
    min-width: 0;
    font-size: 11px;
    color: var(--imp-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 26px;
    border-radius: 3px;
    padding: 0 4px;
    cursor: pointer;
    outline: none;
    user-select: none;
}
.impulse-qr-text[contenteditable="true"] {
    background: var(--imp-panel);
    border: 1px solid var(--imp-dim);
    color: var(--imp-text);
    white-space: normal;
    overflow: visible;
    line-height: 1.5;
    padding: 4px 6px;
    cursor: text;
    user-select: text;
}
.impulse-qr-remove-btn {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666;
    box-sizing: border-box;
}
.impulse-qr-remove-btn:hover { background: var(--imp-border); color: var(--imp-muted); }
.impulse-qr-remove-btn svg, .impulse-qr-remove-btn path { pointer-events: none; }
.impulse-chat-quick-reply.impulse-qr-dragging { opacity: 0.4; }
.impulse-chat-quick-reply.impulse-qr-drag-over .impulse-qr-text { border-top: 1px solid var(--imp-dim); }
.impulse-chat-add-reply { display: flex; align-items: center; gap: 4px; min-height: 26px; margin-top: 4px; border-top: 1px solid var(--imp-panel); padding-top: 4px; }
.impulse-chat-add-reply input {
    flex: 1;
    min-width: 0;
    height: 26px;
    padding: 0 6px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-text);
    font-size: 11px;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    line-height: 1;
}
.impulse-chat-add-reply input:-webkit-autofill,
.impulse-chat-add-reply input:-webkit-autofill:hover,
.impulse-chat-add-reply input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--imp-panel) inset !important;
    -webkit-text-fill-color: var(--imp-text) !important;
    border-color: var(--imp-border) !important;
}

.impulse-chat-add-reply input[type="search"]::-webkit-search-cancel-button,
.impulse-chat-add-reply input[type="search"]::-webkit-search-decoration { display: none; }

.impulse-chat-right input:-webkit-autofill,
.impulse-chat-right input:-webkit-autofill:hover,
.impulse-chat-right input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--imp-panel) inset !important;
    -webkit-text-fill-color: var(--imp-text) !important;
    border-color: var(--imp-border) !important;
}

.impulse-editor input:-webkit-autofill,
.impulse-editor input:-webkit-autofill:hover,
.impulse-editor input:-webkit-autofill:focus,
.impulse-settings input:-webkit-autofill,
.impulse-settings input:-webkit-autofill:hover,
.impulse-settings input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px var(--imp-panel) inset !important;
    -webkit-text-fill-color: var(--imp-text) !important;
    border-color: var(--imp-border) !important;
}
.impulse-chat-add-reply button {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #666;
    font-size: 14px;
    box-sizing: border-box;
}
.impulse-chat-add-reply button:hover { background: var(--imp-border); color: var(--imp-muted); }
.impulse-chat-pos-btn {
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-muted);
    cursor: pointer;
    box-sizing: border-box;
}
.impulse-chat-pos-btn:hover { background: var(--imp-border); color: var(--imp-white); }
.impulse-chat-pos-btn[data-active="true"] { background: var(--imp-text); color: var(--imp-surface2); border-color: var(--imp-text); }

.impulse-chat-agent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-chat-agent-item:last-child { border-bottom: none; }
.impulse-chat-agent-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.impulse-chat-agent-info { flex: 1; min-width: 0; }
.impulse-chat-agent-name { font-size: 11px; color: var(--imp-text); }
.impulse-chat-agent-details { font-size: 10px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.impulse-chat-agent-remove {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    padding: 2px 4px;
    flex-shrink: 0;
}
.impulse-chat-agent-remove:hover { color: #888; }

.impulse-chat-input-enable-row input[type="email"],
.impulse-chat-input-enable-row input[type="tel"],

.impulse-chat-row-actions .impulse-btn-sm {
    height: 24px;
    padding: 0 12px;
}

.impulse-settings-section { margin-bottom: 4px; }

#impulse-chat-agent-select option {
    background: var(--imp-panel);
    color: var(--imp-text);
}

.impulse-collapsible-trigger { transition: color 0.15s; }
.impulse-collapsible-trigger:hover { color: var(--imp-text); }
.impulse-collapsible-open { color: var(--imp-text); }
.impulse-chat-notif-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}
.impulse-chat-notif-input {
    flex: 1;
    min-width: 0;
    height: 26px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.impulse-chat-notif-row input[type="email"],
.impulse-chat-notif-row input[type="tel"] {
    width: 100%;
    height: 26px;
    padding: 0 6px 0 8px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--imp-text);
    font-size: 11px;
    box-sizing: border-box;
    min-width: 0;
}
.impulse-notif-check {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

.impulse-chat-notif-row .impulse-cb {
    margin: 0;
    flex-shrink: 0;
}
.impulse-chat-notif-row.notif-pro-locked {
    opacity: 0.55;
}
.impulse-chat-notif-row.notif-pro-locked input {
    color: var(--imp-dim);
    cursor: default;
}
.impulse-notif-pro-badge {
    height: 26px;
    padding: 0 8px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-dim);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color .15s;
}
.impulse-notif-pro-badge:hover {
    color: var(--imp-text);
}
.impulse-chat-settings-spacer {
    height: 200px;
}

.impulse-chat-summary-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 11px;
    font-weight: 400;
    color: #888;
    text-transform: none;
}
.impulse-chat-summary-toggle input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.impulse-chat-color-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.impulse-chat-color-cell:nth-child(3n+1) {
    align-items: flex-start;
}

.impulse-chat-color-cell:nth-child(3n+2) {
    align-items: center;
}

.impulse-chat-color-cell:nth-child(3n) {
    align-items: flex-end;
}
.impulse-chat-color-cell span {
    font-size: 11px;
    color: #888;
}

.impulse-chat-color-cell .impulse-color-swatch {
    width: 26px;
    height: 26px;
}
.impulse-chat-color-cell .impulse-color-row {
    display: inline-block;
    position: relative;
}

.impulse-chat-right .impulse-color-picker.open {
    position: fixed !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.impulse-chat-right .impulse-color-picker.open * {
    pointer-events: auto !important;
}
.impulse-chat-right .impulse-picker-hex input {
    user-select: text !important;
    -webkit-user-select: text !important;
}

.impulse-chat-color-cell input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}

.impulse-chat-right .impulse-slider-row {
    gap: 6px;
    margin-top: 0;
}
.impulse-chat-right .impulse-slider-row > span:first-child {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
}

#impulse-instagent-config .impulse-slider-row input[type="range"] { width: 100%; }

.impulse-chat-right .impulse-margin-grid .impulse-setting-row > label { color: var(--imp-muted); }

.impulse-setting-section {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-setting-section:last-child { border-bottom: none; margin-bottom: 0; }
.impulse-setting-section-title {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.impulse-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.impulse-setting-row.stacked {
    flex-direction: column;
    align-items: stretch;
}
.impulse-setting-row.stacked .impulse-setting-label { margin-bottom: 4px; }
.impulse-setting-label { font-size: 11px; color: var(--imp-muted); }

.impulse-chat-right input[readonly] {
    opacity: 1;
    cursor: text;
}

input[type="color"].impulse-color-swatch {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    padding: 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
}
input[type="color"].impulse-color-swatch::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"].impulse-color-swatch::-webkit-color-swatch { border: none; border-radius: 4px; }

.impulse-chat-right input[type="text"],
.impulse-chat-right input[type="email"],
.impulse-chat-right input[type="tel"] {
    width: 100%;
    height: 26px;
    padding: 0 8px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-text);
    font-size: 11px;
    box-sizing: border-box;
}
.impulse-chat-right textarea {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-text);
    font-size: 11px;
    resize: vertical;
    min-height: 50px;
}
.impulse-chat-right input:focus,
.impulse-chat-right textarea:focus { outline: none; border-color: var(--imp-dim); }

.impulse-checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 11px;
    color: var(--imp-muted);
}

.impulse-slider-compact {
    display: flex;
    align-items: center;
    gap: 6px;
}
.impulse-slider-compact input[type="range"] {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    background: var(--imp-border);
    border-radius: 2px;
    cursor: pointer;
}
.impulse-slider-compact input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--imp-white);
    cursor: pointer;
}
.impulse-slider-compact span { font-size: 11px; color: var(--imp-muted); min-width: 28px; text-align: right; }

.impulse-chat-claim-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-bottom: 1px solid var(--imp-panel);
    background: var(--imp-surface2);
    min-height: 32px;
    flex-shrink: 0;
}
.impulse-chat-claim-bar.state-mine .impulse-chat-claim-info { color: #6a9f58; }
.impulse-chat-claim-bar.state-other .impulse-chat-claim-info { color: var(--imp-muted); }
.impulse-chat-claim-actions { display: flex; gap: 4px; }

.impulse-chat-add-agent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
}
.impulse-chat-add-agent input {
    font-size: 11px;
    padding: 6px 8px;
    height: 28px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-text);
    box-sizing: border-box;
}
.impulse-chat-add-agent button {
    grid-column: span 2;
    height: 28px;
}

.impulse-products-workspace button:focus,
.impulse-products-workspace input:focus,
.impulse-products-workspace select:focus,

.impulse-products-search {
    padding: 10px;
    border-bottom: 1px solid var(--imp-panel);
    box-sizing: border-box;
    width: 100%;
}
.impulse-products-search input {
    width: 100%;
    height: 26px;
    padding: 0 8px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-text);
    font-size: 11px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.impulse-products-search input::-webkit-search-cancel-button,
.impulse-products-search input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}
.impulse-products-search input::placeholder { color: #666; }
.impulse-products-search input:focus { outline: none; border-color: var(--imp-dim); }
.impulse-products-filters {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.impulse-filter-section {
    margin-bottom: 16px;
}
.impulse-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #bbb;
    cursor: pointer;
    transition: all 0.15s;
}
.impulse-filter-option:hover { background: var(--imp-panel); color: var(--imp-white); }
.impulse-filter-option.active { background: var(--imp-panel); color: var(--imp-white); }
.impulse-filter-option input[type="radio"] { display: none; }
.impulse-inventory-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.impulse-stat-item {
    background: var(--imp-panel);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}
.impulse-stat-item:hover { background: var(--imp-border); }
.impulse-stat-item.active { background: var(--imp-border); outline: 1px solid var(--imp-dim); }
.impulse-stat-num {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--imp-white);
}
.impulse-stat-label {
    font-size: 11px;
    color: var(--imp-muted);
    text-transform: uppercase;
}

.impulse-categories-tree {
    max-height: 300px;
    overflow-y: auto;
    font-size: 13px;
}
.impulse-category-item {
    display: flex;
    align-items: center;
    height: 26px;
    padding: 0 8px;
    margin: 2px 0;
    border-radius: 3px;
    cursor: pointer;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    position: relative;
    gap: 4px;
    transition: background 0.15s, border-color 0.15s;
}
.impulse-category-item:hover { background: var(--imp-border); border-color: var(--imp-dim); }
.impulse-category-item.active { background: var(--imp-border); border-color: #888; }
.impulse-category-item.drag-over { border: 2px solid #666; background: var(--imp-border); }
.impulse-category-item.drag-above { box-shadow: 0 -2px 0 0 #666; }
.impulse-category-item.drag-below { box-shadow: 0 2px 0 0 #666; }
.impulse-category-item.dragging { opacity: 0.4; background: var(--imp-panel); border: 1px solid #666; }
.impulse-category-item.impulse-cat-ghost { opacity: 0.4; background: var(--imp-border); }
.impulse-cat-icon { opacity: 0.5; display: flex; flex-shrink: 0; }
.impulse-category-item:hover .impulse-cat-icon,
.impulse-category-item.active .impulse-cat-icon { opacity: 1; }
.impulse-cat-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; color: var(--imp-text); }
.impulse-category-item.active .impulse-cat-name { color: var(--imp-white); }
.impulse-cat-name-input {
    flex: 1;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 11px;
    color: var(--imp-text);
    outline: none;
}
.impulse-cat-badge { 
    background: var(--imp-border); 
    color: #888; 
    font-size: 11px; 
    padding: 2px 6px; 
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.impulse-category-item:hover .impulse-cat-badge,
.impulse-category-item.active .impulse-cat-badge { 
    background: #4a4f54; 
    color: var(--imp-text); 
}
.impulse-cat-drag {
    cursor: default;
    opacity: 0;
    color: var(--imp-dim);
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.impulse-category-item:hover .impulse-cat-drag { opacity: 0.6; }

.impulse-cat-children {
    margin-left: 10px;
    padding-left: 4px;
}

.impulse-cat-actions {
    display: flex;
    gap: 4px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.15s;
}
.impulse-category-item:hover .impulse-cat-actions {
    opacity: 1;
}
.impulse-cat-action {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--imp-muted);
    border-radius: 3px;
}
.impulse-cat-action:hover {
    background: var(--imp-border);
    color: var(--imp-text);
}

.impulse-modal-overlay .impulse-modal {
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 8px;
    width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    position: relative;
}
.impulse-modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--imp-panel);
    font-size: 12px;
    font-weight: 600;
    color: var(--imp-text);
}
.impulse-modal-body {
    padding: 16px;
}
.impulse-modal-body input[type="text"] {
    width: 100%;
    height: 26px;
    padding: 0 8px;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    color: var(--imp-text);
    font-size: 11px;
    box-sizing: border-box;
}
.impulse-modal-body input[type="text"]:focus {
    outline: none;
    border-color: var(--imp-dim);
}
.impulse-modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--imp-panel);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.impulse-product-card[draggable="true"] { cursor: default; }
.impulse-product-card.is-dragging { opacity: 0.5; }

.impulse-products-toolbar .impulse-products-actions {
    margin-left: auto;
}
.impulse-products-status-tabs {
    display: flex;
}
.impulse-status-tab {
    height: 26px;
    padding: 0 10px;
    border: 1px solid var(--imp-border);
    border-radius: 0;
    border-left-width: 0;
    background: var(--imp-panel);
    color: #888;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.impulse-status-tab:first-child { border-left-width: 1px; border-radius: 3px 0 0 3px; }
.impulse-status-tab:last-child { border-radius: 0 3px 3px 0; }
.impulse-status-tab:hover { border-color: var(--imp-dim); color: #ccc; z-index: 1; position: relative; }
.impulse-status-tab.active { background: var(--imp-white); color: var(--imp-surface2); border-color: var(--imp-white); z-index: 1; position: relative; }

.impulse-products-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.impulse-view-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    background: var(--imp-panel);
    color: var(--imp-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.impulse-view-toggle svg { width: 14px; height: 14px; }
.impulse-view-toggle:hover { border-color: var(--imp-dim); color: var(--imp-white); }

.impulse-view-toggle:focus { outline: none; }
.impulse-toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--imp-border);
    margin: 0 4px;
}
.impulse-products-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 48px;
}
.impulse-loading {
    text-align: center;
    color: #888;
    padding: 40px;
    font-size: 11px;
}
.impulse-loading-more {
    text-align: center;
    color: #888;
    padding: 20px;
    font-size: 11px;
    grid-column: 1 / -1;
}

.impulse-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--product-card-size, 200px), 1fr));
    gap: 12px;
}
.impulse-product-card {
    background: var(--imp-panel);
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    position: relative;
}
.impulse-product-card:hover { border-color: var(--imp-border); }
.impulse-product-card:focus { outline: none; border-color: #666; }
.impulse-product-card.selected { border-color: #666; background: var(--imp-border); }

.impulse-product-badges {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 3;
}
.impulse-product-badge {
    background: var(--imp-surface2);
    color: var(--imp-white);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 3px;
    letter-spacing: 0.3px;
    text-align: center;
}
.impulse-badge-featured {
    background: var(--imp-dim);
}

.impulse-product-card .impulse-card-checkbox {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.15s;
}
.impulse-product-card:hover .impulse-card-checkbox,
.impulse-product-card.bulk-checked .impulse-card-checkbox { opacity: 1; }

.impulse-product-card .impulse-card-drag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 3;
    opacity: 0;
    color: #888;
    cursor: default;
    transition: opacity 0.15s;
}
.impulse-product-card:hover .impulse-card-drag { opacity: 1; }

.impulse-product-thumb {
    height: 140px;
    background: var(--imp-border);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.impulse-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.impulse-product-thumb .impulse-thumb-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--imp-border);
}
.impulse-product-thumb .impulse-thumb-placeholder img {
    width: 48px;
    height: auto;
    object-fit: contain;
}
.impulse-product-info {
    padding: 10px 12px;
}
.impulse-product-name-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.impulse-product-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--imp-text);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.impulse-product-price { 
    color: var(--imp-text); 
    font-weight: 500; 
    font-size: 11px;
    flex-shrink: 0;
    white-space: nowrap;
}
.impulse-product-price .no-price { color: #666; font-style: italic; font-weight: 400; }
.impulse-products-grid .impulse-product-stock {
    font-size: 10px;
    color: var(--imp-dim);
    margin-top: 2px;
    cursor: text;
}
.impulse-products-grid .impulse-product-stock.low { color: var(--imp-muted); }
.impulse-products-grid .impulse-product-stock.out { color: var(--imp-dim); }

.impulse-inline-editable { cursor: text; }
.impulse-inline-editable .impulse-editable-value { display: inline; }
.impulse-inline-editable .impulse-editable-input {
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    color: var(--imp-text);
    font-size: inherit;
    padding: 2px 4px;
    border-radius: 2px;
    width: 100%;
    box-sizing: border-box;
}
.impulse-product-price .impulse-editable-input,
.impulse-product-stock .impulse-editable-input { width: 60px; }
.impulse-product-name .impulse-editable-input { width: 100%; }

.impulse-toast-undo {
    cursor: pointer;
    text-decoration: underline;
    margin-left: 8px;
}
.impulse-toast-undo:hover { color: #ccc; }

.impulse-no-categories {
    color: #666;
    font-size: 11px;
    padding: 8px 0;
}

.impulse-products-table {
    width: 100%;
    border-collapse: collapse;
}
.impulse-products-table th {
    text-align: left;
    padding: 10px 30px;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-products-table td {
    padding: 6px 30px;
    font-size: 11px;
    color: #ccc;
    border-bottom: 1px solid var(--imp-panel);
}
.impulse-products-table tr {
    cursor: pointer;
    transition: background 0.15s;
}
.impulse-products-table tr:hover { background: rgba(255,255,255,0.02); }
.impulse-products-table tr.selected { background: #22252a; box-shadow: inset 3px 0 0 var(--imp-white); }
.impulse-products-table .product-name {
    font-weight: 500;
    color: var(--imp-text);
}

.impulse-products-right {
    background: var(--imp-surface);
    border-left: 1px solid var(--imp-panel);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.impulse-products-right-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 4px;
    color: #888;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.impulse-products-right-header::before,
.impulse-products-right-header::after {
    content: '';
    flex: 1;
    height: 1px;
}
.impulse-products-right-header::before {
    background: linear-gradient(to right, transparent, var(--imp-border));
}
.impulse-products-right-header::after {
    background: linear-gradient(to left, transparent, var(--imp-border));
}
.impulse-products-right-header span {
    white-space: nowrap;
    flex-shrink: 0;
}
.impulse-products-right-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    position: relative;
}

.impulse-products-right-content input[type="text"],
.impulse-products-right-content input[type="number"],
.impulse-products-right-content input[type="email"],
.impulse-products-right-content input[type="date"],
.impulse-products-right-content input[type="url"],
.impulse-products-right-content select,
.impulse-products-right-content textarea,
.impulse-feature-card-body input[type="text"],
.impulse-feature-card-body input[type="number"],
.impulse-feature-card-body input[type="email"],
.impulse-feature-card-body input[type="date"],
.impulse-feature-card-body select,
.impulse-feature-card-body textarea {
    background-color: var(--imp-panel) !important;
    border: 1px solid var(--imp-border) !important;
    border-radius: 3px !important;
    color: var(--imp-text) !important;
    font-size: 11px !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    outline: none !important;
    height: 26px !important;
}
.impulse-products-right-content textarea,
.impulse-feature-card-body textarea {
    height: auto !important;
    padding: 6px 8px !important;
    resize: vertical !important;
}
.impulse-products-right-content input[type="checkbox"],
.impulse-feature-card-body input[type="checkbox"] {
    width: 28px !important;
    height: 16px !important;
}
.impulse-products-right-content input:focus,
.impulse-products-right-content select:focus,
.impulse-products-right-content textarea:focus,
.impulse-feature-card-body input:focus,
.impulse-feature-card-body select:focus,
.impulse-feature-card-body textarea:focus {
    border-color: var(--imp-dim) !important;
    box-shadow: none !important;
}

.impulse-product-edit-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.impulse-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.impulse-form-group label {
    display: flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    gap: 6px;
}
.impulse-form-group input,
.impulse-form-group select {
    padding: 0 8px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-text);
    font-size: 11px;
    font-family: inherit;
    height: 26px;
    box-sizing: border-box;
}
.impulse-form-group input:focus,
.impulse-form-group select:focus {
    outline: none;
    border-color: var(--imp-dim);
}

.impulse-form-group textarea {
    padding: 6px 8px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: var(--imp-panel);
    color: var(--imp-text);
    font-size: 11px;
    font-family: inherit;
}
.impulse-form-group textarea:focus {
    outline: none;
    border-color: var(--imp-dim);
}
.impulse-form-group input::placeholder,
.impulse-form-group textarea::placeholder { color: #666; }
.impulse-form-group textarea {
    resize: vertical;
    min-height: 60px;
}
.impulse-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.impulse-btn-sm {
    padding: 0 12px;
    border: 1px solid var(--btn-border);
    border-radius: var(--btn-radius);
    background: var(--btn-bg);
    color: var(--btn-color);
    font-size: var(--btn-font);
    cursor: pointer;
    transition: all 0.15s;
    height: var(--btn-height);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.impulse-btn-sm:hover { border-color: var(--imp-dim); }

.impulse-btn-sm.impulse-btn-primary {
    background: var(--imp-border);
    border-color: var(--imp-border);
    color: var(--imp-white);
}
.impulse-btn-sm.impulse-btn-primary:hover { background: #4a4f54; }
.impulse-btn-sm.impulse-btn-danger {
    background: transparent;
    border-color: #666;
    color: #888;
}
.impulse-btn-sm.impulse-btn-danger:hover { background: #666; color: var(--imp-white); }
.impulse-btn-sm:disabled { opacity: 0.5; cursor: default; }

.impulse-ai-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 6px;
}
.impulse-ai-generate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: all 0.15s;
}
.impulse-ai-generate-btn:hover { color: var(--imp-white); }
.impulse-ai-generate-btn:disabled { opacity: 0.5; cursor: wait; }
.impulse-ai-generate-btn svg { width: 18px; height: 18px; }

[data-tip] {
    position: relative;
}
[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: var(--imp-surface);
    color: #ccc;
    font-size: 10px;
    white-space: nowrap;
    border-radius: 3px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 99999;
}
[data-tip]:hover::after {
    opacity: 1;
    visibility: visible;
}

.impulse-products-right [data-tip]::after {
    left: auto;
    right: 0;
    transform: none;
}

.impulse-spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid #666;
    border-top-color: transparent;
    border-radius: 50%;
    animation: impulse-spin 0.8s linear infinite;
}
@keyframes impulse-spin {
    to { transform: rotate(360deg); }
}

.impulse-modal-large .impulse-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}
.impulse-modal-large .impulse-form-group {
    margin-bottom: 16px;
}
.impulse-modal-large textarea:focus,
.impulse-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}
.impulse-modal-close:hover { color: var(--imp-white); }

.impulse-add-attribute-btn,
.impulse-add-attribute-btn:hover,

.impulse-no-attributes { font-size: 11px; color: #666; padding: 8px 0; }
.impulse-attribute-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: var(--imp-panel);
    border-radius: 4px;
}
.impulse-attribute-name { font-size: 11px; font-weight: 600; color: var(--imp-text); min-width: 60px; }
.impulse-attribute-values { flex: 1; font-size: 11px; color: #888; }
.impulse-attribute-actions { display: flex; gap: 4px; }
.impulse-attribute-actions button {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}
.impulse-attribute-actions button:hover { background: var(--imp-border); color: var(--imp-white); }

.impulse-no-variations { font-size: 11px; color: #666; padding: 8px 0; }
.impulse-variations-table { display: flex; flex-direction: column; gap: 2px; }
.impulse-variation-row {
    background: var(--imp-panel);
    border-radius: 4px;
    overflow: hidden;
}
.impulse-variation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    cursor: pointer;
}
.impulse-variation-header:hover { background: #333; }
.impulse-variation-toggle {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: transform 0.15s;
}
.impulse-variation-row.expanded .impulse-variation-toggle { transform: rotate(180deg); }
.impulse-variation-label { flex: 1; font-size: 11px; color: var(--imp-text); }
.impulse-variation-price { font-size: 11px; color: #888; min-width: 50px; text-align: right; }
.impulse-variation-stock { font-size: 11px; color: #666; min-width: 30px; text-align: right; }
.impulse-delete-variation {
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}
.impulse-delete-variation:hover { background: #666; color: var(--imp-white); }
.impulse-variation-body {
    display: none;
    padding: 8px 10px 10px;
    border-top: 1px solid var(--imp-border);
}
.impulse-variation-row.expanded .impulse-variation-body { display: block; }
.impulse-variation-body .impulse-form-row { gap: 8px; }
.impulse-variation-body .impulse-form-group { gap: 2px; }
.impulse-variation-body .impulse-form-group label { font-size: 11px; }
.impulse-variation-body .impulse-form-group input {
    padding: 5px 8px;
    font-size: 11px;
}

.impulse-bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--imp-panel);
    border-bottom: 1px solid var(--imp-border);
}
.impulse-bulk-count {
    font-size: 11px;
    color: var(--imp-text);
    font-weight: 500;
}
.impulse-bulk-actions {
    display: flex;
    gap: 6px;
}
.impulse-bulk-btn {
    padding: 4px 10px;
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    background: transparent;
    color: var(--imp-muted);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.impulse-bulk-btn:hover { border-color: var(--imp-dim); color: var(--imp-white); }
.impulse-bulk-btn:disabled { opacity: 0.6; cursor: wait; }
.impulse-bulk-btn-danger { border-color: #666; color: #888; }
.impulse-bulk-btn-danger:hover { background: #666; border-color: #666; color: var(--imp-white); }
.impulse-bulk-ai-btn { display: inline-flex; align-items: center; gap: 4px; }
.impulse-bulk-ai-btn svg { width: 14px; height: 14px; }
.impulse-bulk-clear {
    margin-left: auto;
    padding: 4px 10px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 11px;
    cursor: pointer;
}
.impulse-bulk-clear:hover { color: var(--imp-muted); }

.impulse-card-drag:active { cursor: grabbing; }
.impulse-product-card.bulk-checked {
    outline: 2px solid var(--imp-dim);
    outline-offset: -2px;
}

.impulse-products-table .col-check {
    width: 32px;
    text-align: center;
}
.impulse-products-table .col-drag {
    width: 24px;
    cursor: default;
    color: var(--imp-dim);
}
.impulse-products-table .col-drag:active { cursor: grabbing; }
.impulse-products-table tr.bulk-checked { background: var(--imp-panel); }
.impulse-products-table .impulse-bulk-check {
    cursor: pointer;
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--imp-border) !important;
}

.impulse-product-images {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 4px;
}
.impulse-product-images .impulse-img-item {
    position: relative;
    aspect-ratio: 1;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    overflow: hidden;
    cursor: default;
}
.impulse-product-images .impulse-img-item.ui-sortable-helper {
    cursor: grabbing;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    z-index: 10;
}
.impulse-product-images .impulse-img-item.ui-sortable-placeholder {
    visibility: visible !important;
    background: var(--imp-surface);
    border: 1px solid var(--imp-dim);
    opacity: 0.5;
}
.impulse-product-images .impulse-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.impulse-product-images .impulse-img-item .impulse-img-badge {
    position: absolute;
    bottom: 3px;
    left: 3px;
    font-size: 9px;
    color: var(--imp-white);
    background: rgba(0,0,0,0.6);
    padding: 1px 5px;
    border-radius: 2px;
    pointer-events: none;
}
.impulse-product-images .impulse-img-item .impulse-img-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    background: var(--imp-surface);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.impulse-product-images .impulse-img-item:hover .impulse-img-remove { opacity: 1; }
.impulse-product-images .impulse-img-add {
    aspect-ratio: 1;
    background: var(--imp-panel);
    border: 1px solid var(--imp-border);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--imp-dim);
    transition: border-color 0.15s, color 0.15s;
}
.impulse-product-images .impulse-img-add:hover { border-color: var(--imp-dim); color: var(--imp-muted); }

.impulse-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.impulse-category-btn {
    padding: 5px 10px;
    border: 1px solid var(--imp-border);
    border-radius: 4px;
    background: var(--imp-panel);
    color: #888;
    font-size: 11px !important;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.15s;
}
.impulse-category-btn:hover { border-color: var(--imp-dim); color: #ccc; }
.impulse-category-btn.active { border-color: #888; color: var(--imp-white); }

@media (max-width: 1200px) {
    .impulse-chat-workspace { grid-template-columns: 220px 1fr 280px; }
}
@media (max-width: 1024px) {
    .impulse-chat-workspace { grid-template-columns: 200px 1fr; }
    .impulse-chat-right { display: none; }
    .impulse-products-right { display: none; }
}

.impulse-wrap,
.impulse-editor,
.instinctor-wrap {
    user-select: none;
    -webkit-user-select: none;
}

.impulse-wrap input[type="text"],
.impulse-wrap input[type="email"],
.impulse-wrap input[type="number"],
.impulse-wrap input[type="url"],
.impulse-wrap input[type="password"],
.impulse-wrap input[type="search"],
.impulse-wrap textarea,
.impulse-wrap [contenteditable],
.impulse-editor input[type="text"],
.impulse-editor input[type="email"],
.impulse-editor input[type="number"],
.impulse-editor input[type="url"],
.impulse-editor input[type="password"],
.impulse-editor input[type="search"],
.impulse-editor textarea,
.impulse-editor [contenteditable],
.instinctor-wrap input[type="text"],
.instinctor-wrap input[type="email"],
.instinctor-wrap input[type="number"],
.instinctor-wrap input[type="url"],
.instinctor-wrap input[type="password"],
.instinctor-wrap input[type="search"],
.instinctor-wrap textarea,
.instinctor-wrap [contenteditable] {
    user-select: text;
    -webkit-user-select: text;
}

.impulse-structure-slide {
    cursor: pointer;
    border-left: 2px solid var(--imp-border);
}
.impulse-structure-slide:hover {
    border-left-color: var(--imp-dim);
}
.impulse-structure-slide.selected {
    border-left-color: #888;
}

.impulse-go-bar-shapes button { border: 2px solid transparent; box-sizing: border-box; }
.impulse-editor .impulse-go-bar-shapes button.active,
.impulse-go-bar-shapes button.active { background: var(--imp-panel) !important; border-color: var(--imp-white) !important; box-shadow: none !important; }

.impulse-screen-bar-panel-3d.active { min-height: 122px; overflow: visible; }
.impulse-3d-grid-clip::-webkit-scrollbar { display: none; }

.impulse-go-bar-shapes { display: flex !important; }
.impulse-go-bar-shapes button { flex: 1 !important; min-width: 0 !important; }

.impulse-block-nav[data-element="section"] { gap: 2px !important; }

.impulse-anim-layer-hidden .impulse-section-anim-layer-header > div:first-child > span:nth-child(2) {
    color: #555 !important;
    text-decoration: line-through;
    text-decoration-color: #444;
}

.impulse-structure-panel.dragging .impulse-structure-item > * {
    pointer-events: none;
}

.impulse-hf-cards { display: flex; flex-direction: column; gap: 16px; }
.impulse-hf-card { display: flex; align-items: center; gap: 20px; background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 24px; transition: border-color 0.2s, box-shadow 0.2s; }
.impulse-hf-card:hover { border-color: #ccc; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.impulse-hf-card-icon { flex-shrink: 0; width: 56px; height: 56px; background: #f5f5f5; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #1d2327; }
.impulse-hf-card-content { flex: 1; }
.impulse-hf-card-content h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: #1d2327; }
.impulse-hf-status { margin: 0; font-size: 13px; }
.impulse-hf-status .status-configured { color: #888888; }
.impulse-hf-status .status-empty { color: #999; }
.impulse-hf-edit { flex-shrink: 0; min-width: 130px; text-align: center; }

#instagent-help-panel{
    position:fixed;top:0;right:0;bottom:0;width:280px;
    background:#1a1d21;border-left:1px solid #2a2e33;
    z-index:2147483646;display:none;flex-direction:column;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
    box-shadow:-8px 0 32px rgba(0,0,0,.3);
}
#instagent-help-panel.open{display:flex}

#instagent-help-panel-header{
    display:flex;align-items:center;justify-content:space-between;
    padding:14px 16px;border-bottom:1px solid #2a2e33;flex-shrink:0;
}
#instagent-help-panel-header .title{font-size:13px;font-weight:600;color:#fff;letter-spacing:0.3px}
#instagent-help-panel-header .title span{color:#999;font-weight:400;margin-left:6px}
#instagent-help-panel-header .close{
    background:none;border:none;color:#999;cursor:pointer;padding:6px;
    display:flex;align-items:center;border-radius:3px;
}
#instagent-help-panel-header .close:hover{color:#fff;background:#2a2e33}
#instagent-help-panel-header .close svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2}

#instagent-help-messages{
    flex:1;overflow-y:auto;padding:16px;
    scrollbar-width:none;-ms-overflow-style:none;
    display:flex;flex-direction:column;gap:14px;
}
#instagent-help-messages::-webkit-scrollbar{display:none;width:0;height:0}

.instagent-help-msg{font-size:13px;line-height:1.6}
.instagent-help-msg.user{
    background:#2a2e33;color:#e0e0e0;align-self:flex-end;
    padding:10px 14px;border-radius:14px 14px 2px 14px;
    max-width:85%;
}
.instagent-help-msg.bot{color:#e0e0e0}
.instagent-help-msg.bot strong{color:#fff;font-weight:600}
.instagent-help-msg.bot em{color:#bbb;font-style:italic}
.instagent-help-msg.bot code{
    background:#2a2e33;color:#e0e0e0;
    padding:1px 5px;border-radius:3px;font-size:12px;font-family:monospace;
}
.instagent-help-msg.bot pre{
    background:#2a2e33;color:#e0e0e0;
    padding:10px 12px;border-radius:4px;font-size:12px;
    overflow-x:auto;margin:8px 0;
}
.instagent-help-msg.bot ol,.instagent-help-msg.bot ul{margin:6px 0 6px 20px;padding:0}
.instagent-help-msg.bot li{margin-bottom:4px}
.instagent-help-msg.bot p{margin:0 0 8px 0}
.instagent-help-msg.bot p:last-child{margin-bottom:0}

.instagent-help-typing{
    display:flex;gap:4px;padding:10px 0;align-self:flex-start;
}
.instagent-help-typing span{
    width:6px;height:6px;background:#555;border-radius:50%;
    animation:instagent-help-bounce 1.2s infinite ease-in-out;
}
.instagent-help-typing span:nth-child(2){animation-delay:0.2s}
.instagent-help-typing span:nth-child(3){animation-delay:0.4s}
@keyframes instagent-help-bounce{
    0%,80%,100%{opacity:0.3;transform:scale(0.7)}
    40%{opacity:1;transform:scale(1)}
}

.instagent-help-empty{padding:4px 0;color:#999}
.instagent-help-empty .intro{padding:0 4px 14px;border-bottom:1px solid #2a2e33;margin-bottom:8px}
.instagent-help-empty .intro .heading{
    font-size:13px;color:#e0e0e0;margin-bottom:4px;font-weight:600;letter-spacing:0.2px;
}
.instagent-help-empty .intro .body{font-size:11px;line-height:1.55;color:#777}

.instagent-help-empty .browse-section{border-bottom:1px solid #2a2e33}
.instagent-help-empty .browse-section:last-child{border-bottom:none}
.instagent-help-empty .browse-section-header{
    width:100%;background:transparent;border:none;
    display:flex;align-items:center;justify-content:space-between;
    padding:8px 4px;font-size:10px;font-weight:600;color:#999;
    text-transform:uppercase;letter-spacing:0.08em;cursor:pointer;
    font-family:inherit;transition:color .12s;
}
.instagent-help-empty .browse-section-header:hover{color:#e0e0e0}
.instagent-help-empty .browse-caret{
    transition:transform .15s;color:#666;flex-shrink:0;
}
.instagent-help-empty .browse-section.open .browse-caret{transform:rotate(180deg);color:#999}
.instagent-help-empty .browse-items{display:none;padding-bottom:8px}
.instagent-help-empty .browse-section.open .browse-items{display:block}

.instagent-help-empty .browse-item-wrap{display:flex;flex-direction:column}
.instagent-help-empty .browse-item{
    background:transparent;color:#bbb;border:none;border-left:2px solid transparent;
    display:flex;align-items:center;justify-content:space-between;gap:8px;
    padding:5px 10px;font-size:12px;line-height:1.4;
    cursor:pointer;text-align:left;
    transition:background .12s, border-color .12s, color .12s;
    font-family:inherit;
}
.instagent-help-empty .browse-item:hover{color:#fff;background:#22262b;border-left-color:#555}
.instagent-help-empty .browse-item-wrap.open .browse-item{
    color:#fff;background:#22262b;border-left-color:#e0e0e0;
}
.instagent-help-empty .browse-item-caret{
    transition:transform .15s;color:#666;flex-shrink:0;
}
.instagent-help-empty .browse-item-wrap.open .browse-item-caret{transform:rotate(180deg);color:#999}

.instagent-help-empty .browse-item-content{
    display:none;padding:8px 12px 16px 14px;
    font-size:12px;line-height:1.6;color:#bbb;
    border-left:2px solid #2a2e33;margin-left:0;
}
.instagent-help-empty .browse-item-wrap.open .browse-item-content{display:block}
.instagent-help-empty .browse-item-content h1{display:none}  
.instagent-help-empty .browse-item-content h2{
    font-size:12px;color:#fff;font-weight:600;margin:14px 0 6px;
    text-transform:uppercase;letter-spacing:0.04em;
}
.instagent-help-empty .browse-item-content h2:first-child{margin-top:0}
.instagent-help-empty .browse-item-content h3{font-size:12px;color:#e0e0e0;font-weight:600;margin:10px 0 4px}
.instagent-help-empty .browse-item-content p{margin:0 0 8px}
.instagent-help-empty .browse-item-content ul,.instagent-help-empty .browse-item-content ol{margin:4px 0 8px 18px;padding:0}
.instagent-help-empty .browse-item-content li{margin-bottom:3px}
.instagent-help-empty .browse-item-content code{
    background:#2a2e33;color:#e0e0e0;padding:1px 5px;border-radius:3px;font-size:11px;font-family:monospace;
}
.instagent-help-empty .browse-item-content strong{color:#fff;font-weight:600}
.instagent-help-empty .browse-item-content em{color:#bbb;font-style:italic}
.instagent-help-empty .browse-item-content hr{border:none;border-top:1px solid #2a2e33;margin:14px 0}

.instagent-help-empty .article-intro{
    margin-bottom:8px;padding-bottom:8px;
    border-bottom:1px solid #2a2e33;
    font-size:11px;line-height:1.55;color:#999;
}
.instagent-help-empty .article-intro p{margin:0 0 6px}
.instagent-help-empty .article-intro p:last-child{margin-bottom:0}

.instagent-help-empty .article-section{border-bottom:1px solid #22262b}
.instagent-help-empty .article-section:last-child{border-bottom:none}
.instagent-help-empty .article-section-header{
    width:100%;background:transparent;border:none;
    display:flex;align-items:center;justify-content:space-between;gap:6px;
    padding:6px 0;font-size:11px;font-weight:600;color:#bbb;
    cursor:pointer;font-family:inherit;text-align:left;
    transition:color .12s;
}
.instagent-help-empty .article-section-header:hover{color:#fff}
.instagent-help-empty .article-section.open .article-section-header{color:#fff}
.instagent-help-empty .article-section-caret{transition:transform .15s;color:#666;flex-shrink:0}
.instagent-help-empty .article-section.open .article-section-caret{transform:rotate(180deg);color:#999}
.instagent-help-empty .article-section-body{
    display:none;padding:2px 0 10px;
    font-size:11px;line-height:1.6;color:#bbb;
}
.instagent-help-empty .article-section.open .article-section-body{display:block}
.instagent-help-empty .article-section-body p{margin:0 0 6px}
.instagent-help-empty .article-section-body p:last-child{margin-bottom:0}
.instagent-help-empty .article-section-body h3{font-size:11px;color:#e0e0e0;font-weight:600;margin:8px 0 3px}
.instagent-help-empty .article-section-body ul,.instagent-help-empty .article-section-body ol{
    margin:3px 0 6px 14px;padding:0;
}
.instagent-help-empty .article-section-body li{margin-bottom:2px}
.instagent-help-empty .article-section-body code{
    background:#2a2e33;color:#e0e0e0;padding:1px 4px;border-radius:3px;font-size:10px;font-family:monospace;
}
.instagent-help-empty .article-section-body strong{color:#fff;font-weight:600}
.instagent-help-empty .article-section-body em{color:#bbb;font-style:italic}
.instagent-help-empty .article-section-body hr{display:none}

.instagent-help-empty .browse-item-loading{display:flex;gap:4px;padding:8px 0}
.instagent-help-empty .browse-item-loading span{
    width:5px;height:5px;background:#555;border-radius:50%;
    animation:instagent-help-bounce 1.2s infinite ease-in-out;
}
.instagent-help-empty .browse-item-loading span:nth-child(2){animation-delay:0.2s}
.instagent-help-empty .browse-item-loading span:nth-child(3){animation-delay:0.4s}
.instagent-help-empty .browse-item-error{color:#999;font-style:italic;font-size:11px}

#instagent-help-input-row{
    display:flex;align-items:flex-end;gap:8px;padding:12px 16px;
    border-top:1px solid #2a2e33;flex-shrink:0;
}
#instagent-help-input{
    flex:1;background:#2a2e33;color:#e0e0e0;border:1px solid #3a3f44;
    border-radius:3px;padding:5px 10px;font-size:11px;font-family:inherit;
    resize:none;min-height:26px;max-height:120px;line-height:1.45;
    outline:none;transition:border-color .15s;
    scrollbar-width:none;-ms-overflow-style:none;box-sizing:border-box;
}
#instagent-help-input::-webkit-scrollbar{display:none;width:0;height:0}
#instagent-help-input:focus{border-color:#555}
#instagent-help-send{
    background:#fff;color:#1a1d21;border:none;border-radius:3px;
    padding:0 12px;height:26px;font-size:11px;font-weight:600;
    cursor:pointer;transition:opacity .15s;flex-shrink:0;
    text-transform:uppercase;letter-spacing:0.5px;box-sizing:border-box;
}
#instagent-help-send:hover{opacity:0.9}
#instagent-help-send:disabled{opacity:0.5;cursor:not-allowed}

#instagent-help-context{
    padding:8px 16px;font-size:11px;color:#777;border-top:1px solid #2a2e33;
    flex-shrink:0;display:flex;align-items:center;gap:8px;
}
#instagent-help-context .label{color:#555;text-transform:uppercase;letter-spacing:0.5px;font-weight:600}
#instagent-help-context .value{color:#999}
#instagent-help-context .value strong{color:#e0e0e0;font-weight:500}

@media (max-width:640px){
    #instagent-help-panel{width:100%;max-width:100%}
}

#impulse-section-chips{position:absolute;top:0;bottom:0;right:6px;display:none;flex-direction:column;justify-content:center;gap:4px;z-index:60;opacity:.28;transition:opacity 200ms ease-in-out;pointer-events:none;transform:scale(var(--impulse-canvas-boost,1));transform-origin:100% 50%}
.impulse-canvas:hover #impulse-section-chips,#impulse-section-chips:hover{opacity:1}
.impulse-section-chip{width:20px;height:20px;padding:0;pointer-events:auto;border:1px solid #3a3f44;border-radius:3px;background:#1a1d21;color:#999;font-size:10px;line-height:18px;font-family:inherit;cursor:pointer;transition:background 160ms ease-in-out,color 160ms ease-in-out,border-color 160ms ease-in-out}
.impulse-section-chip:hover{color:#e0e0e0;border-color:#555}
.impulse-section-chip.active{background:#e0e0e0;color:#1d2327;border-color:#e0e0e0}

.impulse-section-chip-add{border-style:dashed;border-color:#3a3f44;color:#777;font-size:12px;line-height:16px}
.impulse-section-chip-add:hover{color:#e0e0e0;border-color:#555;border-style:solid}

.impulse-chip-pop{position:fixed;z-index:1000000;display:flex;gap:2px;padding:3px;
  background:#1a1d21;border:1px solid #3a3f44;border-radius:4px;
  box-shadow:0 6px 20px rgba(0,0,0,0.45)}
.impulse-chip-pop-btn{width:22px;height:22px;padding:0;display:flex;align-items:center;
  justify-content:center;background:none;border:0;border-radius:3px;color:#999;cursor:pointer;
  transition:background 160ms ease-in-out,color 160ms ease-in-out}
.impulse-chip-pop-btn:hover{background:#2a2f35;color:#e0e0e0}
.impulse-chip-pop-btn[data-act="delete"]:hover{color:#fff;background:#555}

.impulse-chip-pop-name{display:flex;align-items:center;max-width:190px;padding:0 6px 0 4px;
  margin-left:2px;border-left:1px solid #3a3f44;color:#e0e0e0;font-size:11px;line-height:22px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.impulse-chip-pop-name:empty{display:none}

.impulse-chip-pop-input{width:150px;height:20px;padding:0 5px;background:#0f1113;
  border:1px solid #555;border-radius:3px;color:#e0e0e0;font-size:11px;font-family:inherit;outline:none}
.impulse-chip-pop-input:focus{border-color:#e0e0e0}

#impulse-section-chips.is-dragging{opacity:1}
#impulse-section-chips.is-dragging .impulse-section-chip{cursor:grabbing}
.impulse-section-chip.dragging{opacity:.4}
.impulse-chip-drop{display:none;position:absolute;left:-2px;right:-2px;height:2px;
  background:#e0e0e0;border-radius:1px;pointer-events:none}

.impulse-canvas[data-device="mobile"] #impulse-section-chips,.impulse-canvas[data-device="mobile"] #impulse-section-chips.has-chips{display:none}
#impulse-screen-sidebar.impulse-screen-sidebar-hidden{display:none!important}

.impulse-custom-select:has(> select[name="kinetic_weight"]),
.impulse-custom-select:has(select[name="kinetic_weight"]){min-width:66px;flex:0 0 66px}

#impulse-section-chips.has-chips{display:flex}

.impulse-align-grid[data-name="align_grid"]{
    grid-template-columns:repeat(3,14px);
    grid-template-rows:repeat(3,14px);
    gap:4px;
    width:auto;height:auto;
    background:none;border:none;padding:0;margin:0;
}
.impulse-align-grid[data-name="align_grid"] .impulse-align-dot{
    width:14px;height:14px;border-radius:3px;
    background:var(--imp-panel);
    border:1px solid var(--imp-border);
    place-self:auto;
}
.impulse-align-grid[data-name="align_grid"] .impulse-align-dot:hover{
    background:#3a3f44;border-color:#555;
}
.impulse-align-grid[data-name="align_grid"] .impulse-align-dot.active{
    background:var(--imp-text);border-color:var(--imp-text);box-shadow:none;
}

.impulse-align-grid[data-name="align_grid"] .impulse-align-dot.col-active{
    background:#555;border-color:#777;
}
