/* Suong Mai — Account (auth split-screen + account shell).
   Ke thua 100% token site-theme.css. Rieng trang nay: split-screen auth,
   sidebar account, order card, suggest grid, modal phu. */

.account-main { flex: 1; }
.hint { color: var(--muted); font-size: .9rem; }

/* Ten user dai trong header (desktop): cat 1 dong ellipsis, khong vo layout. */
@media (min-width: 701px) {
  .primary-nav [data-account-link] { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- Auth split-screen ---------- */
.auth-shell { display: grid; grid-template-columns: minmax(480px, 560px) 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-form-col { display: flex; align-items: center; justify-content: center; padding: 48px 40px 64px; background: var(--paper); }
.auth-form-inner { width: 100%; max-width: 440px; }
.auth-back { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: .88rem; font-weight: 600; text-decoration: none; }
.auth-back:hover { color: var(--rust); }
.auth-title { margin: 0 0 8px; font-size: clamp(2rem, 3.4vw, 2.5rem); }
.auth-switch { margin: 0 0 28px; color: var(--muted); font-size: .95rem; }
.auth-switch-btn { padding: 0; border: 0; background: none; cursor: pointer; font-size: inherit; }
.auth-form { display: grid; gap: 4px; }
.auth-form .field { margin-bottom: .9rem; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.password-toggle { position: absolute; top: 50%; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); transform: translateY(-50%); }
.password-toggle:hover { background: var(--cream); color: var(--forest); }
.password-toggle svg { width: 20px; height: 20px; fill: currentColor; }
.auth-assist { display: flex; justify-content: flex-end; margin: 2px 0 18px; }
.auth-assist .text-link { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: none; cursor: pointer; font-size: .9rem; }
.auth-form .button-block { margin-top: 8px; }
.auth-trust { margin: 22px 0 0; color: var(--muted); font-size: .82rem; text-align: center; }
#account-status { margin: 0 0 20px; }

.password-checklist { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; padding: 0; list-style: none; font-size: .82rem; color: var(--muted); }
.password-checklist li.is-pass { color: var(--success); font-weight: 600; }
.strength { display: flex; gap: 6px; margin-top: 10px; }
.strength i { flex: 1; height: 5px; border-radius: 3px; background: var(--sand); transition: background-color .25s ease; }
.strength[data-score="1"] i:nth-child(1) { background: var(--danger); }
.strength[data-score="2"] i:nth-child(-n+2) { background: var(--warning); }
.strength[data-score="3"] i:nth-child(-n+3) { background: var(--clay); }
.strength[data-score="4"] i:nth-child(-n+4) { background: var(--success); }

.terms-row { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 14px; font-size: .88rem; color: var(--muted); }
.terms-row input { flex-shrink: 0; margin-top: 4px; }
.terms-row .text-link { padding: 0; border: 0; border-bottom: 1px solid currentColor; background: none; cursor: pointer; font-size: inherit; }

.auth-success { text-align: center; }
.success-check { width: 76px; height: 76px; margin-bottom: 12px; }
.success-check circle { fill: none; stroke: var(--success); stroke-width: 3; }
.success-check path { fill: none; stroke: var(--success); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
html.sm-anim .success-check { animation: sm-success-pop .5s var(--ease-spring); }
@keyframes sm-success-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.auth-success-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* Cot visual: anh that + overlay + quote xoay. */
.auth-visual { position: relative; overflow: hidden; min-height: 420px; background: linear-gradient(150deg, #2E3A2C, #1C241C 60%, #3a2c20); }
.auth-slides { position: absolute; inset: 0; }
.auth-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.auth-slide.is-active { opacity: 1; }
.auth-visual-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28,36,28,.25) 0%, rgba(28,36,28,.1) 40%, rgba(28,36,28,.62) 100%); }
.auth-quote { position: absolute; right: 32px; bottom: 40px; left: 32px; margin: 0; color: var(--paper); }
.auth-quote blockquote { margin: 0 0 18px; font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-style: italic; line-height: 1.35; text-wrap: balance; transition: opacity .35s ease; }
.auth-quote blockquote.is-fading { opacity: 0; }
.auth-quote-dots { display: flex; gap: 10px; }
.auth-quote-dots button { width: 34px; height: 6px; padding: 0; border: 0; border-radius: 4px; background: rgba(251,249,244,.35); cursor: pointer; }
.auth-quote-dots button.is-active { background: var(--gold); }

/* ---------- Account shell ---------- */
.acct-wrap { padding-block: 48px 96px; }
.acct-subhero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.acct-subhero h1 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.acct-context { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }
.acct-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }

.acct-side { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--paper); box-shadow: var(--shadow-soft); }
.acct-side-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; border-left: 3px solid transparent; border-radius: 10px; background: transparent; color: var(--forest); font-size: .95rem; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.acct-side-item svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--leaf); }
.acct-side-item:hover { background: var(--cream); }
.acct-side-item.is-active { border-left-color: var(--clay); background: var(--sand); color: var(--forest-deep); }
.acct-side-item.is-active svg { color: var(--rust); }
.acct-side-item.acct-logout { color: var(--danger); }
.acct-side-item.acct-logout svg { color: var(--danger); }

