/* static/css/modules/temas/temas.css */
/* Personalização Visual e Gerenciamento Individual de Cores por Usuário */

.temas-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 84px;
    color: var(--theme-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Cabeçalho */
.temas-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--theme-border);
}

.temas-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.temas-kicker {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-accent);
}

.temas-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--theme-header-text);
}

.temas-subtitle {
    margin: 0;
    font-size: 12.5px;
    color: var(--theme-text-muted);
}

.temas-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.temas-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--theme-bg-surface-2);
    border: 1px solid var(--theme-border);
    color: var(--theme-text-secondary);
}

.temas-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--theme-accent);
    flex-shrink: 0;
}

/* Botões padrão do módulo */
.temas-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--theme-btn-sec-border);
    background: var(--theme-btn-sec-bg);
    color: var(--theme-btn-sec-text);
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    white-space: nowrap;
}

.temas-btn:hover:not(:disabled) {
    background: var(--theme-btn-sec-hover);
    border-color: var(--theme-border-strong);
}

.temas-btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.temas-btn-primary {
    background: color-mix(in srgb, var(--theme-accent) 16%, var(--theme-btn-sec-bg));
    border-color: color-mix(in srgb, var(--theme-accent) 42%, var(--theme-border-strong));
    color: var(--theme-text-primary);
}

.temas-btn-primary:hover:not(:disabled) {
    background: color-mix(in srgb, var(--theme-accent) 24%, var(--theme-btn-sec-bg));
    border-color: color-mix(in srgb, var(--theme-accent) 62%, var(--theme-border-strong));
}

.temas-btn-danger-ghost {
    color: var(--theme-text-secondary);
    border-color: var(--theme-border);
    background: transparent;
}

.temas-btn-danger-ghost:hover:not(:disabled) {
    background: var(--theme-danger-soft);
    color: var(--theme-danger);
    border-color: color-mix(in srgb, var(--theme-danger) 35%, var(--theme-border));
}

.temas-btn-sm {
    padding: 4px 9px;
    font-size: 11px;
}

/* Banner de feedback inline */
.temas-feedback {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 500;
    border: 1px solid var(--theme-border);
}

.temas-feedback.is-visible {
    display: flex;
}

.temas-feedback.is-success {
    background: var(--theme-success-soft);
    border-color: color-mix(in srgb, var(--theme-success) 45%, var(--theme-border));
    color: var(--theme-success);
}

.temas-feedback.is-error {
    background: var(--theme-danger-soft);
    border-color: color-mix(in srgb, var(--theme-danger) 45%, var(--theme-border));
    color: var(--theme-danger);
}

.temas-feedback.is-warning {
    background: var(--theme-warning-soft);
    border-color: color-mix(in srgb, var(--theme-warning) 45%, var(--theme-border));
    color: var(--theme-warning);
}

/* Seção de Presets */
.temas-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.temas-section-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--theme-text-secondary);
}

.temas-section-hint {
    font-size: 11.5px;
    color: var(--theme-text-muted);
}

.temas-presets-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.temas-preset-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--theme-card-border);
    background: var(--theme-card-bg);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.14s ease;
}

.temas-preset-card:hover {
    border-color: var(--theme-border-strong);
    transform: translateY(-1px);
}

.temas-preset-card.is-active {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 1px var(--theme-accent);
}

