:root {
  --ink: #09162f;
  --muted: #66748f;
  --line: #dbe5f4;
  --paper: #f4f8ff;
  --soft: #eef5ff;
  --blue: #087af2;
  --blue-dark: #0d1697;
  --blue-deep: #06126d;
  --orange: #ff7a18;
  --orange-dark: #e15f00;
  --green: #078557;
  --danger: #d8123b;
  --amber: #b86b00;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
  background: var(--paper);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
svg { flex: 0 0 auto; }

.site-header + main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

body:has(.admin-shell) .site-header + main {
  width: min(1500px, calc(100% - 40px));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px min(5vw, 56px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: var(--blue-deep);
  color: white;
  box-shadow: 0 8px 22px rgba(6, 18, 109, .18);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--blue-deep);
  border-radius: 50%;
  background: white;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .16);
}
.brand-mark svg {
  width: 21px;
  height: 21px;
  stroke-width: 3;
}
.brand strong {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  color: white;
  font-size: 19px;
  line-height: 1;
  letter-spacing: 0;
}
.brand strong span {
  font-size: .95em;
  font-style: italic;
  font-weight: 800;
}
.brand strong small {
  align-self: flex-end;
  margin-left: 1px;
  color: rgba(255, 255, 255, .86);
  font-size: 10px;
  font-weight: 800;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, .86);
  font-size: 15px;
  font-weight: 700;
}
.site-header nav a:hover { color: var(--orange); }

.hero {
  width: 100vw;
  min-height: 550px;
  margin-left: calc(50% - 50vw);
  display: grid;
  place-items: center;
  padding: 72px max(18px, calc((100vw - 1180px) / 2)) 54px;
  text-align: center;
  color: white;
  background:
    linear-gradient(90deg, rgba(5, 19, 130, .94), rgba(16, 46, 162, .84)),
    url("https://thuevietmap.com/wp-content/uploads/2025/12/canh-bao-toc-do.jpg") center/cover;
}

.hero-panel { display: none; }

.trust-pill, .checkout-kicker, .section-head span, .why-copy span, .admin-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid rgba(255, 122, 24, .55);
  border-radius: 999px;
  color: var(--orange);
  background: rgba(255, 122, 24, .08);
  font-size: 13px;
  font-weight: 800;
}
.hero .trust-pill { margin: 0 auto; background: rgba(6, 18, 109, .35); }

.hero h1 {
  max-width: 980px;
  margin: 18px auto 18px;
  font-size: clamp(42px, 5.2vw, 76px);
  line-height: .98;
  letter-spacing: 0;
}
.hero-actions svg, .checkout-button svg {
  width: 18px;
  height: 18px;
}
.hero-title-line {
  display: block;
  white-space: nowrap;
}
.hero-title-accent {
  display: inline;
  color: var(--orange);
  font-size: 1.12em;
  text-transform: uppercase;
}
.hero p {
  max-width: 860px;
  margin: 0 auto;
  color: rgba(255, 255, 255, .92);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 600;
}
.checkout-main p, .why-copy p { max-width: 620px; color: var(--muted); font-size: 18px; line-height: 1.65; }

.hero-actions, .checkout-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero-actions a {
  gap: 10px;
}
.hero-actions a svg {
  width: 17px;
  height: 17px;
  margin-right: 2px;
  stroke-width: 2.4;
}
.btn-primary, .btn-ghost, .checkout-button, .rent-button, .admin-row button, .transaction-table button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 900;
}
.btn-primary, .checkout-button { color: white; background: linear-gradient(135deg, var(--orange), var(--orange-dark)); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .22); color: white; }
.btn-ghost.dark { background: var(--ink); color: white; }

.alert-error {
  margin: 12px 0 22px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 122, 24, .28);
  border-radius: 8px;
  color: var(--orange-dark);
  background: rgba(255, 122, 24, .09);
}
.alert-error.soft { margin-top: 0; }

