/* =========================================== */
/* ROSANATECH SOLAR SMART-SIZER - ENHANCED STYLES */
/* =========================================== */

/* CSS Variables - Rosanatech Brand */
:root {
    /* Rosanatech Brand Colors */
    --rosa-primary: #1B5E20;      /* Dark Green - Primary Brand Color */
    --rosa-secondary: #4CAF50;    /* Medium Green - Secondary */
    --rosa-accent: #81C784;       /* Light Green - Accent */
    --rosa-success: #2E7D32;      /* Success Green */
    --rosa-warning: #FF9800;      /* Orange - Warning */
    --rosa-danger: #D32F2F;       /* Red - Danger */
    --rosa-light: #F8F9FA;        /* Light Gray */
    --rosa-medium: #E0E0E0;       /* Medium Gray */
    --rosa-dark: #333333;         /* Dark Text */
    --rosa-white: #FFFFFF;
    
    /* Financial Dashboard Colors */
    --financial-savings: #4CAF50;
    --financial-cost: #FF9800;
    --financial-profit: #2196F3;
    --financial-kplc: #F44336;
    --financial-solar: #4CAF50;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--rosa-dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8f0 100%);
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0 0;
    padding: 0 var(--spacing-md);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(27, 94, 32, 0.9), rgba(27, 94, 32, 0.8)), url('assets/designsolar.png');
    background-size: cover;
    background-position: center;
    padding: var(--spacing-xl) 0;
    text-align: center;
    color: var(--rosa-white);
    margin-bottom: var(--spacing-xl);
    border-radius: 0 0 20px 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.hero-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto var(--spacing-xl);
    position: relative;
    padding: 0 var(--spacing-sm);
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--rosa-medium);
    z-index: 1;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--rosa-light);
    border: 3px solid var(--rosa-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0 auto var(--spacing-xs);
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: var(--rosa-secondary);
    color: var(--rosa-white);
    box-shadow: var(--shadow-md);
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--rosa-dark);
}

/* Steps */
.step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card */
.card {
    background: var(--rosa-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0,0,0,0.05);
    border-left: 5px solid var(--rosa-secondary);
}

.card h2 {
    color: var(--rosa-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.75rem;
}

.card h2 i {
    color: var(--rosa-secondary);
}

.subtitle {
    color: #6B7280;
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

/* Notice Box */
/* ===========================================
   BILL CALCULATOR RESPONSIVE STYLES
   (For your existing HTML structure)
   =========================================== */

/* Target your existing bill calculator */
.notice-box .bill-input-section {
    width: 100%;
    max-width: 500px;
    margin: 20px auto;
}

/* Fix the form group */
.bill-input-section .form-group {
    max-width: 100% !important;
    margin-top: 20px !important;
    width: 100%;
}

/* Fix the label */
.bill-input-section .form-group label {
    display: block;
    font-weight: 600;
    color: var(--rosa-primary);
    margin-bottom: 10px;
    font-size: 1rem;
    width: 100%;
}

/* Fix the input wrapper */
.bill-input-section .form-group > div[style*="position: relative"] {
    position: relative !important;
    width: 100% !important;
    margin-bottom: 10px;
}

/* Fix the input field */
.bill-input-section #monthly-bill {
    width: 100% !important;
    padding: 15px 15px 15px 45px !important;
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    background: white !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

/* Focus state */
.bill-input-section #monthly-bill:focus {
    border-color: var(--rosa-primary) !important;
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1) !important;
    outline: none !important;
}

/* Fix currency symbol */
.bill-input-section span[style*="position: absolute; left: 15px"] {
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: var(--rosa-primary) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
}

/* Fix the hint text */
.bill-input-section .hint {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Fix the estimate button */
.bill-input-section #estimate-from-bill {
    width: 100% !important;
    margin-top: 20px !important;
    padding: 14px 20px !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all 0.3s ease !important;
}

/* Button hover effect */
.bill-input-section #estimate-from-bill:hover {
    background: var(--rosa-primary) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.2) !important;
}

/* ===========================================
   RESPONSIVE FIXES FOR MOBILE
   =========================================== */

