/* ===== Onboarding & Offboarding Module ===== */

.ob-app {
    display: flex;
    min-height: calc(100vh - 72px);
}

/* ===== Sidebar ===== */
.ob-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--color-bg-soft);
    border-right: 1px solid var(--color-border);
    padding: 24px;
    overflow-y: auto;
}

.ob-sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 16px;
}

.ob-new-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}
.ob-plus { font-size: 18px; font-weight: 700; }

.ob-section { margin-bottom: 24px; }

.ob-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.ob-section-icon { flex-shrink: 0; }

.ob-list { list-style: none; }

.ob-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 0 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.ob-list-item:hover { background: #F1F5F9; }
[data-theme="dark"] .ob-list-item:hover { background: rgba(255,255,255,0.05); }
.ob-list-item.active { background: #EFF6FF; }
[data-theme="dark"] .ob-list-item.active { background: rgba(37,99,235,0.15); }

.ob-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ob-status-dot.in-progress { background: #2563EB; }
.ob-status-dot.done { background: #16A34A; }
.ob-status-dot.attention { background: #F97316; }

.ob-list-text { display: flex; flex-direction: column; min-width: 0; }
.ob-list-name { font-size: 14px; font-weight: 500; color: var(--color-text-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-list-sub { font-size: 12px; color: var(--color-text-muted); }

/* ===== Main content ===== */
.ob-main {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.ob-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.ob-header-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 4px;
}

.ob-header-type {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-muted);
}

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

.ob-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.ob-badge.in-progress { background: #EFF6FF; color: #2563EB; }
.ob-badge.done { background: #ECFDF5; color: #16A34A; }
[data-theme="dark"] .ob-badge.in-progress { background: rgba(37,99,235,0.2); }
[data-theme="dark"] .ob-badge.done { background: rgba(22,163,74,0.2); }

.ob-menu-btn {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}
.ob-menu-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ===== Detail grid ===== */
.ob-detail-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
}

/* ===== Checklist ===== */
.ob-col-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 16px;
}

.ob-steps { list-style: none; }

.ob-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: box-shadow 0.15s;
    cursor: default;
}
.ob-step:hover { box-shadow: 0 2px 8px var(--color-shadow); }

.ob-step-icon { flex-shrink: 0; display: flex; }

.ob-step-text { flex: 1; min-width: 0; }
.ob-step-name { font-size: 16px; font-weight: 500; color: var(--color-text-body); display: block; }
.ob-step-sub { font-size: 14px; color: var(--color-text-muted); display: block; }

.ob-step-arrow {
    font-size: 22px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.ob-step-arrow:hover { color: var(--color-primary); background: var(--color-bg-soft); }

/* ===== Info cards ===== */
.ob-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

.ob-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 16px;
}

.ob-field {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
}
.ob-field:last-child { border-bottom: none; }
.ob-label { font-size: 14px; color: var(--color-text-muted); }
.ob-value { font-size: 14px; font-weight: 500; color: var(--color-text-body); }

/* Documents list */
.ob-docs { list-style: none; }

.ob-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
    color: var(--color-text-body);
}
.ob-doc:last-child { border-bottom: none; }
.ob-doc-icon { flex-shrink: 0; }
.ob-doc span { flex: 1; }
.ob-doc-status { flex-shrink: 0; }

/* Toggles */
.ob-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--color-text-body);
    border-bottom: 1px solid var(--color-border);
}
.ob-toggle-row:last-child { border-bottom: none; }

.ob-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.ob-toggle input { opacity: 0; width: 0; height: 0; }

.ob-toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #CBD5E1;
    border-radius: 24px;
    transition: background 0.2s;
}
.ob-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.ob-toggle input:checked + .ob-toggle-slider { background: #2563EB; }
.ob-toggle input:checked + .ob-toggle-slider::before { transform: translateX(20px); }

/* ===== Slide-out panel ===== */
.ob-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1200;
}
.ob-panel-overlay.open { display: block; }

.ob-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: var(--color-bg);
    box-shadow: -8px 0 24px rgba(0,0,0,0.08);
    z-index: 1201;
    display: flex;
    flex-direction: column;
    transition: right 0.25s ease;
}
.ob-panel.open { right: 0; }

.ob-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--color-border);
}
.ob-panel-title { font-size: 20px; font-weight: 600; color: var(--color-text-dark); }
.ob-panel-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
}
.ob-panel-close:hover { color: var(--color-text-dark); }

.ob-panel-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.ob-panel-field {
    margin-bottom: 20px;
}
.ob-panel-field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-body);
    margin-bottom: 6px;
}
.ob-panel-field p {
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.ob-select, .ob-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--color-text-body);
    background: var(--color-bg);
}
.ob-select:focus, .ob-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.ob-upload {
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: border-color 0.2s;
}
.ob-upload:hover { border-color: var(--color-primary); }

.ob-panel-check {
    margin-top: 16px;
}
.ob-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-body);
    cursor: pointer;
}
.ob-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563EB;
}

.ob-panel-footer {
    padding: 16px 32px;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
}
.ob-panel-footer .btn-primary { flex: 1; }
.ob-panel-footer .btn-outline { flex: 1; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .ob-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .ob-app { flex-direction: column; }

    .ob-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        max-height: 300px;
    }

    .ob-main { padding: 20px; }

    .ob-panel { width: 100%; right: -100%; }
}
