:root {
    --bg: #f3f7fc;
    --card: #ffffff;
    --primary: #123a6f;
    --primary-2: #1d5ea8;
    --accent: #2563eb;
    --text: #1e293b;
    --muted: #64748b;
    --border: #d9e2ef;
    --success: #15803d;
    --danger: #dc2626;
    --warning: #d97706;
    --gold: #f59e0b;
    --shadow: 0 20px 40px rgba(15, 52, 96, 0.12);
    --shadow-sm: 0 4px 12px rgba(15, 52, 96, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

/* ===================================================================
   BARRA AO VIVO (Visitantes Online)
   =================================================================== */

.live-bar {
    position: sticky;
    top: 0;
    z-index: 900;
    background: linear-gradient(135deg, #0f3460, #1d4f8f);
    padding: 8px 16px;
    text-align: center;
    animation: fadeIn .5s ease-out both;
}

.live-bar-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .84rem;
    font-weight: 600;
    color: rgba(255,255,255,.9);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 6px #4ade80;
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.live-bar strong {
    color: #fff;
    font-weight: 800;
}

/* ===================================================================
   NOTIFICAÇÃO DE COMPRA (toast flutuante)
   =================================================================== */

.purchase-toast {
    position: fixed;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #0f3460, #1d4f8f);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 600;
    box-shadow: 0 12px 32px rgba(15, 52, 96, .3);
    z-index: 950;
    white-space: nowrap;
    transition: top .5s cubic-bezier(.34, 1.56, .64, 1);
    pointer-events: none;
}

.purchase-toast.show {
    top: 52px;
}

.purchase-toast-icon {
    font-size: 1.2rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Century Gothic", system-ui, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
    min-height: 100dvh;
}

.app-shell {
    max-width: 920px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

/* ── Nav ── */

.site-nav {
    display: flex;
    gap: 6px;
    background: var(--card);
    padding: 6px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
}

.nav-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: all .25s;
}

.nav-link:hover {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

.nav-link.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ── Hero ── */
.hero { margin-bottom: 18px; }

.hero-card {
    background: linear-gradient(135deg, #0f3460 0%, #1d4f8f 100%);
    color: #fff;
    border-radius: 28px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: var(--shadow);
}

.brand-badge {
    display: inline-flex;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 6px; }
.hero p { color: rgba(255,255,255,0.86); max-width: 560px; }
.hero-icon { font-size: 3.5rem; flex-shrink: 0; }

/* ── Identificação ── */
.id-screen { display: flex; justify-content: center; padding: 20px 0; }

.id-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    text-align: center;
    box-shadow: var(--shadow);
    max-width: 420px;
    width: 100%;
}

.id-icon { font-size: 3rem; margin-bottom: 12px; }
.id-title { font-size: 1.5rem; color: var(--primary); margin-bottom: 6px; }
.id-subtitle { color: var(--muted); margin-bottom: 24px; }

/* ── Painel principal ── */
.painel { display: flex; flex-direction: column; gap: 16px; }

.welcome-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.welcome-name { font-weight: 700; font-size: 1.1rem; color: var(--primary); }

.welcome-badge {
    display: inline-flex;
    background: linear-gradient(135deg, var(--gold), #f97316);
    color: #fff;
    border-radius: 999px;
    padding: 4px 14px;
    font-size: .8rem;
    font-weight: 700;
    margin-left: 10px;
}

/* ── Tabs ── */
.tabs {
    display: flex;
    gap: 6px;
    background: var(--card);
    padding: 6px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    color: var(--muted);
    transition: all .25s;
}

.tab.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tab-content { display: none; }
.tab-content.active { display: flex; flex-direction: column; gap: 16px; }

/* ── Cards genéricos ── */
.card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card h3 { font-size: 1.15rem; color: var(--primary); margin-bottom: 12px; }

/* ── Stats grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--border);
}

.stat-card.pontos { border-top-color: var(--accent); }
.stat-card.cashback { border-top-color: var(--success); }
.stat-card.pedidos { border-top-color: var(--gold); }

.stat-icon { font-size: 1.8rem; margin-bottom: 6px; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .78rem; color: var(--muted); margin-top: 4px; }

/* ── Sequência ── */
.sequencia-card { text-align: center; }
.sequencia-desc { color: var(--muted); font-size: .9rem; margin-bottom: 18px; }

.sequencia-bar {
    width: 100%;
    height: 18px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.sequencia-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 999px;
    transition: width .6s ease;
    width: 0%;
}

.sequencia-dias {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: var(--muted);
    margin-bottom: 8px;
}

.sequencia-dias span { display: inline-block; width: 24px; text-align: center; }
.sequencia-dias span.done { color: var(--accent); font-weight: 700; }
.sequencia-dias span.current { color: var(--gold); font-weight: 700; }

.sequencia-info { font-size: .85rem; color: var(--muted); }
.sequencia-info strong { color: var(--primary); }

/* ── Como funciona ── */
.regras-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.regra {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
}

.regra-icon { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.regra strong { display: block; font-size: .9rem; color: var(--primary); margin-bottom: 4px; }
.regra p { font-size: .8rem; color: var(--muted); }

/* ── Histórico de pontos ── */
.historico-lista { display: flex; flex-direction: column; gap: 8px; }

.historico-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.historico-item .hi-desc { font-size: .88rem; color: var(--text); flex: 1; }
.historico-item .hi-data { font-size: .75rem; color: var(--muted); margin-left: 8px; }

.historico-item .hi-pontos {
    font-weight: 700;
    font-size: .95rem;
    min-width: 60px;
    text-align: right;
}

.hi-pontos.positivo { color: var(--success); }
.hi-pontos.negativo { color: var(--danger); }

/* ── Feedback form ── */
.feedback-sub { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    color: var(--primary);
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--bg);
    transition: border-color .2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.char-count { display: block; text-align: right; color: var(--muted); font-size: .78rem; margin-top: 4px; }

/* Produto search */
.produto-search-wrap {
    position: relative;
}

.produto-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    border: 2px solid var(--accent);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 220px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(15, 52, 96, 0.15);
}

.produto-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid var(--border);
}

.produto-item:last-child { border-bottom: none; }
.produto-item:hover { background: rgba(37, 99, 235, 0.06); }

.produto-item-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg);
    flex-shrink: 0;
}

.produto-item-info { flex: 1; min-width: 0; }
.produto-item-nome { font-weight: 600; font-size: .9rem; color: var(--primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.produto-item-preco { font-size: .78rem; color: var(--muted); }

.produto-results .empty-state { padding: 16px; font-size: .88rem; }

.produto-selecionado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 14px;
    background: rgba(37, 99, 235, 0.08);
    border: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .9rem;
    color: var(--accent);
}

.produto-remover {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--muted);
    padding: 2px 6px;
    border-radius: 6px;
    transition: all .15s;
}

.produto-remover:hover {
    background: var(--danger);
    color: #fff;
}

/* Tipo toggle */
.tipo-toggle { display: flex; gap: 8px; }

.tipo-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    cursor: pointer;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    color: var(--muted);
    transition: all .2s;
}

.tipo-btn.active {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent);
}

