/* ============================================
   Dashboard Styles — Light Theme, Creatopy-inspired
   ============================================ */

.dashboard {
    padding: 32px 40px;
    /* The centered 1320px content column every non-full-bleed page uses (CLAUDE.md). */
    max-width: 1320px;
    margin: 0 auto;
}
/* Phones: the 40px desktop gutters left the setup checklist ~215px wide next to the rail. */
@media (max-width: 640px) {
    .dashboard { padding: 20px 14px 32px; }
}

.text-muted {
    color: var(--text-muted, #999);
    font-size: 13px;
}

/* --- Hero --- */
.dashboard-hero {
    margin-bottom: 40px;
}

.dashboard-hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.dashboard-hero .hero-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-cards {
    display: flex;
    gap: 12px;
}

/* 3-card variant — used by the new home page (edit / from-url / from-image).
 * On narrow viewports the cards wrap to a 2-up or 1-up layout so the action
 * descriptions stay readable. */
.hero-cards--three {
    flex-wrap: wrap;
}
.hero-cards--three .hero-card {
    min-width: 240px;
}

/* 4-card variant — edit / from-prompt / from-url / from-image. Wraps to 2-up
 * then 1-up on narrow viewports; each card flex-grows to fill the row. */
.hero-cards--four {
    flex-wrap: wrap;
}
.hero-cards--four .hero-card {
    flex: 1 1 220px;
    min-width: 220px;
}

.hero-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: var(--text-primary);
    transition: all var(--transition);
}

.hero-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hero-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    border-radius: var(--radius);
    color: var(--accent);
    flex-shrink: 0;
}

.hero-card-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-card-text strong { font-size: 14px; font-weight: 600; }
.hero-card-text span { font-size: 12px; color: var(--text-secondary); }

/* --- Dashboard Section --- */
.dashboard-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 16px;
    font-weight: 600;
}

/* --- Design Search --- */
.designs-search {
    width: 280px;
    height: 32px;
    padding: 0 10px 0 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 10px center;
    font: inherit;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition);
}
.designs-search::placeholder { color: var(--text-muted); }
.designs-search:focus { border-color: var(--accent); }

/* --- Design Sort --- */
.designs-sort {
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    font: inherit;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    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%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color var(--transition);
}
.designs-sort:focus { border-color: var(--accent); }

/* --- Rename Input --- */
.designs-rename-input {
    height: 24px;
    padding: 0 6px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* --- View Toggle --- */
.view-toggle {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    padding: 2px;
}

.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.view-btn:hover { color: var(--text-primary); }
.view-btn.active { background: var(--bg-secondary); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }

/* --- Design Cards (Grid View) --- */
.designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
    gap: 16px;
}

.design-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    overflow: hidden;
    position: relative;
}

.design-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.design-card-thumb {
    height: 140px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-muted);
}

.design-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.design-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.design-card-name {
    font-size: 13px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.design-card-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.design-card-menu {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition);
}

.design-card:hover .design-card-menu { opacity: 1; }
.design-card-menu:hover { background: var(--bg-hover); }

/* --- Designs Table (List View) --- */
.designs-table {
    width: 100%;
    border-collapse: collapse;
}

.designs-table thead th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.designs-table tbody tr {
    cursor: pointer;
    transition: background var(--transition);
}

.designs-table tbody tr:hover {
    background: var(--bg-hover);
}

.designs-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
    vertical-align: middle;
}

.table-design-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-thumb {
    width: 48px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.table-thumb svg { opacity: 0.4; }

.table-name-text {
    font-weight: 500;
}

.table-type .badge {
    font-size: 11px;
}

.table-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--transition);
}

.designs-table tbody tr:hover .table-actions { opacity: 1; }

.table-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.table-action-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* --- Legacy list view compatibility --- */
.designs-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.designs-list .design-card {
    display: flex;
    flex-direction: row;
    border-radius: var(--radius);
}

.designs-list .design-card-thumb {
    width: 80px;
    height: 56px;
    flex-shrink: 0;
}

.designs-list .design-card-info {
    flex: 1;
    justify-content: center;
}

.designs-list .design-card-menu {
    position: static;
    opacity: 0;
    margin: auto 8px;
}

/* --- Create Modal --- */
.create-modal {
    width: 920px;
    height: 620px;
}

.create-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
}
.create-modal-header h2 { flex-shrink: 0; }

/* Search bar in header */
.create-search-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px 12px;
    margin-left: auto;
    max-width: 340px;
    color: var(--text-muted);
}
.create-search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font: inherit;
    font-size: 13px;
    color: var(--text-primary);
}
.create-search-input::placeholder { color: var(--text-muted); }
.create-search-clear {
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    padding: 2px; display: flex; align-items: center; border-radius: 50%;
}
.create-search-clear:hover { color: var(--text-primary); background: var(--bg-hover); }

.create-modal-body {
    display: flex;
    height: 100%;
}

/* --- Sidebar with icons --- */
.create-sidebar {
    width: 200px;
    border-right: 1px solid var(--border-subtle);
    padding: 8px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow-y: auto;
}

.create-sidebar-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 6px 8px;
}

.create-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.create-sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.create-sidebar-icon svg { display: block; }

.create-sidebar-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.create-sidebar-item.active {
    background: var(--accent-subtle);
    color: var(--accent);
    font-weight: 500;
    border-left-color: var(--accent);
}

/* --- Content area --- */
.create-content {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}

.create-section {
    margin-bottom: 28px;
}

.create-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.create-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.create-section-header h3 { margin-bottom: 0; }

.create-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}
.create-empty p { font-size: 14px; margin: 0; }

/* --- Generative Flows --- */
.gen-flows {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.gen-flow-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-align: center;
    font: inherit;
    color: var(--text-primary);
    transition: all var(--transition);
}

.gen-flow-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.gen-flow-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-subtle);
    border-radius: var(--radius);
    color: var(--accent);
}

