/* KPI Form Styles */
.form-container {
    max-width: none;
    margin: 0;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.kpi-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* KPI Sections Container */
#kpiSectionsContainer {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Individual KPI Section */
.kpi-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.kpi-section:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.kpi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.kpi-section-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kpi-section-header h3 i {
    color: var(--accent-color);
}

.remove-kpi-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.remove-kpi-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.form-section {
    background: transparent;
    border-radius: 8px;
    padding: 0;
    border: none;
    margin-bottom: 0;
}

.form-section h4 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h4 i {
    color: var(--accent-color);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-label.required::after {
    content: ' *';
    color: var(--red);
}

.form-control {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.error-message {
    color: var(--red);
    font-size: 0.8rem;
    display: none;
    margin-top: 0.25rem;
}

.threshold-info {
    margin-bottom: 1rem;
}

.info-text {
    background: rgba(52, 152, 219, 0.1);
    color: var(--blue);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    min-height: 44px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: color-mix(in srgb, var(--accent-color) 85%, black);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: color-mix(in srgb, var(--text-secondary) 85%, black);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--red);
    color: white;
}

.btn-danger:hover {
    background: color-mix(in srgb, var(--red) 85%, black);
    transform: translateY(-1px);
}

.btn.success {
    background: var(--green);
    color: white;
}

/* KPI Preview Styles */
.kpi-preview {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.preview-section {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.preview-section h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.preview-grid > div {
    font-size: 0.9rem;
}

.preview-grid strong {
    color: var(--text-primary);
}

/* Performance Indicator */
.performance-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.performance-indicator.excellent {
    background: rgba(46, 204, 113, 0.1);
    color: var(--green);
}

.performance-indicator.good {
    background: rgba(52, 152, 219, 0.1);
    color: var(--blue);
}

.performance-indicator.average {
    background: rgba(230, 126, 34, 0.1);
    color: var(--orange);
}

.performance-indicator.poor {
    background: rgba(231, 76, 60, 0.1);
    color: var(--red);
}

.performance-indicator.no-data {
    background: rgba(149, 165, 166, 0.1);
    color: var(--text-secondary);
}

.performance-bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.performance-fill {
    height: 100%;
    background: currentColor;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.performance-label {
    font-weight: 500;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Priority and Status Badges */
.priority, .status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority.critical {
    background: rgba(231, 76, 60, 0.1);
    color: var(--red);
}

.priority.high {
    background: rgba(230, 126, 34, 0.1);
    color: var(--orange);
}

.priority.medium {
    background: rgba(241, 196, 15, 0.1);
    color: #f39c12;
}

.priority.low {
    background: rgba(46, 204, 113, 0.1);
    color: var(--green);
}

.status.active {
    background: rgba(46, 204, 113, 0.1);
    color: var(--green);
}

.status.inactive {
    background: rgba(149, 165, 166, 0.1);
    color: var(--text-secondary);
}

.status.draft {
    background: rgba(52, 152, 219, 0.1);
    color: var(--blue);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-spinner {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.loading-spinner p {
    margin: 0;
    font-size: 1rem;
}

/* Global Employee Section */
.global-employee-section {
    background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color) 85%, white));
    border: 2px solid var(--accent-color);
    margin-bottom: 2rem;
    position: relative;
}

.global-employee-section h3 {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.global-employee-section h3 i {
    color: rgba(255, 255, 255, 0.9);
}

.global-employee-section .section-description {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.global-employee-section .form-group label {
    color: white;
    font-weight: 600;
}

.global-employee-section .form-control {
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
}

.global-employee-section .form-control:focus {
    border-color: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.global-employee-section .error-message {
    background: rgba(255, 255, 255, 0.9);
    color: var(--red);
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Getting Started Section */
.getting-started-section {
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin: 2rem 0;
    text-align: center;
    transition: all 0.3s ease;
}

.getting-started-content {
    max-width: 500px;
    margin: 0 auto;
}

.getting-started-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--blue), var(--purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.getting-started-section h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.getting-started-section p {
    margin: 0 0 2rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.getting-started-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    margin-bottom: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.tab-navigation::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    min-height: 80px;
    z-index: 2;
}

.tab-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--blue);
}

.tab-item.active {
    background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--blue) 85%, white));
    color: white;
    border-color: var(--blue);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    border-bottom: 3px solid white;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--blue);
    border-radius: 1px;
    z-index: 3;
}

/* Tab indicators for unsaved changes */
.tab-item .change-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 3;
}

.tab-item.has-changes .change-indicator {
    opacity: 1;
    transform: scale(1);
    animation: pulse 2s infinite;
}

.tab-item.active .change-indicator {
    background: white;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Ensure content stays above the shimmer effect */
.tab-icon, .tab-content {
    position: relative;
    z-index: 2;
}

.tab-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.tab-item:not(.active) .tab-icon {
    background: var(--bg-secondary);
    color: var(--blue);
}

.tab-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.tab-item:not(.active) .tab-content h4 {
    color: var(--text-primary);
}

.tab-content p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.3;
}

.tab-item:not(.active) .tab-content p {
    color: var(--text-secondary);
}

/* Tab Content Sections */
.tab-content-section {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    width: 100%;
}

.tab-content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.4s ease;
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Evaluation Specific Styles */
.evaluation-container {
    max-width: none;
    margin: 0;
    width: 100%;
}

.evaluation-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.evaluation-header h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.evaluation-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.kpi-evaluation-section {
    margin-top: 2rem;
}

.evaluation-instructions {
    margin-bottom: 2rem;
}

.instructions-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.instructions-card h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions-card ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.instructions-card li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.evaluation-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* KPI Evaluation Cards */
.kpi-evaluation-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.kpi-evaluation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.kpi-eval-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.kpi-eval-info h5 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.kpi-eval-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.kpi-eval-meta span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.eval-performance {
    text-align: right;
}

.performance-score {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.performance-score.excellent {
    color: var(--green);
}

.performance-score.good {
    color: var(--blue);
}

.performance-score.average {
    color: var(--orange);
}

.performance-score.poor {
    color: var(--red);
}

.kpi-eval-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.eval-metrics {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
}

.eval-metrics h6 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.metric-label {
    color: var(--text-secondary);
}

.metric-value {
    color: var(--text-primary);
    font-weight: 500;
}

.eval-feedback {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feedback-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.feedback-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.feedback-group textarea,
.feedback-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    resize: vertical;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.feedback-group textarea:focus,
.feedback-group input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Additional utility classes for evaluation */
.text-success {
    color: var(--green) !important;
}

.text-danger {
    color: var(--red) !important;
}

.text-warning {
    color: var(--orange) !important;
}

.text-info {
    color: var(--blue) !important;
}

/* Responsive Design for Tabs */
@media (max-width: 768px) {
    .form-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    .evaluation-container {
        margin: 0;
        width: 100%;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .preview-grid {
        grid-template-columns: 1fr;
    }
    
    .getting-started-section {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }
    
    .getting-started-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .getting-started-section h3 {
        font-size: 1.25rem;
    }
    
    .step {
        padding: 0.75rem;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .step-text {
        font-size: 0.85rem;
    }
    
    .tab-navigation {
        padding: 0.75rem;
        gap: 0.75rem;
        flex-direction: column;
    }
    
    .tab-item {
        padding: 1rem;
        flex-direction: row;
        text-align: left;
        gap: 0.75rem;
        min-height: auto;
    }
    
    .tab-item:hover,
    .tab-item.active {
        transform: none;
    }
    
    .tab-item.active::before {
        display: none;
    }
    
    .tab-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .tab-content h4 {
        font-size: 1rem;
    }
    
    .tab-content p {
        font-size: 0.8rem;
    }
    
    .evaluation-header {
        padding: 1.5rem;
    }
    
    .evaluation-header h3 {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .kpi-eval-body {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .kpi-eval-header {
        flex-direction: column;
        gap: 1rem;
        text-align: left;
    }
    
    .eval-performance {
        text-align: left;
    }
    
    .evaluation-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Tablet responsive adjustments for horizontal tabs */
@media (max-width: 992px) {
    .tab-navigation {
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .tab-item {
        padding: 1rem 0.75rem;
        gap: 0.5rem;
    }
    
    .tab-content h4 {
        font-size: 1rem;
    }
    
    .tab-content p {
        font-size: 0.8rem;
    }
    
    .tab-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Small tablet and large phone adjustments */
@media (max-width: 768px) {
    .tab-item {
        padding: 0.75rem 0.5rem;
        min-height: 70px;
    }
    
    .tab-content h4 {
        font-size: 0.95rem;
    }
    
    .tab-content p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 1rem;
    }
    
    .form-section h3 {
        font-size: 1rem;
    }
    
    .form-control {
        padding: 0.625rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Info Card Styles for Mid Year Evaluation */
.info-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.info-card .info-icon {
    font-size: 3rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.info-card .info-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.info-card .info-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.info-card .btn {
    margin-top: 0.5rem;
}

/* Employee Info Card for Current Selection */
.employee-info-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid #2196f3;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0 2rem 0;
}

.employee-info-card h4 {
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.employee-info-card p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
}

.employee-info-card .fas {
    color: #2196f3;
    margin-right: 0.5rem;
}

/* Enhanced horizontal tab navigation */
.tab-navigation {
    position: relative;
    overflow: hidden;
}

.tab-navigation::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--border-color);
    z-index: 1;
}

.tab-item {
    position: relative;
    z-index: 2;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--blue);
    border-radius: 1px;
    z-index: 3;
}

/* Improve tab content alignment */
.tab-content {
    flex: 1;
    min-width: 0; /* Allow text to wrap */
}

/* Schedule Timeline Styles */
.schedule-timeline {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.timeline-item.assignment {
    border-left: 4px solid var(--blue);
}

.timeline-item.evaluation {
    border-left: 4px solid var(--green);
}

.timeline-item.year-end {
    border-left: 4px solid var(--purple);
}

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.timeline-item.assignment .timeline-icon {
    background: var(--blue);
}

.timeline-item.evaluation .timeline-icon {
    background: var(--green);
}

.timeline-item.year-end .timeline-icon {
    background: var(--purple);
}

.timeline-content {
    flex: 1;
}

.timeline-content h5 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.timeline-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Schedule specific form styles */
.schedule-info {
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.schedule-info .info-text {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.schedule-info .info-text i {
    color: var(--blue);
}

/* Responsive schedule timeline */
@media (max-width: 768px) {
    .timeline-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .timeline-content {
        text-align: center;
    }
}

/* Schedule Notification Banner */
.schedule-notification {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 8px;
    border-left: 4px solid;
    font-size: 0.9rem;
}

.schedule-notification.info {
    background: rgba(52, 152, 219, 0.1);
    border-left-color: var(--blue);
    color: var(--blue);
}

.schedule-notification.warning {
    background: rgba(243, 156, 18, 0.1);
    border-left-color: #f39c12;
    color: #f39c12;
}

.schedule-notification.success {
    background: rgba(46, 204, 113, 0.1);
    border-left-color: var(--green);
    color: var(--green);
}

.schedule-notification.neutral {
    background: rgba(149, 165, 166, 0.1);
    border-left-color: #95a5a6;
    color: #95a5a6;
}

.schedule-notification i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-content strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.notification-content p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.85rem;
}

/* Tab recommendations */
.tab-item.recommended {
    box-shadow: 0 0 0 2px var(--blue);
    background: rgba(52, 152, 219, 0.05);
}

.tab-item.recommended .tab-icon {
    background: var(--blue);
    color: white;
}

.tab-item.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Field Restrictions and Period Expiry Styles */
.field-disabled {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    opacity: 0.75 !important;
    cursor: not-allowed !important;
    border-color: #dee2e6 !important;
    position: relative;
}

.field-disabled:hover,
.field-disabled:focus {
    background-color: #f8f9fa !important;
    border-color: #dee2e6 !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Add a subtle overlay to disabled fields */
.field-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    border-radius: inherit;
}

/* Period expired notice */
.period-expired-notice {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.2);
    animation: slideInNotice 0.3s ease-out;
}

@keyframes slideInNotice {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expired-notice-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #856404;
    font-weight: 500;
}

.expired-notice-content i {
    color: #ffc107;
    font-size: 1.2em;
    flex-shrink: 0;
}

.expired-notice-content span {
    font-size: 0.95em;
    line-height: 1.4;
}

/* Enhanced disabled state for different input types */
select.field-disabled,
textarea.field-disabled,
input[type="text"].field-disabled,
input[type="number"].field-disabled,
input[type="date"].field-disabled {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
}

button.field-disabled {
    background-color: #e9ecef !important;
    color: #6c757d !important;
    border-color: #dee2e6 !important;
    cursor: not-allowed !important;
    opacity: 0.65 !important;
}

/* Ensure form sections with disabled fields are visually distinct */
.tab-content-section:has(.field-disabled) {
    position: relative;
}

.tab-content-section:has(.field-disabled)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(248, 249, 250, 0.3);
    pointer-events: none;
    border-radius: 8px;
    z-index: 1;
}

.period-expired-notice {
    position: relative;
    z-index: 2;
}

/* Role-based restriction notice - distinct styling from period restrictions */
.period-expired-notice.role-restriction {
    background: linear-gradient(135deg, #ffe6e6, #ffcccc);
    border: 2px solid #dc3545;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.2);
}

.period-expired-notice.role-restriction .expired-notice-content {
    color: #721c24;
}

.period-expired-notice.role-restriction .expired-notice-content i {
    color: #dc3545;
}
