/* Order history follows the same dark, restrained surfaces as the storefront. */
.profile-page {
  --order-columns: minmax(250px, 1.9fr) minmax(96px, .72fr) minmax(130px, .85fr) minmax(142px, 1fr) 18px;
  padding: 32px 32px 80px;
}
.profile-page .profile-page__inner { max-width: 1320px; }
.profile-page .orders-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 30px; }
.profile-page .orders-heading h1 { margin: 0; color: #f1f4f2; font-size: 30px; line-height: 1.2; letter-spacing: -.025em; }
.profile-page .orders-heading p { margin: 7px 0 0; color: #a9b3ba; font-size: 14px; line-height: 1.5; }
.profile-page .orders-new {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 40px; padding: 0 15px; border: 1px solid #3a4541; border-radius: 8px;
  background: transparent; color: #e0eae2; font: 600 13px/1 Inter, Arial, sans-serif;
  text-decoration: none; white-space: nowrap; transition: background .18s, border-color .18s, color .18s;
}
.profile-page .orders-new span { display: block; line-height: 1; }
.profile-page .orders-new .ui-icon { display: block; flex: none; width: 16px; height: 16px; color: #9dcc9c; transition: transform .18s, color .18s; }
.profile-page .orders-new:hover { background: #1b2520; border-color: #719471; color: #f1f6f1; }
.profile-page .orders-new:hover .ui-icon { color: #94dc8f; transform: translateX(3px); }
.profile-page .orders-new:active { background: #141d18; border-color: #85bc81; }

.profile-page .orders-history { position: relative; border: 1px solid #293133; border-radius: 16px; background: #101519; }
.profile-page .orders-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #293133; }
.profile-page .orders-toolbar__heading { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.profile-page .orders-toolbar h2 { margin: 0; color: #edf2ee; font-size: 15px; font-weight: 600; line-height: 1.35; }
.profile-page .orders-count { color: #9dab9f; font-size: 12px; line-height: 1; }
.profile-page .orders-filter { position: relative; flex: none; margin: 0; }
.profile-page .orders-filter__trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 16px;
  min-width: 155px; height: 38px; padding: 0 10px 0 12px; border: 1px solid transparent; border-radius: 7px;
  background: transparent; color: #c8d1cb; font: 500 13px/1 Inter, Arial, sans-serif;
  text-align: left; cursor: pointer; transition: background .18s, border-color .18s, color .18s;
}
.profile-page .orders-filter__trigger span { display: block; line-height: 1; }
.profile-page .orders-filter__trigger:hover, .profile-page .orders-filter.is-open .orders-filter__trigger { background: #1c2521; border-color: #35453a; color: #f0f4f0; }
.profile-page .orders-filter__trigger:active { background: #222e26; }
.profile-page .orders-filter__trigger:disabled { opacity: .5; cursor: wait; }
.profile-page .orders-filter .ui-icon { position: static; display: block; flex: none; width: 16px; height: 16px; pointer-events: none; }
.profile-page .orders-filter__chevron { color: #a8b5ac; transition: transform .18s, color .18s; }
.profile-page .orders-filter.is-open .orders-filter__chevron { transform: rotate(180deg); color: #a5d3a5; }
.profile-page .orders-filter__menu {
  position: absolute; z-index: 8; top: calc(100% + 5px); right: 0; width: 210px; padding: 5px;
  border: 1px solid #3a4540; border-radius: 9px; background: #1b2221; box-shadow: 0 15px 36px #0009;
  opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none;
  transition: opacity .16s, transform .16s, visibility .16s;
}
.profile-page .orders-filter.is-open .orders-filter__menu { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.profile-page .orders-filter__menu [role=option] { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 0 10px; border-radius: 5px; color: #ced8d0; font: 500 13px/1.2 Inter, Arial, sans-serif; cursor: pointer; outline: none; }
.profile-page .orders-filter__menu [role=option]:hover, .profile-page .orders-filter__menu [role=option]:focus { background: #29352d; color: #f4f7f4; }
.profile-page .orders-filter__menu [role=option]:focus-visible { box-shadow: inset 0 0 0 1px #83cb7e; }
.profile-page .orders-filter__menu [role=option][aria-selected=true] { color: #ace0a9; }
.profile-page .orders-filter__menu [role=option] .ui-icon { visibility: hidden; color: #91d98d; }
.profile-page .orders-filter__menu [role=option][aria-selected=true] .ui-icon { visibility: visible; }

.profile-page .orders-list-head, .profile-page .orders-row { display: grid; grid-template-columns: var(--order-columns); align-items: center; gap: 18px; }
.profile-page .orders-list-head { padding: 12px 24px; border-bottom: 1px solid #252d2f; color: #929f98; font-size: 12px; line-height: 1.3; }
.profile-page .orders-list { display: flex; flex-direction: column; gap: 0; margin: 0; }
.profile-page .orders-row { min-height: 84px; padding: 13px 24px; border: 0; border-bottom: 1px solid #252d2f; border-radius: 0; background: transparent; color: #eaf0ec; text-decoration: none; transition: background .18s; }
.profile-page .orders-row:last-child { border-bottom: 0; border-radius: 0 0 15px 15px; }
.profile-page .orders-row:hover { background: #19211e; }
.profile-page .orders-row:active { background: #202c23; }
.profile-page .orders-row__identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile-page .orders-row__icon { display: grid; place-items: center; flex: none; width: 48px; height: 52px; border: 0; border-radius: 0; background: none; color: #a6c9a9; }
.profile-page .orders-row__icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
.profile-page .orders-row__icon .ui-icon { width: 26px; height: 26px; }
.profile-page .orders-row__details { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.profile-page .orders-row__details strong { overflow-wrap: anywhere; color: #edf3ee; font-size: 14px; font-weight: 600; line-height: 1.3; }
.profile-page .orders-row__details small { color: #9eaba2; font-size: 12px; line-height: 1.35; }
.profile-page .orders-row__date { color: #b2beb6; font-size: 13px; line-height: 1.4; white-space: nowrap; }
.profile-page .orders-row__amount { color: #f0f4f1; font-size: 14px; line-height: 1.4; white-space: nowrap; }
.profile-page .orders-row__amount strong { font-weight: 600; }
.profile-page .orders-row__status { display: inline-flex; align-items: center; gap: 7px; min-width: 0; color: #b6c1b9; font-size: 13px; line-height: 1.35; }
.profile-page .orders-row__status .ui-icon { width: 16px; height: 16px; flex: none; }
.profile-page .orders-row__status.is-active, .profile-page .orders-row__status.is-done { color: #a0d9a0; }
.profile-page .orders-row__status.is-pending { color: #dacb99; }
.profile-page .orders-row__status.is-error { color: #e0a8a0; }
.profile-page .orders-row__chevron { width: 18px; height: 18px; color: #84928b; transition: transform .18s, color .18s; }
.profile-page .orders-row:hover .orders-row__chevron { color: #a3d3a5; transform: translateX(3px); }

.profile-page .service-loading { min-height: 130px; padding: 28px 24px; color: #a6b3aa; }
.profile-page .orders-error { display: flex; align-items: center; gap: 12px; margin: 20px 24px; padding: 14px; border: 1px solid #60413f; border-radius: 8px; background: #261d1e; color: #e8c2bd; font-size: 13px; }
.profile-page .orders-error > .ui-icon { width: 18px; height: 18px; flex: none; color: #dfaaa3; }
.profile-page .orders-error span { flex: 1; }
.profile-page .orders-error button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 12px; border: 1px solid #83625d; border-radius: 7px; background: #352626; color: #f3d4cf; font: 600 13px/1 Inter, Arial, sans-serif; cursor: pointer; }
.profile-page .orders-error button:hover { background: #48302f; border-color: #b47b72; }
.profile-page .orders-empty { display: block; min-height: 0; padding: 32px 24px; text-align: left; }
.profile-page .orders-empty__main { display: flex; flex-direction: column; align-items: flex-start; }
.profile-page .orders-empty h2 { max-width: 480px; margin: 0; color: #edf2ee; font-size: 18px; font-weight: 600; line-height: 1.3; }
.profile-page .orders-empty__main > p#profile-empty-description { max-width: 480px; margin: 9px 0 0; color: #aab7ae; font-size: 14px; line-height: 1.55; }
.profile-page .orders-empty__actions { margin-top: 20px; }
.profile-page .orders-empty__actions a, .profile-page .orders-empty__reset { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 30px; padding: 0; border: 0; border-radius: 0; background: none; color: #c7e2c9; font: 600 13px/1.2 Inter, Arial, sans-serif; text-decoration: none; cursor: pointer; transition: color .18s; }
.profile-page .orders-empty__reset { margin-top: 18px; }
.profile-page .orders-empty__actions .ui-icon { display: block; width: 16px; height: 16px; transition: transform .18s; }
.profile-page .orders-empty__actions a:hover, .profile-page .orders-empty__reset:hover { color: #91df8b; }
.profile-page .orders-empty__actions a:hover .ui-icon { transform: translateX(3px); }
.profile-page .orders-empty__main .orders-empty__note { display: flex; align-items: flex-start; gap: 9px; margin: 24px 0 0; color: #95a59b; font-size: 12px; line-height: 1.5; }
.profile-page .orders-empty__note .ui-icon { width: 16px; height: 16px; margin-top: 1px; flex: none; color: #8faa94; }
.profile-page .orders-session-note { display: flex; align-items: flex-start; gap: 10px; margin: 17px 2px 0 !important; color: #9eada3; }
.profile-page .orders-session-note .ui-icon { width: 16px; height: 16px; margin-top: 1px; flex: none; color: #8ca895; }
.profile-page .orders-session-note p { margin: 0; color: inherit; font-size: 12px; line-height: 1.5; }
.profile-page .orders-new:focus-visible, .profile-page .orders-filter__trigger:focus-visible, .profile-page .orders-row:focus-visible, .profile-page .orders-empty__actions a:focus-visible, .profile-page .orders-empty__reset:focus-visible, .profile-page .orders-error button:focus-visible { outline: 2px solid #93e98d; outline-offset: 3px; }
.profile-page .orders-row:focus-visible { outline-offset: -2px; }

@media (max-width: 900px) {
  .profile-page .orders-list-head { display: none; }
  .profile-page .orders-row { grid-template-columns: minmax(0, 1fr) max-content 18px; grid-template-areas: "identity amount arrow" "date status arrow"; gap: 5px 14px; min-height: 0; padding: 14px 20px; }
  .profile-page .orders-row__identity { grid-area: identity; }
  .profile-page .orders-row__date { grid-area: date; padding-left: 62px; }
  .profile-page .orders-row__amount { grid-area: amount; text-align: right; }
  .profile-page .orders-row__status { grid-area: status; justify-content: flex-end; text-align: right; }
  .profile-page .orders-row__chevron { grid-area: arrow; }
}
@media (max-width: 780px) {
  .profile-page { padding: 24px 20px 60px; }
  .profile-page .orders-heading { margin-bottom: 25px; }
  .profile-page .orders-heading h1 { font-size: 27px; }
  .profile-page .orders-session-note { margin-top: 15px !important; }
}
@media (max-width: 520px) {
  .profile-page .orders-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .profile-page .orders-toolbar { gap: 8px; padding: 12px 16px; }
  .profile-page .orders-filter__trigger { min-width: 145px; }
  .profile-page .orders-filter__menu { width: 200px; }
  .profile-page .orders-row { grid-template-columns: minmax(0, 1fr) max-content 16px; grid-template-areas: "identity identity arrow" "date amount arrow" "status status arrow"; gap: 5px 9px; padding: 14px 16px; }
  .profile-page .orders-row__identity { gap: 10px; }
  .profile-page .orders-row__icon { width: 40px; height: 44px; }
  .profile-page .orders-row__icon .ui-icon { width: 23px; height: 23px; }
  .profile-page .orders-row__date { padding-left: 50px; font-size: 12px; }
  .profile-page .orders-row__details strong, .profile-page .orders-row__amount { font-size: 13px; }
  .profile-page .orders-row__details small, .profile-page .orders-row__status { font-size: 12px; }
  .profile-page .orders-row__status { justify-content: flex-start; padding-left: 50px; text-align: left; }
  .profile-page .orders-row__status .ui-icon { width: 14px; height: 14px; }
  .profile-page .orders-row__chevron { width: 16px; height: 16px; }
  .profile-page .orders-empty { padding: 27px 18px; }
  .profile-page .orders-error { align-items: flex-start; flex-wrap: wrap; margin: 16px; }
  .profile-page .orders-error button { margin-left: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-page .orders-new, .profile-page .orders-new .ui-icon, .profile-page .orders-filter__trigger, .profile-page .orders-filter__menu, .profile-page .orders-filter__chevron, .profile-page .orders-row, .profile-page .orders-row__chevron, .profile-page .orders-empty__actions a, .profile-page .orders-empty__actions .ui-icon, .profile-page .orders-empty__reset { transition: none; }
  .profile-page .orders-new:hover .ui-icon, .profile-page .orders-row:hover .orders-row__chevron, .profile-page .orders-empty__actions a:hover .ui-icon { transform: none; }
}
