/* ═══════════════════════════════════════════════════════
   DOM LEONEL — Minimalista Escuro Premium
   Design System v2.0
   ═══════════════════════════════════════════════════════ */

:root {
    /* ── Surfaces ── */
    --bg-base: #050505;
    --bg-surface: #0a0a0b;
    --bg-elevated: #111113;
    --bg-hover: #1a1a1d;
    --bg-glass: rgba(17, 17, 19, 0.6);
    
    /* ── Accent: Gold Premium ── */
    --gold: #C8A97E;
    --gold-soft: rgba(200, 169, 126, 0.15);
    --gold-glow: rgba(200, 169, 126, 0.25);
    --gold-muted: rgba(200, 169, 126, 0.08);
    
    /* ── Text ── */
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-tertiary: #48484a;
    
    /* ── Borders ── */
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-gold: rgba(200, 169, 126, 0.4);
    
    /* ── Feedback ── */
    --success: #34c759;
    --error: #ff453a;
    
    /* ── Radius ── */
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-full: 9999px;
    
    /* ── Typography ── */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
    
    /* ── Spacing ── */
    --safe-top: env(safe-area-inset-top, 20px);
    --safe-bottom: env(safe-area-inset-bottom, 20px);
    
    /* ── Motion ── */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration: 0.4s;

    --primary: var(--gold);
    --accent: var(--gold);
    --text-muted: var(--text-secondary);
    --glass: var(--bg-glass);
    --glass-border: var(--border);
    --card-bg: var(--bg-elevated);
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(145deg, #18181c 0%, #050505 100%);
    background-attachment: fixed;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--text-primary);
    font-family: var(--font);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════ */

.app-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: transparent;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0; /* Ajustado para permitir scroll natural em conteúdos longos */
}

/* Fallback para nome da empresa quando não há logo */
.brand-name-fallback {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Ambient glow — subtle gold haze at top */
.ambient-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, var(--gold-glow), transparent 70%);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: ambientPulse 6s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
    0%   { opacity: 0.2; transform: translateX(-50%) scale(1); }
    100% { opacity: 0.35; transform: translateX(-50%) scale(1.1); }
}

/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */

.app-header {
    padding: calc(var(--safe-top) + 20px) 32px 0;
    margin-bottom: 16px; /* Permite leve respiro mas mantém proximo */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    flex-shrink: 0;
}

.logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-container img {
    height: 180px;
    width: auto;
    max-width: 80vw;
    object-fit: contain;
    border-radius: var(--r-lg); /* Bordas arredondadas suaves */
    filter: drop-shadow(0 0 30px var(--gold-muted));
    transition: filter 0.6s var(--ease-out);
}

.logo-container img:hover {
    filter: drop-shadow(0 0 40px var(--gold-soft));
}

.modal-container {
    width: min(460px, 92vw);
    margin: auto;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    align-self: center;
}

.modal-container form {
    width: 100%;
}

.modal-container .step-title,
.modal-container .step-desc {
    text-align: center;
}

/* ═══════════════════════════════════════════════════════
   CONTENT
   ═══════════════════════════════════════════════════════ */

.app-content {
    width: 100%;
    max-width: 500px;
    padding: 0 32px 32px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════
   STEPS
   ═══════════════════════════════════════════════════════ */

.step {
    animation: stepIn var(--duration) var(--ease-out) forwards;
    display: flex;
    flex-direction: column;
    width: 100%;
}

@keyframes stepIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Centered steps (phone, name, success) */
.step-centered {
    text-align: center;
    align-items: center;
}

.step-centered .step-header {
    align-items: center;
}

.step-content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ── Step Header ── */
.step-header {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 4px;
}

.step-title {
    font-size: 2.4rem;
    font-weight: 200;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1.05;
}

.step-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.6;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════
   FLOATING LABEL INPUTS
   ═══════════════════════════════════════════════════════ */

.input-group {
    position: relative;
    margin-bottom: 24px;
    width: 100%;
    display: block; /* Override Bootstrap flex bug */
}

/* Modal Customization Layer (Bootstrap Override) */
.modal-backdrop.show {
    opacity: 0.75 !important;
    backdrop-filter: blur(12px) !important;
    background-color: var(--bg-base);
}

.input-group.floating {
    margin-bottom: 28px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 24px 20px 10px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font);
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
    position: relative;
    z-index: 1;
}

select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px 20px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font);
    font-weight: 500;
    transition: all 0.3s var(--ease-out);
    appearance: none;
    -webkit-appearance: none;
}

select:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}

input::placeholder {
    color: transparent;
}

/* Floating label */
.floating label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.3s var(--ease-out);
    transform-origin: left;
    z-index: 2;
}

/* Focus & filled states */
input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
}

input:focus ~ label,
input:not(:placeholder-shown) ~ label,
label.active-label {
    top: 14px;
    transform: translateY(0);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gold);
}

