/**
 * ImmigraSuite Admin - Offboarding Process View
 * Stage timeline, checklist, FNF summary card layout.
 */

.is-offboarding-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================================
   Header card: employee + key dates
   ========================================================================== */
.is-offboarding-header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.is-offboarding-header-left { min-width: 200px; }
.is-offboarding-header-right {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.is-offboarding-employee-name {
    font-size: 18px;
    font-weight: 600;
    color: rgb(17 24 39);
}
.is-offboarding-employee-meta {
    font-size: 13px;
    color: rgb(107 114 128);
    margin-top: 2px;
}
.is-offboarding-meta-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.is-offboarding-meta-label {
    font-size: 11px;
    font-weight: 600;
    color: rgb(107 114 128);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.is-offboarding-meta-value {
    font-size: 14px;
    color: rgb(17 24 39);
    font-weight: 500;
}
.is-text-danger { color: rgb(220 38 38); }
.is-text-right  { text-align: right; }

/* ==========================================================================
   Card primitive
   ========================================================================== */
.is-offboarding-card {
    background-color: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.is-offboarding-card-title {
    font-size: 14px;
    font-weight: 600;
    color: rgb(17 24 39);
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.is-offboarding-empty {
    color: rgb(107 114 128);
    font-style: italic;
    font-size: 13px;
    padding: 12px 0;
}

/* ==========================================================================
   Stage timeline
   ========================================================================== */
.is-offboarding-stages {
    display: flex;
    align-items: center;
    overflow-x: auto;
    gap: 4px;
}
.is-offboarding-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 88px;
}
.is-offboarding-stage-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgb(229 231 235);
    color: rgb(75 85 99);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}
.is-offboarding-stage-label {
    font-size: 11px;
    color: rgb(107 114 128);
    text-align: center;
    line-height: 1.2;
}
.is-offboarding-stage-connector {
    flex: 1;
    height: 2px;
    background: rgb(229 231 235);
    min-width: 16px;
}
.is-stage-current .is-offboarding-stage-marker {
    background: rgb(59 130 246);
    color: white;
    box-shadow: 0 0 0 4px rgb(191 219 254);
}
.is-stage-current .is-offboarding-stage-label {
    color: rgb(30 58 138);
    font-weight: 600;
}
.is-stage-done .is-offboarding-stage-marker {
    background: rgb(5 150 105);
    color: white;
}
.is-stage-done.is-offboarding-stage-connector,
.is-offboarding-stage-connector.is-stage-done {
    background: rgb(5 150 105);
}
.is-stage-done .is-offboarding-stage-label { color: rgb(6 95 70); }
.is-stage-future .is-offboarding-stage-marker { background: rgb(229 231 235); }
.is-stage-cancelled .is-offboarding-stage-marker {
    background: rgb(229 231 235);
    color: rgb(156 163 175);
}
.is-offboarding-cancelled-banner {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgb(254 243 199);
    border: 1px solid rgb(252 211 77);
    color: rgb(120 53 15);
    border-radius: 6px;
    font-size: 13px;
}

/* ==========================================================================
   Checklist
   ========================================================================== */
.is-offboarding-progress-label {
    font-size: 12px;
    color: rgb(75 85 99);
    font-weight: 500;
}
.is-offboarding-progress-bar-outer {
    height: 6px;
    background: rgb(229 231 235);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 16px;
}
.is-offboarding-progress-bar-inner {
    height: 100%;
    background: rgb(5 150 105);
    transition: width 0.3s ease;
}
.is-offboarding-category {
    margin-top: 12px;
}
.is-offboarding-category-title {
    font-size: 12px;
    font-weight: 600;
    color: rgb(75 85 99);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.is-offboarding-checklist {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid rgb(243 244 246);
    border-radius: 8px;
    overflow: hidden;
}
.is-offboarding-checklist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    font-size: 13px;
    border-bottom: 1px solid rgb(243 244 246);
}
.is-offboarding-checklist-item:last-child { border-bottom: 0; }
.is-offboarding-checklist-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.is-offboarding-checklist-tick {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgb(243 244 246);
    color: rgb(75 85 99);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}
.is-item-done .is-offboarding-checklist-tick {
    background: rgb(209 250 229);
    color: rgb(6 95 70);
}
.is-item-done .is-offboarding-checklist-label {
    color: rgb(107 114 128);
    text-decoration: line-through;
}
.is-offboarding-checklist-label {
    color: rgb(17 24 39);
}
.is-offboarding-checklist-meta {
    font-size: 11px;
    color: rgb(107 114 128);
    margin-left: 6px;
}
.is-offboarding-checklist-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.is-offboarding-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
}
.is-offboarding-btn-success {
    background: rgb(5 150 105);
    color: white;
}
.is-offboarding-btn-success:hover { background: rgb(4 120 87); }
.is-offboarding-btn-ghost {
    background: white;
    color: rgb(75 85 99);
    border-color: rgb(229 231 235);
}
.is-offboarding-btn-ghost:hover {
    background: rgb(249 250 251);
    color: rgb(17 24 39);
}

/* ==========================================================================
   FNF section
   ========================================================================== */
.is-offboarding-fnf-status {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.is-fnf-status-draft            { background: rgb(229 231 235); color: rgb(75 85 99); }
.is-fnf-status-pending_approval { background: rgb(254 243 199); color: rgb(120 53 15); }
.is-fnf-status-approved         { background: rgb(187 247 208); color: rgb(20 83 45); }
.is-fnf-status-paid             { background: rgb(167 243 208); color: rgb(6 78 59); }
.is-fnf-status-disputed         { background: rgb(254 202 202); color: rgb(127 29 29); }
.is-fnf-status-cancelled        { background: rgb(229 231 235); color: rgb(75 85 99); }
.is-fnf-status-none             { background: rgb(243 244 246); color: rgb(107 114 128); }

.is-offboarding-fnf-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: rgb(75 85 99);
    margin-bottom: 12px;
}
.is-offboarding-fnf-meta > div { display: flex; flex-direction: column; gap: 2px; }
.is-offboarding-fnf-meta .is-offboarding-meta-label { margin-bottom: 0; }

.is-offboarding-fnf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid rgb(229 231 235);
    border-radius: 8px;
    overflow: hidden;
}
.is-offboarding-fnf-table thead tr { background: rgb(249 250 251); }
.is-offboarding-fnf-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    color: rgb(75 85 99);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgb(229 231 235);
}
.is-offboarding-fnf-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgb(243 244 246);
    color: rgb(31 41 55);
}
.is-offboarding-fnf-table tfoot td {
    background: rgb(249 250 251);
    font-weight: 500;
}
.is-fnf-row-net td {
    background: rgb(209 250 229);
    color: rgb(6 95 70);
    font-size: 14px;
}
.is-fnf-row-net-negative td {
    background: rgb(254 226 226);
    color: rgb(153 27 27);
}
.is-fnf-negative-note {
    background: rgb(254 242 242);
    color: rgb(153 27 27);
    font-size: 12px;
    font-style: italic;
    padding: 8px 12px !important;
    border-top: 1px dashed rgb(252 165 165);
}
.is-fnf-type-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.is-fnf-type-earning   { background: rgb(209 250 229); color: rgb(6 95 70); }
.is-fnf-type-deduction { background: rgb(254 202 202); color: rgb(127 29 29); }
.is-fnf-type-recovery  { background: rgb(254 215 170); color: rgb(124 45 18); }