.gen-flow-card strong { font-size: 13px; font-weight: 600; }
.gen-flow-card span { font-size: 11px; color: var(--text-secondary); }

/* --- Design Set Cards (TheBrief-style) --- */
.create-sets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.create-set-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font: inherit;
    color: var(--text-primary);
    text-align: left;
    overflow: hidden;
    transition: all var(--transition);
}
.create-set-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.create-set-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-secondary);
    min-height: 90px;
}

.create-set-mini {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4px 5px;
    gap: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.mini-line {
    height: 3px;
    background: var(--text-muted);
    border-radius: 1px;
    opacity: 0.35;
}
.mini-line.short { opacity: 0.25; }
.mini-block {
    width: 40%;
    height: 5px;
    background: var(--accent);
    border-radius: 1px;
    margin-top: 1px;
}

.create-set-info {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.create-set-info strong { font-size: 13px; font-weight: 600; }
.create-set-info span { font-size: 11px; color: var(--text-muted); }

/* --- Size Cards (TheBrief-style grid) --- */
.create-sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 10px;
}

.create-size-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font: inherit;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
    transition: all var(--transition);
    padding-bottom: 10px;
}
.create-size-card:hover { border-color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.create-size-card.selected { border-color: var(--accent); background: var(--accent-subtle); }

.create-size-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80px;
    padding: 12px 8px;
    background: var(--bg-secondary);
}
.create-size-card.selected .create-size-preview { background: rgba(99,102,241,0.06); }