/* Star rating */
.star-rating { display: flex; gap: 6px; }

.star {
    font-size: 2rem;
    cursor: pointer;
    color: #cbd5e1;
    transition: color .15s, transform .15s;
    user-select: none;
}

.star.active { color: var(--gold); }
.star:hover { transform: scale(1.2); }

/* Anônimo toggle */
.anonimo-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 999px;
    transition: .3s;
}

.slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s;
}

.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(22px); }

/* ── Mural (sempre visível) ── */
.mural-section {
    margin-top: 24px;
    padding: 0 4px;
}

.mural-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4px;
}

.mural-media {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card);
    padding: 16px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.mural-media-star { font-size: 1.6rem; }
.mural-media-valor { font-size: 2rem; font-weight: 800; color: var(--primary); }
.mural-media-total { font-size: .88rem; color: var(--muted); }

/* ── Filtro por estrelas ── */
.star-filter {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.star-filter::-webkit-scrollbar { display: none; }

.star-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    cursor: pointer;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    transition: all .25s ease;
    flex-shrink: 0;
}

.star-filter-btn:hover {
    border-color: var(--gold);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, .12);
}

.star-filter-btn.active {
    border-color: var(--gold);
    background: linear-gradient(135deg, rgba(245, 158, 11, .08), rgba(245, 158, 11, .16));
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(245, 158, 11, .18);
}

