/* Modern, Polished UI Styles */

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

:root {
    --primary: #0066CC;
    --primary-dark: #0052A3;
    --success: #28A745;
    --success-dark: #218838;
    --warning: #FFC107;
    --danger: #DC3545;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.6;
}

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

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 60px;
}

.icon-large {
    font-size: 64px;
    margin-bottom: 20px;
}

.hero-section h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.subtitle {
    font-size: 20px;
    color: var(--gray-600);
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    font-size: 14px;
}

/* Pricing */
.pricing-section {
    text-align: center;
}

.pricing-section h2 {
    font-size: 32px;
    margin-bottom: 32px;
    color: var(--gray-900);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid var(--primary);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
    border-color: var(--primary);
    background: white !important;
}

.badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    user-select: none;
}

.pricing-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--gray-900);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
    min-height: 120px;
    pointer-events: none;
}

.plan-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-700);
    line-height: 1.5;
    pointer-events: none;
}

.price {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 24px;
}

.price span {
    font-size: 16px;
    color: var(--gray-600);
    font-weight: 400;
}

.btn-select {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    pointer-events: auto;
    position: relative;
    z-index: 10;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-select:hover {
    background: var(--primary-dark);
}

.trial-info {
    color: var(--gray-600);
    font-size: 14px;
}

/* Header */
.header {
    background: white;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    scroll-margin-top: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-instructions-prominent {
    padding: 14px 28px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2) !important;
    border: 2px solid var(--primary) !important;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

.btn-instructions-prominent:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3) !important;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%) !important;
}

.btn-instructions-prominent .btn-icon {
    font-size: 18px;
    margin-right: 8px;
}

/* Animation for instructions button on page load */
/* 4 seconds total, 4 pulses (one every 1000ms), each pulse is 25% of animation */
@keyframes attentionPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2), 0 0 0 0 rgba(0, 102, 204, 0);
    }
    12.5% {
        transform: scale(1.15);
        box-shadow: 0 6px 24px rgba(0, 102, 204, 0.6), 0 0 0 8px rgba(0, 102, 204, 0.15);
    }
    25% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2), 0 0 0 0 rgba(0, 102, 204, 0);
    }
    37.5% {
        transform: scale(1.15);
        box-shadow: 0 6px 24px rgba(0, 102, 204, 0.6), 0 0 0 8px rgba(0, 102, 204, 0.15);
    }
    50% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2), 0 0 0 0 rgba(0, 102, 204, 0);
    }
    62.5% {
        transform: scale(1.15);
        box-shadow: 0 6px 24px rgba(0, 102, 204, 0.6), 0 0 0 8px rgba(0, 102, 204, 0.15);
    }
    75% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2), 0 0 0 0 rgba(0, 102, 204, 0);
    }
    87.5% {
        transform: scale(1.15);
        box-shadow: 0 6px 24px rgba(0, 102, 204, 0.6), 0 0 0 8px rgba(0, 102, 204, 0.15);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2), 0 0 0 0 rgba(0, 102, 204, 0);
    }
}

.btn-instructions-prominent.animate-attention {
    animation: attentionPulse 4s ease-in-out !important;
    z-index: 1000 !important;
}

.header-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.header-content p {
    font-size: 14px;
    color: var(--gray-600);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-600);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-logout .btn-icon {
    font-size: 16px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
}

/* Main Content */
.main-content {
    padding: 24px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

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

.card-icon {
    font-size: 24px;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

.btn-edit {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 16px;
    scroll-margin-top: 0;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: var(--gray-100);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-icon {
    font-size: 48px;
}

.file-options {
    margin: 16px 0;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-300);
}

.divider span {
    padding: 0 16px;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
}

.default-file-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-default-file {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-default-file:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-default-file .btn-icon {
    font-size: 18px;
}

.file-download-section {
    width: 100%;
}

.btn-download {
    width: 100%;
    padding: 12px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.btn-download:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-download .btn-icon {
    font-size: 16px;
}

.template-note {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #F0F7FF;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    margin-top: 8px;
}

.note-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.note-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
}

.note-content strong {
    color: var(--gray-900);
    display: block;
    margin-bottom: 4px;
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #E7F3FF;
    border-radius: 12px;
    margin-bottom: 16px;
}

.file-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-edit-employees {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-edit-employees:hover {
    background: var(--primary-dark);
}

.file-name {
    font-weight: 500;
    color: var(--gray-900);
}

.btn-change {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.btn-primary:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--gray-200);
    color: var(--gray-700);
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--gray-300);
}

/* Config Preview */
.config-preview {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.config-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.config-row:last-child {
    border-bottom: none;
}

.config-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-content.modal-large {
    max-width: 95%;
    width: 95%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.fac-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fac-apply-button {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 140px;
}

.btn-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--gray-600);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.config-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.config-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.config-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
}

.form-group input[readonly] {
    background: var(--gray-100);
    cursor: not-allowed;
    color: var(--gray-600);
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.form-group small.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--gray-600);
    font-style: italic;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Full-width button in form-row */
.form-row > button {
    grid-column: 1 / -1;
    width: 100%;
}

/* FAC Calculator Styles */
.fac-calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.fac-year-section {
    padding: 16px;
    background: var(--gray-100);
    border-radius: 12px;
    border: 1px solid var(--gray-300);
}

.fac-year-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary);
}