.account-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  color: white;
}

.error-shell {
  width: min(760px, calc(100% - 32px));
  margin: 56px auto 96px;
  display: grid;
  gap: 16px;
}
.error-shell > span {
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 122, 24, .42);
  border-radius: 999px;
  color: var(--orange-dark);
  font-weight: 900;
  background: rgba(255, 122, 24, .08);
}
.error-shell h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.04; }
.error-shell p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.error-shell small { color: var(--muted); font-weight: 700; }
.error-shell .btn-primary { width: fit-content; margin-top: 10px; }
.account-strip div { display: grid; gap: 4px; }
.account-strip span { color: rgba(255, 255, 255, .68); }
.account-strip a { color: #fff1df; font-weight: 900; }

.rental-section, .why-grid, .checkout-layout, .admin-shell, .account-page { padding: 34px 0 42px; }
.section-head, .admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
h2, .admin-head h1, .checkout-main h1 {
  margin: 12px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}
.payment-state { padding: 8px 12px; border-radius: 999px; font-weight: 900; font-size: 13px; }
.payment-state.ready { color: var(--green); background: rgba(7, 133, 87, .1); }

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 22px 60px rgba(8, 122, 242, .08);
}
.rental-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
  line-height: 1.35;
}
.rental-table th, .rental-table td {
  height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.rental-table th {
  color: white;
  height: 44px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--blue);
}
.rental-table th:nth-child(1), .rental-table td:nth-child(1) { width: 76px; text-align: center; }
.rental-table th:nth-child(2), .rental-table td:nth-child(2) { width: 190px; }
.rental-table th:nth-child(3), .rental-table td:nth-child(3) { width: 150px; text-align: center; }
.rental-table th:nth-child(4), .rental-table td:nth-child(4) { width: 210px; }
.rental-table th:nth-child(5), .rental-table td:nth-child(5) { width: 150px; }
.rental-table th:nth-child(6), .rental-table td:nth-child(6) { width: 190px; }
.rental-table tr:last-child td { border-bottom: 0; }
.rental-table tbody tr:hover { background: #f8fbff; }
.rental-table tr.mine { background: rgba(7, 133, 87, .08); }
.rental-table td:first-child,
.rental-table td:nth-child(6) {
  font-variant-numeric: tabular-nums;
}
.countdown-cell {
  display: inline-block;
  min-width: 116px;
  font-variant-numeric: tabular-nums;
}
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  letter-spacing: 0;
  color: #243653;
}
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}
.status.busy { color: #b81235; background: rgba(216, 18, 59, .1); }
.status.available { color: var(--green); background: rgba(7, 133, 87, .1); }
.status.disabled { color: #6f5b00; background: #fff3c2; }
.rent-button {
  height: 30px;
  min-height: 30px;
  gap: 7px;
  padding: 0 14px;
  color: #057348;
  background: rgba(7, 133, 87, .12);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}
.rent-status-button {
  position: relative;
  overflow: hidden;
  min-width: 92px;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(7, 133, 87, .24), 0 8px 18px rgba(7, 133, 87, .1);
  animation: ready-pulse 1.65s ease-in-out infinite;
  transition: transform .18s ease, color .18s ease, background-color .18s ease, box-shadow .18s ease;
}
.rent-status-button::after {
  content: "";
  position: absolute;
  inset: -55% auto -55% -80%;
  width: 58%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent);
  animation: ready-shine 1.45s ease-in-out infinite;
  pointer-events: none;
}
.rent-status-button:hover {
  color: white;
  background: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(7, 133, 87, .22);
}
.rent-status-button:hover::after {
  animation-duration: .9s;
}
.your-badge { font-size: 12px; font-weight: 900; color: var(--green); }

@keyframes ready-shine {
  0% { left: -80%; }
  58%, 100% { left: 128%; }
}

@keyframes ready-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(7, 133, 87, .24), 0 8px 18px rgba(7, 133, 87, .1);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(7, 133, 87, .08), 0 10px 22px rgba(7, 133, 87, .16);
  }
}

