/* Logboek / vloot / planning tabs */
#tabs { display: flex; gap: 4px; flex-wrap: wrap; }
#tabs button { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 6px;
  padding: 5px 11px; cursor: pointer; font-size: 13px; }
#tabs button.on { background: var(--accent); color: #002033; border-color: var(--accent); font-weight: 600; }
#app.ops aside, #app.ops main { display: none; }
#ops { display: none; grid-column: 1 / -1; overflow-y: auto; padding: 16px; min-height: 0; }
#app.ops #ops { display: block; }
#app.ops .tot { display: none; }
.view { max-width: 1400px; margin: 0 auto; }
.view h2 { font-size: 18px; margin: 4px 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.view h3 { font-size: 15px; margin: 18px 0 8px; color: var(--muted); font-weight: 600; }
.bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.btn { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 12px;
  cursor: pointer; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--accent); }
.btn.pri { background: var(--accent); color: #002033; border-color: var(--accent); font-weight: 600; }
.btn.red { border-color: #7a2d2d; color: #ff9b9b; }
.btn.sm { padding: 3px 8px; font-size: 12px; }
select, input[type=text], input[type=number], input[type=date], input[type=datetime-local], input[type=password], input[type=email], input[type=tel], textarea {
  background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font: inherit; }
textarea { width: 100%; min-height: 70px; resize: vertical; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb th { text-align: left; color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: -16px; background: var(--bg); }
.tb td { padding: 6px 8px; border-bottom: 1px solid #1c242e; vertical-align: top; font-variant-numeric: tabular-nums; }
.tb tr:hover td { background: var(--panel); }
.tb td.num, .tb th.num { text-align: right; }
.tblwrap { overflow-x: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.card h4 { margin: 0 0 4px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.card .sub { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 13px; }
.kv span { color: var(--muted); }
.meter { height: 6px; background: var(--panel2); border-radius: 3px; overflow: hidden; margin: 6px 0; }
.meter i { display: block; height: 100%; background: var(--accent); }
.meter i.warn { background: var(--warn); } .meter i.bad { background: #ff5c5c; }
.tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); }
.tag.hobby { color: #7bd88f; border-color: #2c5a37; } .tag.opdracht { color: #ffcf4a; border-color: #6b5718; }
.tag.warn { color: var(--warn); border-color: #6b4a18; } .tag.bad { color: #ff8a8a; border-color: #6b2525; } .tag.ok { color: #7bd88f; border-color: #2c5a37; }
.alerts { display: grid; gap: 6px; margin-bottom: 14px; }
.alert { background: #2b2412; border: 1px solid #6b5718; color: #ffd98a; border-radius: 8px; padding: 7px 11px; font-size: 13px; }
.alert.bad { background: #2b1414; border-color: #6b2525; color: #ffb0b0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stats4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.muted { color: var(--muted); }
/* modal */
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; align-items: flex-start; justify-content: center;
  z-index: 3000; overflow-y: auto; padding: 30px 12px; }
#modal.open { display: flex; }
#modal .box { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; width: min(760px, 100%); padding: 16px 18px; }
#modal h3 { margin: 0 0 12px; color: var(--text); font-size: 16px; }
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.form label.full { grid-column: 1 / -1; }
.form .checks { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text); font-size: 13px; }
.form .checks label { flex-direction: row; align-items: center; color: var(--text); font-size: 13px; }
.mfoot { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.minimap { height: 220px; border-radius: 8px; border: 1px solid var(--line); }
/* plan */
.planwrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 14px; }
#planmap { height: 430px; border-radius: 10px; border: 1px solid var(--line); }
.wx { font-size: 12px; }
.wx td.bad { color: #ff8a8a; font-weight: 600; } .wx td.warn { color: var(--warn); }
.checklist label { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: 13px; }
.godrone { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.zonehit { font-size: 13px; padding: 6px 9px; border-radius: 6px; margin: 4px 0; background: #2b1414; border: 1px solid #6b2525; }
.zonehit.ok { background: #13281a; border-color: #2c5a37; }
.dropzone { border: 2px dashed var(--line); border-radius: 10px; padding: 16px; text-align: center; color: var(--muted); margin-bottom: 12px; }
.dropzone.over { border-color: var(--accent); color: var(--accent); }
@media (max-width: 900px) { .grid2, .planwrap, .form { grid-template-columns: 1fr; } }
@media print {
  header, #tabs, .bar, .btn, aside, main { display: none !important; }
  body, #ops { background: #fff !important; color: #000 !important; overflow: visible; }
  #app { display: block; height: auto; }
  .tb th { background: #fff; color: #000; position: static; } .tb td { border-color: #ccc; }
}

/* video gallery */
.vidview { display: grid; grid-template-columns: 250px 1fr; gap: 14px; max-width: none; }
.vtree { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 0; align-self: start;
  position: sticky; top: 0; max-height: calc(100vh - 90px); overflow-y: auto; font-size: 13px; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; }
.vcard:hover { border-color: var(--accent); }
.vcard .thumb { position: relative; aspect-ratio: 16/9; background: #000; }
.vcard .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard .dur, .vcard .gpsb, .vcard .camb { position: absolute; font-size: 11px; background: rgba(0,0,0,.7); color: #fff; border-radius: 4px; padding: 1px 5px; }
.vcard .dur { right: 6px; bottom: 6px; } .vcard .gpsb { left: 6px; top: 6px; } .vcard .camb { right: 6px; top: 6px; }
.vcard .vt { padding: 6px 8px 0; font-size: 13px; font-weight: 600; }
.vcard .vs { padding: 0 8px 7px; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vview { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 14px; margin-bottom: 14px; }
.vview h4 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.vplayer { position: relative; background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 16/9; }
.vplayer video { width: 100%; height: 100%; display: block; }
.vmsg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 12px; text-align: center; }
.vmapel { height: 260px; border-radius: 8px; border: 1px solid var(--line); }
.vhud { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; margin-top: 8px; }
.vhud .hv { background: var(--panel2); border-radius: 6px; padding: 4px 7px; }
.vhud .hv span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.vhud .hv b { font: 600 13px/1.3 ui-monospace, Consolas, monospace; white-space: nowrap; }
.vcharts canvas { width: 100%; height: 58px; display: block; margin-top: 6px; background: var(--panel2); border-radius: 6px; cursor: crosshair; }
@media (max-width: 900px) { .vidview, .vview { grid-template-columns: 1fr; } .vtree { position: static; max-height: 220px; } }

.spgroup > summary::-webkit-details-marker { display: none; }

.vtx { background: #fff; border: 2px solid #4cc2ff; border-radius: 50%; box-shadow: 0 0 4px rgba(0,0,0,.6); cursor: move; }
.vtx.vtx-first { background: #7bd88f; border-color: #fff; cursor: pointer; animation: vtxpulse 1.2s infinite; }
@keyframes vtxpulse { 50% { box-shadow: 0 0 0 6px rgba(123,216,143,.35); } }

.vcard { position: relative; } .vcard .vpick { position: absolute; z-index: 2; left: 8px; bottom: 58px; width: 20px; height: 20px; accent-color: var(--accent); }
.vcard.picked { outline: 3px solid var(--accent); }

/* ---- login, accounts, opdrachten */
#loginbox { display: none; position: fixed; inset: 0; z-index: 3000; background: var(--bg); align-items: center; justify-content: center; padding: 16px; }
.loginform { width: min(360px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.loginform h1 { font-size: 17px; margin: 0; text-align: center; }
.loginform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.loginform input { background: var(--panel2); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 9px 10px; font: inherit; }
.loginform .lerr { color: #ff6b6b; font-size: 13px; min-height: 1em; }
#usermenu { margin-left: auto; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); white-space: nowrap; }
#modal .box.wide { width: min(980px, 100%); max-height: 92vh; overflow: auto; }
.fplist { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: var(--panel2); }
.form .fprow { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 12px; padding: 2px 0; }
.form .fprow input { width: auto; }
body[data-role="klant"] #vSel, body[data-role="klant"] #vShowHidden, body[data-role="klant"] #status { display: none; }

.leaflet-tooltip.spotlabel { background: rgba(15,20,25,.55); border: 0; box-shadow: none; color: #ffcf4a; font-weight: 600; font-size: 12px; padding: 1px 6px; }
.leaflet-tooltip.spotlabel::before { display: none; }
.hide-spotlabels .leaflet-tooltip.spotlabel { display: none; }
.awaybox { margin-top: 12px; } .awaybox summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; }
#spotlist { border-bottom: 1px solid var(--line); padding: 6px 12px; font-size: 13px; flex: none; }
#spotlist summary { cursor: pointer; color: var(--text); font-weight: 600; padding: 2px 0; }
#spotlist .spl { max-height: 260px; overflow-y: auto; padding: 4px 0; }
#spotlist .splg { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin: 6px 0 2px; }
#spotlist .spli { display: flex; gap: 6px; padding: 3px 6px; border-radius: 6px; cursor: pointer; color: var(--text); }
#spotlist .spli:hover { background: var(--panel2); }
#spotlist .spli .cnt { margin-left: auto; color: var(--muted); font-size: 12px; }
.qfl { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; }
.qchips .chip { cursor: pointer; padding: 6px 12px; font-size: 13px; }
.qchips .chip.on { background: var(--accent); border-color: var(--accent); color: #0f1419; font-weight: 600; }
#tabs .qfbtn { background: var(--accent); color: #0f1419; border-color: var(--accent); font-weight: 700; }
.qfstart { width: 100%; padding: 14px; font-size: 18px; }
.qfclock { text-align: center; font-size: 48px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
#tabs .qfbtn.running { background: #ffb547; border-color: #ffb547; animation: vtxpulse 1.6s infinite; }
#mform > div.full, #mform > p.full, #mform > details.full { grid-column: 1 / -1; }
