*{box-sizing:border-box}body{font-family:Arial,Helvetica,sans-serif;margin:0;background:#f6f8fb;color:#172033}nav{height:58px;background:#fff;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;gap:22px;padding:0 28px;position:sticky;top:0;z-index:10}nav a{color:#334155;text-decoration:none}main{padding:28px;max-width:1600px;margin:auto}.top{display:flex;justify-content:space-between;gap:20px;align-items:start}.top h1{margin:0 0 6px}.top p{margin:0;color:#64748b}.top form{display:flex;gap:8px}input,select{padding:11px 13px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;min-width:260px}button{padding:11px 16px;border:0;border-radius:10px;background:#1d4ed8;color:#fff;font-weight:700;cursor:pointer}.kpis{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:14px;margin:24px 0}.kpis div,.card,.ok,.alert{background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:18px;box-shadow:0 6px 18px rgba(15,23,42,.05)}.kpis b{display:block;font-size:30px}.kpis span{color:#64748b}.alert{border-color:#fecaca;background:#fff1f2}.ok{border-color:#bbf7d0;background:#f0fdf4}.legend{display:flex;align-items:center;gap:10px;color:#64748b;margin:12px 0}.legend span{width:28px;height:10px;display:inline-block;border-radius:999px}.legend .cow{background:#93c5fd}.legend .stamp{background:#22c55e}.legend .todayline{width:3px;height:18px;background:#ef4444}.gantt{background:#fff;border:1px solid #e2e8f0;border-radius:18px;overflow:auto;box-shadow:0 6px 18px rgba(15,23,42,.05)}.header,.row{display:grid;grid-template-columns:330px minmax(900px,1fr);border-bottom:1px solid #e2e8f0}.header{font-weight:700;background:#f8fafc;position:relative;top:auto;z-index:2;min-height:58px}.left{padding:14px 14px;border-right:1px solid #e2e8f0;min-height:72px}.left small{display:block;color:#64748b;margin-top:3px}.timeline{position:relative;min-height:72px;background-image:linear-gradient(to right,#eef2f7 1px,transparent 1px);background-size:calc(100% / var(--days)) 100%}.header .timeline{min-height:58px}.header .timeline span{position:absolute;top:13px;font-size:12px;color:#475569}.bar{position:absolute;height:18px;border-radius:999px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:2px 8px;font-size:11px;line-height:14px}.cowbar{top:14px;background:#bfdbfe;color:#1e3a8a;border:1px solid #93c5fd}.stampbar{top:42px;background:#86efac;border:1px solid #22c55e}.today-marker{position:absolute;top:0;bottom:0;width:2px;background:#ef4444;opacity:.8}.login{min-height:100vh;display:grid;place-items:center}.login-box{width:360px;background:#fff;padding:28px;border-radius:22px;box-shadow:0 18px 60px rgba(15,23,42,.12)}.login-box label{display:block;margin:14px 0}.login-box input{width:100%;min-width:0;margin-top:6px}pre{white-space:pre-wrap;margin:10px 0 0}@media(max-width:900px){.top,.kpis{display:block}.kpis div{margin-bottom:12px}.header,.row{grid-template-columns:260px 900px}}.filters{display:flex;align-items:end;gap:10px;flex-wrap:wrap;background:#fff;border:1px solid #e2e8f0;border-radius:18px;padding:14px;margin:22px 0 0;box-shadow:0 6px 18px rgba(15,23,42,.05)}.filters label{display:grid;gap:5px;font-size:12px;color:#64748b}.filters input,.filters select{min-width:180px}.btn{display:inline-block;padding:11px 16px;border-radius:10px;text-decoration:none;font-weight:700}.btn.secondary{background:#e2e8f0;color:#334155}.legend em{margin-left:auto;color:#475569;font-style:normal}.header .timeline span{line-height:16px} 
.header .left{min-height:58px;display:flex;align-items:center;text-transform:uppercase;letter-spacing:.03em;color:#334155}
.row{background:#fff}
.row .left{background:#fff}
.day-gantt{background:#fff;border:1px solid #e2e8f0;border-radius:18px;overflow:auto;box-shadow:0 6px 18px rgba(15,23,42,.05)}
.day-header,.day-row{display:grid;grid-template-columns:220px 150px 190px 300px minmax(900px,1fr);border-bottom:1px solid #e2e8f0;min-width:1760px}
.day-header{font-weight:700;background:#f8fafc;color:#334155;text-transform:uppercase;letter-spacing:.03em;font-size:12px}
.day-header>div,.day-row>div{padding:12px;border-right:1px solid #e2e8f0;min-height:62px}
.day-row b{display:block}
.day-row small{display:block;color:#64748b;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.day-row.empty{background:#fff}
.day-timeline{position:relative;min-height:62px;background-image:linear-gradient(to right,#eef2f7 1px,transparent 1px);background-size:calc(100% / 16) 100%;padding:0!important}
.day-header .day-timeline span{position:absolute;top:16px;font-size:11px;color:#64748b;transform:translateX(-50%)}
.day-bar{position:absolute;top:21px;height:20px;border-radius:999px;background:#86efac;border:1px solid #22c55e;color:#14532d;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:2px 8px;font-size:11px;line-height:14px}
.day-bar small{display:inline;color:#14532d;margin:0}

/* v9: Mekaniker-dagsvisning på én linje pr. mekaniker */
.mechanic-one-line .day-header,
.mechanic-one-line .day-row{
    grid-template-columns:260px minmax(1400px,1fr);
    min-width:1700px;
}
.mechanic-one-line .day-row>div:first-child,
.mechanic-one-line .day-header>div:first-child{
    background:#fff;
}
.mechanic-one-line .mechanic-header>div:first-child{
    background:#f8fafc;
}
.mechanic-one-line .mechanic-row>div{
    min-height:68px;
}
.mechanic-one-line .mechanic-row .day-timeline{
    min-height:68px;
}
.mechanic-one-line .mechanic-bar{
    top:21px;
    height:26px;
    line-height:20px;
    padding:3px 10px;
    border-radius:8px;
    max-width:100%;
}
.mechanic-one-line .mechanic-bar small{
    font-size:12px;
    font-weight:700;
    color:#14532d;
}

/* v10: Dags-Gantt er skaleret til 04:00-20:00 for bredere og mere læsbare blokke */

/* v11: Åbne stemplinger vises gult */
.kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.legend .openstamp{background:#facc15}
.openstampbar{top:42px;background:#fde68a;border:1px solid #f59e0b;color:#713f12}
.day-bar.openbar,.mechanic-one-line .mechanic-bar.openbar{background:#fde68a;border-color:#f59e0b;color:#713f12}
.day-bar.openbar small,.mechanic-one-line .mechanic-bar.openbar small{color:#713f12}
