/* =========================================================
   Department Permissions — page-specific styles.
   Only linked from department-programs.html, AFTER
   css/setup-guide.css: the page is wrapped in
   <div class="setup-guide dept-programs"> so it reuses the New
   Hire Setup Guide's header, card, field, button and notice
   styles, and everything here is scoped under .dept-programs.
   ========================================================= */

/* setup-guide.css vertically centres its view for the new-hire
   picker; this page grows with its results, so lay it out normally. */
.dept-programs .main{display:block;padding-bottom:36px}
.dept-programs .card{max-width:1040px}
.dept-programs .card-sub{max-width:68ch}

/* Pickers — one select, or 2–3 side by side when comparing */
.dept-programs .dp-pickers{display:grid;grid-template-columns:minmax(0,520px);gap:12px}
.dept-programs .dp-pickers.multi{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.dept-programs .dp-slot{margin-bottom:0}
.dept-programs .dp-slot-row{display:flex;gap:6px;align-items:center}
.dept-programs .dp-slot-row select{flex:1;min-width:0}
.dept-programs .dp-remove{flex-shrink:0;width:38px;height:44px;font-size:20px;line-height:1;border:1.5px solid var(--border);border-radius:var(--r);background:#fff;color:var(--muted);cursor:pointer;font-family:inherit}
.dept-programs .dp-remove:hover{border-color:var(--danger);color:var(--danger)}

.dept-programs .dp-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0 16px}
.dept-programs .dp-toolbar .btn{padding:8px 12px;font-size:13px}
.dept-programs .dp-csv{margin-left:auto}
.dept-programs .dp-diff{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:600;cursor:pointer}
.dept-programs .dp-diff input{accent-color:var(--accent);width:16px;height:16px}
.dept-programs #loadNotice{margin-bottom:12px}

/* Department heading (single view) and column heads (comparison) */
.dept-programs .dp-single-head{margin-bottom:10px}
.dept-programs .dp-name{font-size:18px;font-weight:700;line-height:1.3}
.dept-programs .dp-org{font-size:13px;color:var(--muted)}
.dept-programs .dp-checklist-link{display:inline-block;margin-top:3px;font-size:13px;font-weight:600;color:var(--accent);text-decoration:none}
.dept-programs .dp-checklist-link:hover{text-decoration:underline}
.dept-programs .dp-badge{display:inline-block;font-size:11px;font-weight:700;color:#6b5325;background:#fff6e5;border:1px solid #f0d9a8;border-radius:5px;padding:0 6px;margin-left:4px;vertical-align:2px}
.dept-programs .dp-draft{margin-bottom:12px;border-color:#f0d9a8;background:#fff6e5;color:#6b5325}
.dept-programs .dp-summary{font-size:15px;margin-bottom:10px}

/* Program table */
.dept-programs .dp-table-wrap{border:1px solid var(--border);border-radius:var(--r);overflow-x:auto;background:#fff}
.dept-programs .dp-table{border-collapse:separate;border-spacing:0;width:100%;font-size:14px}
.dept-programs .dp-table th,.dept-programs .dp-table td{padding:9px 12px;border-bottom:1px solid var(--border);text-align:left;vertical-align:top}
.dept-programs .dp-table td + td,.dept-programs .dp-table th + th{border-left:1px solid var(--border)}
.dept-programs .dp-table tbody tr:last-child td{border-bottom:none}
.dept-programs .dp-table th{background:#f8fafc;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.dept-programs .dp-table:not(.dp-compare):not(.dp-prog-table) th:first-child{width:36%}
.dept-programs .dp-prog{font-weight:700}
.dept-programs .dp-table tr.dp-group td{background:var(--sub-bg);font-size:12.5px;font-weight:700;color:var(--muted);padding:6px 12px}

.dept-programs .dp-detail{line-height:1.5}
.dept-programs .dp-detail + .dp-detail{margin-top:3px}
.dept-programs .dp-detail-label{color:var(--muted)}
.dept-programs .dp-tags{display:inline-flex;flex-wrap:wrap;gap:4px;vertical-align:top;margin-top:1px}
.dept-programs .dp-tag{display:inline-block;font-size:12.5px;font-weight:600;line-height:1.4;background:#f1f4fb;border:1px solid #dde5fa;border-radius:6px;padding:1px 7px}

/* Program given with no further settings */
.dept-programs .dp-included{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#dcfce7;color:var(--success);font-size:13px}
.dept-programs .dp-compare .dp-included{margin-bottom:3px}
.dept-programs .dp-no{color:#9aa1ad;font-size:13px}
.dept-programs .dp-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Comparison */
.dept-programs .dp-compare th.dp-col-head{min-width:220px;text-transform:none;letter-spacing:0;color:var(--text);font-weight:400}
.dept-programs .dp-col-head .dp-name{font-size:14.5px}
.dept-programs .dp-compare td.dp-prog{white-space:nowrap}
.dept-programs .dp-compare tr.is-diff td:not(:first-child){background:#fffbeb}
.dept-programs .dp-legend{display:flex;align-items:center;gap:7px;margin-top:9px;font-size:13px;color:var(--muted)}
.dept-programs .dp-legend-swatch{width:15px;height:11px;border-radius:3px;background:#fffbeb;border:1px solid #f0d9a8}

.dept-programs .dp-empty{padding:22px 14px;border:1px dashed var(--border-strong);border-radius:var(--r);text-align:center;color:var(--muted);font-size:14px}
.dept-programs .dp-without{margin-top:14px;font-size:14px}
.dept-programs .dp-without summary{cursor:pointer;font-weight:600;color:var(--muted);padding:4px 0}
.dept-programs .dp-without summary:hover{color:var(--accent)}
.dept-programs .dp-without ul{margin:6px 0 0;padding-left:20px;columns:2;column-gap:32px}
.dept-programs .dp-without li{break-inside:avoid;padding:1px 0}

/* "Something missing or wrong?" card */
.dept-programs .dp-help{font-size:14px;color:var(--muted)}
.dept-programs .dp-help-title{font-weight:700;color:var(--text);margin-bottom:3px}
.dept-programs .dp-help a{color:var(--accent);font-weight:600}

.dept-programs .dp-remove:focus-visible,.dept-programs .dp-checklist-link:focus-visible,.dept-programs .dp-without summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

@media(max-width:600px){
  .dept-programs .main{padding-left:12px;padding-right:12px}
  .dept-programs .dp-csv{margin-left:0}
  .dept-programs .dp-table th,.dept-programs .dp-table td{padding:8px 9px}
  .dept-programs .dp-compare th.dp-col-head{min-width:180px}
  .dept-programs .dp-without ul{columns:1}
}

/* ── Tabs + data status (header) ───────────────────────────── */
.dept-programs .dp-header-row{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin:12px 0 0 41px}
.dept-programs .dp-tabs{display:flex;gap:6px}
.dept-programs .dp-tabs button{border:1.5px solid var(--border);background:#fff;border-radius:999px;padding:6px 14px;font-family:inherit;font-size:13.5px;font-weight:700;color:var(--muted);cursor:pointer}
.dept-programs .dp-tabs button:hover{border-color:var(--accent);color:var(--accent)}
.dept-programs .dp-tabs button.active{background:var(--accent);border-color:var(--accent);color:#fff}
.dept-programs .dp-source{display:flex;align-items:center;gap:12px;font-size:12.5px;color:var(--muted)}
.dept-programs .dp-source a{color:var(--muted);text-decoration:none;font-weight:600;white-space:nowrap}
.dept-programs .dp-source a:hover{color:var(--accent)}
.dept-programs .dp-load{max-width:1040px;margin:0 auto 14px}

.dept-programs .dp-view{display:none}
.dept-programs .dp-view.active{display:block}

/* Program / department names that jump to the other view */
.dept-programs .dp-link{background:none;border:none;padding:0;font:inherit;font-weight:700;color:var(--text);cursor:pointer;text-align:left}
.dept-programs .dp-link:hover{color:var(--accent);text-decoration:underline}

/* ── By program ────────────────────────────────────────────── */
.dept-programs .dp-prog-controls{display:flex;gap:10px;align-items:flex-end;flex-wrap:wrap;margin-bottom:14px}
.dept-programs .dp-prog-controls .field{flex:1 1 320px;max-width:520px;margin-bottom:0}
.dept-programs .dp-prog-actions{display:flex;gap:8px;flex-wrap:wrap}
.dept-programs .dp-prog-actions .btn{padding:10px 12px;font-size:13px}
.dept-programs .dp-chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px}
.dept-programs .dp-chip{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--border);background:#fff;border-radius:999px;padding:4px 11px;font-family:inherit;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer}
.dept-programs .dp-chip:hover{border-color:var(--accent);color:var(--accent)}
.dept-programs .dp-chip.active{background:var(--accent-light);border-color:var(--accent);color:var(--accent)}
.dept-programs .dp-chip-n{font-size:11.5px;font-weight:700;background:#f3f4f6;color:var(--text);border-radius:999px;padding:0 7px;line-height:18px}
.dept-programs .dp-chip.active .dp-chip-n{background:#fff;color:var(--accent)}
.dept-programs .dp-prog-table td.dp-prog{min-width:200px}
.dept-programs .dp-team{white-space:nowrap;color:var(--muted)}
.dept-programs .dp-blank{color:#c4c9d2}
.dept-programs .dp-without-org{font-size:12px;color:var(--muted)}

.dept-programs .dp-tabs button:focus-visible,.dept-programs .dp-chip:focus-visible,.dept-programs .dp-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

@media(max-width:760px){
  .dept-programs .dp-header-row{margin-left:0}
}
.dept-programs .dp-prog-table .dp-tags{min-width:240px}
@media(max-width:600px){.dept-programs .dp-prog-table td.dp-prog{min-width:150px}}
