/* Professional Legal CSS Design System */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
    color: #1e293b;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Professional Color Palette */
:root {
    --navy-50: #f0f4ff;
    --navy-100: #e0e7ff;
    --navy-200: #c7d2fe;
    --navy-300: #a5b4fc;
    --navy-400: #818cf8;
    --navy-500: #6366f1;
    --navy-600: #4f46e5;
    --navy-700: #4338ca;
    --navy-800: #3730a3;
    --navy-900: #312e81;
    --navy-950: #1e1b4b;
    
    --gold-50: #fffbeb;
    --gold-100: #fef3c7;
    --gold-200: #fde68a;
    --gold-300: #fcd34d;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --gold-700: #b45309;
    --gold-800: #92400e;
    --gold-900: #78350f;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

/* Layout & Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Typography */
.text-navy {
    color: var(--navy-800);
}

.text-white {
    color: #ffffff;
}

.text-gray-light {
    color: var(--gray-300);
}

/* Fix for text-gray-light on dark backgrounds */
.features .text-gray-light {
    color: #ffffff !important;
    opacity: 0.9;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy-800);
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--navy-800);
}

.nav-buttons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Modern Button System - Fixed Spacing Issues */
.btn-primary, .btn-primary-large {
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(55, 48, 202, 0.25);
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

.btn-primary-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary:hover, .btn-primary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(55, 48, 202, 0.35);
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
}

.btn-secondary-large {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: var(--gray-800);
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.25);
}

.btn-secondary-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(245, 158, 11, 0.35);
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
}

.btn-outline-large, .btn-outline-white-large {
    background: transparent;
    border: 2px solid var(--navy-700);
    color: var(--navy-700);
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-outline-white-large {
    border-color: white;
    color: white;
}

.btn-outline-large:hover {
    background: var(--navy-700);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(55, 48, 202, 0.2);
}

.btn-outline-white-large:hover {
    background: white;
    color: var(--navy-800);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(255, 255, 255, 0.2);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ghost:hover {
    background: rgba(55, 48, 202, 0.05);
    color: var(--navy-700);
    transform: translateY(-1px);
}

/* Hero Section - FIXED SPACING */
.hero {
    background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
    padding: 8rem 0 4rem 0; /* INCREASED top padding to fix nav spacing */
    text-align: center;
}

.hero-content {
    max-width: 48rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .hero-content {
        max-width: 64rem;
    }
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
}

.hero-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

/* FIXED: Hero Button Spacing */
.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 2rem; /* PROPER SPACING BETWEEN BUTTONS */
    }
}

.hero-features {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

@media (min-width: 640px) {
    .hero-features {
        flex-direction: row;
        justify-content: center;
        gap: 2rem;
    }
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-item i {
    color: #10b981;
    width: 1rem;
    height: 1rem;
}

/* Features Section - Professional Navy Background */
.features {
    background: var(--navy-800);
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .section-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 3rem;
    }
}

.section-description {
    font-size: 1.125rem;
    max-width: 32rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .section-description {
        font-size: 1.25rem;
    }
}

.features-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gray-200);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.icon-navy {
    background: var(--navy-50);
    color: var(--navy-800);
}

.icon-gold {
    background: var(--gold-50);
    color: var(--gold-600);
}

.icon-green {
    background: #ecfdf5;
    color: #059669;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Stats Section */
.stats {
    background: var(--navy-800);
    padding: 4rem 0;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold-400) !important;
    margin-bottom: 0.5rem;
}

/* Ensure stats always display in gold */
.stats .stat-number {
    color: #fbbf24 !important;
}

.stat-label {
    font-size: 1.125rem;
    color: #ffffff !important;
    opacity: 0.95;
}

/* How It Works */
.how-it-works {
    background: var(--gray-50);
    padding: 5rem 0;
}

.steps-grid {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-item {
    text-align: center;
}

.step-number {
    width: 4rem;
    height: 4rem;
    background: var(--navy-800);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 4px 14px 0 rgba(55, 48, 202, 0.25);
    transition: all 0.3s ease;
}

.step-gold {
    background: var(--gold-500);
    color: var(--gray-800);
}

.step-green {
    background: #059669;
}

.step-number:hover {
    transform: scale(1.1) rotate(5deg);
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

@media (min-width: 640px) {
    .step-title {
        font-size: 1.5rem;
    }
}

.step-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Testimonials - FIXED SPACING AND STAR CUTOFF */
.testimonials {
    background: white;
    padding: 5rem 0;
}

.testimonial-carousel {
    max-width: 56rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .testimonial-carousel {
        max-width: 64rem;
    }
}

.testimonial-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.testimonial-card {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-radius: 1rem;
    padding: 4rem 3rem; /* INCREASED PADDING TO PREVENT STAR CUTOFF */
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: visible; /* FIXED: Prevent content cutoff */
    min-height: 350px; /* FIXED: Ensure adequate height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Enhanced fade transition animations */
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--navy-700) 0%, var(--gold-500) 100%);
    border-radius: 1rem 1rem 0 0;
}

