:root {
    --primary-color: var(--brand-green);
    /* NetSheet Green token */
    --primary-dark: var(--primary-700);
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --header-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 25px;
}

/* Modern Header Styles */
.navbar {
    background: var(--primary-gradient) !important;
    box-shadow: var(--header-shadow);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand svg {
    transition: transform 0.3s ease;
}

.navbar-brand:hover svg {
    transform: rotate(-5deg);
}

.navbar-nav {
    gap: 0.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::before {
    transform: scale(1);
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

/* Button Styles */
.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: var(--border-radius);
}

.btn:hover::before {
    transform: scale(1);
}

.btn-nav {
    padding: 0.5rem 1.5rem !important;
    font-size: 0.9rem;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Card Styles */
.card {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

.card-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Form Improvements */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    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(22, 163, 74, 0.25);
    /* NetSheet Green */
    transform: translateY(-2px);
}

.form-floating label {
    padding: 0.75rem 1rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border-radius: 1rem;
        padding: 1rem;
    }

    .nav-link {
        margin: 0.25rem 0;
    }

    .btn-nav {
        margin-top: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .btn,
    .brand-accent {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.text-gradient-primary {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-primary-gradient {
    background: var(--primary-gradient) !important;
}

.shadow-xl {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
}

/* Badge Styles */
.badge {
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.bg-primary-subtle {
    background-color: rgba(0, 123, 255, 0.1) !important;
    color: var(--primary-color) !important;
}

/* Loading States */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Focus States for Accessibility */
.nav-link:focus,
.btn:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Minimal accent class for prominent CTA in headers */
.brand-accent {
    background: var(--primary-gradient);
    color: #fff !important;
    border-radius: var(--border-radius);
    padding: 0.75rem 2rem;
    font-weight: 600;
    display: inline-block;
    text-decoration: none;
}

.brand-accent:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff !important;
}

/* Mobile-specific: ensure header action buttons wrap and Sign Up stays fully visible on narrow viewports (<=480px) */
@media (max-width: 480px) {

    /* Allow navbar items to wrap so the Sign Up CTA isn't pushed off-screen */
    .navbar-collapse .navbar-nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    /* Keep each nav-item sized to its content to prevent overflow */
    .navbar-collapse .nav-item {
        flex: 0 0 auto;
    }

    /* Scoped adjustments for the Sign Up button in the header */
    .navbar-collapse .nav-link.btn.btn-outline-light {
        padding: 6px 10px !important;
        margin-left: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
    }
}