/* Dinamics Commerce Studio — Sistema de design clean, moderno, roxo */

:root {
    --paper: #FAFAF7;
    --paper-raised: #FFFFFF;
    --paper-sunken: #F4F4F0;
    --ink: #0A0A0A;
    --ink-soft: #52525B;
    --ink-faint: #A1A1AA;
    --line: #E8E8E4;
    --line-soft: #F1F1ED;
    --accent: #7C3AED;
    --accent-strong: #6D28D9;
    --accent-ink: #FFFFFF;
    --accent-wash: #F5F3FF;
    --positive: #059669;
    --positive-wash: #ECFDF5;
    --negative: #DC2626;
    --negative-wash: #FEF2F2;
    --shadow-sm: 0 1px 2px rgba(10,10,10,0.03);
    --shadow-md: 0 4px 16px -4px rgba(10,10,10,0.06), 0 1px 3px rgba(10,10,10,0.04);
    --shadow-lg: 0 10px 30px -10px rgba(10,10,10,0.08), 0 4px 12px -2px rgba(10,10,10,0.04);
    --shadow-purple: 0 6px 20px -4px rgba(124,58,237,0.3);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; }

html, body {
    background: var(--paper);
    color: var(--ink);
}

body {
    font-family: 'DM Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

.font-display {
    font-family: 'DM Sans', sans-serif;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.font-mono {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

::selection { background: var(--accent-wash); color: var(--accent-strong); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #CBD5E1; }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    letter-spacing: -0.01em;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow-purple);
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-strong);
    transform: translateY(-1px);
}
.btn-ghost {
    background: var(--paper-raised);
    color: var(--ink);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-faint); background: var(--paper-raised); }
.btn-dark {
    background: var(--ink);
    color: var(--paper-raised);
}
.btn-dark:hover:not(:disabled) { background: #262626; transform: translateY(-1px); }
.btn-danger {
    background: var(--negative);
    color: white;
}
.btn-danger:hover:not(:disabled) { background: #B91C1C; }

/* ---------- Campos ---------- */
.field-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    color: var(--ink);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: -0.01em;
}
.field-input::placeholder { color: var(--ink-faint); }
.field-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-wash);
}
.field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

/* ---------- Cards ---------- */
.panel {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 8px 24px -6px rgba(0, 0, 0, 0.05);
}

/* ---------- Rail de etapas ---------- */
.step-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    border-radius: 999px;
    background: var(--paper-raised);
    border: 1px solid var(--line);
    color: var(--ink-faint);
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.step-tab-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--line-soft);
    color: var(--ink-faint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}
.step-tab-label { font-size: 12.5px; font-weight: 600; color: var(--ink-faint); }
.step-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 4px 14px -3px rgba(124, 58, 237, 0.35);
}
.step-tab.active .step-tab-num { background: rgba(255,255,255,0.25); color: white; }
.step-tab.active .step-tab-label { color: white; }
.step-tab.done {
    background: var(--accent-wash);
    border-color: rgba(124, 58, 237, 0.2);
}
.step-tab.done .step-tab-num { background: var(--accent); color: white; }
.step-tab.done .step-tab-label { color: var(--accent-strong); }

/* ---------- Estilo cards de mood ---------- */
.style-card {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1.5px solid var(--line);
    background: var(--paper-raised);
    border-radius: var(--radius-lg);
}
.style-card:hover {
    border-color: #CBD5E1;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.08);
}
.style-card.active {
    border-color: var(--accent);
    background: #FAF8FF;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), var(--shadow-md);
}

.aspect-choice {
    border: 1.5px solid var(--line);
    background: var(--paper-raised);
    border-radius: var(--radius);
    transition: all 0.15s ease;
}
.aspect-choice:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-wash);
}
.aspect-choice:hover {
    border-color: var(--ink-faint);
}

/* ---------- Preview e Shimmer ---------- */
.preview-thumb-container { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.preview-thumb-container:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

@keyframes lightShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer-light {
    background: linear-gradient(90deg, var(--line-soft) 25%, var(--line) 50%, var(--line-soft) 75%);
    background-size: 200% 100%;
    animation: lightShimmer 1.8s infinite;
}

/* ---------- Revelação em sequência ---------- */
@keyframes surface {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.surface-in { animation: surface 0.5s cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ---------- Abas de perfil ---------- */
.tab-btn {
    color: var(--ink-soft);
    border-radius: 10px;
}
.tab-btn:hover { background: var(--line-soft); }
.tab-btn.active {
    background: var(--accent-wash);
    color: var(--accent-strong);
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .surface-in, .shimmer-light { animation: none; }
}

/* ---------- Sidebar Retrátil (ChatGPT/Gemini Style) ---------- */
#main-sidebar {
    height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-collapsed #main-sidebar {
    display: none !important;
}

#btn-open-sidebar {
    display: none;
}

.sidebar-collapsed #btn-open-sidebar {
    display: flex !important;
}

.session-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--ink-soft);
    font-size: 13.5px;
    transition: all 0.15s ease;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
}
.session-item:hover {
    background: var(--paper-sunken);
    color: var(--ink);
    border-color: var(--line-soft);
}
.session-item.active {
    background: var(--accent-wash);
    color: var(--accent-strong);
    font-weight: 600;
    border-color: rgba(124, 58, 237, 0.2);
}
.session-item .item-delete-btn {
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}
.session-item:hover .item-delete-btn {
    opacity: 1;
}

/* ---------- Cards do Seletor de Modelo de IA ---------- */
.model-card {
    transition: all 0.2s ease;
    border: 1.5px solid var(--line);
    background: var(--paper-raised);
    border-radius: var(--radius);
    cursor: pointer;
}
.model-card:hover {
    border-color: var(--ink-faint);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.model-card.active {
    border-color: var(--accent);
    background: var(--accent-wash);
    box-shadow: 0 0 0 3px var(--accent-wash), var(--shadow-md);
}

/* ---------- Grid da Biblioteca Geral ---------- */
.library-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.library-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ---------- Checkout & Modal de Pagamentos Real ---------- */
.checkout-pkg-card {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1.5px solid var(--line);
    background: var(--paper-raised);
    border-radius: var(--radius-lg);
    cursor: pointer;
    position: relative;
}
.checkout-pkg-card:hover {
    border-color: #CBD5E1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.checkout-pkg-card.selected {
    border-color: var(--accent);
    background: #FAF8FF;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12), var(--shadow-md);
}

.credit-card-preview {
    background: linear-gradient(135deg, #181824 0%, #111119 60%, #0a0a10 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 22px 24px;
    color: white;
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}
.credit-card-preview::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.35) 0%, transparent 70%);
    pointer-events: none;
}
.card-chip {
    width: 36px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #fce08b 0%, #d4af37 100%);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
    display: inline-block;
}

.pix-qr-frame {
    background: #FFFFFF;
    padding: 14px;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    display: inline-block;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10B981;
    position: relative;
}
.pulse-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.4);
    animation: pulse-ring 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}