#step-birth .input-group.floating input {
    padding-top: 34px;
    padding-bottom: 12px;
}

#step-birth .input-group.floating input:focus ~ label,
#step-birth .input-group.floating input:not(:placeholder-shown) ~ label,
#step-birth .input-group.floating label.active-label {
    top: 12px;
}

#step-birth .field-hint {
    margin-top: -14px;
    margin-bottom: 24px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.3;
}

/* Flatpickr Premium Gold Override for JS Calendar */
.flatpickr-calendar.dark {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    font-family: var(--font);
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: var(--bg-base) !important;
    font-weight: 700;
}
.flatpickr-day:hover {
    background: rgba(200, 169, 126, 0.2);
}

/* iOS Style Tab Navigation (Profile) */
.segmented-control {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--r-md);
    padding: 6px;
    margin-bottom: 24px;
}
.seg-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 10px 0;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}
.seg-btn.active {
    background: var(--bg-elevated);
    color: var(--gold);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Dashboard Vertical List (UI Premium e Fluida) */
#customer-appointments {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 8px 0 24px 0; 
    margin: 0;
}

#customer-appointments .service-card {
    width: 100%;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease-out);
}

/* Centered input override (phone step) */
.step-centered input {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.step-centered .floating label {
    width: auto;
    left: 50%;
    transform: translate(-50%, -50%);
}

.step-centered input:focus ~ label,
.step-centered input:not(:placeholder-shown) ~ label,
.step-centered label.active-label {
    transform: translateX(-50%);
}

/* Date input fix */
input[type="date"] {
    color-scheme: dark;
}

input[type="date"]:not(:valid) ~ label {
    top: 20px;
    font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */

.btn-primary,
.btn-secondary,
.btn-ghost {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 17px 28px;
    border-radius: var(--r-lg);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease-out);
    border: none;
    font-family: var(--font);
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

/* Primary: White fill → Gold hover */
.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
}

.btn-primary:hover {
    transform: translateY(-1px);
    background: var(--gold);
    color: var(--text-primary);
    box-shadow: 0 8px 30px rgba(200, 169, 126, 0.2);
}

.btn-primary > * {
    position: relative;
    z-index: 1;
}

.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: none;
}

/* Secondary: Glass */
.btn-secondary {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.btn-secondary:active {
    transform: scale(0.97);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-tertiary);
    font-weight: 400;
    font-size: 0.85rem;
    padding: 14px;
    margin-top: auto;
}

.btn-ghost:hover {
    color: var(--text-secondary);
}

/* Back button */
.btn-back {
    align-self: flex-start;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--r-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s var(--ease-out);
}

.btn-back:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateX(-3px);
}

.table,
.table-card table,
.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.9rem;
}

.table th,
.table td,
.table-card table th,
.table-card table td,
.table-wrap table th,
.table-wrap table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table th,
.table-card table th,
.table-wrap table th {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.table tr:hover td,
.table-card table tr:hover td,
.table-wrap table tr:hover td {
    background: rgba(200, 169, 126, 0.05);
}

/* ═══════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════ */

.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-auto { margin-top: auto; }
.text-center { text-align: center; }

/* ═══════════════════════════════════════════════════════
   GRIDS
   ═══════════════════════════════════════════════════════ */

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Service cards */
.service-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.service-grid::-webkit-scrollbar,
.time-grid::-webkit-scrollbar {
    display: none;
}

/* Time slots — 3-column chip grid */
.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.time-grid > .step-desc {
    grid-column: 1 / -1;
    text-align: center;
    justify-self: center;
    align-self: center;
    width: 100%;
}

.time-grid > .time-empty {
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
}

.time-empty .step-desc {
    margin: 0;
    text-align: center;
    width: 100%;
}

.time-empty .btn-secondary {
    width: auto;
    padding: 12px 18px;
    border-radius: var(--r-full);
}

/* ═══════════════════════════════════════════════════════
   APPOINTMENTS LIST
   ═══════════════════════════════════════════════════════ */

.appointments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: visible; /* Sem scroll interno para evitar barra dupla */
}

/* ═══════════════════════════════════════════════════════
   SERVICE CARDS — Glassmorphic
   ═══════════════════════════════════════════════════════ */

.service-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.service-card:active {
    transform: scale(0.98);
}

.service-card.selected {
    border-color: var(--border-gold);
    background: var(--gold-muted);
    box-shadow: 0 0 30px var(--gold-muted), inset 0 0 0 1px var(--border-gold);
}

.prof-select-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.prof-select-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; color: #fff; flex-shrink: 0;
    background-size: cover; background-position: center;
}