.fac-year-section .fac-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.fac-year-section .fac-inline label {
    min-width: 140px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0;
    flex-shrink: 0;
}

.fac-year-section .fac-inline input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.fac-year-total {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-300);
    font-size: 13px;
    color: var(--gray-700);
}

.fac-year-total strong {
    color: var(--gray-900);
}

.fac-result {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--gray-300);
}

.fac-result-box {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    color: white;
}

.fac-result-box h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 12px;
    opacity: 0.9;
}

.fac-result-value {
    font-size: 32px;
    font-weight: 700;
}

.btn-secondary {
    background: var(--gray-300);
    color: var(--gray-900);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: var(--gray-400);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-help {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
    transition: background 0.2s;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-help:hover {
    background: var(--gray-200);
}

.pension-option-help {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.pension-option-item {
    padding: 20px;
    background: var(--gray-100);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.pension-option-item h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.pension-option-item p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
    margin: 0;
}

/* Configuration Display */
.config-display {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--gray-200);
}

.config-display-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 20px;
}

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

.config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--gray-100);
    border-radius: 8px;
}

.config-label {
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
}

.config-value-display {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 600;
}

.btn-edit-config-inline {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 16px;
}

.btn-edit-config-inline:hover {
    background: var(--primary-dark);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--gray-200);
}

/* Results */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.result-card {
    padding: 20px;
    background: var(--gray-100);
    border-radius: 12px;
}

.result-card-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.result-card-label {
    font-size: 12px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.result-card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    font-size: 13px;
}

.results-table-container {
    overflow-x: auto;
    margin-top: 24px;
}

.results-table th {
    text-align: left;
    padding: 12px;
    background: var(--gray-100);
    font-weight: 600;
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.results-table tr:hover {
    background: var(--gray-100);
}

.results-table .employee-row-second:hover {
    background: transparent;
}

.results-table .employee-row-first {
    border-bottom: 1px solid var(--gray-200);
}

.results-table .employee-row-second {
    border-bottom: 2px solid var(--gray-300);
    background: var(--gray-50);
}

.results-table td.better-value {
    color: #28A745;
    font-weight: 700;
}

.results-table td.worse-value {
    color: #DC3545;
    font-weight: 700;
}

/* Individual Result Detailed View */
.individual-result-detailed {
    margin-top: 24px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.individual-result-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary);
}

.individual-result-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.employee-id {
    font-size: 14px;
    color: var(--gray-600);
}

.result-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.result-detail-section {
    padding: 20px;
    background: var(--gray-100);
    border-radius: 12px;
}

.result-detail-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-300);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.detail-label {
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: var(--gray-900);
    font-weight: 600;
    text-align: right;
}

.detail-value.highlight {
    color: var(--primary);
    font-size: 16px;
}

.detail-value.large {
    font-size: 20px;
    font-weight: 700;
}

.detail-value.better-value {
    color: #28A745;
    font-weight: 700;
}

.detail-value.worse-value {
    color: #DC3545;
    font-weight: 700;
}

.no-saved-comparison {
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-600);
    font-style: italic;
    background: var(--gray-100);
    border-radius: 12px;
    border: 2px dashed var(--gray-300);
}

.calculation-notes {
    margin-top: 32px;
    padding: 20px;
    background: #F0F7FF;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
}

.calculation-notes h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.notes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notes-list li {
    padding: 10px 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
    border-bottom: 1px solid rgba(0, 102, 204, 0.1);
}

.notes-list li:last-child {
    border-bottom: none;
}

.notes-list li strong {
    color: var(--gray-900);
    font-weight: 600;
}

/* Comparison View */
.comparison-container {
    margin-top: 24px;
}

.comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary);
}

.comparison-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
}

.comparison-actions {
    display: flex;
    gap: 12px;
}

.btn-save-comparison {
    padding: 10px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-save-comparison:hover {
    background: var(--success-dark);
}

.btn-clear-comparison {
    padding: 10px 20px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-clear-comparison:hover {
    background: #C82333;
}

.comparison-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.comparison-side {
    padding: 20px;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--gray-200);
}

.saved-side {
    border-color: var(--primary);
}

.saved-side .detail-value {
    color: #333;
}

.current-side {
    border-color: var(--success);
}

.comparison-side-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}

