/* style.css */

/* --- VARIÁVEIS E GERAL --- */
:root {
    --primary-color: #0f172a;
    --text-color: #334155;
    --accent-color: #16a34a; /* Verde Principal acessível */
    --bg-color: #f0fdf4;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-hover: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.10);
    --blob-1: hsla(140, 70%, 85%, 1);
    --blob-2: hsla(200, 70%, 85%, 1);
    --blob-3: hsla(34, 100%, 85%, 1);
    --input-bg: rgba(255, 255, 255, 0.5);
    --input-bg-focus: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
    --primary-color: #f8fafc;
    --text-color: #cbd5e1;
    --accent-color: #16a34a;
    --bg-color: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.65);
    --glass-bg-hover: rgba(30, 41, 59, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --blob-1: hsla(140, 50%, 20%, 1);
    --blob-2: hsla(200, 50%, 20%, 1);
    --blob-3: hsla(34, 50%, 20%, 1);
    --input-bg: rgba(15, 23, 42, 0.5);
    --input-bg-focus: rgba(15, 23, 42, 0.9);
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    /* Blobs de fundo dinâmicos */
    background-image: 
        radial-gradient(at 0% 0%, var(--blob-1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, var(--blob-2) 0, transparent 50%), 
        radial-gradient(at 100% 0%, var(--blob-3) 0, transparent 50%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
    animation: breatheBg 15s infinite alternate ease-in-out;
}

@keyframes breatheBg {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent-color), #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-card {
    position: relative;
}
.glow-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--accent-color), transparent, var(--accent-color));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.glow-card:hover::before {
    opacity: 0.5;
}

.fw-black {
    font-weight: 900 !important;
}

.floating-img {
    animation: floatImg 6s ease-in-out infinite;
}
@keyframes floatImg {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.03em;
}

/* --- GLASSMORPHISM --- */
.glass-nav {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15);
    background: var(--glass-bg-hover);
}

/* --- COMPONENTES --- */
.hero-title {
    font-weight: 800;
    line-height: 1.1;
    background: -webkit-linear-gradient(45deg, #0f172a, #334155);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-glass-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-glass-primary:hover {
    background: #15803d;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

/* --- ACCORDION --- */
.accordion-item {
    border: none;
    background: transparent;
    margin-bottom: 10px;
}

.accordion-button {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border-radius: 12px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: var(--text-color);
}

.accordion-button:not(.collapsed) {
    background: var(--glass-bg-hover);
    color: var(--accent-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.accordion-collapse {
    background: transparent;
}

.accordion-body {
    background: var(--glass-bg);
    border-radius: 12px;
    margin-top: 5px;
    padding: 1rem;
    color: var(--text-color);
}

/* --- FORMULARIOS --- */
.form-control, .form-select {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 12px;
    color: var(--text-color);
}

.form-control:focus, .form-select:focus {
    background: var(--input-bg-focus);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
    border-color: var(--accent-color);
    color: var(--text-color);
}

/* Fix text colors for accessibility (WCAG AA) */
.text-muted, .text-secondary {
    color: #475569 !important;
}

/* Fix text colors inside cards for dark mode */
[data-theme="dark"] .text-dark {
    color: #f8fafc !important;
}
[data-theme="dark"] .text-muted, [data-theme="dark"] .text-secondary {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .bg-white {
    background-color: var(--glass-bg) !important;
}
[data-theme="dark"] .bg-light {
    background-color: rgba(255,255,255,0.05) !important;
}
[data-theme="dark"] .table {
    color: var(--text-color);
}
[data-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd)>* {
    color: var(--text-color);
}

/* --- ACESSIBILIDADE --- */
@media (prefers-reduced-motion: reduce) {
    body { animation: none !important; }
    .floating-img { animation: none !important; }
    .glass-card { transition: none !important; }
}

/* =========================================
   ESTILOS ESPECÍFICOS DE PÁGINAS (COMPONENTS)
   ========================================= */

/* --- PAINEL DO CLIENTE --- */
.header-profile {
    background: linear-gradient(135deg, var(--accent-color), #047857);
    color: white;
    padding: 30px 20px 60px 20px;
    border-radius: 0 0 30px 30px;
    position: relative;
}

.main-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: -40px 20px 20px 20px;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
    z-index: 2;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom)) 0;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
}

.nav-item-b {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    opacity: 0.6;
    font-size: 0.75rem;
    transition: all 0.3s;
}

.nav-item-b i {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

.nav-item-b.active {
    color: var(--accent-color);
    opacity: 1;
    font-weight: bold;
}

.nav-item-b.active i {
    transform: scale(1.1);
}

/* --- CHECKOUT --- */
.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--accent-color), #047857);
    z-index: -1;
    border-radius: 0 0 30px 30px;
}

.checkout-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    margin-top: 20px;
}

.pkg-card {
    border: 2px solid var(--glass-border);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--input-bg);
    position: relative;
}

.pkg-card:hover {
    border-color: rgba(34, 197, 94, 0.5);
    background: var(--input-bg-focus);
    transform: translateY(-2px);
}

.pkg-card.selected {
    border-color: var(--accent-color);
    background: rgba(34, 197, 94, 0.05);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.15);
}

.badge-pop {
    position: absolute;
    top: -10px;
    right: 15px;
    background: #f59e0b;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(245, 158, 11, 0.3);
}

.pulsing-btn {
    animation: pulseBtn 2s infinite;
}

@keyframes pulseBtn {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* --- LOGIN E AUTOCADASTRO --- */
.login-card, .auth-card {
    max-width: 400px;
    margin: 40px auto;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.auth-card {
    max-width: 450px;
}

.header-login, .header-auth {
    background: linear-gradient(135deg, var(--accent-color), #047857);
    color: white;
    padding: 30px 20px;
    text-align: center;
}