/* =====================================================================
   SANTIERI PRODUTORA — Dark Theme sobre Bootstrap 5
   Cores: #171717 / #0e0e0e (fundo) | #25D366 (destaque) | Inter (fonte)
   ===================================================================== */

/* ── Reset & Base ─────────────────────────────────── */
:root {
    --st-bg: #171717;
    --st-bg-dark: #0e0e0e;
    --st-bg-card: #1e1e1e;
    --st-bg-card-hover: #252525;
    --st-accent: #25D366;
    --st-accent-hover: #1fb858;
    --st-accent-glow: rgba(37, 211, 102, 0.15);
    --st-text: #FFFFFF;
    --st-text-secondary: #BDBDBD;
    --st-text-muted: #888888;
    --st-border: #2a2a2a;
    --st-border-light: #333333;
    --st-danger: #e74c3c;
    --st-warning: #f39c12;
    --st-info: #3498db;
    --st-success: #25D366;
    --st-radius: 12px;
    --st-radius-sm: 8px;
    --st-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --st-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --st-transition: all 0.3s 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);
    text-decoration: none;
    transition: var(--st-transition);
}
a:hover {
    color: var(--st-accent-hover);
}

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

/* ── Navbar ────────────────────────────────────────── */
.santieri-navbar {
    background: rgba(14, 14, 14, 0.95);
    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: 2px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
}

.brand-text {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.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: #000;
    border: none;
    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);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-outline-accent {
    border: 1.5px solid var(--st-accent);
    color: var(--st-accent);
    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-accent);
    color: #000;
}

.btn-accent-lg {
    background: var(--st-accent);
    color: #000;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.85rem 2.5rem;
    border-radius: var(--st-radius);
    transition: var(--st-transition);
}
.btn-accent-lg:hover {
    background: var(--st-accent-hover);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.35);
}

/* ── 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-light);
    transform: translateY(-4px);
    box-shadow: var(--st-shadow-lg);
}

.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);
}

.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: #000;
    box-shadow: var(--st-shadow-lg);
    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-secondary);
    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-light);
    transition: var(--st-transition);
}
.step-dot.active {
    background: var(--st-accent);
    box-shadow: 0 0 10px var(--st-accent-glow);
}
.step-dot.completed {
    background: var(--st-accent);
}

/* QR Code PIX */
.pix-qrcode {
    background: #fff;
    padding: 1rem;
    border-radius: var(--st-radius-sm);
    display: inline-block;
    margin: 1rem 0;
}

.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;
}

/* ── Forms (dark) ──────────────────────────────────── */
.form-control-dark {
    background: var(--st-bg-dark);
    border: 1px solid var(--st-border);
    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: var(--st-bg-dark);
    border-color: var(--st-accent);
    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-secondary);
    font-weight: 500;
    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: var(--st-bg-dark);
    border: 2px solid var(--st-border);
    border-radius: var(--st-radius-sm);
    color: var(--st-text);
    transition: var(--st-transition);
}
.token-input:focus {
    border-color: var(--st-accent);
    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: 0 0 20px var(--st-accent-glow);
}

/* ── 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-light);
}

.aula-item.active {
    border-color: var(--st-accent);
    background: rgba(37, 211, 102, 0.05);
}

.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 ─────────────────────────────────────────── */
.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-accent-glow);
    color: var(--st-accent);
    border-right: 3px solid var(--st-accent);
}

.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-accent);
}

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

/* ── Tables (admin) ────────────────────────────────── */
.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-card);
}

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

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

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

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

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

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

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

/* ── 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: 2px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

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

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

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

.glow-accent {
    box-shadow: 0 0 20px var(--st-accent-glow);
}

/* ── Scrollbar (Webkit) ────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--st-bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--st-border-light);
    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;
    }
}