/* Ported from valet-admin Theme Studio */
:root {
    --color-mist: #eef2f7;
    --color-line: #e2e8f0;
    --color-line-strong: #cbd5e1;
    --color-panel: #ffffff;
    --color-paper: #f5f7fa;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-accent: #0f9f8a;
    --color-accent-2: #0b7f6e;
    --color-accent-rgb: 15, 159, 138;
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] {
    --color-mist: #1a2333;
    --color-line: rgba(255, 255, 255, 0.08);
    --color-line-strong: rgba(255, 255, 255, 0.14);
    --color-panel: #141c2c;
    --color-paper: #0b1220;
    --color-text: #e8eef7;
    --color-muted: #94a3b8;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   Theme Studio (organization show)
   ========================================================= */

.theme-studio {
    display: grid;
    gap: 1.25rem;
}

.theme-presets-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.theme-presets-header .theme-picker__section-title {
    margin-bottom: 0;
}

.theme-preset-filters {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: var(--color-mist);
    border: 1px solid var(--color-line);
}

.theme-preset-filter {
    border: 0;
    background: transparent;
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
}

.theme-preset-filter.is-active {
    background: var(--color-panel);
    color: var(--color-accent-2);
    box-shadow: var(--shadow-soft);
}

.theme-preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.75rem;
}

.theme-preset-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-line-strong);
    border-radius: 14px;
    background: var(--color-panel);
    padding: 0;
    overflow: hidden;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.theme-preset-card:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--color-accent-rgb), 0.45);
}

.theme-preset-card.is-selected {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(var(--color-accent-rgb), 0.25);
}

.theme-preset-card__preview {
    position: relative;
    height: 72px;
    padding: 0.65rem;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.theme-preset-card__action {
    min-width: 34px;
    height: 28px;
    border-radius: 8px;
    display: inline-grid;
    place-items: center;
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.theme-preset-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.55rem 0.65rem 0.65rem;
    background: var(--color-panel);
}

.theme-preset-card__meta strong {
    font-size: 0.82rem;
    color: var(--color-text);
}

.theme-preset-card__meta em {
    font-style: normal;
    font-size: 0.7rem;
    color: var(--color-muted);
    font-weight: 600;
}

.theme-studio__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 1.25rem;
    align-items: start;
}

.theme-studio__preview {
    position: sticky;
    top: 88px;
    border: 1px solid var(--color-line);
    border-radius: 16px;
    background: var(--color-panel);
    padding: 1rem;
    box-shadow: var(--shadow-soft);
}

.theme-token-group + .theme-token-group {
    margin-top: 1.15rem;
}

.theme-token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 0.65rem;
}

.theme-token-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--color-line);
    border-radius: 12px;
    background: var(--color-panel);
}

.theme-token-field__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.theme-token-field__control {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.theme-color-input {
    width: 38px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--color-line-strong);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.theme-hex-input {
    flex: 1;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
}

.theme-preview-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.theme-preview-block {
    border-radius: 12px;
    padding: 0.75rem;
    min-height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.15rem;
    background: var(--color-accent);
    color: var(--color-on-primary, #fff);
}

.theme-preview-block strong {
    font-size: 0.82rem;
}

.theme-preview-block span {
    font-size: 0.72rem;
    opacity: 0.9;
}

.theme-preview-block.is-soft {
    background: var(--color-primary-soft, var(--color-mist));
    color: var(--color-text);
}

.theme-preview-block.is-surface,
.theme-preview-block.is-bg {
    background: var(--color-panel);
    color: var(--color-text);
    border: 1px solid var(--color-line);
}

.theme-preview-block.is-bg {
    background: var(--color-paper);
}

.theme-preview-section {
    margin-top: 0.9rem;
}

.theme-preview-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 0.45rem;
}

.theme-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.theme-preview-link {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.85rem;
}

.theme-preview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.theme-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--color-mist);
    color: var(--color-text);
}

.theme-studio__actions {
    margin-top: 0.5rem;
}

html[data-sidebar-tone="light"] .app-sidebar {
    background:
        linear-gradient(180deg, rgba(var(--color-accent-rgb), 0.08), transparent 42%),
        var(--color-sidebar, #ffffff);
}

html[data-sidebar-tone="dark"] .app-sidebar {
    background:
        linear-gradient(180deg, rgba(var(--color-accent-rgb), 0.14), transparent 34%),
        linear-gradient(
            165deg,
            var(--color-sidebar, #0b1220) 0%,
            color-mix(in srgb, var(--color-sidebar, #0b1220) 88%, #ffffff) 48%,
            color-mix(in srgb, var(--color-sidebar, #0b1220) 92%, #000000) 100%
        );
}

html[data-sidebar-tone="light"] .brand-copy strong,
html[data-sidebar-tone="light"] .sidebar-toggle,
html[data-sidebar-tone="light"] .mobile-nav-btn {
    color: var(--sidebar-fg, #0f172a);
}

html[data-sidebar-tone="light"] .menu-item-active > .menu-link,
html[data-sidebar-tone="light"] .menu-item.is-active > .menu-link {
    color: var(--color-accent-2);
}

@media (max-width: 1024px) {
    .theme-studio__grid {
        grid-template-columns: 1fr;
    }

    .theme-studio__preview {
        position: static;
    }
}

@media (max-width: 768px) {
    .theme-token-grid {
        grid-template-columns: 1fr;
    }

    .theme-preset-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
    color: #92400e;
}

.setup-checklist--embedded,
.theme-studio-card--embedded {
    border: 0;
    box-shadow: none;
    background: transparent;
    padding: 0.25rem 0 0;
}

.setup-checklist__embedded-head {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.theme-studio-card__hint {
    margin: 0 0 1rem;
    color: var(--color-muted);
    font-size: 0.9rem;
}

.config-page-wrap {
    max-width: 1200px;
}

