/* ===== Trang Thông tin tài khoản ===== */
/* Khung kem bao ngoài chứa 2 cột: sidebar trái + panel nâu phải. Dùng lại .article-footer. */

.account {
  padding: 28px 16px 8px;
}
.account__inner {
  max-width: 1160px;
  margin: 0 auto;
  /* Khung kem bo viền mảnh (Rectangle 78) */
  background: #fdf3df;
  border: 1px solid #c98a4a;
  border-radius: 4px;
  padding: clamp(20px, 3vw, 40px);
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

/* ===== Sidebar trái ===== */
.account-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.account-side__cta {
  display: block;
}
.account-side__cta img { width: 100%; height: auto; display: block; }

/* Menu dọc: nền kem bo góc, các mục cách nhau bởi đường kẻ mảnh */
.account-menu {
  background: #fbf6ea;
  border: 1px solid #e2c9a0;
  border-radius: 10px;
  padding: 8px;
}
.account-menu__item {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: #4a3016;
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 600;
  border-radius: 22px;
}
/* Đường gạch đứt màu cam giữa các mục (Line 4) */
.account-menu__item + .account-menu__item {
  border-top: 1px dashed #d8a860;
}
.account-menu__item:hover { color: #8a4a28; }
/* Mục đang chọn: pill nâu đậm bo tròn, chữ trắng */
.account-menu__item.is-active {
  background: #4a2f1c;
  color: #fff;
  border-top-color: transparent;
}

/* ===== Panel phải (nâu đậm) ===== */
.account-panel {
  background: #3a2416;
  border-radius: 4px;
  overflow: hidden;
}

/* Thanh nâu tiêu đề (sáng hơn thân panel) */
.account-panel__head {
  background: url("../assets/article/account-header-bar.png?v=2156df00") no-repeat center / cover,
              #6a4326;
  padding: 16px clamp(20px, 3vw, 34px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}
.account-panel__title {
  margin: 0;
  color: #fff;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: 0.02em;
}
.account-panel__crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: clamp(11px, 1.1vw, 13px);
  color: #e9d7bf;
}
.account-panel__crumb a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #e9d7bf;
  text-decoration: none;
}
.account-panel__crumb a:hover { color: #fff; }

/* ===== Form thông tin ===== */
.account-form {
  /* Nền kem viền cam (Rectangle 78) bao quanh form */
  background: #fdf6e3;
  border: 1px solid #e0b878;
  padding: clamp(24px, 3.5vw, 44px) clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 22px);
}

/* Một dòng: label (trái) + input (giữa) + link Sửa/Lưu (phải) */
.account-field {
  display: grid;
  grid-template-columns: 130px 1fr 72px;
  align-items: center;
  gap: 16px;
}
.account-field label {
  color: #4a2410;
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 600;
}
.account-field input {
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  padding: 0 16px;
  font-size: clamp(13px, 1.3vw, 15px);
  color: #3a2416;
  width: 100%;
}
.account-field input::placeholder { color: #b8a894; }
.account-field input:focus { outline: 2px solid #c98a4a; }
.account-field input[readonly] { background: #ffffff; cursor: default; }

/* Link Sửa/Lưu bên phải một số dòng */
.account-field__action {
  border: 0;
  background: none;
  cursor: pointer;
  color: #d94a3a;
  font-size: clamp(13px, 1.4vw, 16px);
  font-weight: 700;
  text-align: left;
  padding: 0;
}
.account-field__action:hover { text-decoration: underline; }
.account-field__action--empty { cursor: default; }
/* Khi đang ở trạng thái "Lưu" (ô đang mở để sửa) */
.account-field__action.is-saving { color: #2fa84f; }

/* ===== Popup thông báo cập nhật thông tin ===== */
/* Dùng lại overlay .login-modal; panel là ảnh cuộn Group 151 (tỉ lệ 948:512). */
.notice-modal[hidden] { display: none; }
.notice-modal__panel {
  position: relative;
  width: 640px;
  max-width: 92vw;
  aspect-ratio: 948 / 512;
}
.notice-modal__scroll {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
}
/* Nút đóng nằm góc trên phải khung cuộn */
.notice-modal .login-modal__close {
  position: absolute;
  top: 6%;
  right: 6%;
}

/* ===== Popup xác minh đổi Mật Khẩu / Mã Cấp 2 ===== */
/* Dùng lại overlay .login-modal + ảnh cuộn cũ làm khung viền (tỉ lệ 948:512). */
.verify-modal[hidden] { display: none; }
.verify-modal__panel {
  position: relative;
  width: 760px;
  max-width: 94vw;
  aspect-ratio: 948 / 512;
}
/* Ảnh cuộn cũ = khung viền (trụ gỗ + mép hoa văn) */
.verify-modal__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
}
/* Vùng nội dung nằm giữa 2 trụ gỗ; nền do ảnh cuộn đảm nhiệm (không phủ màu) */
.verify-modal__content {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 9.5%;
  right: 9.5%;
  padding: clamp(14px, 3%, 34px) clamp(16px, 4%, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 1.6vh, 16px);
}
.verify-modal__title {
  margin: 0 0 clamp(4px, 1vh, 10px);
  text-align: center;
  color: #4a1c14;
  font-size: clamp(14px, 2vw, 24px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* Một dòng nhập: label trái + ô nhập phải */
.verify-field {
  display: grid;
  grid-template-columns: clamp(96px, 15%, 130px) 1fr;
  align-items: center;
  gap: clamp(10px, 2%, 20px);
}
.verify-field label {
  color: #3a2416;
  font-size: clamp(12px, 1.5vw, 17px);
  font-weight: 700;
}
.verify-field input {
  height: clamp(34px, 6vh, 46px);
  border: 0;
  border-radius: 999px;
  background: #fff;
  padding: 0 clamp(12px, 2%, 20px);
  font-size: clamp(12px, 1.4vw, 15px);
  color: #3a2416;
  width: 100%;
  box-shadow: 0 1px 3px rgba(60, 36, 20, 0.12);
}
.verify-field input::placeholder { color: #c2b39c; }
.verify-field input:focus { outline: 2px solid #c98a4a; }

/* Dòng lỗi đỏ (ẩn khi hợp lệ) */
.verify-modal__error {
  margin: 0;
  text-align: center;
  color: #d94a3a;
  font-size: clamp(11px, 1.3vw, 15px);
  font-weight: 700;
  min-height: 1.2em;
}
.verify-modal__error[hidden] { visibility: hidden; }

/* Nút CẬP NHẬT (ảnh) căn giữa */
.verify-modal__submit {
  align-self: center;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  width: clamp(150px, 34%, 220px);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.verify-modal__submit img { width: 100%; height: auto; display: block; }
.verify-modal__submit:hover { transform: translateY(-1px); filter: brightness(1.06); }
.verify-modal .login-modal__close {
  position: absolute;
  top: 4%;
  right: 5%;
  z-index: 2;
}

/* ===== Toast báo thành công (góc phải dưới) ===== */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  padding: 14px 18px;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  /* Hiệu ứng trượt lên khi hiện */
  animation: toast-in 0.25s ease;
}
.toast[hidden] { display: none; }
.toast--success {
  /* Nền xanh chuyển sắc như mẫu */
  background: linear-gradient(90deg, #5a8f5a, #4f8a56);
}
.toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-size: 14px;
  flex-shrink: 0;
}
.toast__text { flex: 1; }
.toast__close {
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.toast__close:hover { color: #fff; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Mobile ===== */
@media (max-width: 760px) {
  .account__inner { grid-template-columns: 1fr; }
  .account-field {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .account-field__action { text-align: right; }
  .account-field__action--empty { display: none; }
}
