/* =====================================================================
   POSICIONA BEAUTY — tema do site sobre Bootstrap 5
   Branco de base, areia como apoio, dourado na ação.
   Mesma paleta da página /instagram.

   DOIS PAPÉIS PARA O DOURADO — não misturar:
     --st-accent         superfície (fundo de botão, badge, barra).
                         Sempre com TEXTO ESCURO por cima.
     --st-accent-strong  texto, link e ícone sobre fundo claro.
                         Branco sobre o dourado claro dá 2.2:1 e reprova;
                         por isso os botões usam --st-accent-text.

   O painel administrativo NÃO usa estas cores: /admin carrega
   admin.css depois deste arquivo e sobrescreve tudo por um cinza
   neutro, porque lá o que importa é o dado, não a marca.
   ===================================================================== */

/* ── Reset & Base ─────────────────────────────────── */
:root {
    --st-bg: #FFFFFF;              /* base: branco                      */
    --st-bg-dark: #F4EFE8;         /* areia: faixas, campos, hero       */
    --st-bg-card: #FFFFFF;
    --st-bg-card-hover: #FAF8F5;
    --st-accent: #D3A86F;          /* dourado — superfície de ação      */
    --st-accent-text: #241C17;     /* texto sobre o dourado — 7.0:1     */
    --st-accent-hover: #C08F4E;
    --st-accent-strong: #8C5F2C;   /* dourado escuro — texto/link 5.5:1 */
    --st-accent-glow: rgba(211, 168, 111, 0.22);
    --st-brand: #F4EFE8;
    --st-brand-soft: #FAF8F5;
    --st-text: #241C17;            /* 15.6:1 sobre o branco             */
    --st-text-secondary: #6E6058;  /*  5.4:1                            */
    --st-text-muted: #8C8078;      /*  4.1:1 — só apoio, nunca leitura  */
    --st-border: #E7DFD4;
    --st-border-light: #F0E9E1;
    --st-border-strong: #C9BCAE;
    --st-danger: #9B4A42;
    --st-warning: #8A6A28;
    --st-info: #4A5C73;
    --st-success: #4A6B4F;
    --st-radius: 14px;
    --st-radius-sm: 10px;
    --st-shadow: 0 1px 2px rgba(36, 28, 23, 0.04), 0 4px 14px rgba(36, 28, 23, 0.05);
    --st-shadow-lg: 0 1px 2px rgba(36, 28, 23, 0.05), 0 10px 26px rgba(36, 28, 23, 0.08);
    --st-transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--st-bg);
    color: var(--st-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--st-accent-strong);
    text-decoration: none;
    transition: var(--st-transition);
}
a:hover {
    color: var(--st-text);
}

::selection {
    background: var(--st-accent);
    color: var(--st-accent-text);
}

/* ── Navbar ────────────────────────────────────────── */
.santieri-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--st-border);
    padding: 0.6rem 0;
    z-index: 1050;
}

.logo-navbar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--st-border);
    object-fit: cover;
}

.brand-text {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--st-text);
}

.santieri-navbar .nav-link {
    color: var(--st-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--st-transition);
}
.santieri-navbar .nav-link:hover {
    color: var(--st-text);
}

.navbar-spacer {
    height: 68px;
}

/* ── Botões ────────────────────────────────────────── */
.btn-accent {
    background: var(--st-accent);
    color: var(--st-accent-text);
    border: 1px solid var(--st-accent);
    font-weight: 600;
    padding: 0.55rem 1.5rem;
    border-radius: var(--st-radius-sm);
    transition: var(--st-transition);
}
.btn-accent:hover {
    background: var(--st-accent-hover);
    border-color: var(--st-accent-hover);
    color: var(--st-accent-text);
}

.btn-outline-accent {
    border: 1px solid var(--st-border-strong);
    color: var(--st-text);
    background: transparent;
    font-weight: 600;
    padding: 0.55rem 1.5rem;
    border-radius: var(--st-radius-sm);
    transition: var(--st-transition);
}
.btn-outline-accent:hover {
    background: var(--st-bg-dark);
    color: var(--st-text);
    border-color: var(--st-border-strong);
}

.btn-accent-lg {
    background: var(--st-accent);
    color: var(--st-accent-text);
    border: 1px solid var(--st-accent);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.85rem 2.5rem;
    border-radius: var(--st-radius);
    transition: var(--st-transition);
}
.btn-accent-lg:hover {
    background: var(--st-accent-hover);
    border-color: var(--st-accent-hover);
    color: var(--st-accent-text);
}

