/* =====================================================================
   Skylift ATS — Global stylesheet
   Dark teal sidebar, white content, purple section accents.
   ===================================================================== */

/* Inline multi-select pills — toggleable buttons; click multiple to combine. */
.mc-wrap { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mc-pill {
    display: inline-flex; align-items: center;
    background: #fff; border: 1px solid #ced4da; color: var(--c-text);
    border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600;
    cursor: pointer; line-height: 1.4; user-select: none;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.mc-pill:hover { border-color: var(--c-accent); color: var(--c-accent); }
.mc-pill.active {
    background: var(--c-accent); border-color: var(--c-accent); color: #fff;
}
.mc-pill.mc-all { font-weight: 700; }

/* Multi-select dropdown widget — kept for legacy callers */
.ms-wrap { position: relative; display: inline-block; min-width: 180px; }
.ms-wrap .ms-btn {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    background: #fff; border: 1px solid #ced4da; border-radius: 4px;
    padding: 4px 10px; font-size: 14px; cursor: pointer; min-height: 32px;
}
.ms-wrap .ms-btn:hover { border-color: var(--c-accent); }
.ms-wrap .ms-btn .ms-label { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-wrap .ms-menu {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 100;
    background: #fff; border: 1px solid #ced4da; border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 280px; overflow-y: auto;
}
.ms-wrap .ms-menu.hidden { display: none; }
.ms-wrap .ms-item {
    display: flex; align-items: center; gap: 8px; padding: 6px 10px;
    cursor: pointer; font-size: 13px; user-select: none;
}
.ms-wrap .ms-item:hover { background: #f4f6f9; }
.ms-wrap .ms-item input { margin: 0; }
.ms-wrap .ms-divider { height: 1px; background: #e5e7eb; margin: 2px 0; }

:root {
    --c-sidebar-bg: #134e5e;
    --c-sidebar-bg-2: #0d3b47;
    --c-sidebar-text: #e8f1f3;
    --c-sidebar-muted: #9cc0ca;
    --c-sidebar-active-bg: #0d3b47;
    --c-sidebar-active-border: #71d5a2;

    --c-topbar-bg: #ffffff;
    --c-topbar-border: #e5e9ee;

    --c-content-bg: #f5f7fa;
    --c-card-bg: #ffffff;
    --c-card-border: #e5e9ee;
    --c-card-shadow: 0 1px 3px rgba(20, 40, 60, 0.05), 0 1px 2px rgba(20, 40, 60, 0.04);

    --c-text: #1e2a38;
    --c-text-muted: #6b7785;
    --c-accent: #6a4cbf;
    --c-accent-soft: #efeaff;
    --c-accent-2: #0d8a6f;

    --c-ok:       #198754;
    --c-ok-bg:    #d1f2e0;
    --c-warn:     #b07a00;
    --c-warn-bg:  #fff2cc;
    --c-bad:      #b02a37;
    --c-bad-bg:   #fbd7db;
    --c-na:       #6c757d;
    --c-na-bg:    #e9ecef;
    --c-hi:       #cf6d1a;
    --c-hi-bg:    #fde3cd;

    --sidebar-w: 240px;
    --sidebar-w-collapsed: 64px;
    --topbar-h: 60px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
    color: var(--c-text);
    background: var(--c-content-bg);
    font-size: 14px;
}

a { text-decoration: none; }

/* =====================================================================
   Login page
   ===================================================================== */
body.login-page {
    background: linear-gradient(135deg, #134e5e 0%, #0d3b47 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
.login-wrap { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand h1 { font-size: 22px; margin: 12px 0 4px; color: var(--c-text); }
.brand-mark {
    display: inline-flex;
    width: 56px; height: 56px;
    border-radius: 14px;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, #6a4cbf, #134e5e);
    color: #fff;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
}
.btn-primary {
    background: var(--c-accent);
    border-color: var(--c-accent);
}
.btn-primary:hover, .btn-primary:focus {
    background: #5a3fae;
    border-color: #5a3fae;
}

/* =====================================================================
   App shell
   ===================================================================== */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--c-sidebar-bg);
    color: var(--c-sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: flex-basis 0.2s ease, width 0.2s ease;
    overflow: hidden;
}
.app-sidebar.collapsed { width: var(--sidebar-w-collapsed); flex-basis: var(--sidebar-w-collapsed); }
.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .nav-link span,
.app-sidebar.collapsed .sidebar-footer { display: none; }

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .brand-mark { width: 36px; height: 36px; font-size: 14px; border-radius: 8px; }
.sidebar-brand .brand-text strong { display: block; font-size: 15px; }
.sidebar-brand .brand-text span { font-size: 11px; color: var(--c-sidebar-muted); }

.sidebar-nav { flex: 1; overflow-y: auto; padding-top: 8px; }
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--c-sidebar-text);
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background 0.15s;
}
.sidebar-nav .nav-link i { font-size: 18px; width: 20px; text-align: center; color: var(--c-sidebar-muted); }
.sidebar-nav .nav-link:hover { background: var(--c-sidebar-bg-2); color: #fff; }
.sidebar-nav .nav-link.active {
    background: var(--c-sidebar-active-bg);
    border-left-color: var(--c-sidebar-active-border);
    color: #fff;
}
.sidebar-nav .nav-link.active i { color: var(--c-sidebar-active-border); }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08); }

/* =====================================================================
   Topbar
   ===================================================================== */
.app-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.app-topbar {
    height: var(--topbar-h);
    background: var(--c-topbar-bg);
    border-bottom: 1px solid var(--c-topbar-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.sidebar-toggle { font-size: 20px; color: var(--c-text-muted); padding: 4px 8px; }
.sidebar-toggle:hover { color: var(--c-accent); }
.page-title { font-size: 18px; font-weight: 600; margin: 0; }

.topbar-right { display: flex; align-items: center; gap: 16px; }
.now-indicator { font-size: 13px; color: var(--c-text-muted); }
.now-indicator i { color: var(--c-accent); margin-right: 4px; }
.user-chip .dropdown-toggle { text-decoration: none; color: var(--c-text); display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.user-chip .avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--c-accent); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px;
}
.user-chip .user-name { font-weight: 600; font-size: 13px; }

/* =====================================================================
   Content area
   ===================================================================== */
.app-content {
    flex: 1;
    padding: 24px;
    overflow-x: auto;
}

.section-header {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--c-accent);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-header::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--c-accent);
    border-radius: 2px;
}

/* Cards */
.card {
    background: var(--c-card-bg);
    border: 1px solid var(--c-card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--c-card-shadow);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--c-card-border);
    padding: 14px 18px;
    font-weight: 600;
}
.card-body { padding: 18px; }

/* KPI cards */
.kpi-card {
    background: #fff;
    border: 1px solid var(--c-card-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    box-shadow: var(--c-card-shadow);
    border-left: 4px solid var(--c-accent);
    position: relative;
}
.kpi-card .kpi-label { font-size: 12px; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.kpi-card .kpi-value { font-size: 26px; font-weight: 700; margin-top: 4px; color: var(--c-text); }
.kpi-card .kpi-delta { font-size: 12px; margin-top: 2px; }
.kpi-card.kpi-ok    { border-left-color: var(--c-ok); }
.kpi-card.kpi-warn  { border-left-color: var(--c-warn); }
.kpi-card.kpi-bad   { border-left-color: var(--c-bad); }
.kpi-card.kpi-info  { border-left-color: #0d6efd; }

.delta-up   { color: var(--c-ok); }
.delta-down { color: var(--c-bad); }

/* Tables */
.table { --bs-table-hover-bg: #f7f4ff; margin-bottom: 0; }
.table thead th {
    background: #fafbfc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--c-text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--c-card-border);
    white-space: nowrap;
}
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover { background: #f7f4ff; }
.table-responsive { border-radius: var(--radius-md); }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.s-ok    { background: var(--c-ok-bg);   color: var(--c-ok);   border-color: rgba(25,135,84,0.15); }
.s-bad   { background: var(--c-bad-bg);  color: var(--c-bad);  border-color: rgba(176,42,55,0.15); }
.s-warn  { background: var(--c-warn-bg); color: var(--c-warn); border-color: rgba(176,122,0,0.2); }
.s-na    { background: var(--c-na-bg);   color: var(--c-na);   border-color: rgba(108,117,125,0.2); }
.s-hi    { background: var(--c-hi-bg);   color: var(--c-hi);   border-color: rgba(207,109,26,0.2); }
.s-info  { background: #dbeafe;          color: #1e40af;       border-color: rgba(30,64,175,0.15); }

/* Cell coloring for status columns */
td.cell-ok    { background: var(--c-ok-bg);   }
td.cell-bad   { background: var(--c-bad-bg);  }
td.cell-warn  { background: var(--c-warn-bg); }
td.cell-na    { background: var(--c-na-bg);   }
td.cell-hi    { background: var(--c-hi-bg);   }

/* Forms */
.form-label { font-size: 12px; font-weight: 600; color: var(--c-text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.form-control, .form-select { font-size: 14px; }
.form-section-title { font-size: 13px; font-weight: 700; color: var(--c-accent); text-transform: uppercase; letter-spacing: 0.5px; margin: 16px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--c-card-border); }

/* Inline edit */
.inline-editable { cursor: pointer; position: relative; }
.inline-editable:hover { outline: 1px dashed var(--c-accent); outline-offset: -2px; }
.inline-editor { width: 100%; font-size: 13px; padding: 4px 6px; }

/* Toasts */
.toast-region { position: fixed; top: 78px; right: 20px; z-index: 1080; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast-notice {
    background: #fff;
    border: 1px solid var(--c-card-border);
    border-left: 4px solid var(--c-accent);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    animation: toast-in 0.2s ease;
}
.toast-notice.toast-ok  { border-left-color: var(--c-ok); }
.toast-notice.toast-err { border-left-color: var(--c-bad); }
.toast-notice.toast-warn{ border-left-color: var(--c-warn); }
.toast-notice strong { display: block; font-size: 13px; }
.toast-notice p { margin: 0; font-size: 13px; color: var(--c-text-muted); }

@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Spinner */
.ats-spinner {
    display: inline-block;
    width: 18px; height: 18px;
    border: 2px solid var(--c-card-border);
    border-top-color: var(--c-accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.ats-loading-overlay {
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 5;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Filter panel */
.filter-panel {
    background: #fff;
    border: 1px solid var(--c-card-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.filter-panel .filter-field { display: flex; flex-direction: column; min-width: 140px; }

/* Modal */
.ats-modal {
    position: fixed; inset: 0;
    background: rgba(20,40,60,0.55);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 1050;
    padding: 32px 16px;
    overflow-y: auto;
}
.ats-modal.open { display: flex; }
.ats-modal-dialog {
    background: #fff;
    width: 100%;
    max-width: 960px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: modal-in 0.15s ease;
}
.ats-modal-dialog.small { max-width: 520px; }
.ats-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--c-card-border);
}
.ats-modal-header h3 { font-size: 18px; margin: 0; }
.ats-modal-body { padding: 20px; }
.ats-modal-footer { padding: 14px 20px; border-top: 1px solid var(--c-card-border); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Kanban */
.kanban-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kanban-board.kanban-6col { grid-template-columns: repeat(6, minmax(140px, 1fr)); overflow-x: auto; }
.kanban-board.kanban-7col { grid-template-columns: repeat(7, minmax(140px, 1fr)); overflow-x: auto; }
.kanban-6col .kanban-col, .kanban-7col .kanban-col { min-width: 140px; }
.kanban-card .kanban-stage-line { display: block; margin: 4px 0; }
.kanban-card .kanban-stage-line .status-badge { font-size: 9px; padding: 1px 6px; }
.kanban-col {
    background: #f2f0fa;
    border-radius: var(--radius-md);
    padding: 12px;
    min-height: 200px;
}
.kanban-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: var(--c-accent); margin: 0 0 10px; display: flex; justify-content: space-between; }
.kanban-card {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border-left: 4px solid var(--c-accent);
    cursor: pointer;
    transition: transform 0.1s;
}
.kanban-card:hover { transform: translateX(2px); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.kanban-card:focus { outline: 2px solid var(--c-accent); outline-offset: 1px; }
.kanban-card .name { font-weight: 600; font-size: 13px; }
.kanban-card .dept { font-size: 11px; color: var(--c-text-muted); }

/* Activity chart table */
.activity-table td.num { text-align: center; font-variant-numeric: tabular-nums; }
.attendance-row.att-Active   td { background: var(--c-ok-bg) !important; }
.attendance-row.att-Absent   td { background: var(--c-bad-bg) !important; }
.attendance-row.att-Inactive td { background: var(--c-warn-bg) !important; }
.attendance-row.att-Weekend  td { background: var(--c-na-bg) !important; color: var(--c-text-muted); }

/* Responsive */
@media (max-width: 991px) {
    :root { --sidebar-w: 220px; }
    .app-sidebar { position: fixed; top: 0; left: 0; z-index: 30; transform: translateX(-100%); }
    .app-sidebar.mobile-open { transform: translateX(0); }
    .kanban-board { grid-template-columns: 1fr; }
}

/* Utility */
.text-mono { font-variant-numeric: tabular-nums; }
.cursor-pointer { cursor: pointer; }
.nowrap { white-space: nowrap; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c9d1da; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a7b1bc; }

/* Stage pill — compact display for the Applicants list column */
.stage-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-accent);
    background: var(--c-accent-soft);
    white-space: nowrap;
}

/* =====================================================================
   Applicant Detail side panel (v2)
   ===================================================================== */
.side-panel-backdrop {
    position: fixed; inset: 0;
    background: rgba(20,40,60,0.35);
    display: none;
    z-index: 1060;
}
.side-panel-backdrop.open { display: block; }

.side-panel {
    position: fixed;
    top: 0; right: 0;
    width: min(560px, 100vw);
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 24px rgba(0,0,0,0.14);
    z-index: 1070;
    transform: translateX(100%);
    transition: transform 0.22s ease;
    display: flex;
    flex-direction: column;
}
.side-panel.open { transform: translateX(0); }

.sp-header {
    padding: 18px 20px 12px 20px;
    border-bottom: 1px solid var(--c-card-border);
    position: relative;
    flex-shrink: 0;
}
.sp-header .sp-close {
    position: absolute;
    top: 14px; right: 14px;
    background: #fff; border: 1px solid var(--c-card-border);
    border-radius: 6px;
    width: 30px; height: 30px;
    font-size: 14px;
    color: var(--c-text-muted);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.sp-header .sp-close:hover { background: #f4f6f9; color: var(--c-text); }
.sp-title { font-size: 18px; font-weight: 700; color: var(--c-text); margin: 0; padding-right: 40px; }
.sp-breadcrumb { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-breadcrumb .bc-sep { color: #d5dbe1; }

.sp-stage-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 14px 20px;
    background: #f6f8fa;
    border-bottom: 1px solid var(--c-card-border);
    flex-shrink: 0;
}
.sp-stage-row .sp-field-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
    color: var(--c-text-muted); text-transform: uppercase;
    margin-bottom: 4px;
}
.sp-stage-row select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--c-card-border);
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
}

.sp-tabs {
    display: flex;
    border-bottom: 1px solid var(--c-card-border);
    padding: 0 20px;
    flex-shrink: 0;
}
.sp-tab {
    background: none; border: none;
    padding: 12px 0;
    margin-right: 22px;
    font-size: 14px; font-weight: 600;
    color: var(--c-text-muted);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.1s;
}
.sp-tab:hover { color: var(--c-text); }
.sp-tab.active { color: var(--c-accent); border-bottom-color: var(--c-accent); }

.sp-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 20px 24px 20px;
}
.sp-pane { display: none; }
.sp-pane.active { display: block; }

/* HR Manager Interview card (v2.2) */
.hr-mi-card {
    background: #f6f4ff;
    border: 1px solid #d4c5fb;
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 14px;
}
.hr-mi-card .hr-mi-head { display: flex; justify-content: space-between; align-items: center; }
.hr-mi-card .hr-mi-meta { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--c-text-muted); flex-wrap: wrap; }
.hr-mi-card .hr-mi-notes { margin-top: 8px; padding: 8px 10px; background: #fff; border-radius: 6px; font-size: 13px; }
.hr-mi-card .hr-mi-reject-note { margin-top: 8px; color: var(--c-bad); font-weight: 600; font-size: 12px; }

/* Profile tab — key/value rows */
.profile-rows { display: grid; grid-template-columns: 150px 1fr; row-gap: 10px; column-gap: 12px; font-size: 13px; }
.profile-rows .pr-key { color: var(--c-text-muted); font-weight: 500; padding-top: 1px; }
.profile-rows .pr-val { color: var(--c-text); word-break: break-word; }
.profile-rows .pr-val a { color: var(--c-accent); font-weight: 600; }
.profile-rows .pr-val.muted { color: var(--c-text-muted); }

.sp-actions {
    padding: 14px 20px;
    border-top: 1px solid var(--c-card-border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
    background: #fff;
}

/* Notes pane */
.note-compose {
    background: #f6f8fa;
    border: 1px solid var(--c-card-border);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 16px;
}
.note-compose textarea {
    width: 100%;
    min-height: 56px;
    border: 1px solid var(--c-card-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
}
.note-compose-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.note-compose-actions label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-text-muted); cursor: pointer; }

.note-item {
    border: 1px solid var(--c-card-border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #fff;
    position: relative;
}
.note-item.pinned { border-color: var(--c-accent); background: #faf8ff; }
.note-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.note-author { font-weight: 600; color: var(--c-text); }
.note-meta { color: var(--c-text-muted); display: flex; gap: 8px; align-items: center; }
.note-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.1s; }
.note-item:hover .note-actions { opacity: 1; }
.note-actions button { background: none; border: none; cursor: pointer; padding: 2px 6px; font-size: 12px; color: var(--c-text-muted); border-radius: 4px; }
.note-actions button:hover { background: #f4f6f9; color: var(--c-text); }
.note-content { font-size: 13px; white-space: pre-wrap; color: var(--c-text); line-height: 1.5; }
.note-pinned-badge { display: inline-block; padding: 1px 6px; background: var(--c-accent); color: #fff; font-size: 10px; font-weight: 700; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.3px; margin-right: 6px; }

/* Timeline pane */
.tl-item { display: flex; gap: 12px; padding-bottom: 16px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 9px; top: 22px; bottom: -4px; width: 2px; background: var(--c-card-border); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--c-accent-soft); border: 2px solid var(--c-accent); flex-shrink: 0; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--c-accent); }
.tl-dot.ev-created { background: #d1f2e0; border-color: #198754; color: #198754; }
.tl-dot.ev-stage_change, .tl-dot.ev-status_change { background: #dbeafe; border-color: #1e40af; color: #1e40af; }
.tl-dot.ev-exit_recorded { background: #fbd7db; border-color: #b02a37; color: #b02a37; }
.tl-dot.ev-note_added, .tl-dot.ev-note_edited, .tl-dot.ev-note_deleted { background: #fff2cc; border-color: #b07a00; color: #b07a00; }
.tl-dot.ev-file_uploaded { background: #efeaff; border-color: #6a4cbf; color: #6a4cbf; }
.tl-content { flex: 1; min-width: 0; }
.tl-summary { font-size: 13px; color: var(--c-text); line-height: 1.4; }
.tl-meta { font-size: 11px; color: var(--c-text-muted); margin-top: 2px; }

/* Entry-path radios in the Add form */
.entry-path-radios { display: flex; flex-direction: column; gap: 4px; }
.entry-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--c-card-border);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.1s;
}
.entry-radio:hover { background: #f4f6f9; }
.entry-radio input[type="radio"] { margin: 0; }
.entry-radio:has(input:checked) { background: var(--c-accent-soft); border-color: var(--c-accent); }
.entry-radio small { margin-left: auto; font-size: 11px; }

/* Add-applicant form in the side panel */
.add-form .add-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--c-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--c-card-border);
}
.add-form .add-section-label:first-child { margin-top: 0; }
.add-form .add-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}
.add-form .add-row label {
    font-size: 12px;
    color: var(--c-text-muted);
    font-weight: 500;
    margin: 0;
}
.add-form .add-row textarea { resize: vertical; }
@media (max-width: 600px) {
    .add-form .add-row { grid-template-columns: 1fr; gap: 4px; }
    .add-form .add-row label { font-weight: 600; }
}

/* Duplicate warning banner */
.dupe-warn {
    background: #fff2cc;
    border: 1px solid #f6c343;
    color: #664d03;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}
.dupe-warn strong { color: #664d03; }
.dupe-warn ul { margin: 6px 0 0 0; padding-left: 20px; }
.dupe-warn a { color: #664d03; font-weight: 600; }

@media (max-width: 600px) {
    .side-panel { width: 100vw; }
    .profile-rows { grid-template-columns: 1fr; }
    .profile-rows .pr-key { padding-top: 8px; }
}