.create-size-artboard {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 4px 5px;
    gap: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.create-size-card.selected .create-size-artboard { border-color: var(--accent); }

.create-size-label {
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    padding: 0 6px;
    line-height: 1.3;
}

.create-size-dims {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* --- Custom Size Form --- */
.custom-size-form {
    display: flex;
    align-items: end;
    gap: 8px;
    flex-wrap: wrap;
}

.custom-size-form label {
    font-size: 11px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.custom-size-form .input { width: 100px; }

.size-separator {
    color: var(--text-muted);
    padding-bottom: 8px;
    font-size: 16px;
}

/* --- Discover / Templates Gallery --- */
.templates-gallery,
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

/* template-card styles in templates page section below */

.template-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-card-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.template-card-info strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.template-card-info span {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

/* --- Nav Create Button Special Style ---
   Create is a CTA, not a destination, so it never carries the `.active`
   "selected" state. Accent-colored icon+label on a TRANSPARENT rest bg
   signals "primary action" without looking permanently selected (the old
   permanent --accent-subtle fill made it look always-active). Hover fills
   with the solid accent. */
.nav-item-create {
    color: var(--accent) !important;
    background: none !important;
}

.nav-item-create:hover {
    background: var(--accent) !important;
    color: #fff !important;
}

/* ============================================
   Brand Kit Editor Page
   ============================================ */
.brand-kit-page {
    max-width: 900px; margin: 0 auto; padding: 32px 24px;
}
.page-header {
    display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap;
}
.page-header h1 { font-size: 24px; font-weight: 700; margin: 0; flex: 1; }
.page-subtitle { font-size: 14px; color: var(--text-secondary); width: 100%; margin-top: -8px; }
/* Shown in place of "+ New Brand Kit" when the project already has its one kit. */
.brand-kit-onelimit { font-size: 12.5px; color: var(--text-secondary, #6b7280); background: var(--bg-secondary, #f3f4f6); border: 1px solid var(--border-subtle, #e5e7eb); border-radius: 8px; padding: 8px 12px; }
.brand-kit-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px;
}
.brand-kit-card {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 10px; padding: 16px; cursor: pointer;
    transition: all var(--transition);
}
.brand-kit-card:hover { border-color: var(--accent); box-shadow: 0 2px 12px rgba(0,0,0,0.08); transform: translateY(-2px); }
/* Logo strip — only renders when kit.logos.primary is set. Background
   tracks the kit's own background color so white-on-white logos still
   read. Aspect-ratio gives the strip a consistent height across cards
   regardless of logo dimensions; the image inside is contain-fit so
   wide AND square logos both display without cropping. */
.brand-kit-logo-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 6;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.brand-kit-logo-img {
    max-width: 75%;
    max-height: 75%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* Disable browser image dragging on the card so the parent
       card's click-to-edit handler always fires. */
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}
.brand-kit-swatches { display: flex; gap: 6px; margin-bottom: 12px; }
.brand-swatch-mini {
    width: 32px; height: 32px; border-radius: 6px;
    border: 2px solid var(--border);
}
.brand-kit-info h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.brand-kit-date { font-size: 11px; color: var(--text-muted); }
.brand-kit-actions { display: flex; gap: 8px; margin-top: 12px; }
.brand-kit-name-input { font-size: 18px; font-weight: 600; border: none; }
.brand-editor-section {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 10px; padding: 20px; margin-bottom: 16px;
}
.brand-editor-section h3 {
    font-size: 14px; font-weight: 600; margin: 0 0 16px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.brand-colors-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px;
}
.brand-color-item { display: flex; flex-direction: column; gap: 4px; }
.brand-color-item label { font-size: 11px; font-weight: 500; color: var(--text-secondary); text-transform: capitalize; }
.brand-color-picker {
    width: 48px; height: 32px; border: 1px solid var(--border);
    border-radius: 6px; cursor: pointer; padding: 0;
}
.brand-color-hex { font-size: 11px; color: var(--text-muted); font-family: monospace; }
.brand-font-row {
    display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.brand-font-row label { min-width: 160px; font-size: 12px; color: var(--text-secondary); }
.brand-font-select { flex: 1; font-size: 13px; }
.brand-logos-grid { display: flex; gap: 16px; }
.brand-logo-box { display: flex; flex-direction: column; gap: 6px; }
.brand-logo-box label { font-size: 11px; font-weight: 500; color: var(--text-secondary); text-transform: capitalize; }
.brand-logo-preview {
    width: 120px; height: 80px; border: 2px dashed var(--border);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; overflow: hidden; background: var(--bg-tertiary);
    transition: border-color var(--transition);
}
.brand-logo-preview:hover { border-color: var(--accent); }
.brand-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo-placeholder { font-size: 12px; color: var(--text-muted); }
.brand-voice-textarea {
    width: 100%; height: 80px; resize: vertical; margin-top: 6px;
    font-size: 13px; padding: 8px; border-radius: 6px;
}
.brand-elements-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 12px;
    border-radius: 10px;
    padding: 8px;
    margin: -8px;
    transition: background 0.12s, box-shadow 0.12s;
}
/* Drag-over on the elements grid — subtle accent wash so the user
   knows the WHOLE grid is a drop zone (not just the + tile). The
   negative margin above keeps it from shifting layout when active. */
.brand-elements-grid.is-drag-active {
    background: var(--accent-subtle);
    box-shadow: 0 0 0 2px var(--accent) inset;
}
.brand-element-card {
    position: relative; width: 100%; aspect-ratio: 1; border: 2px dashed var(--border);
    border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; overflow: hidden; background: var(--bg-tertiary); transition: border-color var(--transition);
}
.brand-element-card:hover { border-color: var(--accent); }
.brand-element-card img { max-width: 90%; max-height: 70%; object-fit: contain; }
.brand-element-name { font-size: 10px; color: var(--text-muted); margin-top: 4px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90%; }
.brand-element-remove {
    position: absolute; top: 4px; right: 4px; width: 18px; height: 18px;
    border-radius: 50%; border: none; background: rgba(0,0,0,0.5); color: #fff;
    font-size: 12px; cursor: pointer; display: none; align-items: center; justify-content: center; line-height: 1;
}
.brand-element-card:hover .brand-element-remove { display: flex; }
.brand-element-add { border-style: dashed; }
/* The add tile's hint wrapped flush-left against the dashed border (QA 2026-11-08) — centre + pad it. */
.brand-element-add .brand-logo-placeholder { text-align: center; padding: 0 8px; line-height: 1.4; }

/* ============================================
   Templates Page
   ============================================ */
.templates-page {
    /* 1320 content column per the standing rule (CLAUDE.md / #96 — 1100 is an explicitly
       forbidden ad-hoc cap). Every grid here is auto-fill/minmax, so the wider column just
       reflows to more templates per row; nothing has a fixed 1100-based width. */
    max-width: 1320px; margin: 0 auto; padding: 32px 24px;
}
.templates-filter-bar {
    display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.templates-filter-btn {
    font-size: 12px; padding: 6px 16px;
    border: 1px solid var(--border); border-radius: 20px;
    background: var(--bg-secondary); color: var(--text-primary);
    cursor: pointer; transition: all var(--transition);
}
.templates-filter-btn.active, .templates-filter-btn:hover {
    border-color: var(--accent); color: var(--accent); background: rgba(108,92,231,0.05);
}
.templates-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 16px;
}
.template-card {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: 10px; overflow: hidden; cursor: pointer;
    transition: all var(--transition);
}
.template-card:hover { border-color: var(--accent); box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.template-card-thumb {
    height: 160px; background: var(--bg-tertiary);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.template-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.template-card-thumb .template-placeholder {
    font-size: 36px; opacity: 0.3;
}
.template-card-info { padding: 12px 14px; }
.template-card-info h3 { font-size: 13px; font-weight: 600; margin: 0 0 4px; }
.template-card-info p { font-size: 11px; color: var(--text-muted); margin: 0 0 6px; }
.template-card-meta {
    display: flex; gap: 8px; font-size: 10px; color: var(--text-muted);
}
.template-card-meta .badge {
    font-size: 10px; padding: 2px 8px;
}

/* ============================================
   Template Step (in Create Modal)
   ============================================ */
.tpl-step-fullwidth {
    flex: 1;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tpl-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px 0;
    flex-shrink: 0;
}

.tpl-step-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius);
    flex-shrink: 0;
    transition: all var(--transition);
}
.tpl-step-back:hover { background: var(--bg-hover); color: var(--text-primary); }

.tpl-step-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.tpl-step-breadcrumb {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.tpl-step-search-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 5px 10px;
    max-width: 260px;
    color: var(--text-muted);
    margin-left: auto;
}
.tpl-step-search-input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font: inherit;
    font-size: 13px;
    color: var(--text-primary);
    min-width: 0;
}
.tpl-step-search-input::placeholder { color: var(--text-muted); }

/* Category tabs */
.tpl-step-tabs {
    display: flex;
    gap: 0;
    padding: 12px 20px 0;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    flex-shrink: 0;
}
.tpl-step-tabs::-webkit-scrollbar { height: 0; }

.tpl-step-tab {
    padding: 8px 16px;
    border: none;
    background: none;
    font: inherit;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
}
.tpl-step-tab:hover { color: var(--text-primary); }
.tpl-step-tab.active {
    color: var(--text-primary);
    font-weight: 600;
    border-bottom-color: var(--text-primary);
}

/* Grid area */
.tpl-step-grid-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 20px;
}

.tpl-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr));
    gap: 14px;
}