/* Mobile devices (up to 767px) */
@media screen and (max-width: 767px) {
    /* Make notice box fit mobile screen */
    .notice-box {
        padding: 20px 15px !important;
        margin: 15px -10px !important;
        width: calc(100% + 20px) !important;
        border-radius: 0 !important;
    }
    
    /* Adjust calculator layout */
    .bill-input-section {
        max-width: 100% !important;
        margin: 15px 0 !important;
        padding: 0 !important;
    }
    
    /* Make input larger for mobile */
    .bill-input-section #monthly-bill {
        font-size: 16px !important; /* Prevents iOS zoom */
        height: 48px !important; /* Better touch target */
        padding: 12px 12px 12px 45px !important;
    }
    
    /* Adjust currency symbol position */
    .bill-input-section span[style*="position: absolute; left: 15px"] {
        left: 12px !important;
        font-size: 0.9rem !important;
    }
    
    /* Make button full width and larger */
    .bill-input-section #estimate-from-bill {
        height: 48px !important;
        min-height: 48px !important;
        padding: 12px !important;
        font-size: 1rem !important;
    }
    
    /* Adjust hint text */
    .bill-input-section .hint {
        font-size: 0.8rem !important;
        text-align: center !important;
        padding: 0 10px !important;
    }
}

/* Very small phones (up to 480px) */
@media screen and (max-width: 480px) {
    /* Further adjustments for tiny screens */
    .notice-box {
        padding: 15px 10px !important;
        margin: 10px -5px !important;
        width: calc(100% + 10px) !important;
    }
    
    .bill-input-section #monthly-bill {
        font-size: 1rem !important;
        padding: 10px 10px 10px 40px !important;
    }
    
    .bill-input-section span[style*="position: absolute; left: 15px"] {
        left: 10px !important;
    }
    
    /* Stack icon and text on button */
    .bill-input-section #estimate-from-bill {
        flex-direction: column !important;
        gap: 5px !important;
        padding: 10px !important;
        font-size: 0.9rem !important;
    }
    
    /* Adjust text sizes */
    .notice-box h4 {
        font-size: 1.1rem !important;
    }
    
    .notice-box p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
}

/* Tablet devices (768px to 1024px) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .bill-input-section {
        max-width: 400px !important;
    }
    
    .bill-input-section #monthly-bill {
        font-size: 1.2rem !important;
        padding: 16px 16px 16px 50px !important;
    }
    
    .bill-input-section #estimate-from-bill {
        font-size: 1.1rem !important;
        padding: 16px 24px !important;
    }
}

/* Desktop (1024px and up) */
@media screen and (min-width: 1024px) {
    .bill-input-section {
        max-width: 450px !important;
    }
    
    .bill-input-section #monthly-bill {
        font-size: 1.3rem !important;
        padding: 18px 18px 18px 55px !important;
    }
    
    .bill-input-section #estimate-from-bill {
        font-size: 1.1rem !important;
        padding: 16px 30px !important;
    }
}

/* OR Divider */
.or-divider {
    display: flex;
    align-items: center;
    margin: var(--spacing-lg) 0;
    text-align: center;
}

.or-divider::before,
.or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rosa-medium);
}

.or-divider span {
    padding: 0 var(--spacing-md);
    color: #6B7280;
    font-weight: 500;
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--rosa-medium);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

thead {
    background: var(--rosa-primary);
    color: var(--rosa-white);
}

th, td {
    padding: var(--spacing-md) var(--spacing-sm);
    text-align: center;
    border-bottom: 1px solid var(--rosa-medium);
}

tbody tr:nth-child(even) {
    background: var(--rosa-light);
}

tbody tr:hover {
    background: rgba(27, 94, 32, 0.05);
}

tfoot {
    background: var(--rosa-light);
    font-weight: bold;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: var(--rosa-primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

/* Tooltip */
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--rosa-accent);
    color: var(--rosa-white);
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: help;
    margin-left: 5px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--rosa-secondary);
    color: var(--rosa-white);
}

.btn-primary:hover {
    background: #3d8b40;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: #6B7280;
    color: var(--rosa-white);
}

.btn-secondary:hover {
    background: #4B5563;
}

