/* Dagplanning tab in Fleet FF: navy title, red section bar and dark red column heads, as in the planning sheet. */
.plan-view { display: grid; gap: 10px; }
.plan-view[hidden] { display: none; }
.plan-title { margin: 0; padding: 12px; color: #fff; border-radius: 8px; background: #1f3864; font-size: 18px; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .02em; }
.plan-title span { margin: 0 8px; opacity: .7; }

.plan-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 8px 12px; border: 1px solid rgba(221,239,224,.14); border-radius: 8px; background: #151d17; font-size: 13px; }
.plan-date { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-right: auto; }
.plan-date > span, .plan-count span { color: #9fc3e8; font-weight: 700; }
.plan-date input { min-height: 32px; padding: 0 8px; color: #edf4ef; border: 1px solid rgba(221,239,224,.3); border-radius: 8px; background: #0f1510; font: inherit; color-scheme: dark; }
.plan-button { min-height: 32px; padding: 0 12px; color: #c9d8cc; border: 1px solid rgba(221,239,224,.3); border-radius: 8px; background: #19221c; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.plan-button:hover { color: #fff; border-color: #5f8a66; background: #23352a; }
.plan-button:focus-visible { outline: 2px solid #91d49a; outline-offset: 2px; }
.plan-count { display: flex; align-items: center; gap: 8px; }
.plan-count b { min-width: 34px; padding: 3px 8px; color: #edf4ef; border-radius: 6px; background: #0f1510; text-align: center; }

.plan-section-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: -10px; padding: 6px 10px; color: #fff; border-radius: 8px 8px 0 0; background: #b03a2e; }
.plan-section-bar h3 { margin: 0; font-size: 14px; font-weight: 800; text-transform: uppercase; }
.plan-section-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-add { position: relative; min-height: 30px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 8px; background: rgba(0,0,0,.15); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.plan-add:hover { background: rgba(0,0,0,.3); }
.plan-add[hidden] { display: none; }
.plan-import { border-style: dashed; }
.plan-import input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.plan-import:focus-within, .plan-add:focus-visible, .plan-remove:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.plan-wrap { max-height: calc(100vh - 300px); overflow: auto; border: 1px solid rgba(221,239,224,.14); border-top: 0; border-radius: 0 0 8px 8px; }
.plan-table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.3; }
.plan-table th, .plan-table td { padding: 2px; border: 1px solid rgba(221,239,224,.22); text-align: left; vertical-align: middle; }
.plan-table thead th { position: sticky; top: 0; z-index: 1; padding: 5px 6px; color: #fff; background: #7b2a1f; border-color: #5e1f17; font-weight: 700; text-align: center; }
.plan-table tbody tr:nth-child(even) { background: rgba(255,255,255,.025); }
.plan-table td.plan-empty { padding: 18px; color: #9fb0a2; text-align: center; }
.plan-table input, .plan-table select, .plan-table textarea { width: 100%; min-width: 0; min-height: 28px; padding: 3px 6px; color: #edf4ef; border: 1px solid transparent; border-radius: 5px; background: transparent; font: inherit; font-size: 12px; color-scheme: dark; }
.plan-table textarea { display: block; min-width: 160px; resize: vertical; field-sizing: content; }
.plan-table input:hover, .plan-table select:hover, .plan-table textarea:hover { border-color: rgba(221,239,224,.3); }
.plan-table input:focus, .plan-table select:focus, .plan-table textarea:focus { outline: none; border-color: #91d49a; background: #0f1510; }
.plan-table select { cursor: pointer; }
.plan-table td[data-label="Prioriteit"] select { min-width: 88px; }
.plan-table td[data-label="Status"] select { min-width: 150px; }
.plan-table select option { color: #edf4ef; background: #19221c; }
.plan-table select.prio-hoog { color: #fff; background: #c62828; font-weight: 700; }
.plan-table select.prio-middel { color: #3d2a00; background: #ffd88a; font-weight: 700; }
.plan-table select.prio-laag { color: #102014; background: #cfe9d2; }
.plan-table select.status-uitval { color: #fff; background: #c62828; font-weight: 700; }
.plan-table select.status-in-werkplaats { color: #fff; background: #1f4fa0; font-weight: 700; }
.plan-table select.status-wacht-op-onderdelen { color: #3d2a00; background: #ffd88a; font-weight: 700; }
.plan-table select.status-gereed { color: #102014; background: #91d49a; font-weight: 700; }
.plan-table select.status-open { color: #edf4ef; background: #2c3a30; }
.plan-table tbody tr.status-gereed td { opacity: .65; }
.plan-since { display: block; padding: 0 6px; color: #ffb4a8; font-size: 10px; white-space: nowrap; }
.plan-actions { width: 1%; text-align: center; }
.plan-remove { min-height: 28px; padding: 0 8px; color: #ffb4a8; border: 1px solid transparent; border-radius: 6px; background: transparent; font: inherit; cursor: pointer; white-space: nowrap; }
.plan-remove:hover, .plan-remove.confirm { color: #fff; border-color: #c62828; background: #c62828; }
.plan-status { margin: 0; color: #9fb0a2; font-size: 12px; }
.plan-status.error { color: #ff8a80; }

/* Binnengekomen e-mail. */
.plan-inbox { border: 1px solid rgba(159,195,232,.35); border-radius: 8px; background: #121a22; }
.plan-inbox[hidden] { display: none; }
.plan-inbox-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 7px 10px; color: #fff; border-radius: 8px 8px 0 0; background: #1f3864; }
.plan-inbox-bar h3 { margin: 0; font-size: 14px; font-weight: 800; }
.plan-inbox-bar small { color: #c9d8f0; }
.inbox-list { max-height: 320px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.inbox-list li { display: grid; gap: 4px; padding: 8px 10px; border-bottom: 1px solid rgba(221,239,224,.1); font-size: 13px; }
.inbox-list li:last-child { border-bottom: 0; }
.inbox-head { display: flex; flex-wrap: wrap; gap: 4px 10px; color: #9fb0a2; font-size: 12px; }
.inbox-head b { color: #9fc3e8; }
.inbox-from { overflow-wrap: anywhere; }
.inbox-subject { margin: 0; color: #edf4ef; font-weight: 700; overflow-wrap: anywhere; }
.inbox-list details summary { width: max-content; color: #9fc3e8; font-size: 12px; cursor: pointer; }
.inbox-list pre { max-height: 220px; margin: 4px 0 0; padding: 8px; overflow: auto; color: #dfe9e2; border-radius: 6px; background: #0f1510; font: inherit; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.inbox-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.inbox-found { margin-right: auto; padding: 1px 8px; color: #102014; border-radius: 999px; background: #91d49a; font-size: 12px; font-weight: 700; }
.inbox-make, .inbox-ignore { min-height: 30px; padding: 0 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.inbox-make { color: #fff; border: 1px solid #b03a2e; background: #b03a2e; }
.inbox-make:hover { background: #8f2c22; }
.inbox-ignore { color: #c9d8cc; border: 1px solid rgba(221,239,224,.3); background: transparent; }
.inbox-ignore:hover { color: #fff; border-color: #5f8a66; }
.inbox-make:disabled, .inbox-ignore:disabled { opacity: .5; cursor: progress; }
.inbox-make:focus-visible, .inbox-ignore:focus-visible { outline: 2px solid #91d49a; outline-offset: 2px; }

/* Opdrachtbon behind a row. */
.plan-actions { white-space: nowrap; }
.plan-bon { color: #9fc3e8; }
.bon-dialog { width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 16px; color: #edf4ef; border: 1px solid rgba(221,239,224,.25); border-radius: 12px; background: #151d17; }
.bon-dialog::backdrop { background: rgba(0,0,0,.6); }
.bon-dialog h2 { margin: 0 0 4px; font-size: 17px; overflow-wrap: anywhere; }
.bon-meta { margin: 0 0 10px; color: #9fb0a2; font-size: 12px; overflow-wrap: anywhere; }
.bon-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bon-files button { min-height: 32px; padding: 0 12px; color: #c9d8cc; border: 1px solid rgba(221,239,224,.3); border-radius: 8px; background: #19221c; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.bon-files button:hover { color: #fff; border-color: #5f8a66; }
.bon-files .bon-close { margin-left: auto; }
.bon-text { width: 100%; min-height: 50vh; padding: 10px; color: #edf4ef; border: 1px solid rgba(221,239,224,.2); border-radius: 8px; background: #0f1510; font: 13px/1.5 ui-monospace, Consolas, monospace; tab-size: 18; resize: vertical; }

/* Phone: one card per row. */
@media (max-width: 640px) {
  .plan-title { padding: 10px; font-size: 15px; }
  .plan-title span { display: none; }
  .plan-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan-date { grid-column: 1 / -1; margin: 0; }
  .plan-date input { flex: 1 1 auto; }
  .plan-count { flex-direction: column; gap: 2px; font-size: 11px; text-align: center; }
  .plan-section-bar { margin-bottom: 0; border-radius: 8px; }
  .plan-wrap { max-height: none; overflow: visible; border: 0; }
  .plan-table, .plan-table tbody, .plan-table tr, .plan-table td { display: block; }
  .plan-table thead { display: none; }
  .plan-table tbody tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-bottom: 10px; padding: 10px; border: 1px solid rgba(221,239,224,.18); border-radius: 10px; background: #151d17; }
  .plan-table tbody tr:nth-child(even) { background: #151d17; }
  .plan-table td { min-width: 0; padding: 2px 0; border: 0; font-size: 13px; }
  .plan-table td::before { content: attr(data-label); display: block; color: #8a9a8d; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
  .plan-table textarea { min-width: 0; }
  .plan-table td[data-label="Omschrijving"], .plan-table td[data-label="Opmerking"], .plan-table td.plan-actions, .plan-table td.plan-empty { grid-column: 1 / -1; }
  .plan-actions { width: auto; text-align: right; }
  .plan-actions::before, .plan-table td.plan-empty::before { content: none !important; }
}

@media print {
  .plan-view { gap: 6px; }
  .plan-section-tools, .plan-date button, .plan-status, .plan-actions, .plan-inbox { display: none !important; }
  .plan-title { padding: 6px; font-size: 14px; }
  .plan-info { color: #000; border-color: #999; background: #fff; }
  .plan-date > span, .plan-count span { color: #1f3864; }
  .plan-date input, .plan-count b { color: #000; border: 0; background: #fff; }
  .plan-section-bar { margin-bottom: 0; }
  .plan-wrap { max-height: none; overflow: visible; border-color: #999; }
  .plan-table thead th { position: static; }
  .plan-table td { color: #000; border-color: #999; }
  .plan-table input, .plan-table select, .plan-table textarea { padding: 0; color: #000 !important; border: 0; background: none !important; appearance: none; font-weight: 400 !important; }
  .plan-table tbody tr.status-gereed td { opacity: 1; }
  .plan-view * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