.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0 34px; }
.plan-tile {
  min-height: 124px;
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.plan-tile span { display: inline-flex; align-items: center; gap: 7px; color: var(--blue); font-weight: 900; }
.plan-tile svg { width: 18px; height: 18px; }
.plan-tile strong { font-size: 26px; }
.plan-tile small { color: var(--muted); }

.feature-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 20px 0 36px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature-band div { padding: 24px; background: white; }
.feature-band span, .why-items b { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 900; }
.feature-band svg, .why-items svg { width: 18px; height: 18px; color: var(--blue); stroke-width: 2.2; }
.feature-band p, .why-items p { color: var(--muted); line-height: 1.55; }

.why-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; }
.why-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.why-items article { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: white; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 10, 35, .62);
}
.modal-backdrop[hidden] { display: none !important; }
.rent-modal {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 16px;
  padding: 26px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .32);
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--soft);
  cursor: pointer;
  font-size: 22px;
}
.modal-close:disabled {
  cursor: wait;
  opacity: .5;
}
.rent-modal.submitting {
  cursor: wait;
}
.rent-modal > span { color: var(--blue); font-weight: 900; }
.rent-modal h3 { margin: 0; font-size: 28px; }
.modal-plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.modal-plan { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: white; text-align: left; cursor: pointer; }
.modal-plan:disabled {
  cursor: wait;
  opacity: .72;
}
.modal-plan.selected { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.field, .admin-form label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 700; }
.field input, .admin-form input, .admin-row input, .admin-login input {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
.field small { color: var(--muted); font-weight: 500; }
.field.invalid input { border-color: var(--danger); }
.field.invalid input:focus { outline-color: rgba(216, 18, 59, .24); }
.field-error {
  display: flex;
  align-items: center;
  min-height: 18px;
  color: var(--danger) !important;
  font-size: 13px;
  font-weight: 800 !important;
}
.field-error[hidden] { display: none; }
.checkout-button:disabled {
  cursor: wait;
  opacity: .88;
}
.checkout-button-label,
.checkout-button-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.checkout-button-label[hidden],
.checkout-button-loading[hidden],
.payment-sync-label[hidden],
.payment-sync-loading[hidden] {
  display: none !important;
}
.button-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .48);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.checkout-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; min-height: 640px; }
.checkout-main, .checkout-side, .admin-login, .admin-form, .admin-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.checkout-main { padding: 34px; }
.back-link { display: inline-block; margin-bottom: 22px; color: var(--muted); font-weight: 900; }
.qr-panel { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin-top: 24px; }
.qr-panel img { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: white; }
.payment-facts { display: grid; gap: 12px; min-width: 260px; }
.payment-facts div, .credential-box div { display: grid; gap: 5px; padding: 16px; border-radius: 8px; background: var(--soft); }
.payment-facts span, .credential-box span, .checkout-side span { color: var(--muted); font-size: 13px; font-weight: 900; }
.payment-facts strong, .credential-box strong { word-break: break-word; }
.credential-box { display: grid; gap: 12px; margin-top: 26px; }
.payment-sync-message {
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 106, 31, .32);
  border-radius: 8px;
  background: #fff4ed;
}
.payment-sync-message strong { color: var(--ink); }
.payment-sync-message a { color: var(--orange-dark); font-weight: 900; }
.payment-sync-form {
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px auto 0;
}
.payment-sync-form .btn-primary,
.payment-sync-form .btn-ghost {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 8px;
  white-space: nowrap;
}
.payment-sync-form button:disabled {
  cursor: wait;
  opacity: .88;
}
.payment-sync-label,
.payment-sync-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.checkout-side { padding: 22px; position: sticky; top: 86px; }
.checkout-side strong { display: block; margin: 8px 0 14px; font-size: 32px; }
.checkout-side p { color: var(--muted); }
.admin-shell { min-height: 620px; }
.admin-login { max-width: 420px; padding: 22px; display: grid; gap: 14px; }
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.admin-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  font-weight: 900;
}
.admin-tabs a.active {
  color: white;
  border-color: var(--blue);
  background: var(--blue);
  box-shadow: 0 12px 26px rgba(8, 122, 242, .18);
}
.admin-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  margin-bottom: 18px;
}
.check-row { display: flex !important; align-items: center; gap: 8px; color: var(--ink) !important; }
.check-row input { width: 18px; min-height: 18px; }
.admin-list { display: grid; gap: 10px; }
.admin-row {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(220px, 1.15fr) minmax(170px, .9fr) minmax(160px, .75fr) minmax(190px, .9fr) minmax(260px, 1.25fr) auto auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}
.admin-row button { min-height: 40px; border: 0; background: var(--ink); color: white; }
.admin-row button.warning, .transaction-table button.warning { background: var(--amber); }
.admin-row button.danger { background: var(--danger); }
.validity-editor {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.validity-editor div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.validity-editor input {
  min-height: 39px;
  border: 0 !important;
  border-radius: 0 !important;
  padding-right: 6px !important;
}
.validity-editor em {
  padding: 0 12px 0 6px;
  color: var(--ink);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0;
}
.admin-rental-state {
  display: grid;
  gap: 5px;
  min-width: 190px;
}
.admin-rental-state strong {
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.admin-rental-state small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.transaction-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 46px rgba(8, 122, 242, .07);
}
.transaction-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}
.transaction-table th,
.transaction-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.transaction-table th {
  color: white;
  background: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.transaction-table td:nth-child(1) { width: 154px; }
.transaction-table td:nth-child(4) { width: 210px; }
.transaction-table td:nth-child(8) { width: 128px; }
.transaction-table td:nth-child(9) {
  display: flex;
  gap: 8px;
  width: 170px;
}
.transaction-table td strong,
.transaction-table td small {
  display: block;
}
.transaction-table td small,
.admin-muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.transaction-table button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 0;
  color: white;
  background: var(--ink);
  font-size: 12px;
}
.transaction-table button.danger { background: var(--danger); }
.transaction-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 104px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.transaction-status.paid { color: #057348; background: rgba(7, 133, 87, .12); }
.transaction-status.available { color: var(--green); background: rgba(7, 133, 87, .1); }
.transaction-status.pending { color: var(--amber); background: rgba(184, 107, 0, .11); }
.transaction-status.completed { color: var(--muted); background: var(--soft); }
.transaction-status.cancelled { color: var(--muted); background: var(--soft); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 54px;
  padding: 28px min(5vw, 56px);
  color: rgba(255, 255, 255, .78);
  background: var(--blue-deep);
}
.site-footer div { display: grid; gap: 6px; }
.site-footer strong { color: white; }

.account-page {
  min-height: 620px;
}
.account-page-head {
  max-width: 680px;
  margin-bottom: 22px;
}
.account-page-head span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(8, 122, 242, .18);
  border-radius: 999px;
  color: var(--blue);
  background: rgba(8, 122, 242, .08);
  font-size: 13px;
  font-weight: 800;
}
.account-page-head svg { width: 17px; height: 17px; }
.account-page-head h1 {
  margin: 14px 0 8px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}
