/* Staff Management System - Custom Styles */

body {
    background-color: #f5f6fa;
}

.navbar-brand {
    font-weight: 600;
}

/* Status badges */
.badge-employed       { background-color: #28a745; }
.badge-looking_for_work { background-color: #17a2b8; }
.badge-unavailable    { background-color: #6c757d; }
.badge-on_leave       { background-color: #ffc107; color: #212529; }
.badge-terminated     { background-color: #dc3545; }

.badge-wwcc-valid        { background-color: #28a745; }
.badge-wwcc-pending      { background-color: #ffc107; color: #212529; }
.badge-wwcc-expired      { background-color: #dc3545; }
.badge-wwcc-not_required { background-color: #6c757d; }

/* Table row cursor */
.table tbody tr {
    cursor: pointer;
}

.table tbody tr:hover {
    background-color: #e9ecef;
}

/* Detail view - field layout */
.detail-row {
    display: flex;
    padding: 0.35rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.detail-label {
    font-weight: 600;
    width: 140px;
    flex-shrink: 0;
    color: #555;
}

.detail-value {
    flex: 1;
}

/* Emergency contact cards */
.ec-card {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.ec-card.primary {
    border-left: 3px solid #0d6efd;
}

.ec-card .ec-name {
    font-weight: 600;
}

.ec-card .ec-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.ec-card .ec-actions {
    margin-top: 0.5rem;
}

/* Toast */
.toast {
    min-width: 250px;
}

/* Card headers */
.card-header {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Dashboard cards */
.dash-card {
    border: none;
    border-radius: 0.75rem;
    color: #fff;
    transition: transform 0.15s;
}

.dash-card:hover {
    transform: translateY(-2px);
}

.dash-card .card-body {
    position: relative;
    padding: 1.25rem;
}

.dash-card .dash-icon {
    font-size: 2rem;
    opacity: 0.3;
    position: absolute;
    top: 0.75rem;
    right: 1rem;
}

.dash-card .dash-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.dash-card .dash-label {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.dash-interviews  { background: linear-gradient(135deg, #0dcaf0, #0d6efd); }
.dash-handovers   { background: linear-gradient(135deg, #6f42c1, #6610f2); }
.dash-looking     { background: linear-gradient(135deg, #17a2b8, #6f42c1); }
.dash-unavailable { background: linear-gradient(135deg, #dc3545, #c82333); }

/* Clickable dashboard cards */
.dash-clickable {
    cursor: pointer;
}

.dash-clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Map in detail view */
#detail-map-container {
    border-top: 1px solid #dee2e6;
}

#detail-map {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Login page */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-icon {
    font-size: 3rem;
    color: #667eea;
}

/* Staff profile photo */
.staff-photo {
    width: 64px;
    height: 64px;
    object-fit: cover;
}

.staff-photo-placeholder {
    width: 64px;
    height: 64px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #adb5bd;
}

/* Notes timeline */
.timeline-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

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

.timeline-item:hover {
    background-color: #f8f9fa;
}

.timeline-pinned {
    border-left: 3px solid #0d6efd;
    background-color: #f0f4ff;
}

/* Availability cells */
.avail-cell:hover {
    opacity: 0.8;
    outline: 2px solid #0d6efd;
}

/* Roster table */
#roster-table td,
#roster-table th {
    vertical-align: middle;
    min-width: 80px;
}

#roster-table td:first-child,
#roster-table th:first-child {
    min-width: 150px;
}

/* Print styles */
@media print {
    /* Hide everything except the detail view */
    #main-navbar,
    #view-login,
    #view-dashboard,
    #view-list,
    #view-form,
    #view-invites,
    #view-users,
    #view-archived,
    #view-roster,
    #view-audit,
    .toast-container,
    .modal,
    .modal-backdrop,
    .rbac-write,
    #attachment-upload-area,
    #detail-header .d-flex.gap-1 {
        display: none !important;
    }

    #app,
    #view-detail {
        display: block !important;
    }

    body {
        background: white;
    }

    .card {
        border: 1px solid #ccc;
        break-inside: avoid;
    }

    .container-fluid {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    .col-lg-8, .col-lg-4 {
        width: 100%;
        max-width: 100%;
    }

    #detail-map-container {
        display: none !important;
    }
}

/* Self-service portal */
.portal-wrapper {
    min-height: 100vh;
    background-color: #f5f6fa;
    padding: 2rem 1rem;
}

.portal-card {
    max-width: 700px;
    margin: 0 auto;
}

.portal-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1.5rem;
    text-align: center;
}

/* Vacancies widget */
#dash-vacancies-card .table tbody tr {
    cursor: default;
}

#dash-vacancies-card .table tbody tr:hover {
    background-color: #f8f9fa;
}

#vacancy-table td,
#vacancy-table th {
    vertical-align: middle;
    font-size: 0.875rem;
}

#vacancy-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: #f8f9fa;
}