.acct-panel { animation: sm-fade-in .2s ease; }
@keyframes sm-fade-in { from { opacity: 0; } to { opacity: 1; } }
.acct-panel .panel h2 { font-size: 1.5rem; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { padding: 20px 22px; }
.stat-label { margin: 0 0 4px; color: var(--muted); font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.stat-value { margin: 0; color: var(--forest); font-family: var(--serif); font-size: 1.7rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-favorite { font-size: 1.15rem; font-family: var(--sans); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stat-card .button { margin-top: 10px; }
.complete-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; padding: 14px 18px; border: 1px dashed rgba(176,124,46,.55); border-radius: 12px; background: rgba(176,124,46,.08); font-size: .9rem; }
.complete-banner p { margin: 0; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 28px 0 14px; }
.section-head h2 { margin: 0; font-size: 1.35rem; }

/* Order cards */
.order-card-list { display: grid; gap: 14px; }
.order-card { display: grid; grid-template-columns: 104px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; }
.order-thumbs { display: flex; width: 104px; height: 84px; border-radius: 10px; overflow: hidden; background: linear-gradient(140deg, #E6DECE, #d9cdb4 60%, #c9bda3); position: relative; }
.order-thumbs::after { content: "SM"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(46,58,44,.28); font-family: var(--serif); font-size: 1.6rem; font-weight: 800; }
.order-thumbs img { position: relative; z-index: 1; flex: 1; min-width: 0; height: 100%; object-fit: cover; }
.order-thumbs img + img { border-left: 2px solid var(--paper); }
.order-info { min-width: 0; }
.order-code { margin: 0; font-size: 1rem; }
.order-code a { color: var(--forest); text-decoration: none; }
.order-code a:hover { color: var(--rust); text-decoration: underline; }
.order-meta { margin: 4px 0 8px; color: var(--muted); font-size: .85rem; }
.order-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.order-total { color: var(--forest); font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.empty-state { padding: 40px 24px; text-align: center; }
.empty-state img { width: 72px; height: 72px; margin-bottom: 12px; opacity: .85; }
.empty-state h3 { font-size: 1.2rem; }
.empty-state p { color: var(--muted); font-size: .95rem; }

/* Suggest grid */
.suggest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.suggest-card { overflow: hidden; }
.suggest-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(140deg, #E6DECE, #d9cdb4 60%, #c9bda3); overflow: hidden; }
.suggest-media::before { content: "SM"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(46,58,44,.28); font-family: var(--serif); font-size: 2.4rem; font-weight: 800; }
.suggest-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s ease, transform .6s var(--ease-spring); }
.suggest-media img.card-img-alt { opacity: 0; }
.suggest-card:hover .suggest-media img.card-img-alt { opacity: 1; }
.suggest-card:hover .suggest-media img.card-img-main { transform: scale(1.04); }
.suggest-avail { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(28,36,28,.72); color: var(--paper); font-size: .72rem; font-weight: 700; }
.suggest-avail.is-off { background: rgba(141,68,53,.85); }
.suggest-body { padding: 14px 16px 16px; }
.suggest-body h3 { margin: 0 0 4px; font-family: var(--sans); font-size: .98rem; font-weight: 700; line-height: 1.4; }
.suggest-body h3 a { color: var(--forest); text-decoration: none; }
.suggest-body h3 a:hover { color: var(--rust); }
.suggest-origin { margin: 0 0 8px; color: var(--muted); font-size: .82rem; }
.suggest-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.suggest-price { color: var(--forest); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Profile / password */
#panel-profile .panel, #panel-password .panel { max-width: 640px; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0 4px; background: linear-gradient(180deg, transparent, var(--paper) 40%); }
.terms-list { margin: 0 0 8px; padding-left: 20px; font-size: .95rem; }
.terms-list li { margin-bottom: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .auth-shell { grid-template-columns: minmax(420px, 480px) 1fr; }
  .suggest-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .acct-layout { grid-template-columns: 220px 1fr; gap: 20px; }
}
@media (max-width: 700px) {
  .auth-shell { grid-template-columns: 1fr; min-height: 0; }
  .auth-visual { min-height: 200px; max-height: 240px; order: -1; }
  .auth-quote { right: 20px; bottom: 20px; left: 20px; }
  .auth-quote blockquote { margin-bottom: 12px; font-size: 1.25rem; }
  .auth-form-col { padding: 36px 20px 56px; }
  .acct-layout { grid-template-columns: 1fr; }
  .acct-side { position: sticky; top: var(--header-h); z-index: 20; flex-direction: row; overflow-x: auto; padding: 8px; }
  .acct-side-item { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; }
  .acct-side-item.is-active { border-bottom-color: var(--clay); }
  .acct-side-item svg { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:last-child { grid-column: 1 / -1; }
  .order-card { grid-template-columns: 88px 1fr; }
  .order-thumbs { width: 88px; height: 76px; }
  .order-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (max-width: 390px) {
  .auth-form-col { padding: 28px 16px 48px; }
  .stat-grid { grid-template-columns: 1fr; }
  .suggest-grid { grid-template-columns: 1fr; }
  .acct-subhero { flex-direction: column; align-items: flex-start; }
  .order-card { grid-template-columns: 1fr; }
  .order-thumbs { width: 100%; height: 96px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-slide, .suggest-media img, .acct-panel { transition: none !important; animation: none !important; }
  .auth-slide { display: none; }
  .auth-slide.is-active { display: block; opacity: 1; }
}
