/* =========================================================================
   MỚI (06/10/2026): GIAO DIỆN "KÍNH ĐEN" — theo 3 video mẫu người dùng gửi:
   (1) Form đăng nhập kính 2 tấm trượt (Login ↔ Quên mật khẩu), nền khối đen có vân sáng.
   (2) Thanh điều hướng kính: nút kính lúp bung thành ô tìm kiếm (ESC / X), thu lại mượt.
   (3) Menu bên kính: thu gọn còn biểu tượng, gạch sáng trượt theo mục, icon 2 tông.
   CSS thuần (không phụ thuộc Tailwind) nên trang đăng nhập hiện đúng cả khi Tailwind CDN tải chậm.
   Tiền tố: gb- (đăng nhập), ghs- (ô tìm trên header), sb-collapsed (menu thu gọn).
   ========================================================================= */

/* ---------- 1. ĐĂNG NHẬP ---------- */
html, body { margin: 0; }
.gb-stage { position: relative; min-height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; background: #0b0b0e; isolation: isolate; }
.gb-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(1200px 700px at 20% 0%, #23232a 0%, transparent 60%), radial-gradient(900px 600px at 90% 100%, #1b1b21 0%, transparent 60%), #0b0b0e; }
.gb-facet { position: absolute; background: linear-gradient(135deg, #2a2a31 0%, #15151a 55%, #0e0e12 100%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); animation: gbDrift 16s ease-in-out infinite alternate; }
.gb-facet::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.16) 49%, rgba(255,255,255,.02) 52%, transparent 60%); mix-blend-mode: screen; }
.gb-facet.f1 { width: 46%; height: 42%; left: -6%; top: 6%; clip-path: polygon(0 18%, 62% 0, 100% 40%, 38% 100%, 0 78%); }
.gb-facet.f2 { width: 40%; height: 46%; right: -4%; top: -6%; clip-path: polygon(20% 0, 100% 12%, 82% 100%, 0 70%); animation-duration: 21s; animation-direction: alternate-reverse; }
.gb-facet.f3 { width: 52%; height: 38%; left: 26%; bottom: -8%; clip-path: polygon(0 40%, 70% 0, 100% 52%, 58% 100%, 8% 90%); animation-duration: 18s; }
.gb-facet.f4 { width: 30%; height: 34%; left: 2%; bottom: 4%; clip-path: polygon(30% 0, 100% 30%, 70% 100%, 0 62%); animation-duration: 24s; animation-direction: alternate-reverse; }
.gb-facet.f5 { width: 28%; height: 30%; right: 6%; bottom: 8%; clip-path: polygon(0 20%, 80% 0, 100% 70%, 24% 100%); animation-duration: 20s; }
@keyframes gbDrift { from { transform: translate3d(0,0,0) rotate(0deg); } to { transform: translate3d(14px,-10px,0) rotate(1.2deg); } }
.gb-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.65) 100%); }

