:root{
  --brand:#12335f;
  --brand-deep:#0d294d;
  --accent:#d71920;
  --bg:#f4f7fb;
  --line:#dbe3ed;
  --text:#172033;
  --muted:#667085;
}

html[data-brand="mb"]{
  --brand:#0b477d;
  --brand-deep:#08355e;
  --accent:#f28c28;
  --bg:#f5f8fb;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:Inter,Segoe UI,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.topbar{
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:14px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:sticky;
  top:0;
  z-index:3;
  box-shadow:0 3px 14px rgba(18,51,95,.06);
}

.brand-shell{
  display:flex;
  align-items:center;
  gap:14px;
}

.brand-logo{
  width:86px;
  height:48px;
  object-fit:contain;
  border-radius:8px;
  background:#fff;
}

.brand{
  font-size:19px;
  font-weight:800;
  color:var(--brand);
}

.sub{
  font-size:12px;
  color:var(--muted);
  margin-top:3px;
}

nav{
  display:flex;
  gap:12px;
  align-items:center;
}

nav a,.linkbtn{
  font:inherit;
  color:var(--brand);
  text-decoration:none;
  background:none;
  border:0;
  padding:8px;
  cursor:pointer;
  font-weight:700;
}

.wrap{
  max-width:840px;
  margin:0 auto;
  padding:24px 16px 48px;
}

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:24px;
  box-shadow:0 12px 36px rgba(18,51,95,.08);
}

.narrow{
  max-width:500px;
  margin:7vh auto 0;
}

.eyebrow{
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  color:var(--accent);
  margin:0 0 8px;
}

h1{
  color:var(--brand);
  margin:0 0 8px;
  font-size:28px;
}

.muted,.small-muted{
  color:var(--muted);
}

.small-muted{
  font-size:12px;
  margin-top:2px;
}

.stack{
  display:grid;
  gap:16px;
  margin-top:20px;
}

label,.field-label{
  display:grid;
  gap:7px;
  font-size:13px;
  font-weight:700;
  color:#344054;
}

input,select,textarea{
  width:100%;
  font:inherit;
  font-weight:400;
  border:1px solid #ccd6e2;
  border-radius:10px;
  padding:12px;
  background:#fff;
  color:#111827;
}

input:focus,select:focus,textarea:focus{
  outline:none;
  border-color:var(--brand);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 10%,transparent);
}

textarea{resize:vertical}

.primary{
  background:var(--brand);
  color:#fff;
  border:0;
  border-radius:11px;
  padding:14px 18px;
  font:inherit;
  font-weight:800;
  cursor:pointer;
  min-height:48px;
}

.primary:active{transform:translateY(1px)}

.success,.error{
  border-radius:10px;
  padding:12px 14px;
  margin-top:16px;
}

.success{
  background:#ecfdf3;
  color:#067647;
}

.error{
  background:#fef3f2;
  color:#b42318;
}

.brand-picker{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:8px;
}

.brand-choice{
  min-height:94px;
  background:#fff;
  border:2px solid #d9e2ec;
  border-radius:14px;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  font:inherit;
  font-weight:800;
  color:#344054;
  cursor:pointer;
  transition:.15s ease;
}

.brand-choice img{
  max-width:118px;
  max-height:52px;
  object-fit:contain;
}

.brand-choice:hover{
  border-color:var(--brand);
  transform:translateY(-1px);
}

.brand-choice.active{
  border-color:var(--brand);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 10%,transparent);
  color:var(--brand);
}

.login-brand-picker{
  margin:20px 0 6px;
}

.report-list{
  display:grid;
  gap:12px;
  margin-top:18px;
}

.report{
  border:1px solid var(--line);
  border-radius:12px;
  padding:15px;
}

.report-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--brand);
}

.report-brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.report-brand img{
  width:72px;
  height:38px;
  object-fit:contain;
  background:#fff;
  border-radius:7px;
}

.pill{
  background:#eef3f8;
  border-radius:999px;
  padding:4px 8px;
  font-size:11px;
  text-transform:uppercase;
  height:max-content;
}

@media(max-width:600px){
  .topbar{
    align-items:flex-start;
    gap:12px;
  }

  .brand-logo{
    width:70px;
    height:42px;
  }

  .brand{
    font-size:16px;
  }

  .topbar nav{
    gap:4px;
    flex-direction:column;
    align-items:flex-end;
  }

  .wrap{
    padding-top:16px;
  }

  .card{
    padding:19px;
    border-radius:14px;
  }

  h1{
    font-size:24px;
  }

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

  .brand-choice{
    min-height:78px;
  }
}


.section-label{
  margin:8px 0 -3px;
  color:var(--accent);
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
}

.two-col{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

@media(max-width:600px){
  .two-col{grid-template-columns:1fr;}
}


.visit-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin:4px 0 8px;
}

.arrive-button,.leave-button{
  border:0;
  border-radius:12px;
  padding:15px 12px;
  min-height:52px;
  font:inherit;
  font-weight:900;
  cursor:pointer;
}

.arrive-button{
  background:#0f8a4b;
  color:#fff;
}

.leave-button{
  background:#d71920;
  color:#fff;
}

.arrival-alert,.leave-alert{
  border-radius:12px;
  padding:13px 15px;
  margin-top:16px;
  font-weight:800;
}

.arrival-alert{
  background:#ecfdf3;
  color:#067647;
  border:1px solid #abefc6;
}

.leave-alert{
  background:#fef3f2;
  color:#b42318;
  border:1px solid #fecdca;
}

@media(max-width:600px){
  .visit-actions{grid-template-columns:1fr;}
}

.brand-choice[data-brand-choice="mb"] img{
  max-width:150px;
  max-height:66px;
}

html[data-brand="mb"] .brand-logo{
  width:140px;
  height:72px;
}
