/* assets/css/style.css - Sistema de Investimentos Cripto Glassmorphism */
:root {
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius: 20px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.25);
    
    /* Variáveis Base com Fallback */
    --bg-color: #000000;
    --auth-bg: #000000;
    --text-color: #ffffff;
    --text-muted: #a1a1aa;
    --primary-color: #f59e0b;
    --btn-primary-bg: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --btn-primary-text: #000000;
    
    --header-bg: rgba(0, 0, 0, 0.75);
    --header-text: #ffffff;
    --header-border: rgba(255, 255, 255, 0.12);
    
    --sidebar-bg: rgba(0, 0, 0, 0.88);
    --sidebar-text: #f4f4f5;
    --sidebar-border: rgba(255, 255, 255, 0.12);
    
    --footer-bg: rgba(0, 0, 0, 0.92);
    --footer-text: #a1a1aa;
    --footer-border: rgba(255, 255, 255, 0.12);
    
    --footer-mobile-bg: rgba(0, 0, 0, 0.94);
    --footer-mobile-text: #f4f4f5;
    --footer-mobile-border: rgba(255, 255, 255, 0.12);
    
    --card-bg: rgba(10, 10, 10, 0.75);
    --card-border: rgba(245, 158, 11, 0.35);
    --glass-blur: blur(20px) saturate(180%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    animation: fadeGlobal 0.3s ease-out;
}

/* Tipografia Global */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

p {
    color: var(--text-color);
    opacity: 0.85;
}

a {
    color: var(--primary-color);
    transition: opacity 0.2s;
}

/* Header Fixo & Glass */
header {
    background-color: var(--header-bg);
    border-bottom: 1px solid var(--header-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 56px;
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body {
    padding-top: 56px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--header-text);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    height: 36px;
    max-width: 180px;
    object-fit: contain;
}

/* Botões Modernos Fintech */
.btn-action {
    background: var(--btn-primary-bg, var(--primary-color)) !important;
    color: var(--btn-primary-text, #ffffff) !important;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-action::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.5s;
}

.btn-action:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

.btn-action:hover::after {
    left: 100%;
}

.btn-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s;
    backdrop-filter: blur(8px);
}

.btn-card:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-color);
    opacity: 0.8;
    max-width: 650px;
    margin: 0 auto 2rem;
}

/* Cards Grid Glassmorphism */
.investments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0 4rem;
}

.card {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.9), inset 0 1px 0 0 rgba(255, 255, 255, 0.16) !important;
    color: var(--text-color);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    pointer-events: none;
    z-index: 2;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-color) !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.05);
}

.card-body {
    padding: 1.5rem;
}

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

.card-desc {
    color: var(--text-color);
    opacity: 0.75;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.stat-label {
    color: var(--text-color);
    opacity: 0.7;
    display: block;
    font-size: 0.8rem;
}

.stat-value {
    font-weight: 800;
    color: var(--primary-color);
}

/* Footer Glass */
footer {
    background-color: var(--footer-bg);
    border-top: 1px solid var(--card-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 2.5rem 0;
    text-align: center;
    color: var(--footer-text);
}

footer a {
    color: var(--footer-text);
}

footer a:hover {
    color: var(--primary-color);
}

/* Formulários & Controles Globais */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.9;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    transition: all 0.25s;
    backdrop-filter: blur(8px);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

.form-control::placeholder {
    color: var(--text-color);
    opacity: 0.45;
}

.btn-block {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

/* Alertas Glass */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* --- DASHBOARD LAYOUT GLASS --- */
.d-flex { display: flex; }
.h-100vh { min-height: 100vh; }

.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--sidebar-border);
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100% - 56px);
    z-index: 900;
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--header-border);
}

.sidebar-menu {
    padding: 1rem;
    flex: 1;
    overflow-y: auto;
}

.menu-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--sidebar-text);
    opacity: 0.6;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
    padding-left: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.3rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: var(--card-border);
    color: var(--primary-color);
}

.nav-link .iconify, .nav-link svg {
    margin-right: 10px;
    font-size: 20px;
    flex-shrink: 0;
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: calc(100vh - 56px);
    padding: 2rem;
    transition: margin-left 0.3s ease-in-out, width 0.3s ease-in-out;
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    header {
        height: 52px !important;
        padding: 0 1rem !important;
    }
    body {
        padding-top: 52px !important;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.78);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }
    .close-sidebar-btn {
        display: inline-flex !important;
    }
    .sidebar {
        top: 52px;
        height: calc(100% - 52px);
        transform: translateX(-100%);
        z-index: 999;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 1.25rem 1rem;
    }
    .hero h1 {
        font-size: 2.1rem;
    }
    .mobile-bottom-nav {
        display: block !important;
    }
    body.dashboard-body {
        padding-bottom: 75px;
    }
    .page-header {
        margin-bottom: 1rem;
    }
    .page-header h1 {
        font-size: 1.2rem;
    }
    .page-header p {
        font-size: 0.8rem;
    }
}

/* --- MODAL GLASS --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(6px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    backdrop-filter: var(--glass-blur) !important;
    -webkit-backdrop-filter: var(--glass-blur) !important;
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    color: var(--text-color);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--header-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.2s;
}

.modal-close:hover {
    opacity: 1;
    color: var(--primary-color);
}

.modal-body {
    padding: 1.5rem;
}

/* Calculadora & Mini Stats Glass */
.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 1.2rem;
    border-radius: 14px;
    border: 1px solid var(--card-border);
}

.calc-item label {
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.7;
    display: block;
    margin-bottom: 3px;
}

.calc-item strong {
    font-size: 1.05rem;
    color: var(--primary-color);
}

/* --- MOBILE BOTTOM NAV GLASS --- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--footer-mobile-bg, var(--footer-bg));
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--footer-mobile-border, var(--card-border));
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    list-style: none;
    width: 100%;
    margin: 0;
    padding: 6px 0;
}

.mobile-nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    transition: color 0.2s;
}

.mobile-nav-item a.active,
.mobile-nav-item a:hover {
    color: var(--primary-color);
}

.mobile-nav-item .iconify, .mobile-nav-item svg {
    font-size: 20px;
    margin-bottom: 2px;
}

/* --- PAGE HEADERS MINIMALISTAS & MODERNOS --- */
.page-header {
    margin-bottom: 1.25rem;
}

.page-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.3px;
    margin-bottom: 0.2rem;
    line-height: 1.25;
}

.page-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.75;
    line-height: 1.4;
    margin: 0;
}

.page-header h1 i,
.page-header h1 svg {
    display: none !important; /* Limpo e moderno, sem poluicao visual de icones */
}

.highlight-name {
    color: var(--primary-color);
    font-weight: 700;
}

/* Animação Global & Transição Suave entre Páginas */
@keyframes pageFadeIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

main.main-content, .hero, .fintech-auth-screen, .container {
    animation: pageFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

body.dashboard-body .main-content {
    padding-top: 2rem;
}