/* Mini preview dentro de cada card de preset (isolado com as cores do próprio tema) */
.temas-mini-ui {
    display: grid;
    grid-template-columns: 36px 1fr;
    height: 76px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--mini-border, #292929);
    background: var(--mini-bg, #090909);
}

.temas-mini-sb {
    background: var(--mini-sb, #0B0B0B);
    border-right: 1px solid var(--mini-border, #292929);
    padding: 7px 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.temas-mini-sb-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--mini-sb-bar, #3A3A3A);
    opacity: 0.7;
}

.temas-mini-sb-bar.is-accent {
    background: var(--mini-accent, #C6A56B);
    opacity: 1;
}

.temas-mini-main {
    padding: 7px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.temas-mini-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.temas-mini-title {
    width: 48%;
    height: 5px;
    border-radius: 2px;
    background: var(--mini-text, #F5F5F5);
    opacity: 0.85;
}

.temas-mini-cta {
    width: 18px;
    height: 7px;
    border-radius: 3px;
    background: var(--mini-accent, #C6A56B);
}

.temas-mini-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    flex: 1;
}

.temas-mini-card {
    border-radius: 4px;
    background: var(--mini-surface, #141414);
    border: 1px solid var(--mini-border, #292929);
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.temas-mini-line {
    height: 3px;
    width: 75%;
    border-radius: 2px;
    background: var(--mini-text-muted, #8A8A94);
    opacity: 0.6;
}

.temas-mini-line.short {
    width: 45%;
    background: var(--mini-accent, #C6A56B);
    opacity: 0.95;
}

.temas-preset-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.temas-preset-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.temas-preset-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-text-primary);
}

.temas-preset-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--theme-bg-surface-2);
    color: var(--theme-text-muted);
    border: 1px solid var(--theme-border);
}

.temas-preset-card.is-active .temas-preset-badge {
    background: color-mix(in srgb, var(--theme-accent) 16%, var(--theme-card-bg));
    color: var(--theme-accent);
    border-color: color-mix(in srgb, var(--theme-accent) 45%, var(--theme-border));
}

.temas-preset-desc {
    font-size: 11px;
    color: var(--theme-text-muted);
    line-height: 1.35;
}

.temas-swatches-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.temas-swatch-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--theme-text-primary) 22%, transparent);
}

/* Área principal do editor + preview */
.temas-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.95fr);
    gap: 18px;
    align-items: start;
}

.temas-editor-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* Barra de Controle do Tema Base + Busca */
.temas-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
}

.temas-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.temas-base-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.temas-base-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--theme-text-secondary);
    margin-right: 4px;
}

.temas-base-pill {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 5px;
    border: 1px solid var(--theme-border);
    background: var(--theme-bg-surface-2);
    color: var(--theme-text-secondary);
    cursor: pointer;
    transition: 0.15s ease;
}

.temas-base-pill:hover {
    border-color: var(--theme-border-strong);
    color: var(--theme-text-primary);
}

.temas-base-pill.is-active {
    background: color-mix(in srgb, var(--theme-accent) 16%, var(--theme-card-bg));
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}

.temas-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.temas-search-input {
    flex: 1;
    min-width: 200px;
    padding: 7px 11px;
    border-radius: 6px;
    border: 1px solid var(--theme-input-border);
    background: var(--theme-input-bg);
    color: var(--theme-input-text);
    font-size: 12.5px;
    outline: none;
}

.temas-search-input::placeholder {
    color: var(--theme-input-placeholder);
}

.temas-search-input:focus {
    border-color: var(--theme-input-focus);
}

/* Acordeões de Categoria */
.temas-accordions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.temas-accordion {
    border: 1px solid var(--theme-card-border);
    border-radius: 8px;
    background: var(--theme-card-bg);
    overflow: hidden;
}

.temas-accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: none;
    background: var(--theme-card-header-bg);
    color: var(--theme-text-primary);
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
}

.temas-accordion-trigger:hover {
    background: var(--theme-bg-surface-2);
}

.temas-accordion-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.temas-accordion-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-text-primary);
}

.temas-accordion-desc {
    font-size: 11px;
    color: var(--theme-text-muted);
}

.temas-accordion-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.temas-cat-count {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--theme-bg-surface-2);
    color: var(--theme-text-muted);
    border: 1px solid var(--theme-border);
}

.temas-cat-count.has-custom {
    background: color-mix(in srgb, var(--theme-accent) 16%, var(--theme-card-bg));
    color: var(--theme-accent);
    border-color: color-mix(in srgb, var(--theme-accent) 45%, var(--theme-border));
}

.temas-chevron {
    font-size: 10px;
    color: var(--theme-text-muted);
    transition: transform 0.18s ease;
}

.temas-accordion.is-open .temas-chevron {
    transform: rotate(180deg);
}

.temas-accordion-body {
    display: none;
    padding: 12px 14px;
    border-top: 1px solid var(--theme-divider);
}

.temas-accordion.is-open .temas-accordion-body {
    display: block;
}

.temas-category-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.temas-tokens-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.temas-token-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--theme-bg-surface-2);
    border: 1px solid var(--theme-border);
    transition: border-color 0.15s ease;
}