.is-offboarding-note {
    margin-top: 10px;
    font-size: 13px;
}
.is-offboarding-note p { color: rgb(31 41 55); margin-top: 4px; white-space: pre-wrap; }

/* Exit interview responses */
.is-offboarding-interview-responses {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 2fr;
    gap: 10px 16px;
    margin: 0;
}
.is-offboarding-interview-responses dt {
    font-size: 12px;
    font-weight: 600;
    color: rgb(75 85 99);
    align-self: start;
}
.is-offboarding-interview-responses dd {
    font-size: 13px;
    color: rgb(17 24 39);
    margin: 0;
    white-space: pre-wrap;
}
.dark .is-offboarding-interview-responses dt { color: rgb(209 213 219); }
.dark .is-offboarding-interview-responses dd { color: rgb(229 231 235); }

/* ==========================================================================
   Dark mode
   ========================================================================== */
.dark .is-offboarding-header,
.dark .is-offboarding-card { background: rgb(31 41 55); border-color: rgb(55 65 81); box-shadow: none; }
.dark .is-offboarding-employee-name { color: rgb(243 244 246); }
.dark .is-offboarding-employee-meta { color: rgb(156 163 175); }
.dark .is-offboarding-meta-label { color: rgb(156 163 175); }
.dark .is-offboarding-meta-value { color: rgb(243 244 246); }
.dark .is-offboarding-card-title { color: rgb(243 244 246); }
.dark .is-offboarding-stage-marker { background: rgb(55 65 81); color: rgb(209 213 219); }
.dark .is-offboarding-stage-label { color: rgb(156 163 175); }
.dark .is-offboarding-stage-connector { background: rgb(55 65 81); }
.dark .is-stage-current .is-offboarding-stage-marker {
    background: rgb(59 130 246);
    box-shadow: 0 0 0 4px rgb(30 58 138);
}
.dark .is-stage-current .is-offboarding-stage-label { color: rgb(191 219 254); }
.dark .is-stage-done .is-offboarding-stage-marker { background: rgb(5 150 105); }
.dark .is-offboarding-stage-connector.is-stage-done { background: rgb(5 150 105); }
.dark .is-stage-done .is-offboarding-stage-label { color: rgb(167 243 208); }
.dark .is-offboarding-cancelled-banner {
    background: rgb(120 53 15);
    border-color: rgb(146 64 14);
    color: rgb(254 243 199);
}
.dark .is-offboarding-progress-bar-outer { background: rgb(55 65 81); }
.dark .is-offboarding-checklist { border-color: rgb(55 65 81); }
.dark .is-offboarding-checklist-item { border-bottom-color: rgb(55 65 81); }
.dark .is-offboarding-checklist-tick { background: rgb(55 65 81); color: rgb(209 213 219); }
.dark .is-item-done .is-offboarding-checklist-tick { background: rgb(6 78 59); color: rgb(167 243 208); }
.dark .is-item-done .is-offboarding-checklist-label { color: rgb(156 163 175); }
.dark .is-offboarding-checklist-label { color: rgb(229 231 235); }
.dark .is-offboarding-checklist-meta { color: rgb(156 163 175); }
.dark .is-offboarding-btn-ghost { background: rgb(31 41 55); color: rgb(209 213 219); border-color: rgb(55 65 81); }
.dark .is-offboarding-btn-ghost:hover { background: rgb(17 24 39); color: rgb(243 244 246); }

