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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.portal {
    display: none;
}

.portal.active {
    display: block;
}

.screen {
    display: none;
}

.active {
    display: block;
}

/* Login Screen */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #2563eb;
    margin-bottom: 8px;
    font-size: 28px;
}

.login-header p {
    color: #6b7280;
    font-size: 16px;
}

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

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.forgot-password {
    color: #2563eb;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #2563eb;
    color: white;
    width: 100%;
    justify-content: center;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-outline {
    background: transparent;
    border: 2px solid #2563eb;
    color: #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: white;
}

.btn-large {
    padding: 14px 28px;
    font-size: 18px;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-back {
    background: transparent;
    color: #6b7280;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.signup-link {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

.header-left h1 {
    color: #2563eb;
    font-size: 24px;
}

.welcome {
    color: #6b7280;
    margin-right: 20px;
}

.dashboard-content {
    padding: 40px;
    display: grid;
    gap: 30px;
    grid-template-columns: 2fr 1fr;
}

.dashboard-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.progress-section {
    margin: 30px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: #10b981;
    transition: width 0.3s;
}

.progress-text {
    font-size: 14px;
    color: #6b7280;
}

.quick-actions {
    display: flex;
    gap: 12px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.progress-tracker {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.progress-step.completed .step-icon {
    background: #10b981;
    color: white;
}

.progress-step.active .step-icon {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #9ca3af;
}

.progress-step span {
    font-size: 12px;
    text-align: center;
    color: #6b7280;
}

.progress-step.active span {
    color: #2563eb;
    font-weight: 500;
}

.recent-activity {
    background: white;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.recent-activity h3 {
    margin-bottom: 20px;
    color: #374151;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.activity-item i {
    color: #10b981;
}

/* Form Styles */
.form-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

.form-header {
    padding: 30px 40px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.form-header h1 {
    color: #374151;
    font-size: 24px;
}

.progress-indicator {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.form-nav {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.nav-item {
    flex: 1;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-weight: 500;
}

.nav-item.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: white;
}

.form-section {
    display: none;
    padding: 40px;
}

.form-section.active {
    display: block;
}

.form-section h2 {
    color: #374151;
    margin-bottom: 30px;
    font-size: 24px;
}

.form-section h3 {
    color: #4b5563;
    margin: 40px 0 20px 0;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f3f4f6;
}

/* Income Card Styles */
.info-card {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 30px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-card i {
    color: #2563eb;
    margin-top: 2px;
}

.income-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    background: #fafafa;
}

.income-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.employer-info {
    flex: 1;
}

.employer-info strong {
    display: block;
    color: #374151;
}

.employer-info span {
    font-size: 14px;
    color: #6b7280;
}

.verified-badge {
    background: #dcfce7;
    color: #166534;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.income-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.income-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.income-actions {
    display: flex;
    gap: 8px;
}

.income-summary {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.income-summary h4 {
    margin-bottom: 16px;
    color: #374151;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .dashboard-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    .form-header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .form-section {
        padding: 20px;
    }

    .progress-tracker {
        flex-wrap: wrap;
        gap: 15px;
    }

    .quick-actions {
        flex-direction: column;
    }

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

/* Deductions Section Styles */
.deduction-category {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fafafa;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.category-header h4 {
    margin: 0;
    color: #374151;
}

.category-fields {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.deductions-summary {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.deductions-summary .summary-item.total {
    border-top: 2px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 12px;
    font-weight: 600;
    color: #374151;
}

.document-upload {
    margin: 30px 0;
}

.upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #f9fafb;
    transition: border-color 0.3s;
    cursor: pointer;
}

.upload-zone:hover {
    border-color: #2563eb;
}

.upload-zone i {
    font-size: 48px;
    color: #9ca3af;
    margin-bottom: 16px;
}

.upload-zone p {
    color: #6b7280;
    margin-bottom: 16px;
}

.uploaded-files {
    margin-top: 20px;
}

/* Family Section Styles */
.child-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fafafa;
}

.child-item h5 {
    margin: 0 0 16px 0;
    color: #374151;
}

#spouseFields, #healthInsuranceFields {
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 16px 0;
    background: #f8fafc;
}

/* Review Section Styles */
.review-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    background: white;
}

.summary-card h3 {
    margin: 0 0 16px 0;
    color: #374151;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

.tax-calculation {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
}

.tax-calculation h3 {
    margin: 0 0 20px 0;
    color: #0369a1;
}

.calculation-breakdown {
    max-width: 400px;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0f2fe;
}

.calc-item.total {
    border-top: 2px solid #0ea5e9;
    border-bottom: none;
    font-weight: 600;
    color: #0369a1;
    margin-top: 8px;
    padding-top: 16px;
}

.calc-item.refund {
    background: #dcfce7;
    margin-top: 16px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.refund-amount {
    color: #166534;
    font-size: 18px;
}

.declaration-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    background: white;
}

.declaration-section h3 {
    margin: 0 0 20px 0;
    color: #374151;
}

.declaration-content {
    background: #f8fafc;
    padding: 24px;
    border-radius: 8px;
}

.declaration-content ul {
    margin: 16px 0;
    padding-left: 20px;
}

.declaration-content li {
    margin-bottom: 8px;
    color: #4b5563;
}

.declaration-checkbox {
    font-size: 16px;
    margin: 20px 0;
}

.submission-actions {
    border-top: 2px solid #e5e7eb;
    padding-top: 30px;
}

.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.submission-note {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.submission-note i {
    color: #d97706;
    margin-top: 2px;
}

/* Interactive Elements */
.checkbox input:checked ~ .category-fields {
    display: block !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .review-summary {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}






/* Enhanced Tax Calculator Styles */
.tax-calculation-detailed {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
}

.tax-calculation-detailed h3 {
    margin: 0 0 20px 0;
    color: #0369a1;
}

.calc-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.calc-tab {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s;
}

.calc-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.calc-tab-content {
    display: none;
}

.calc-tab-content.active {
    display: block;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.calc-column {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.calc-column h4 {
    margin-bottom: 15px;
    color: #374151;
    font-size: 16px;
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.calc-item.total {
    border-top: 2px solid #e2e8f0;
    border-bottom: none;
    font-weight: 600;
    color: #374151;
    margin-top: 8px;
    padding-top: 12px;
}

.calc-item.refund-total {
    background: #dcfce7;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 18px;
}

/* Income Breakdown */
.income-breakdown-detailed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.income-category {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.income-category h5 {
    margin-bottom: 10px;
    color: #374151;
    font-size: 14px;
}

.income-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

/* Deductions Input */
.deductions-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.deduction-category {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.deduction-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.deduction-line:last-child {
    border-bottom: none;
}

.deduction-input {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: right;
}

/* Offsets Breakdown */
.offsets-breakdown {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.offset-category {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.offset-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.offset-input {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: right;
}

.mls-section {
    margin-top: 15px;
}

/* XPM Label Badges */
.xpm-label {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-family: monospace;
    margin-left: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .calc-tabs {
        flex-wrap: wrap;
    }

    .calc-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .deductions-breakdown {
        grid-template-columns: 1fr;
    }

    .deduction-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .deduction-input {
        width: 100%;
    }
}