/* ============================================================================
   EMPLOYEE ONBOARDING SYSTEM - CSS
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ============================================================================
   HEADER & NAVIGATION
   ============================================================================ */

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

header h1 {
    font-size: 20px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.user-info a {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 5px;
}

.user-info a:hover {
    background: rgba(255,255,255,0.3);
}

nav {
    background: white;
    padding: 0 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 5px;
    overflow-x: auto;
}

nav a {
    color: #555;
    text-decoration: none;
    padding: 15px 20px;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

nav a:hover {
    color: #667eea;
}

nav a.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: 600;
}

/* ============================================================================
   CONTAINER & CARDS
   ============================================================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h2 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="file"] {
    padding: 10px;
    background: #f9f9f9;
}

.form-group small {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-group-btn {
    display: flex;
    align-items: flex-end;
}

.required {
    color: #e74c3c;
}

.file-uploaded {
    background: #d4edda;
    color: #155724;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 10px;
}

.file-info {
    color: #666;
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: #f0f0f0;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label {
    font-size: 14px;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd6;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 30px;
    font-size: 16px;
}

.btn-block {
    display: block;
    width: 100%;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ============================================================================
   ALERTS
   ============================================================================ */

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ============================================================================
   STATUS & BADGES
   ============================================================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-primary {
    background: #667eea;
    color: white;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #ffeaa7;
    color: #856404;
}

.status-in_progress,
.status-in-progress {
    background: #81ecec;
    color: #00695c;
}

.status-complete {
    background: #00b894;
    color: white;
}

.status-banner {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 16px;
}

.status-banner.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-banner.status-in_progress {
    background: #d1ecf1;
    color: #0c5460;
}

.status-banner.status-complete {
    background: #d4edda;
    color: #155724;
}

/* ============================================================================
   STATS
   ============================================================================ */

.stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-box {
    flex: 1;
    min-width: 120px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-box h3 {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-box .number {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.stat-box.pending {
    border-top: 3px solid #f39c12;
}

.stat-box.in-progress {
    border-top: 3px solid #3498db;
}

.stat-box.complete {
    border-top: 3px solid #27ae60;
}

/* ============================================================================
   PROGRESS
   ============================================================================ */

.progress-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.progress-card h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    margin-top: 10px;
    font-size: 14px;
}

.text-success {
    color: #27ae60;
}

.text-warning {
    color: #f39c12;
}

.text-muted {
    color: #999;
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-size: 16px;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.section-subtitle {
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.subsection-title {
    font-size: 14px;
    color: #555;
    margin: 25px 0 15px 0;
}

/* ============================================================================
   INFO GRID (Read-only display)
   ============================================================================ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.info-item .value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* ============================================================================
   DOCUMENTS GRID
   ============================================================================ */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.document-item.uploaded {
    background: #f0fff0;
    border-color: #c3e6cb;
}

.document-item.missing {
    background: #fff8e1;
    border-color: #ffe082;
}

.doc-icon {
    font-size: 24px;
}

.doc-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.doc-status {
    font-size: 12px;
    color: #999;
}

/* ============================================================================
   TABLES
   ============================================================================ */

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

td {
    font-size: 14px;
}

tbody tr:hover {
    background: #fafafa;
}

/* ============================================================================
   MOBILE CARDS
   ============================================================================ */

.mobile-cards {
    display: none;
}

.employee-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}

.employee-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.employee-name {
    font-weight: 600;
    font-size: 16px;
}

.employee-card-body {
    padding: 15px;
}

.employee-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.employee-field:last-child {
    border-bottom: none;
}

.employee-field .label {
    color: #666;
    font-size: 13px;
}

.employee-field .value {
    font-weight: 500;
    font-size: 13px;
}

.employee-card-actions {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.employee-card-actions .btn {
    flex: 1;
}

/* ============================================================================
   LOGIN PAGE
   ============================================================================ */

.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .btn {
    margin-top: 10px;
}

/* ============================================================================
   ADMIN SECTION STYLING
   ============================================================================ */

.admin-section {
    border-left: 4px solid #667eea;
}

.inline-form .form-row {
    align-items: flex-end;
}

.empty-message {
    text-align: center;
    color: #666;
    padding: 40px;
}

/* ============================================================================
   RESPONSIVE - MOBILE
   ============================================================================ */

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    header h1 {
        font-size: 18px;
    }

    nav {
        padding: 0 10px;
    }

    nav a {
        padding: 12px 15px;
        font-size: 13px;
    }

    .container {
        padding: 15px;
    }

    .card {
        padding: 20px;
    }

    .card h2 {
        font-size: 18px;
    }

    .stats {
        gap: 10px;
    }

    .stat-box {
        min-width: calc(50% - 10px);
        padding: 15px;
    }

    .stat-box .number {
        font-size: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    .form-group-btn {
        margin-top: 10px;
    }

    .form-group-btn .btn {
        width: 100%;
    }

    .table-wrapper {
        display: none;
    }

    .mobile-cards {
        display: block;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .checkbox-item {
        padding: 15px;
    }

    .btn-lg {
        width: 100%;
    }

    .login-card {
        padding: 30px 25px;
    }
}

@media (max-width: 480px) {
    .stat-box {
        min-width: 100%;
    }

    .employee-card-actions {
        flex-direction: column;
    }
}
