/* ===== Fieldtool Assistent (rechtsonder) en Ideeënbus (js/assistant.js) ===== */
#as-fab { position: fixed; right: 22px; bottom: 22px; z-index: 1200; width: 64px; height: 64px; padding: 3px; border: 0; border-radius: 50%; cursor: pointer;
    background: conic-gradient(from 0deg, #00C27A, #1E88E5, #7E57C2, #00C27A); box-shadow: 0 10px 28px rgba(1,30,65,.4);
    transform: scale(0) rotate(-90deg); transition: transform .45s cubic-bezier(.2,1.4,.4,1), box-shadow .2s ease; }
#as-fab.is-in { transform: scale(1); }
#as-fab:hover { transform: scale(1.08); box-shadow: 0 14px 36px rgba(30,136,229,.5); }
#as-fab.is-open { transform: scale(.9); }
#as-fab::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(30,136,229,.45); animation: asPulse 2.6s ease-out infinite; }
#as-fab .as-bot { display: block; border-radius: 50%; }
.as-fab-dot { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #ef4444; color: #fff;
    font: 800 .7rem/20px system-ui; border: 2px solid #fff; }
.as-fab-dot[hidden] { display: none; }
.as-fab-tip { position: absolute; right: 74px; top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 7px 12px; border-radius: 12px;
    background: #011E41; color: #fff; font: 600 .82rem system-ui; box-shadow: 0 6px 16px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
#as-fab:hover .as-fab-tip { opacity: 1; }
#as-fab.is-open .as-fab-tip { display: none; }
@keyframes asPulse { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
/* Fugro-gezicht (BOT_SVG in assistant.js): helm met de "f", knipperen, rondkijken, denken, praten, zwaaien. */
.fx .fx-head { animation: fxBob 4.2s ease-in-out infinite; transform-box: view-box; transform-origin: 32px 50px; }
.fx .fx-eyes { animation: fxBlink 5.2s infinite; transform-box: view-box; transform-origin: 32px 39.5px; }
.fx .fx-look { animation: fxGlance 9s ease-in-out infinite; }
.fx .fx-led { animation: asLed 1.6s ease-in-out infinite; }
.fx .fx-happy, .fx .fx-mouth, .fx .fx-hand { opacity: 0; }
.fx .fx-smile, .fx .fx-happy, .fx .fx-mouth, .fx .fx-eyes { transition: opacity .2s ease, transform .2s ease; }
.fx .fx-shine { opacity: 0; }
@keyframes fxBob { 50% { transform: translateY(-1.2px) rotate(-1.5deg); } }
@keyframes fxBlink { 0%, 90%, 100% { transform: scaleY(1); } 93% { transform: scaleY(.1); } 96% { transform: scaleY(1); } }
@keyframes fxGlance { 0%, 38%, 62%, 100% { transform: translate(0, 0); } 44%, 50% { transform: translate(1.4px, -.4px); } 54%, 58% { transform: translate(-1.4px, 0); } }
/* Denken: ogen zoeken omhoog, glans schiet over de helm, hoofd kantelt licht. */
.fx.is-thinking .fx-look { animation: fxSearch 1.6s ease-in-out infinite; }
.fx.is-thinking .fx-shine { opacity: 1; animation: fxShine 1.8s ease-in-out infinite; }
.fx.is-thinking .fx-head { animation: fxTilt 1.6s ease-in-out infinite; }
.fx.is-thinking .fx-led { fill: #f59e0b; animation-duration: .5s; }
@keyframes fxSearch { 0%, 100% { transform: translate(-1.3px, -1px); } 50% { transform: translate(1.3px, -1px); } }
@keyframes fxShine { 0% { transform: translateX(0); } 60%, 100% { transform: translateX(62px); } }
@keyframes fxTilt { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
/* Praten: mond open en dicht. */
.fx.is-talking .fx-smile { opacity: 0; }
.fx.is-talking .fx-mouth { opacity: 1; animation: fxTalk .26s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes fxTalk { from { transform: scaleY(.35); } to { transform: scaleY(1.15); } }
/* Blij (muis over de knop) en zwaaien (welkom). */
#as-fab:hover .fx .fx-eyes, .fx.is-hello .fx-eyes { opacity: 0; }
#as-fab:hover .fx .fx-happy, .fx.is-hello .fx-happy { opacity: 1; }
#as-fab:hover .fx .fx-smile, .fx.is-hello .fx-smile { transform: scale(1.18); transform-box: fill-box; transform-origin: center top; }
.fx.is-hello .fx-hand { opacity: 1; animation: fxWave 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes fxWave { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(16deg); } }
@keyframes asLed { 50% { opacity: .35; } }
@keyframes asSpin { to { transform: rotate(360deg); } }

/* Vast in de hoek rechtsonder: aansluitend op de rand, de ronde knop verdwijnt zolang het paneel open is. */
#as-panel { position: fixed; right: 0; bottom: 0; z-index: 1199; width: min(420px, 100vw); height: min(760px, calc(100vh - 72px));
    display: flex; flex-direction: column; overflow: hidden; border-radius: 22px 0 0 0; background: var(--card, #fff); color: var(--text);
    border: 1px solid var(--border, rgba(0,60,113,.15)); border-right: 0; border-bottom: 0; box-shadow: -12px -8px 40px rgba(1,30,65,.28);
    animation: asIn .35s cubic-bezier(.2,.9,.3,1); transform-origin: bottom right; }
#as-panel[hidden] { display: none; }
@keyframes asIn { from { opacity: 0; transform: translate(40px, 40px); } to { opacity: 1; transform: none; } }
#as-fab.is-open { transform: scale(0) rotate(90deg); pointer-events: none; }
.as-body { scrollbar-width: thin; scrollbar-color: rgba(30,136,229,.35) transparent; }
.as-body::-webkit-scrollbar { width: 8px; }
.as-body::-webkit-scrollbar-track { background: transparent; }
.as-body::-webkit-scrollbar-thumb { background: rgba(30,136,229,.35); border-radius: 8px; }
.as-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 16px; color: #fff; position: relative;
    background: linear-gradient(120deg, #011E41, #003C71 45%, #1E88E5 85%, #7E57C2); }
.as-head-av { position: relative; }
.as-head-av i { position: absolute; right: 0; bottom: 2px; width: 11px; height: 11px; border-radius: 50%; background: #00C27A; border: 2px solid #003C71; }
.as-head-t { flex: 1; min-width: 0; }
.as-head-t b { display: block; font-size: 1rem; }
.as-head-t small { opacity: .8; font-size: .74rem; }
.as-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255,255,255,.14); color: #fff; font-size: 1rem; cursor: pointer; }
.as-ic:hover { background: rgba(255,255,255,.26); }
.as-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg, #f1f5f9); scroll-behavior: smooth; }
.as-foot { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid var(--border, #e2e8f0); background: var(--card, #fff); }
.as-foot textarea { flex: 1; resize: none; min-height: 40px; max-height: 120px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border, #cbd5e1);
    background: var(--input-bg, #fff); color: var(--text); font: inherit; font-size: .92rem; outline: none; }
.as-foot textarea:focus { border-color: #1E88E5; box-shadow: 0 0 0 3px rgba(30,136,229,.15); }
.as-attach, .as-send { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; cursor: pointer; font-size: 1.1rem; border: 0; }
.as-attach { background: rgba(0,60,113,.08); }
.as-send { background: linear-gradient(135deg, #003C71, #1E88E5); color: #fff; }
.as-send:disabled { opacity: .5; cursor: default; }
.as-welcome { text-align: center; padding: 6px 4px; animation: asIn .4s ease-out; }
.as-welcome-av { display: inline-block; animation: asFloat 3s ease-in-out infinite; }
@keyframes asFloat { 50% { transform: translateY(-6px); } }
.as-welcome h3 { margin: 6px 0 4px; }
.as-welcome p { font-size: .9rem; line-height: 1.45; color: var(--muted); margin: 0 0 12px; }
.as-starters, .as-sugg { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.as-sugg { justify-content: flex-start; padding-left: 38px; }
.as-starters button, .as-sugg button { padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(30,136,229,.35); background: var(--card, #fff);
    color: var(--text); font: inherit; font-size: .82rem; cursor: pointer; transition: transform .12s ease, background .15s ease; }
.as-starters button:hover, .as-sugg button:hover { background: rgba(30,136,229,.1); transform: translateY(-1px); }
.as-privacy { margin-top: 12px !important; font-size: .75rem !important; }
.as-msg { display: flex; gap: 8px; align-items: flex-end; animation: asMsg .25s ease-out; }
@keyframes asMsg { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.as-msg .as-bot { flex: 0 0 auto; }
.as-bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; font-size: .9rem; line-height: 1.45; word-wrap: break-word; }
.as-bubble p { margin: 0 0 4px; } .as-bubble p:last-child { margin: 0; }
.as-bubble ul { margin: 4px 0; padding-left: 18px; }
.as-bot .as-bubble { background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0); border-bottom-left-radius: 4px; }
.as-user { flex-direction: row-reverse; }
.as-user .as-bubble { background: linear-gradient(135deg, #003C71, #1E88E5); color: #fff; border-bottom-right-radius: 4px; }
.as-uav { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.as-admin .as-bubble { max-width: 92%; background: rgba(0,194,122,.12); border: 1px solid rgba(0,194,122,.4); }
.as-admin small { display: block; font-weight: 700; color: #00875A; margin-bottom: 2px; }
.as-typing { display: inline-flex; gap: 4px; align-items: center; }
.as-typing i { width: 7px; height: 7px; border-radius: 50%; background: #1E88E5; animation: asDot 1s infinite; }
.as-typing i:nth-child(2) { animation-delay: .15s; } .as-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes asDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.as-kindbar { align-self: center; padding: 3px 12px; border-radius: 999px; font-size: .75rem; background: rgba(30,136,229,.12); color: #1E88E5; font-weight: 600; }
.as-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.as-file { padding: 4px 10px; border-radius: 10px; background: rgba(0,60,113,.08); font-size: .78rem; }
.as-summary { border-radius: 16px; padding: 12px 14px; background: var(--card, #fff); border: 2px solid #1E88E5; box-shadow: 0 6px 18px rgba(30,136,229,.18); animation: asIn .35s ease-out; }
.as-summary-h { margin-bottom: 8px; }
.as-summary dl { display: grid; grid-template-columns: 80px 1fr; gap: 4px 8px; margin: 0 0 10px; font-size: .84rem; }
.as-summary dt { color: var(--muted); font-weight: 600; } .as-summary dd { margin: 0; }
.as-summary small { display: block; margin-top: 6px; color: var(--muted); font-size: .74rem; text-align: center; }
.as-submit { width: 100%; padding: 11px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #00875A, #00C27A); color: #fff; font: 700 .92rem system-ui; cursor: pointer; }
.as-submit:hover { filter: brightness(1.08); }
.as-list-h { margin: 0 0 4px; }
.as-thread { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border, #e2e8f0);
    background: var(--card, #fff); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.as-thread:hover { border-color: #1E88E5; }
.as-thread-ic { font-size: 1.3rem; }
.as-thread-t { flex: 1; min-width: 0; } .as-thread-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-thread-t small { color: var(--muted); font-size: .76rem; }
.as-unread { min-width: 22px; height: 22px; border-radius: 11px; background: #ef4444; color: #fff; font: 800 .72rem/22px system-ui; text-align: center; }
.as-empty { text-align: center; color: var(--muted); }
.as-confetti { position: absolute; top: 40%; width: 8px; height: 12px; border-radius: 2px; z-index: 5; animation: asConf 1.5s ease-out forwards; }
@keyframes asConf { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(-260px) translateX(var(--x, 40px)) rotate(540deg); opacity: 0; } }
[data-theme="dark"] .as-attach { background: rgba(255,255,255,.08); }
[data-theme="dark"] .as-starters button, [data-theme="dark"] .as-sugg button { border-color: rgba(91,184,232,.4); }
@media (max-width: 600px) { #as-panel { left: 0; width: auto; height: calc(100vh - 56px); border-radius: 18px 18px 0 0; border-left: 0; } #as-fab { right: 14px; bottom: 14px; } }
@media (prefers-reduced-motion: reduce) { #as-fab::before, .as-welcome-av, .fx .fx-head, .fx .fx-eyes, .fx .fx-look, .fx .fx-led, .fx .fx-shine, .fx .fx-mouth, .fx .fx-hand { animation: none; } }

/* Inbox */
.ib-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ib-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.ib-f { display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
.ib-f b { padding: 0 7px; border-radius: 999px; background: rgba(0,60,113,.08); font-size: .75rem; }
.ib-f.on { background: #1E88E5; border-color: #1E88E5; color: #fff; } .ib-f.on b { background: rgba(255,255,255,.25); }
.ib-layout { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: start; }
.ib-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 260px); overflow: auto; padding-right: 4px; }
.ib-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); color: var(--text);
    font: inherit; text-align: left; cursor: pointer; animation: asMsg .3s ease-out both; transition: border-color .15s ease, transform .12s ease; }
.ib-item:hover { transform: translateX(2px); border-color: #1E88E5; }
.ib-item.on { border-color: #1E88E5; box-shadow: 0 0 0 3px rgba(30,136,229,.15); }
.ib-item.is-new { border-left: 4px solid #ef4444; }
.ib-av { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, #003C71, #1E88E5); }
.ib-item-t { flex: 1; min-width: 0; } .ib-item-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-item-t small { color: var(--muted); font-size: .76rem; }
.ib-badge { padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.ib-s-nieuw { color: #ef4444; background: rgba(239,68,68,.12); } .ib-s-gelezen { color: #64748b; background: rgba(100,116,139,.12); }
.ib-s-in_behandeling { color: #1E88E5; background: rgba(30,136,229,.12); } .ib-s-gepland { color: #7E57C2; background: rgba(126,87,194,.12); }
.ib-s-afgerond { color: #00875A; background: rgba(0,135,90,.12); } .ib-s-afgewezen { color: #94a3b8; background: rgba(148,163,184,.15); }
.ib-detail { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px; min-height: 320px; box-shadow: var(--shadow-card); }
.ib-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.ib-d-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ib-d-head h2 { margin: 2px 0 8px; } .ib-d-head small { color: var(--muted); }
.ib-d-ctrl { display: flex; gap: 6px; } .ib-d-ctrl select { padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); }
.ib-sum { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; padding: 12px 14px; border-radius: 14px; background: rgba(30,136,229,.06); border-left: 4px solid #1E88E5; }
.ib-sum dt { color: var(--muted); font-weight: 600; } .ib-sum dd { margin: 0; }
.ib-detail h4 { margin: 18px 0 8px; }
.ib-files { display: grid; gap: 10px; }
.ib-file { display: flex; gap: 12px; padding: 10px; border-radius: 14px; border: 1px solid var(--border); }
.ib-file img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: var(--card-elev); }
.ib-file-ic { font-size: 2.4rem; }
.ib-file small { display: block; color: var(--muted); }
.ib-file-act { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.ib-ai { margin-top: 8px; font-size: .88rem; } .ib-ai:empty { display: none; }
.ib-ai:not(:empty) { padding: 10px 12px; border-radius: 12px; background: rgba(126,87,194,.08); border: 1px solid rgba(126,87,194,.3); }
.ib-chat { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow: auto; padding: 10px; border-radius: 14px; background: var(--bg); }
.ib-reply { display: flex; gap: 8px; margin-top: 10px; } .ib-reply textarea, .ib-note { flex: 1; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--input-bg); color: var(--text); font: inherit; }
.ib-prio { font-size: .9rem; }
@media (max-width: 900px) { .ib-layout { grid-template-columns: 1fr; } }

/* ===== Kaarten bij antwoorden (kaart, grafiek, tabel, gegevens) ===== */
#as-panel { transition: width .3s cubic-bezier(.2,.9,.3,1); }
#as-panel.as-wide { width: min(1040px, 100vw); }
#as-panel.as-wide .as-msg.as-bot .as-bubble { max-width: 100%; }
#as-panel.as-drop::after { content: 'Laat los om in te lezen 📊'; position: absolute; inset: 70px 10px 10px; display: grid; place-items: center; border-radius: 18px;
    border: 3px dashed #1E88E5; background: rgba(30,136,229,.12); color: #1E88E5; font: 800 1.15rem system-ui; backdrop-filter: blur(2px); z-index: 5; pointer-events: none; animation: asIn .2s ease-out; }
.as-msg.as-bot .as-bubble:has(.as-cards) { flex: 1; min-width: 0; max-width: calc(100% - 38px); }
.as-cards { display: grid; gap: 10px; margin-top: 10px; align-items: start; }
#as-panel.as-wide .as-cards { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.asc { margin: 0; border: 1px solid var(--border, #dbe3ec); border-radius: 14px; background: var(--card, #fff); overflow: hidden; animation: ascIn .45s cubic-bezier(.2,.9,.3,1.1) both; }
.as-cards > .asc:nth-child(2) { animation-delay: .07s; } .as-cards > .asc:nth-child(3) { animation-delay: .14s; } .as-cards > .asc:nth-child(n+4) { animation-delay: .2s; }
@keyframes ascIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.asc figcaption { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-bottom: 1px solid var(--border, #e2e8f0);
    background: linear-gradient(90deg, rgba(30,136,229,.08), transparent); }
.asc figcaption b { font-size: .86rem; }
.asc figcaption small { color: var(--muted, #64748b); font-size: .74rem; }
.asc-tools { margin-left: auto; display: flex; gap: 4px; }
.asc-tools button { border: 1px solid var(--border, #cbd5e1); background: var(--card, #fff); color: var(--text); border-radius: 8px; padding: 2px 8px; font-size: .78rem; cursor: pointer; }
.asc-tools button:hover { background: rgba(30,136,229,.12); }
.asc-mapbox { height: 260px; }
#as-panel.as-wide .asc-mapbox { height: 380px; }
.asc-label { background: rgba(1,30,65,.82); color: #fff; border: 0; border-radius: 6px; padding: 1px 6px; font: 600 .7rem system-ui; box-shadow: none; }
.asc-label::before { display: none; }
.asc-canvas { position: relative; height: 190px; padding: 6px 8px 0; }
#as-panel.as-wide .asc-canvas { height: 260px; }
.asc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 10px; }
.asc-chip { display: inline-flex; align-items: baseline; gap: 5px; padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, transparent); font-size: .74rem; }
.asc-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); align-self: center; }
.asc-chip small { color: var(--muted, #64748b); }
.asc-tablebox { max-height: 260px; overflow: auto; }
.asc table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.asc th { position: sticky; top: 0; background: var(--bg, #f1f5f9); text-align: left; padding: 5px 7px; font-weight: 700; white-space: nowrap; }
.asc td { padding: 4px 7px; border-top: 1px solid var(--border, #eef2f6); white-space: nowrap; }
.asc tr:hover td { background: rgba(30,136,229,.06); }
.asc dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; padding: 10px; font-size: .8rem; }
.asc dt { color: var(--muted, #64748b); }
.asc dd { margin: 0; font-weight: 600; word-break: break-word; }
.asc-note { display: block; padding: 0 10px 8px; color: var(--muted, #64748b); font-size: .72rem; }
.asc-list ul { margin: 0; padding: 8px 10px 10px 28px; font-size: .82rem; }
.asc-list li + li { margin-top: 4px; }
.asc-list.is-warn { border-color: #f5c26b; }
.asc-list.is-warn figcaption { background: linear-gradient(90deg, rgba(245,158,11,.18), transparent); }
.asc-hitg { padding: 6px 10px 8px; }
.asc-hitg > small { display: block; color: var(--c); font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.asc-hitg button { display: flex; flex-direction: column; width: 100%; text-align: left; gap: 1px; padding: 6px 9px; margin-bottom: 4px; border-radius: 10px; cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); border-left: 4px solid var(--c); background: var(--card, #fff); color: var(--text); font: inherit; transition: transform .12s ease, background .15s ease; }
.asc-hitg button:hover { transform: translateX(3px); background: color-mix(in srgb, var(--c) 8%, transparent); }
.asc-hitg button b { font-size: .82rem; }
.asc-hitg button span { font-size: .72rem; color: var(--muted, #64748b); }
.asc-ds { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-color: rgba(244,180,0,.5); background: linear-gradient(90deg, rgba(244,180,0,.14), transparent); }
.asc-ds > span { font-size: 1.5rem; }
.asc-ds div { flex: 1; display: flex; flex-direction: column; }
.asc-ds small { color: var(--muted, #64748b); font-size: .74rem; }
.asc-ds button, .as-cardpdf { border: 0; border-radius: 10px; padding: 6px 12px; font: 700 .78rem system-ui; cursor: pointer; background: linear-gradient(135deg, #003C71, #1E88E5); color: #fff; }
.asc-open { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 12px; cursor: pointer; text-align: left; font: 700 .84rem system-ui; color: #fff;
    background: linear-gradient(120deg, #011E41, #003C71 45%, #1E88E5 85%, #7E57C2); border: 0; }
.asc-open span { margin-left: auto; font-size: 1.2rem; transition: transform .2s ease; }
.asc-open:hover span { transform: translateX(4px); }
/* Foto's bij een dossier (meetlocatie, sensor, peilbuis) en de fotoviewer */
.asc-phgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; padding: 8px; }
.asc-phgrid button { display: grid; gap: 3px; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; font: inherit; color: inherit; }
.asc-phgrid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #e2e8f0; transition: transform .25s ease, box-shadow .25s ease; }
.asc-phgrid button:hover img { transform: scale(1.04); box-shadow: 0 6px 16px rgba(2, 6, 23, .25); }
.asc-phgrid span { font-size: .72rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asc-phgrid small { display: block; color: var(--muted, #64748b); font-size: .66rem; }
.asc-lb { position: fixed; inset: 0; z-index: 3000; display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; background: rgba(2, 6, 23, .9); animation: asIn .2s ease-out; }
.asc-lb figure { grid-column: 2; margin: 0; display: grid; justify-items: center; gap: 8px; min-width: 0; }
.asc-lb img { max-width: 100%; max-height: calc(100vh - 90px); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.asc-lb figcaption { color: #e2e8f0; font: 500 .85rem system-ui; text-align: center; }
.asc-lb button { border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 50%; width: 44px; height: 44px; font-size: 1.6rem; cursor: pointer; justify-self: center; }
.asc-lb button:hover { background: rgba(255, 255, 255, .25); }
.asc-lb .asc-lb-x { position: absolute; top: 14px; right: 14px; font-size: 1.1rem; }
.asc-lb [hidden] { visibility: hidden; }
.as-cardpdf { grid-column: 1 / -1; justify-self: start; background: transparent; color: #1E88E5; border: 1px solid rgba(30,136,229,.4); }
.as-cardpdf:hover { background: rgba(30,136,229,.1); }
.as-typing-hint { display: block; margin-top: 4px; color: var(--muted, #64748b); font-size: .74rem; animation: asIn .3s ease-out; }
[data-theme="dark"] .asc { background: #0f2238; border-color: rgba(157,211,245,.16); }
[data-theme="dark"] .asc th { background: #13304d; color: #cfe6f7; }
[data-theme="dark"] .asc-hitg button { background: #0f2238; }
[data-theme="dark"] .asc-label { background: rgba(0,0,0,.75); }
@media (max-width: 600px) { #as-panel.as-wide { width: auto; } #as-panel.as-wide .as-cards { grid-template-columns: 1fr; } }
/* Kop blijft op één regel, ook met vijf knoppen in het smalle paneel */
.as-head { gap: 8px; }
.as-head-t b, .as-head-t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#as-panel:not(.as-wide):not(.as-popped) .as-ic { width: 28px; height: 28px; border-radius: 8px; }
#as-panel:not(.as-wide):not(.as-popped) .as-ic svg { width: 16px; height: 16px; }
#as-panel:not(.as-wide):not(.as-popped) .as-head { gap: 5px; padding-right: 10px; }
#as-panel:not(.as-wide):not(.as-popped) .as-head-t b { font-size: .92rem; }
#as-panel:not(.as-wide) .as-head-av .as-bot { width: 36px; height: 36px; }
/* Eigen venster (Document Picture-in-Picture of pop-up): het paneel vult het hele venster */
body.as-pip-body { margin: 0; background: var(--bg, #f1f5f9); overflow: hidden; }
#as-panel.as-popped { position: static; width: 100vw; height: 100vh; border-radius: 0; border: 0; box-shadow: none; animation: none; }
#as-panel.as-popped [data-act=wide] { display: none; }
#as-panel.as-popped.as-wide { width: 100vw; }
#as-panel.as-popped .as-cards { grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.as-ic.is-on { background: rgba(255,255,255,.34); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
#as-fab.is-popped { transform: scale(.8); opacity: .75; }
#as-fab.is-popped::after { content: '↗'; position: absolute; right: -4px; top: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
    background: #1E88E5; color: #fff; font: 800 .75rem system-ui; border: 2px solid #fff; }
/* Live antwoord: tijdlijn van opzoekingen, denkregel met glans, typcursor en plekhouders voor kaarten */
.as-live .as-bubble { min-width: 200px; box-shadow: 0 0 0 1px rgba(30,136,229,.22), 0 4px 18px rgba(30,136,229,.16); animation: asGlow 2.4s ease-in-out infinite; }
@keyframes asGlow { 50% { box-shadow: 0 0 0 1px rgba(30,136,229,.45), 0 4px 22px rgba(30,136,229,.28); } }
.as-tl { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; font-size: .78rem; }
.as-step { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted, #64748b); animation: asMsg .25s ease-out; }
.as-step span { white-space: nowrap; }
.as-step em { font-style: normal; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 6px; border-radius: 6px;
    background: rgba(30,136,229,.1); color: #0B4F8A; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; }
.as-step small { margin-left: auto; padding-left: 6px; font-variant-numeric: tabular-nums; opacity: .75; }
.as-step i { position: relative; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid rgba(30,136,229,.22); border-top-color: #1E88E5; animation: asSpin .7s linear infinite; }
.as-step.is-wait i { animation-duration: 1.4s; opacity: .6; }
.as-step.is-ok i, .as-step.is-err i { border: 0; animation: asPop .3s ease-out; background: #00C27A; }
.as-step.is-err i { background: #e5484d; }
.as-step.is-ok i::after { content: ''; position: absolute; left: 4.5px; top: 2px; width: 3px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.as-step.is-err i::after { content: '!'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 800 .62rem system-ui; }
.as-step.as-note { font-style: italic; }
.as-step.as-note span { white-space: normal; }
.as-step.as-note i { border: 0; animation: none; background: none; }
.as-step.as-note i::after { content: '\1F4AC'; position: absolute; inset: -2px 0 0; font-size: .7rem; font-style: normal; }
@keyframes asPop { 0% { transform: scale(.3); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
.as-phase { font-size: .85rem; font-weight: 600; background: linear-gradient(90deg, #64748b 0%, #64748b 35%, #1E88E5 50%, #64748b 65%, #64748b 100%);
    background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: asSheen 1.8s linear infinite; }
@keyframes asSheen { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.as-caret { display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: text-bottom; border-radius: 1px; background: #1E88E5; animation: asCaret 1s steps(1) infinite; }
@keyframes asCaret { 50% { opacity: 0; } }
.as-ghost { margin-top: 6px; height: 64px; border-radius: 10px; display: grid; place-items: center; font-size: .76rem; color: var(--muted, #64748b);
    background: linear-gradient(90deg, rgba(30,136,229,.06) 25%, rgba(30,136,229,.17) 50%, rgba(30,136,229,.06) 75%); background-size: 200% 100%; animation: asGhost 1.2s linear infinite; }
@keyframes asGhost { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.as-steps { margin: -2px 0 6px; font-size: .76rem; color: var(--muted, #64748b); }
.as-steps summary { cursor: pointer; list-style: none; display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(30,136,229,.08); }
.as-steps summary::-webkit-details-marker { display: none; }
.as-steps[open] summary { margin-bottom: 5px; }
[data-theme="dark"] .as-step em { background: rgba(91,184,232,.14); color: #9dd3f5; }
[data-theme="dark"] .as-steps summary { background: rgba(91,184,232,.12); }
@media (prefers-reduced-motion: reduce) { .as-live .as-bubble, .as-step, .as-step i, .as-phase, .as-caret, .as-ghost { animation: none; } .as-phase { color: #64748b; } }