.star-filter-stars {
    color: var(--gold);
    font-size: .9rem;
    letter-spacing: 1px;
    line-height: 1;
}

.star-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--bg);
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    transition: all .25s ease;
}

.star-filter-btn.active .star-filter-count {
    background: var(--gold);
    color: #fff;
}

@media (max-width: 640px) {
    .star-filter {
        gap: 6px;
        padding: 10px 0;
    }
    .star-filter-btn {
        padding: 6px 10px;
        font-size: .78rem;
    }
}

.mural-lista { display: flex; flex-direction: column; gap: 12px; }

.mural-card {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.mural-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.mural-card-nome {
    font-weight: 700;
    color: var(--primary);
    font-size: .95rem;
}

.mural-card-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
}

.mural-card-badge.produto { background: rgba(37, 99, 235, 0.1); color: var(--accent); }
.mural-card-badge.estabelecimento { background: rgba(245, 158, 11, 0.12); color: var(--warning); }

.mural-card-estrelas { margin-bottom: 8px; color: var(--gold); font-size: 1.1rem; letter-spacing: 2px; }

.mural-card-comentario { font-size: .92rem; color: var(--text); line-height: 1.5; margin-bottom: 8px; }

.mural-card-data { font-size: .75rem; color: var(--muted); }

/* ── Botões ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--primary-2); }

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--primary);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-full { width: 100%; }

.btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: bottom .4s ease;
    z-index: 9999;
    max-width: 90vw;
    text-align: center;
}

.toast.show { bottom: 30px; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--muted);
    font-size: .95rem;
}

/* ── Footer ── */
.app-footer {
    text-align: center;
    padding: 24px 16px;
    color: var(--muted);
    font-size: .82rem;
}

.app-footer strong { color: var(--primary); }

/* ── Hidden ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
    .regras-grid { grid-template-columns: 1fr; }
    .hero-card { flex-direction: column; text-align: center; padding: 20px; }
    .hero-icon { font-size: 2.5rem; }
    .tabs { flex-direction: column; }
    .welcome-bar { flex-direction: column; gap: 10px; text-align: center; }
    .mural-card-header { flex-direction: column; gap: 6px; align-items: flex-start; }
    .tipo-toggle { flex-direction: column; }
}

/* ===================================================================
   ANIMAÇÕES
   =================================================================== */

/* ── Keyframes ── */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(.3); }
    50%  { opacity: 1; transform: scale(1.05); }
    70%  { transform: scale(.95); }
    100% { transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes starPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}

@keyframes confetti {
    0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-30px) rotate(20deg); opacity: 0; }
}

/* ── Entrada da página ── */

.site-nav {
    animation: fadeInUp .5s ease-out both;
}

.hero-card {
    animation: fadeInUp .6s ease-out both;
    animation-delay: .1s;
}

.hero-icon {
    animation: float 3s ease-in-out infinite;
}

.app-footer {
    animation: fadeIn .8s ease-out both;
    animation-delay: .4s;
}

/* ── Tela de identificação ── */

.id-card {
    animation: scaleIn .5s ease-out both;
}

.id-welcome {
    animation: fadeInUp .4s ease-out both;
}

.id-icon {
    animation: bounceIn .6s ease-out both;
}

/* ── Welcome bar ── */

.welcome-bar {
    animation: slideInLeft .5s ease-out both;
}

.welcome-badge {
    animation: bounceIn .5s ease-out both;
    animation-delay: .3s;
}

/* ── Tabs ── */

.tabs {
    animation: fadeInUp .5s ease-out both;
    animation-delay: .15s;
}

.tab {
    transition: all .3s ease;
    position: relative;
}

.tab:hover:not(.active) {
    transform: translateY(-2px);
    background: rgba(37, 99, 235, 0.04);
}

.tab.active {
    animation: scaleIn .25s ease-out;
}

/* ── Tab content ── */

.tab-content.active {
    animation: fadeInUp .35s ease-out both;
}

/* ── Stats grid ── */

.stat-card {
    animation: fadeInUp .4s ease-out both;
    transition: transform .25s ease, box-shadow .25s ease;
}

.stat-card:nth-child(1) { animation-delay: .0s; }
.stat-card:nth-child(2) { animation-delay: .1s; }
.stat-card:nth-child(3) { animation-delay: .2s; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(15, 52, 96, .12);
}

.stat-icon {
    transition: transform .3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.15);
}