.tpl-step-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.tpl-step-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Template cards */
.tpl-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font: inherit;
    color: var(--text-primary);
    text-align: left;
    overflow: hidden;
    transition: all var(--transition);
}
.tpl-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.tpl-card-thumb {
    height: 150px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.tpl-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tpl-card-thumb-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.tpl-card-blank-thumb {
    background: var(--bg-tertiary);
    color: var(--text-muted);
}
.tpl-card-blank-thumb svg {
    opacity: 0.4;
}
.tpl-card-blank:hover .tpl-card-blank-thumb {
    background: var(--accent-subtle);
    color: var(--accent);
}
.tpl-card-blank:hover .tpl-card-blank-thumb svg {
    opacity: 0.8;
}

.tpl-card-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tpl-card-info strong {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tpl-card-info span {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Skeleton Loading States --- */
@keyframes skeleton-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton-pulse {
    background: linear-gradient(90deg, var(--bg-tertiary, #e8e8ec) 25%, var(--bg-hover, #f0f0f4) 37%, var(--bg-tertiary, #e8e8ec) 63%);
    background-size: 200px 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
}
.skeleton-card {
    pointer-events: none;
}
.skeleton-thumb {
    height: 140px;
    border-radius: 8px 8px 0 0;
}
.skeleton-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.skeleton-line {
    height: 12px;
    border-radius: 6px;
}
.skeleton-line.short {
    height: 10px;
}
.skeleton-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
}
.skeleton-row {
    height: 48px;
    border-radius: 8px;
}

/* --- Home: Latest generations strip ---
 * Grid of up to 20 thumbnails directly under the 3 hero cards. Click a
 * tile to jump to the full Library page (richer details + actions live
 * there; this strip is just at-a-glance "what did I make recently"). */
.home-latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    min-height: 80px;
}
.home-latest-tile {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.home-latest-tile:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.home-latest-tile img,
.home-latest-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;       /* let the parent button capture clicks */
}
/* Tiny play-glyph badge in the corner of video tiles so the user knows
 * it's a video, not a still. Library has the full hover-to-play UX —
 * this is just an at-a-glance indicator. */
.home-latest-tile--video {
    position: relative;
}
.home-latest-tile--video::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><polygon points='9 7 9 17 17 12'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
    pointer-events: none;
}
.home-latest-empty {
    grid-column: 1 / -1;
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

/* --- "Create from URL" modal --- */
.url-entry-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}
.url-entry-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
.modal-helper-text {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================================================
 * Brand Kit v2 — semantic-role colors + dual-font cards + product slot.
 *
 * Visual language inspired by the dark-card reference: rounded color
 * circles, source-mode toggle pill, dual font cards with weight controls,
 * AA badges per contrast-relevant role, AA/Aa/aa preview row.
 *
 * Classes are namespaced with `-v2` where the old `.brand-color-item`
 * etc. could collide. Old classes are kept above untouched so legacy
 * kits + any read-only consumers keep working.
 * ==========================================================================*/

/* Light-theme palette. Everything below maps explicitly to the app's
   light theme tokens (--bg-secondary = white, --text-primary = dark
   navy). The previous version assumed a dark theme via fallbacks like
   var(--text, #e8e9ee), which rendered light-gray text on white. */
.brand-section-v2 {
    padding: 22px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    margin-bottom: 18px;
    color: var(--text-primary);
}
.brand-section-v2 .brand-section-title {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 600;
}
.brand-section-v2 h3.brand-section-title {
    margin-bottom: 6px;
}
.brand-section-v2 .brand-section-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 16px;
    line-height: 1.5;
}
.brand-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.brand-section-status {
    font-size: 12px;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---- Colors: source-mode toggle pill -------------------------------------- */
.brand-color-mode-row {
    display: inline-flex;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
    margin-bottom: 8px;
}
.brand-color-mode-btn {
    background: transparent;
    border: 0;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 999px;
    font-weight: 500;
    transition: background 0.12s, color 0.12s;
    font-family: inherit;
}
.brand-color-mode-btn:hover { color: var(--text-primary); }
.brand-color-mode-btn.is-active {
    background: linear-gradient(135deg, #5B53E8, #8b5cf6);
    color: #fff;
    box-shadow: 0 1px 2px rgba(99, 102, 241, 0.3);
}
.brand-color-mode-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.5;
}
.brand-color-mode-hint::before {
    content: '✨';
    color: var(--accent);
}

/* ---- Colors: swatch grid -------------------------------------------------- */
.brand-colors-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    gap: 18px 14px;
}
.brand-swatch-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.brand-swatch {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 0 0 2px rgba(255, 255, 255, 0.5);
    transition: transform 0.12s, box-shadow 0.12s;
}
.brand-swatch:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12), inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}
.brand-swatch-input {
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    border-radius: 50%;
}
/* Hex input — was a clickable label, now an editable text field. Users
   can paste #RRGGBB / RRGGBB / 3-char shorthand straight in. Width is
   fixed at 8 chars + padding so the field doesn't reflow as the user
   types. Tabular numerics keep digit columns aligned. */
.brand-swatch-hex {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    width: 78px;
    text-align: center;
    text-transform: uppercase;
    outline: none;
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.brand-swatch-hex:hover {
    border-color: var(--text-secondary);
}
.brand-swatch-hex:focus {
    border-color: var(--accent, #5B53E8);
    background: #fff;
    box-shadow: var(--focus-ring);
}
.brand-swatch-hex.is-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
    animation: brand-swatch-shake 0.4s ease;
}
@keyframes brand-swatch-shake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-3px); }
    40%      { transform: translateX(3px); }
    60%      { transform: translateX(-2px); }
    80%      { transform: translateX(2px); }
}

/* Recent-colors strip — last 8 colors picked anywhere in this brand kit.
   Shown under each swatch as a 1-click "apply this shade to this role"
   shortcut. Tiny circles, gridded so the row stays compact. */
.brand-swatch-recent {
    display: flex;
    gap: 3px;
    margin-top: 4px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90px;
}
.brand-swatch-recent-chip {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s, box-shadow 0.12s;
}
.brand-swatch-recent-chip:hover {
    transform: scale(1.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.25);
}
.brand-swatch-name {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}
.brand-swatch-badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    line-height: 1.5;
}
.brand-swatch-badge.is-aa       { color: #047857; background: #d1fae5; }
.brand-swatch-badge.is-aa-large { color: #92400e; background: #fef3c7; }
.brand-swatch-badge.is-fail     { color: #b91c1c; background: #fee2e2; }

/* ---- Typography: dual cards ---------------------------------------------- */
.brand-typo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 14px;
}
.brand-typo-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 16px;
    position: relative;
}
.brand-typo-card-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.06em;
    margin-bottom: 6px;
    font-weight: 600;
}
/* Visible font-family picker. Was effectively an invisible <select>
   overlaid on a plain-text label — users couldn't tell it was clickable.
   Now it reads as a proper form field: bordered, hover-lifted, with a
   real chevron icon. The previewed font is rendered IN ITS OWN FAMILY,
   so eyeballing whether "Inter" looks right happens before opening the
   dropdown. */