/* ── Cards ─────────────────────────────────────────── */
.card-santieri {
    background: var(--st-bg-card);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    overflow: hidden;
    transition: var(--st-transition);
}
.card-santieri:hover {
    background: var(--st-bg-card-hover);
    border-color: var(--st-border-strong);
    box-shadow: var(--st-shadow);
}

.card-santieri .card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-santieri .card-body {
    padding: 1.25rem;
}

.card-santieri .card-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--st-text);
}

.card-santieri .card-text {
    color: var(--st-text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Hero Section (Landing Page) ───────────────────── */
.hero-section {
    position: relative;
    padding: 5rem 0 3rem;
    text-align: center;
    overflow: hidden;
    background: var(--st-bg-dark);
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.hero-section .text-accent {
    color: var(--st-accent-strong);
}

.hero-section p {
    color: var(--st-text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ── Seção de Produtos ─────────────────────────────── */
.section-produtos {
    padding: 3rem 0 4rem;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
}

/* ── Página do Produto ─────────────────────────────── */
.produto-video-wrapper {
    position: relative;
    border-radius: var(--st-radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--st-shadow-lg);
    margin-bottom: 2rem;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
}

.produto-video-wrapper iframe,
.produto-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Quando NÃO tem vídeo (imagem ou placeholder) */
.produto-video-wrapper--static {
    position: relative;
    border-radius: var(--st-radius);
    overflow: hidden;
    background: var(--st-bg-dark);
    box-shadow: var(--st-shadow);
    margin-bottom: 2rem;
    padding-bottom: 0;
    height: auto;
}

.produto-video-wrapper--static img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
}

.produto-descricao {
    color: var(--st-text);
    font-size: 1rem;
    line-height: 1.8;
}

/* ── Checkout ──────────────────────────────────────── */
.checkout-container {
    max-width: 560px;
    margin: 2rem auto;
}

.checkout-card {
    background: var(--st-bg-card);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 2rem;
    box-shadow: var(--st-shadow);
}

.checkout-step {
    display: none;
}
.checkout-step.active {
    display: block;
}

.step-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--st-border);
    transition: var(--st-transition);
}
.step-dot.active {
    background: var(--st-accent);
}
.step-dot.completed {
    background: var(--st-accent-strong);
}

/* QR Code PIX — o fundo TEM que ser branco puro:
   leitor de banco falha em fundo colorido. */
.pix-qrcode {
    background: #fff;
    padding: 1rem;
    border-radius: var(--st-radius-sm);
    display: inline-block;
    margin: 1rem 0;
    border: 1px solid var(--st-border);
}

.pix-qrcode img {
    width: 220px;
    height: 220px;
}

.pix-code-box {
    background: var(--st-bg-dark);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    padding: 1rem;
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    color: var(--st-text-secondary);
    position: relative;
    cursor: pointer;
}
.pix-code-box:hover {
    border-color: var(--st-border-strong);
    color: var(--st-text);
}

/* ── Forms ─────────────────────────────────────────── */
.form-control-dark {
    background: #fff;
    border: 1px solid var(--st-border-strong);
    color: var(--st-text);
    border-radius: var(--st-radius-sm);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: var(--st-transition);
}
.form-control-dark:focus {
    background: #fff;
    border-color: var(--st-accent-strong);
    color: var(--st-text);
    box-shadow: 0 0 0 3px var(--st-accent-glow);
    outline: none;
}
.form-control-dark::placeholder {
    color: var(--st-text-muted);
}

.form-label-dark {
    color: var(--st-text);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

/* Input de código token */
.token-inputs {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.token-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: #fff;
    border: 2px solid var(--st-border-strong);
    border-radius: var(--st-radius-sm);
    color: var(--st-text);
    transition: var(--st-transition);
}
.token-input:focus {
    border-color: var(--st-accent-strong);
    box-shadow: 0 0 0 3px var(--st-accent-glow);
    outline: none;
}

/* ── Login ─────────────────────────────────────────── */
.login-container {
    max-width: 420px;
    margin: 3rem auto;
}

.login-card {
    background: var(--st-bg-card);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--st-shadow);
    text-align: center;
}

/* ── Portal do Aluno ───────────────────────────────── */
.portal-welcome {
    padding: 2rem 0;
}

.portal-welcome h2 {
    font-weight: 700;
}

.curso-card {
    background: var(--st-bg-card);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    overflow: hidden;
    transition: var(--st-transition);
}
.curso-card:hover {
    border-color: var(--st-accent);
    box-shadow: var(--st-shadow);
}

/* ── Aulas / Curso ─────────────────────────────────── */
.aula-item {
    background: var(--st-bg-card);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--st-transition);
}
.aula-item:hover {
    border-color: var(--st-border-strong);
}

.aula-item.active {
    border-color: var(--st-accent);
    background: var(--st-bg-dark);
}

.video-player-wrapper {
    position: relative;
    border-radius: var(--st-radius);
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
}

.video-player-wrapper iframe,
.video-player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Admin ─────────────────────────────────────────────
   Base apenas. /admin carrega admin.css depois e
   substitui esta paleta por um cinza neutro. ── */
.admin-sidebar {
    background: var(--st-bg-dark);
    border-right: 1px solid var(--st-border);
    min-height: 100vh;
    padding: 1.5rem 0;
    position: fixed;
    width: 250px;
    top: 0;
    left: 0;
    z-index: 1040;
}

.admin-sidebar .nav-link {
    color: var(--st-text-secondary);
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0;
    transition: var(--st-transition);
}
.admin-sidebar .nav-link:hover {
    background: var(--st-bg-card);
    color: var(--st-text);
}
.admin-sidebar .nav-link.active {
    background: var(--st-bg-card);
    color: var(--st-text);
    border-right: 3px solid var(--st-accent-strong);
}

.admin-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: 100vh;
}

