.portal-page {
  min-height: 100vh;
  background: #f7f8f5;
  color: #17221a;
}

.is-hidden { display: none !important; }

.portal-page .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #e3e8df;
  backdrop-filter: blur(12px);
}

.portal-nav-actions,
.portal-section-heading,
.portal-welcome,
.table-card-heading,
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-nav-actions a { color: #33453a; font-weight: 600; }
.button-small { padding: .65rem 1rem; font-size: .88rem; }
.button-full { width: 100%; }
.button-outline { border: 1px solid #1f7444; background: #fff; color: #1f7444; }
.button-outline:hover { background: #edf6f0; color: #175c35; }

.portal-login {
  padding: 5.5rem 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(243, 115, 32, .12), transparent 28rem),
    radial-gradient(circle at 88% 70%, rgba(31, 116, 68, .11), transparent 30rem),
    #f8faf7;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .75fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.login-copy h1,
.portal-welcome h1 {
  max-width: 760px;
  margin: .5rem 0 1rem;
  font-size: clamp(2.15rem, 5vw, 4.2rem);
  line-height: 1.08;
}

.login-copy > p { max-width: 650px; font-size: 1.08rem; color: #58645c; }
.eyebrow { color: #e86717; font-size: .78rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

.portal-trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.8rem;
}

.portal-trust-list span,
.status-pill {
  padding: .5rem .78rem;
  border: 1px solid #d9e3d9;
  border-radius: 999px;
  background: #fff;
  color: #36513e;
  font-size: .82rem;
  font-weight: 600;
}

.login-card,
.search-panel,
.portal-table-card,
.host-notice,
.car-card,
.host-car-card {
  border: 1px solid #e0e6dd;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(30, 55, 37, .08);
}

.login-card { padding: clamp(1.5rem, 4vw, 2.5rem); }
.login-card h2 { margin: .35rem 0 .4rem; }
.login-card p { color: #69726c; font-size: .9rem; }
.login-card label, .portal-field label, .portal-location-field label { display: block; margin-bottom: .45rem; font-size: .86rem; font-weight: 600; }
.login-card input, .portal-field input, .portal-field select, .otp-input {
  width: 100%;
  min-height: 48px;
  padding: .75rem .9rem;
  border: 1px solid #cad4ca;
  border-radius: 10px;
  background: #fff;
  color: #16231a;
  font: inherit;
}

.login-card input:focus, .portal-field input:focus, .portal-field select:focus {
  border-color: #237447;
  outline: 3px solid rgba(35, 116, 71, .12);
}

.phone-input { display: flex; align-items: center; margin-bottom: 1rem; border: 1px solid #cad4ca; border-radius: 10px; overflow: hidden; }
.phone-input span { padding: 0 .85rem; color: #4f5e54; font-weight: 600; }
.phone-input input { border: 0; border-left: 1px solid #e1e5e1; border-radius: 0; }
.otp-input { margin-bottom: 1rem; font-size: 1.4rem !important; letter-spacing: .45em; text-align: center; }
.step-label { color: #237447; font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.text-button { border: 0; background: none; color: #237447; font: inherit; font-weight: 600; cursor: pointer; }
.login-card .text-button { margin-top: 1rem; }
.login-privacy { margin: 1.25rem 0 0; text-align: center; }

.portal-status { min-height: 1.35rem; margin-top: .8rem; color: #506057; font-size: .88rem; }
.portal-status.is-error { color: #a62c23; }
.portal-status.is-success { color: #1f7444; }

.portal-app { min-height: calc(100vh - 80px); padding: 3rem 0 5rem; }
.portal-welcome { align-items: flex-end; margin-bottom: 2.5rem; }
.portal-welcome h1 { margin-bottom: .25rem; font-size: clamp(2rem, 4vw, 3.25rem); }
.portal-welcome p, .portal-section-heading p { margin: 0; color: #637068; }
.portal-account { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.portal-account-copy { min-width: 0; }
.customer-avatar { position: relative; display: grid; flex: 0 0 76px; width: 76px; height: 96px; place-items: center; overflow: hidden; border: 3px solid #fff; border-radius: 10px; background: linear-gradient(145deg, #e86717, #1f7444); color: #fff; box-shadow: 0 8px 24px rgba(30, 55, 37, .16); font-size: 1.35rem; font-weight: 700; letter-spacing: .04em; }
.customer-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.account-details { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .75rem; }
.kyc-status { display: inline-flex; align-items: center; gap: .38rem; padding: .38rem .7rem; border: 1px solid #e0c889; border-radius: 999px; background: #fff8df; color: #775b0c; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.kyc-status::before { width: .48rem; height: .48rem; border-radius: 50%; background: currentColor; content: ''; }
.kyc-status.is-verified { border-color: #b8dbc5; background: #edf8f1; color: #1f7444; }
.kyc-status.is-review { border-color: #c7d8e8; background: #eff6fc; color: #315f83; }
.kyc-status.is-action-required { border-color: #ecc5c0; background: #fff1ef; color: #a62c23; }
.credit-balance { display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .7rem; border: 1px solid #f0c9ae; border-radius: 999px; background: #fff4eb; color: #75401e; font-size: .76rem; white-space: nowrap; }
.credit-balance strong { color: #d65f16; font-size: .8rem; }

.role-tabs { display: flex; padding: .3rem; border: 1px solid #dce3da; border-radius: 12px; background: #fff; }
.role-tabs button { padding: .75rem 1rem; border: 0; border-radius: 9px; background: transparent; color: #405047; font: inherit; font-weight: 600; cursor: pointer; }
.role-tabs button.is-active { background: #1f7444; color: #fff; }
.portal-section-heading { align-items: flex-end; margin-bottom: 1.25rem; }
.portal-section-heading h2 { margin: .2rem 0; }

.search-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
  box-shadow: 0 8px 30px rgba(30, 55, 37, .06);
}

.trip-date-picker { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.trip-date-card { min-width: 0; margin: 0; padding: 1rem; border: 1px solid #dce3da; border-radius: 14px; background: #fbfcfa; }
.trip-date-card legend { display: flex; align-items: center; gap: .55rem; padding: 0 .35rem; }
.trip-date-card legend span { padding: .25rem .5rem; border-radius: 999px; background: #e9f5ed; color: #1f7444; font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.trip-date-card legend strong { font-size: .9rem; }
.trip-date-controls { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(110px, .75fr); gap: .7rem; }
.trip-date-controls label { display: block; margin-bottom: .35rem; color: #5c685f; font-size: .74rem; font-weight: 600; }
.trip-date-controls input, .trip-date-controls select { width: 100%; min-height: 48px; padding: .65rem .75rem; border: 1px solid #cad4ca; border-radius: 10px; background: #fff; color: #16231a; font: inherit; }
.trip-date-controls input:focus, .trip-date-controls select:focus { border-color: #237447; outline: 3px solid rgba(35, 116, 71, .12); }
.trip-duration-options { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.trip-duration-options > span { margin-right: .2rem; color: #536158; font-size: .78rem; font-weight: 700; }
.trip-duration-options button { padding: .5rem .75rem; border: 1px solid #cad7ca; border-radius: 999px; background: #fff; color: #36513e; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.trip-duration-options button:hover, .trip-duration-options button:focus-visible, .trip-duration-options button.is-active { border-color: #1f7444; background: #edf8f1; color: #1f7444; outline: none; }
.trip-date-summary { grid-column: 1 / -1; min-height: 2.5rem; padding: .65rem .85rem; border-radius: 10px; background: #f1f6f2; color: #405047; font-size: .82rem; font-weight: 600; }
.delivery-search-choice { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: .75rem; padding: 1rem; border: 1px solid #f0c9ae; border-radius: 12px; background: #fff8f2; cursor: pointer; }
.delivery-search-choice input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: #1f7444; }
.delivery-search-choice span { display: grid; gap: .18rem; }
.delivery-search-choice strong { color: #28372d; font-size: .88rem; }
.delivery-search-choice small { color: #667168; font-size: .76rem; }
.delivery-search-choice:has(input:checked) { border-color: #1f7444; background: #edf8f1; }
.portal-location-field { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-radius: 12px; background: #f3f7f2; }
.portal-location-field p { margin: 0; color: #607065; font-size: .82rem; }
.search-panel > .button { grid-column: 1 / -1; align-self: end; min-height: 48px; }

.car-results, .host-car-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.car-card, .host-car-card { overflow: hidden; box-shadow: 0 8px 30px rgba(30, 55, 37, .06); }
.car-card img, .host-car-card img { width: 100%; height: 190px; object-fit: contain; padding: .8rem; background: #f1f4f0; }
.car-card-body, .host-car-body { padding: 1.15rem; }
.car-card-title { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.car-card h3, .host-car-card h3 { margin: 0; font-size: 1.12rem; }
.car-meta { display: flex; flex-wrap: wrap; gap: .45rem .8rem; margin: .65rem 0; color: #657269; font-size: .82rem; }
.car-price { margin: .8rem 0; color: #1c2b21; font-size: 1.3rem; font-weight: 700; }
.car-price small { color: #68736c; font-size: .75rem; font-weight: 500; }
.price-breakdown { display: grid; gap: .35rem; margin: .9rem 0; padding: .8rem; border-radius: 10px; background: #f5f7f4; font-size: .82rem; }
.price-breakdown div { display: flex; justify-content: space-between; gap: 1rem; }
.price-breakdown .total { padding-top: .4rem; border-top: 1px solid #dce3dc; font-weight: 700; }

.host-notice { display: flex; gap: 1rem; margin-bottom: 1rem; padding: 1rem 1.2rem; border-left: 4px solid #e86717; border-radius: 12px; box-shadow: none; }
.host-notice span { color: #5c6a61; }
.host-car-card .status-pill { display: inline-block; margin: .7rem 0; background: #eef7f1; }
.host-car-actions { display: flex; gap: .6rem; margin-top: .9rem; }

.portal-table-card { margin-top: 2rem; padding: 1.2rem; box-shadow: none; }
.table-card-heading { margin-bottom: .8rem; }
.table-card-heading h3 { margin: 0; }
.table-scroll { overflow-x: auto; }
.portal-page table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.portal-page th, .portal-page td { padding: .8rem; border-bottom: 1px solid #e6eae5; text-align: left; white-space: nowrap; }
.portal-page th { color: #56645b; font-size: .75rem; text-transform: uppercase; }
.empty-state { grid-column: 1 / -1; padding: 2.5rem; border: 1px dashed #bdc9bd; border-radius: 16px; color: #59675e; text-align: center; }

.portal-dialog { width: min(700px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); padding: 1.6rem; border: 0; border-radius: 20px; color: #17221a; box-shadow: 0 30px 90px rgba(9, 31, 17, .28); }
.portal-dialog::backdrop { background: rgba(14, 28, 18, .66); backdrop-filter: blur(3px); }
.map-dialog { width: min(920px, calc(100% - 2rem)); }
.map-dialog .dialog-heading p { margin: -.5rem 0 1rem; color: #637068; }
.map-search-shell { position: relative; z-index: 5; margin-bottom: .8rem; }
.map-search-form { display: flex; align-items: center; gap: .65rem; min-height: 48px; padding: .35rem .75rem; border: 1px solid #cad4ca; border-radius: 11px; background: #fff; box-shadow: 0 5px 18px rgba(30, 55, 37, .08); }
.map-search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #17221a; font: inherit; }
.map-search-results { position: absolute; top: calc(100% + .35rem); right: 0; left: 0; max-height: 260px; overflow-y: auto; border: 1px solid #dce3da; border-radius: 11px; background: #fff; box-shadow: 0 15px 35px rgba(17, 40, 24, .18); }
.map-search-result { display: flex; width: 100%; gap: .75rem; padding: .8rem 1rem; border: 0; border-bottom: 1px solid #edf0ec; background: #fff; color: #17221a; text-align: left; cursor: pointer; }
.map-search-result:hover, .map-search-result:focus { background: #f1f7f3; outline: 0; }
.map-search-result span:first-child { color: #1f7444; font-size: 1.15rem; }
.map-search-result strong, .map-search-result small { display: block; }
.map-search-result small { margin-top: .2rem; color: #68736c; }
.location-map-wrap { position: relative; overflow: hidden; border: 1px solid #dce3da; border-radius: 14px; background: #e9eee8; }
.location-map { width: 100%; height: min(52vh, 470px); min-height: 340px; }
.map-center-pin { position: absolute; top: 50%; left: 50%; z-index: 3; width: 58px; height: 58px; transform: translate(-50%, -90%); pointer-events: none; filter: drop-shadow(0 5px 4px rgba(0, 0, 0, .24)); transition: transform .16s ease; }
.location-map-wrap.is-moving .map-center-pin { transform: translate(-50%, -105%); }
.map-loading-pill { position: absolute; top: 1rem; left: 50%; z-index: 4; transform: translateX(-50%); padding: .55rem .85rem; border-radius: 999px; background: #fff; color: #35443a; box-shadow: 0 4px 16px rgba(20, 40, 27, .2); font-size: .8rem; }
.map-current-location { position: absolute; right: 1rem; bottom: 1rem; z-index: 4; width: 48px; height: 48px; border: 1px solid #d9e1d8; border-radius: 50%; background: #fff; color: #1f7444; font-size: 1.6rem; line-height: 1; box-shadow: 0 5px 18px rgba(20, 40, 27, .2); cursor: pointer; }
.map-selected-address { display: flex; flex-direction: column; gap: .2rem; margin-top: .8rem; padding: .8rem 1rem; border-radius: 11px; background: #f3f7f2; }
.map-selected-address p { margin: 0; color: #5d6a62; font-size: .84rem; }
.map-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.map-selection-bar p { margin: 0; color: #536158; font-size: .86rem; }
.dialog-close { position: absolute; top: .7rem; right: .9rem; border: 0; background: transparent; color: #526057; font-size: 1.8rem; cursor: pointer; }
.dialog-heading h2 { margin: .25rem 0 1rem; }
.booking-summary { display: grid; grid-template-columns: 130px 1fr; gap: 1rem; margin-bottom: 1rem; }
.booking-summary img { width: 130px; height: 95px; object-fit: contain; border-radius: 10px; background: #f2f4f1; }
.booking-summary h2 { margin: .2rem 0; }
.booking-delivery-address { margin: .65rem 0 0; padding: .55rem .7rem; border-left: 3px solid #1f7444; border-radius: 7px; background: #edf8f1; color: #355341; font-size: .78rem; }
.booking-options { display: grid; gap: .9rem; }
.booking-credit-toggle { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem; border: 1px solid #dce3da; border-radius: 11px; background: #f7faf7; cursor: pointer; }
.booking-credit-toggle input { margin-top: .2rem; }
.booking-credit-toggle span { display: grid; gap: .15rem; }
.booking-credit-toggle strong { color: #243229; font-size: .86rem; }
.booking-credit-toggle small { color: #657269; font-size: .76rem; font-weight: 500; }
.booking-credit-toggle:has(input:disabled) { cursor: not-allowed; opacity: .65; }
.booking-payable { display: grid; gap: .5rem; padding: 1rem; border: 1px solid #d6e3d8; border-radius: 13px; background: #f7fbf8; }
.booking-payable h3 { margin: 0 0 .15rem; font-size: 1rem; }
.booking-payable-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #58665d; font-size: .8rem; }
.booking-payable-row.is-saving { color: #1f7444; }
.booking-payable-row.is-final { margin-top: .2rem; padding-top: .65rem; border-top: 1px solid #d6e3d8; color: #17221a; font-size: 1rem; font-weight: 700; }
.booking-payable-note { margin: 0; color: #657269; font-size: .72rem; }
.booking-payable.is-loading { opacity: .65; }
.booking-payable.is-error { border-color: #ecc5c0; background: #fff5f3; color: #a62c23; }
.promo-offers { display: grid; gap: .65rem; padding: .9rem; border: 1px solid #dce3da; border-radius: 12px; background: #f7faf7; }
.promo-offers-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.promo-offers-heading h3 { margin: 0; font-size: .95rem; }
.promo-offers-heading span, .promo-offers-message { color: #657269; font-size: .78rem; }
.promo-offer-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.promo-offer { display: grid; gap: .22rem; padding: .8rem; border: 1px solid #d6dfd5; border-radius: 10px; background: #fff; color: #243229; text-align: left; cursor: pointer; }
.promo-offer:hover, .promo-offer:focus-visible { border-color: #1f7444; outline: 2px solid rgba(31, 116, 68, .12); }
.promo-offer.is-selected { border-color: #1f7444; background: #edf8f1; box-shadow: inset 0 0 0 1px #1f7444; }
.promo-offer strong { color: #1f7444; font-size: .9rem; }
.promo-offer span { font-size: .8rem; font-weight: 600; }
.promo-offer small { color: #68736c; font-size: .72rem; }
.promo-offers.is-disabled { opacity: .55; }
.promo-offers.is-disabled .promo-offer { cursor: not-allowed; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: .8rem 0 1rem; }
.toggle-row label { display: flex; gap: .5rem; align-items: center; font-size: .88rem; font-weight: 600; }
.settings-form hr, .portal-dialog hr { margin: 1.4rem 0; border: 0; border-top: 1px solid #e2e7e1; }
.delivery-settings { padding: .9rem; border-radius: 12px; background: #f5f7f4; }
.pause-section h3 { margin-bottom: .8rem; }
.pause-list { display: grid; gap: .55rem; margin-top: 1rem; }
.pause-item { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .7rem; border-radius: 9px; background: #f5f7f4; font-size: .8rem; }
.danger-button { border: 0; background: transparent; color: #a62c23; font: inherit; font-weight: 600; cursor: pointer; }

.portal-toast { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 50; max-width: 360px; padding: .9rem 1.1rem; border-radius: 10px; background: #17221a; color: #fff; opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s ease; }
.portal-toast.is-visible { opacity: 1; transform: translateY(0); }
.portal-footer { padding: 1.25rem 0; }
.portal-footer .footer-bottom { margin-top: 0; padding-top: 0; border-top: 0; }
.portal-footer p { margin: 0; }

@media (max-width: 920px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-copy { text-align: center; }
  .login-copy > p { margin-inline: auto; }
  .portal-trust-list { justify-content: center; }
  .car-results, .host-car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-location-field { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .portal-login { padding: 2.8rem 0; }
  .portal-nav-actions > a { display: none; }
  .portal-welcome, .portal-section-heading, .footer-bottom { align-items: stretch; flex-direction: column; }
  .portal-account { align-items: flex-start; }
  .customer-avatar { flex-basis: 58px; width: 58px; height: 74px; font-size: 1.05rem; }
  .role-tabs { width: 100%; }
  .role-tabs button { flex: 1; }
  .search-panel, .car-results, .host-car-grid, .form-row { grid-template-columns: 1fr; }
  .trip-date-picker { grid-template-columns: 1fr; }
  .trip-date-controls { grid-template-columns: minmax(0, 1.25fr) minmax(105px, .75fr); }
  .portal-location-field { align-items: stretch; flex-direction: column; }
  .booking-summary { grid-template-columns: 1fr; }
  .booking-summary img { width: 100%; height: 150px; }
  .promo-offer-list { grid-template-columns: 1fr; }
  .host-notice { flex-direction: column; }
  .location-map { height: 52vh; min-height: 300px; }
  .map-selection-bar { align-items: stretch; flex-direction: column; }
  .map-selection-bar .button { width: 100%; }
}
