:root {
    --primary-color: #1a5d1a;
    --primary-light: #2d882d;
    --secondary-color: #f8b400;
    --dark-color: #1c1c1c;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
}

/* Navbar */
.navbar {
    background: linear-gradient(90deg, #0f3c0f 0%, var(--primary-color) 60%, #0f3c0f 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    padding: 0.8rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    color: var(--secondary-color) !important;
    font-weight: 600;
    font-size: 1.4rem;
}

.navbar .nav-link {
    color: var(--light-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.navbar .nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Highlighted CTA in navbar */
.navbar .btn.btn-warning {
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.navbar .btn.btn-warning:hover {
    filter: brightness(0.95);
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, var(--primary-color) 0%, #0f3c0f 100%) !important;
    min-height: calc(100vh - 62px);
    max-height: calc(100vh - 62px);
    position: sticky;
    top: 62px;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15);
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 2rem;
    padding-top: 1rem;
}

/* Scrollbar personalizada para sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Adiciona indicador visual de scroll */
.sidebar::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, rgba(15, 60, 15, 0.9), transparent);
    pointer-events: none;
    display: block;
}

.sidebar .nav-link {
    color: #f1f5f2;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.8rem 1.3rem;
    border-radius: 9999px; /* pill */
    margin: 0.35rem 0.75rem;
    transition: background .25s ease, color .25s ease, transform .2s ease, box-shadow .2s ease;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

.sidebar .nav-link:hover {
    background: linear-gradient(90deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 100%) !important;
    color: #ffffff !important;
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.sidebar .nav-link.active {
    background: var(--secondary-color) !important;
    color: var(--dark-color) !important;
    box-shadow: 0 3px 12px rgba(248,180,0,0.4);
    font-weight: 600;
    border-left: none;
}

.sidebar .nav-link i {
    width: 20px;
    min-width: 20px;
    text-align: center;
    margin-right: 0;
    font-size: 1.05rem;
}

/* Sidebar small title */
.sidebar-title {
    letter-spacing: .08em;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

/* Sidebar sizing (desktop) */
@media (min-width: 768px) {
    .sidebar {
        width: 250px;
        flex: 0 0 250px;
    }
    .sidebar .nav-link {
        padding: 0.75rem 1rem;
    }
}

/* Prevent brand text from wrapping in the navbar */
.navbar-brand span { white-space: nowrap; }

/* Offcanvas (mobile) improvements */
@media (max-width: 767.98px) {
    .offcanvas .nav-link {
        padding: 0.9rem 1.1rem;
        border-radius: 9999px;
        margin: 0.3rem 0.5rem;
    }
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Buttons */
.btn {
    border-radius: 12px;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease, filter .2s ease;
    will-change: transform, box-shadow;
}

.btn:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    /* transform handled by .btn:hover */
}

.btn-link {
    text-decoration: none;
}

.btn-link:hover {
    color: var(--primary-light);
}

/* Warning CTA */
.btn-warning {
    color: #2b2b2b;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(248,180,0,0.25);
    transition: all 0.2s ease;
}
.btn-warning:hover {
    filter: brightness(0.98);
    box-shadow: 0 6px 18px rgba(248,180,0,0.35);
}

/* Outline light button (navbar mobile toggles, etc.) */
.btn-outline-light {
    border-width: 1.5px;
    color: #fff;
    border-radius: 12px;
    transition: all 0.2s ease;
}
.btn-outline-light:hover {
    background-color: rgba(255,255,255,0.12);
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}

/* Accessibility: reduce motion */
@media (prefers-reduced-motion: reduce) {
    .btn, .btn:hover, .btn:active {
        transition: none;
        transform: none;
    }
}

/* Forms */
.form-control {
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(26, 93, 26, 0.25);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 4px;
    padding: 1rem 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--dark-color);
    font-weight: 600;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Custom Components */
.feature-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Timeline */
.timeline h5 {
    color: var(--primary-color);
    font-weight: 600;
}

.timeline p {
    color: var(--gray-color);
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--secondary-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.jumbotron {
    animation: fadeIn 1s ease-out;
}

/* Hero Section */
.hero {
    height: 250px;
    overflow: hidden;
    position: relative;
}

@media (max-width: 768px) {
    .hero {
        height: 25vh;
    }
}

.hero-img {
    object-fit: cover;
    height: 100% !important;
    width: 100%;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-left: 8%;
    background: rgba(0,0,0,0.45);
    color: var(--light-color);
}

/* Login Card */
.card-login {
    backdrop-filter: blur(4px);
    background-color: rgba(255,255,255,0.85);
}

.login-logo {
    max-width: 240px;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

/* WhatsApp button */
.btn-whatsapp {
    background-color: #25D366;
    border-color: #25D366;
    color: #fff;
}
.btn-whatsapp:hover {
    background-color: #1ebe57;
    border-color: #1ebe57;
    color: #fff;
}

/* Offcanvas sidebar (mobile) */
.offcanvas-body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 !important;
}

.offcanvas-body .sidebar {
    height: auto;
    min-height: 100%;
    position: relative;
    top: 0;
    overflow-y: visible;
}

/* Scrollbar para offcanvas */
.offcanvas-body::-webkit-scrollbar {
    width: 8px;
}

.offcanvas-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.offcanvas-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.offcanvas-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Responsiveness */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .sidebar {
        min-height: auto;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .jumbotron {
        padding: 2rem !important;
    }
}