/* ── Badge de profissional selecionado (steps de serviço e data/hora) ── */
.prof-badge-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(200,169,126,0.08);
    border: 1px solid rgba(200,169,126,0.25);
    border-radius: 50px;
    padding: 8px 16px 8px 8px;
    margin-bottom: 18px;
    width: fit-content;
    max-width: 100%;
    animation: fadeSlideIn 0.3s ease;
}
.prof-badge-avatar-wrap {
    width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.prof-badge-avatar-img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.prof-badge-avatar-initials {
    width: 100%; height: 100%; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; color: #fff;
}
.prof-badge-text {
    display: flex; flex-direction: column; line-height: 1.2; min-width: 0;
}
.prof-badge-label {
    font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--gold); opacity: 0.8;
}
.prof-badge-name {
    font-size: 0.9rem; font-weight: 600; color: var(--text-primary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.prof-badge-check {
    font-size: 0.75rem; color: var(--gold); margin-left: auto; flex-shrink: 0;
}

/* ── Linha de profissional nos cards do histórico ── */
.apt-prof-badge {
    display: flex; align-items: center; gap: 5px;
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.apt-prof-label { font-weight: 600; }
.apt-prof-name  { color: var(--text-primary); font-weight: 500; }

/* ── Linha de profissional na tela de sucesso ── */
.success-prof-line {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.success-prof-line strong {
    color: var(--gold);
    font-weight: 600;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.service-info .name {
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: block;
    margin-bottom: 3px;
}

.service-info .meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.service-price {
    font-weight: 600;
    color: var(--gold);
    font-size: 1.05rem;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   TIME SLOT CHIPS
   ═══════════════════════════════════════════════════════ */

.time-slot {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 8px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.time-slot:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    margin-bottom: 4px;
}
.skeleton-text.short { width: 40%; }
.skeleton-text.medium { width: 70%; }

.time-slot:active {
    transform: scale(0.95);
}

.time-slot.selected {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg-base);
    font-weight: 600;
    box-shadow: 0 4px 20px var(--gold-glow);
}

.time-slot.disabled {
    opacity: 0.25;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════
   STICKY ACTION
   ═══════════════════════════════════════════════════════ */

.btn-floating {
    position: sticky;
    bottom: 24px;
    margin-top: auto;
    z-index: 20;
    margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════
   SUCCESS ANIMATION
   ═══════════════════════════════════════════════════════ */

.success-animation {
    margin: 20px auto 24px;
    width: 90px;
    height: 90px;
    position: relative;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--gold);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--text-primary);
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px var(--gold);
    animation: fillGold 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Gold particles */
.success-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
}

.success-particles span {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: particle 0.8s ease-out 1s forwards;
}

.success-particles span:nth-child(1) { --dx: -30px; --dy: -40px; animation-delay: 0.9s; }
.success-particles span:nth-child(2) { --dx: 35px; --dy: -25px; animation-delay: 0.95s; }
.success-particles span:nth-child(3) { --dx: 40px; --dy: 20px; animation-delay: 1s; }
.success-particles span:nth-child(4) { --dx: -25px; --dy: 35px; animation-delay: 1.05s; }
.success-particles span:nth-child(5) { --dx: -40px; --dy: 5px; animation-delay: 1.1s; }
.success-particles span:nth-child(6) { --dx: 10px; --dy: -45px; animation-delay: 1.15s; }

@keyframes particle {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--dx), var(--dy)) scale(0);
    }
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.08, 1.08, 1); }
}

@keyframes fillGold {
    100% { box-shadow: inset 0px 0px 0px 50px var(--gold-muted); }
}

/* ═══════════════════════════════════════════════════════
   DESKTOP: Floating Card
   ═══════════════════════════════════════════════════════/* Desktop: Full Screen layout instead of floating card */
@media (min-width: 481px) {
    body {
        background: linear-gradient(145deg, #1a1a20 0%, #050505 100%);
        background-attachment: fixed;
        background-size: cover;
        background-repeat: no-repeat;
    }

    .app-container {
        border-radius: 0;
        height: 100vh;
        min-height: 100vh;
        max-height: none;
        margin: 0;
        border: none;
        box-shadow: none;
    }
    
    .app-content {
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--border-hover) transparent;
    }
    
    ::-webkit-scrollbar {
        width: 4px;
    }

    ::-webkit-scrollbar-track {
        background: transparent;
    }

    ::-webkit-scrollbar-thumb {
        background: var(--border-hover);
        border-radius: 10px;
    }
}

/* ═══════════════════════════════════════════════════════
   SELECTION & FOCUS RING
   ═══════════════════════════════════════════════════════ */

::selection {
    background: var(--gold-soft);
    color: var(--text-primary);
}

:focus-visible {
    outline: 1.5px solid var(--gold);
    outline-offset: 2px;
}

/* ── Dev Credit ───────────────────────────────── */
.dev-credit {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    padding: 1.25rem 0 1rem;
    margin-top: auto;   /* empurra para o final em containers flex-column */
}
.dev-credit a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.dev-credit a:hover {
    color: var(--primary, #c9a86c);
}

input:focus-visible {
    outline: none;
}
