/* Linker: leien blauw, één accentkleur. Zijbalk met collecties, secties met kaarten. */
:root {
  --bg: #141a22; --side: #171e28; --surface: #1c2430; --raised: #232d3b; --line: #2b3644;
  --fg: #e3e8ef; --muted: #8a96a8; --faint: #5d6a7c;
  --up: #4cc38a; --down: #e5636b;
  --accent: #3b7ddd; --accent-ink: #ffffff;
  --radius-lg: 14px; --radius: 10px; --radius-sm: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --card-min: 190px; --card-pad: 11px; --icon: 32px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef1f5; --side: #e6eaf0; --surface: #ffffff; --raised: #f4f6f9; --line: #d7dde6;
  --fg: #19212b; --muted: #5b6676; --faint: #8d97a6; --up: #1f9d63; --down: #cf3f48;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    --bg: #eef1f5; --side: #e6eaf0; --surface: #ffffff; --raised: #f4f6f9; --line: #d7dde6;
    --fg: #19212b; --muted: #5b6676; --faint: #8d97a6; --up: #1f9d63; --down: #cf3f48;
    color-scheme: light;
  }
}
:root[data-theme="oled"] {
  --bg: #000; --side: #050505; --surface: #0d0d0d; --raised: #161616; --line: #232323;
  --fg: #e8e8e8; --muted: #8c8c8c; --faint: #5a5a5a;
}
:root[data-size="compact"] { --card-min: 160px; --card-pad: 9px; --icon: 26px; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .grow { flex: 1; }

/* ------------------------------------------------ achtergrondafbeelding */
.bg { position: fixed; inset: 0; z-index: -1; background: center / cover no-repeat; }
.has-bg .bg { background-image: var(--bg-image); }
.has-bg.bg-dim .bg::after { content: ""; position: absolute; inset: 0; background: rgba(6, 9, 14, .55); }
.has-bg body { background: #000; }
.has-bg .sidebar, .has-bg .card, .has-bg .search input {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.has-bg .sidebar { background: color-mix(in srgb, var(--side) 72%, transparent); }

/* ------------------------------------------------ indeling */
.app { display: grid; grid-template-columns: var(--side-w, 236px) 1fr; min-height: 100%; }

.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--side); border-right: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; text-decoration: none; font-weight: 700; font-size: 17px; }
.logo-mark {
  position: relative; width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: var(--accent);   /* volgt de accentkleur, net als het icoon in het tabblad */
}
.logo-mark::after {
  content: ""; position: absolute; inset: 0; background: var(--accent-ink);
  -webkit-mask: var(--logo-glyph) center / 100% no-repeat; mask: var(--logo-glyph) center / 100% no-repeat;
}
:root { --logo-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M13.5 18.5l5-5M12 15l-2.5 2.5a3.5 3.5 0 0 0 5 5L17 20M15 12l2.5-2.5a3.5 3.5 0 0 1 5 5L20 17' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
#title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.collections { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.collections ul { list-style: none; margin: 0; padding: 0; }
.col-item { margin-bottom: 2px; border-radius: var(--radius); }
.col-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; min-height: 38px;
  background: none; border: 0; border-radius: var(--radius); text-align: left; cursor: pointer; color: var(--muted);
}
.col-btn:hover { background: var(--surface); color: var(--fg); }
/* Actieve categorie: zachte tint van de accentkleur met een lijntje links, geen vol vlak */
.col-btn { position: relative; transition: background .15s, color .15s; }
.col-btn[aria-current="true"] {
  background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--fg); font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}
