@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    --primary: #1FA97A;
    --primary-hover: #168a62;
    --accent: #3B82F6;
    --dark-bg: #0B1220;
    --card-bg: #111B2E;
    --card-bg-soft: #0F172A;
    --input-bg: #0F172A;
    --text-primary: #F9FAFB;
    --text-secondary: #D0DAE8;
    --placeholder: #9CA3AF;
    --border: #253044;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    animation: pageFade 220ms ease;
}

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

h1, h2, h3, .brand-name {
    font-family: 'Manrope', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--dark-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--placeholder);
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    height: calc(100vh - 64px);
    position: fixed;
    top: 64px;
    left: 0;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border);
    transition: all 0.3s ease;
    z-index: 40;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    transition: all 0.24s ease;
    border-left: 4px solid transparent;
    white-space: nowrap;
}

.sidebar-item svg {
    flex-shrink: 0;
}

.sidebar-item:hover, .sidebar-item.active {
    background-color: rgba(31, 169, 122, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-item.active {
    position: relative;
    font-weight: 600;
}

.sidebar-item.active::after {
    content: '';
    position: absolute;
    right: 1rem;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 5px rgba(31, 169, 122, 0.15);
}

/* Main Content Padding */
.main-content {
    margin-left: 260px;
    padding-top: 64px;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Mobile responsive sidebar */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Overlay escuro por trás da sidebar aberta no mobile — toca para fechar */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    top: 64px;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 39; /* abaixo da sidebar (z-40), acima do conteúdo */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sidebar-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}
@media (min-width: 1025px) {
    .sidebar-backdrop {
        display: none;
    }
}

/* Utility Classes */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.24);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.3);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.22s ease;
    box-shadow: 0 6px 18px rgba(31, 169, 122, 0.28);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(31, 169, 122, 0.35);
}

.btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.input-field {
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.625rem 1rem;
    border-radius: 0.625rem;
    width: 100%;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.report-chart-wrap {
    min-height: 300px;
    height: 100%;
}

@media (max-width: 1024px) {
    .report-chart-wrap {
        min-height: 260px;
    }
}

.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.goal-field {
    display: flex;
    flex-direction: column;
}

.goal-field-hint {
    margin-top: 0.375rem;
    min-height: 2.5rem;
    font-size: 0.75rem;
    line-height: 1.25rem;
    color: #6B7280;
}

/* Landing page — fundo diagonal com pontos verdes */
.landing-page {
    position: relative;
    min-height: 100vh;
    background-color: var(--dark-bg);
}

.landing-page::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #162032;
    background-image: radial-gradient(rgba(31, 169, 122, 0.45) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    clip-path: polygon(0 0, 100% 0, 0 100%);
}

.landing-page > * {
    position: relative;
    z-index: 1;
}

.stick-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.75rem;
    display: block;
}

.landing-feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto 0.75rem;
    display: block;
    color: #1FA97A;
}
