
:root{
  --nav:#08203c; --nav2:#0b2a4b; --paper:#eef4fa; --white:#fff;
  --line:#b9cfe3; --yellow:#ffd634; --yellow2:#fff0a8; --blue:#4fa0e9; --blue2:#dceeff;
  --red:#fb302e; --sky:#168ff1; --amber:#ffbd00; --green:#0fb23f; --ink:#101820; --muted:#637083;
}
*{box-sizing:border-box} html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif;color:var(--ink);background:#dfeaf4}
body{overflow-x:hidden}.hidden{display:none!important}
header{background:linear-gradient(90deg,#061b35,#0b2a4a);color:#fff;padding:8px 14px 6px;box-shadow:0 2px 12px #0003;position:sticky;top:0;z-index:50}
.top{display:grid;grid-template-columns:335px 1fr 260px;align-items:center;gap:10px}.brand{display:flex;align-items:center;gap:12px}.truck{font-size:48px;line-height:1}.brand h1{font-size:29px;margin:0;font-weight:900;letter-spacing:.3px}.brand small{display:block;font-size:17px;margin-top:2px;color:#d9e6f3}
.day-tabs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px}.day-tab{background:#183651;border:0;color:#fff;border-radius:5px;padding:7px 8px;font-size:15px;cursor:pointer;min-height:56px}.day-tab strong{display:block}.day-tab.active{background:#1189f4}.righthead{display:flex;align-items:center;justify-content:flex-end;gap:18px}.clock{text-align:right}.clock .time{font-size:34px;font-weight:900}.clock .date{font-size:14px}.settings{font-size:31px;cursor:pointer}
.subbar{background:#f8fbff;color:#101820;margin:7px -14px -6px;padding:8px 14px;display:flex;align-items:center;gap:12px;border-top:1px solid #4d6277}
.label{font-weight:900}.seg{display:flex;border:1px solid #b7cadf;border-radius:6px;overflow:hidden}.seg button{border:0;border-right:1px solid #c4d4e5;background:#edf4fb;padding:8px 20px;font-weight:700;cursor:pointer}.seg button:last-child{border-right:0}.seg button.active{background:#1188f2;color:#fff}
.legend{margin-left:auto;display:flex;gap:18px;align-items:center;font-size:13px;white-space:nowrap}.dot{width:18px;height:18px;border-radius:50%;display:inline-block;vertical-align:-4px;margin-right:5px}
.connection{font-weight:800;font-size:12px;padding:5px 8px;border-radius:20px;background:#e8f8ed;color:#23753a}.connection.off{background:#fff0df;color:#a65b00}
main{padding:9px 9px 92px}.board{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.panel{background:#fff;border-radius:6px;overflow:hidden;border:1px solid #bfd1e1;box-shadow:0 1px 4px #183a5c18}.panel-title{min-height:61px;padding:7px 11px;display:grid;grid-template-columns:1fr 220px;align-items:center}.out .panel-title{background:linear-gradient(90deg,#ffe36d,#fff5bf)}.in .panel-title{background:linear-gradient(90deg,#69b6f6,#d6ecff)}
.panel-title h2{margin:0;font-size:27px;font-weight:900}.panel-title .stats-mini{font-size:13px}.progress{height:9px;background:#edf2f6;border-radius:8px;overflow:hidden;margin-top:4px}.progress i{display:block;height:100%;background:var(--green)}
.table-scroll{overflow:auto;max-height:590px;background:#f7fbff}.sched{border-collapse:collapse;width:100%;min-width:720px;font-size:12px}.sched th{position:sticky;top:0;z-index:4;padding:5px 6px;text-align:left;font-weight:900;border-right:1px solid #9dbcd5;border-bottom:1px solid #8aaccc;white-space:nowrap}.out th{background:#ffd735}.in th{background:#147bc1;color:#fff}.sched td{padding:4px 6px;border-right:1px solid #c6d9e9;border-bottom:1px solid #c6d9e9;white-space:nowrap;height:25px}.sched tr:nth-child(even) td{background:#eef6fc}.sched tr.selected td{outline:2px solid #1d8cf1;outline-offset:-2px;background:#e0f2ff}.sched tr{cursor:pointer}.sched tr:hover td{background:#e6f4ff}
.c-time{width:52px}.c-ramp{width:55px}.c-customer{width:118px}.c-count{width:55px}.c-carrier{width:125px}.c-note{min-width:150px}.c-ref{min-width:112px}.c-status{width:132px;text-align:center}
.badge{display:inline-block;width:122px;padding:4px 5px;border-radius:5px;text-align:center;color:white;font-weight:700}.red{background:var(--red)}.sky{background:var(--sky)}.amber{background:var(--amber);color:#171717}.green{background:var(--green)}
.lower{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}.overview{display:grid;grid-template-columns:1fr 1fr;gap:8px}.overview-card{min-height:126px;border-radius:7px;border:1px solid #c5d6e5;padding:8px 12px;background:#fff}.overview-card.yellow{background:#fff5c5}.overview-card.blue{background:#e2f1ff}.overview-card h3{font-size:19px;margin:0 0 7px}.overview-grid{display:grid;grid-template-columns:1fr 115px;gap:8px;align-items:center}.counts div{font-size:13px;line-height:20px}.counts b{float:right}.donut{width:88px;height:88px;border-radius:50%;background:conic-gradient(var(--green) calc(var(--p)*1%),#c7d6df 0);display:grid;place-items:center;margin:auto}.donut:before{content:"";width:62px;height:62px;border-radius:50%;background:#f6fbff;position:absolute}.donut span{position:relative;z-index:2;font-weight:900;font-size:22px;text-align:center}.donut small{display:block;font-size:10px;font-weight:500}
.actions{background:#071a2d;border-radius:7px;padding:11px;display:grid;grid-template-columns:repeat(4,1fr);gap:10px;align-items:stretch}.action{border:0;border-radius:6px;color:#fff;font-weight:900;font-size:14px;min-height:98px;cursor:pointer}.action .ico{display:block;font-size:28px;margin-bottom:8px}.action:disabled{opacity:.35;cursor:not-allowed}
.utility{display:flex;gap:8px;margin-top:7px}.utility button{border:1px solid #a9c3d9;background:#fff;border-radius:6px;padding:7px 10px;font-weight:800;cursor:pointer}.utility .primary{background:#0d76c5;color:#fff;border-color:#0d76c5}.utility .danger{background:#fff0f0;color:#a81f1f;border-color:#ffc3c3}
footer{position:fixed;bottom:0;left:0;right:0;height:69px;background:#061b31;color:#d9e7f4;display:grid;grid-template-columns:repeat(4,150px) 1fr 220px;align-items:center;z-index:60;box-shadow:0 -2px 10px #0003}.nav{height:100%;display:grid;place-items:center;font-size:13px;border-top:4px solid transparent}.nav.active{border-color:#168cf1;background:#0a2d52;color:white}.service{text-align:right;padding-right:18px}.service b{margin-right:16px}.online-dot{color:#13d654}
dialog{border:0;border-radius:10px;width:min(620px,94vw);padding:0;box-shadow:0 25px 80px #0007}dialog::backdrop{background:#0a1c2b99}.dlg-head{background:#092745;color:#fff;padding:14px 17px;font-size:20px;font-weight:900}.dlg-body{padding:14px;display:grid;grid-template-columns:1fr 1fr;gap:11px}.dlg-body label{font-size:12px;font-weight:900;color:#48576a}.dlg-body input,.dlg-body select{width:100%;margin-top:4px;border:1px solid #b8c9d8;border-radius:6px;padding:9px;background:#fff}.full{grid-column:1/-1}.dlg-foot{border-top:1px solid #d9e4ed;padding:11px 14px;display:flex;justify-content:flex-end;gap:8px}.dlg-foot button{border:0;border-radius:6px;padding:9px 13px;font-weight:900;cursor:pointer}.save{background:#0d83e8;color:#fff}.cancel{background:#e7eef5}.del{background:#e73333;color:#fff;margin-right:auto}
.login{position:fixed;inset:0;background:linear-gradient(135deg,#061a31,#0c365f);z-index:200;display:grid;place-items:center}.login-card{width:min(430px,92vw);background:#fff;border-radius:14px;padding:25px;box-shadow:0 25px 80px #0007}.login-card h2{font-size:30px;margin:0 0 5px}.login-card p{color:#607184}.login-card input{width:100%;padding:12px;border:1px solid #b7c8d8;border-radius:7px;margin:7px 0}.login-card button{width:100%;border:0;border-radius:7px;padding:12px;background:#0e85e8;color:#fff;font-weight:900;cursor:pointer}.demo-note{margin-top:12px;padding:10px;border-radius:7px;background:#fff6cf;font-size:12px;color:#665400}
.toast{position:fixed;right:16px;bottom:82px;z-index:100;background:#071c32;color:#fff;padding:10px 13px;border-radius:7px;box-shadow:0 6px 25px #0004;max-width:420px}
@media(max-width:1100px){.top{grid-template-columns:260px 1fr 180px}.brand h1{font-size:23px}.truck{font-size:38px}.panel-title h2{font-size:21px}.legend{gap:8px}.sched{font-size:11px}}
@media(max-width:900px){body{min-width:900px}header{position:relative}.table-scroll{max-height:none}footer{position:relative}.top{grid-template-columns:250px 1fr 170px}main{padding-bottom:12px}}

.week-nav{display:grid;grid-template-columns:38px 1fr 38px;gap:6px;align-items:center}
.week-arrow{height:56px;border:0;border-radius:5px;background:#183651;color:#fff;font-size:34px;line-height:1;cursor:pointer;font-weight:900}
.week-arrow:hover{background:#245174}
.c-contact{min-width:105px}
@media(max-width:1100px){.week-nav{grid-template-columns:32px 1fr 32px}.week-arrow{font-size:28px}}

/* V3: hurtig status ved dobbeltklik/dobbelttryk */
.c-status{cursor:pointer;touch-action:manipulation}.c-status .badge{user-select:none}
.status-dialog{width:min(560px,94vw)}
.status-quick-grid{padding:16px;display:grid;grid-template-columns:1fr 1fr;gap:12px}
.quick-status{border:0;border-radius:8px;min-height:92px;color:#fff;font-size:27px;font-weight:900;cursor:pointer}
.quick-status span{display:block;font-size:13px;margin-top:7px}
.quick-status.amber{color:#171717}
@media(max-width:560px){.status-quick-grid{grid-template-columns:1fr 1fr;gap:8px;padding:10px}.quick-status{min-height:78px}}


/* V3: konto og log af */
.account-dialog{width:min(520px,94vw)}
.account-body{padding:16px}
.account-row{display:grid;grid-template-columns:130px 1fr;gap:12px;padding:11px 4px;border-bottom:1px solid #e1e9f0;align-items:center}
.account-row:last-child{border-bottom:0}
.account-row span{font-size:12px;font-weight:900;color:#637083;text-transform:uppercase}
.account-row b{font-size:15px;overflow-wrap:anywhere}
.account-actions{justify-content:flex-end}
.logout-btn{background:#e73333;color:#fff}

.service{cursor:pointer;user-select:none}.service:hover{background:#0a2d52}.presence-dialog{width:min(520px,94vw)}.presence-list{padding:12px 18px 18px;max-height:55vh;overflow:auto}.presence-user{display:flex;gap:12px;align-items:center;padding:12px 4px;border-bottom:1px solid #dce4eb}.presence-user:last-child{border-bottom:0}.presence-user div{display:flex;flex-direction:column;gap:2px}.presence-user small{color:#667789}.presence-live-dot{color:#13d654;font-size:18px}.presence-empty{padding:20px 4px;color:#667789;text-align:center}

.presence-top{border:1px solid #b8dfc4;background:#e8f8ed;color:#23753a;border-radius:18px;padding:6px 11px;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap;display:inline-flex;align-items:center;gap:6px}.presence-top strong{font-weight:900}.presence-top:hover{background:#d8f1df}.presence-top .presence-live-dot{color:#13a83d;font-size:14px}

/* V3: forsinkelser og udeblevet */
.actions{grid-template-columns:repeat(5,1fr)}
.noshow{background:#4a5563;color:#fff}
.c-status{min-width:155px}
.c-status .badge{display:block;margin:0 auto}
.delay-chip{display:block;margin:3px auto 0;width:max-content;max-width:145px;padding:1px 5px;border-radius:8px;background:rgba(166,91,0,.06);color:#7b5b2b;font-size:9px;font-weight:700;border:1px solid rgba(166,91,0,.16);white-space:nowrap;letter-spacing:.1px}
.delay-chip.live-delay{background:rgba(166,91,0,.07);color:#76572a;border-color:rgba(166,91,0,.18);animation:none}
@keyframes delayPulse{0%,100%{opacity:1}50%{opacity:.82}}
.status-quick-grid .quick-status.noshow{grid-column:1/-1;min-height:72px}
@media(max-width:1100px){.actions{grid-template-columns:repeat(5,1fr)}.action{font-size:12px}.c-status{min-width:145px}}

/* V3: Historik */
.nav-button{border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;width:150px;padding:0}.nav-button:hover{background:#0a2d52;color:#fff}
.history-dialog{width:min(1280px,96vw);max-width:none}.history-head{display:flex;align-items:center;justify-content:space-between}.history-x{border:0;background:transparent;color:#fff;font-size:30px;line-height:1;cursor:pointer}.history-tools{padding:12px 16px;display:flex;gap:10px;align-items:end;background:#f5f9fc;border-bottom:1px solid #d9e4ed}.history-tools label{font-size:11px;font-weight:900;color:#536477;text-transform:uppercase}.history-tools input{display:block;margin-top:4px;border:1px solid #b8c9d8;border-radius:6px;padding:8px 9px;min-width:180px;background:#fff}.history-tools button{border:0;border-radius:6px;padding:9px 12px;font-weight:900;cursor:pointer}.history-summary{padding:9px 16px;font-size:12px;font-weight:800;color:#536477;background:#fff}.history-table-wrap{max-height:62vh;overflow:auto}.history-table{border-collapse:collapse;width:100%;font-size:12px}.history-table th{position:sticky;top:0;background:#0d6fae;color:#fff;text-align:left;padding:8px;z-index:2;white-space:nowrap}.history-table td{padding:8px;border-bottom:1px solid #dbe6ef;vertical-align:top}.history-table tr:nth-child(even) td{background:#f5f9fc}.history-event{display:inline-block;padding:3px 7px;border-radius:12px;font-weight:900;white-space:nowrap}.history-event.create{background:#e8f8ed;color:#23753a}.history-event.update{background:#e8f3ff;color:#1264a3}.history-event.delete{background:#ffe9e9;color:#a81f1f}.history-event.status{background:#fff0e6;color:#a94a00}.history-detail{font-weight:800}.history-muted{color:#6b7785}.history-empty{text-align:center!important;padding:30px!important;color:#667789}.history-delay{color:#b42318;font-weight:900}

/* V3: Udvidede historikfiltre */
.history-tools{flex-wrap:wrap}
.history-tools select{display:block;margin-top:4px;border:1px solid #b8c9d8;border-radius:6px;padding:8px 9px;min-width:150px;background:#fff;font:inherit}
.history-tools .history-search-wide input{min-width:240px}
@media(max-width:900px){.history-tools label,.history-tools input,.history-tools select,.history-tools .history-search-wide input{width:100%;min-width:0}.history-tools label{flex:1 1 180px}}

.history-ref-link{appearance:none;border:0;background:none;padding:0;color:#075985;font:inherit;font-weight:800;text-decoration:underline;text-underline-offset:2px;cursor:pointer}.history-ref-link:hover{color:#0369a1}

.history-back{background:#e7eef5!important;color:#17324a!important}.history-back:hover{background:#d9e5ef!important}

.statistics-view{padding:16px 16px 100px;background:#eef4fa;min-height:calc(100vh - 140px)}
.stats-header{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1px solid #bfd1e1;border-radius:8px;padding:16px 18px;margin-bottom:12px}
.stats-header h2{margin:0;font-size:28px;color:#08203c}.stats-header p{margin:4px 0 0;color:#66758a}
.secondary-btn{border:1px solid #a8bfd4;background:#fff;border-radius:7px;padding:9px 12px;font-weight:800;cursor:pointer;color:#15324d}
.stats-filterbar{display:grid;grid-template-columns:1.4fr repeat(6,minmax(120px,1fr)) auto;gap:8px;align-items:end;background:#fff;border:1px solid #bfd1e1;border-radius:8px;padding:12px;margin-bottom:12px}
.quick-periods{display:flex;border:1px solid #b7cadf;border-radius:7px;overflow:hidden;height:38px}.stats-period{border:0;border-right:1px solid #c6d6e5;background:#edf4fb;padding:0 12px;font-weight:800;cursor:pointer}.stats-period:last-child{border-right:0}.stats-period.active{background:#1188f2;color:#fff}
.stats-filterbar label{font-size:11px;font-weight:900;color:#5b6878}.stats-filterbar input,.stats-filterbar select{width:100%;margin-top:4px;padding:8px;border:1px solid #becddd;border-radius:6px;background:#fff}
.stats-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin-bottom:12px}
.kpi-card{background:#fff;border:1px solid #bfd1e1;border-radius:8px;padding:14px;min-height:104px}.kpi-card span{display:block;font-size:12px;font-weight:900;color:#59697b;text-transform:uppercase}.kpi-card strong{display:block;font-size:30px;margin:6px 0 2px;color:#0b2847}.kpi-card small{color:#738296;font-weight:700}.kpi-card.success{border-top:4px solid #11aa42}.kpi-card.warning{border-top:4px solid #f0ad00}.kpi-card.danger{border-top:4px solid #eb3434}
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:12px}.stats-panel{background:#fff;border:1px solid #bfd1e1;border-radius:8px;padding:12px;margin-bottom:12px}.stats-panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.stats-panel-head h3{margin:0;color:#102d4b}.stats-panel-head p{margin:3px 0 0;color:#6c7b8c;font-size:12px}.mini-note{font-size:11px;color:#74859a}
.chart-wrap{height:280px;position:relative}.stats-table-wrap{overflow:auto}.stats-table{width:100%;border-collapse:collapse;font-size:12px}.stats-table th{background:#0b5f9f;color:#fff;text-align:left;padding:8px;border-right:1px solid #3983b7;white-space:nowrap}.stats-table td{padding:8px;border-bottom:1px solid #d9e4ee;white-space:nowrap}.stats-table tbody tr{cursor:pointer}.stats-table tbody tr:hover{background:#edf7ff}.statistics-view .delay-chip{display:inline-block;border-radius:14px;padding:4px 7px;font-weight:900}.statistics-view .delay-chip.ok{background:#e4f7e9;color:#1a7133}.statistics-view .delay-chip.late{background:#fff0d2;color:#9a6200}.statistics-view .delay-chip.no{background:#ffe5e5;color:#a51c1c}
@media(max-width:1200px){.stats-filterbar{grid-template-columns:1fr 1fr 1fr 1fr}.stats-kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.statistics-view{min-width:900px}.stats-grid{grid-template-columns:1fr}}

.start-view{padding:16px 16px 100px;background:#eef4fa;min-height:calc(100vh - 140px)}
.start-head{display:flex;align-items:center;justify-content:space-between;background:#fff;border:1px solid #bfd1e1;border-radius:8px;padding:16px 18px;margin-bottom:12px}
.start-head h2{margin:0;color:#08203c;font-size:28px}.start-head p{margin:4px 0 0;color:#66758a}
.primary-start-btn{border:0;border-radius:7px;background:#0b7fd3;color:#fff;padding:11px 18px;font-weight:900;cursor:pointer}
.start-kpis{display:grid;grid-template-columns:repeat(8,1fr);gap:9px;margin-bottom:12px}
.start-kpi{background:#fff;border:1px solid #bfd1e1;border-top:4px solid #8094a8;border-radius:8px;padding:12px;min-height:100px}
.start-kpi span{display:block;font-size:11px;font-weight:900;color:#5d6c7d;text-transform:uppercase}.start-kpi strong{display:block;font-size:29px;color:#0a2847;margin:6px 0 1px}.start-kpi small{font-size:11px;color:#778699;font-weight:700}
.start-kpi.blue{border-top-color:#198cf0}.start-kpi.amber{border-top-color:#f0ad00}.start-kpi.green{border-top-color:#12a746}.start-kpi.red{border-top-color:#f05a28}.start-kpi.darkred{border-top-color:#c82828}.start-kpi.online{border-top-color:#13a65a}
.start-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:12px;margin-bottom:12px}
.start-panel{background:#fff;border:1px solid #bfd1e1;border-radius:8px;padding:12px}.start-panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.start-panel-head h3{margin:0;color:#102d4b}.start-panel-head p{margin:3px 0 0;color:#6c7b8c;font-size:12px}
.attention-panel{border-top:4px solid #ef5b2a}.attention-count{min-width:30px;height:30px;border-radius:16px;background:#fff0e8;color:#b94216;display:flex;align-items:center;justify-content:center;font-weight:900}
.start-list{max-height:320px;overflow:auto}.start-list-row{display:grid;grid-template-columns:76px 80px 1fr 1fr 110px;gap:8px;align-items:center;padding:9px 6px;border-bottom:1px solid #dce6ef;font-size:12px}.start-list-row:last-child{border-bottom:0}.start-time{font-size:16px;font-weight:900;color:#0d3457}.start-ramp{font-weight:900;color:#0b6da9}.start-ref{font-weight:800}.start-empty{padding:28px;text-align:center;color:#738296;font-weight:700}
.start-alert{justify-self:end;border-radius:14px;padding:4px 8px;font-weight:900;background:#fff0d2;color:#9a6200}.start-alert.no{background:#ffe3e3;color:#a41e1e}.start-alert.ok{background:#e5f6ea;color:#21753a}
.start-progress{padding:6px 2px}.start-progress-track{height:14px;border-radius:8px;background:#dce6ee;overflow:hidden}.start-progress-fill{height:100%;width:0;background:#13a74a;border-radius:8px;transition:width .25s}.start-progress-text{margin-top:7px;font-size:12px;font-weight:800;color:#607186}
@media(max-width:1300px){.start-kpis{grid-template-columns:repeat(4,1fr)}}@media(max-width:900px){.start-view{min-width:900px}.start-grid{grid-template-columns:1fr}}

/* Ens klik-adfærd for hovedmenuen */
footer .nav{cursor:pointer;user-select:none}
footer .nav:hover{filter:brightness(1.12)}

#rf-build-version{
  position:fixed; right:10px; bottom:4px; z-index:20;
  font-size:9px; opacity:.45; pointer-events:none;
}

.rf-conflict-overlay{
  position:fixed;
  inset:0;
  z-index:2147483647;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(3,18,32,.68);
}
.rf-conflict-overlay[hidden]{display:none}
.rf-conflict-modal{
  position:relative;
  width:min(560px,calc(100vw - 32px));
  background:#fff;
  border-radius:14px;
  padding:34px 30px 26px;
  box-shadow:0 24px 80px rgba(0,0,0,.45);
  text-align:center;
  border-top:6px solid #e49a00;
}
.rf-conflict-close{
  position:absolute;
  top:10px;
  right:12px;
  width:42px;
  height:42px;
  border:0;
  border-radius:8px;
  background:#e8eef3;
  color:#102f4b;
  font-size:32px;
  font-weight:900;
  line-height:38px;
  cursor:pointer;
}
.rf-conflict-close:hover{background:#dfe9f1}
.rf-conflict-icon{font-size:44px;margin-bottom:6px}
.rf-conflict-modal h2{
  margin:0 42px 14px;
  color:#b42318;
  font-size:24px;
}
.rf-conflict-modal p{
  color:#334b5f;
  line-height:1.5;
  font-size:16px;
}
.rf-conflict-hint{
  margin-top:18px;
  font-size:13px!important;
  font-weight:800;
  color:#667788!important;
}

.admin-btn{
  border:0;border-radius:7px;padding:9px 13px;font-weight:900;cursor:pointer;
  background:#0b5f9f;color:#fff;
}
.admin-dialog{
  width:min(1100px,calc(100vw - 30px)); max-width:none; border:0; padding:0;
  border-radius:12px; overflow:hidden; background:#f4f8fc;
  box-shadow:0 24px 80px rgba(0,0,0,.32);
}
.admin-dialog::backdrop,.admin-user-dialog::backdrop{background:rgba(4,20,38,.58)}
.admin-head{
  background:#082f52;color:#fff;padding:17px 20px;display:flex;align-items:center;justify-content:space-between
}
.admin-head h2{margin:0;font-size:22px}.admin-head p{margin:3px 0 0;font-size:12px;opacity:.75}
.admin-x{
  width:38px;height:38px;border:0;border-radius:8px;background:rgba(255,255,255,.12);
  color:#fff;font-size:29px;line-height:34px;font-weight:900;cursor:pointer
}
.admin-tabs{
  display:flex;gap:0;background:#fff;border-bottom:1px solid #cad8e4;overflow:auto
}
.admin-tab{
  border:0;border-right:1px solid #d8e2eb;background:#fff;padding:13px 17px;
  font-weight:900;color:#4a5f72;cursor:pointer;white-space:nowrap
}
.admin-tab.active{background:#eaf5ff;color:#075f9e;border-bottom:3px solid #1087db}
.admin-section{padding:16px}
.admin-section-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.admin-section-top h3,.admin-coming h3{margin:0;color:#0d2c49}
.admin-section-top p,.admin-coming p{margin:4px 0 0;color:#6d7d8c;font-size:12px}
.admin-primary{
  border:0;border-radius:7px;background:#0b7fd3;color:#fff;padding:10px 14px;
  font-weight:900;cursor:pointer
}
.admin-summary{display:flex;gap:16px;margin-bottom:10px;font-size:12px;color:#53677a}
.admin-summary span{background:#fff;border:1px solid #c9d8e4;border-radius:7px;padding:7px 10px}
.admin-table-wrap{overflow:auto;background:#fff;border:1px solid #bfd1e1;border-radius:8px}
.admin-table{width:100%;border-collapse:collapse;font-size:12px}
.admin-table th{background:#0b5f9f;color:#fff;text-align:left;padding:9px;white-space:nowrap}
.admin-table td{padding:9px;border-bottom:1px solid #dce6ee;vertical-align:middle}
.admin-table tbody tr:last-child td{border-bottom:0}
.admin-badge{display:inline-block;padding:4px 8px;border-radius:14px;font-weight:900;font-size:11px}
.admin-badge.active{background:#e1f6e8;color:#1f7539}
.admin-badge.inactive{background:#f1f2f4;color:#68737d}
.admin-badge.role-admin{background:#e9e2ff;color:#5632a8}
.admin-badge.role-editor{background:#e4f2ff;color:#1769a5}
.admin-actions{display:flex;gap:5px;flex-wrap:wrap}
.admin-actions button{
  border:1px solid #b9cbd9;border-radius:6px;background:#fff;padding:6px 8px;
  font-size:11px;font-weight:900;cursor:pointer
}
.admin-actions .danger{border-color:#efb3b3;color:#a51c1c;background:#fff5f5}
.admin-actions .warn{border-color:#e8cc91;color:#8a5a00;background:#fffaf0}
.admin-loading{text-align:center!important;padding:24px!important;color:#748496}
.admin-coming{background:#fff;border:1px solid #bfd1e1;border-radius:8px;padding:24px}
.admin-user-dialog{width:min(480px,calc(100vw - 30px));border:0;border-radius:10px;padding:0}
.admin-user-form{padding:16px;display:grid;gap:12px}
.admin-user-form label{display:grid;gap:5px;font-size:12px;font-weight:900;color:#4c6072}
.admin-user-form input,.admin-user-form select{
  width:100%;box-sizing:border-box;border:1px solid #bfcfdd;border-radius:7px;padding:10px;background:#fff
}
.admin-error{
  background:#ffe9e9;color:#a51c1c;border:1px solid #efbcbc;padding:9px 11px;border-radius:7px;margin:0 16px 10px;
  font-size:12px;font-weight:800
}
@media(max-width:760px){
  .admin-dialog{width:calc(100vw - 12px)}
  .admin-section-top{align-items:flex-start;gap:10px}
}

.admin-info-box{
  margin-top:12px;padding:11px 13px;border:1px solid #bcd4e6;border-radius:8px;
  background:#eef7fd;color:#3b566d;font-size:12px;line-height:1.45
}
.admin-code{
  display:inline-block;background:#edf2f7;color:#20384c;border-radius:5px;
  padding:3px 7px;font-weight:900;letter-spacing:.4px
}
.admin-sort{
  width:70px;border:1px solid #c3d2de;border-radius:6px;padding:6px 7px;
}

.auth-gate{display:none;position:fixed;inset:0;z-index:2147483647;background:#08203c;align-items:center;justify-content:center}
.auth-gate-card{color:#fff;text-align:center;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.auth-gate-card strong{display:block;font-size:24px;letter-spacing:.5px;margin-bottom:10px}
.auth-gate-card span{font-size:14px;opacity:.8}
body.auth-pending > *:not(#authGate){visibility:hidden !important}
body.auth-pending #authGate{display:flex !important;visibility:visible !important}

/* V3.3.2s5: Statistik skal ikke ligne Dagsprogrammet */
body.stats-mode header .week-nav,
body.stats-mode header .subbar {
  display:none !important;
}
body.stats-mode header .top {
  min-height:64px;
}
.stats-data-warning{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid #e8c66a;
  border-radius:8px;
  background:#fff8df;
  color:#6e5200;
  font-size:12px;
  font-weight:700;
}


/* V3.3.2s6 Pause-test: faste, ikke-bookbare pauseblokke */
.sched tr.fixed-break-row{cursor:default}
.sched tr.fixed-break-row td,
.sched tr.fixed-break-row:nth-child(even) td,
.sched tr.fixed-break-row:hover td{
  background:#d71920!important;
  color:#fff!important;
  text-align:center;
  font-weight:900;
  letter-spacing:.35px;
  border-color:#a90f14!important;
  height:30px;
}

/* V3.3.2s6e1 – global ref.nr.-søgning som overblik-boks */
.actions-wrap{min-width:0}
.search-overview-card{position:relative;min-height:126px;background:#e2f1ff}
.search-overview-card h3{font-size:19px;margin:0 0 7px}
.global-ref-search{position:relative;display:flex;flex-direction:column;gap:7px}
.global-ref-search label{display:block;font-size:12px;font-weight:600;color:#526779}
.global-ref-search input{width:100%;height:42px;border:1px solid #9fb4c6;border-radius:6px;padding:0 12px;font-size:16px;background:#fff}
.global-ref-search input:focus{outline:2px solid rgba(31,144,219,.2);border-color:#1f90db}
.global-ref-results{position:absolute;z-index:80;top:calc(100% + 4px);left:0;right:0;background:#fff;border:1px solid #9fb4c6;border-radius:7px;box-shadow:0 10px 24px rgba(0,0,0,.18);max-height:300px;overflow:auto;padding:5px}
.global-ref-result{width:100%;border:0;border-bottom:1px solid #e2eaf0;background:#fff;text-align:left;padding:9px 10px;cursor:pointer;display:grid;grid-template-columns:minmax(110px,.8fr) minmax(130px,1fr) minmax(160px,1.3fr);gap:8px;align-items:center;font-size:12px}.global-ref-result:last-child{border-bottom:0}.global-ref-result:hover{background:#eef7ff}.global-ref-result b{font-size:14px}.global-ref-result .result-meta{color:#526779}.global-ref-empty{padding:10px;font-size:13px;color:#617487}
@media(max-width:1100px){.global-ref-result{grid-template-columns:1fr}}

/* V3.3.2s6e2 – kompakt FIND BOOKING i samme visuelle format som OVERBLIK */
.lower{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.actions-wrap{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:start;min-width:0}
.search-overview-card{width:auto;max-width:none;min-height:126px;box-sizing:border-box;background:#fff5c5}
.search-overview-card h3{font-size:19px;margin:0 0 7px}
.global-ref-search{gap:5px}
.global-ref-search label{font-size:12px;line-height:16px}
.global-ref-search input{height:30px;font-size:13px;padding:0 8px}
.global-ref-results{right:auto;width:100%;box-sizing:border-box;max-height:250px}
.global-ref-result{grid-template-columns:1fr;padding:6px 7px;gap:2px;font-size:11px}
.global-ref-result b{font-size:12px}
@media(max-width:1100px){.actions-wrap{grid-template-columns:1fr}.search-overview-card{width:100%}}

/* V3.3.2s6e3 – FIND BOOKING matcher OVERBLIK-kortets faste ydre størrelse */
.search-overview-card{
  height:126px;
  min-height:126px;
  width:100%;
  box-sizing:border-box;
}

/* V3.3.2s6e4 – FIND BOOKING bruger præcis samme box-model som .overview-card.
   Vigtigt: overview-card har min-height:126px i content-box. Ingen border-box/fast height her. */
.search-overview-card{
  height:auto;
  min-height:126px;
  width:100%;
  box-sizing:content-box;
}

/* V3.3.2s6e5 – exact runtime size sync handles responsive/zoom differences */
.search-overview-card{box-sizing:border-box!important;min-height:0!important;height:auto;}

/* V3.3.2s6f – Besked til admin */
.message-overview-card{background:#e2f1ff;box-sizing:border-box!important;min-height:0!important;height:auto;overflow:hidden}
.message-overview-card h3{font-size:19px;margin:0 0 7px}
.feedback-form{display:grid;grid-template-columns:minmax(0,1fr) 118px;grid-template-rows:38px 34px;gap:7px;align-items:stretch}
.feedback-form select,.feedback-form textarea,.feedback-form button{font:inherit;box-sizing:border-box}
.feedback-form select{height:38px;border:1px solid #9fb4c6;border-radius:8px;background:#fff;padding:0 34px 0 11px;font-size:13px;font-weight:700;color:#28475f;cursor:pointer}
.feedback-form textarea{grid-column:1 / -1;grid-row:2;height:34px;min-height:34px;resize:none;border:1px solid #9fb4c6;border-radius:8px;background:#fff;padding:8px 10px;font-size:13px;line-height:16px;color:#243746;overflow:hidden}
.feedback-form select:focus,.feedback-form textarea:focus{outline:2px solid rgba(31,144,219,.18);border-color:#1f90db}
.feedback-form textarea::placeholder{color:#8093a3}
.feedback-form button{grid-column:2;grid-row:1;height:38px;border:0;border-radius:8px;background:#0b5f9f;color:#fff;font-size:13px;font-weight:800;cursor:pointer;padding:0 12px;box-shadow:0 2px 5px rgba(11,95,159,.22)}
.feedback-form button:hover{filter:brightness(.95)}
.feedback-form button:active{transform:translateY(1px)}
.feedback-form button:disabled{opacity:.55;cursor:wait;box-shadow:none}
.admin-message-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:10px;background:#d71920;color:#fff;font-size:10px;margin-left:4px}
.admin-message-text{white-space:pre-wrap;min-width:240px;max-width:520px}
.admin-message-status{height:30px;border:1px solid #9fb4c6;border-radius:6px;background:#fff;padding:0 6px}
.admin-message-delete{height:30px;border:1px solid #e2b8b8;border-radius:7px;background:#fff;color:#9f2f2f;padding:0 9px;font-weight:700;cursor:pointer}.admin-message-delete:hover{background:#fff5f5;border-color:#d78d8d}
@media(max-width:1100px){.feedback-form{grid-template-columns:minmax(0,1fr) 118px}.feedback-form textarea{grid-column:1 / -1;grid-row:2}.actions-wrap{grid-template-columns:1fr}}

/* V3.3.2s6f2 — clean message card UI */
.feedback-form-simple{display:grid!important;grid-template-columns:minmax(0,1fr) 142px!important;grid-template-rows:58px!important;gap:10px!important;align-items:stretch!important;margin-top:10px!important}
.feedback-form-simple textarea{grid-column:1!important;grid-row:1!important;width:100%!important;height:58px!important;min-height:58px!important;max-height:58px!important;resize:none!important;border:1px solid #a9bfd0!important;border-radius:10px!important;background:#fff!important;padding:11px 13px!important;font:500 13px/18px Arial,sans-serif!important;color:#203647!important;box-shadow:inset 0 1px 2px rgba(23,55,79,.06)!important;outline:none!important;overflow:auto!important}
.feedback-form-simple textarea::placeholder{color:#7f929f!important}
.feedback-form-simple textarea:focus{border-color:#278bc7!important;box-shadow:0 0 0 3px rgba(39,139,199,.13)!important}
.feedback-form-simple button{grid-column:2!important;grid-row:1!important;width:142px!important;height:58px!important;border:0!important;border-radius:10px!important;background:linear-gradient(180deg,#197fc1 0%,#0c679f 100%)!important;color:#fff!important;font:800 13px Arial,sans-serif!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:10px!important;cursor:pointer!important;box-shadow:0 3px 8px rgba(11,95,159,.22)!important;padding:0 14px!important}
.feedback-form-simple button:hover{filter:brightness(.97)!important;box-shadow:0 4px 10px rgba(11,95,159,.28)!important}
.feedback-form-simple button:active{transform:translateY(1px)!important}
.feedback-form-simple button:disabled{opacity:.6!important;cursor:wait!important;box-shadow:none!important}
.feedback-send-arrow{font-size:18px!important;line-height:1!important;margin-top:-1px!important}
@media(max-width:1100px){.feedback-form-simple{grid-template-columns:minmax(0,1fr) 142px!important}}

/* =========================================================
   V3.3.2s6f4 – AUTOMATISK SKÆRMTILPASNING VED 100 % ZOOM
   Bevarer samme Dagsprogram-layout, men gør det responsivt.
   ========================================================= */

/* Lad de to hovedtabeller tilpasse sig den tilgængelige halvdel af skærmen
   i stedet for at kræve en bred, fast desktop-canvas. */
.board{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.panel{min-width:0}
.table-scroll{
  width:100%;
  max-width:100%;
  /* Højden følger skærmen, så nederste overblik/knapper også er synlige
     uden F11 eller manuel browser-zoom. */
  max-height:clamp(300px,calc(100vh - 430px),590px);
}
.sched{
  width:100%;
  min-width:0;
  table-layout:fixed;
  font-size:clamp(9px,.63vw,12px);
}
.sched th,.sched td{
  overflow:hidden;
  text-overflow:ellipsis;
  padding-left:clamp(3px,.32vw,6px);
  padding-right:clamp(3px,.32vw,6px);
}

/* Proportioner frem for faste/minimumsbredder. Samme kolonner og rækkefølge. */
.sched .c-ramp{width:8%}
.sched .c-time{width:6%}
.sched .c-customer{width:10%}
.sched .c-count{width:6%}
.sched .c-carrier{width:11%}
.sched .c-ref{width:15%;min-width:0}
.sched .c-note{width:19%;min-width:0}
.sched .c-contact{width:12%;min-width:0}
.sched .c-status{width:13%;min-width:0}

.badge{
  width:min(122px,100%);
  max-width:100%;
  font-size:clamp(9px,.58vw,12px);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.delay-chip{max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* Headeren komprimeres gradvist i stedet for at presse hele siden bredere. */
.top{grid-template-columns:minmax(220px,335px) minmax(560px,1fr) minmax(170px,260px)}
.brand{min-width:0}
.brand h1{font-size:clamp(20px,1.5vw,29px)}
.brand small{font-size:clamp(12px,.9vw,17px)}
.truck{font-size:clamp(30px,2.5vw,48px)}
.day-tab{font-size:clamp(10px,.78vw,15px);padding-left:4px;padding-right:4px}
.clock .time{font-size:clamp(24px,1.8vw,34px)}
.clock .date{font-size:clamp(10px,.74vw,14px)}
.legend{gap:clamp(6px,.9vw,18px);font-size:clamp(9px,.68vw,13px)}
.dot{width:clamp(10px,.95vw,18px);height:clamp(10px,.95vw,18px)}
.seg button{padding-left:clamp(9px,1vw,20px);padding-right:clamp(9px,1vw,20px)}

.panel-title{grid-template-columns:minmax(0,1fr) minmax(120px,220px)}
.panel-title h2{font-size:clamp(17px,1.4vw,27px)}
.panel-title .stats-mini{font-size:clamp(9px,.68vw,13px)}

/* Nederste område kan altid krympe uden at tvinge hele siden bredere. */
.lower,.overview,.actions-wrap{min-width:0}
.overview-card{min-width:0}
.overview-card h3{font-size:clamp(13px,1vw,19px)}
.counts div{font-size:clamp(9px,.68vw,13px);line-height:clamp(15px,1.05vw,20px)}
.overview-grid{grid-template-columns:minmax(0,1fr) clamp(74px,6vw,115px)}
.donut{width:clamp(64px,4.6vw,88px);height:clamp(64px,4.6vw,88px)}
.donut:before{width:clamp(44px,3.25vw,62px);height:clamp(44px,3.25vw,62px)}
.donut span{font-size:clamp(16px,1.15vw,22px)}

/* 1366–1599 px: kompakt arbejds-pc-visning ved browserens 100 %. */
@media (max-width:1599px){
  header{padding-left:8px;padding-right:8px}
  .subbar{margin-left:-8px;margin-right:-8px;padding-left:8px;padding-right:8px}
  main{padding-left:6px;padding-right:6px}
  .board,.lower{gap:7px}
  .top{grid-template-columns:minmax(185px,250px) minmax(500px,1fr) minmax(145px,190px);gap:6px}
  .week-nav{grid-template-columns:28px minmax(0,1fr) 28px;gap:4px}
  .week-arrow{height:48px;font-size:25px}
  .day-tabs{gap:3px}
  .day-tab{min-height:48px}
  .subbar{gap:7px}
  .panel-title{min-height:50px;padding:5px 7px}
  .sched td{height:23px;padding-top:3px;padding-bottom:3px}
  .overview-card{padding:7px 8px}
  .utility{gap:5px}
  .utility button{padding:6px 7px;font-size:11px}
  footer{height:60px;grid-template-columns:repeat(4,115px) 1fr 185px}
  main{padding-bottom:78px}
}

/* Små arbejds-laptops: stadig samme todelte Dagsprogram, blot mere kompakt. */
@media (max-width:1280px){
  body{min-width:0}
  .top{grid-template-columns:185px minmax(470px,1fr) 145px}
  .subbar{flex-wrap:nowrap;overflow:hidden}
  .label{font-size:11px}
  .seg button{font-size:10px;padding-top:6px;padding-bottom:6px}
  .legend{font-size:9px}
  .panel-title{grid-template-columns:minmax(0,1fr) 115px}
  .table-scroll{max-height:clamp(260px,calc(100vh - 390px),500px)}
  .lower{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .overview-card{min-height:108px}
  .feedback-form-simple textarea{height:48px!important;min-height:48px!important;max-height:48px!important}
}

/* =========================================================
   V3.3.2s6f5 – KOMPAKT 100 %-VISNING TIL ARBEJDS-PC
   Målet er samme informationsmængde som ved manuel udzoom,
   men med browseren stående på 100 %. Ingen funktionsændringer.
   ========================================================= */
@media (min-width:1200px){
  /* Toppen skal fylde mindre og brandet må aldrig blive klippet. */
  header{padding:4px 8px 3px}
  .top{grid-template-columns:235px minmax(0,1fr) 150px;gap:6px}
  .brand{gap:7px;overflow:visible}
  .truck{font-size:31px}
  .brand h1{font-size:21px;line-height:1.05;white-space:nowrap}
  .brand small{font-size:12px;margin-top:2px}
  .week-nav{grid-template-columns:28px minmax(0,1fr) 28px;gap:4px}
  .week-arrow{height:42px;font-size:24px}
  .day-tabs{gap:3px}
  .day-tab{min-height:42px;padding:4px 5px;font-size:11px;line-height:1.15}
  .righthead{gap:8px}
  .clock .time{font-size:25px;line-height:1}
  .clock .date{font-size:10px;margin-top:3px}
  .settings{font-size:24px}

  .subbar{margin:4px -8px -3px;padding:5px 8px;gap:7px;min-height:39px}
  .label{font-size:11px}
  .seg button{padding:5px 12px;font-size:10.5px}
  .legend{gap:8px;font-size:9.5px}
  .dot{width:11px;height:11px;vertical-align:-2px;margin-right:3px}
  .presence-top{font-size:10px;padding:5px 9px}

  /* Mere af selve dagsprogrammet skal kunne ses på én gang. */
  main{padding:6px 6px 58px}
  .board,.lower{gap:7px}
  .panel-title{min-height:42px;padding:4px 7px;grid-template-columns:minmax(0,1fr) 142px}
  .panel-title h2{font-size:20px;line-height:1.05}
  .panel-title .stats-mini{font-size:9.5px;line-height:1.1}
  .progress{height:6px;margin-top:3px}
  .table-scroll{max-height:clamp(390px,calc(100vh - 300px),590px)}
  .sched{font-size:10px}
  .sched th{padding:3px 4px;font-size:10px}
  .sched td{height:20px;padding:2px 4px}
  .badge{padding:2px 4px;font-size:9.5px;line-height:15px}
  .delay-chip{font-size:8.5px;line-height:12px;padding-top:0;padding-bottom:0}
  .pause td,.pause-row td{height:22px!important;font-size:10px!important}

  /* Nederste statusområde komprimeres, men beholder samme opbygning. */
  .lower{margin-top:6px}
  .overview{gap:7px}
  .overview-card{min-height:96px;padding:6px 8px}
  .overview-card h3,.search-overview-card h3,.message-overview-card h3{font-size:14px;margin-bottom:4px}
  .overview-grid{grid-template-columns:minmax(0,1fr) 66px;gap:5px}
  .counts div{font-size:10px;line-height:14px}
  .donut{width:60px;height:60px}
  .donut:before{width:42px;height:42px}
  .donut span{font-size:15px}
  .donut small{font-size:8px}
  .global-ref-search label{font-size:10px}
  .global-ref-search input{height:34px;padding:6px 9px;font-size:11px}
  .feedback-form-simple{grid-template-columns:minmax(0,1fr) 112px!important;grid-template-rows:44px!important;gap:7px!important;margin-top:6px!important}
  .feedback-form-simple textarea{height:44px!important;min-height:44px!important;max-height:44px!important;padding:7px 9px!important;font-size:11px!important;line-height:14px!important}
  .feedback-form-simple button{width:112px!important;height:44px!important;font-size:11px!important;padding:0 8px!important}
  .utility{gap:6px;margin-top:5px}
  .utility button{padding:5px 8px;font-size:10.5px}

  /* Footer mindre, så den ikke dækker over overblikket. */
  footer{height:48px;grid-template-columns:repeat(4,100px) 1fr 180px}
  .nav{font-size:10.5px;border-top-width:3px}
  .nav-button{width:100px}
  .service{font-size:10.5px;padding-right:10px;line-height:1.1}
  .service b{margin-right:6px}
}

/* Typiske 1366×768 / 1600×900 arbejds-PC'er får en ekstra tæt højdeprofil. */
@media (min-width:1200px) and (max-height:820px){
  .top{grid-template-columns:225px minmax(0,1fr) 140px}
  .truck{font-size:28px}
  .brand h1{font-size:19px}
  .brand small{font-size:11px}
  .week-arrow,.day-tab{height:38px;min-height:38px}
  .day-tab{font-size:10px}
  .clock .time{font-size:23px}
  .subbar{min-height:35px;padding-top:4px;padding-bottom:4px}
  main{padding-top:5px;padding-bottom:52px}
  .panel-title{min-height:38px}
  .panel-title h2{font-size:18px}
  .table-scroll{max-height:clamp(380px,calc(100vh - 270px),560px)}
  .sched{font-size:9.5px}
  .sched th{font-size:9.5px;padding-top:2px;padding-bottom:2px}
  .sched td{height:18px;padding-top:1px;padding-bottom:1px}
  .badge{font-size:9px;line-height:14px}
  .overview-card{min-height:88px;padding-top:5px;padding-bottom:5px}
  .overview-card h3,.search-overview-card h3,.message-overview-card h3{font-size:13px}
  .counts div{font-size:9px;line-height:12px}
  .donut{width:54px;height:54px}.donut:before{width:38px;height:38px}.donut span{font-size:14px}
  footer{height:44px}
}

/* =========================================================
   V3.3.2s6f6 – WINDOWS DESKTOP AUTOFIT
   Retter høj DPI / Windows-skala, hvor browseren ved 100 % kan
   rapportere en CSS-bredde under 1200 px. Desktop genkendes på
   mus/hover i stedet for kun viewport-bredde.
   ========================================================= */
@media (hover:hover) and (pointer:fine){
  /* Neutraliser den gamle <=900px fallback på Windows med høj skærmskalering. */
  body{min-width:0!important;overflow-x:hidden!important}
  header{position:sticky!important;top:0!important;padding:3px 6px 2px!important}
  footer{position:fixed!important;bottom:0!important;left:0!important;right:0!important}

  /* Kompakt top – svarer visuelt mere til manuel browser-udzoom. */
  .top{grid-template-columns:215px minmax(0,1fr) 135px!important;gap:5px!important}
  .brand{gap:6px!important;min-width:0!important;overflow:visible!important}
  .truck{font-size:27px!important}
  .brand h1{font-size:18px!important;line-height:1!important;white-space:nowrap!important;letter-spacing:0!important}
  .brand small{font-size:10px!important;margin-top:2px!important}
  .week-nav{grid-template-columns:27px minmax(0,1fr) 27px!important;gap:3px!important}
  .week-arrow{height:35px!important;min-height:35px!important;font-size:22px!important;border-radius:4px!important}
  .day-tabs{gap:3px!important}
  .day-tab{height:35px!important;min-height:35px!important;padding:3px 4px!important;font-size:9px!important;line-height:1.08!important}
  .righthead{gap:6px!important}
  .clock .time{font-size:21px!important;line-height:1!important}
  .clock .date{font-size:8.5px!important;margin-top:2px!important}
  .settings{font-size:21px!important}

  .subbar{margin:3px -6px -2px!important;padding:4px 6px!important;gap:5px!important;min-height:31px!important;flex-wrap:nowrap!important;overflow:hidden!important}
  .label{font-size:9px!important}
  .seg button{padding:4px 9px!important;font-size:9px!important;line-height:1.05!important}
  .legend{gap:6px!important;font-size:8.5px!important}
  .dot{width:9px!important;height:9px!important;vertical-align:-1px!important;margin-right:2px!important}
  .presence-top{font-size:8.5px!important;padding:4px 7px!important}

  /* Dagsprogrammet skal passe i højden ved 100 % zoom. */
  main{padding:4px 5px 44px!important}
  .board,.lower{gap:6px!important}
  .panel-title{min-height:35px!important;padding:3px 6px!important;grid-template-columns:minmax(0,1fr) 128px!important}
  .panel-title h2{font-size:16px!important;line-height:1!important}
  .panel-title .stats-mini{font-size:8px!important;line-height:1.05!important}
  .progress{height:5px!important;margin-top:2px!important}

  .table-scroll{max-height:clamp(225px,calc(100vh - 275px),500px)!important}
  .sched{min-width:0!important;table-layout:fixed!important;font-size:8.5px!important}
  .sched th{padding:2px 3px!important;font-size:8.5px!important;line-height:1.05!important}
  .sched td{height:16px!important;padding:1px 3px!important;font-size:8.5px!important;line-height:1.08!important}
  .sched .c-ramp{width:8%!important}
  .sched .c-time{width:6%!important}
  .sched .c-customer{width:10%!important}
  .sched .c-count{width:6%!important}
  .sched .c-carrier{width:11%!important}
  .sched .c-ref{width:14%!important;min-width:0!important}
  .sched .c-note{width:18%!important;min-width:0!important}
  .sched .c-contact{width:11%!important;min-width:0!important}
  .sched .c-status{width:16%!important;min-width:0!important}
  .badge{width:min(112px,100%)!important;padding:1px 3px!important;font-size:8px!important;line-height:11px!important;border-radius:4px!important}
  .delay-chip{margin-top:1px!important;font-size:7px!important;line-height:9px!important;padding:0 3px!important;border-radius:6px!important}
  .pause td,.pause-row td{height:18px!important;font-size:8.5px!important;padding-top:1px!important;padding-bottom:1px!important}

  /* Nederste område holdes synligt over footeren. */
  .lower{margin-top:5px!important}
  .overview{gap:6px!important}
  .overview-card{min-height:78px!important;padding:5px 7px!important}
  .overview-card h3,.search-overview-card h3,.message-overview-card h3{font-size:11px!important;line-height:1.05!important;margin:0 0 3px!important}
  .overview-grid{grid-template-columns:minmax(0,1fr) 50px!important;gap:4px!important}
  .counts div{font-size:8px!important;line-height:10px!important}
  .donut{width:46px!important;height:46px!important}
  .donut:before{width:32px!important;height:32px!important}
  .donut span{font-size:12px!important}
  .donut small{font-size:6.5px!important}
  .global-ref-search label{font-size:8px!important;line-height:10px!important}
  .global-ref-search input{height:28px!important;padding:4px 7px!important;font-size:9px!important}
  .feedback-form-simple{grid-template-columns:minmax(0,1fr) 92px!important;grid-template-rows:36px!important;gap:5px!important;margin-top:4px!important}
  .feedback-form-simple textarea{height:36px!important;min-height:36px!important;max-height:36px!important;padding:5px 7px!important;font-size:9px!important;line-height:11px!important;border-radius:7px!important}
  .feedback-form-simple button{width:92px!important;height:36px!important;font-size:9px!important;padding:0 6px!important;border-radius:7px!important}
  .feedback-send-arrow{font-size:13px!important}
  .utility{gap:5px!important;margin-top:4px!important}
  .utility button{padding:4px 7px!important;font-size:9px!important;border-radius:5px!important}

  footer{height:40px!important;grid-template-columns:repeat(4,92px) 1fr 165px!important}
  .nav{font-size:9px!important;border-top-width:2px!important;line-height:1.05!important}
  .nav-button{width:92px!important}
  .service{font-size:9px!important;padding-right:8px!important;line-height:1.05!important}
  .service b{margin-right:4px!important}
}

/* Ekstra lav arbejds-PC: giv tabellerne mindre højde før resten skubbes under footeren. */
@media (hover:hover) and (pointer:fine) and (max-height:700px){
  .table-scroll{max-height:clamp(200px,calc(100vh - 255px),390px)!important}
  .panel-title{min-height:32px!important}
  .overview-card{min-height:70px!important}
  footer{height:36px!important}
  main{padding-bottom:40px!important}
}


/* =========================================================
   V3.3.2s6f7 – ROBUST WINDOWS PC AUTOFIT
   Uses a Windows class set from userAgent, not hover/pointer or
   viewport width. This survives Windows DPI scaling at browser 100%.
   Placed last intentionally to neutralize older <=1100/<=900 rules.
   ========================================================= */
html.rf-windows-desktop body{min-width:0!important;overflow-x:hidden!important}
html.rf-windows-desktop header{position:sticky!important;top:0!important;padding:3px 6px 2px!important}
html.rf-windows-desktop main{padding:4px 5px 44px!important;min-width:0!important}
html.rf-windows-desktop footer{position:fixed!important;bottom:0!important;left:0!important;right:0!important;height:40px!important;grid-template-columns:repeat(4,92px) minmax(0,1fr) 165px!important}
html.rf-windows-desktop .board,
html.rf-windows-desktop .lower{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:6px!important;min-width:0!important}
html.rf-windows-desktop .panel,
html.rf-windows-desktop .overview,
html.rf-windows-desktop .actions-wrap,
html.rf-windows-desktop .overview-card,
html.rf-windows-desktop .search-overview-card,
html.rf-windows-desktop .message-overview-card{min-width:0!important}
html.rf-windows-desktop .actions-wrap{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
html.rf-windows-desktop .top{grid-template-columns:215px minmax(0,1fr) 135px!important;gap:5px!important}
html.rf-windows-desktop .brand{gap:6px!important;min-width:0!important;overflow:visible!important}
html.rf-windows-desktop .truck{font-size:27px!important}
html.rf-windows-desktop .brand h1{font-size:18px!important;line-height:1!important;white-space:nowrap!important;letter-spacing:0!important}
html.rf-windows-desktop .brand small{font-size:10px!important;margin-top:2px!important}
html.rf-windows-desktop .week-nav{grid-template-columns:27px minmax(0,1fr) 27px!important;gap:3px!important}
html.rf-windows-desktop .week-arrow{height:35px!important;min-height:35px!important;font-size:22px!important;border-radius:4px!important}
html.rf-windows-desktop .day-tabs{gap:3px!important}
html.rf-windows-desktop .day-tab{height:35px!important;min-height:35px!important;padding:3px 4px!important;font-size:9px!important;line-height:1.08!important}
html.rf-windows-desktop .righthead{gap:6px!important}
html.rf-windows-desktop .clock .time{font-size:21px!important;line-height:1!important}
html.rf-windows-desktop .clock .date{font-size:8.5px!important;margin-top:2px!important}
html.rf-windows-desktop .settings{font-size:21px!important}
html.rf-windows-desktop .subbar{margin:3px -6px -2px!important;padding:4px 6px!important;gap:5px!important;min-height:31px!important;flex-wrap:nowrap!important;overflow:hidden!important}
html.rf-windows-desktop .label{font-size:9px!important}
html.rf-windows-desktop .seg button{padding:4px 9px!important;font-size:9px!important;line-height:1.05!important}
html.rf-windows-desktop .legend{gap:6px!important;font-size:8.5px!important}
html.rf-windows-desktop .dot{width:9px!important;height:9px!important;vertical-align:-1px!important;margin-right:2px!important}
html.rf-windows-desktop .presence-top{font-size:8.5px!important;padding:4px 7px!important}
html.rf-windows-desktop .panel-title{min-height:35px!important;padding:3px 6px!important;grid-template-columns:minmax(0,1fr) 128px!important}
html.rf-windows-desktop .panel-title h2{font-size:16px!important;line-height:1!important}
html.rf-windows-desktop .panel-title .stats-mini{font-size:8px!important;line-height:1.05!important}
html.rf-windows-desktop .progress{height:5px!important;margin-top:2px!important}
html.rf-windows-desktop .table-scroll{width:100%!important;max-width:100%!important;max-height:clamp(225px,calc(100vh - 275px),500px)!important;overflow:auto!important}
html.rf-windows-desktop .sched{width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:8.5px!important}
html.rf-windows-desktop .sched th{padding:2px 3px!important;font-size:8.5px!important;line-height:1.05!important}
html.rf-windows-desktop .sched td{height:16px!important;padding:1px 3px!important;font-size:8.5px!important;line-height:1.08!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.rf-windows-desktop .sched .c-ramp{width:8%!important}
html.rf-windows-desktop .sched .c-time{width:6%!important}
html.rf-windows-desktop .sched .c-customer{width:10%!important}
html.rf-windows-desktop .sched .c-count{width:6%!important}
html.rf-windows-desktop .sched .c-carrier{width:11%!important}
html.rf-windows-desktop .sched .c-ref{width:14%!important;min-width:0!important}
html.rf-windows-desktop .sched .c-note{width:18%!important;min-width:0!important}
html.rf-windows-desktop .sched .c-contact{width:11%!important;min-width:0!important}
html.rf-windows-desktop .sched .c-status{width:16%!important;min-width:0!important}
html.rf-windows-desktop .badge{width:min(112px,100%)!important;padding:1px 3px!important;font-size:8px!important;line-height:11px!important;border-radius:4px!important}
html.rf-windows-desktop .lower{margin-top:5px!important}
html.rf-windows-desktop .overview{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:6px!important}
html.rf-windows-desktop .overview-card{min-height:78px!important;padding:5px 7px!important}
html.rf-windows-desktop .overview-card h3,
html.rf-windows-desktop .search-overview-card h3,
html.rf-windows-desktop .message-overview-card h3{font-size:11px!important;line-height:1.05!important;margin:0 0 3px!important}
html.rf-windows-desktop .overview-grid{grid-template-columns:minmax(0,1fr) 50px!important;gap:4px!important}
html.rf-windows-desktop .counts div{font-size:8px!important;line-height:10px!important}
html.rf-windows-desktop .donut{width:46px!important;height:46px!important}
html.rf-windows-desktop .donut:before{width:32px!important;height:32px!important}
html.rf-windows-desktop .donut span{font-size:12px!important}
html.rf-windows-desktop .global-ref-search input{height:28px!important;padding:4px 7px!important;font-size:9px!important}
html.rf-windows-desktop .feedback-form-simple{grid-template-columns:minmax(0,1fr) 92px!important;grid-template-rows:36px!important;gap:5px!important;margin-top:4px!important}
html.rf-windows-desktop .feedback-form-simple textarea{grid-column:1!important;grid-row:1!important;height:36px!important;min-height:36px!important;max-height:36px!important;padding:5px 7px!important;font-size:9px!important;line-height:11px!important}
html.rf-windows-desktop .feedback-form-simple button{grid-column:2!important;grid-row:1!important;width:92px!important;height:36px!important;font-size:9px!important;padding:0 6px!important}
html.rf-windows-desktop .utility{gap:5px!important;margin-top:4px!important}
html.rf-windows-desktop .utility button{padding:4px 7px!important;font-size:9px!important}
html.rf-windows-desktop .nav{font-size:9px!important;border-top-width:2px!important;line-height:1.05!important}
html.rf-windows-desktop .nav-button{width:92px!important}
html.rf-windows-desktop .service{font-size:9px!important;padding-right:8px!important;line-height:1.05!important}

@media (max-height:700px){
  html.rf-windows-desktop .table-scroll{max-height:clamp(200px,calc(100vh - 255px),390px)!important}
  html.rf-windows-desktop .panel-title{min-height:32px!important}
  html.rf-windows-desktop .overview-card{min-height:70px!important}
  html.rf-windows-desktop footer{height:36px!important}
  html.rf-windows-desktop main{padding-bottom:40px!important}
}


/* =========================================================
   V3.3.2s6f8 – PC VERTICAL FIT
   s6f7 fixed width/DPI handling. On the tested 100% Edge view,
   the utility row was still hidden behind the fixed footer.
   Reserve 34px more vertical room by reducing only schedule height.
   ========================================================= */
html.rf-windows-desktop .table-scroll{
  max-height:clamp(190px,calc(100vh - 309px),466px)!important;
}
@media (max-height:700px){
  html.rf-windows-desktop .table-scroll{max-height:clamp(175px,calc(100vh - 289px),356px)!important}
}

/* V3.3.2s6f9 admin notification badge on settings gear */
.settings{position:relative;display:inline-flex;align-items:center;justify-content:center}
.settings-message-badge{position:absolute;top:-5px;right:-10px;min-width:18px;height:18px;padding:0 4px;box-sizing:border-box;border-radius:999px;background:#e11d2e;color:#fff;border:2px solid #0b2b47;font-size:11px;font-weight:900;line-height:14px;text-align:center;pointer-events:none;z-index:3}
.settings-message-badge.hidden{display:none!important}