.brand-typo-family-display {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 500;
    margin: 8px 0 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1.5px solid var(--border-subtle);
    border-radius: 10px;
    line-height: 1.2;
    position: relative;        /* anchor for the floating "Family" label */
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.brand-typo-family-display:hover {
    border-color: var(--accent, #5B53E8);
    background: rgba(99, 102, 241, 0.03);
}
.brand-typo-family-display:focus-within,
.brand-typo-card:focus-within .brand-typo-family-display {
    border-color: var(--accent, #5B53E8);
    box-shadow: var(--focus-ring);
}
/* Tiny prefix label so the user knows what this field IS without
   having to read the surrounding "Heading Font" header. Mirrors the
   form-field convention used in the rest of the editor. */
.brand-typo-family-display::before {
    content: 'Family';
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    position: absolute;
    top: -8px;
    left: 12px;
    background: var(--bg-tertiary);
    padding: 0 6px;
}
/* Real chevron — SVG-as-content gets clearer rendering across systems
   than the unicode glyph the old "⌄" emitted. */
.brand-typo-family-display::after {
    content: '';
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    background-color: var(--text-muted);
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M7 10l5 5 5-5z'/></svg>") no-repeat center / contain;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M7 10l5 5 5-5z'/></svg>") no-repeat center / contain;
    transition: background-color 0.15s ease;
}
.brand-typo-family-display:hover::after { background-color: var(--accent, #5B53E8); }

/* The real <select> is overlaid for accessibility (keyboard nav + screen
   readers). Click-target stays the visible field above; the select catches
   the click and opens the OS dropdown so the user gets native font scroll
   + search. */
.brand-typo-family-select {
    position: absolute;
    inset: 38px 0 auto 0;
    width: 100%;
    height: 48px;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.brand-typo-source {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.brand-typo-weights-row {
    display: flex;
    gap: 14px;
    margin: 8px 0 12px;
    flex-wrap: wrap;
}
.brand-typo-weight-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.brand-typo-weight-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}
.brand-typo-weight-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.brand-typo-weight-select:hover { border-color: var(--accent); }
.brand-typo-ai-match {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.brand-typo-ai-match-stub {
    color: var(--text-muted);
    font-style: italic;
}
.brand-typo-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
    margin-top: 12px;
    gap: 8px;
}
.brand-typo-upload-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: all 0.12s;
}
.brand-typo-upload-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-subtle);
}
.brand-typo-preview-row {
    display: inline-flex;
    gap: 4px;
}
.brand-typo-preview-letter {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 5px;
    line-height: 1;
    min-width: 28px;
    text-align: center;
    border: 1px solid var(--border-subtle);
}

/* ---- Logo + Product slots ------------------------------------------------ */
.brand-logo-product-section {
    padding-top: 14px;
}
.brand-logo-product-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.brand-logo-product-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.brand-logo-product-head {
    display: flex;
    align-items: center;
    gap: 6px;
}
.brand-upload-slot {
    background: var(--bg-tertiary);
    border: 1px dashed var(--border);
    border-radius: 10px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    overflow: hidden;
}
.brand-upload-slot:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}
/* Keyboard focus — slot is tabbable so users can tab → paste. The
   ring is the same accent color but slightly more saturated so it
   reads as "active drop/paste target" vs the hover state. */
.brand-upload-slot:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
/* Drag-over — solid accent border + faint tint so the user knows
   the file is going to land in THIS slot when they let go. */
.brand-upload-slot.is-drag-active {
    border-style: solid;
    border-color: var(--accent);
    background: var(--accent-subtle);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}
.brand-upload-slot-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}
.brand-upload-slot-placeholder {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Multi-logo gallery (big default preview + thumbnail strip) ───────────── */
.brand-logo-gallery { display: flex; flex-direction: column; gap: 14px; }

/* Big default-logo preview — deliberately large so the brand mark is easy to
   read at a glance. */
.brand-logo-default {
    position: relative;
    min-height: 180px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}
.brand-logo-default.is-empty { border-style: dashed; }
.brand-logo-default-img { max-width: 90%; max-height: 150px; object-fit: contain; display: block; }
.brand-logo-default-badge {
    position: absolute; top: 10px; left: 10px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: #fff; background: var(--accent); border-radius: 6px; padding: 3px 8px;
}
.brand-logo-default-empty { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* Thumbnail strip — every logo + the add tile. */
.brand-logo-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-logo-tile {
    position: relative;
    width: 96px; height: 80px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-tertiary);
    display: flex; align-items: center; justify-content: center;
    padding: 8px; overflow: hidden;
}
.brand-logo-tile.is-default { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.brand-logo-tile-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.brand-logo-tile-badge {
    position: absolute; bottom: 4px; left: 4px;
    font-size: 9px; font-weight: 700; color: #fff; background: var(--accent);
    border-radius: 5px; padding: 2px 5px;
}
/* "Set default" appears on hover for non-default tiles. */
.brand-logo-tile-setdefault {
    position: absolute; inset: 0;
    border: none; background: rgba(15, 23, 42, 0.62); color: #fff;
    font-size: 11px; font-weight: 600; cursor: pointer;
    opacity: 0; transition: opacity 0.12s;
}
.brand-logo-tile:hover .brand-logo-tile-setdefault { opacity: 1; }
.brand-logo-tile-remove {
    position: absolute; top: 3px; right: 3px;
    width: 18px; height: 18px; border-radius: 50%;
    border: none; background: rgba(15, 23, 42, 0.55); color: #fff;
    font-size: 13px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.12s; z-index: 2;
}
.brand-logo-tile:hover .brand-logo-tile-remove { opacity: 1; }
.brand-logo-tile-remove:hover { background: var(--danger, #dc2626); }

/* Add tile. */
.brand-logo-add {
    width: 96px; height: 80px;
    border: 1px dashed var(--border); border-radius: 10px;
    background: var(--bg-tertiary);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    cursor: pointer; color: var(--text-muted);
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.brand-logo-add:hover, .brand-logo-add:focus, .brand-logo-add.is-drag-active {
    outline: none; border-color: var(--accent); background: var(--accent-subtle); color: var(--accent);
}
.brand-logo-add-plus { font-size: 22px; font-weight: 300; line-height: 1; }
.brand-logo-add-label { font-size: 11px; font-weight: 600; }
.brand-include-toggle {
    display: inline-flex;
    margin-top: 10px;   /* sat flush under the Add-logo tile with no gap (QA 2026-11-08) */
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    user-select: none;
    padding: 8px 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: var(--bg-tertiary);
    transition: all 0.12s;
}
.brand-include-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-subtle);
}
.brand-include-toggle input { cursor: pointer; }
.brand-product-name-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
}
.brand-product-name-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-subtle);
}
.brand-product-name-input::placeholder {
    color: var(--text-muted);
}

/* ---- Commerce — standard-CTA list ----------------------------------- */
.brand-cta-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.brand-cta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-cta-row .brand-product-name-input {
    flex: 1 1 auto;
}
.brand-cta-row .btn-sm {
    flex: 0 0 auto;
    width: 30px;
    padding: 0;
    line-height: 1;
    font-size: 16px;
}

/* ---- New: sticky save bar + dirty indicator + live preview --------------- */
.brand-kit-page--editor {
    /* Reserve room at the bottom so the sticky save bar doesn't cover content. */
    padding-bottom: 96px;
}
.brand-editor-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-primary);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand-editor-savebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 20;
}
.brand-editor-savebar-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}
.brand-editor-dirty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    display: inline-block;
    margin-right: 4px;
}
.brand-editor-saved {
    color: var(--text-muted);
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.brand-editor-saved::before {
    content: '✓';
    color: #10b981;
    font-weight: 700;
}
.brand-editor-savebar-actions {
    display: flex;
    gap: 8px;
}

/* Live preview card — sits at the top of the editor so the user can see
   how their color + font choices look applied to a sample ad-styled
   card. Updates live as colors and fonts change. */
.brand-preview-card {
    border-radius: 12px;
    padding: 28px 24px;
    margin-bottom: 18px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    transition: background 0.18s, color 0.18s;
}
.brand-preview-card__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
    position: absolute;
    top: 12px;
    left: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.65);
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}
.brand-preview-card__h1 {
    font-size: 28px;
    line-height: 1.15;
    margin: 14px 0 6px;
    font-weight: 700;
}
.brand-preview-card__body {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 14px;
    max-width: 36ch;
}
.brand-preview-card__cta {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: 0;
    cursor: default;
}
.brand-preview-card__logo {
    position: absolute;
    top: 16px;
    right: 16px;
    max-height: 32px;
    max-width: 120px;
    object-fit: contain;
}

