:root{
  --gold:#d5a441;
  --gold2:#f0d27a;
  --bg:#07090c;
  --panel:#12161b;
  --line:#2a3038;
  --muted:#aeb5bd;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:#fff;
  line-height:1.5;
}

a{
  color:inherit;
}

/* =========================
   BOVENBALK
========================= */

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:18px 4%;
  background:#0b0e12;
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:10;
}

.brand-mini{
  display:block;
  width:190px;
  flex:0 0 auto;
}

.brand-mini img{
  display:block;
  width:100%;
  height:auto;
}

nav{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
}

nav a{
  text-decoration:none;
  font-weight:700;
  color:#ddd;
}

nav a:hover{
  color:var(--gold2);
}

/* =========================
   ALGEMEEN
========================= */

.container{
  width:min(1180px,92%);
  margin:36px auto;
}

h1{
  font-size:36px;
}

h2,
h3{
  margin-top:0;
}

/* =========================
   DASHBOARD
========================= */

.stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
}

.stat{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
  padding:20px;
}

.stat span{
  display:block;
  color:var(--muted);
}

.stat strong{
  font-size:28px;
  color:var(--gold2);
}

.actions,
.headrow,
.invoice-actions{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin:24px 0;
}

/* =========================
   KNOPPEN
========================= */

.btn{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  background:linear-gradient(
    90deg,
    var(--gold2),
    var(--gold)
  );
  color:#111;
  border:0;
  border-radius:7px;
  padding:12px 17px;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
}

.btn:hover{
  filter:brightness(1.08);
}

.ghost{
  background:transparent;
  color:#fff;
  border:1px solid var(--gold);
}

/* =========================
   TABELLEN
========================= */

.table{
  overflow:auto;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:12px;
}

table{
  width:100%;
  border-collapse:collapse;
}

th,
td{
  padding:14px;
  border-bottom:1px solid var(--line);
  text-align:left;
}

.pill{
  padding:4px 8px;
  border:1px solid var(--gold);
  border-radius:999px;
  font-size:12px;
}

/* =========================
   FORMULIEREN
========================= */

.form,
.login-card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:14px;
  padding:24px;
}

.grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}

.wide{
  grid-column:1/-1;
}

label{
  font-weight:700;
}

input,
select,
textarea{
  width:100%;
  margin-top:6px;
  padding:12px;
  border:1px solid #3a424c;
  background:#0a0d11;
  color:#fff;
  border-radius:7px;
}

textarea{
  min-height:100px;
}

.alert{
  background:#4b2323;
  border:1px solid #7c3939;
  padding:12px;
  border-radius:7px;
  margin:12px 0;
}

.success{
  background:#153c22;
  border:1px solid #2f7b45;
  color:#eaffef;
  padding:12px 14px;
  border-radius:8px;
  margin:0 0 18px;
}

.login-card{
  max-width:480px;
  margin:70px auto;
}

.login-card label{
  display:block;
  margin:14px 0;
}

/* =========================
   FACTUUR
========================= */

.invoice{
  background:#fff;
  color:#111;
  padding:42px;
  max-width:900px;
  margin:0 auto;
  border-radius:8px;
}

.invoice-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
}

.invoice-brand{
  width:245px;
  max-width:55vw;
  background:#07090c;
  padding:12px 16px;
  border-radius:8px;
}

.invoice-brand img{
  display:block;
  width:220px;
  max-width:100%;
  height:auto;
}

.invoice-title{
  text-align:right;
}

.invoice-title h2{
  margin-bottom:5px;
  font-size:28px;
}

.cols{
  display:flex;
  justify-content:space-between;
  gap:24px;
  margin:35px 0;
}

.cols>div{
  width:50%;
}

.invoice p{
  overflow-wrap:anywhere;
}

.meta{
  display:flex;
  justify-content:space-between;
  gap:24px;
  padding:15px 0;
  border-top:1px solid #ddd;
  border-bottom:1px solid #ddd;
  flex-wrap:wrap;
}

.vehicle{
  margin:28px 0;
  background:#f4f4f4;
  padding:18px;
  border-radius:6px;
}

.vehicle-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
}

.vehicle-grid span{
  font-size:12px;
  color:#555;
}

.vehicle-grid b{
  display:block;
  color:#111;
  font-size:14px;
}

.invoice-table{
  margin:25px 0;
}

.invoice-table th,
.invoice-table td{
  border-color:#ddd;
}

.invoice-table th:last-child,
.invoice-table td:last-child{
  text-align:right;
  white-space:nowrap;
}

.totals{
  margin-left:auto;
  width:min(390px,100%);
}

.totals>div{
  display:flex;
  justify-content:space-between;
  padding:8px;
}

.totals .grand{
  font-size:21px;
  border-top:2px solid #111;
}

.margin-note{
  display:block !important;
  background:#f3ead3;
  font-weight:700;
  padding:10px !important;
}

.footnote{
  font-size:13px;
  color:#555;
  margin-top:24px;
}

/* =========================
   MOBIEL
========================= */

@media(max-width:800px){

  .stats{
    grid-template-columns:1fr 1fr;
  }

  .grid{
    grid-template-columns:1fr;
  }

  .wide{
    grid-column:auto;
  }

  .topbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .vehicle-grid{
    grid-template-columns:1fr 1fr;
  }

  .invoice{
    padding:22px;
  }

  .cols{
    flex-direction:column;
  }

  .cols>div{
    width:100%;
  }
}

@media(max-width:600px){

  .brand-mini{
    width:165px;
  }

  .invoice-brand{
    width:200px;
  }

  .invoice-top{
    gap:15px;
  }

  .invoice-title h2{
    font-size:22px;
  }
}

/* =========================
   PRINT / PDF
========================= */

@media print{

  body{
    background:#fff;
  }

  .topbar,
  .invoice-actions{
    display:none !important;
  }

  .container{
    width:100%;
    margin:0;
  }

  .invoice{
    box-shadow:none;
    border-radius:0;
    max-width:none;
  }

  .invoice-brand{
    width:230px;
    background:#07090c !important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }

  .invoice-brand img{
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }

  .margin-note{
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
}