.col-btn[aria-current="true"]:hover { background: color-mix(in srgb, var(--accent) 21%, transparent); }
.col-btn[aria-current="true"]::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
}
.col-btn[aria-current="true"] .col-count { color: var(--accent); opacity: 1; }
.col-btn[aria-current="true"] .col-icon, .col-btn[aria-current="true"] .col-initial { color: var(--accent); }
.col-icon { width: 20px; text-align: center; flex: none; font-size: 15px; }
.col-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-count { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.col-down { width: 7px; height: 7px; border-radius: 50%; background: var(--down); flex: none; }


.sidebar-foot { padding: 10px 12px 14px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.side-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
  background: none; border: 0; border-radius: var(--radius); color: var(--muted); cursor: pointer; text-align: left;
}
.side-btn:hover { background: var(--surface); color: var(--fg); }
.side-btn svg, .mini svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.main { min-width: 0; padding: 14px 32px 48px; }

/* ------------------------------------------------ zoeken en klok */
.topbar { margin-bottom: 4px; animation: rise .12s ease-out; }
.search { position: relative; max-width: 760px; }
.search input {
  width: 100%; height: 50px; padding: 0 48px 0 50px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  font-size: 17px; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.search input::-webkit-search-cancel-button { display: none; }
.search-glyph { position: absolute; left: 18px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.slash { position: absolute; right: 14px; pointer-events: none; top: 50%; transform: translateY(-50%); min-width: 22px; padding: 0 6px; text-align: center; font: 12px/20px var(--font); color: var(--faint); border: 1px solid var(--line); border-radius: var(--radius-sm); }

/* Klok rustig onderin de zijbalk, boven de knoppen */
.clock { margin: 0; padding: 0 22px 12px; display: flex; flex-direction: column; gap: 1px; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; }
.clock time { font-size: 18px; font-weight: 300; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
#date::first-letter { text-transform: uppercase; }
.side-collapsed .clock { padding: 0 0 10px; align-items: center; }
.side-collapsed .clock time { font-size: 13px; }
.side-collapsed #date { display: none; }
.search-hint { min-height: 18px; margin: 8px 4px 14px; font-size: 13px; color: var(--muted); }
.search-hint b { color: var(--fg); font-weight: 600; }
.search-hint kbd { font: 12px var(--font); padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }

/* ------------------------------------------------ collectiekop */
.col-head { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; min-height: 32px; }
.col-tools { display: flex; align-items: center; gap: 2px; }
body:not(.can-edit) .col-head { display: none; }   /* alleen + Sectie staat er nog, en dat is om te bewerken */

/* Rustige knop zonder rand: alleen bij hover iets duidelijker */
.ghost {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px 0 7px;
  background: none; border: 0; border-radius: var(--radius-sm); color: var(--faint); font-size: 13px; cursor: pointer;
  opacity: .75; transition: opacity .12s, color .12s, background .12s;
}
.ghost svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ghost:hover, .ghost:focus-visible { opacity: 1; color: var(--fg); background: var(--raised); }

/* ------------------------------------------------ secties en kaarten */
.section { margin-bottom: 28px; border-radius: var(--radius-lg); }
.section-head { display: flex; align-items: center; gap: 6px; min-height: 30px; margin-bottom: 8px; }
.section-name { margin: 0; font-size: 14px; font-weight: 650; color: var(--muted); }
.section-path { font-weight: 500; color: var(--faint); }
.section-count { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; margin-right: 4px; }
.section-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.section-head:hover .section-tools, .section-tools:focus-within { opacity: 1; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min), 1fr)); gap: 10px; }
.card {
  position: relative; display: flex; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .12s;
}
.card:hover, .card.selected { border-color: var(--accent); }
.card.selected { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.card-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: var(--card-pad); text-decoration: none; border-radius: var(--radius); }
.card-link:focus-visible { outline-offset: -2px; }
.icon {
  flex: none; width: var(--icon); height: var(--icon); border-radius: 8px; display: grid; place-items: center; overflow: hidden;
  font-size: calc(var(--icon) * .58); line-height: 1;
}
.icon img { width: 100%; height: 100%; object-fit: contain; }
.icon.letter { font-size: calc(var(--icon) * .42); font-weight: 700; color: #fff; }
.card-text { min-width: 0; flex: 1; }
.card-name { display: block; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hide-sub .card-sub { display: none; }
.dot { position: absolute; bottom: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; }
.dot.up { background: var(--up); }
.dot.down { background: var(--down); box-shadow: 0 0 0 3px color-mix(in srgb, var(--down) 25%, transparent); }
.card mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 2px; }

/* Kopiëren en bewerken klein onder elkaar, rechts in de kaart */
.card-actions {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 1px; padding: 1px;
  background: var(--surface); border-radius: var(--radius-sm); opacity: 0; pointer-events: none; transition: opacity .12s;
}
.card-actions .mini { width: 24px; height: 22px; }
.card-actions .mini svg { width: 14px; height: 14px; }
:root[data-size="compact"] .card-actions .mini { height: 19px; }
:root[data-size="compact"] .card-actions .mini svg { width: 13px; height: 13px; }
.card:hover .card-actions, .card-actions:focus-within { opacity: 1; pointer-events: auto; }
.has-bg .card-actions { background: var(--raised); }

.mini {
  width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  background: none; border: 0; border-radius: var(--radius-sm); color: var(--muted); cursor: pointer;
}
.mini:hover { background: var(--raised); color: var(--fg); }
.grip { cursor: grab; }

.add-card {
  min-height: calc(var(--icon) + var(--card-pad) * 2 + 2px); padding: 0 14px; text-align: left;
  background: none; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); cursor: pointer;
}
.add-card:hover { color: var(--fg); border-color: var(--muted); }

/* alleen tonen als je mag bewerken */
body:not(.can-edit) .edit-only, body:not(.can-edit) .section-tools, body:not(.can-edit) .card-actions .edit-only { display: none !important; }

/* slepen */
.dragging { opacity: .35; }
.card.drop-before { box-shadow: -3px 0 0 var(--accent); }
.card.drop-after { box-shadow: 3px 0 0 var(--accent); }
.section.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.section.drop-after { box-shadow: 0 3px 0 var(--accent); }
.section.drop-into .cards { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: var(--radius); }
.col-item.drop-before { box-shadow: 0 -2px 0 var(--accent); }
.col-item.drop-after { box-shadow: 0 2px 0 var(--accent); }
.col-item.drop-into .col-btn { outline: 2px dashed var(--accent); outline-offset: -2px; }

/* zoekresultaten */
.searching .col-head { display: none; }

/* leeg */
.empty { max-width: 460px; margin: 8vh auto; text-align: center; color: var(--muted); }
.empty h2 { color: var(--fg); font-size: 19px; margin: 0 0 6px; }
.empty p { margin: 0 0 16px; }

/* ------------------------------------------------ knoppen en formulieren */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px;
  background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; color: var(--fg);
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--down); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.dlg {
  width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, .55);
}
.dlg.narrow { width: min(400px, calc(100vw - 24px)); }
.dlg::backdrop { background: rgba(8, 12, 18, .55); backdrop-filter: blur(2px); }
.dlg[open] { animation: rise .16s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.dlg form { padding: 22px; }
.dlg h2 { margin: 0 0 16px; font-size: 18px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fields.single { grid-template-columns: 1fr; }
.fields > .wide, .fields > details { grid-column: 1 / -1; }
.dlg label { display: block; font-size: 13px; color: var(--muted); }
.dlg .opt { color: var(--faint); }
.dlg input:not([type=checkbox]):not([type=color]), .dlg select {
  display: block; width: 100%; height: 38px; margin-top: 5px; padding: 0 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); color: var(--fg); font-size: 15px;
}
.dlg input:focus, .dlg select:focus { outline: none; border-color: var(--accent); }
.dlg label.check { display: flex; align-items: center; gap: 8px; color: var(--fg); font-size: 14px; align-self: end; min-height: 38px; }
.dlg label.check.inline { min-height: 0; }
.dlg input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.dlg fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 14px 0 16px; }
.dlg fieldset:first-of-type { border-top: 0; padding-top: 0; }
.dlg legend { padding: 0; font-size: 14px; font-weight: 650; color: var(--fg); margin-bottom: 10px; float: left; width: 100%; }
.dlg legend + * { clear: both; }
.dlg fieldset > .help { margin-bottom: 10px; }
.dlg details summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.dlg details[open] summary { margin-bottom: 8px; }
.help { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.help code { font-size: 12px; padding: 0 4px; border-radius: 4px; background: var(--bg); }
.icon-field { display: flex; gap: 8px; align-items: end; }
.icon-field > label:first-child { flex: 1; }
.icon-field .file-btn { height: 38px; }
.icon-preview { flex: none; width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; font-size: 20px; }
.icon-preview img { width: 28px; height: 28px; object-fit: contain; }
.color-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.color-row input[type=color] { width: 38px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); cursor: pointer; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.dlg .file-btn { display: inline-flex; color: var(--fg); font-size: 14px; }
.form-error { margin: 12px 0 0; color: var(--down); font-size: 13px; }
.form-error:empty { display: none; }
.actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 10;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: var(--radius);
  background: var(--fg); color: var(--bg); font-size: 14px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5);
}

