/* Hiep Vo interface refinements. Kept separate from immutable Next export assets. */
:root {
  --hv-ground: #f6f7f9;
  --hv-paper: #fff;
  --hv-ink: #191d29;
  --hv-muted: #596174;
  --hv-line: #e3e6ed;
  --hv-accent: #4338ca;
  --hv-tint: #f0efff;
  --hv-radius: 12px;
  --hv-control: 8px;
}
html { scroll-padding-top: 120px; }
body { color: var(--hv-ink); background: var(--hv-ground); font-family: Arial, Helvetica, sans-serif; line-height: 1.55; }
::selection { background: #dedaff; color: #211b63; }
:focus-visible { outline: 3px solid var(--hv-accent) !important; outline-offset: 3px; }
a { text-underline-offset: 4px; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
input, textarea { caret-color: var(--hv-accent); }
input::placeholder, textarea::placeholder { color: #697386 !important; opacity: 1; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  font-size: 14px; border-color: #cdd2dd; border-radius: var(--hv-control); min-height: 42px;
}
input[type=checkbox], input[type=radio] { accent-color: var(--hv-accent); }
textarea { min-height: 112px; line-height: 1.6; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -.025em; }
.hv-skip { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 12px 20px; background: var(--hv-ink); color: white; border-radius: 8px; }
.hv-skip:focus { top: 12px; }
.hv-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; background: var(--hv-accent); color: #fff; border-radius: 8px; font-size: 14px; font-weight: 600; min-height: 44px; }
.hv-primary:hover { background: #352aa6; }
.hv-primary svg { width: 16px; height: 16px; }
/* Shared public storefront and editorial surfaces. */
html[data-hv-surface=web] body > div.min-h-screen { background: #fafbfc; }
html[data-hv-surface=web] header {
  background: #fff !important; backdrop-filter: none; border-color: var(--hv-line); box-shadow: none;
}
html[data-hv-surface=web] header > div:first-child > div { min-height: 76px; height: auto; }
html[data-hv-surface=web] header nav { gap: 2px; min-width: 0; }
html[data-hv-surface=web] header nav button { min-height: 40px; padding-inline: 10px; font-size: 12px; border-radius: 8px; }
html[data-hv-surface=web] header nav button > span:first-child:has(svg) { display: none; }
html[data-hv-surface=web] header button, html[data-hv-surface=web] header a.btn-press { min-height: 40px; box-shadow: none; }
html[data-hv-surface=web] header a[href='/'] > div:first-child { background: var(--hv-accent); box-shadow: none; border-radius: 10px; padding: 0; }
html[data-hv-surface=web] header a[href='/'] > div:first-child > div { background: transparent; }
html[data-hv-surface=web] header a[href='/'] > div:first-child span { color: white; background: none; }
html[data-hv-surface=web] header [class*='text-[10px]'], html[data-hv-surface=web] header [class*='text-[11px]'] { font-size: 11px; }
html[data-hv-surface=web] header [class*='hidden xl:flex'] { display: none; }
html[data-hv-surface=web] main { padding-top: 28px; padding-bottom: 64px; }
html[data-hv-surface=web] main > section + section { margin-top: 48px; }
html[data-hv-surface=web] main > section:first-child:has(h1) {
  background: #efeff8; color: var(--hv-ink); box-shadow: none; border: 0; border-radius: 16px; padding: 36px 40px;
}
html[data-hv-surface=web] main > section:first-child:has(h1) > .absolute { display: none; }
html[data-hv-surface=web] main > section:first-child:has(h1) .max-w-2xl { max-width: 740px; }
html[data-hv-surface=web] main > section:first-child:has(h1) .max-w-2xl > div:first-child { display: none; }
html[data-hv-surface=web] main > section:first-child h1 { font-size: clamp(28px, 3.1vw, 42px); line-height: 1.16; color: var(--hv-ink); font-weight: 750; }
html[data-hv-surface=web] main > section:first-child h1 span { color: var(--hv-accent); background: none; }
html[data-hv-surface=web] main > section:first-child p { color: #485167; font-size: 15px; line-height: 1.7; max-width: 68ch; margin-top: 18px; }
html[data-hv-surface=web] main > section:first-child .pt-2.flex { color: #485167; gap: 14px; font-size: 11px; }
html[data-hv-surface=web] main > section:first-child .pt-2.flex svg { color: var(--hv-accent); }
html[data-hv-surface=web] main > section:first-child .flex-shrink-0.bg-white\/10 {
  background: white; border: 0; backdrop-filter: none; box-shadow: none; width: 230px; border-radius: 12px;
}
html[data-hv-surface=web] main > section:first-child .flex-shrink-0.bg-white\/10 [class*='text-'] { color: var(--hv-muted); }
html[data-hv-surface=web] main > section:first-child .flex-shrink-0.bg-white\/10 > .text-3xl { color: var(--hv-ink); }
html[data-hv-surface=web] main > section:first-child .flex-shrink-0.bg-white\/10 .border-t { border-color: var(--hv-line); }
html[data-hv-surface=web] main > section:first-child .flex-shrink-0.bg-white\/10 .rounded-full { background: var(--hv-tint); color: var(--hv-accent); }
html[data-hv-surface=web] .hv-hero-actions { margin-top: 22px; }
html[data-hv-surface=web] main h2 { font-size: 24px; line-height: 1.3; }
html[data-hv-surface=web] .card-hover { border: 1px solid var(--hv-line); border-radius: var(--hv-radius); box-shadow: none; transition: border-color 160ms ease; }
html[data-hv-surface=web] .card-hover:hover { transform: none; box-shadow: none; border-color: #acb1c2; }
html[data-hv-surface=web] .card-hover > .aspect-square { aspect-ratio: 1 / 1; }
html[data-hv-surface=web] .card-hover h3 { font-size: 16px; line-height: 1.5; font-weight: 650; min-height: 48px; }
html[data-hv-surface=web] .card-hover .text-transparent { background: none; color: var(--hv-accent); }
html[data-hv-surface=web] .card-hover [class*='bg-gradient'] { background-image: none; background-color: var(--hv-accent); }
html[data-hv-surface=web] .card-hover a { min-height: 44px; border-radius: 8px; font-size: 13px; box-shadow: none; }
html[data-hv-surface=web] .card-hover [class*='text-[10px]'] { font-size: 11px; }
html[data-hv-surface=web] .card-hover .text-slate-400 { color: #697386; }
html[data-hv-surface=web] .card-hover [class*='bg-amber-500'] { background: #8b5100; }
html[data-hv-surface=web] main > section:last-of-type > div:has(input) { gap: 16px; }
html[data-hv-surface=web] main > section:last-of-type button { min-height: 40px; font-size: 13px; border-radius: 8px; }
html[data-hv-surface=web] footer { background: #fff; border-color: var(--hv-line); padding-block: 28px; color: var(--hv-muted); font-size: 13px; }
/* Admin: one quiet frame, an inset white workspace, consistent controls. */
html[data-hv-surface=admin] body > .min-h-screen { background: #f0f1f7; }
html[data-hv-surface=admin] aside.fixed { background: #f0f1f7; border: 0; width: 248px; flex: 0 0 248px; padding: 24px 16px; height: 100dvh; position: sticky; top: 0; overflow-y: auto; }
html[data-hv-surface=admin] aside.fixed > div:first-child { gap: 22px; }
html[data-hv-surface=admin] aside.fixed button { min-height: 42px; font-size: 13px; border-radius: 8px; box-shadow: none; }
html[data-hv-surface=admin] aside.fixed button.bg-slate-900 { background: #e0e1ec; color: var(--hv-ink); }
html[data-hv-surface=admin] aside.fixed button.bg-slate-900 span { color: inherit; }
html[data-hv-surface=admin] aside.fixed [class*='uppercase'] { text-transform: none; letter-spacing: 0; color: var(--hv-muted); font-size: 12px; }
html[data-hv-surface=admin] main { min-width: 0; background: white; border: 1px solid var(--hv-line); border-radius: 16px; margin: 12px 12px 12px 0; padding: 28px; }
html[data-hv-surface=admin] main > div:first-child { padding-bottom: 22px; }
html[data-hv-surface=admin] h1 { font-size: 24px; line-height: 1.35; }
html[data-hv-surface=admin] h1 .animate-bounce { display: none; }
html[data-hv-surface=admin] h2 { font-size: 18px; }
html[data-hv-surface=admin] .text-xs { font-size: 13px; line-height: 1.55; }
html[data-hv-surface=admin] [class*='text-[10px]'], html[data-hv-surface=admin] [class*='text-[11px]'] { font-size: 12px; }
html[data-hv-surface=admin] .text-slate-400 { color: #677184; }
html[data-hv-surface=admin] .text-slate-500 { color: var(--hv-muted); }
html[data-hv-surface=admin] main .rounded-2xl { border-radius: 12px; }
html[data-hv-surface=admin] main [class*='shadow'] { box-shadow: none; }
html[data-hv-surface=admin] main [class*='border-slate-100'] { border-color: var(--hv-line); }
html[data-hv-surface=admin] main [class*='bg-gradient'], html[data-hv-surface=admin] .rainbow-gradient { background-image: none; background-color: var(--hv-accent); }
html[data-hv-surface=admin] .balance-card-bg { background: #242333; }
html[data-hv-surface=admin] main .bg-indigo-600 { background: var(--hv-accent); }
html[data-hv-surface=admin] main button { min-height: 38px; border-radius: var(--hv-control); }
html[data-hv-surface=admin] table { font-size: 13px; font-variant-numeric: tabular-nums; }
html[data-hv-surface=admin] th { color: var(--hv-muted); background: #fff; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
html[data-hv-surface=admin] th, html[data-hv-surface=admin] td { padding: 14px 16px; border-color: var(--hv-line); }
html[data-hv-surface=admin] tbody tr:hover { background: #f8f8fc; }
html[data-hv-surface=admin] td .font-bold { font-variant-numeric: tabular-nums; }
html[data-hv-surface=admin] [class*='fixed inset-0'] { overscroll-behavior: contain; }
html[data-hv-surface=admin] [class*='fixed inset-0'] > div { max-height: calc(100dvh - 32px); overflow-y: auto; }
/* Sign-in shares the admin's light, legible visual language. */
html[data-hv-surface=login] body > .min-h-screen { background: #f0f1f7; min-height: 100dvh; }
html[data-hv-surface=login] body > .min-h-screen > .absolute { display: none; }
html[data-hv-surface=login] .max-w-md { background: white; border: 1px solid var(--hv-line); color: var(--hv-ink); box-shadow: none; border-radius: 16px; padding: 36px; }
html[data-hv-surface=login] h1 { color: var(--hv-ink); font-size: 25px; }
html[data-hv-surface=login] label, html[data-hv-surface=login] strong { color: var(--hv-ink); font-size: 14px; }
html[data-hv-surface=login] p, html[data-hv-surface=login] .text-slate-500, html[data-hv-surface=login] .text-slate-600, html[data-hv-surface=login] .text-slate-400 { color: var(--hv-muted); font-size: 13px; }
html[data-hv-surface=login] input { background: #fff; color: var(--hv-ink); min-height: 48px; font-size: 16px !important; }
html[data-hv-surface=login] button[type=submit] { background: var(--hv-accent); font-size: 14px; box-shadow: none; min-height: 48px; border-radius: 8px; }
html[data-hv-surface=login] [class*='bg-gradient'] { background: var(--hv-tint); box-shadow: none; }
html[data-hv-surface=login] [class*='bg-gradient'] > div { background: transparent; }
html[data-hv-surface=login] .border-t { border-color: var(--hv-line); flex-wrap: wrap; gap: 10px; }
html[data-hv-surface=login] .space-y-4 > div + div { margin-top: 22px; }
@media (min-width: 768px) and (max-width: 1180px) {
  html[data-hv-surface=web] header > div:first-child > div { flex-wrap: wrap; gap: 0 16px; padding-top: 12px; }
  html[data-hv-surface=web] header nav { order: 3; width: 100%; padding-block: 8px; }
  html[data-hv-surface=web] header > div:first-child > div > div:last-child { margin-left: auto; }
  html[data-hv-surface=admin] aside.fixed { width: 216px; flex-basis: 216px; padding-inline: 12px; }
  html[data-hv-surface=admin] main { padding: 22px; }
}
@media (max-width: 767px) {
  html { scroll-padding-top: 145px; }
  html[data-hv-surface=web] header > div:first-child > div { min-height: 68px; gap: 8px; }
  html[data-hv-surface=web] header a[href='/'] { gap: 8px; }
  html[data-hv-surface=web] header a[href='/'] > div:last-child > span:first-child { font-size: 14px; }
  html[data-hv-surface=web] header a[href='/'] span span { display: none; }
  html[data-hv-surface=web] header button, html[data-hv-surface=web] header a.btn-press { min-height: 44px; }
  html[data-hv-surface=web] header button[aria-label='Danh mục sản phẩm'] span { display: none; }
  html[data-hv-surface=web] header > .md\:hidden { padding: 8px 16px; }
  html[data-hv-surface=web] header > .md\:hidden button { min-height: 40px; font-size: 12px; }
  html[data-hv-surface=web] main { padding-top: 20px; }
  html[data-hv-surface=web] main > section:first-child:has(h1) { padding: 24px; border-radius: 12px; }
  html[data-hv-surface=web] main > section:first-child h1 { font-size: 28px; line-height: 1.2; }
  html[data-hv-surface=web] main > section:first-child p { font-size: 14px; line-height: 1.65; }
  html[data-hv-surface=web] main > section:first-child .pt-2.flex { display: none; }
  html[data-hv-surface=web] main > section:first-child .flex-shrink-0.bg-white\/10 { display: none; }
  html[data-hv-surface=web] main > section + section { margin-top: 32px; }
  html[data-hv-surface=web] main h2 { font-size: 21px; }
  html[data-hv-surface=web] section > .flex.items-center.justify-between { align-items: flex-start; gap: 12px; flex-direction: column; }
  html[data-hv-surface=web] .card-hover > .aspect-square { aspect-ratio: 1 / 1; }
  html[data-hv-surface=admin] aside.fixed { position: fixed; width: min(300px, 86vw); height: 100dvh; padding: 20px; background: #f0f1f7; }
  html[data-hv-surface=admin] main { margin: 0; border: 0; border-radius: 0; padding: 20px 16px 40px; }
  html[data-hv-surface=admin] button { min-height: 44px !important; }
  html[data-hv-surface=admin] input:not([type=checkbox]):not([type=radio]), html[data-hv-surface=admin] select, html[data-hv-surface=admin] textarea { font-size: 16px; }
  html[data-hv-surface=admin] .overflow-x-auto { max-width: 100%; overscroll-behavior-x: contain; }
  html[data-hv-surface=admin] th, html[data-hv-surface=admin] td { padding: 12px; }
  html[data-hv-surface=admin] [class*='fixed inset-0'] > div { max-height: calc(100dvh - 16px); }
  html[data-hv-surface=login] .max-w-md { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Final density and contrast pass. */
html[data-hv-surface=web] main > section:first-child:has(h1) { padding-block: 28px; }
html[data-hv-surface=web] main > section:first-child:has(h1) > .relative { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 32px; }
html[data-hv-surface=web] main > section:first-child:has(h1) .max-w-2xl { max-width: none; }
html[data-hv-surface=web] main > section:first-child h1 { font-size: clamp(28px, 2.8vw, 40px); }
html[data-hv-surface=web] main > section:first-child p { max-width: none; font-size: 14px; margin-top: 14px; }
html[data-hv-surface=web] main > section:first-child .pt-2.flex { font-size: 12px; }
html[data-hv-surface=web] .hv-hero-actions { margin-top: 16px; }
html[data-hv-surface=web] main > section:first-child .flex-shrink-0.bg-white\/10 .rounded-full { background: none; padding: 0; }
html[data-hv-surface=web] .card-hover .text-amber-500 { color: #8b5100; }
html[data-hv-surface=web] .card-hover .text-amber-400 { color: #8b5100; fill: #8b5100; }
html[data-hv-surface=web] .card-hover [class*='backdrop-blur'] { backdrop-filter: none; background: #292d39; }
html[data-hv-surface=web] .bg-indigo-600 { background: var(--hv-accent); }
html[data-hv-surface=web] button, html[data-hv-surface=web] input, html[data-hv-surface=web] select { box-shadow: none; }
html[data-hv-surface=web] .card-hover [class*='text-[10px]'], html[data-hv-surface=web] .card-hover [class*='text-[11px]'], html[data-hv-surface=web] .card-hover .text-xs { font-size: 12px; }
html[data-hv-surface=web] .card-hover > div:last-child > div.mt-4 { border-top: 0; }
html[data-hv-surface=admin] aside.fixed button[hidden] { display: none !important; }
html[data-hv-surface=admin] main .lg\:grid-cols-4 > div > div:first-child > div:last-child:has(> svg) { background: none; border: 0; }
html[data-hv-surface=admin] main .lg\:grid-cols-4 > div > div:first-child > div:last-child > svg { color: #697386; }
html[data-hv-surface=admin] aside.fixed [class*='bg-gradient'] { background: var(--hv-accent); box-shadow: none; }
html[data-hv-surface=admin] aside.fixed [class*='bg-gradient'] > div { background: #f0f1f7; }
html[data-hv-surface=admin] aside.fixed nav button svg { flex-shrink: 0; }
@media (max-width: 1100px) {
  html[data-hv-surface=admin] body > .min-h-screen { flex-direction: column; }
  html[data-hv-surface=admin] body > .min-h-screen > .md\:hidden { display: flex; min-height: 64px; }
  html[data-hv-surface=admin] aside.fixed { position: fixed; width: min(300px, 86vw); height: 100dvh; padding: 20px; background: #f0f1f7; transform: translateX(-100%); translate: none; }
  html[data-hv-surface=admin] aside.fixed.translate-x-0 { transform: translateX(0); }
  html[data-hv-surface=admin] main { margin: 0; border-radius: 0; border: 0; padding: 24px; }
  html[data-hv-surface=admin] main > div:first-child { align-items: flex-start; }
  html[data-hv-surface=admin] main > div:first-child > div:last-child { flex-shrink: 0; }
}
@media (max-width: 767px) {
  html[data-hv-surface=web] main > section:first-child:has(h1) { padding: 24px; }
  html[data-hv-surface=web] main > section:first-child:has(h1) > .relative { display: block; }
  html[data-hv-surface=web] main > section:first-child h1 { font-size: 28px; }
  html[data-hv-surface=admin] main { padding: 20px 16px 40px; }
}
.hv-nav-scrim { position: fixed; inset: 0; z-index: 49; background: rgb(25 29 41 / 35%); border: 0; padding: 0; }
@media (min-width: 1101px) { .hv-nav-scrim { display: none; } }
html[data-hv-surface=web] .card-hover [class*='shadow'] { box-shadow: none; }
html[data-hv-surface=web] .text-slate-400 { color: #697386; }
html[data-hv-surface=web] footer, html[data-hv-surface=web] footer a, html[data-hv-surface=web] footer span { color: var(--hv-muted); }
html[data-hv-surface=web] main > section:first-child p { max-width: 75ch; }
html[data-hv-surface=web] .card-hover [class*='bg-[#ee4d2d]'] { background-color: #b9361b; }

.hv-optimization-link { display:flex; align-items:center; min-height:44px; padding:10px 12px; margin-top:6px; border-radius:8px; color:var(--hv-accent); font-size:13px; font-weight:600; text-decoration:none; }
.hv-optimization-link:hover { background:#e0e1ec; }
.hv-optimization-link[hidden] { display:none !important; }
/* Thu nhỏ ảnh trên PC và laptop, giữ vuông 1:1 */
@media (min-width: 1024px) {
  html[data-hv-surface=web] .card-hover > .aspect-square {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
  }
}
