/* PRISMA 4.2 — bedieningselementen: knoppen, velden, tabs, tabellen, fieldsets */

.btn {
  font: 12px var(--font); color: #000;
  min-width: 75px; height: 23px; padding: 0 12px;
  border: 1px solid #003C74; border-radius: 3px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F3F3EF 50%, #ECEBE6 86%, #D6D0C5 100%);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  white-space: nowrap; text-decoration: none;
}
a.btn, a.btn:visited { color: #000; }
.btn:hover:not(:disabled) { box-shadow: inset 0 -2px 0 #F7B33D, inset 0 2px 0 #FFE4A6, inset 2px 0 0 #FCD27B, inset -2px 0 0 #FCD27B; }
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; box-shadow: inset 0 0 0 1px #A6BEEA, inset 0 0 0 2px #CEDDF9; }
.btn:active:not(:disabled) { background: linear-gradient(180deg, #E5E4DE, #E3E2DA 50%, #F2F1EE); }
.btn:disabled { color: #ACA899; border-color: #C9C7BA; cursor: default; }
.btn.primary { border-width: 1px; box-shadow: inset 0 0 0 1px #A6BEEA; }
.btn.small { min-width: 0; height: 20px; padding: 0 7px; font-size: 11px; }
.btn.danger { color: #8B0000; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

input[type=text], input[type=password], input[type=search], input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  font: 12px var(--font); color: #000;
  border: 1px solid var(--border); background: #fff; padding: 2px 4px; border-radius: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #3F6EB8; box-shadow: 0 0 0 1px #C3D5F5; }
input:disabled, select:disabled, textarea:disabled { background: #F5F4EA; color: #888; }
select { height: 22px; }
textarea { resize: vertical; }
label.chk { display: inline-flex; gap: 5px; align-items: center; }

fieldset.gb { border: 1px solid #D0D0BF; border-radius: 4px; padding: 8px 10px 10px; margin: 0 0 12px; background: #fff; min-width: 0; }
fieldset.gb > legend { color: #0046D5; padding: 0 4px; font-weight: bold; display: flex; align-items: center; gap: 5px; }
fieldset.gb.beige { background: #FBFAF4; }

.form-grid { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 6px 10px; align-items: center; }
.form-grid.cols2 { grid-template-columns: 120px minmax(0,1fr) 120px minmax(0,1fr); }
.form-grid > label { color: #333; }

/* ---------- tabs ---------- */
.tabs { margin-top: 4px; }
.tab-heads { display: flex; flex-wrap: wrap; gap: 0; padding-left: 4px; position: relative; z-index: 1; }
.tab-head {
  padding: 4px 11px 3px; margin-right: -1px; margin-top: 2px;
  border: 1px solid #919B9C; border-bottom: 0; border-radius: 3px 3px 0 0;
  background: linear-gradient(#FFFFFF, #ECEBE5 80%, #E1DED2);
  cursor: pointer; display: flex; align-items: center; gap: 5px; user-select: none; white-space: nowrap;
}
.tab-head:hover { box-shadow: inset 0 2px 0 #FFC83C; }
.tab-head.active { background: #FCFCFE; margin-top: 0; padding-bottom: 6px; margin-bottom: -1px; box-shadow: inset 0 3px 0 #FFC83C; font-weight: bold; position: relative; z-index: 2; }
.tab-head.locked { color: #999; }
.tab-head .cnt { color: #777; font-weight: normal; font-size: 11px; }
.tab-panel { border: 1px solid #919B9C; background: #FCFCFE; padding: 10px; box-shadow: 1px 1px 0 #D6D3C2; min-height: 80px; }

/* ---------- tabellen (DataGrid) ---------- */
.grid-wrap { border: 1px solid #7F9DB9; background: #fff; overflow: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: 12px; }
table.grid th {
  text-align: left; font-weight: normal; padding: 4px 6px; white-space: nowrap;
  background: linear-gradient(#FFFFFF, #F4F3EE 70%, #EBEADB); border-right: 1px solid #DCDAC8; border-bottom: 1px solid #D6D2C2;
  position: sticky; top: 0; z-index: 1; user-select: none;
}
table.grid th.sortable { cursor: pointer; }
table.grid th.sortable:hover { box-shadow: inset 0 -3px 0 #F9B347; background: #FAFAF5; }
table.grid th .arrow { color: #7C8DAE; font-size: 9px; margin-left: 4px; }
table.grid td { padding: 3px 6px; border-bottom: 1px solid #EEF0F5; vertical-align: top; }
table.grid tbody tr:nth-child(even) td { background: var(--grid-alt); }
table.grid tbody tr.clickable { cursor: pointer; }
table.grid tbody tr:hover td { background: #E8EEF9; }
table.grid tbody tr.sel td { background: var(--sel); color: #fff; }
table.grid tbody tr.afwijkend td { background: #FFF4D6; }
table.grid tbody tr.afwijkend:hover td { background: #FFEBB0; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.grid-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.grid-tools .count { margin-left: auto; color: #555; font-size: 11px; }
.grid-pager { display: flex; gap: 4px; align-items: center; justify-content: flex-end; padding: 4px 0; font-size: 11px; }
.grid-empty { padding: 14px; color: #666; text-align: center; font-style: italic; }

/* ---------- XP voortgangsbalk ---------- */
.xp-progress { width: 200px; height: 15px; border: 1px solid #686868; border-radius: 3px; padding: 1px; background: #fff; overflow: hidden; position: relative; }
.xp-progress::before {
  content: ""; position: absolute; top: 1px; bottom: 1px; left: -60px; width: 52px;
  background: repeating-linear-gradient(90deg, #2FD12F 0 8px, transparent 8px 10px);
  animation: prog 1.1s linear infinite;
  filter: drop-shadow(0 0 1px #8BEA8B);
}
@keyframes prog { to { left: 210px; } }

/* ---------- labels en markeringen ---------- */
.tag-nieuw { display: inline-block; background: var(--geel); color: var(--navy); font-size: 9px; font-weight: bold; padding: 0 4px; border-radius: 2px; letter-spacing: .5px; vertical-align: 1px; margin-left: 4px; text-decoration: none; }
.st { display: inline-block; padding: 0 6px; border-radius: 2px; font-size: 11px; border: 1px solid; white-space: nowrap; }
.st-ok { background: #E8F5E9; border-color: #9CCC9F; color: #1B5E20; }
.st-warn { background: #FFF8E1; border-color: #E6C76A; color: #7A5A00; }
.st-bad { background: #FDECEA; border-color: #E5A39B; color: #8B1A10; }
.st-neutral { background: #EEF1F6; border-color: #B8C2D3; color: #33415C; }
mark { background: var(--geel); color: #000; padding: 0 1px; }
.redacted { background: #111; color: #111; letter-spacing: -1px; cursor: help; user-select: none; border-radius: 1px; padding: 0 2px; font-family: monospace; }
.check { color: var(--groen); font-weight: bold; }

/* ---------- entity link ---------- */
a.elink, a.elink:visited { display: inline-flex; align-items: center; gap: 3px; color: var(--link); text-decoration: underline; white-space: nowrap; }
a.elink:visited { color: var(--visited); }
a.elink .ico { margin-right: 1px; }
a.elink:hover { color: #E00; }
.elink.locked { color: #777; text-decoration: none; display: inline-flex; gap: 3px; align-items: center; cursor: help; }
.elink.missing { color: #999; font-style: italic; }
