/* 客户端导航和页面分区，保持菜单、身份与订单功能彼此独立。 */
.app-view {
  padding-bottom: 96px;
}

.client-views {
  min-width: 0;
}

.client-view {
  animation: client-view-in .22s ease;
}

.client-page-heading {
  margin: 4px 0 18px;
}

.client-page-heading h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: 0;
}

.client-page-heading p:last-child {
  margin-top: 6px;
  color: var(--muted);
  font-size: 16px;
}

.order-profile-card {
  margin-bottom: 18px;
}

.order-profile-card .profile-grid,
.client-profile-card .profile-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.delivery-location-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.delivery-location-field {
  display: block;
  width: min(100%, 360px);
  margin: 0;
  color: #486461;
  font-size: 14px;
  font-weight: 700;
}

.delivery-location-field select {
  width: 100%;
  margin-top: 7px;
  padding: 11px 13px;
  border: 1px solid #cfe0dd;
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.delivery-location-field select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 129, 120, .12);
}

.delivery-location-field select:disabled {
  color: var(--muted);
  background: #f5f9f8;
  cursor: not-allowed;
}

.order-bar {
  bottom: 86px;
}

.summary-panel {
  margin-bottom: 18px;
}

.summary-period {
  margin: 14px 0 0;
  color: var(--teal);
  font-size: 14px;
  font-weight: 700;
}

.orders-panel {
  min-height: 240px;
}

.order-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.order-cancel-button {
  padding: 4px 0;
  color: #b34d35;
  font-size: 13px;
  font-weight: 700;
}

.order-cancel-button:hover {
  color: #8f3323;
}

.order-cancel-button:disabled {
  opacity: .55;
  cursor: wait;
}

.profile-card {
  margin-bottom: 0;
}

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(520px, calc(100% - 32px));
  padding: 7px;
  transform: translateX(50%);
  border: 1px solid rgba(217, 233, 230, .96);
  border-radius: 20px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 12px 32px rgba(18, 61, 58, .14);
  backdrop-filter: blur(14px);
}

.bottom-nav-item {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.bottom-nav-item:hover {
  color: var(--teal);
  transform: translateY(-1px);
}

.bottom-nav-item.active {
  background: var(--mint);
  color: var(--teal);
}

.bottom-nav-item:focus-visible {
  outline: 3px solid rgba(15, 129, 120, .22);
  outline-offset: -2px;
}

.bottom-nav-icon {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.bottom-nav-item.active .bottom-nav-icon {
  background: var(--teal);
  color: #fff;
}

@keyframes client-view-in {
  from { opacity: .55; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 850px) {
  .app-view {
    padding-bottom: 90px;
  }

  .order-bar {
    bottom: 78px;
  }

  .bottom-nav {
    width: calc(100% - 28px);
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  .client-page-heading {
    margin-top: 0;
  }

  .client-page-heading h1 {
    font-size: 30px;
  }

  .client-page-heading p:last-child {
    font-size: 14px;
  }

  .order-profile-card .profile-grid,
  .client-profile-card .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .delivery-location-controls {
    justify-content: stretch;
  }

  .delivery-location-field {
    width: 100%;
  }

  .bottom-nav-item {
    min-height: 50px;
    flex-direction: column;
    gap: 3px;
    font-size: 12px;
  }

  .bottom-nav-icon {
    width: 21px;
    height: 21px;
    border-radius: 7px;
  }
}

body.modal-open {
  overflow: hidden;
}

.confirm-modal {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(12, 47, 44, .42);
  backdrop-filter: blur(5px);
  animation: confirm-modal-in .18s ease;
}

.confirm-dialog {
  width: min(100%, 460px);
  padding: 24px;
  border: 1px solid rgba(217, 233, 230, .98);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(8, 44, 41, .28);
  outline: none;
}

.confirm-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.confirm-dialog-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  background: var(--mint);
  color: var(--teal);
  font-size: 23px;
  font-weight: 800;
}

.confirm-dialog-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 27px;
  line-height: 1;
}

.confirm-dialog-close:hover,
.confirm-dialog-close:focus-visible {
  background: #f0f6f5;
  color: var(--ink);
}

.confirm-dialog h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.35;
}

.confirm-dialog p {
  margin: 10px 0 24px;
  color: #597370;
  font-size: 15px;
  line-height: 1.75;
}

.confirm-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.confirm-dialog-actions .button {
  min-height: 48px;
}

@keyframes confirm-modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 520px) {
  .confirm-modal { padding: 16px; align-items: end; }
  .confirm-dialog { padding: 22px 18px; border-radius: 22px; }
  .confirm-dialog h2 { font-size: 22px; }
  .confirm-dialog-actions { grid-template-columns: 1fr; }
.confirm-dialog-actions #confirmModalConfirm { grid-row: 1; }
}

.order-card-meta {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.order-card-meta span {
  overflow-wrap: anywhere;
}

.order-card-number {
  color: var(--ink);
  font-weight: 700;
}