.testimonial-stars {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 2rem;
    padding-top: 1rem; /* FIXED: Extra padding to prevent star cutoff */
}

.star-filled {
    color: var(--gold-500);
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.testimonial-quote {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--gray-800);
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-avatar {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(55, 48, 202, 0.3);
}

.author-info {
    text-align: left;
}

.author-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.author-role {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* FIXED: Carousel Controls Spacing */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem; /* PROPER SPACING */
    margin-top: 2rem;
}

.carousel-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-200) 100%);
    border: 2px solid var(--gray-300);
    color: var(--navy-700);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    color: white;
    border-color: var(--navy-700);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(55, 48, 202, 0.3);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: var(--gray-300);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    transform: scale(1.25);
    box-shadow: 0 2px 8px rgba(55, 48, 202, 0.4);
}

.carousel-progress {
    width: 100%;
    height: 0.25rem;
    background: rgba(203, 213, 225, 0.3);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 1.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--navy-700) 0%, var(--gold-500) 100%);
    border-radius: 9999px;
    transition: width 0.1s linear;
    width: 0%;
}

/* CTA Section - FIXED BUTTON SPACING */
.cta {
    background: var(--navy-800);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .cta-title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .cta-title {
        font-size: 3rem;
    }
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .cta-description {
        font-size: 1.25rem;
    }
}

/* FIXED: CTA Button Spacing */
.cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .cta-buttons {
        flex-direction: row;
        justify-content: center;
        gap: 2rem; /* PROPER SPACING BETWEEN BUTTONS */
    }
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--navy-900) 100%);
    color: var(--gray-100);
    padding: 4rem 0 2rem 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--navy-700) 0%, var(--gold-500) 50%, #10b981 100%);
}