.account-page-head p {
  color: var(--muted);
  line-height: 1.65;
}
.empty-state, .history-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 18px 46px rgba(8, 122, 242, .07);
}
.empty-state {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 28px;
}
.empty-state svg {
  width: 34px;
  height: 34px;
  color: var(--blue);
}
.empty-state h2 { margin: 0; font-size: 28px; }
.empty-state p { margin: 0 0 8px; color: var(--muted); }
.history-list {
  display: grid;
  gap: 14px;
}
.history-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}
.history-card.active {
  border-color: rgba(7, 133, 87, .28);
  background: linear-gradient(180deg, rgba(7, 133, 87, .06), white 42%);
}
.history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.history-card-head div {
  display: grid;
  gap: 4px;
}
.history-card-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.history-card-head strong {
  font-size: 20px;
}
.history-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}
.history-status.ok { color: #057348; background: rgba(7, 133, 87, .12); }
.history-status.wait { color: var(--amber); background: rgba(184, 107, 0, .11); }
.history-status.off { color: var(--muted); background: var(--soft); }
.history-credentials {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
}
.history-credentials div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}
.history-credentials span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.history-credentials strong {
  word-break: break-word;
}
.history-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.history-pending a {
  color: var(--blue);
  font-weight: 900;
}
.history-muted {
  margin: 0;
  color: var(--muted);
}

