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

body {
    font-family: 'Inter', 'Arial', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: #000000;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    transition: all 0.3s ease;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 15px;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Enhanced Card Styles with Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 15px;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
}

/* Enhanced Animation Styles */
.animate-in {
    animation: slideInUp 0.6s ease-out forwards;
}

.enhanced-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner-inner {
    text-align: center;
}

.spinner-circle {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.spinner-text {
    color: #666;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.success-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #28a745;
    border-radius: 50%;
    animation: particleRise 1s ease-out forwards;
    pointer-events: none;
}

@keyframes particleRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

/* Enhanced Progress Bars */
.progress-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 3px;
    margin: 10px 0;
    backdrop-filter: blur(10px);
}

.progress-bar {
    height: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}

/* Floating Elements */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Results Actions Buttons */
.results-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.export-btn, .share-btn, .print-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.export-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.export-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.share-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.share-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.print-btn {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.print-btn:hover {
    background: linear-gradient(135deg, #545b62 0%, #494f54 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.export-btn i, .share-btn i, .print-btn i {
    margin-right: 8px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Ryan's Header Photo */
.rodrigo-header-photo {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rodrigo-header-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.rodrigo-header-photo .status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid white;
    background: #28a745;
    animation: pulse-green 2s infinite;
}

.header-text {
    text-align: left;
}

.brandenburger-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.header-text {
    text-align: left;
}

/* Header Right Section */
.header-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.live-agent-link {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.live-agent-link:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.live-agent-link i {
    font-size: 14px;
}

.company-name {
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    margin: 0;
    text-align: center;
    opacity: 0.9;
}

.header h1 {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.header h1 i {
    color: #ffffff;
    margin-right: 10px;
}

.header p {
    color: #cccccc;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

.header-subtitle {
    color: #e8f4f8;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 5px;
    letter-spacing: 0.5px;
}

/* Client Testimonials Section */
.testimonials-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 0;
    margin-top: 40px;
    border-top: 1px solid #e9ecef;
}

.testimonials-header {
    text-align: center;
    margin-bottom: 50px;
}

.testimonials-header h2 {
    font-size: 2.2em;
    color: #2d5016;
    margin-bottom: 15px;
    font-weight: 600;
}

.testimonials-header h2 i {
    color: #ffd700;
    margin-right: 10px;
}

.testimonials-header p {
    font-size: 1.1em;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.testimonials-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
}

.testimonials-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

.testimonial-card {
    min-width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.testimonial-card.active {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(45, 80, 22, 0.1);
    position: relative;
    margin: 0 auto;
    max-width: 800px;
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 30px;
    font-size: 60px;
    color: #2d5016;
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.client-info h4 {
    font-size: 1.3em;
    color: #2d5016;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.client-location {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-bottom: 3px;
}

.loan-type {
    display: inline-block;
    background: linear-gradient(135deg, #2d5016 0%, #5a8f47 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
}

.testimonial-rating {
    display: flex;
    gap: 3px;
}

.testimonial-rating i {
    color: #ffd700;
    font-size: 18px;
}

.testimonial-text {
    margin: 20px 0;
}

.testimonial-text p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #444;
    margin: 0;
    font-style: italic;
}

.testimonial-date {
    text-align: right;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.testimonial-date small {
    color: #888;
    font-size: 0.85em;
}

.testimonial-date i {
    margin-right: 5px;
    color: #2d5016;
}

/* Testimonials Controls */
.testimonials-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
}

.testimonial-nav {
    background: rgba(45, 80, 22, 0.1);
    border: 1px solid rgba(45, 80, 22, 0.2);
    color: #2d5016;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.testimonial-nav:hover {
    background: #2d5016;
    color: white;
    transform: scale(1.1);
}

.testimonials-dots {
    display: flex;
    gap: 10px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(45, 80, 22, 0.3);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active,
.testimonial-dot:hover {
    background: #2d5016;
    border-color: #2d5016;
    transform: scale(1.2);
}

/* Testimonials CTA */
.testimonials-cta {
    text-align: center;
    margin-top: 40px;
}

.view-all-reviews {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2d5016 0%, #5a8f47 100%);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.3);
}

.view-all-reviews:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 80, 22, 0.4);
    text-decoration: none;
    color: white;
}

.view-all-reviews i {
    font-size: 14px;
}

/* Mobile Responsive Testimonials */
@media (max-width: 768px) {
    .testimonials-section {
        padding: 40px 0;
    }
    
    .testimonials-header h2 {
        font-size: 1.8em;
    }
    
    .testimonial-content {
        padding: 20px;
        margin: 0 10px;
    }
    
    .testimonial-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .testimonial-text p {
        font-size: 1em;
    }
    
    .testimonials-controls {
        gap: 15px;
    }
    
    .testimonial-nav {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .testimonial-content::before {
        font-size: 40px;
        top: -5px;
        left: 20px;
    }
}

@media (max-width: 480px) {
    .testimonials-header h2 {
        font-size: 1.6em;
    }
    
    .testimonial-content {
        padding: 15px;
    }
    
    .client-info h4 {
        font-size: 1.1em;
    }
    
    .testimonial-text p {
        font-size: 0.95em;
        line-height: 1.6;
    }
    
    .view-all-reviews {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* Professional Footer Styles - Clean Design */
.professional-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
    color: #333;
    margin-top: 60px;
    padding: 40px 0 20px 0;
    border-radius: 15px 15px 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-contact h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    color: #1a1a1a;
}

.contact-tagline {
    text-align: center;
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #666;
}

/* Compact Contact Line */
.contact-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 25px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(248, 249, 250, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-compact {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.contact-compact i {
    color: #007bff;
    width: 16px;
    text-align: center;
    font-size: 1rem;
}

.contact-compact span {
    color: #333;
}

.contact-compact strong {
    font-weight: 600;
    color: #1a1a1a;
}

/* Contact Links */
.contact-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 2px 4px;
}

.contact-link:hover {
    color: #007bff;
    text-decoration: none;
    background: rgba(0, 123, 255, 0.1);
}

.contact-link strong {
    color: inherit;
}

/* Apply Online Button */
.apply-button-container {
    text-align: center;
    margin: 25px 0;
}

.apply-online-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.apply-online-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
    text-decoration: none;
    color: white;
}

.apply-online-btn i {
    font-size: 1.2rem;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0 10px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: #666;
}

/* Input with suffix styles */
.input-with-help {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-with-help input {
    flex: 1;
}

.input-with-help .rate-suffix {
    position: relative;
    margin-left: -30px;
    margin-right: 8px;
    z-index: 1;
    pointer-events: none;
}

/* Mobile responsiveness for footer */
@media (max-width: 768px) {
    .contact-line {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .contact-compact {
        justify-content: center;
        text-align: center;
        font-size: 0.9rem;
    }
    
    .professional-footer {
        margin-top: 40px;
        padding: 30px 0 15px 0;
    }
    
    .apply-online-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-compact span {
        font-size: 0.85rem;
    }
    
    .footer-contact h3 {
        font-size: 1.5rem;
    }
    
    .contact-tagline {
        font-size: 1rem;
    }
}

.ccm-logo {
    height: 45px;
    filter: brightness(0) invert(1);
}



/* Input Sections Layout */
.current-loan-input-section {
    margin-bottom: 1.5rem;
}

.refinance-input-section {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

/* Panel Styles */
.current-loan-panel, .refinance-panel {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8e9ea;
}

.current-loan-panel h2, .refinance-panel h2 {
    color: #000000;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #000000;
}

.current-loan-panel h2 i {
    color: #000000;
}

.refinance-panel h2 i {
    color: #000000;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #000000;
    font-size: 0.95rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #cccccc;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #000000;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    /* Removed transform to prevent page jumping */
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group small, .help-text {
    display: block;
    margin-top: 0.75rem;
    color: #666666;
    font-size: 0.9rem;
    font-weight: 500;
    font-style: italic;
}

/* Calculated Field Styles */
.form-group.calculated-field {
    background: rgba(0, 0, 0, 0.02);
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.form-group.calculated-field label {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.calculated-value {
    background: #ffffff;
    padding: 10px 12px;
    border-radius: 6px;
    border: 2px solid #cccccc;
    font-size: 0.95rem;
    font-weight: 600;
    color: #000000;
    min-height: 42px;
    display: flex;
    align-items: center;
}

/* Compact Current Loan Section Styles */
.current-loan-compact-section {
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.compact-loan-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.panel-header {
    margin-bottom: 20px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.panel-header h2 {
    color: #000000;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header i {
    color: #000000;
}

/* Upload Feature Styles */
.upload-option {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.upload-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.upload-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1fa085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

.upload-btn i {
    color: white !important;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-statement-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.view-statement-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.view-statement-btn i {
    color: white !important;
}

/* Enhanced document upload styles */
.upload-btn.uploaded {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    position: relative;
    overflow: hidden;
}

.upload-btn.uploaded::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.upload-option {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.upload-option.drag-over {
    background: rgba(45, 80, 22, 0.05);
    border: 2px dashed #2d5016 !important;
}

.upload-help {
    font-size: 0.75rem;
    color: #666666;
    text-align: right;
    max-width: 200px;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.upload-help.success {
    color: #28a745 !important;
    font-weight: 500;
}

.upload-help.error {
    color: #dc3545 !important;
    font-weight: 500;
}

/* Clean Panel Header */
.panel-header-clean {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border: 1px solid rgba(45, 55, 72, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.panel-header-clean h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.panel-header-clean .header-subtitle {
    color: #718096;
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.header-main h2 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-main h2 i {
    color: #2d3748;
    font-size: 1.3rem;
}

.header-main .header-subtitle {
    color: #718096;
    font-size: 0.95rem;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.header-actions-redesigned {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* AI Ryan Section */
.ai-ryan-section {
    flex: 1;
    min-width: 250px;
}

.talk-ai-ryan-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 55, 72, 0.3);
    border: none;
    width: 100%;
}

.talk-ai-ryan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 55, 72, 0.4);
    color: white;
    text-decoration: none;
}

.ai-ryan-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.ai-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.pulse-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #4ade80;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

.ai-ryan-text {
    flex: 1;
    text-align: left;
}

.ai-ryan-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.ai-ryan-subtitle {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Upload Section Redesigned */
.upload-section-redesigned {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upload-btn-redesigned {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    width: 100%;
}

.upload-btn-redesigned:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.upload-btn-redesigned.disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    position: relative;
    opacity: 0.7;
}

.upload-btn-redesigned.disabled:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(156, 163, 175, 0.3);
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
}

.coming-soon-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    animation: comingSoonPulse 2s ease-in-out infinite;
}

@keyframes comingSoonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.upload-btn-redesigned i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.upload-text {
    flex: 1;
    text-align: left;
}

.upload-text strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.upload-text small {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

.upload-buttons-extra {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.upload-buttons-extra button {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-statement-btn {
    background: #3b82f6;
    color: white;
}

.view-statement-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.clear-statement-btn {
    background: #ef4444;
    color: white;
}

.clear-statement-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.upload-help-redesigned {
    color: #6b7280;
    font-size: 0.8rem;
    text-align: center;
    margin: 4px 0 0 0;
}

.upload-help-redesigned.disabled {
    color: #9ca3af;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .panel-header-redesigned {
        padding: 20px;
    }
    
    .header-actions-redesigned {
        flex-direction: column;
        gap: 16px;
    }
    
    .ai-ryan-section,
    .upload-section-redesigned {
        min-width: 100%;
    }
    
    .talk-ai-ryan-btn,
    .upload-btn-redesigned {
        padding: 14px 18px;
    }
    
    .ai-ryan-avatar {
        width: 42px;
        height: 42px;
    }
}

.ai-ryan-widget {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ai-ryan-widget:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.ryan-photo {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.ryan-headshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.ai-ryan-widget:hover .ryan-headshot {
    transform: scale(1.05);
}

.status-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-indicator.online {
    background: #28a745;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

.ai-ryan-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.ask-ai-btn {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin: 0;
}

.ask-ai-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ask-ai-btn i {
    font-size: 14px;
}

.ai-status {
    font-size: 10px;
    color: #28a745;
    font-weight: 500;
    margin: 0;
    text-align: left;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 15px;
}

/* Professional hover effect for the entire widget */
.ai-ryan-widget:hover .ask-ai-btn {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.ai-ryan-widget:hover .ai-status {
    color: #2d3748;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .ai-assistant-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .ai-ryan-widget {
        padding: 10px 15px;
        gap: 12px;
    }
    
    .ryan-photo {
        width: 40px;
        height: 40px;
    }
    
    .ask-ai-btn {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .ai-status {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .ai-ryan-widget {
        flex-direction: column;
        text-align: center;
        padding: 8px;
        gap: 6px;
    }
    
    .ai-ryan-info {
        align-items: center;
    }
    
    .ryan-photo {
        width: 35px;
        height: 35px;
    }
}

/* Success Message Styles */
.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideInDown 0.3s ease;
}

.success-message i {
    color: #28a745 !important;
    font-size: 1.1rem;
}

/* Embedded AI Ryan Widget */
.ai-ryan-embedded-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ai-ryan-embedded-widget.minimized {
    height: 60px;
}

.ai-ryan-embedded-widget.minimized .widget-content {
    display: none;
}

.widget-header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    border-radius: 12px 12px 0 0;
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

.widget-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.widget-controls {
    display: flex;
    gap: 8px;
}

.widget-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.widget-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.widget-content {
    height: calc(100% - 60px);
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.convai-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.convai-container elevenlabs-convai {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 0 12px 12px !important;
    border: none !important;
    background: transparent !important;
}

/* Override any default ConvAI styling */
elevenlabs-convai {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

elevenlabs-convai iframe {
    border-radius: 0 0 12px 12px !important;
}

.widget-message {
    text-align: center;
    padding: 20px;
    width: 100%;
}

.loading-animation {
    display: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2d3748;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.widget-info {
    display: block;
}

.widget-large-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2d3748;
    margin-bottom: 15px;
}

.widget-message h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.widget-message p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 20px;
}

.open-chat-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 15px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.open-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.widget-note {
    font-size: 0.75rem !important;
    color: #9ca3af !important;
    margin-bottom: 0 !important;
}

/* Chat Interface Styling */
.chat-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.open-chat-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.open-chat-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.open-chat-btn.secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

.open-chat-btn.secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
}

.chat-container {
    width: 100%;
    height: 420px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.chat-header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.close-chat {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.chat-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0 0 0;
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6c757d;
    text-align: left;
}

.chat-info i {
    color: #10b981;
    margin-right: 6px;
}

.chat-opened-status {
    text-align: center;
    padding: 20px 10px;
}

.status-icon {
    font-size: 2.5rem;
    color: #10b981;
    margin-bottom: 15px;
}

.chat-opened-status h4 {
    color: #2d3748;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-opened-status p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 20px 0;
}

.embedded-chat {
    width: 100%;
    height: 420px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.embedded-chat .chat-header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-frame-container {
    height: calc(100% - 48px);
    background: #f8f9fa;
}

/* Voice Chat Interface */
.voice-chat-interface {
    text-align: center;
    width: 100%;
    max-width: 320px;
}

.ryan-avatar-large {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.ryan-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
}

.status-indicator.online {
    background: #10b981;
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.voice-chat-interface h3 {
    color: #2d3748;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.voice-chat-interface p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 30px 0;
}

.start-voice-chat-btn {
    position: relative;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 60px;
    padding: 18px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto 30px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    transition: all 0.3s ease;
    overflow: hidden;
}

.start-voice-chat-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
}

.start-voice-chat-btn i {
    font-size: 1.3rem;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 60px;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

.chat-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #4b5563;
}

.feature i {
    color: #10b981;
    width: 16px;
    text-align: center;
}

/* Chat Active Status */
.chat-active-status {
    text-align: center;
    width: 100%;
}

.success-icon {
    font-size: 3rem;
    color: #10b981;
    margin-bottom: 20px;
    animation: bounce-in 0.5s ease;
}

@keyframes bounce-in {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.chat-active-status h3 {
    color: #2d3748;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.chat-active-status p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0 0 25px 0;
}

.active-indicator {
    background: #ecfdf5;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.active-indicator .pulse {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.active-indicator span {
    color: #065f46;
    font-size: 0.9rem;
    font-weight: 500;
}

.secondary-btn {
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* Mobile responsive for widget */
@media (max-width: 768px) {
    .ai-ryan-embedded-widget {
        width: calc(100vw - 20px);
        height: 450px;
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
}

/* Auto-filled field styling */
.auto-filled {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    border-color: #10b981 !important;
    animation: autoFillGlow 0.5s ease;
}

@keyframes autoFillGlow {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.2); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Pay Extra Section Styling */
.pay-extra-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 28px;
    margin: 40px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.pay-extra-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.pay-extra-section h2 {
    color: #2d3748;
    margin-bottom: 16px;
    font-size: 1.75rem;
    font-weight: 700;
}

.pay-extra-section .wealth-focus-note {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    color: #065f46;
}

.pay-extra-section .wealth-focus-note i {
    color: #10b981;
    margin-right: 8px;
}

/* Pay Extra Table Row Styling */
.pay-extra-option {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left: 4px solid #10b981;
}

.pay-extra-option:hover {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* Lost Savings Styling */
.lost-savings-negative {
    color: #dc2626 !important;
    font-weight: 700;
    background: rgba(220, 38, 38, 0.15);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.lost-savings-positive {
    color: #059669 !important;
    font-weight: 600;
    background: rgba(5, 150, 105, 0.15);
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(5, 150, 105, 0.3);
    font-size: 0.85rem;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Upload Section */
@media (max-width: 768px) {
    .panel-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-option {
        align-items: stretch;
    }
    
    .upload-help {
        text-align: left;
        max-width: none;
    }
}

.compact-loan-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Basic Loan Info Grid */
.loan-basics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.loan-basics-grid .form-group {
    margin-bottom: 0;
}

.loan-basics-grid .form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: #000000;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.2;
}

.loan-basics-grid .form-group input,
.loan-basics-grid .form-group select {
    font-size: 0.95rem;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-weight: 600;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.loan-basics-grid .form-group input:focus,
.loan-basics-grid .form-group select:focus {
    border-color: #000;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}

/* Rate Highlight Section - Lighter Design */
.rate-highlight-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.rate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.rate-input, .mi-input {
    position: relative;
}

.rate-input label, .mi-input label {
    color: #000000 !important;
    font-weight: 600;
    font-size: 0.9rem;
}

.rate-input input, .mi-input input {
    background: #ffffff;
    border: 2px solid #cccccc;
    color: #000000;
    padding-right: 40px;
}

.rate-input input:focus, .mi-input input:focus {
    background: #ffffff;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.rate-suffix, .mi-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666666;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 10px;
}

/* Calculated Metrics Display */
.calculated-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

/* Legacy support for key-metrics class */
.key-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.metric-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.metric-label {
    font-size: 0.8rem;
    color: #666666;
    margin-bottom: 4px;
    font-weight: 600;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #000000;
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.metric-unit {
    font-size: 1rem;
    color: #666666;
}

.metric-note {
    font-size: 0.7rem;
    color: #888888;
    font-weight: 500;
}

/* Special highlighting for MI Rate */
.mi-rate-card {
    border-color: #dc3545;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
}

.mi-rate-card:hover {
    border-color: #c82333;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
}

/* Special highlighting for Effective Rate */
.effective-rate-card {
    border-color: #fd7e14;
    background: linear-gradient(135deg, #ffffff 0%, #fffaf5 100%);
}

.effective-rate-card:hover {
    border-color: #e55a00;
    background: linear-gradient(135deg, #fffaf5 0%, #fff0e6 100%);
}

/* Responsive Design for Compact Section */
@media (max-width: 1024px) {
    .loan-basics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .rate-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sales-highlights {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .loan-basics-grid {
        grid-template-columns: 1fr;
    }
    
    .compact-loan-panel {
        padding: 16px;
    }
    
    .rate-highlight-section {
        padding: 16px;
    }
}

/* Refinance Options Grid */
.refinance-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.refinance-option.compact {
    background: #fafbfc;
    padding: 0.5rem;
    border-radius: 6px;
    border: 2px solid #e8e9ea;
    transition: all 0.2s ease;
    margin-bottom: 0;
}

.refinance-option.compact:hover {
    border-color: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.refinance-option.compact h4 {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-align: center;
    padding: 0.4rem;
    background: #000000;
    border-radius: 4px;
}

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

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-row label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #000000;
    margin-bottom: 0;
}

.form-row input {
    padding: 0.4rem 0.5rem;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    width: 100%;
}

.form-row input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Legacy refinance option styles (keeping for backwards compatibility) */
.refinance-option:not(.compact) {
    background: #fafbfc;
    padding: 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 2px solid #e8e9ea;
    transition: all 0.2s ease;
}

.refinance-option:not(.compact):hover {
    border-color: #000000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.refinance-option:not(.compact) h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    padding: 0.5rem;
    background: #000000;
    border-radius: 6px;
}

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

/* Button Group */
.button-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Calculate Button */
.calculate-btn {
    flex: 2;
    padding: 14px 28px;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

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

.calculate-btn:hover:before {
    left: 100%;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Reset Button */
.reset-btn {
    flex: 1;
    padding: 12px 16px;
    background: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.reset-btn:hover {
    background: #000000;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.calculate-btn i {
    margin-right: 10px;
}

/* Results Section */
.results-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #000000;
    margin-bottom: 2rem;
}

.results-section h2 {
    color: #000000;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Summary Table */
.summary-table-container {
    margin-bottom: 1.5rem;
}

.wealth-focus-note {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #495057;
    position: relative;
    overflow: hidden;
}

.wealth-focus-note::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.wealth-focus-note i {
    color: #007bff;
    margin-right: 8px;
    font-size: 1rem;
}

.wealth-focus-note strong {
    color: #212529;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
}

/* Force table to fit screen width */
@media (max-width: 1400px) {
    .comparison-table {
        font-size: 0.85rem;
        min-width: 1200px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 12px 8px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    
    .comparison-table th .header-main {
        font-size: 0.85rem;
    }
    
    .comparison-table th .header-sub {
        font-size: 0.7rem;
    }
}

@media (max-width: 1200px) {
    .comparison-table {
        font-size: 0.8rem;
        min-width: 1100px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 10px 6px;
    }
}

@media (max-width: 992px) {
    .comparison-table {
        font-size: 0.75rem;
        min-width: 1000px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 4px;
    }
    
    .comparison-table th .header-main {
        font-size: 0.75rem;
    }
    
    .comparison-table th .header-sub {
        font-size: 0.65rem;
    }
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.comparison-table th {
    background: #1a1a1a;
    color: white;
    padding: 6px 4px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 0.2px;
    vertical-align: middle;
    position: relative;
    cursor: help;
}

/* Tooltip styling for table headers */
.comparison-table th[title]:hover {
    background: #2a2a2a;
    transition: background-color 0.2s ease;
}

.comparison-table th[title] {
    position: relative;
}

/* Specific column widths for better fit */
.comparison-table th:nth-child(1) { width: 12%; } /* Loan Option */
.comparison-table th:nth-child(2) { width: 7%; }  /* Interest Rate */
.comparison-table th:nth-child(3) { width: 5%; }  /* MI Rate - Smaller */
.comparison-table th:nth-child(4) { width: 7%; }  /* Effective Rate */
.comparison-table th:nth-child(5) { width: 8%; } /* Total Loan Amount */
.comparison-table th:nth-child(6) { width: 8%; }  /* Monthly P&I */
.comparison-table th:nth-child(7) { width: 6%; }  /* Monthly MI */
.comparison-table th:nth-child(8) { width: 8%; }  /* Total Payment */
.comparison-table th:nth-child(9) { width: 8%; }  /* Monthly Principal */
.comparison-table th:nth-child(10) { width: 8%; } /* Monthly Interest */
.comparison-table th:nth-child(11) { width: 6%; } /* Payment Change */
.comparison-table th:nth-child(12) { width: 9%; } /* Total Interest */
.comparison-table th:nth-child(13) { width: 9%; } /* Interest Savings */

.comparison-table td:nth-child(1) { width: 12%; }
.comparison-table td:nth-child(2) { width: 7%; }
.comparison-table td:nth-child(3) { width: 5%; }  /* MI Rate - Smaller */
.comparison-table td:nth-child(4) { width: 7%; }
.comparison-table td:nth-child(5) { width: 8%; }
.comparison-table td:nth-child(6) { width: 8%; }
.comparison-table td:nth-child(7) { width: 6%; }
.comparison-table td:nth-child(8) { width: 8%; }
.comparison-table td:nth-child(9) { width: 8%; }
.comparison-table td:nth-child(10) { width: 8%; }
.comparison-table td:nth-child(11) { width: 6%; }
.comparison-table td:nth-child(12) { width: 9%; }
.comparison-table td:nth-child(13) { width: 9%; }
}

.comparison-table th .header-main {
    display: block;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.3;
}

.comparison-table th .header-sub {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.85;
    font-style: italic;
    line-height: 1.3;
}

/* Alternative Compact Style */
.comparison-table.compact-headers th {
    padding: 12px 8px;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
}

.comparison-table.compact-headers th .header-main {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.comparison-table.compact-headers th .header-sub {
    font-size: 0.7rem;
    opacity: 0.9;
}

/* Minimal Style Option */
.comparison-table.minimal-headers th {
    padding: 10px 6px;
    background: #000000;
    border-bottom: 2px solid #333333;
}

.comparison-table.minimal-headers th .header-main {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1px;
}

.comparison-table.minimal-headers th .header-sub {
    font-size: 0.65rem;
    opacity: 0.8;
}

.comparison-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #e0e6ed;
    transition: background-color 0.3s ease;
    font-size: 0.8rem;
    line-height: 1.2;
}

.comparison-table tbody tr:hover {
    background-color: #f8f9fc;
}

.comparison-table .current-loan {
    background-color: #f5f5f5;
    border-left: 4px solid #000000;
}

.comparison-table .refinance-option-row {
    border-left: 4px solid #666666;
}

.comparison-table .savings-positive {
    color: #22c55e;
    font-weight: 700;
}

.comparison-table .savings-negative {
    color: #ef4444;
    font-weight: 700;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    background: #fff;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e9ea;
}

.chart-container h3 {
    color: #000000;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #000000;
}

.chart-container h3 i {
    color: #000000;
}

/* Breakdown Section */
.breakdown-section {
    margin-top: 1.5rem;
}

/* Chart Section Styles */
.chart-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e9ea;
    margin-bottom: 2rem;
}

.chart-section h2 {
    color: #000000;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #000000;
}

.chart-container {
    position: relative;
    margin-bottom: 1rem;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.legend-breakeven {
    font-size: 0.8rem;
    color: #666;
    margin-left: 0.5rem;
}

.breakdown-explanation {
    background: #f8f9fa;
    padding: 1rem;
    border-left: 4px solid #007bff;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #495057;
}

.breakdown-explanation i {
    color: #007bff;
    margin-right: 0.5rem;
}

.breakdown-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.breakdown-item {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #cccccc;
    overflow: hidden;
}

.breakdown-header {
    background: #000000;
    padding: 0.75rem 1.25rem;
    margin: 0;
}

.breakdown-header h4 {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    text-align: center;
}

.breakdown-item .breakdown-stats {
    padding: 1.25rem;
}

.breakdown-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.breakdown-stat {
    text-align: center;
}

.breakdown-stat .stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
    line-height: 1.2;
}

.breakdown-stat .stat-label {
    display: block;
    font-size: 0.75rem;
    color: #666666;
    margin-top: 0.25rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Color coding for different stat types */
.breakdown-stat .stat-value.text-primary {
    color: #000000;
}

.breakdown-stat .stat-value.text-success {
    color: #22c55e;
}

.breakdown-stat .stat-value.text-danger {
    color: #ef4444;
}

.breakdown-stat .stat-value.text-warning {
    color: #f59e0b;
}

.breakdown-stat .stat-value.text-info {
    color: #3b82f6;
}

/* Loading Indicator */
.loading {
    text-align: center;
    padding: 4rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid #000000;
}

.loading i {
    font-size: 3rem;
    color: #000000;
    margin-bottom: 1.5rem;
}

.loading p {
    color: #666666;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Responsive Design */
@media (min-width: 1200px) {
    .charts-section {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1200px) {
    .option-form {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .option-form .form-group:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 968px) {
    .input-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .breakdown-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .comparison-table {
        font-size: 0.8rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 8px 6px;
    }
    
    .comparison-table th .header-main {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
    
    .comparison-table th .header-sub {
        font-size: 0.65rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-left {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-text {
        text-align: center;
    }
    
    .ccm-logo {
        height: 40px;
    }
    

    
    .current-loan-panel, .refinance-panel {
        padding: 1.25rem;
    }
    
    .chart-container {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px 10px;
    }
    
    .header {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .rodrigo-header-photo {
        width: 50px;
        height: 50px;
        border-width: 2px;
    }
    
    .rodrigo-header-photo .status-indicator {
        width: 12px;
        height: 12px;
    }
    
    .header-right {
        gap: 3px;
    }
    
    .company-name {
        font-size: 10px;
    }
    
    .live-agent-link {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .live-agent-link i {
        font-size: 12px;
    }
    
    .current-loan-panel, 
    .refinance-panel,
    .results-section {
        padding: 1rem;
    }
    
    .option-form {
        grid-template-columns: 1fr;
    }
    
    .refinance-options-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .refinance-option.compact {
        padding: 1rem;
    }
    
    .compact-form {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .breakdown-stats {
        grid-template-columns: 1fr !important;
    }
    
    .brandenburger-logo {
        width: 50px;
        height: 50px;
        object-position: center top;
    }
    
    .header-left {
        gap: 0.75rem;
    }
    
    .breakdown-container {
        grid-template-columns: 1fr;
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .legend-item {
        font-size: 0.85rem;
        gap: 0.5rem;
        padding: 0.4rem 0.6rem;
    }
    
    .legend-color {
        width: 20px;
        height: 20px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calculate-btn,
    .reset-btn {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px 8px;
    }
    
    .header {
        padding: 0.75rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .refinance-options-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .current-loan-panel, 
    .refinance-panel,
    .results-section {
        padding: 0.75rem;
    }
    
    .table-responsive {
        font-size: 0.7rem;
    }
    
    .chart-container {
        padding: 0.5rem;
    }
    
    .brandenburger-logo {
        width: 40px;
        height: 40px;
        object-position: center top;
    }
    
    .ccm-logo {
        height: 35px;
    }
    

    
    .breakdown-item {
        padding: 1rem;
    }
}

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

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

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

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

/* Brand-specific styling */
.ccm-accent {
    color: #000000 !important;
}

.ccm-bg-accent {
    background-color: #000000 !important;
}

.ccm-border-accent {
    border-color: #000000 !important;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-success { color: #22c55e; }
.text-danger { color: #ef4444; }
.text-warning { color: #666666; }
.text-info { color: #000000; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* Enhanced Visual Effects */
.chart-section {
    position: relative;
    overflow: hidden;
}

.chart-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.chart-section:hover::before {
    left: 100%;
}

.chart-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Enhanced Table Hover Effects */
.comparison-table tbody tr {
    transition: all 0.3s ease;
}

.comparison-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Notification Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Loading States */
.loading {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Animated Currency Values */
.animated-currency {
    transition: all 0.3s ease;
}

.animated-currency:hover {
    transform: scale(1.05);
    color: #000000;
    font-weight: 700;
}