.footer-main {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

@media (min-width: 768px) {
    .footer-main {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.footer-logo {
    color: var(--gold-500);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-description {
    color: var(--gray-300);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 0.5rem;
    color: var(--gold-400);
    font-size: 0.875rem;
    font-weight: 500;
}

.footer-column h4 {
    color: var(--gray-100);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-column a:hover {
    color: var(--gold-500);
    transform: translateX(4px);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.copyright {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 768px) {
    .footer-links {
        justify-content: flex-end;
    }
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--gold-500);
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 767px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 6rem 0 3rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .testimonial-card {
        padding: 2rem 1.5rem;
    }
    
    .testimonial-quote {
        font-size: 1rem;
    }
}

/* Authentication Pages */
.auth-body {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--navy-50) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.back-link:hover {
    color: var(--navy-700);
    background: rgba(55, 48, 202, 0.05);
    transform: translateX(-2px);
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 2rem 0;
}

.auth-container {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.auth-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
    max-width: 28rem;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 640px) {
    .auth-card {
        padding: 3rem;
    }
}

.auth-header-content {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.password-input-container {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.password-toggle:hover {
    color: var(--gray-600);
    background: rgba(0, 0, 0, 0.05);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--gray-600);
}

.checkbox-container input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 0.25rem;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"]:checked {
    background: var(--navy-600);
    border-color: var(--navy-600);
}

.forgot-password {
    color: var(--navy-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--navy-800);
}

.auth-button {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.button-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-error, .auth-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
    z-index: 1;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.auth-trust {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.trust-item:last-child {
    margin-bottom: 0;
}

.trust-item i {
    color: #16a34a;
    width: 1rem;
    height: 1rem;
}

.auth-features {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
}

@media (min-width: 640px) {
    .auth-features {
        padding: 3rem;
    }
}

.auth-features h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 2rem;
    text-align: center;
}

@media (min-width: 1024px) {
    .auth-features h3 {
        text-align: left;
    }
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-list .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-list .feature-item i {
    color: var(--navy-600);
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.feature-list .feature-item div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feature-list .feature-item strong {
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1rem;
}

.feature-list .feature-item span {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-footer {
    background: var(--gray-800);
    color: var(--gray-300);
    padding: 2rem 0;
    margin-top: auto;
}

.auth-footer .footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .auth-footer .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.auth-footer .footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 768px) {
    .auth-footer .footer-links {
        justify-content: flex-end;
    }
}

.auth-footer .footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.auth-footer .footer-links a:hover {
    color: var(--gold-500);
}

.auth-footer .copyright {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Dashboard Styles */
.dashboard-body {
    background: var(--gray-50);
    min-height: 100vh;
}

.dashboard-nav {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

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

.nav-menu {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--navy-700);
}

.nav-item.active {
    background: var(--navy-50);
    color: var(--navy-700);
}

.nav-item i {
    width: 1.25rem;
    height: 1.25rem;
}

.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-info:hover {
    background: var(--gray-100);
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.user-details {
    display: none;
    flex-direction: column;
    min-width: 0;
}

@media (min-width: 640px) {
    .user-details {
        display: flex;
    }
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    color: var(--gray-500);
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.user-menu-toggle:hover {
    color: var(--gray-600);
    background: var(--gray-100);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    min-width: 200px;
    z-index: 1001;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.dropdown-divider {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 0.5rem 0;
}

.dashboard-main {
    padding: 2rem 0;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

@media (max-width: 640px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.header-content h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.header-content p {
    color: var(--gray-600);
    font-size: 1rem;
}

.stats-overview {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-overview {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.stat-card .stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.stat-card .stat-icon.icon-purple {
    background: #f3f4f6;
    color: #7c3aed;
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-change.positive {
    color: #16a34a;
}

.stat-change i {
    width: 0.875rem;
    height: 0.875rem;
}

.stat-progress {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--navy-600) 0%, var(--navy-700) 100%);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.dashboard-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.dashboard-section {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

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

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--navy-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: var(--navy-800);
}

.view-all-link i {
    width: 1rem;
    height: 1rem;
}

.documents-list, .activity-list {
    padding: 1.5rem;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--gray-500);
}

.loading-spinner i {
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-icon {
    width: 4rem;
    height: 4rem;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    max-width: 20rem;
}

.document-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.document-card:last-child {
    margin-bottom: 0;
}

.document-card:hover {
    border-color: var(--navy-300);
    background: var(--navy-25);
}

.document-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--navy-50);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy-600);
    flex-shrink: 0;
}

.document-content {
    flex: 1;
    min-width: 0;
}

.document-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-meta {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.document-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.document-status.status-success {
    color: #16a34a;
}

.document-status.status-warning {
    color: #f59e0b;
}

.document-status.status-error {
    color: #dc2626;
}

.document-status.status-info {
    color: var(--navy-600);
}

.document-status i {
    width: 0.875rem;
    height: 0.875rem;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 2rem;
    height: 2rem;
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-600);
}

.action-btn:hover {
    background: var(--navy-50);
    border-color: var(--navy-300);
    color: var(--navy-700);
}

.quick-actions {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.action-card:hover {
    border-color: var(--navy-300);
    background: var(--navy-25);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-content {
    flex: 1;
}

.action-content h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.action-content p {
    font-size: 0.75rem;
    color: var(--gray-600);
}

.action-arrow {
    color: var(--gray-400);
    transition: all 0.3s ease;
}

.action-card:hover .action-arrow {
    color: var(--navy-600);
    transform: translateX(2px);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 2rem;
    height: 2rem;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    flex-shrink: 0;
}

.activity-description {
    color: var(--gray-900);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.activity-time {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.subscription-card {
    padding: 1.5rem;
}

.subscription-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.subscription-plan h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.plan-price {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background: #dcfce7;
    color: #16a34a;
}

.subscription-usage {
    margin-bottom: 1.5rem;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.usage-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.usage-label {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.usage-value {
    color: var(--gray-900);
    font-weight: 500;
    font-size: 0.875rem;
}

.error-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #fef2f2;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #fecaca;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    max-width: 20rem;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Workspace-Specific Button Styles */
.btn-find-content {
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(55, 48, 202, 0.25);
    white-space: nowrap;
}

.btn-find-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(55, 48, 202, 0.35);
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
}

.btn-find-content-secondary {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: var(--gray-800);
    border: none;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.25);
    white-space: nowrap;
}

.btn-find-content-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(245, 158, 11, 0.35);
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
}

.btn-workspace {
    background: transparent;
    border: 2px solid var(--navy-700);
    color: var(--navy-700);
    border-radius: 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn-workspace:hover {
    background: var(--navy-700);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgba(55, 48, 202, 0.2);
}

/* Professional result container styling */
.result-source-container {
    background: var(--gray-50);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-left: 3px solid var(--navy-600);
    margin-top: 0.5rem;
}

.result-source-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.result-source-title {
    color: var(--navy-800);
    font-weight: 600;
    font-size: 0.85rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-source-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.search-type-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Focus states for accessibility */
button:focus, a:focus {
    outline: 2px solid var(--gold-500);
    outline-offset: 2px;
}

/* Billing Dashboard Styles */
.billing-dashboard {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .billing-dashboard {
        grid-template-columns: 1fr 1fr;
    }
}

.billing-card {
    background: white;
    border-radius: 0.75rem;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.billing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.billing-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: between;
    gap: 1rem;
}

.billing-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.billing-card-title i {
    color: var(--navy-600);
    width: 1.25rem;
    height: 1.25rem;
}

.billing-card-content {
    padding: 1.5rem;
}

/* Subscription Overview */
.subscription-overview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.current-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--navy-50) 0%, var(--navy-100) 100%);
    border-radius: 0.75rem;
    border: 2px solid var(--navy-200);
}

.plan-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 0.25rem;
}

.plan-price {
    color: var(--navy-700);
    font-size: 1rem;
    font-weight: 500;
}

.plan-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.plan-status i {
    width: 1rem;
    height: 1rem;
}

.subscription-details {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .subscription-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.detail-value {
    color: var(--gray-900);
    font-size: 0.875rem;
    font-weight: 600;
}

.subscription-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Usage Statistics */
.usage-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.usage-item {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

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

.usage-label {
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
}

.usage-numbers {
    color: var(--gray-900);
    font-size: 0.875rem;
    font-weight: 600;
}

.usage-bar {
    width: 100%;
    height: 0.75rem;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.usage-fill.normal {
    background: linear-gradient(90deg, var(--navy-600) 0%, var(--navy-700) 100%);
}

.usage-fill.warning {
    background: linear-gradient(90deg, var(--gold-500) 0%, var(--gold-600) 100%);
}

.usage-fill.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.usage-upgrade-prompt {
    background: linear-gradient(135deg, var(--gold-50) 0%, var(--gold-100) 100%);
    border: 2px solid var(--gold-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.usage-upgrade-prompt h4 {
    color: var(--gold-800);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.usage-upgrade-prompt p {
    color: var(--gold-700);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Plan Comparison */
.plan-comparison {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .plan-comparison {
        grid-template-columns: repeat(3, 1fr);
    }
}

.plan-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.plan-card.recommended {
    border-color: var(--navy-400);
    background: linear-gradient(135deg, var(--navy-50) 0%, white 100%);
}

.plan-card.recommended::before {
    content: 'Recommended';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--navy-700);
    color: white;
    padding: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.plan-card.recommended .plan-card-content {
    padding-top: 1rem;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.plan-pricing {
    margin-bottom: 1.5rem;
}

.plan-price-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 0.25rem;
}

.plan-price-period {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.plan-features li i {
    color: #16a34a;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.plan-features li.not-included {
    color: var(--gray-400);
}

.plan-features li.not-included i {
    color: var(--gray-400);
}

.plan-action {
    width: 100%;
}

.plan-card.current .plan-action {
    background: var(--gray-600);
    color: white;
    cursor: not-allowed;
}

/* Billing History */
.billing-history-table {
    width: 100%;
    border-collapse: collapse;
}

.billing-history-table th,
.billing-history-table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.billing-history-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.875rem;
}

.billing-history-table td {
    color: var(--gray-700);
    font-size: 0.875rem;
}

.invoice-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.invoice-status.paid {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.invoice-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.invoice-status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.invoice-actions {
    display: flex;
    gap: 0.5rem;
}

.invoice-action-btn {
    padding: 0.25rem 0.5rem;
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.invoice-action-btn:hover {
    background: var(--navy-50);
    border-color: var(--navy-300);
    color: var(--navy-700);
}

.billing-history-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
}

.billing-history-empty i {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-400);
}

.billing-history-empty h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.billing-history-empty p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Loading States */
.billing-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
}

.billing-loading i {
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

.billing-loading p {
    font-size: 0.875rem;
}

/* Success/Cancel Page Styles */
.auth-success-container {
    max-width: 32rem;
    margin: 0 auto;
    text-align: center;
}

.success-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.cancel-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.success-title, .cancel-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.success-message, .cancel-message {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.plan-benefits {
    background: var(--gray-50);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.plan-benefits h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    text-align: center;
}

.benefits-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.benefits-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.benefits-list li i {
    color: #16a34a;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.getting-started {
    background: var(--navy-50);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.getting-started h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy-900);
    margin-bottom: 1rem;
    text-align: center;
}

.getting-started ol {
    padding-left: 1rem;
    color: var(--navy-800);
}

.getting-started li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.next-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 640px) {
    .next-steps {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }
}

.support-info {
    background: var(--gray-50);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.support-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    text-align: center;
}

.support-options {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .support-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

.support-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.support-option:hover {
    border-color: var(--navy-300);
    background: var(--navy-25);
    transform: translateY(-1px);
}

.support-option i {
    color: var(--navy-600);
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.support-option-content {
    color: var(--gray-700);
    font-size: 0.875rem;
}

.support-option-content strong {
    color: var(--gray-900);
    font-weight: 600;
}

/* Error States */
.billing-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.billing-error i {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Professional Modal System */
.professional-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.professional-modal-overlay.modal-active {
    opacity: 1;
    pointer-events: all;
}

.professional-modal-overlay.modal-closing {
    opacity: 0;
    pointer-events: none;
}

.professional-modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    max-width: 32rem;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    display: flex;
    flex-direction: column;
}

.professional-modal-overlay.modal-active .professional-modal-content {
    transform: scale(1) translateY(0);
}

.professional-modal-overlay.modal-closing .professional-modal-content {
    transform: scale(0.95) translateY(20px);
}

.professional-modal-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-bottom: 1px solid var(--gray-200);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.modal-icon-container {
    width: 4rem;
    height: 4rem;
    background: rgba(239, 68, 68, 0.1);
    border: 3px solid rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
}

.modal-warning-icon {
    width: 1.75rem;
    height: 1.75rem;
    color: #dc2626;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 500;
}

.professional-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-500);
}

.professional-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
    transform: scale(1.1);
}

.professional-modal-close i {
    width: 1.25rem;
    height: 1.25rem;
}

.professional-modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.cancellation-notice {
    background: linear-gradient(135deg, var(--navy-50) 0%, #eff6ff 100%);
    border: 2px solid var(--navy-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.notice-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.notice-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--navy-600);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.notice-text p {
    color: var(--navy-800);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.notice-text p:last-child {
    margin-bottom: 0;
}

.billing-details {
    color: var(--navy-700) !important;
    font-weight: 600 !important;
}

.cancellation-form {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.professional-form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-900);
    background: white;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.professional-form-select:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.subscription-summary {
    background: var(--gray-50);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.summary-value {
    color: var(--gray-900);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: capitalize;
}

.professional-modal-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 2rem;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

@media (min-width: 640px) {
    .professional-modal-footer {
        flex-direction: row;
        justify-content: space-between;
    }
}

.btn-keep-subscription {
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(67, 56, 202, 0.3);
    flex: 1;
}

.btn-keep-subscription:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(67, 56, 202, 0.4);
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
}

.btn-keep-subscription i {
    width: 1rem;
    height: 1rem;
}

.btn-confirm-cancellation {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.3);
    flex: 1;
}

.btn-confirm-cancellation:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.4);
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

.btn-confirm-cancellation i {
    width: 1rem;
    height: 1rem;
}

/* Enhanced Cancel Subscription Button */
.btn-danger-large {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.25);
}

.btn-danger-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.35);
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

/* Success Toast Styling */
.success-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #f0fdf4;
    color: #16a34a;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #bbf7d0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    max-width: 20rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.success-toast i {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Modern Citation Limit Notification System */
.citation-limit-notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    color: #92400e;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 2px solid #f59e0b;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.25), 0 4px 6px -2px rgba(245, 158, 11, 0.05);
    z-index: 1000;
    max-width: 24rem;
    min-width: 20rem;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.citation-limit-notification.show {
    transform: translateX(0);
}

.citation-limit-notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.citation-notification-header {
    display: flex;
    align-items: center;
    justify-content: between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.citation-notification-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(146, 64, 14, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #92400e;
    flex-shrink: 0;
}

.citation-notification-icon i {
    width: 1.25rem;
    height: 1.25rem;
}

.citation-notification-content {
    flex: 1;
    min-width: 0;
}

.citation-notification-title {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.citation-notification-subtitle {
    font-size: 0.875rem;
    color: #a16207;
    font-weight: 500;
}

.citation-notification-close {
    background: rgba(146, 64, 14, 0.1);
    border: 1px solid rgba(146, 64, 14, 0.2);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #92400e;
    flex-shrink: 0;
}

.citation-notification-close:hover {
    background: rgba(146, 64, 14, 0.2);
    border-color: rgba(146, 64, 14, 0.4);
    transform: scale(1.1);
}

.citation-notification-close i {
    width: 0.875rem;
    height: 0.875rem;
}

.citation-limit-progress {
    background: rgba(146, 64, 14, 0.15);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid rgba(146, 64, 14, 0.2);
}

.citation-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.citation-progress-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
}

.citation-progress-stats {
    font-size: 0.875rem;
    font-weight: 700;
    color: #a16207;
}

.citation-progress-bar {
    width: 100%;
    height: 0.5rem;
    background: rgba(146, 64, 14, 0.2);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.citation-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    border-radius: 9999px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.citation-progress-fill.critical {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.citation-notification-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.citation-notification-btn {
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    flex: 1;
    box-shadow: 0 4px 6px -1px rgba(146, 64, 14, 0.3);
}

.citation-notification-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(146, 64, 14, 0.4);
    background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
}

.citation-notification-btn.secondary {
    background: transparent;
    color: #92400e;
    border: 2px solid rgba(146, 64, 14, 0.3);
    box-shadow: none;
}

.citation-notification-btn.secondary:hover {
    background: rgba(146, 64, 14, 0.1);
    border-color: rgba(146, 64, 14, 0.5);
    box-shadow: none;
    transform: translateY(-1px);
}

.citation-notification-btn i {
    width: 1rem;
    height: 1rem;
}

/* Citation Limit Warning Banner */
.citation-limit-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
    border: 2px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.citation-limit-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.citation-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.citation-banner-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d97706;
    flex-shrink: 0;
}

.citation-banner-icon i {
    width: 1.5rem;
    height: 1.5rem;
}

.citation-banner-text {
    flex: 1;
    min-width: 0;
}

.citation-banner-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.citation-banner-description {
    color: #a16207;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.citation-banner-stats {
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.citation-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 0.5rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
    flex: 1;
    min-width: 120px;
}

.citation-stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: #92400e;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.citation-stat-label {
    font-size: 0.75rem;
    color: #a16207;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.citation-banner-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.citation-banner-btn {
    background: linear-gradient(135deg, #d97706 0%, #92400e 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(217, 119, 6, 0.3);
}

.citation-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -1px rgba(217, 119, 6, 0.4);
    background: linear-gradient(135deg, #92400e 0%, #78350f 100%);
}

.citation-banner-btn.secondary {
    background: transparent;
    color: #92400e;
    border: 2px solid rgba(146, 64, 14, 0.3);
    box-shadow: none;
}

.citation-banner-btn.secondary:hover {
    background: rgba(146, 64, 14, 0.1);
    border-color: rgba(146, 64, 14, 0.5);
    box-shadow: none;
}

.citation-banner-btn i {
    width: 1rem;
    height: 1rem;
}

/* Inline Citation Limit Warning */
.citation-inline-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem 1.25rem;
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
}

.citation-inline-icon {
    color: #d97706;
    flex-shrink: 0;
}

.citation-inline-icon i {
    width: 1.25rem;
    height: 1.25rem;
}

.citation-inline-text {
    flex: 1;
    min-width: 0;
}

.citation-inline-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.citation-inline-message {
    font-size: 0.8rem;
    color: #a16207;
    line-height: 1.4;
}

.citation-inline-action {
    background: none;
    border: none;
    color: #92400e;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.citation-inline-action:hover {
    color: #78350f;
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
    .citation-limit-notification {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
        min-width: auto;
        border-radius: 0.75rem;
    }
    
    .citation-notification-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .citation-notification-actions {
        flex-direction: column;
    }
    
    .citation-banner-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .citation-banner-stats {
        justify-content: center;
        gap: 1rem;
    }
    
    .citation-banner-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .citation-inline-warning {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        text-align: left;
    }
}

/* Dark mode support for citation notifications */
@media (prefers-color-scheme: dark) {
    .citation-limit-notification {
        background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
        color: #fed7aa;
        border-color: #92400e;
    }
    
    .citation-limit-banner {
        background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
        border-color: #92400e;
    }
    
    .citation-inline-warning {
        background: linear-gradient(135deg, #451a03 0%, #78350f 100%);
        border-left-color: #d97706;
    }
}

/* Responsive modal adjustments */
@media (max-width: 640px) {
    .professional-modal-overlay {
        padding: 0.5rem;
    }
    
    .professional-modal-header,
    .professional-modal-body,
    .professional-modal-footer {
        padding: 1.5rem;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
    
    .cancellation-notice {
        padding: 1rem;
    }
    
    .notice-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .subscription-summary {
        padding: 1rem;
    }
}

/* Loading Overlay Enhancement */
.loading-overlay {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.loading-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--gray-200);
}

.loading-content .loading-spinner i {
    color: var(--navy-600);
    width: 2.5rem;
    height: 2.5rem;
}

.loading-content p {
    color: var(--gray-700);
    font-weight: 500;
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .billing-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .current-plan {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .subscription-actions {
        flex-direction: column;
    }
    
    .billing-history-table {
        font-size: 0.75rem;
    }
    
    .billing-history-table th,
    .billing-history-table td {
        padding: 0.5rem 0.25rem;
    }
}

/* Loading overlay for checkout */
.checkout-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.checkout-loading-content {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.checkout-loading-content i {
    width: 3rem;
    height: 3rem;
    color: var(--navy-600);
    margin-bottom: 1rem;
    animation: spin 1s linear infinite;
}

.checkout-loading-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.checkout-loading-content p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Professional Plan Cards - Enhanced Design */
.plans-professional-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .plans-professional-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .plans-professional-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.professional-plan-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    height: fit-content;
}

.professional-plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    border-color: var(--navy-300);
}

.professional-plan-card.featured {
    border-color: var(--navy-400);
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(67, 56, 202, 0.15), 0 10px 10px -5px rgba(67, 56, 202, 0.1);
}

.professional-plan-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(67, 56, 202, 0.25), 0 15px 25px -5px rgba(67, 56, 202, 0.15);
}

.plan-popular-badge {
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    color: white;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(67, 56, 202, 0.3);
}

.plan-popular-badge i {
    width: 1rem;
    height: 1rem;
    color: var(--gold-400);
}

.professional-plan-card.featured .plan-card-header {
    padding-top: 1.5rem;
}

.plan-card-header {
    padding: 2rem 2rem 1rem 2rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

.professional-plan-card.featured .plan-card-header {
    background: linear-gradient(135deg, var(--navy-50) 0%, white 100%);
}

.plan-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 2px solid;
}

.tier-free {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

.tier-professional {
    background: rgba(67, 56, 202, 0.1);
    color: var(--navy-700);
    border-color: rgba(67, 56, 202, 0.3);
}

.tier-premium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--gold-700);
    border-color: rgba(245, 158, 11, 0.3);
}

.plan-pricing-section {
    text-align: center;
}

.plan-price-large {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.plan-period {
    color: var(--gray-600);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.plan-annual-note {
    color: #059669;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    display: inline-block;
}

.plan-card-body {
    padding: 2rem;
}

.plan-description {
    color: var(--gray-600);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    text-align: center;
}

.plan-features-enhanced {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-group {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 1.5rem;
}

.feature-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.feature-group-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.feature-group-title i {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--navy-600);
    flex-shrink: 0;
}

.feature-list-enhanced {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-list-enhanced li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--gray-700);
    font-size: 0.875rem;
    line-height: 1.5;
}

.feature-list-enhanced li i {
    color: #16a34a;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.plan-card-footer {
    padding: 2rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.professional-plan-card.featured .plan-card-footer {
    background: var(--navy-25);
    border-top-color: var(--navy-200);
}

.plan-action-btn {
    width: 100%;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
    margin-bottom: 1rem;
}

.btn-current {
    background: var(--gray-600);
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-upgrade-professional {
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(67, 56, 202, 0.3);
}

.btn-upgrade-professional:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(67, 56, 202, 0.4);
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
}

.btn-upgrade-premium {
    background: linear-gradient(135deg, var(--gold-500) 0%, var(--gold-600) 100%);
    color: var(--gray-800);
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3);
}

.btn-upgrade-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 100%);
}

.plan-note {
    color: var(--gray-500);
    font-size: 0.875rem;
    font-style: italic;
}

/* Responsive adjustments for plan cards */
@media (max-width: 767px) {
    .plans-professional-grid {
        gap: 1.5rem;
    }
    
    .professional-plan-card.featured {
        transform: none;
    }
    
    .professional-plan-card.featured:hover {
        transform: translateY(-4px);
    }
    
    .plan-card-header,
    .plan-card-body,
    .plan-card-footer {
        padding: 1.5rem;
    }
    
    .plan-price-large {
        font-size: 2.5rem;
    }
    
    .feature-group {
        padding-bottom: 1rem;
        gap: 1rem;
    }
}

/* Enhanced billing table styling */
.billing-table {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.table-header .table-row {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.table-row {
    display: grid;
    grid-template-columns: 120px 1fr 100px 100px 80px;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    transition: background-color 0.3s ease;
}

.table-row:hover {
    background: var(--gray-25);
}

.table-row:last-child {
    border-bottom: none;
}

.table-cell {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.table-header .table-cell {
    font-weight: 600;
    color: var(--gray-900);
}

@media (max-width: 768px) {
    .table-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .table-cell {
        padding: 0.25rem 0;
    }
    
    .table-header {
        display: none;
    }
}

/* Usage Warnings Container - Modern Professional Design */
.usage-warnings-container {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.usage-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.1), 0 2px 4px -1px rgba(245, 158, 11, 0.06);
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.usage-warning::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #f59e0b, #d97706);
}

.usage-warning.critical {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-color: #ef4444;
}

.usage-warning.critical::before {
    background: linear-gradient(to bottom, #ef4444, #dc2626);
}

.warning-icon {
    background: rgba(245, 158, 11, 0.2);
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.usage-warning.critical .warning-icon {
    background: rgba(239, 68, 68, 0.2);
}

.warning-icon i {
    width: 1.25rem;
    height: 1.25rem;
    color: #92400e;
}

.usage-warning.critical .warning-icon i {
    color: #dc2626;
}

.warning-content {
    flex: 1;
    min-width: 0;
}

.warning-content p {
    margin: 0 0 1rem 0;
    font-size: 0.875rem;
    color: #451a03;
    line-height: 1.5;
    font-weight: 500;
}

.usage-warning.critical .warning-content p {
    color: #7f1d1d;
}

.warning-content .btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.warning-content .btn-primary:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.1);
}

.usage-warning.critical .warning-content .btn-primary {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.usage-warning.critical .warning-content .btn-primary:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.warning-close {
    background: none;
    border: none;
    color: #92400e;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warning-close:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #78350f;
}

.usage-warning.critical .warning-close {
    color: #dc2626;
}

.usage-warning.critical .warning-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #991b1b;
}

.warning-close i {
    width: 1rem;
    height: 1rem;
}

/* Section description styling */
.section-description {
    color: var(--gray-600);
    font-size: 1rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* Profile & Settings Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.modal-overlay[style*="flex"] {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    max-width: 28rem;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.modal-overlay[style*="flex"] .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-bottom: 1px solid var(--gray-200);
    padding: 2rem 2rem 1.5rem 2rem;
    text-align: center;
    position: relative;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid var(--gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--gray-500);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
    transform: scale(1.1);
}

.modal-close i {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body .form-group {
    margin-bottom: 1.5rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.modal-body input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-900);
    background: white;
    transition: all 0.3s ease;
}

.modal-body input:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.modal-body .form-help {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
    display: block;
}

.modal-actions {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-actions .btn-secondary {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-actions .btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.modal-actions .btn-primary {
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(67, 56, 202, 0.25);
}

.modal-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(67, 56, 202, 0.35);
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-950) 100%);
}

/* Profile Page Enhancements */
.profile-form-container {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.profile-avatar-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.current-avatar {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 14px 0 rgba(67, 56, 202, 0.25);
}

.avatar-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.avatar-description {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-group input {
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-900);
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1);
}

.form-group input:read-only {
    background: var(--gray-50);
    color: var(--gray-600);
    cursor: not-allowed;
}

.form-help {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.security-options, .account-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
}

.security-item, .action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    background: white;
    transition: all 0.3s ease;
}

.security-item:hover, .action-item:hover {
    border-color: var(--navy-300);
    background: var(--navy-25);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-item.danger:hover {
    border-color: #fca5a5;
    background: #fef2f2;
}

.security-info, .action-info {
    flex: 1;
    min-width: 0;
}

.security-info h3, .action-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.security-info p, .action-info p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.success {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.warning {
    background: #fef3c7;
    color: #d97706;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--navy-300);
    color: var(--navy-700);
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--navy-700);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgba(67, 56, 202, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(220, 38, 38, 0.25);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(220, 38, 38, 0.35);
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

/* Settings Page Styles */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    background: white;
    transition: all 0.3s ease;
}

.setting-item:hover {
    border-color: var(--navy-300);
    background: var(--navy-25);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.setting-info {
    flex: 1;
    min-width: 0;
}

.setting-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.setting-info p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.setting-control select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-900);
    background: white;
    min-width: 150px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: 0.4s;
    border-radius: 1.5rem;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 1.125rem;
    width: 1.125rem;
    left: 0.1875rem;
    bottom: 0.1875rem;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--navy-600);
}

input:checked + .toggle-slider:before {
    transform: translateX(1.5rem);
}

.settings-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    max-width: 20rem;
    font-size: 0.875rem;
    font-weight: 500;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.notification.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.notification.info {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
    .modal-content {
        max-width: calc(100vw - 2rem);
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-actions {
        padding: 1.5rem;
    }
    
    .profile-avatar-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .form-actions,
    .modal-actions {
        flex-direction: column;
    }
    
    .security-item,
    .action-item,
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        text-align: left;
    }
    
    .notification {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
}