/* ------------------------------------------------ mobiel: collecties als rij bovenaan */
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { min-width: 0; top: 0; position: sticky; z-index: 2; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .logo { padding: 12px 14px; }
  .sidebar-foot { order: 2; margin-left: auto; border: 0; padding: 6px 8px; display: flex; }
  .side-btn span { display: none; }
  .collections { order: 3; flex-basis: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 0 10px 10px; display: flex; gap: 6px; }
  .collections ul { display: flex; gap: 6px; }
  .col-item { margin: 0; }
  .col-btn { white-space: nowrap; padding: 6px 12px; min-height: 34px; background: var(--surface); }
  .col-count { display: none; }
  .col-btn[aria-current="true"]::before { display: none; }   /* pilletjes op de telefoon: alleen de tint */
  .main { padding: 16px 14px 40px; }
  .cards { grid-template-columns: 1fr; gap: 8px; }
  .clock { display: none; }
  .slash { display: none; }
  .fields { grid-template-columns: 1fr; }
  .card-actions { opacity: 1; pointer-events: auto; position: static; transform: none; background: none; }
}
@media (hover: none) {
  .section-tools { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (max-width: 760px) {
  .card-actions .copy { display: none; }
  .card-actions .mini, :root[data-size="compact"] .card-actions .mini { width: 32px; height: 32px; }   /* groot genoeg voor een vinger */
  .card-actions { margin-right: 14px; }   /* ruimte voor het online-bolletje rechtsonder */
}

/* Tekst direct op de achtergrondafbeelding: altijd licht, met schaduw */
.has-bg .section-name, .has-bg .search-hint,
.has-bg .search-hint b, .has-bg .col-head .mini, .has-bg .col-head .ghost { color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.has-bg .section-count, .has-bg .section-path, .has-bg .section-tools .mini { color: rgba(255, 255, 255, .7); }

/* ------------------------------------------------ snelkoppelingen verzamelen */
.side-head { display: flex; align-items: center; gap: 4px; margin: 6px 0 6px 10px; }
.side-label { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.bookmarklet { cursor: grab; border-style: dashed; }
.first-tip { margin: 0 0 18px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); font-size: 14px; }
.first-tip kbd { font: 12px var(--font); padding: 0 5px; border: 1px solid var(--line); border-radius: 4px; }
.first-tip b { color: var(--fg); }
.drop-url .main { outline: 2px dashed var(--accent); outline-offset: -10px; border-radius: var(--radius-lg); }
.has-bg .first-tip { color: #fff; background: rgba(0, 0, 0, .35); border-color: rgba(255, 255, 255, .25); }
@media (max-width: 760px) {
  .side-label { display: none; }
  .side-head { order: 2; margin: 0; }
  .topbar { gap: 8px; }
  .first-tip { display: none; }
}
.dlg details.more { border-top: 1px solid var(--line); padding-top: 12px; }
.dlg details.more > .fields { margin-top: 12px; }

/* Subtiele + naast de sectienaam */
.add-inline { width: 24px; height: 24px; color: var(--faint); opacity: .7; }
.add-inline svg { width: 15px; height: 15px; }
.section-head:hover .add-inline, .side-head:hover .add-inline, .add-inline:focus-visible { opacity: 1; color: var(--accent); }
.has-bg .add-inline { color: rgba(255, 255, 255, .7); }
.add-card { font-size: 20px; text-align: center; color: var(--faint); }

.topbar + .col-head { margin-top: 10px; }
.mobile-only { display: none; }
@media (max-width: 760px) { .mobile-only { display: flex; } }

/* Potlood per categorie in de zijbalk: verschijnt bij hover op de plek van het aantal */
.col-item { position: relative; }
.col-edit {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; opacity: 0; pointer-events: none; transition: opacity .12s;
}
.col-edit svg { width: 15px; height: 15px; }
.col-item:hover .col-edit, .col-edit:focus-visible { opacity: 1; pointer-events: auto; }
.can-edit .col-item:hover .col-count, .can-edit .col-item:focus-within .col-count { visibility: hidden; }
.col-item:has(.col-btn[aria-current="true"]) .col-edit { color: var(--accent); }
.col-item:has(.col-btn[aria-current="true"]) .col-edit:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--fg); }
@media (hover: none) and (min-width: 761px) { .col-edit { opacity: 1; pointer-events: auto; } .can-edit .col-count { visibility: hidden; } }
@media (min-width: 761px) { .side-collapsed .col-edit { display: none; } }
@media (max-width: 760px) {
  /* Telefoon: alleen bij de actieve categorie, binnen het pilletje */
  .col-edit { display: none; }
  .can-edit .col-item:has(.col-btn[aria-current="true"]) .col-btn { padding-right: 34px; }
  .can-edit .col-item:has(.col-btn[aria-current="true"]) .col-edit { display: grid; opacity: 1; pointer-events: auto; right: 4px; }
}

/* Zijbalk breder of smaller slepen */
.resizer {
  position: absolute; top: 0; right: -4px; width: 8px; height: 100%; z-index: 3;
  cursor: col-resize; touch-action: none;
}
.resizer::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px;
  background: transparent; transition: background .15s;
}
.resizer:hover::after, .resizer:focus-visible::after, .resizing .resizer::after { background: var(--accent); }
.resizer:focus-visible { outline: none; }
.resizing, .resizing * { cursor: col-resize !important; user-select: none; }
@media (max-width: 760px) { .resizer { display: none; } }

/* Zijbalk ingeklapt: smalle strook met logo, iconen of beginletters en de knoppen onderin */
.col-initial { display: none; }
.side-collapsed #btn-collapse .chev { transform: rotate(180deg); transform-origin: 14px 12px; }
@media (min-width: 761px) {
  .side-collapsed .app { grid-template-columns: 64px 1fr; }
  .side-collapsed .resizer, .side-collapsed #title, .side-collapsed .side-head,
  .side-collapsed .col-name, .side-collapsed .col-count, .side-collapsed .side-btn span { display: none; }
  .side-collapsed .logo { justify-content: center; padding: 18px 0 16px; margin: 0 14px 10px; border-bottom: 1px solid var(--line); }
  .side-collapsed .logo-mark { width: 30px; height: 30px; border-radius: 9px; }
  .side-collapsed .collections { padding: 2px 0 12px; }
  .side-collapsed .collections ul { display: grid; gap: 6px; justify-items: center; }
  .side-collapsed .col-item { margin: 0; }
  /* Tegeltjes even groot als het logo; de actieve categorie zacht getint met een accentlijntje */
  .side-collapsed .col-btn {
    position: relative; justify-content: center; width: 36px; height: 36px; min-height: 0; padding: 0;
    border-radius: 10px; color: var(--muted); background: transparent;
    box-shadow: inset 0 0 0 1px var(--line); transition: background .15s, color .15s, box-shadow .15s;
  }
  .side-collapsed .col-btn:hover { background: var(--surface); color: var(--fg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fg) 18%, transparent); }
  .side-collapsed .col-btn[aria-current="true"] {
    background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
  }
  .side-collapsed .col-btn[aria-current="true"]::before {
    content: ""; position: absolute; left: -13px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
  }
  :root[data-theme="light"].side-collapsed .col-btn[aria-current="true"] { color: color-mix(in srgb, var(--accent) 80%, #000); }
  .side-collapsed .col-icon { width: auto; font-size: 17px; }
  .side-collapsed .col-initial { display: block; font-weight: 600; font-size: 13px; letter-spacing: .02em; }
  .side-collapsed .col-down { position: absolute; top: -2px; right: -2px; box-shadow: 0 0 0 2px var(--side); }
  .side-collapsed .sidebar-foot { padding: 10px 10px 14px; }
  .side-collapsed .side-btn { justify-content: center; padding: 8px 0; }
}
@media (max-width: 760px) { #btn-collapse { display: none; } }