.btn-success {
    background: var(--rosa-success);
    color: var(--rosa-white);
}

.btn-success:hover {
    background: #1B5E20;
}

.btn-whatsapp {
    background: #25D366;
    color: var(--rosa-white);
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--rosa-primary);
    color: var(--rosa-primary);
}

.btn-outline:hover {
    background: var(--rosa-primary);
    color: var(--rosa-white);
}

/* Table Actions */
.table-actions {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--rosa-light);
    border-top: 1px solid var(--rosa-medium);
}

.delete-row {
    background: transparent;
    color: var(--rosa-danger);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px 10px;
    border-radius: 4px;
}

.delete-row:hover {
    background: rgba(244, 67, 54, 0.1);
}

/* Quick Add */
.quick-add {
    background: var(--rosa-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.quick-add h4 {
    margin-bottom: var(--spacing-md);
    color: var(--rosa-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.quick-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.quick-btn {
    background: var(--rosa-white);
    border: 1px solid var(--rosa-medium);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
}

.quick-btn:hover {
    background: var(--rosa-primary);
    color: var(--rosa-white);
    border-color: var(--rosa-primary);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

.summary-card {
    background: var(--rosa-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    border-top: 4px solid var(--rosa-secondary);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card h3 {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--rosa-primary);
    margin: var(--spacing-sm) 0;
}

.summary-card small {
    color: #6B7280;
    font-size: 0.875rem;
}

/* Form Sections */
.form-section {
    background: var(--rosa-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.form-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--rosa-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-md);
}

.form-group label {
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    color: var(--rosa-primary);
}

.form-group input,
.form-group textarea {
    padding: var(--spacing-md);
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--rosa-primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.hint {
    display: block;
    margin-top: var(--spacing-xs);
    color: #6B7280;
    font-size: 0.875rem;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--rosa-medium);
}

/* Quote Content */
.quote-content {
    max-width: 1000px;
    margin: 0 auto;
}

.quote-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 2px solid var(--rosa-primary);
}

.quote-header h2 {
    color: var(--rosa-primary);
    margin-bottom: var(--spacing-sm);
}

.quote-meta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
}

.quote-id {
    background: var(--rosa-primary);
    color: var(--rosa-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
}

/* System Overview */
.system-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

.system-card {
    background: var(--rosa-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    border: 1px solid var(--rosa-medium);
    transition: transform 0.3s ease;
}

.system-card:hover {
    transform: translateY(-5px);
}

.system-card i {
    font-size: 2.5rem;
    color: var(--rosa-primary);
    margin-bottom: var(--spacing-sm);
}

.system-card h4 {
    margin-bottom: var(--spacing-sm);
    color: var(--rosa-dark);
}

.system-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rosa-primary);
    margin: var(--spacing-sm) 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: var(--spacing-xl) 0;
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, var(--rosa-primary) 0%, #1B5E20 100%);
    border-radius: var(--radius-lg);
    color: var(--rosa-white);
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin: var(--spacing-lg) 0;
    flex-wrap: wrap;
}

/* Footer */
.rosa-footer {
    text-align: center;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-xl);
    border-top: 2px solid var(--rosa-medium);
    color: var(--rosa-dark);
}

.rosa-footer p {
    margin-bottom: 8px;
}

.footer-note {
    font-size: 0.9rem;
    color: var(--rosa-dark);
    opacity: 0.8;
    margin-top: 15px;
}

/* Financial Dashboard Specific Styles (from inline styles) */
.financial-tab-container {
    margin: 20px 0;
}

.financial-tabs {
    display: flex;
    border-bottom: 2px solid var(--rosa-medium);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.financial-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    color: var(--rosa-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.financial-tab.active {
    color: var(--rosa-primary);
    border-bottom-color: var(--rosa-secondary);
    background: rgba(27, 94, 32, 0.05);
}

.financial-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.financial-tab-content.active {
    display: block;
}

.financial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.financial-card {
    background: var(--rosa-white);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    border-top: 4px solid var(--rosa-secondary);
    transition: transform 0.3s ease;
}

.financial-card:hover {
    transform: translateY(-5px);
}

.financial-card h4 {
    color: var(--rosa-primary);
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 600;
}

.financial-amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--rosa-primary);
    margin: 15px 0;
}

.financial-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

.chart-container {
    background: var(--rosa-white);
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.chart-container h3 {
    color: var(--rosa-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
}

.projection-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--rosa-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.projection-table th {
    background: var(--rosa-primary);
    color: var(--rosa-white);
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.projection-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.projection-table tr:hover {
    background: rgba(27, 94, 32, 0.03);
}

.projection-table tr:nth-child(even) {
    background: #f9f9f9;
}

.savings-badge {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(135deg, var(--rosa-secondary), var(--rosa-primary));
    color: var(--rosa-white);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-left: 10px;
}

.kplc-comparison {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    padding: 25px;
    margin: 25px 0;
    border-left: 4px solid var(--rosa-warning);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.comparison-item {
    background: var(--rosa-white);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .card {
        padding: var(--spacing-lg);
    }
    
    .card h2 {
        font-size: 1.5rem;
    }
    
    .summary-cards,
    .system-overview,
    .financial-grid {
        grid-template-columns: 1fr;
    }
    
    .table-actions,
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .quick-btn {
        min-width: calc(50% - var(--spacing-sm));
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .financial-amount {
        font-size: 1.8rem;
    }
    
    .quote-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: var(--spacing-lg) 0;
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .quick-btn {
        min-width: 100%;
    }
    
    .chart-wrapper {
        height: 200px;
    }
    
    .financial-card {
        padding: 15px;
    }
    
    .financial-amount {
        font-size: 1.5rem;
    }
    
    .financial-tab {
        padding: 10px;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }
    
    .chart-container {
        break-inside: avoid;
    }
    
    .financial-tabs,
    .cta-buttons {
        display: none !important;
    }
}

/* ========================
   PROPOSAL STYLES
   ======================== */

.proposal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}

.proposal-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--rosa-primary);
}

.company-logo h2 {
    color: var(--rosa-primary);
    margin-bottom: 5px;
}

.tagline {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.proposal-title h1 {
    color: #333;
    font-size: 2rem;
    margin: 10px 0;
}

.proposal-id {
    color: #666;
    font-size: 0.9rem;
    background: #f8f9fa;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* Client Information */
.client-info-section,
.executive-summary-section,
.system-design-section,
.boq-section,
.financial-analysis-section,
.warranty-section,
.next-steps-section {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid var(--rosa-primary);
}

.client-info-section h3,
.executive-summary-section h3,
.system-design-section h3,
.boq-section h3,
.financial-analysis-section h3,
.warranty-section h3,
.next-steps-section h3 {
    color: var(--rosa-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.info-item {
    background: white;
    padding: 15px;
    border-radius: 5px;
    border-left: 3px solid var(--rosa-secondary);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1rem;
}

.summary-card .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--rosa-primary);
    margin: 10px 0;
}

/* System Details */
.system-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.detail-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.detail-card h4 {
    color: var(--rosa-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.detail-card ul {
    list-style: none;
    padding: 0;
}

.detail-card li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-card li:last-child {
    border-bottom: none;
}

.detail-card li strong {
    color: #333;
    min-width: 150px;
    display: inline-block;
}

/* Performance Table */
.performance-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.performance-table tr {
    border-bottom: 1px solid #eee;
}

.performance-table tr:last-child {
    border-bottom: none;
}

.performance-table td {
    padding: 15px;
    font-size: 0.95rem;
}

.performance-table td:first-child {
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
}

/* BOQ Table */
.boq-table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.boq-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.boq-table th {
    background: var(--rosa-primary);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.boq-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.boq-table .category-header {
    background: #e8f5e8;
    font-weight: bold;
}

.boq-table .category-header td {
    padding: 15px;
    font-size: 1rem;
    color: var(--rosa-primary);
}

.boq-table tr:hover {
    background: rgba(27, 94, 32, 0.03);
}

.boq-total {
    background: var(--rosa-primary);
    color: white;
    font-weight: bold;
}

.boq-total td {
    padding: 20px 15px;
    font-size: 1.1rem;
}

/* Financial Tables */
.financial-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 20px 0;
}

.highlight-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.highlight-card h4 {
    color: var(--rosa-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.financial-table {
    width: 100%;
    border-collapse: collapse;
}

.financial-table tr {
    border-bottom: 1px solid #eee;
}

.financial-table td {
    padding: 12px 0;
    font-size: 0.95rem;
}

.financial-table td:first-child {
    color: #666;
    font-weight: 500;
}

.financial-table tr:last-child {
    border-bottom: none;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.comparison-table th {
    background: #f8f9fa;
    color: #333;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--rosa-primary);
}

.comparison-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.comparison-table tr:hover {
    background: rgba(27, 94, 32, 0.03);
}

/* Warranty Grid */
.warranty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.warranty-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border-top: 3px solid var(--rosa-secondary);
}

.warranty-item h4 {
    color: var(--rosa-primary);
    margin-bottom: 10px;
}

/* Steps Timeline */
.steps-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.step-item {
    background: white;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--rosa-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-item h4 {
    color: #333;
    margin-bottom: 10px;
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin: 40px 0;
    padding: 40px;
    background: linear-gradient(135deg, var(--rosa-primary), var(--rosa-secondary));
    color: white;
    border-radius: 10px;
}

.cta-section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.cta-section p {
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    margin: 5px;
    min-width: 200px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
}


/* Responsive Design */
@media (max-width: 768px) {
    .proposal-container {
        padding: 10px;
    }
    
    .proposal-title h1 {
        font-size: 1.5rem;
    }
    
    .client-info-section,
    .executive-summary-section,
    .system-design-section,
    .boq-section,
    .financial-analysis-section,
    .warranty-section,
    .next-steps-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .summary-cards,
    .system-details,
    .financial-highlights,
    .warranty-grid,
    .steps-timeline {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .boq-table {
        font-size: 0.8rem;
    }
    
    .boq-table th,
    .boq-table td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .proposal-title h1 {
        font-size: 1.2rem;
    }
    
    .summary-card .value {
        font-size: 1.5rem;
    }
    
    .step-item {
        padding: 15px;
    }
    
    .cta-section {
        padding: 20px;
    }
}

/* Client Capture Section */
.client-capture-section {
    margin: 20px 0;
}

.client-capture-section .notice-box {
    background: linear-gradient(135deg, #e8f5e8, #ffffff);
    border-left: 4px solid var(--rosa-primary);
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px auto;
    max-width: 800px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #eee;
    z-index: 1;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    position: relative;
}

.progress-step.active .step-number {
    background: var(--rosa-primary);
    color: white;
    border-color: var(--rosa-primary);
}

.progress-step.active .step-label {
    color: var(--rosa-primary);
    font-weight: 600;
}

.step-number {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    margin-bottom: 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
}

/* ===========================================
   RESPONSIVE FIXES FOR STEP 3 - ADD TO YOUR EXISTING CSS
   =========================================== */

/* Step 3 Container */
#step-3 {
    max-width: 100%;
    overflow-x: hidden;
}

/* Responsive Proposal Container */
.proposal-container {
    max-width: 100%;
    padding: 15px;
    margin: 0 auto;
}

/* Responsive Tables */
.responsive-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0;
    border: 1px solid #eee;
    border-radius: 8px;
}

.responsive-table-container table {
    min-width: 800px; /* Minimum width for tables */
    width: 100%;
}

/* Mobile Optimization for Tables */
@media (max-width: 768px) {
    .responsive-table-container {
        margin: 10px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .responsive-table-container table {
        font-size: 12px;
    }
    
    .boq-table th,
    .boq-table td {
        padding: 8px 5px;
        white-space: nowrap;
    }
    
    .boq-table .item-description {
        font-weight: 600;
        margin-bottom: 3px;
    }
    
    .boq-table .item-specs {
        font-size: 10px;
        color: #666;
        line-height: 1.3;
    }
    
    .financial-table,
    .performance-table,
    .comparison-table {
        font-size: 13px;
    }
    
    .financial-table td,
    .performance-table td,
    .comparison-table td {
        padding: 10px 8px;
    }
}

/* Collapsible Sections for Mobile */
.section-collapse {
    margin: 15px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.section-header {
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0 10px;
}

.section-content {
    padding: 20px;
    background: white;
    display: none; /* Hidden by default on mobile */
}

.section-content.expanded {
    display: block;
}

/* Grid Layout Adjustments for Mobile */
@media (max-width: 768px) {
    .summary-cards,
    .system-details,
    .financial-highlights,
    .warranty-grid,
    .steps-timeline {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .summary-card,
    .detail-card,
    .highlight-card,
    .warranty-item,
    .step-item {
        padding: 15px;
        margin: 0;
    }
    
    .summary-card .value {
        font-size: 24px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .info-item {
        padding: 12px;
        font-size: 14px;
    }
}

/* CTA Buttons Mobile Fix */
@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin: 5px 0;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn i {
        margin-right: 8px;
    }
}

/* Print/Download Buttons */
@media print {
    .cta-buttons,
    .section-toggle,
    .no-print {
        display: none !important;
    }
    
    .section-content {
        display: block !important;
    }
    
    .proposal-container {
        padding: 0;
        margin: 0;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .proposal-header {
        padding: 15px 10px;
    }
    
    .proposal-title h1 {
        font-size: 18px;
        line-height: 1.3;
        text-align: center;
    }
    
    .proposal-id {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .section-header {
        padding: 12px;
    }
    
    .section-header h3 {
        font-size: 14px;
    }
    
    .section-content {
        padding: 15px;
    }
    
    .detail-card ul {
        padding-left: 15px;
    }
    
    .detail-card li {
        padding: 6px 0;
        font-size: 13px;
    }
    
    .footer-section {
        padding: 15px;
        font-size: 12px;
    }
}

/* Tablet Devices */
@media (min-width: 769px) and (max-width: 1024px) {
    .proposal-container {
        padding: 20px;
    }
    
    .summary-cards,
    .system-details,
    .financial-highlights {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .warranty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Fix for overflow in financial sections */
.financial-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .financial-highlights {
        grid-template-columns: 1fr;
    }
}

/* Ensure tables don't overflow their containers */
table {
    max-width: 100%;
    table-layout: fixed;
}

td, th {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Installation Services Highlight */
.installation-highlight {
    background-color: #fff8e1;
    border-left: 4px solid #ffb300;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
}

.installation-highlight h4 {
    color: #ff6f00;
    margin-top: 0;
}

/* Mobile-friendly BOQ */
@media (max-width: 768px) {
    .boq-table {
        font-size: 11px;
    }
    
    .boq-table th,
    .boq-table td {
        padding: 6px 4px;
    }
    
    .category-header td {
        font-size: 12px;
        padding: 8px 4px;
    }
    
    .boq-total td {
        padding: 12px 4px;
        font-size: 13px;
    }

    /* ===========================================
   MOBILE EMERGENCY FIXES - ADD THIS LAST
   =========================================== */

/* Mobile devices (up to 768px) */
@media screen and (max-width: 768px) {
    /* 1. FIX ALL TABLES */
    table {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* 2. FIX PROPOSAL TABLES (Step 3) */
    .boq-table,
    .financial-table,
    .performance-table,
    .comparison-table {
        min-width: 100% !important;
        font-size: 12px !important;
    }
    
    /* 3. FIX CHART CONTAINERS */
    .chart-wrapper {
        height: 250px !important;
    }
    
    /* 4. FIX GRID LAYOUTS */
    .summary-cards,
    .system-details,
    .financial-highlights,
    .warranty-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* 5. FIX BUTTONS */
    .btn {
        min-height: 44px !important;
        padding: 12px 16px !important;
    }
}

/* Very small phones (up to 480px) */
@media screen and (max-width: 480px) {
    /* Make text smaller but readable */
    .proposal-container {
        padding: 10px !important;
    }
    
    .proposal-container h1 {
        font-size: 1.3rem !important;
    }
    
    .proposal-container h3 {
        font-size: 1.1rem !important;
    }
    
    /* Stack buttons vertically */
    .cta-buttons {
        flex-direction: column !important;
    }
    
    .cta-buttons .btn {
        width: 100% !important;
        margin: 5px 0 !important;
    }
}
}