.admin-stat-card {
    background: var(--st-bg-card);
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    padding: 1.5rem;
    text-align: center;
}

.admin-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--st-text);
}

.admin-stat-card .stat-label {
    color: var(--st-text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

/* ── Tables ────────────────────────────────────────── */
.table-dark-custom {
    color: var(--st-text);
}
.table-dark-custom thead th {
    background: var(--st-bg-dark);
    color: var(--st-text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--st-border);
    padding: 0.85rem 1rem;
}
.table-dark-custom tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--st-border);
    vertical-align: middle;
    font-size: 0.9rem;
}
.table-dark-custom tbody tr:hover {
    background: var(--st-bg-dark);
}

/* ── Badges ────────────────────────────────────────── */
.badge-accent {
    background: var(--st-accent);
    color: var(--st-accent-text);
    font-weight: 600;
}

.badge-pending {
    background: #F6EBD6;
    color: var(--st-warning);
}

.badge-confirmed {
    background: #E4EFE6;
    color: var(--st-success);
}

.badge-cancelled {
    background: #F6E0DD;
    color: var(--st-danger);
}

/* ── Alerts ────────────────────────────────────────── */
.alert-santieri {
    background: var(--st-bg-card);
    border: 1px solid var(--st-border);
    border-left: 3px solid var(--st-accent);
    color: var(--st-text);
    border-radius: var(--st-radius-sm);
    padding: 1rem 1.25rem;
}

.alert-santieri.alert-danger {
    border-left-color: var(--st-danger);
    background: #FDF7F6;
}

.alert-santieri.alert-warning {
    border-left-color: var(--st-warning);
    background: #FEFAF3;
}

.alert-santieri.alert-success {
    border-left-color: var(--st-success);
    background: #F5FAF6;
}

/* ── Footer ────────────────────────────────────────── */
.santieri-footer {
    background: var(--st-bg-dark);
    border-top: 1px solid var(--st-border);
}

.logo-footer {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--st-border);
    object-fit: cover;
}

/* ── Loading Spinner ───────────────────────────────── */
.spinner-accent {
    color: var(--st-accent-strong);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ── Utilities ─────────────────────────────────────── */
.text-accent { color: var(--st-accent-strong) !important; }
.bg-dark-card { background: var(--st-bg-card) !important; }
.border-accent { border-color: var(--st-accent) !important; }

.glow-accent {
    box-shadow: var(--st-shadow-lg);
}

/* ── Scrollbar (Webkit) ────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--st-bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--st-border-strong);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--st-text-muted);
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 991.98px) {
    .admin-sidebar {
        display: none;
    }
    .admin-content {
        margin-left: 0;
    }
    .hero-section h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 767.98px) {
    .checkout-card {
        padding: 1.5rem;
    }
    .token-input {
        width: 42px;
        height: 52px;
        font-size: 1.2rem;
    }
    .pix-qrcode img {
        width: 180px;
        height: 180px;
    }
    .card-santieri .card-img-top {
        height: 160px;
    }
}