/* ── Sequência (barra de progresso) ── */

.sequencia-fill {
    transition: width .8s cubic-bezier(.34, 1.56, .64, 1);
}

.sequencia-dias span {
    transition: all .3s ease;
}

.sequencia-dias span.done {
    animation: scaleIn .3s ease-out both;
}

.sequencia-dias span.current {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ── Cards genéricos ── */

.card {
    animation: fadeInUp .4s ease-out both;
    transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 52, 96, .1);
}

/* ── Regras grid ── */

.regra {
    animation: fadeInUp .4s ease-out both;
    transition: transform .25s ease, box-shadow .25s ease;
}

.regra:nth-child(1) { animation-delay: .0s; }
.regra:nth-child(2) { animation-delay: .08s; }
.regra:nth-child(3) { animation-delay: .16s; }
.regra:nth-child(4) { animation-delay: .24s; }

.regra:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 52, 96, .08);
    background: #fff;
}

.regra-icon {
    transition: transform .3s ease;
}

.regra:hover .regra-icon {
    transform: scale(1.2);
}

/* ── Histórico de pontos ── */

.historico-item {
    animation: slideInLeft .35s ease-out both;
    transition: transform .2s ease, background .2s ease;
}

.historico-item:nth-child(1) { animation-delay: .0s; }
.historico-item:nth-child(2) { animation-delay: .04s; }
.historico-item:nth-child(3) { animation-delay: .08s; }
.historico-item:nth-child(4) { animation-delay: .12s; }
.historico-item:nth-child(5) { animation-delay: .16s; }

.historico-item:hover {
    transform: translateX(4px);
    background: #edf2f7;
}

/* ── Feedback form ── */

.feedback-form-card {
    animation: fadeInUp .5s ease-out both;
}

/* Star rating */
.star {
    transition: color .2s ease, transform .2s ease;
}

.star:hover {
    transform: scale(1.3);
}

.star.active {
    animation: starPop .3s ease-out;
}

/* Tipo toggle */
.tipo-btn {
    transition: all .25s ease;
}

.tipo-btn:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 52, 96, .06);
}

.tipo-btn.active {
    animation: scaleIn .25s ease-out;
}

/* ── Botões ── */

.btn {
    transition: all .25s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, .25);
}

.btn-primary:active {
    transform: translateY(0) scale(.98);
}

.btn-outline:hover {
    transform: translateY(-1px);
}

/* Ripple */
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,.35) 10%, transparent 10.01%);
    transform: scale(10);
    opacity: 0;
    transition: transform .4s, opacity .8s;
}

.btn:active::after {
    transform: scale(0);
    opacity: 1;
    transition: 0s;
}

/* ── Mural ── */

.mural-section {
    animation: fadeIn .6s ease-out both;
}

.mural-media {
    animation: scaleIn .5s ease-out both;
    transition: transform .2s ease;
}

.mural-media:hover {
    transform: scale(1.02);
}

.mural-card {
    animation: fadeInUp .4s ease-out both;
    transition: transform .25s ease, box-shadow .25s ease;
}

.mural-lista .mural-card:nth-child(1) { animation-delay: .0s; }
.mural-lista .mural-card:nth-child(2) { animation-delay: .08s; }
.mural-lista .mural-card:nth-child(3) { animation-delay: .12s; }
.mural-lista .mural-card:nth-child(4) { animation-delay: .16s; }
.mural-lista .mural-card:nth-child(5) { animation-delay: .20s; }

.mural-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15, 52, 96, .1);
}

.mural-card-badge {
    transition: transform .2s ease;
}

.mural-card:hover .mural-card-badge {
    transform: scale(1.08);
}

/* ── Produto search results ── */

.produto-results {
    animation: fadeInUp .25s ease-out both;
}

.produto-item {
    transition: background .2s ease, transform .15s ease;
}

.produto-item:hover {
    transform: translateX(4px);
}

.produto-selecionado {
    animation: slideInLeft .3s ease-out both;
}

/* ── Switch toggle ── */

.slider {
    transition: background .3s ease;
}

.slider::before {
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

/* ── Toast aprimorado ── */

.toast {
    transition: bottom .4s cubic-bezier(.34, 1.56, .64, 1);
}

/* ── Skeleton loading ── */

.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* ── Prefers reduced motion ── */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}