.temas-token-row.is-modified {
    border-color: color-mix(in srgb, var(--theme-accent) 55%, var(--theme-border));
}

.temas-token-row.is-invalid {
    border-color: var(--theme-danger);
    background: color-mix(in srgb, var(--theme-danger-soft) 50%, var(--theme-bg-surface-2));
}

.temas-token-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.temas-token-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--theme-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.temas-token-var {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 10px;
    color: var(--theme-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.temas-token-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.temas-color-picker {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 1px solid var(--theme-border-strong);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
}

.temas-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.temas-color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.temas-hex-input {
    width: 72px;
    padding: 4px 6px;
    border-radius: 5px;
    border: 1px solid var(--theme-input-border);
    background: var(--theme-input-bg);
    color: var(--theme-input-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
    outline: none;
}

.temas-hex-input:focus {
    border-color: var(--theme-input-focus);
}

.temas-token-row.is-invalid .temas-hex-input {
    border-color: var(--theme-danger);
    color: var(--theme-danger);
}

.temas-token-reset {
    width: 22px;
    height: 22px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--theme-text-muted);
    font-size: 12px;
    cursor: pointer;
    visibility: hidden;
}

.temas-token-row.is-modified .temas-token-reset {
    visibility: visible;
}

.temas-token-reset:hover {
    background: var(--theme-bg-surface-3);
    border-color: var(--theme-border);
    color: var(--theme-text-primary);
}

/* Coluna Direita: Painel de Pré-visualização em Tempo Real */
.temas-preview-col {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.temas-preview-shell {
    border: 1px solid var(--theme-card-border);
    border-radius: 8px;
    background: var(--theme-card-bg);
    overflow: hidden;
}

.temas-preview-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--theme-card-header-bg);
    border-bottom: 1px solid var(--theme-border);
}

.temas-preview-heading {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.temas-preview-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--theme-text-primary);
}

.temas-preview-sub {
    font-size: 11px;
    color: var(--theme-text-muted);
}

.temas-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--theme-text-secondary);
    cursor: pointer;
    user-select: none;
}

/* Sandbox isolado que consome variáveis --theme-* aplicadas via JS */
.temas-preview-canvas {
    display: grid;
    grid-template-columns: 112px 1fr;
    background: var(--theme-bg-app);
    color: var(--theme-text-primary);
    font-size: 11.5px;
    min-height: 430px;
}

.temas-pv-sidebar {
    background: var(--theme-sb-bg);
    border-right: 1px solid var(--theme-sb-border);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.temas-pv-brand {
    padding: 6px;
    border-radius: 5px;
    background: var(--theme-sb-surface);
    border: 1px solid var(--theme-sb-border);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--theme-sb-active-text);
    text-align: center;
    margin-bottom: 4px;
}

.temas-pv-nav-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-sb-text-muted);
    padding: 4px 6px 2px 6px;
}

.temas-pv-nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 5px;
    color: var(--theme-sb-text);
    font-size: 11px;
}

.temas-pv-nav-item:hover {
    background: var(--theme-sb-hover-bg);
}

.temas-pv-nav-item.is-active {
    background: var(--theme-sb-active-bg);
    color: var(--theme-sb-active-text);
    font-weight: 600;
}

.temas-pv-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--theme-sb-icon);
    flex-shrink: 0;
}

.temas-pv-nav-item.is-active .temas-pv-dot {
    background: var(--theme-sb-active-text);
}

.temas-pv-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.temas-pv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    background: var(--theme-header-bg);
    color: var(--theme-header-text);
    border-bottom: 1px solid var(--theme-header-border);
}

.temas-pv-header-title {
    font-size: 12px;
    font-weight: 600;
}

.temas-pv-link {
    color: var(--theme-link);
    font-size: 10.5px;
    font-weight: 600;
    text-decoration: none;
}

.temas-pv-link:hover {
    color: var(--theme-link-hover);
}

.temas-pv-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.temas-pv-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.temas-pv-kpi {
    padding: 8px 9px;
    border-radius: 6px;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
}

.temas-pv-kpi-label {
    font-size: 9.5px;
    color: var(--theme-text-muted);
}

.temas-pv-kpi-val {
    font-size: 15px;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-top: 2px;
}

