/**
 * Global app polish — auth, cart, checkout, customer shells
 * Mobile = native app · Desktop = clean marketplace
 */

/* ── Auth: real-phone = full-bleed app (no fake device chrome) ── */
@media (max-width: 919px) {
  body.auth-redesign-page {
    background: #fff !important;
  }
  body.auth-redesign-page .ath-right {
    background: transparent !important;
    padding: 0 !important;
    min-height: 100dvh;
    align-items: stretch;
  }
  body.auth-redesign-page .ath-phone {
    max-width: none;
    height: 100dvh;
    min-height: 100dvh;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body.auth-redesign-page .ath-phone-notch {
    display: none !important;
  }
  body.auth-redesign-page .ath-phone-scroll {
    background: linear-gradient(165deg, var(--ath-grad-from, #fa5608) 0%, var(--ath-grad-to, #ef4444) 45%, #fff 45%) !important;
  }
  body.auth-redesign-page .ath-hero {
    padding: 8px 20px 20px;
  }
  body.auth-redesign-page .ath-hero-title {
    font-size: 1.625rem;
  }
  body.auth-redesign-page .ath-card {
    border-radius: 22px 22px 0 0 !important;
    margin-top: 0;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.08);
    flex: 1;
  }
  body.auth-redesign-page .ath-gateway-card {
    border-radius: 14px;
    padding: 14px 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  }
  body.auth-redesign-page .ath-btn,
  body.auth-redesign-page button.ath-btn {
    min-height: 50px;
    border-radius: 14px;
    font-weight: 800;
  }
  body.auth-redesign-page .ath-input,
  body.auth-redesign-page input.ath-input {
    min-height: 48px;
    border-radius: 12px;
  }
}

/* Desktop auth: richer left panel */
@media (min-width: 920px) {
  body.auth-redesign-page .ath-left-tagline {
    font-size: 2rem;
    line-height: 1.15;
  }
  body.auth-redesign-page .ath-phone {
    box-shadow:
      0 0 0 10px #1e293b,
      0 0 0 11px #475569,
      0 32px 80px rgba(0, 0, 0, 0.45);
  }
  body.auth-redesign-page .ath-card {
    border-radius: 0 0 32px 32px;
  }
}

/* ── Cart desktop polish ── */
@media (min-width: 900px) {
  body.rental-cart .rc-shell {
    padding: 28px 24px 48px;
  }
  body.rental-cart .rc-main-card,
  body.rental-cart .rc-summary,
  body.rental-cart .rc-coupon,
  body.rental-cart .rc-delivery-card {
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  }
  body.rental-cart .rc-item {
    padding: 22px 0;
  }
}

@media (max-width: 767px) {
  body.rental-cart .rm-topbar .rm-city-picker {
    display: none !important;
  }
  body.rental-cart .rc-shell {
    padding: 12px 12px 24px;
  }
  body.rental-cart .rc-tabs {
    border-radius: 14px 14px 0 0;
  }
  body.rental-cart .rc-tab {
    padding: 14px 10px;
    font-size: 0.8125rem;
  }
}

/* ── Checkout app shell ── */
body.mse-checkout-page {
  background: #f3f4f6 !important;
}
.ck-page {
  min-height: 100vh;
  padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}
.ck-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 32px;
}
.ck-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.ck-back {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  text-decoration: none;
  flex-shrink: 0;
}
.ck-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111;
}
.ck-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 16px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}
.ck-card h2 {
  margin: 0 0 14px;
  font-size: 0.9375rem;
  font-weight: 800;
  color: #111;
}
.ck-address-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ck-address-item:has(input:checked),
.ck-address-item.is-selected {
  border-color: #fa5608;
  background: #fff7ed;
}
.ck-address-item input {
  margin-top: 3px;
  accent-color: #fa5608;
}
.ck-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  color: #4b5563;
  padding: 6px 0;
}
.ck-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px dashed #e5e7eb;
  font-size: 1.0625rem;
  font-weight: 900;
}
.ck-total strong {
  color: #fa5608;
  font-size: 1.25rem;
}
.ck-sticky {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 101;
  padding: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.14);
}
body.has-app-bottom-nav .ck-sticky {
  bottom: var(--mse-above-nav, calc(92px + env(safe-area-inset-bottom, 0px)));
}
.ck-pay-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff7a3d, #fa5608);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(250, 86, 8, 0.35);
}
.ck-pay-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ck-note {
  margin: 8px 0 0;
  font-size: 0.6875rem;
  color: #9ca3af;
  text-align: center;
}
@media (min-width: 768px) {
  .ck-shell {
    padding: 28px 24px 48px;
  }
  .ck-sticky {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 48px));
    bottom: 24px;
  }
  body.has-app-bottom-nav .ck-sticky {
    bottom: 24px;
  }
  .ck-page {
    padding-bottom: 140px;
  }
}

/* ── Customer layout mobile app polish ── */
@media (max-width: 767px) {
  body.app-ui .app-main,
  body.app-ui .ui-main,
  .app-content,
  .ui-content {
    padding-left: 12px;
    padding-right: 12px;
  }
  .ui-card,
  .app-card {
    border-radius: 16px !important;
  }
  .ui-btn,
  .btn-primary {
    border-radius: 12px;
    font-weight: 800;
  }
}

/* Hide AI / help / cart FAB on auth + checkout (less clutter) */
body.auth-redesign-page .ms-ai-fab,
body.mse-checkout-page .ms-ai-fab,
body.mse-checkout-page .rm-help-fab,
body.mse-checkout-page .mse-cart-fab,
body.mse-checkout-page .mse-sticky-cart,
body.mse-checkout-page .sticky-cart-bar {
  display: none !important;
}

/* Desktop checkout: wider airy shell */
@media (min-width: 900px) {
  body.mse-checkout-page .rm-topbar-inner {
    max-width: 1180px;
  }
  body.mse-checkout-page .ck-title {
    font-size: 1.5rem;
  }
  body.mse-checkout-page .ck-card {
    padding: 22px 22px;
  }
}