.gb-card { position: relative; width: min(920px, 100%); min-height: 520px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 28px; overflow: hidden; color: #fff; font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.03)); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(26px) saturate(130%); -webkit-backdrop-filter: blur(26px) saturate(130%);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.18); }
.gb-pane { position: relative; z-index: 1; padding: 44px 46px; display: flex; flex-direction: column; justify-content: center; transition: opacity .45s ease, transform .6s cubic-bezier(.7,0,.2,1), visibility .45s; }
.gb-pane h2 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.gb-sub { margin: 0 0 22px; font-size: 13px; color: rgba(255,255,255,.62); }
.gb-logo { width: 62px; height: 62px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 16px; box-shadow: 0 8px 26px -6px rgba(255,255,255,.35); }
.gb-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.gb-field { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 2px; margin-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.28); transition: border-color .3s; }
.gb-field::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.7,0,.2,1); }
.gb-field:focus-within::after { transform: scaleX(1); }
.gb-field svg, .gb-field .gb-ic { width: 17px; height: 17px; flex: none; color: rgba(255,255,255,.6); }
.gb-field input { flex: 1; min-width: 0; padding: 13px 0; background: transparent; border: 0; outline: 0; color: #fff; font-size: 14px; }
.gb-field input::placeholder { color: rgba(255,255,255,.45); }
.gb-field button { background: transparent; border: 0; color: rgba(255,255,255,.65); cursor: pointer; padding: 4px; display: flex; }
.gb-field button:hover { color: #fff; }
.gb-btn { width: 100%; margin-top: 8px; padding: 13px 18px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: .04em; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .25s, transform .2s, box-shadow .25s; }
.gb-btn:hover:not(:disabled) { background: rgba(255,255,255,.22); transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(255,255,255,.35); }
.gb-btn:disabled { opacity: .7; cursor: wait; }
.gb-link { background: none; border: 0; padding: 0; color: #fff; text-decoration: underline; cursor: pointer; font-size: 12.5px; }
.gb-error { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; padding: 10px 12px; border-radius: 12px; font-size: 13px; color: #fecdd3; background: rgba(244,63,94,.14); border: 1px solid rgba(253,164,175,.3); }
.gb-error.hidden { display: none; }
.gb-copy { margin-top: 18px; font-size: 11.5px; color: rgba(255,255,255,.4); }

/* tấm kính trượt (WELCOME BACK / HELLO FRIEND) */
.gb-slider { position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 50%; transition: transform .75s cubic-bezier(.7,0,.2,1); transform: translateX(0);
  background: linear-gradient(115deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.04) 45%, rgba(255,255,255,.10) 100%); border-left: 1px solid rgba(255,255,255,.18); border-right: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; padding: 0 46px; }
.gb-slider::before { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.14) 45%, transparent 58%); pointer-events: none; }
.gb-card[data-mode="forgot"] .gb-slider { transform: translateX(-100%); }
.gb-slider-txt { position: absolute; left: 46px; right: 46px; transition: opacity .45s ease .15s, transform .6s cubic-bezier(.7,0,.2,1); }
.gb-slider-txt h3 { margin: 0 0 10px; font-size: 30px; line-height: 1.1; font-weight: 800; }
.gb-slider-txt p { margin: 0 0 20px; font-size: 13px; color: rgba(255,255,255,.7); }
.gb-slider-txt .gb-btn { width: auto; padding: 10px 22px; margin: 0; }
.gb-slider .t-hello { opacity: 1; transform: translateX(0); }
.gb-slider .t-back { opacity: 0; transform: translateX(30px); pointer-events: none; }
.gb-card[data-mode="forgot"] .t-hello { opacity: 0; transform: translateX(-30px); pointer-events: none; }
.gb-card[data-mode="forgot"] .t-back { opacity: 1; transform: translateX(0); pointer-events: auto; }
/* form đang ẩn mờ dần */
.gb-card[data-mode="login"] .gb-pane-right, .gb-card[data-mode="forgot"] .gb-pane-left { opacity: 0; visibility: hidden; pointer-events: none; }
.gb-card[data-mode="login"] .gb-pane-right { transform: translateX(40px); }
.gb-card[data-mode="forgot"] .gb-pane-left { transform: translateX(-40px); }
.gb-mobile-only { display: none; }
.gb-welcome { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; background: rgba(10,10,14,.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.gb-welcome.hidden { display: none; }
.gb-welcome img.av { width: 68px; height: 68px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); margin-bottom: 12px; object-fit: cover; }
.gb-welcome .nm { font-size: 20px; font-weight: 800; margin-top: 2px; }
.gb-welcome .rl { margin-top: 8px; font-size: 12.5px; padding: 4px 14px; border-radius: 999px; background: rgba(255,255,255,.12); }
.gb-welcome .go { margin-top: 18px; font-size: 12.5px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 6px; }
.lq-check { width: 88px; height: 88px; margin-bottom: 10px; }
.lq-check circle { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 289; stroke-dashoffset: 289; animation: lqDraw .7s ease-out forwards; filter: drop-shadow(0 0 8px rgba(255,255,255,.6)); }
.lq-check path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: lqDraw .5s .55s ease-out forwards; }
@keyframes lqDraw { to { stroke-dashoffset: 0; } }
@media (max-width: 720px) {
  .gb-card { grid-template-columns: 1fr; min-height: 0; }
  .gb-slider { display: none; }
  .gb-pane { padding: 34px 26px; }
  .gb-card[data-mode="login"] .gb-pane-right, .gb-card[data-mode="forgot"] .gb-pane-left { display: none; }
  .gb-card .gb-pane { transform: none !important; }
  .gb-mobile-only { display: inline; }
}
@media (prefers-reduced-motion: reduce) { .gb-facet, .gb-slider, .gb-pane, .gb-slider-txt { animation: none !important; transition: none !important; } }

/* ---------- 2. Ô TÌM KIẾM KÍNH LÚP TRÊN HEADER (INS) — CHỈ khi chọn giao diện "Kính đen" ---------- */
.ghs, .sb-collapse-btn { display: none; }
html[data-theme="kinh-den"] .ghs { position: relative; display: flex; align-items: center; height: 38px; width: 38px; margin-left: 0; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: width .45s cubic-bezier(.7,0,.2,1), background .3s, box-shadow .3s, border-color .3s; flex: none; }
html[data-theme="kinh-den"] .ghs.open { width: min(380px, calc(100vw - 150px)); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.35); box-shadow: 0 0 0 3px rgba(255,255,255,.07), 0 10px 30px -12px rgba(0,0,0,.7); }
.ghs-btn { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #fff; cursor: pointer; transition: transform .35s cubic-bezier(.7,0,.2,1); }
.ghs:not(.open) .ghs-btn:hover { transform: scale(1.14) rotate(-8deg); }
.ghs.open .ghs-btn { transform: rotate(-90deg) scale(.92); }
.ghs-btn svg { width: 17px; height: 17px; }
.ghs input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: 0; color: #fff; font-size: 13.5px; opacity: 0; transition: opacity .25s ease; padding: 0; }
.ghs.open input { opacity: 1; transition-delay: .18s; }
.ghs input::placeholder { color: rgba(255,255,255,.5); }
.ghs-esc { flex: none; font-size: 10px; font-weight: 700; color: rgba(255,255,255,.6); padding: 2px 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); margin-right: 6px; opacity: 0; transition: opacity .25s; }
.ghs.open .ghs-esc { opacity: 1; transition-delay: .2s; }
.ghs-x { flex: none; width: 24px; height: 24px; margin-right: 6px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s, background .2s; }
.ghs.open .ghs-x { opacity: 1; pointer-events: auto; transition-delay: .2s; }
.ghs-x:hover { background: rgba(255,255,255,.3); }
.ghs-x svg { width: 12px; height: 12px; }
@media (max-width: 640px) { .ghs-esc { display: none; } }

