* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f6fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.calculator-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px;
}

/* Header */
.calculator-header {
    background: linear-gradient(135deg, #25293C 0%, #1589BC 100%);
    color: white;
    padding: 30px;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 15px rgba(21, 137, 188, 0.2);
}

.calculator-header h1 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 5px;
    color: white !important;
}

.calculator-header p {
    font-size: 1.1em;
    opacity: 0.95;
    color: white !important;
}

/* Main Content */
.calculator-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Input Panel */
.input-panel {
    padding: 40px;
    background: #fafbfc;
    border-right: 1px solid #e5e7eb;
}

.input-panel h2 {
    color: #1a365d;
    font-size: 1.4em;
    margin-bottom: 30px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 30px;
}

.input-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.input-label span:first-child {
    color: #4a5568;
    font-size: 0.95em;
    font-weight: 500;
}

.input-value {
    color: #1589BC;
    font-weight: 600;
    font-size: 1.1em;
}

/* Slider Styles */
.slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25293C 0%, #1589BC 100%);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(21, 137, 188, 0.3);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(21, 137, 188, 0.4);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25293C 0%, #1589BC 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(21, 137, 188, 0.3);
    transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(21, 137, 188, 0.4);
}

/* Results Panel */
.results-panel {
    padding: 40px;
    background: white;
}

.results-panel h2 {
    color: #1a365d;
    font-size: 1.4em;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Chart Container */
.chart-container {
    height: 300px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fafbfc;
    border-radius: 8px;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.metric {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.metric:hover {
    transform: translateY(-2px);
}

.metric-icon {
    font-size: 2em;
}

.metric-details {
    flex: 1;
}

.metric-label {
    font-size: 0.85em;
    color: #6b7280;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #1a365d;
}

/* Status Alert */
.status-alert {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #10b981;
}

.alert-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.alert-icon {
    font-size: 1.5em;
    line-height: 1;
}

.alert-title {
    font-weight: 600;
    color: #1a365d;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.alert-message {
    color: #4a5568;
}

#statusAmount {
    font-weight: 700;
    color: #1a365d;
    font-size: 1.1em;
}

/* Export Button */
.export-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #25293C 0%, #1589BC 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(21, 137, 188, 0.2);
}

.export-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(21, 137, 188, 0.35);
    background: linear-gradient(135deg, #1589BC 0%, #25293C 100%);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

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

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s ease;
    left: 0;
    right: 0;
}

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

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #1a365d;
    margin-bottom: 10px;
}

.modal-content > p {
    color: #6b7280;
    margin-bottom: 25px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1589BC;
    box-shadow: 0 0 0 3px rgba(21, 137, 188, 0.15);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    flex: 1;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #25293C 0%, #1589BC 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(21, 137, 188, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(21, 137, 188, 0.35);
    background: linear-gradient(135deg, #1589BC 0%, #25293C 100%);
}

/* Responsive Design */
@media (max-width: 968px) {
    .calculator-content {
        grid-template-columns: 1fr;
    }
    
    .input-panel {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .calculator-header {
        padding: 20px;
    }
    
    .calculator-header h1 {
        font-size: 1.5em;
    }
    
    .input-panel,
    .results-panel {
        padding: 25px;
    }
    
    .metric {
        padding: 15px;
    }
    
    .metric-value {
        font-size: 1.2em;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Toggle Switch Styles */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: 0.3s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: #1589BC;
}

input:checked + .switch-slider:before {
    transform: translateX(26px);
}

.switch-slider:hover {
    background-color: #a0aec0;
}

input:checked + .switch-slider:hover {
    background-color: #0e6a94;
}