.rent-proof-toast {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 45;
  width: min(320px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 34px 14px 16px;
  border: 1px solid rgba(219, 229, 244, .95);
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 48px rgba(9, 22, 47, .16);
  backdrop-filter: blur(12px);
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.rent-proof-toast.show {
  animation: proof-bounce-in .56s cubic-bezier(.2, 1.22, .36, 1) forwards;
  pointer-events: auto;
}
.rent-proof-toast.hide {
  animation: proof-drop-out .28s ease forwards;
}
.rent-proof-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #19c178, #079760);
  font-size: 22px;
  font-weight: 900;
}
.rent-proof-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.rent-proof-content strong,
.rent-proof-content b,
.rent-proof-content small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rent-proof-content strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.15;
}
.rent-proof-content strong span:last-child {
  color: var(--muted);
  font-weight: 800;
}
.rent-proof-content b {
  color: var(--green);
  font-size: 14px;
  line-height: 1.15;
}
.rent-proof-content small {
  color: #8a97ad;
  font-size: 12px;
  font-weight: 700;
}
.rent-proof-content em {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(7, 133, 87, .1);
  font-style: normal;
  font-weight: 900;
}
.rent-proof-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  color: #8a97ad;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

@keyframes proof-bounce-in {
  0% { transform: translateY(120%) scale(.96); opacity: 0; }
  70% { transform: translateY(-8px) scale(1); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes proof-drop-out {
  to { transform: translateY(120%) scale(.98); opacity: 0; }
}

@media (max-width: 900px) {
  .site-header { align-items: flex-start; gap: 12px; flex-direction: column; }
  .site-header nav { flex-wrap: wrap; gap: 12px; }
  .hero, .why-grid, .checkout-layout { grid-template-columns: 1fr; }
  .hero { min-height: 520px; padding-top: 56px; }
  .plans, .feature-band, .why-items { grid-template-columns: 1fr; }
  .admin-form, .admin-row { grid-template-columns: 1fr; }
  .checkout-side { position: static; }
  .rental-table { min-width: 720px; font-size: 14px; }
  .rental-table th, .rental-table td { height: 54px; padding: 0 14px; }
  .history-credentials { grid-template-columns: 1fr; }
  .history-card-head, .history-pending { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .site-header + main { width: min(100% - 22px, 1180px); }
  .site-header { position: static; }
  .site-header nav { font-size: 13px; }
  .hero { min-height: 500px; padding: 42px 18px; }
  .hero h1 { font-size: 38px; }
  .hero-title-line { white-space: normal; }
  .hero p { font-size: 15px; }
  .hero-actions { justify-content: center; }
  .btn-primary, .btn-ghost { width: 100%; }
  .modal-plans { grid-template-columns: 1fr; }
  .section-head, .admin-head, .account-strip, .site-footer { align-items: flex-start; flex-direction: column; }
  .checkout-main { padding: 22px; }
  .rent-modal { max-height: calc(100vh - 28px); overflow: auto; padding: 22px; }
  .rent-proof-toast {
    left: 11px;
    bottom: 11px;
    width: calc(100vw - 22px);
  }
}
