.checkin-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 20px;
  align-items: start;
}
.checkin-card {
  padding: 22px;
}
.content-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.checkout-card {
  padding: 22px;
}
.mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 18px;
}
.mode-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.mode-option > i { color: var(--muted); font-size: 18px; }
.mode-option span { display: flex; flex-direction: column; gap: 3px; }
.mode-option small { color: var(--muted); }
.mode-option.active { border-color: var(--red); background: #fff7f8; box-shadow: 0 0 0 2px #ed1c2b12; }
.mode-option.active > i { color: var(--red); }
.checkout-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.checkout-fields[hidden] { display: none; }
.checkout-fields .full { grid-column: 1 / -1; }
.field-hint { align-self: flex-end; color: var(--muted); font-size: 11px; }
.required-mark { color: var(--red); }
.control.invalid,.rating.invalid { border-color: var(--red); box-shadow: 0 0 0 2px #ed1c2b18; }
.rating.invalid { border: 1px solid var(--red); border-radius: 7px; padding: 0 7px; }
.rating { display: flex; gap: 5px; min-height: 41px; align-items: center; }
.rating button { border: 0; background: transparent; color: #c6ccd6; padding: 4px; font-size: 21px; cursor: pointer; }
.rating button.active { color: #f2a900; }
.section-head {
  display: flex;
  gap: 13px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
}
.section-head h2 {
  margin: 0;
  font-size: 18px;
}
.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.head-icon,
.location-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #fdebed;
  color: var(--red);
}
.fields {
  padding-top: 18px;
}
.search-control {
  position: relative;
}
.search-control i {
  position: absolute;
  left: 13px;
  top: 13px;
  color: #8a94a6;
}
.search-control .control {
  padding-left: 38px;
}
.client-list {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-height: 420px;
  overflow: auto;
}
.client-option {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding: 13px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
}
.client-option:last-child {
  border-bottom: 0;
}
.client-option:hover,
.client-option.active {
  background: #f7f9fd;
}
.client-option.active {
  box-shadow: inset 3px 0 var(--red);
}
.client-option span:nth-child(2) {
  display: flex;
  flex-direction: column;
}
.client-option small {
  color: var(--muted);
  margin-top: 3px;
}
.company-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  background: #eef2f8;
  color: var(--navy);
}
.client-option > i {
  color: #9aa4b2;
}
.location-card,
.selected-card {
  padding: 22px;
  text-align: center;
  margin-bottom: 16px;
}
.location-card .location-icon {
  margin: 0 auto 12px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}
.location-card h2 {
  font-size: 17px;
  margin: 0;
}
.location-card p,
.muted {
  font-size: 13px;
  color: var(--muted);
}
.accuracy {
  font-size: 12px;
  background: #eaf7ee;
  color: #18783a;
  border-radius: 6px;
  padding: 8px;
}
.checkin-address {
  margin-top: 9px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
}
.map-credit { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.modal-open { overflow: hidden; }
.address-modal[hidden] { display: none; }
.address-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #071a467a;
  backdrop-filter: blur(2px);
}
.address-modal-card {
  width: min(610px, 100%);
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px #071a4655;
}
.address-modal-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 24px auto 0;
  border-radius: 50%;
  background: #fff3cd;
  color: #9a6500;
  font-size: 21px;
}
.address-modal-content { padding: 14px 24px 22px; text-align: center; }
.address-modal-content h2 { margin: 0; font-size: 21px; }
.address-modal-content > p { margin: 8px auto 18px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.address-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: left; }
.address-comparison article { padding: 13px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfc; }
.address-comparison article.divergent { border-color: #edb8bd; background: #fff7f8; }
.address-comparison span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.address-comparison strong { display: block; font-size: 12px; line-height: 1.45; word-break: break-word; }
.address-modal-content .address-modal-warning { margin: 14px 0 0; padding: 10px; border-radius: 7px; background: #fff8e5; color: #7b5700; font-weight: 600; }
.address-modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--border); background: #f8f9fb; }
.selected-card {
  text-align: left;
}
.selected-card h3 {
  margin: 0 0 15px;
}
.selected-card #resumo {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.selected-card #resumo span {
  color: var(--muted);
}
.checkin-button,
.cancel {
  width: 100%;
  margin-top: 18px;
}
.cancel {
  margin-top: 8px;
}
@media (max-width: 820px) {
  .checkin-layout {
    grid-template-columns: 1fr;
  }
  .client-list {
    max-height: 330px;
  }
}
@media (max-width: 540px) {
  .mode-options,
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-fields .full { grid-column: auto; }
  .address-comparison { grid-template-columns: 1fr; }
  .address-modal { align-items: end; padding: 0; }
  .address-modal-card { width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 16px 16px 0 0; }
  .address-modal-icon { width: 44px; height: 44px; margin-top: 18px; font-size: 18px; }
  .address-modal-content { padding: 12px 16px 18px; }
  .address-modal-content h2 { font-size: 18px; }
  .address-modal-actions { position: sticky; bottom: 0; flex-direction: column-reverse; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .address-modal-actions .button { width: 100%; }
}