.comparison-side-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.comparison-badge {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.comparison-badge.current {
    background: var(--success);
}

.individual-result-detailed.compact-view {
    padding: 0;
}

.individual-result-detailed.compact-view .individual-result-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.individual-result-detailed.compact-view .result-details-grid {
    gap: 16px;
    margin-bottom: 20px;
}

.individual-result-detailed.compact-view .result-detail-section {
    padding: 16px;
}

.individual-result-detailed.compact-view .calculation-notes {
    margin-top: 20px;
    padding: 16px;
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.comparison-differences {
    margin-top: 32px;
    padding: 24px;
    background: #FFF9E6;
    border-left: 4px solid var(--warning);
    border-radius: 8px;
}

.comparison-differences-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.differences-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.difference-item {
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--gray-300);
}

.difference-item.increase {
    border-left-color: var(--success);
}

.difference-item.decrease {
    border-left-color: var(--danger);
}

.difference-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.difference-values {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.difference-saved,
.difference-current {
    font-size: 14px;
    color: var(--gray-700);
}

.difference-arrow {
    font-size: 16px;
    color: var(--gray-500);
}

.difference-amount {
    font-size: 14px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.difference-amount.increase {
    color: var(--success);
    background: rgba(40, 167, 69, 0.1);
}

.difference-amount.decrease {
    color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
}

.config-differences {
    margin-top: 20px;
    padding: 16px;
    background: white;
    border-radius: 8px;
}

.config-differences h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.config-differences ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.config-differences li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-200);
}

.config-differences li:last-child {
    border-bottom: none;
}

.no-differences {
    padding: 16px;
    text-align: center;
    color: var(--gray-600);
    font-style: italic;
}

/* Instructions Modal Styles */
.instructions-content {
    line-height: 1.6;
}

.instructions-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.instructions-section:last-child {
    border-bottom: none;
}

.instructions-section h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.3em;
}

.instructions-section h4 {
    color: var(--gray-800);
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.instructions-section ul,
.instructions-section ol {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.instructions-section li {
    margin-bottom: 6px;
}

.instructions-section code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary);
}

.option-detail {
    background: var(--gray-100);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
}

.option-detail h4 {
    margin-top: 0;
    color: var(--primary);
}

.important-note {
    background: #F0F7FF;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border-left: 4px solid #0066CC;
}

.important-note h4 {
    color: #0066CC;
    margin-top: 0;
}

.formula-section {
    background: var(--gray-100);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.formula-section h4 {
    margin-top: 0;
    color: var(--primary);
}

.formula-section code {
    display: block;
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 8px 0;
    border: 1px solid var(--gray-200);
}

/* Legal Warning Styles */
.legal-warning-content {
    line-height: 1.6;
}

/* Legal Disclaimer Banner (Subsequent Logins) */
.legal-disclaimer-banner {
    background-color: #fff3cd;
    border-bottom: 2px solid #ffc107;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1400px;
    margin: 0 auto;
}

.banner-icon {
    font-size: 1.2em;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
    font-size: 0.95em;
    color: #856404;
    font-weight: 500;
}

.btn-banner-dismiss {
    background-color: #ffc107;
    color: #856404;
    border: 1px solid #ffc107;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.btn-banner-dismiss:hover {
    background-color: #ffb300;
    border-color: #ffb300;
}

.legal-warning-content h3 {
    color: var(--danger);
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.legal-warning-content h3:first-of-type {
    margin-top: 0;
}

.legal-warning-content ul {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.legal-warning-content li {
    margin-bottom: 6px;
}

.legal-warning-content p {
    margin-bottom: 12px;
}

/* Resources Section Styles */
.resources-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.resource-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.resource-toggle:hover {
    background: var(--gray-200);
    border-color: var(--primary);
}

.resource-toggle.expanded {
    background: var(--primary);
    color: white;
    border-color: var(--primary-dark);
}

.resource-icon {
    font-size: 20px;
}

.resource-title {
    flex: 1;
}

.resource-arrow {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.resource-content {
    margin-top: 8px;
    padding: 20px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.resource-section-content {
    line-height: 1.6;
}

.resource-section-content h4 {
    color: var(--primary);
    margin-top: 20px;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.resource-section-content h4:first-of-type {
    margin-top: 0;
}

.resource-section-content ul,
.resource-section-content ol {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.resource-section-content li {
    margin-bottom: 6px;
}

.resource-section-content p {
    margin-bottom: 12px;
}

@media (max-width: 1024px) {
    .comparison-split {
        grid-template-columns: 1fr;
    }
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Employee Editor */
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.btn-add {
    padding: 10px 20px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add:hover {
    background: var(--success-dark);
}

.employee-count {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

.employee-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
}

.employee-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.employee-table thead {
    position: sticky;
    top: 0;
    background: var(--gray-100);
    z-index: 10;
}

.employee-table th {
    padding: 12px 8px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    border-bottom: 2px solid var(--gray-300);
    white-space: nowrap;
}

.employee-table td {
    padding: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.employee-table tbody tr:hover {
    background: var(--gray-50);
}

.employee-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.employee-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.employee-input[type="number"] {
    min-width: 80px;
}

.btn-delete-employee {
    padding: 6px 12px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-delete-employee:hover {
    background: #C82333;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 36px;
    }
    
    .pricing-cards {
        grid-template-columns: 1fr;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

