
:root{
  --jau2-red:#b30000;
  --bg:#eef0f3;
  --panel:#ffffff;
  --line:#d8dce2;
  --text:#20242a;
  --muted:#69717d;
  --sidebar:#f8f9fb;
}
*{box-sizing:border-box}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
.topbar{height:92px;background:var(--jau2-red);color:#fff;display:flex;align-items:center;gap:22px;padding:12px 28px}
.logo-box{background:#fff;border-radius:8px;padding:4px 8px;display:flex;align-items:center}
.logo-box img{height:58px;width:auto;display:block}
.brand h1{margin:0;font-size:34px;line-height:1}
.brand div{margin-top:7px;font-size:18px}
.version{margin-left:auto;font-size:14px}
.layout{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 142px)}
.sidebar{background:var(--sidebar);border-right:1px solid var(--line);padding:18px 12px}
.menu-item{display:flex;align-items:center;gap:12px;padding:13px 14px;margin-bottom:6px;color:#2a2e35;text-decoration:none;border-radius:7px;font-weight:700}
.menu-item:hover{background:#eceff3}
.menu-item.active{background:#fff;border-left:5px solid var(--jau2-red);padding-left:9px;box-shadow:0 1px 4px rgba(0,0,0,.05)}
.icon{width:24px;text-align:center}
.workspace{padding:26px;max-width:1500px;width:100%}
.page-head{margin-bottom:18px}
.page-head h2{margin:0 0 6px;font-size:30px}
.page-head p{margin:0;color:var(--muted);font-size:16px}
.cards{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:18px}
.card{background:#fff;border:1px solid var(--line);border-radius:10px;padding:20px;box-shadow:0 2px 7px rgba(0,0,0,.05)}
.card h3{margin:0 0 8px;font-size:21px}
.card p{margin:0 0 16px;color:var(--muted);line-height:1.45}
.card a{display:inline-block;background:var(--jau2-red);color:#fff;text-decoration:none;padding:10px 15px;border-radius:6px;font-weight:700}
.workflow{display:grid;grid-template-columns:220px 1fr;gap:18px}
.steps{background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px}
.step{padding:12px 0;border-bottom:1px solid #eceef1}
.step:last-child{border-bottom:0}
.step strong{display:block;margin-bottom:3px}
.step small{color:var(--muted)}
.panel{background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 2px 8px rgba(0,0,0,.05);margin-bottom:18px}
.panel-head{padding:18px 22px;border-bottom:1px solid var(--line)}
.panel-head h3{margin:0 0 5px;font-size:23px}
.panel-head p{margin:0;color:var(--muted)}
.panel-body{padding:22px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.grid4{display:grid;grid-template-columns:1fr 1fr .7fr 1fr;gap:18px;margin-top:18px}
.grid3{display:grid;grid-template-columns:1.1fr 1.1fr 1fr;gap:18px}
.box{border:1px solid var(--line);border-radius:9px;padding:18px}
label{display:block;font-weight:700;margin-bottom:7px}
input[type=text],input[type=number]{width:100%;padding:11px 12px;border:1px solid #bcc3cc;border-radius:6px;font-size:16px}
.help{display:block;margin-top:6px;color:var(--muted);font-size:13px}
.checkbox{display:flex;gap:9px;align-items:flex-start;margin-top:12px}
.checkbox input{margin-top:3px}
.path{margin-top:12px;padding:10px 12px;background:#f6f7f8;border-radius:6px;font-family:Consolas,monospace;font-size:14px;word-break:break-all}
.settings{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px}
.actions{display:flex;justify-content:space-between;gap:12px;padding:18px 22px;border-top:1px solid var(--line)}
.btn{border:0;border-radius:7px;padding:13px 20px;font-size:16px;cursor:pointer}
.btn-primary{background:var(--jau2-red);color:#fff;font-weight:700}
.btn-secondary{background:#eceff2;color:#222}
.message{margin:18px 22px 0;padding:12px 14px;border-left:4px solid var(--jau2-red);background:#faf3f3;border-radius:6px}
.statusbar{height:50px;background:#fff;border-top:1px solid var(--line);display:flex;align-items:center;gap:26px;padding:0 28px;font-size:14px;color:var(--muted)}
.dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px}
.dot.ok{background:#2eaa52}
.dot.pending{background:#d6a11d}
.placeholder{padding:40px;text-align:center;color:var(--muted)}
@media(max-width:1000px){
  .layout{grid-template-columns:1fr}
  .sidebar{display:flex;overflow-x:auto;border-right:0;border-bottom:1px solid var(--line)}
  .menu-item{min-width:max-content}
  .cards,.grid2,.grid3,.grid4,.workflow,.settings{grid-template-columns:1fr}
}

.talkbox{background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px 20px;margin-bottom:18px;box-shadow:0 2px 7px rgba(0,0,0,.04)}
.talkbox h3{margin:0 0 12px;font-size:21px}
.talkline{display:flex;gap:10px;align-items:flex-start;padding:7px 0}
.talkline .mark{font-weight:700;min-width:20px}
.talkline.ok .mark{color:#2e9d4d}
.talkline.warn .mark{color:#cc8b00}
.talkline.bad .mark{color:#b30000}
.filetable{width:100%;border-collapse:collapse;margin-top:14px}
.filetable th,.filetable td{text-align:left;padding:9px 10px;border-bottom:1px solid #eceef1;font-size:14px}
.filetable th{background:#f7f8fa}
.filetable td:last-child,.filetable th:last-child{text-align:right}
.inline-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;background:#f0f2f5;font-size:12px;color:#505864}

.panel-head h3{
  font-size:19px;
  color:#b30000;
}
.page-head h2{
  font-size:25px;
  color:#b30000;
}
.thumb-frame{
  margin-top:20px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f7f8fa;
  padding:14px;
}
.thumb-frame h3{
  margin:0 0 12px;
  font-size:18px;
  color:#b30000;
}
.thumb-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(145px,1fr));
  gap:12px;
}
.thumb{
  background:#fff;
  border:1px solid #d9dde3;
  border-radius:8px;
  padding:8px;
}
.thumb img{
  display:block;
  width:100%;
  height:95px;
  object-fit:cover;
  border-radius:5px;
  background:#e9ebef;
}
.thumb-name{
  margin-top:7px;
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.thumb-size{
  margin-top:3px;
  font-size:11px;
  color:var(--muted);
}

/* v0.6: Browseren modtager nu en rigtig lille JPEG fra thumb.php. */
.thumb{
  min-width:0;
  overflow:hidden;
}
.thumb img{
  width:180px;
  max-width:100%;
  height:120px;
  object-fit:contain;
  margin:0 auto;
  background:#eceff3;
}

/* v0.8 – små billeder leveres nu af ImageMagick-motoren */
.thumb-grid{
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
}
.thumb{
  max-width:210px;
}
.thumb img{
  display:block;
  width:180px;
  max-width:100%;
  height:120px;
  object-fit:contain;
  margin:0 auto;
  background:#eceff3;
}

/* v0.9 */
input[readonly]{
  background:#f4f5f7;
  color:#4f5660;
}
.talkbox .talkline:last-child{
  margin-bottom:0;
}

/* Version 1.0 */
.completed-card .panel-head h3{color:#23843b}
.completed-card{border-left:5px solid #2eaa52}


/* ==========================================================
   MIT JAU2 1.2 – Kundeportal, mobile first
   ========================================================== */

.customer-body{
  margin:0;
  background:#f2f3f5;
  color:#20242a;
  font-family:Arial,Helvetica,sans-serif;
}

.customer-header{
  background:#b30000;
  color:#fff;
  padding:12px 16px;
}

.customer-header-inner{
  max-width:1100px;
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:12px;
}

.customer-logo{
  padding:3px 7px;
}
.customer-logo img{
  height:44px;
}
.customer-brand{
  font-size:24px;
  font-weight:700;
}
.customer-subtitle{
  font-size:14px;
  opacity:.92;
}

.customer-shell{
  width:min(100% - 24px, 1100px);
  margin:0 auto;
  padding:20px 0 36px;
}

.customer-welcome{
  padding:6px 2px 14px;
}
.customer-welcome h1{
  margin:0 0 7px;
  color:#b30000;
  font-size:28px;
}
.customer-welcome p{
  margin:0;
  line-height:1.5;
  color:#5f6874;
}

.customer-section > h2{
  color:#b30000;
  font-size:20px;
  margin:24px 2px 12px;
}

.customer-card{
  background:#fff;
  border:1px solid #d8dce2;
  border-radius:12px;
  padding:18px;
  margin-bottom:14px;
  box-shadow:0 2px 8px rgba(0,0,0,.05);
}

.customer-card h2,
.customer-card h3{
  margin-top:0;
}

.vehicle-summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.vehicle-summary h2{
  margin:4px 0;
  font-size:28px;
  color:#20242a;
}
.vehicle-summary p{
  margin:0;
  color:#68707c;
}

.customer-eyebrow{
  color:#b30000;
  font-size:13px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.repair-head{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.repair-head h3{
  margin:5px 0 0;
  font-size:21px;
}
.repair-count{
  align-self:flex-start;
  background:#f1f3f5;
  border-radius:999px;
  padding:5px 9px;
  font-size:13px;
  color:#555e69;
}

.gallery-details{
  margin-top:16px;
  border-top:1px solid #eceef1;
  padding-top:14px;
}
.gallery-details summary{
  cursor:pointer;
  color:#b30000;
  font-weight:700;
  font-size:17px;
  padding:3px 0 10px;
}

.customer-gallery{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.customer-photo{
  display:block;
  aspect-ratio:16/10;
  border-radius:8px;
  overflow:hidden;
  background:#e8eaee;
}
.customer-photo img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.customer-help{
  color:#717985;
  font-size:13px;
  line-height:1.45;
  margin:12px 0 0;
}

.customer-data-card h2{
  color:#b30000;
  font-size:20px;
}

.customer-data-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
}
.customer-data-grid div{
  border-bottom:1px solid #eceef1;
  padding-bottom:9px;
}
.customer-data-grid div:last-child{
  border-bottom:0;
}
.customer-data-grid span{
  display:block;
  color:#777f89;
  font-size:12px;
  margin-bottom:3px;
}
.customer-data-grid strong{
  font-size:15px;
  word-break:break-word;
}

.customer-logout{
  text-align:center;
  padding:12px 0;
}
.customer-logout a{
  color:#737b86;
  font-size:14px;
}

/* Tablet */
@media (min-width:600px){
  .customer-shell{
    width:min(100% - 40px, 1100px);
  }
  .customer-gallery{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
  }
  .repair-head{
    flex-direction:row;
    justify-content:space-between;
    align-items:flex-start;
  }
  .repair-count{
    align-self:auto;
  }
  .customer-data-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px 28px;
  }
}

/* Desktop */
@media (min-width:900px){
  .customer-header{
    padding:15px 24px;
  }
  .customer-logo img{
    height:52px;
  }
  .customer-brand{
    font-size:28px;
  }
  .customer-shell{
    padding-top:28px;
  }
  .customer-gallery{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:14px;
  }
  .customer-card{
    padding:22px;
  }
}


/* ==========================================================
   MIT JAU2 1.3
   ========================================================== */

textarea{
  width:100%;
  padding:11px 12px;
  border:1px solid #bcc3cc;
  border-radius:6px;
  font-size:16px;
  font-family:inherit;
  resize:vertical;
}

.repair-remarks{
  margin:12px 0 4px;
  font-size:16px;
  line-height:1.55;
  color:#343a42;
}

.rust-level{
  margin-top:14px;
  padding:12px 14px;
  border-radius:9px;
  background:#f5f6f7;
}

.rust-level-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-bottom:8px;
}

.rust-level-head strong{
  color:#b30000;
}

.rust-meter{
  display:grid;
  grid-template-columns:repeat(10,1fr);
  gap:3px;
}

.rust-meter span{
  height:8px;
  border-radius:999px;
  background:#dfe3e7;
}

.rust-meter span.on{
  background:#707780;
}

.public-note{
  margin-top:12px;
  font-size:12px;
  color:#777f89;
}


/* Kundeportal: registreringsnummer */
.registration-input{
  text-align:center;
  text-transform:uppercase;
  font-size:24px !important;
  font-weight:700;
  letter-spacing:2px;
}

/* ==========================================================
   Kundeportal login centreres
   ========================================================== */

.customer-login{
  max-width:520px;
  margin:40px auto;
}

.customer-login .customer-card{
  margin-bottom:0;
}

.customer-login input[type=text]{
  text-align:center;
  text-transform:uppercase;
  font-size:24px;
  font-weight:700;
  letter-spacing:2px;
}

.customer-login button{
  width:100%;
}