/* ════════════════════════════════════════════════════════════════════════════
   Brand Kits — Shopify-style redesign (standalone #brand-kits page). .bk-*
   ════════════════════════════════════════════════════════════════════════════ */
.bk-page { max-width: 1320px; margin: 0 auto; padding: 8px 4px 80px; }
@media (max-width: 640px) { .bk-page { padding: 8px 14px 60px; } }
.bk-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 8px 4px 0; }
.bk-page-title { font-size: 30px; font-weight: 800; margin: 0 0 6px; color: var(--text-strong, #111827); letter-spacing: -0.5px; }
.bk-page-sub { font-size: 14px; color: var(--text-muted, #6b7280); margin: 0; }
.bk-new-btn { flex-shrink: 0; }
/* Two header actions now (build-from-store + blank), so they need a row of their
   own that wraps rather than squeezing the title on a narrow viewport. */
.bk-head-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
@media (max-width: 640px) {
    .bk-head-btns { width: 100%; justify-content: flex-start; }
    /* Stack title over the buttons: side by side they ran ~80px off a 390px screen (QA 2026-11-08). */
    .bk-page-head { flex-direction: column; align-items: stretch; }
}

.bk-banner {
    display: flex; align-items: center; gap: 11px;
    background: #f6f7fb; border: 1px solid var(--border-color, #e7e8ee); border-radius: 14px;
    padding: 13px 18px; margin: 22px 4px 26px; font-size: 13.5px; color: var(--text-muted, #5b6273);
}
.bk-banner svg { color: var(--text-faint, #9aa1ad); flex-shrink: 0; }
.bk-banner strong { color: var(--text-strong, #1f2430); font-weight: 650; }

.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 22px; padding: 0 4px; }
.bk-card {
    background: #fff; border: 1px solid var(--border-color, #e7e8ee); border-radius: var(--card-radius); padding: 18px;
    transition: box-shadow .15s, border-color .15s, transform .15s;
}
.bk-card:hover { box-shadow: 0 8px 26px rgba(16,24,40,.09); transform: translateY(-2px); }
.bk-card-current { border-color: #c3bdf6; box-shadow: 0 0 0 3px rgba(139,124,246,.12); }

.bk-preview {
    position: relative; height: 150px; border-radius: 13px; display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 16px;
}
.bk-preview-logo { max-width: 78%; max-height: 64%; object-fit: contain; }
/* Catalog-template preview: the rendered sample fills the preview box, contained
   (whole design visible, true aspect — "as seen in the canvas") + clipped by the
   preview's overflow:hidden + radius. */
.bk-preview-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bk-initials { font-size: 52px; font-weight: 800; letter-spacing: -1px; }
.bk-current {
    position: absolute; top: 12px; right: 12px; font-size: 11.5px; font-weight: 700;
    background: #5B53E8; color: #fff; border-radius: 999px; padding: 4px 11px;
}

.bk-swatches { display: flex; gap: 9px; margin-bottom: 16px; }
.bk-swatch { width: 42px; height: 42px; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }

.bk-font { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid var(--border-color, #eef0f4); margin-bottom: 14px; }
.bk-font-ag {
    width: 40px; height: 40px; border-radius: 9px; border: 1px solid var(--border-color, #e7e8ee);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: var(--text-strong, #1f2430); flex-shrink: 0;
}
.bk-font-name { font-size: 14px; font-weight: 600; color: var(--text-strong, #1f2430); }
.bk-font-use { font-size: 12px; color: var(--text-muted, #9aa1ad); margin-top: 1px; }

.bk-foot .bk-name { font-size: 17px; font-weight: 700; margin: 0 0 5px; color: var(--text-strong, #111827); }
.bk-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.bk-date { font-size: 12.5px; color: var(--text-muted, #9aa1ad); }
.bk-meta-dot { color: var(--text-faint, #c5cad3); }
.bk-meta select { font-size: 12.5px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border-color, #e5e7eb); background: #fff; color: var(--text-muted, #6b7280); }
.bk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bk-act { font-size: 13.5px; font-weight: 600; padding: 9px 0; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
.bk-act-edit { background: #eef0fe; color: #5b5bd6; }
.bk-act-edit:hover { background: #e3e6fd; }
.bk-act-del { background: #fdeeee; color: #d05a5a; }
.bk-act-del:hover { background: #fbe2e2; }

/* Empty state */
.bk-empty { max-width: 720px; margin: 30px auto 0; text-align: center; padding: 0 16px; }
.bk-empty-cardwrap { position: relative; width: 360px; margin: 0 auto 36px; }
.bk-empty-plus {
    position: absolute; top: -14px; right: -14px; z-index: 2; width: 46px; height: 46px; border-radius: 13px;
    background: #5B53E8; color: #fff; border: 3px solid var(--bg-app, #f3f4f6); cursor: pointer;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(99,102,241,.4);
}
.bk-empty-plus:hover { background: #5457e3; }
.bk-empty-card { background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 20px 50px rgba(16,24,40,.13); text-align: left; }
.bk-empty-card > .bk-empty-logo {
    display: flex; align-items: center; justify-content: center; gap: 10px; height: 120px;
    background: linear-gradient(135deg, #eef0fe, #f7f8ff); border: 1px solid #eceef6; border-radius: 13px; margin-bottom: 16px;
    font-size: 26px; font-weight: 700; color: #1f2430;
}
.bk-empty-swatches { display: flex; gap: 9px; margin-bottom: 16px; }
.bk-empty-swatches span { width: 42px; height: 42px; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.bk-empty-font { display: flex; align-items: center; gap: 11px; }
.bk-empty-font b { width: 40px; height: 40px; border-radius: 9px; border: 1px solid #e7e8ee; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.bk-empty-font span { font-size: 14px; color: #5b6273; }
.bk-empty-title { font-size: 27px; font-weight: 800; margin: 0 0 14px; color: var(--text-strong, #111827); }
.bk-empty-desc { font-size: 15px; line-height: 1.6; color: var(--text-muted, #6b7280); max-width: 520px; margin: 0 auto 28px; }
.bk-empty-ctas { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.bk-empty-cta { font-size: 15px; padding: 12px 26px; border-radius: 13px; }
.bk-empty-cta2 { font-size: 15px; padding: 12px 22px; border-radius: 13px; }
.bk-empty-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 52px; }
.bk-feat { background: #fff; border: 1px solid var(--border-color, #ececf1); border-radius: 14px; padding: 20px 18px; text-align: center; }
.bk-feat-ico { width: 42px; height: 42px; margin: 0 auto 12px; border-radius: 11px; background: #eef0fe; color: #5B53E8; display: flex; align-items: center; justify-content: center; }
.bk-feat h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: var(--text-strong, #1f2430); }
.bk-feat p { font-size: 13px; line-height: 1.5; color: var(--text-muted, #9aa1ad); margin: 0; }

@media (max-width: 720px) { .bk-empty-feats { grid-template-columns: 1fr; } .bk-empty-cardwrap { width: 100%; } }

/* Catalog-templates empty state — the sample card's product mockup (lives inside
   the shared .bk-empty-card so layout/alignment match the Brand Kits empty state). */
.ct-empty-shot {
    position: relative; height: 130px; border-radius: 12px; margin-bottom: 14px;
    background: linear-gradient(135deg, #eef0f7, #e3e6f2);
    display: flex; align-items: center; justify-content: center; color: #646B78;
}
.ct-empty-badge {
    position: absolute; top: 10px; left: 10px;
    background: #e11d48; color: #fff; font-size: 11px; font-weight: 800;
    padding: 3px 8px; border-radius: 999px; letter-spacing: .3px;
}
.ct-empty-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ct-empty-line { display: block; flex: 1; height: 10px; border-radius: 6px; background: #e7e9f1; }
.ct-empty-price { font-weight: 800; font-size: 15px; color: #111827; }

/* Video-template chip on the templates-list card preview (kind='video'). */
.ct-kind-badge {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    display: inline-flex; align-items: center;
    background: rgba(17, 24, 39, 0.78); color: #fff;
    font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
    padding: 3px 8px; border-radius: 999px; pointer-events: none;
}

/* ── "Your designs" strip — the way back to a canvas design (the legacy list is hidden) ── */
.dashboard-designs .section-header { align-items: baseline; }
.home-designs-count { font-size: 12.5px; color: #6b7280; }
.home-designs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.home-design-tile { display: flex; flex-direction: column; min-width: 0; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; overflow: hidden; }
.home-design-thumb { display: block; aspect-ratio: 4 / 3; background: #f3f4f6; overflow: hidden; }
.home-design-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-design-thumb__ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 12px; color: #646B78; }
.home-design-meta { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; min-width: 0; }
.home-design-name { font-size: 13.5px; font-weight: 600; color: #1f2430; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-design-name:hover { color: var(--accent, #5B53E8); }
.home-design-sub { font-size: 11.5px; color: #6b7280; }
.home-design-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.home-design-actions .btn { padding: 5px 10px; font-size: 12px; }
.home-design-del.is-armed { color: #B3261E; }
.home-design-rename { font: inherit; font-size: 13.5px; font-weight: 600; padding: 3px 6px; border: 1px solid #c7cbd1; border-radius: 6px; min-width: 0; width: 100%; }
.home-designs-empty { font-size: 12.5px; color: #9A6B0E; padding: 10px 12px; border-radius: 9px; background: #FBF1DC; }

/* ── Getting-started guide (js/dashboard/getting-started.js) ─────────────────────────────── */
.gs-host:empty { display: none; }
.gs-host { margin-bottom: 28px; }
.gs-card { background: #fff; border: 1px solid #E9EAEE; border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(20, 23, 31, 0.03); animation: gs-in .18s ease; }
@keyframes gs-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.gs-title { margin: 0; font-size: 16px; font-weight: 700; color: #14171F; letter-spacing: -0.2px; }
.gs-sub { margin: 3px 0 0; font-size: 12.5px; line-height: 1.5; color: #5B6473; }
.gs-head { display: flex; align-items: flex-start; gap: 14px; }
.gs-head__txt { flex: 1; min-width: 0; }
.gs-head__tools { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.gs-credits { font-size: 12px; font-weight: 600; color: #4A43D6; background: #F4F3FE; border: 1px solid #E6E3FB; border-radius: 999px; padding: 4px 10px; text-decoration: none; white-space: nowrap; }
.gs-credits.is-low { color: #B45309; background: #FFFBF0; border-color: #F5E6BE; }
.gs-link { background: none; border: none; padding: 4px 2px; font: inherit; font-size: 12.5px; font-weight: 600; color: #6B7280; cursor: pointer; }
.gs-link:hover { color: #3B414C; }
.gs-bar { height: 6px; border-radius: 999px; background: #EEEDFC; margin: 14px 0 6px; overflow: hidden; }
.gs-bar > span { display: block; height: 100%; border-radius: inherit; background: #5B53E8; transition: width .3s ease; }

.gs-steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.gs-step { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 10px; }
.gs-step + .gs-step { border-top: 1px solid #F2F3F5; }
.gs-step.is-next { background: #F7F6FE; border-top-color: transparent; }
.gs-step.is-next + .gs-step { border-top-color: transparent; }
.gs-step__mark { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #6B7280; background: #F4F5F7; }
.gs-step.is-next .gs-step__mark { color: #fff; background: #5B53E8; }
.gs-step.is-done .gs-step__mark { color: #15803D; background: #DCFCE7; }
.gs-step__txt { flex: 1; min-width: 0; }
.gs-step__title { font-size: 13.5px; font-weight: 600; color: #14171F; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gs-step.is-done .gs-step__title { color: #6B7280; font-weight: 500; }
.gs-step__why { margin-top: 2px; font-size: 12px; line-height: 1.45; color: #5B6473; }
.gs-step__ok { flex: 0 0 auto; font-size: 12px; font-weight: 600; color: #15803D; }
.gs-tag { font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #6B7280; background: #F4F5F7; border-radius: 5px; padding: 1px 6px; }

.gs-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; font-weight: 600; color: #3B414C; background: #fff; border: 1px solid #E2E4EA; border-radius: 9px; padding: 7px 12px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s, color .12s; }
.gs-btn:hover { border-color: #C7C3F5; color: #14171F; }
.gs-btn--primary { color: #fff; background: #5B53E8; border-color: #5B53E8; }
.gs-btn--primary:hover { color: #fff; background: #4A43D6; border-color: #4A43D6; }
.gs-btn:focus-visible, .gs-link:focus-visible, .gs-resume:focus-visible, .gs-credits:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(91, 83, 232, 0.25); }

.gs-welcome, .gs-done { display: flex; align-items: center; gap: 16px; }
.gs-welcome { background: linear-gradient(180deg, #FBFAFF 0%, #fff 100%); border-color: #E6E3FB; }
.gs-welcome__ico, .gs-done__ico { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; color: #5B53E8; background: #EEEDFC; }
.gs-done__ico { color: #15803D; background: #DCFCE7; }
.gs-welcome__txt, .gs-done__txt { flex: 1; min-width: 0; }

.gs-resume { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 12.5px; font-weight: 500; color: #3B414C; background: #fff; border: 1px solid #E9EAEE; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.gs-resume:hover { border-color: #C7C3F5; }
.gs-resume__dot { width: 7px; height: 7px; border-radius: 50%; background: #5B53E8; }
.gs-resume__show { font-weight: 700; color: #5B53E8; }

@media (max-width: 640px) {
    .gs-card { padding: 16px; }
    .gs-head { flex-direction: column; gap: 8px; }
    .gs-step { flex-wrap: wrap; align-items: flex-start; }
    .gs-step__txt { flex: 1 1 calc(100% - 40px); }
    .gs-step .gs-btn, .gs-step__ok { margin-left: 38px; }
    .gs-welcome, .gs-done { flex-direction: column; align-items: flex-start; }
}

/* Phones: the kit name got squeezed to one word between "← Back" and the status pill — it takes its own full row
   (audit 2026-11-08). */
@media (max-width: 600px) {
    .brand-editor-header { flex-wrap: wrap; row-gap: 6px; }
    .brand-editor-header .brand-kit-name-input { order: 3; flex: 1 1 100% !important; min-width: 0; margin-left: 0 !important; padding-left: 0; }
    .brand-editor-header .brand-editor-saved { margin-left: auto; }
}
