html { scrollbar-gutter: stable; } /* tránh lệch ngang khi thanh cuộn xuất hiện sau khi form render */
/* Trang tài khoản: login / register / reset / verify / profile / orders / change password.
   Scope toàn bộ trong .account-page; màu & bo góc theo checkout.css (viền #dedede, bo 12px,
   nút #424813). */
.account-page { padding: 56px 16px 80px; min-height: 60vh; color: #1e1e1e; }
.account-page h1 { font-size: 30px; line-height: 1.2; margin: 0 0 16px; }
.account-loading, .account-empty { text-align: center; padding: 48px 0; color: #6b6b6b; }

.account-auth { max-width: 440px; margin: 0 auto; }
.account-auth h1 { text-align: center; }
.account-auth__sub { text-align: center; color: #6b6b6b; margin: 0 0 24px; }
.account-auth__footer { margin-top: 24px; text-align: center; font-size: 14px; }
.account-auth__link { margin: 0 0 16px; font-size: 14px; text-align: right; }
.account-page a { color: #424813; text-decoration: underline; }

.account-field { margin-bottom: 16px; }
.account-field label { display: block; font-size: 14px; margin-bottom: 6px; }
.account-field input, .account-field select {
  width: 100%; height: 48px; padding: 0 14px; box-sizing: border-box;
  border: 1px solid #dedede; border-radius: 12px; background: #fff; font: inherit; color: inherit;
}
.account-field input:focus, .account-field select:focus { outline: 2px solid #424813; outline-offset: 0; border-color: #424813; }
.account-page .account-field input::placeholder { color: #9a9a9a; opacity: 1; }

.account-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 48px;
  padding: 0 24px; border: 1px solid #424813; border-radius: 12px; background: #424813; color: #fff;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.account-page .account-btn { color: #fff; text-decoration: none; }
.account-btn:disabled { opacity: .6; cursor: not-allowed; }
.account-page .account-btn--ghost { width: auto; height: 40px; background: transparent; color: #424813; }

.account-alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; line-height: 1.5; }
.account-alert--error { background: #fef4f2; border: 1px solid #f0b8ad; color: #9b2c1b; }
.account-alert--success { background: #f3f6e6; border: 1px solid #c9d49a; color: #424813; }

.account-page--wide { padding-top: 40px; }
.account-shell { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 32px; align-items: start; }
.account-nav__profile { background: #fff; border-radius: 12px; padding: 32px 20px; text-align: center; margin-bottom: 8px; }
.account-page .account-nav__profile .account-avatar-default { display: inline-block; width: 96px; height: 96px; }
.account-nav__profile img, .account-nav__profile > span:not(.account-avatar-default) { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #f1ece4; display: inline-flex; align-items: center; justify-content: center; font-size: 36px; color: #424813; }
.account-nav__hello { font-weight: 700; font-size: 18px; margin: 14px 0 0; word-break: break-word; }
.account-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.account-page .account-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 10px; background: #fff; text-decoration: none; color: #1e1e1e; transition: background .15s, color .15s; }
.account-nav a span { flex: 1; }
.account-page .account-nav a:hover { background: #424813; color: #fff; }
.account-page .account-nav a.is-active { background: #424813; color: #fff; }
.account-content { background: #fff; border-radius: 12px; padding: 40px; min-width: 0; }
.account-content h1 { padding-bottom: 16px; margin-bottom: 28px; border-bottom: 1px solid #dedede; }
.account-form { max-width: none; }
.account-profile { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; align-items: start; }
.account-profile .account-btn { width: 100%; }
.account-field--inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.account-field__label { font-size: 14px; }
.account-radio { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; cursor: pointer; }
.account-radio input { appearance: auto; padding: 0; min-width: 0; width: 18px; height: 18px; margin: 0; accent-color: #424813; }

.account-avatar { position: relative; display: block; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; cursor: pointer; margin: 0; }
.account-avatar img, .account-avatar > span {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #f1ece4;
  display: flex; align-items: center; justify-content: center; font-size: 28px; color: #424813;
}

.account-orders { display: grid; gap: 16px; }
.account-order { border: 1px solid #dedede; border-radius: 12px; padding: 16px; }
.account-order header, .account-order footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.account-order header span:not(.account-order__status) { display: block; font-size: 13px; color: #6b6b6b; }
.account-order ul { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.account-order li { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.account-order li img { border-radius: 8px; object-fit: cover; }
.account-order__status { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #f1ece4; }
.account-order__status--completed, .account-order__status--processing { background: #f3f6e6; color: #424813; }
.account-order__status--cancelled, .account-order__status--failed, .account-order__status--refunded { background: #fef4f2; color: #9b2c1b; }
.account-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.account-pagination button { min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid #dedede; border-radius: 10px; background: #fff; color: #1e1e1e; font: inherit; cursor: pointer; }
.account-pagination button:hover:not(:disabled) { border-color: #424813; }
.account-pagination button:disabled { opacity: .4; cursor: not-allowed; }
.account-pagination .is-active { background: #424813; border-color: #424813; color: #fff; }
.account-pagination__dots { min-width: 24px; text-align: center; color: #6b6b6b; }

/* Popup yêu cầu đăng nhập khi mua hàng (checkout) */
.account-login-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.5); }
.account-login-modal__card { min-height: 0; background: #fff; border-radius: 12px; max-width: 420px; width: 100%; padding: 32px 24px; text-align: center; }
.account-login-modal__card h2 { margin: 0 0 12px; font-size: 22px; }
.account-login-modal__card p { margin: 0 0 20px; color: #444; line-height: 1.5; }

@media (max-width: 767px) {
  .account-shell { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .account-content { padding: 24px 16px; }
  .account-profile { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .account-avatar { margin: 0 auto; }
  .account-page--wide { padding: 16px 14px 48px; }
  .account-nav__profile { display: flex; align-items: center; gap: 14px; padding: 10px 12px; text-align: left; margin-bottom: 8px; }
  .account-nav__profile img, .account-nav__profile > span:not(.account-avatar-default), .account-page .account-nav__profile .account-avatar-default { width: 48px; height: 48px; font-size: 20px; flex: none; }
  .account-nav__hello { margin: 0; font-size: 16px; }
  .account-nav ul { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .account-page .account-nav a { flex-direction: column; justify-content: flex-start; gap: 6px; padding: 12px 4px; text-align: center; font-size: 12px; line-height: 1.25; height: 100%; }
  .account-nav a span { flex: none; }
  .account-nav__arrow { display: none; }
  .account-page h1 { font-size: 24px; }
}
.account-login-modal__actions { display: flex; flex-direction: column; gap: 12px; }
.account-login-modal__actions .account-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; }
.account-page .account-login-modal__actions .account-btn--ghost { border: 1px solid #424813; height: 48px; }
.account-avatar__overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.45); color: #fff; opacity: 0; transition: opacity .2s; }
.account-avatar:hover .account-avatar__overlay, .account-avatar:focus-within .account-avatar__overlay { opacity: 1; }
@media (hover: none) { .account-avatar__overlay { opacity: 1; } }
.account-page .account-avatar-default { display: block; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #e6e6e6; color: #c4c4c4; }
.account-avatar-default svg { display: block; width: 100%; height: 100%; }
.account-datepicker { display: block; width: 100%; }
.account-datepicker .react-datepicker__input-container input { width: 100%; }

/* Orders: bảng danh sách + chi tiết đơn (mẫu demo6 my-orders) */
.account-table-wrap { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.account-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.account-table th { background: #424813; color: #fff; text-transform: uppercase; font-size: 13px; letter-spacing: .02em; padding: 16px 20px; text-align: left; border-left: 1px solid rgba(255,255,255,.3); }
.account-table th:first-child { border-left: 0; }
.account-table td { padding: 14px 20px; border-left: 1px solid #dedede; vertical-align: middle; }
.account-table td:first-child { border-left: 0; }
.account-table tbody tr:nth-child(even) { background: #e9e9e9; }
.account-table .is-right { text-align: right; }
.account-table thead th:last-child:not(.is-right), .account-table td:last-child:not(.is-right) { text-align: center; }
.account-page a.account-pill { display: inline-block; padding: 6px 20px; border-radius: 999px; background: #424813; color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; }
.account-back { display: inline-block; margin-bottom: 12px; font-size: 14px; }
.account-order-detail__title { font-size: 24px; margin: 0 0 4px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.account-order-detail__date { margin: 0 0 20px; color: #6b6b6b; font-size: 14px; }
.account-line { display: flex; align-items: center; gap: 12px; }
.account-line img { flex: none; }
.account-order-detail__title .account-order__status { font-family: inherit; font-size: 12px; line-height: 1; padding: 6px 12px; font-weight: 600; }
.account-line img { border-radius: 8px; object-fit: cover; }
.account-summary { margin: 0; }
.account-summary > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 20px; }
.account-summary dt { font-weight: 700; }
.account-summary dd { margin: 0; text-align: right; }
.account-summary small { color: #6b6b6b; margin-left: 4px; }
.account-summary__total { background: #e9e9e9; padding-top: 16px !important; padding-bottom: 16px !important; }
.account-summary__total dd { font-size: 20px; font-weight: 700; }
.account-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 32px; }
.account-info-grid h3 { font-size: 18px; margin: 0 0 12px; }
.account-info-grid dl { margin: 0; display: grid; gap: 10px; }
.account-info-grid dt { font-size: 13px; color: #6b6b6b; }
.account-info-grid dd { margin: 0; font-weight: 600; word-break: break-word; }
.account-info-grid address { font-style: italic; display: grid; gap: 4px; }
.account-note { margin: 12px 0 0; font-size: 14px; }
@media (max-width: 767px) {
  .account-table thead { display: none; }
  .account-table, .account-table tbody, .account-table tr, .account-table td { display: block; width: 100%; }
  .account-table { border: 0; }
  .account-table td { border: 0; padding: 8px 14px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .account-table td::before { content: attr(data-label); font-weight: 700; text-align: left; text-transform: uppercase; font-size: 12px; color: #6b6b6b; }
  .account-table td:last-child:not(.is-right) { text-align: right; }
  .account-table tbody tr { padding: 6px 0; border-bottom: 1px solid #dedede; }
  .account-table tbody tr:last-child { border-bottom: 0; }
  .account-info-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .account-summary > div { padding: 10px 14px; }
}
/* Chi tiết đơn: ẩn h1 "Orders" của khung (tiêu đề đơn nằm trong .account-order-detail) */
.account-content:has(.account-order-detail) > h1 { display: none; }

/* Validate từng ô (profile) */
.account-field__error { margin: 6px 0 0; font-size: 13px; color: #9b2c1b; }
.account-field--invalid input { border-color: #d4503a; }
.account-field--invalid input:focus { outline-color: #d4503a; }

/* react-datepicker: popup bo góc, header kem, chọn tháng/năm dạng select gọn, ngày chọn = tròn olive */
.react-datepicker-popper { z-index: 60; }
.account-calendar.react-datepicker {
  font-family: inherit; border: 1px solid #e6e0d4; border-radius: 16px; overflow: hidden;
  box-shadow: 0 12px 32px rgba(66, 72, 19, .16); background: #fff; padding-bottom: 8px; width: 300px;
}
.account-calendar .react-datepicker__month-container { float: none; width: 100%; }
.account-calendar .react-datepicker__header { background: #f6f1e7; border-bottom: 0; padding: 16px 12px 8px; }
.account-calendar .react-datepicker__current-month { display: none; }
.account-calendar .react-datepicker__header__dropdown { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.account-calendar .react-datepicker__month-dropdown-container, .account-calendar .react-datepicker__year-dropdown-container { margin: 0; }
.account-calendar .react-datepicker__month-select, .account-calendar .react-datepicker__year-select {
  height: 34px; padding: 0 28px 0 12px; border: 1px solid #dedede; border-radius: 10px; background-color: #fff; color: #1e1e1e;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.account-calendar .react-datepicker__month-select:focus, .account-calendar .react-datepicker__year-select:focus { outline: 2px solid #424813; border-color: #424813; }
.account-calendar .react-datepicker__navigation { top: 16px; width: 34px; height: 34px; }
.account-calendar .react-datepicker__navigation-icon::before { border-color: #424813; border-width: 2px 2px 0 0; }
.account-calendar .react-datepicker__day-names { margin-top: 4px; }
.account-calendar .react-datepicker__day-name { color: #8a8266; font-size: 12px; font-weight: 600; text-transform: uppercase; width: 36px; line-height: 32px; margin: 0; }
.account-calendar .react-datepicker__month { margin: 4px 8px 0; }
.account-calendar .react-datepicker__day {
  width: 36px; height: 36px; line-height: 36px; margin: 1px; border-radius: 50%; color: #1e1e1e; font-size: 14px; transition: background .15s, color .15s;
}
.account-calendar .react-datepicker__day:hover { background: #eef0dc; border-radius: 50%; }
.account-calendar .react-datepicker__day--outside-month { color: #b9b4a3; }
.account-calendar .react-datepicker__day--today { font-weight: 700; box-shadow: inset 0 0 0 1px #424813; }
.account-calendar .react-datepicker__day--keyboard-selected { background: #eef0dc; color: #1e1e1e; }
.account-calendar .react-datepicker__day--selected, .account-calendar .react-datepicker__day--selected:hover { background: #424813; color: #fff; }
.account-calendar .react-datepicker__day--disabled { color: #cfcabb; cursor: not-allowed; }
.account-calendar .react-datepicker__day--disabled:hover { background: transparent; }
.account-datepicker .react-datepicker__close-icon { top: 0; bottom: auto; height: 48px; padding: 0 14px 0 0; display: flex; align-items: center; transform: none; }
.account-datepicker .react-datepicker__close-icon::after { background: #424813; display: flex; align-items: center; justify-content: center; line-height: 1; padding: 0; }
@media (max-width: 767px) { .account-calendar.react-datepicker { width: min(300px, calc(100vw - 48px)); } }