.dark .is-offboarding-fnf-table { border-color: rgb(55 65 81); }
.dark .is-offboarding-fnf-table thead tr { background: rgb(17 24 39); }
.dark .is-offboarding-fnf-table th { color: rgb(209 213 219); border-bottom-color: rgb(55 65 81); }
.dark .is-offboarding-fnf-table td { color: rgb(229 231 235); border-bottom-color: rgb(55 65 81); }
.dark .is-offboarding-fnf-table tfoot td { background: rgb(17 24 39); }
.dark .is-fnf-row-net td { background: rgb(6 78 59); color: rgb(167 243 208); }
.dark .is-fnf-row-net-negative td { background: rgb(127 29 29); color: rgb(254 202 202); }
.dark .is-fnf-negative-note { background: rgb(69 10 10); color: rgb(252 165 165); border-top-color: rgb(127 29 29); }

.dark .is-fnf-status-draft            { background: rgb(55 65 81); color: rgb(209 213 219); }
.dark .is-fnf-status-pending_approval { background: rgb(120 53 15); color: rgb(254 243 199); }
.dark .is-fnf-status-approved         { background: rgb(20 83 45); color: rgb(187 247 208); }
.dark .is-fnf-status-paid             { background: rgb(6 78 59); color: rgb(167 243 208); }
.dark .is-fnf-status-disputed         { background: rgb(127 29 29); color: rgb(254 202 202); }
.dark .is-fnf-status-cancelled        { background: rgb(55 65 81); color: rgb(209 213 219); }
.dark .is-fnf-status-none             { background: rgb(55 65 81); color: rgb(156 163 175); }

.dark .is-fnf-type-earning   { background: rgb(6 78 59); color: rgb(167 243 208); }
.dark .is-fnf-type-deduction { background: rgb(127 29 29); color: rgb(254 202 202); }
.dark .is-fnf-type-recovery  { background: rgb(124 45 18); color: rgb(254 215 170); }

.dark .is-offboarding-note p { color: rgb(229 231 235); }