/* ---------- 3. MENU BÊN: THU GỌN CÒN BIỂU TƯỢNG + icon 2 tông (CHỈ khi chọn "Kính đen") ---------- */
html[data-theme="kinh-den"] #sidebar { transition: width .35s cubic-bezier(.7,0,.2,1), transform .2s; }
.sb-collapse-btn { width: 26px; height: 26px; margin-left: auto; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #fff; align-items: center; justify-content: center; cursor: pointer; transition: transform .35s cubic-bezier(.7,0,.2,1), background .2s; flex: none; }
.sb-collapse-btn:hover { background: rgba(255,255,255,.24); }
.sb-collapse-btn svg { width: 14px; height: 14px; }
@media (min-width: 1024px) { html[data-theme="kinh-den"] .sb-collapse-btn { display: inline-flex; } }
html[data-theme="kinh-den"].sb-collapsed .sb-collapse-btn { transform: rotate(180deg); margin-left: 0; }
html[data-theme="kinh-den"] .ins-duo { width: 1.25em; height: 1.25em; }
html[data-theme="kinh-den"] .nav-item .nav-icon { width: 1.15rem; height: 1.15rem; }
html[data-theme="kinh-den"] .nav-item { transition: background .25s ease, transform .2s ease, box-shadow .25s ease; position: relative; }
html[data-theme="kinh-den"] .nav-item:hover { transform: translateX(2px); }
html[data-theme="kinh-den"] .nav-item.active::before { content: ''; position: absolute; left: -6px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px; background: #fff; box-shadow: 0 0 12px rgba(255,255,255,.7); }
@media (min-width: 1024px) {
  html[data-theme="kinh-den"].sb-collapsed #sidebar { width: 4.75rem; }
  html[data-theme="kinh-den"].sb-collapsed #sidebar > div:first-child { padding-left: 0; padding-right: 0; justify-content: center; flex-wrap: wrap; gap: 6px; height: auto; min-height: 4rem; padding-top: 10px; padding-bottom: 10px; }
  html[data-theme="kinh-den"].sb-collapsed #sidebar > div:first-child .leading-tight { display: none; }
  html[data-theme="kinh-den"].sb-collapsed #sidebar > div:first-child .sb-collapse-btn { margin: 0; }
  html[data-theme="kinh-den"].sb-collapsed #sidebar > div.px-3.pt-3 { display: none; }
  html[data-theme="kinh-den"].sb-collapsed #navContainer { padding-left: .5rem; padding-right: .5rem; }
  html[data-theme="kinh-den"].sb-collapsed #navContainer .group-toggle { justify-content: center; padding-left: 0; padding-right: 0; }
  html[data-theme="kinh-den"].sb-collapsed #navContainer .group-toggle > svg, html[data-theme="kinh-den"].sb-collapsed #navContainer .nav-group-label, html[data-theme="kinh-den"].sb-collapsed #navContainer .nav-label, html[data-theme="kinh-den"].sb-collapsed #navContainer [data-navgroupdot] { display: none; }
  html[data-theme="kinh-den"].sb-collapsed #navContainer .group-toggle > span { gap: 0; }
  html[data-theme="kinh-den"].sb-collapsed #navContainer .nav-item { justify-content: center; padding-left: 0; padding-right: 0; }
  html[data-theme="kinh-den"].sb-collapsed #navContainer .nav-item:hover { transform: none; }
  html[data-theme="kinh-den"].sb-collapsed #sidebarUserCard { justify-content: center; }
  html[data-theme="kinh-den"].sb-collapsed #sidebarUserCard > :not(img) { display: none; }
  html[data-theme="kinh-den"].sb-collapsed #sidebar .p-3.border-t { padding-left: .5rem; padding-right: .5rem; }
}
/* icon menu sáng rõ trên nền kính đen (ghi đè các màu nâu/cam của khung vỏ cũ) */
html[data-theme="kinh-den"] #sidebar .nav-item .nav-icon, html[data-theme="kinh-den"] #sidebar .nav-item .ins-duo { color: #ececf1 !important; }
html[data-theme="kinh-den"] #sidebar .nav-item .nav-icon-badge { background: rgba(255,255,255,.08) !important; border: 1px solid rgba(255,255,255,.14) !important; }
html[data-theme="kinh-den"] #sidebar .nav-item.active .nav-icon-badge { background: rgba(255,255,255,.2) !important; border-color: rgba(255,255,255,.4) !important; box-shadow: 0 0 16px -4px rgba(255,255,255,.5); }
html[data-theme="kinh-den"] #sidebar .group-toggle svg { color: #d4d4da; }

/* ---------- THANH CÔNG CỤ trang Sản phẩm (06/10/2026) — mọi giao diện; kính đen có biến thể riêng bên dưới ---------- */
.ptb { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 999px; overflow-x: auto; overflow-y: hidden; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  background: rgba(120,120,130,.08); border: 1px solid rgba(120,120,130,.22); }
.ptb::-webkit-scrollbar { display: none; }
.ptb > * { flex: none; }
.ptb-search { position: relative; display: flex; align-items: center; height: 36px; width: 36px; border-radius: 999px; overflow: hidden; border: 1px solid rgba(120,120,130,.3); background: rgba(255,255,255,.08);
  transition: width .45s cubic-bezier(.7,0,.2,1), border-color .3s, box-shadow .3s; }
.ptb-search.ptb-open { width: min(240px, calc(100vw - 150px)); box-shadow: 0 0 0 3px rgba(120,120,130,.15); }
.ptb-sbtn { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: inherit; cursor: pointer; transition: transform .35s cubic-bezier(.7,0,.2,1); }
.ptb-search:not(.ptb-open) .ptb-sbtn:hover { transform: scale(1.14) rotate(-8deg); }
.ptb-search.ptb-open .ptb-sbtn { transform: scale(.92); }
.ptb-search input { flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; color: inherit; font-size: 13px; opacity: 0; padding: 0; transition: opacity .25s ease; }
.ptb-search.ptb-open input { opacity: 1; transition-delay: .16s; }
.ptb-sx { flex: none; width: 22px; height: 22px; margin-right: 6px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(120,120,130,.25); color: inherit; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .25s; }
.ptb-search.ptb-open .ptb-sx { opacity: 1; pointer-events: auto; transition-delay: .2s; }
.ptb-select { height: 36px; max-width: 118px; padding: 0 26px 0 12px; border-radius: 999px; border: 1px solid rgba(120,120,130,.3); background-color: rgba(255,255,255,.08); color: inherit; font-size: 12.5px; font-weight: 600; }
.ptb-chip { height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(120,120,130,.3); background: rgba(255,255,255,.08); color: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .2s, transform .2s; }
.ptb-chip:hover { background: rgba(120,120,130,.2); transform: translateY(-1px); }
.ptb-chip-sm { height: 28px; padding: 0 10px; font-size: 11px; gap: 4px; }
.ptb-amber { color: #b45309; border-color: rgba(217,119,6,.45); background: rgba(251,191,36,.14); }
.ptb-primary { background: #2547e8; border-color: #2547e8; color: #fff; }
.ptb-primary:hover { background: #1e37cf; }
html[data-glass] .ptb { background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.04)); border-color: rgba(255,255,255,.18); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
html[data-glass] .ptb-search, html[data-glass] .ptb-select, html[data-glass] .ptb-chip { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; }
html[data-glass] .ptb-search input::placeholder { color: rgba(255,255,255,.5); }
html[data-glass] .ptb-select option { color: #111; }
html[data-glass] .ptb-amber { color: #fcd34d; border-color: rgba(252,211,77,.45); background: rgba(251,191,36,.14); }
html[data-glass] .ptb-primary { background: linear-gradient(120deg, rgba(255,255,255,.9), rgba(212,212,216,.85)); color: #111; border-color: transparent; }
@media (prefers-reduced-motion: reduce) { .ptb-search, .ptb-sbtn, .ptb-search input { transition: none; } }
html[data-glass] .ptb-search input#productSearchInput, html[data-glass] .ptb-search input#productSearchInput:focus { background-color: transparent !important; border-color: transparent !important; box-shadow: none !important; }
/* Máy tính / màn rộng: thanh công cụ xuống dòng thay vì vuốt ngang (cột nội dung hẹp vì có cây danh mục bên trái) — nút không bị che */
@media (min-width: 640px) {
  .ptb { flex-wrap: wrap; overflow: visible; border-radius: 22px; white-space: normal; row-gap: 8px; }
  .ptb-search.ptb-open { width: min(260px, 100%); }
}
