:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --secondary: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --background: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #6c757d;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.sac-calculator-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    color: #2c3e50;
    line-height: 1.6;
}

.sac-intro {
    background: var(--gradient);
    color: white;
    padding: 40px 30px;
    border-radius: 15px 15px 0 0;
    margin-bottom: 0;
}

.sac-intro h1 {
    margin: 0 0 15px 0;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.sac-intro p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.95;
}

.sac-calculator {
    background: white;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calculator-body {
    padding: 30px;
    background: #f8f9fa;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #495057;
}

.field-input-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-prefix {
    background: var(--primary);
    color: white;
    padding: 0 15px;
    display: flex;
    align-items: center;
    font-weight: 700;
    border-radius: 8px 0 0 8px;
    font-size: 1.1rem;
}

.input-control {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    font-weight: 500;
}

.with-prefix .input-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.input-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-calculate {
    width: 100%;
    padding: 18px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* Results Styling */
.results-section {
    display: none;
    padding: 30px;
    background: white;
    border-top: 2px solid #e9ecef;
}

.results-section.show {
    display: block;
    animation: slideDown 0.5s ease;
}

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

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

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.summary-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    font-weight: 700;
}

.summary-card .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.summary-card.success-card {
    border-color: #d1fae5;
    background: #f0fdf4;
}

.summary-card.success-card .value {
    color: #059669;
}

.summary-card.primary-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-color: var(--primary);
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    min-width: 600px;
    background: white;
}

.comparison-table th,
.comparison-table td {
    padding: 18px;
    border-bottom: 1px solid #e9ecef;
}

.comparison-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: var(--text-main);
    font-size: 0.95rem;
}

.comparison-table .row-highlight {
    background: #f8f9fa;
    font-weight: 700;
}

.val-saving {
    color: #059669;
    font-weight: 700;
}

.disclosure-note {
    font-size: 0.85rem;
    color: #6c757d;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px dashed #ced4da;
    line-height: 1.6;
}

.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 5px;
    display: none;
}

.invalid .input-control {
    border-color: var(--danger);
}