.temas-pv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.temas-pv-badge {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.temas-pv-badge.is-ok {
    background: var(--theme-success-soft);
    color: var(--theme-success);
}

.temas-pv-badge.is-warn {
    background: var(--theme-warning-soft);
    color: var(--theme-warning);
}

.temas-pv-badge.is-err {
    background: var(--theme-danger-soft);
    color: var(--theme-danger);
}

.temas-pv-badge.is-info {
    background: var(--theme-info-soft);
    color: var(--theme-info);
}

.temas-pv-card {
    border-radius: 6px;
    background: var(--theme-card-bg);
    border: 1px solid var(--theme-card-border);
    overflow: hidden;
}

.temas-pv-card-head {
    padding: 7px 10px;
    background: var(--theme-card-header-bg);
    border-bottom: 1px solid var(--theme-divider);
    font-size: 11px;
    font-weight: 600;
    color: var(--theme-text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.temas-pv-card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.temas-pv-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.temas-pv-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--theme-label);
    margin-bottom: 3px;
}

.temas-pv-input {
    width: 100%;
    padding: 5px 8px;
    border-radius: 5px;
    border: 1px solid var(--theme-input-border);
    background: var(--theme-input-bg);
    color: var(--theme-input-text);
    font-size: 11px;
    box-sizing: border-box;
}

.temas-pv-input:focus {
    outline: none;
    border-color: var(--theme-input-focus);
}

.temas-pv-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.temas-pv-btn-pri {
    padding: 5px 10px;
    border-radius: 5px;
    border: none;
    background: var(--theme-accent);
    color: var(--theme-accent-text);
    font-size: 10.5px;
    font-weight: 600;
}

.temas-pv-btn-sec {
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid var(--theme-btn-sec-border);
    background: var(--theme-btn-sec-bg);
    color: var(--theme-btn-sec-text);
    font-size: 10.5px;
    font-weight: 600;
}

.temas-pv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
}

.temas-pv-table th {
    text-align: left;
    padding: 6px 8px;
    background: var(--theme-table-header-bg);
    color: var(--theme-table-header-text);
    border-bottom: 1px solid var(--theme-table-border);
    font-weight: 600;
}

.temas-pv-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--theme-table-border);
    color: var(--theme-text-secondary);
}

.temas-pv-table tbody tr:nth-child(odd) {
    background: var(--theme-table-row-bg);
}

.temas-pv-table tbody tr:nth-child(even) {
    background: var(--theme-table-row-alt);
}

.temas-pv-table tbody tr:hover {
    background: var(--theme-table-row-hover);
}

.temas-pv-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.temas-pv-progress-track {
    height: 6px;
    border-radius: 999px;
    background: var(--theme-progress-track);
    overflow: hidden;
}

.temas-pv-progress-fill {
    width: 68%;
    height: 100%;
    background: var(--theme-progress-fill);
}

.temas-pv-modal-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: 6px;
    background: var(--theme-modal-bg);
    border: 1px solid var(--theme-border-strong);
}

.temas-pv-tooltip-demo {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9.5px;
    background: var(--theme-tooltip-bg);
    color: var(--theme-tooltip-text);
}

/* Barra fixa de ações de salvamento */
.temas-action-bar {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--theme-modal-header-bg);
    border: 1px solid var(--theme-border-strong);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--theme-overlay) 45%, transparent);
}

.temas-action-state {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--theme-text-secondary);
}

.temas-unsaved-pill {
    display: none;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--theme-warning-soft);
    color: var(--theme-warning);
    border: 1px solid color-mix(in srgb, var(--theme-warning) 45%, var(--theme-border));
}

.temas-unsaved-pill.is-visible {
    display: inline-flex;
}

.temas-action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Responsividade */
@media (max-width: 1200px) {
    .temas-presets-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .temas-workspace {
        grid-template-columns: 1fr;
    }
    .temas-preview-col {
        position: static;
    }
}

@media (max-width: 720px) {
    .temas-presets-grid {
        grid-template-columns: 1fr;
    }
    .temas-tokens-grid {
        grid-template-columns: 1fr;
    }
    .temas-preview-canvas {
        grid-template-columns: 1fr;
    }
    .temas-pv-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--theme-sb-border);
    }
}
