/* ==========================================================
   LumiKey — shop stylesheet.
   ========================================================== */
:root {
  --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --glass: rgba(255, 255, 255, .62);
  --glass-strong: rgba(255, 255, 255, .82);
  --glass-soft: rgba(255, 255, 255, .45);
  --stroke: rgba(255, 255, 255, .7);
  --hairline: rgba(15, 23, 42, .07);
  --text: #0b1224;
  --text-2: #56607a;
  --text-3: #8a93a8;
  --accent: #2563eb;
  --accent-2: #06b6d4;
  --accent-blue: #2563eb;
  --accent-grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --green: #16a34a;
  --red: #ef4444;
  --amber: #f59e0b;
  --r-sm: 14px;
  --r: 20px;
  --r-lg: 28px;
  --r-pill: 999px;
  --blur: saturate(180%) blur(22px);
  --shadow: 0 8px 30px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .16), 0 6px 16px rgba(15, 23, 42, .08);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, .65);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Base ---------- */
*, ::before, ::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; font-family: var(--font); font-size: 15px; line-height: 1.6;
  color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-center { text-align: center; }

/* ---------- Header (desktop pill) ---------- */
.lk-header { position: sticky; top: 12px; z-index: 900; }
.lk-nav {
  margin: 0; padding: 8px 18px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .94); border: 1px solid var(--stroke); box-shadow: var(--shadow), var(--shadow-inset);
}
.lk-navbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lk-navbar ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lk-navbar ul.right { gap: 8px; }
.lk-navbar li { position: relative; }
.lk-navbar a, .lk-navbar .user-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 14px; color: var(--text-2); transition: all .25s var(--ease); background: none; border: 0;
}
.lk-navbar .right a { padding: 9px 18px; }
.lk-navbar ul.left a:hover { color: var(--text); background: var(--glass-soft); }
.lk-navbar .right a.primary { color: #fff; background: var(--accent-grad); box-shadow: 0 6px 16px rgba(37, 99, 235, .35); }
.lk-navbar .user-btn { padding: 9px 18px; border: 1px solid var(--accent); color: var(--accent); }
.lk-navbar .user-btn:hover { background: rgba(37, 99, 235, .08); }
.submenu {
  position: absolute; top: calc(100% + 12px); right: 0; min-width: 230px; margin: 0; padding: 8px; list-style: none;
  display: block !important; border-radius: var(--r); background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--stroke); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transform: translateY(10px) scale(.98); transform-origin: center top; transition: all .26s var(--ease); z-index: 950;
}
.lk-navbar li:hover > .submenu, .lk-navbar li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu li a, .submenu li button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; color: var(--text-2); background: none; border: 0; text-align: left;
}
.submenu li a:hover, .submenu li button:hover { background: rgba(37, 99, 235, .1); color: var(--accent); }
.submenu .logout { color: var(--red) !important; }
.submenu .balance { color: var(--green); font-weight: 700; }

/* ---------- Logo: HzzKey mark + wordmark ---------- */
.lk-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.01em; color: var(--text); line-height: 1; }
.lk-mark { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #2563eb, #4f46e5); box-shadow: 0 6px 14px -6px #2563eb; }
.lk-mark svg { width: 18px; height: 18px; }
.lk-logo .k { background: linear-gradient(135deg, #2563eb, #4f46e5); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lk-navbar .brand .lk-logo, .lk-navbar ul.left .brand a.lk-logo:hover { padding: 0; font-size: 18px; font-weight: 800; color: var(--text); background: none; }

/* Brand hover: cards pick up a light blue edge */
.lk-card:hover, .lk-item:hover, .lk-card-history:hover { border-color: rgba(37, 99, 235, .28); }
.lk-purchase-btn:hover { color: var(--accent); border-color: rgba(37, 99, 235, .35); }

/* ---------- Mobile header + sidebar ---------- */
.lk-mobile-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1040; display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--stroke); box-shadow: 0 2px 16px rgba(0, 0, 0, .08);
}
.lk-menu-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--text); }
.lk-bar-icon rect { transform-origin: center; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.lk-menu-btn.active .lk-bar-icon rect:nth-child(1) { transform: translateY(5.75px) rotate(45deg); }
.lk-menu-btn.active .lk-bar-icon rect:nth-child(2) { opacity: 0; }
.lk-menu-btn.active .lk-bar-icon rect:nth-child(3) { transform: translateY(-5.75px) rotate(-45deg); }
.lk-sidebar-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(0, 0, 0, .4); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .28s cubic-bezier(.4, 0, .2, 1); }
.lk-sidebar-overlay.active { opacity: 1; pointer-events: all; }
.lk-sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 1200; width: min(82vw, 280px); padding: 18px;
  background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-right: 1px solid var(--stroke);
  box-shadow: 4px 0 24px rgba(15, 23, 42, .12); transform: translateX(-100%); transition: transform .28s cubic-bezier(.4, 0, .2, 1); overflow-y: auto;
}
.lk-sidebar.active { transform: none; }
.lk-sidebar-header { display: flex; align-items: center; gap: 12px; margin: -18px -18px 0; padding: 18px 18px 16px; border-bottom: 1px solid var(--hairline); }
.lk-sidebar-menu { list-style: none; margin: 0 -18px; padding: 0; }
.lk-sidebar-menu > li { border-bottom: 1px solid var(--hairline); }
.lk-sidebar-menu a, .lk-sidebar-menu button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border: 0; border-left: 4px solid transparent; background: none;
  font-weight: 500; font-size: 18px; color: var(--text-2); text-align: left; transition: background .15s var(--ease), color .15s var(--ease);
}
.lk-sidebar-menu a i, .lk-sidebar-menu button i { width: 24px; text-align: center; font-size: 19px; opacity: .65; }
.lk-sidebar-menu a:hover, .lk-sidebar-menu button:hover { background: rgba(0, 0, 0, .04); }
.lk-sidebar-menu li.active > a { background: linear-gradient(135deg, rgba(37, 99, 235, .1), rgba(6, 182, 212, .1)); border-left-color: var(--accent); color: var(--accent); font-weight: 700; }
.lk-sidebar-menu li.active > a i { opacity: 1; color: var(--accent); }
.lk-sidebar-menu .logout { color: var(--red); }
.lk-mobile-balance { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-pill); background: rgba(22, 163, 74, .12); color: var(--green); font-weight: 700; font-size: 13px; white-space: nowrap; }

/* ---------- Section + title ---------- */
.lk-section { position: relative; margin-top: 10px; padding-top: 26px; padding-bottom: 10px; }
.lk-title { margin-bottom: 30px; text-align: center; text-transform: uppercase; }
.lk-title.sm { margin-bottom: 25px; }
.lk-title h3, .lk-title h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; text-transform: uppercase; color: var(--text); margin: 0 0 .4em; }
.lk-title span { background-image: var(--accent-grad); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- Card image (3:2, faded bottom edge — same as the reference's <img>) ---------- */
.lk-img { position: relative; overflow: hidden; aspect-ratio: 3 / 2; }
.lk-img img, .lk-img .ph { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-mask-image: linear-gradient(#000 88%, transparent 100%); mask-image: linear-gradient(#000 88%, transparent 100%); }
/* Placeholder artwork until a real image URL is set in admin: one dark style for every item. */
.lk-img .ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center;
  color: #fff;
  background:
    radial-gradient(70% 90% at 15% 20%, rgba(37, 99, 235, .42), transparent 60%),
    radial-gradient(70% 90% at 90% 80%, rgba(6, 182, 212, .30), transparent 60%),
    #0d1428;
}
.lk-img .ph i { font-size: 40px; color: #67e8f9; }
.lk-img .ph b { font-size: clamp(20px, 2.4vw, 28px); font-weight: 900; line-height: 1.1; letter-spacing: -.01em; text-transform: uppercase; }

/* ---------- Category card (home) ---------- */
.lk-category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lk-card {
  display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke);
  box-shadow: var(--shadow), var(--shadow-inset); transition: box-shadow .35s var(--ease);
}
.lk-card:hover { box-shadow: var(--shadow-lg); }
.lk-card-footer { padding: 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 17px; position: relative; z-index: 2; }
.lk-card-title, .lk-item-title {
  position: relative; font-size: 17px; font-weight: 800; color: var(--text); margin: 0; text-align: center; line-height: 1.25;
  padding-bottom: 12px; width: auto; align-self: center;
}
.lk-card-title::after, .lk-item-title::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 70%; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, transparent 0%, rgba(37, 99, 235, .7) 28%, rgba(6, 182, 212, .95) 50%, rgba(37, 99, 235, .7) 72%, transparent 100%);
}
.lk-view-link { display: block; width: 50%; }
.lk-view-button {
  text-align: center; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-pill);
  font-weight: 800; font-size: 15px; color: #fff; background: var(--accent-grad);
  box-shadow: 0 6px 18px rgba(37, 99, 235, .32), inset 0 1px 0 rgba(255, 255, 255, .28); transition: box-shadow .22s var(--ease);
}
.lk-view-link:hover .lk-view-button { box-shadow: 0 12px 28px rgba(37, 99, 235, .44), inset 0 1px 0 rgba(255, 255, 255, .32); }

/* ---------- Product item (category page) ---------- */
.lk-items-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lk-item {
  display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; color: var(--text);
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke);
  box-shadow: var(--shadow), var(--shadow-inset); transition: box-shadow .3s var(--ease);
}
.lk-item:hover { box-shadow: var(--shadow-lg); }
.lk-status { position: absolute; top: 10px; right: 10px; z-index: 3; }
.lk-status span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: .01em; line-height: 1; color: #fff; }
.lk-status .active { background: rgba(34, 197, 94, .88); box-shadow: 0 4px 14px rgba(34, 197, 94, .45); }
.lk-status .maintain { background: rgba(239, 68, 68, .88); box-shadow: 0 4px 14px rgba(239, 68, 68, .45); }
.lk-item-info { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 16px; }
.lk-item-title { letter-spacing: -.01em; width: fit-content; max-width: 100%; line-height: 1.3; }
.lk-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 12.5px; color: var(--text-3); }
.lk-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lk-order-zone { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.lk-bottom-row { display: flex; align-items: center; gap: 10px; }
.lk-price { display: flex; flex-direction: column; margin-right: auto; line-height: 1.1; }
.lk-price-label { font-size: 11px; color: var(--text-3); }
.lk-price-value { font-size: 19px; font-weight: 800; color: var(--text); }
.lk-purchase-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; padding: 0 20px; height: 46px;
  border-radius: 10px; font-weight: 800; font-size: 15px; letter-spacing: .01em; color: var(--text-2);
  background: var(--glass-soft); border: 1px solid var(--hairline); transition: .2s var(--ease); cursor: pointer;
}
.lk-purchase-btn:active { transform: scale(.98); }
.lk-purchase-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Form controls ---------- */
.lk-input, select, textarea,
input[type='text'], input[type='email'], input[type='password'], input[type='number'], input[type='search'], input[type='tel'], input[type='date'] {
  width: 100%; height: 48px; padding: 0 16px; font-size: 16px; font-family: inherit; color: var(--text);
  background: var(--glass-soft); border: 1px solid var(--hairline); border-radius: var(--r-sm); outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease); -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2356607a' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer;
}
select option { color: #000; }
textarea { height: auto; min-height: 120px; padding: 12px 16px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.lk-input:focus, input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--glass-strong); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
input.error, select.error, textarea.error { border-color: var(--red); }
main label, .lk-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); }
label.error { color: var(--red); font-size: 12px; font-weight: 600; margin: 6px 0 0; }
.lk-check { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; cursor: pointer; }
.lk-check input { width: 16px; height: 16px; accent-color: var(--accent); -webkit-appearance: auto; appearance: auto; margin: 0; }

.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.row > [class*='col-'] { padding: 0 12px; width: 100%; }
.mt-3 { margin-top: 12px; }
@media (min-width: 768px) { .col-md-6 { width: 50% !important; } }

/* ---------- Auth box ---------- */
.lk-login-box {
  width: 100%; max-width: 560px; margin: 6vh auto; padding: 8px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke);
  border-radius: var(--r-lg); box-shadow: var(--shadow), var(--shadow-inset);
}
.lk-box-body { padding: 26px; color: var(--text); }
.lk-password-label { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.lk-form small, .lk-form p { font-size: 13.5px; color: var(--text-2); }
.lk-form a { color: var(--accent); font-weight: 600; }
.lk-form a:hover { text-decoration: underline; }
.lk-form p { margin: 0; }

.lk-btn-submit {
  width: 100%; height: 50px; border: 0; border-radius: var(--r-pill); font-size: 15px; font-weight: 700; letter-spacing: .02em; color: #fff;
  background: var(--accent-grad); box-shadow: 0 8px 24px rgba(37, 99, 235, .32), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.lk-btn-submit:hover { box-shadow: 0 14px 32px rgba(37, 99, 235, .42), inset 0 1px 0 rgba(255, 255, 255, .32); }
.lk-btn-submit:active { transform: scale(.98); }
.lk-btn-submit:disabled { opacity: .7; cursor: not-allowed; }
.lk-or { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.lk-or::before, .lk-or::after { content: ''; flex: 1; height: 1px; background: var(--hairline); }
.lk-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; border-radius: var(--r-pill);
  background: #fff; border: 1px solid rgba(15, 23, 42, .12); font-weight: 700; font-size: 15px; color: var(--text) !important; text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .06); transition: border-color .2s, box-shadow .2s;
}
.lk-google-btn:hover { border-color: rgba(37, 99, 235, .35); box-shadow: 0 6px 16px rgba(37, 99, 235, .12); }
.lk-google-note { margin: 10px 0 0; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; line-height: 1.5; color: var(--text-2); background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .25); }
.lk-google-note i { color: var(--amber); }
.lk-btn-submit.auto { width: auto; min-width: 180px; padding: 0 28px; display: block; margin-left: auto; }

/* ---------- Popup ---------- */
.lk-popup-overlay {
  position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  overscroll-behavior: contain;
  background: rgba(11, 18, 36, .4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.lk-popup {
  width: 100%; max-width: 440px; max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; border-radius: var(--r-lg);
  background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke); box-shadow: var(--shadow-lg);
}
.lk-popup.wide { max-width: 620px; }
.lk-popup-header { padding: 20px 22px 0; }
.lk-popup-title { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; color: var(--text); margin: 0; }
.lk-popup-title .ok { color: var(--green); } .lk-popup-title .err { color: var(--red); } .lk-popup-title .warn { color: var(--amber); } .lk-popup-title .info { color: var(--accent); }
.lk-popup-body { padding: 14px 22px; color: var(--text-2); font-size: 14.5px; }
.lk-popup-body p { margin: 0 0 8px; }
.lk-popup-buttons { display: flex; gap: 10px; padding: 0 22px 22px; }
.lk-popup-buttons .btn { flex: 1 1 0%; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 48px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-sm); font-weight: 700; font-size: 15px; transition: transform .15s var(--ease), box-shadow .2s var(--ease); -webkit-tap-highlight-color: transparent; }
.lk-popup-buttons .btn:active { transform: scale(.98); }
.lk-popup-buttons .btn:only-child { flex: 0 1 auto; min-width: 150px; padding: 0 32px; margin-inline: auto; }
.lk-popup-buttons .close { color: #fff; background: var(--accent-grad); box-shadow: 0 8px 18px rgba(37, 99, 235, .3); }
.lk-popup-buttons .close1 { color: var(--text-2); background: var(--glass-soft); border: 1px solid var(--hairline); }
.lk-popup-buttons .danger { color: #fff; background: var(--red); }
.lk-popup-buttons .btn:disabled { opacity: .7; }
.lk-promo-row { display: flex; gap: 8px; }
.lk-promo-row input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; }
.lk-promo-row input::placeholder { text-transform: none; }
.lk-promo-row .lk-purchase-btn { height: 48px; padding: 0 18px; font-size: 14px; }
.lk-promo-msg { font-size: 12px; font-weight: 600; margin-top: 6px; }
.lk-promo-msg:empty { display: none; }
.lk-summary { display: grid; gap: 6px; margin-top: 14px; padding: 12px 16px; border-radius: var(--r-sm); background: rgba(15, 23, 42, .03); border: 1px dashed var(--hairline); }
.lk-summary .r { display: flex; justify-content: space-between; font-size: 14px; }
.lk-summary .r b { color: var(--text); }
.lk-summary .tot { margin-top: 2px; padding-top: 8px; border-top: 1px solid var(--hairline); align-items: center; }
.lk-summary .tot span { font-weight: 700; color: var(--text); }
.lk-summary .tot b { font-size: 18px; color: var(--accent); }
.lk-summary .warn span, .lk-summary .warn b { color: var(--red); font-weight: 700; }
/* Quantity stepper in the purchase popup: [-] [ n ] [+]  Còn x key */
.lk-qty-field { margin-top: 14px; }
.lk-qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lk-qty { display: inline-flex; align-items: center; height: 48px; border-radius: var(--r-sm); border: 1px solid var(--hairline); background: var(--glass-soft); overflow: hidden; }
.lk-qty-btn { width: 48px; height: 100%; display: grid; place-items: center; padding: 0; border: 0; background: none; color: var(--accent); font-size: 15px; -webkit-tap-highlight-color: transparent; transition: background .15s var(--ease); }
.lk-qty-btn:hover:not(:disabled), .lk-qty-btn:active:not(:disabled) { background: rgba(37, 99, 235, .1); }
.lk-qty-btn:disabled { color: var(--text-3); opacity: .5; cursor: not-allowed; }
.lk-qty input[type='text'] { width: 64px; height: 100%; padding: 0 4px; border: 0; border-inline: 1px solid var(--hairline); border-radius: 0; background: #fff; text-align: center; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: none; }
.lk-qty input[type='text']:focus { box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .35); }
.lk-qty-stock { font-size: 13px; font-weight: 600; color: var(--text-3); }
/* Purchase controls are tapped repeatedly. "manipulation" stops iOS treating two quick taps as a
   double-tap zoom (which swallows the second tap) while panning and pinch-to-zoom keep working. */
.lk-qty-btn, .lk-qty input[type='text'], .lk-popup-buttons .btn, .lk-purchase-btn, .lk-copy-btn, .lk-copy-all { touch-action: manipulation; }
/* Repeated taps must not start a text selection or the iOS copy callout. */
.lk-qty-btn, .lk-qty-stock { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
/* Several delivered keys: numbered, each copyable, plus "copy all". */
.lk-key-list { display: grid; gap: 8px; max-height: 300px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lk-key-no { margin-right: 6px; color: var(--text-3); font-weight: 700; }
.lk-copy-all { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid rgba(37, 99, 235, .25); background: rgba(37, 99, 235, .08); color: var(--accent); font-weight: 700; font-size: 14px; }
.lk-copy-all.copied { border-color: #16a34a; background: rgba(22, 163, 74, .12); color: #16a34a; }

/* ---------- Toast ---------- */
.lk-toasts { position: fixed; z-index: 1400; top: 84px; right: 16px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.lk-toast { pointer-events: auto; padding: 12px 16px; border-radius: var(--r-sm); background: var(--glass-strong); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke); box-shadow: var(--shadow); font-size: 14px; font-weight: 600; color: var(--text); display: flex; gap: 8px; align-items: center; max-width: 340px; }
.lk-toast.success i { color: var(--green); } .lk-toast.error i { color: var(--red); } .lk-toast.info i { color: var(--accent); } .lk-toast.warning i { color: var(--amber); }

/* ---------- Footer ---------- */
.lk-footer { margin-top: 64px; padding-bottom: 28px; border-top: 1px solid var(--hairline); }
.lk-footer-card { position: relative; padding: 40px clamp(20px, 4vw, 48px) 0; }
.lk-footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; padding-bottom: 34px; }
.lk-footer-brand { max-width: 380px; }
.lk-footer-brand .lk-logo { height: 46px; margin-bottom: 14px; }
.lk-footer-desc { font-size: 14px; color: var(--text-2); max-width: 340px; }
.lk-footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 80px; align-content: start; }
.lk-footer-heading { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin: 0 0 6px; }
.lk-footer-cols a { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.lk-footer-cols a i { font-size: 13px; width: 14px; text-align: center; color: var(--accent); transition: transform .25s var(--ease); }
.lk-footer-cols a:hover { color: var(--accent); }
.lk-footer-cols a:hover i { transform: translateX(4px); }
.lk-footer-bottom { display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px 0; border-top: 1px solid var(--hairline); }
.lk-footer-bottom p { margin: 0; font-size: 13px; color: var(--text-3); }

/* ---------- Article ---------- */
.lk-article { margin: 20px 0 30px; padding: 28px; border-radius: var(--r-lg); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke); box-shadow: var(--shadow), var(--shadow-inset); }
.lk-badge-rating { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lk-badge-trending { display: inline-block; padding: 6px 14px; border-radius: 5px; font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--accent-grad); }
.lk-rating-stars { color: var(--amber); font-size: 14px; }
.lk-article-title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; color: var(--text); }
.lk-article-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 4px; }
.lk-article-meta span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.lk-article-meta i { color: var(--accent); }
.lk-article-desc { margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.lk-article-content { color: var(--text); line-height: 1.8; }

/* ---------- Account (reference member styles) ---------- */
.lk-info-card { padding: 26px; border-radius: var(--r-lg); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke); box-shadow: var(--shadow), var(--shadow-inset); }
.lk-info-card + .lk-info-card { margin-top: 22px; }
.lk-info-card h4 { font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.lk-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lk-info-grid .full { grid-column: 1 / -1; }
.lk-info-grid input[readonly] { background: rgba(15, 23, 42, .03); color: var(--text-2); cursor: default; }
.lk-logout-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; margin-top: 22px; border-radius: var(--r-pill);
  font-weight: 800; font-size: 15px; background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow), var(--shadow-inset); color: var(--red) !important;
}
.lk-logout-btn:hover { background: rgba(239, 68, 68, .08); }

.lk-pay-card { max-width: 520px; margin: 0 auto 30px; background: #fff; border: 1px solid #eef0f5; border-radius: 20px; padding: 22px; box-shadow: 0 10px 30px rgba(80, 90, 160, .08); }
.lk-pay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.lk-pay-head .ttl { font-weight: 800; color: #1e293b; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.lk-pay-head .ttl i { color: #2563eb; }
.lk-pay-label { display: block; font-weight: 600; color: #475569; margin-bottom: 8px; font-size: 14px; }
.lk-pay-input { position: relative; margin-bottom: 16px; }
.lk-pay-input input { height: 58px; border: 2px solid #e2e8f0; border-radius: 14px; padding: 0 46px 0 16px; font-size: 20px; font-weight: 500; color: #0f172a; background: #f8fafc; }
.lk-pay-input input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }
.lk-pay-input input::placeholder { font-weight: 500; color: #cbd5e1; font-size: 16px; }
.lk-pay-suffix { position: absolute; right: 16px; top: 29px; transform: translateY(-50%); font-size: 18px; color: #94a3b8; pointer-events: none; }
.lk-pay-grid, .lk-pay-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.lk-pay-quick { border: 2px solid #e2e8f0; background: #fff; border-radius: 12px; padding: 13px 6px; font-weight: 700; font-size: 15px; color: #334155; transition: .15s; }
.lk-pay-quick:hover { border-color: #bfdbfe; background: #eff6ff; }
.lk-pay-quick.active { border-color: transparent; background: var(--accent-grad); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .35); }
.lk-pay-summary { background: #f8fafc; border: 1px dashed #d8dee9; border-radius: 14px; padding: 10px 16px; margin-bottom: 16px; }
.lk-pay-summary .r { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 14px; color: #64748b; }
.lk-pay-summary .r b { color: #0f172a; font-weight: 700; }
.lk-pay-summary .tot { border-top: 1px solid #e6eaf2; margin-top: 4px; padding-top: 9px; }
.lk-pay-summary .tot b { color: #2563eb; font-size: 18px; }
.lk-pay-submit { width: 100%; height: 54px; border: 0; border-radius: 14px; background: var(--accent-grad); color: #fff; font-weight: 800; font-size: 16px; letter-spacing: .5px; box-shadow: 0 8px 20px rgba(37, 99, 235, .35); display: flex; align-items: center; justify-content: center; gap: 8px; }
.lk-pay-submit:disabled { opacity: .7; cursor: not-allowed; }
/* Transfer details: centred QR, then label · value · copy-button rows that share one right edge. */
.lk-pay-qr { display: flex; justify-content: center; margin: 0 0 16px; }
.lk-pay-qr img { width: 100%; max-width: 260px; border-radius: 14px; border: 1px solid #eef0f5; background: #fff; }
.lk-pay-summary.is-transfer { padding: 4px 6px 4px 16px; }
.lk-pay-summary.is-transfer .r { display: grid; grid-template-columns: auto minmax(0, 1fr) 36px; column-gap: 8px; min-height: 44px; padding: 2px 0; }
.lk-pay-summary.is-transfer .r > span:first-child { white-space: nowrap; }
.lk-pay-summary.is-transfer .r b { text-align: right; overflow-wrap: anywhere; line-height: 1.35; font-variant-numeric: tabular-nums; }
.lk-pay-summary.is-transfer .tot { margin-top: 2px; padding-top: 6px; }
.lk-pay-summary .lk-copyable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lk-copy-slot { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 10px; background: none; color: #94a3b8; font-size: 15px; transition: color .15s, background .15s; }
button.lk-copy-slot:hover, .lk-copyable:active .lk-copy-slot { color: #2563eb; background: rgba(37, 99, 235, .08); }
.lk-copyable.copied .lk-copy-slot { color: #16a34a; background: rgba(22, 163, 74, .1); }
.lk-pay-more { text-align: center; margin-top: 12px; }
.lk-pay-more a { display: inline-block; padding: 8px 12px; color: var(--accent); font-weight: 600; }
.lk-note-warning { margin-bottom: 12px; font-size: 13px; color: var(--text-2); padding: 12px 14px; border-radius: var(--r-sm); background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .25); }

.lk-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.lk-card-history { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--r-lg); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke); box-shadow: var(--shadow), var(--shadow-inset); transition: box-shadow .3s var(--ease); }
.lk-card-history:hover { box-shadow: var(--shadow-lg); }
.lk-card-header-history { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lk-key-label { font-weight: 800; font-size: 14px; color: var(--accent); }
.lk-link-btn { padding: 7px 14px; border-radius: var(--r-pill); font-size: 12px; font-weight: 700; color: var(--accent); background: transparent; border: 1.5px solid var(--accent); }
.lk-key-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: rgba(15, 23, 42, .04); border: 1px dashed var(--hairline); word-break: break-all; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); }
.lk-key-box.copied { border-color: #16a34a; background: rgba(22, 163, 74, .12); }
.lk-copy-btn { flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; color: var(--accent); background: rgba(37, 99, 235, .12); transition: .2s var(--ease); }
.lk-copy-btn:hover { background: var(--accent); color: #fff; }
.lk-info-history { display: grid; gap: 6px; }
.lk-info-history p { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; margin: 0; font-size: 13.5px; color: var(--text-2); }
.lk-info-history i { color: var(--accent); width: 16px; flex-shrink: 0; text-align: center; }
.lk-info-label { color: var(--text-3); flex-shrink: 0; }
.lk-no-data { padding: 40px; text-align: center; font-weight: 600; color: var(--text-3); border-radius: var(--r-lg); background: var(--glass-soft); border: 1px dashed var(--hairline); }

/* Pagination */
.lk-pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 28px; flex-wrap: wrap; }
.lk-page { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 14px; border-radius: var(--r-sm); font-weight: 700; font-size: 14px; color: var(--text-2); background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow); transition: .2s var(--ease); }
.lk-page.active { background: var(--accent-grad); color: #fff; border-color: transparent; }
.lk-page:hover { color: var(--accent); }
.lk-page.active:hover { color: #fff; }
.lk-page.disabled { opacity: .45; pointer-events: none; }
.lk-dots { color: var(--text-3); padding: 0 4px; }

/* Tables (reference ".history" card) */
.lk-history { padding: 14px; overflow: hidden; border-radius: var(--r-lg); background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border: 1px solid var(--stroke); box-shadow: var(--shadow), var(--shadow-inset); }
.lk-scroll { display: block; overflow-x: auto; }
.lk-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.lk-table th, .lk-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
.lk-table th { font-size: 13px; font-weight: 700; color: var(--text-2); }
.lk-table tbody tr:last-child td { border-bottom: 0; }
.lk-table .num { text-align: right; }
.lk-table td select, .lk-table td input { height: 38px; font-size: 14px; }
.badge { display: inline-block; padding: 5px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.badge-dark { background: rgba(15, 23, 42, .08); color: var(--text-2); }
.badge-green { background: rgba(22, 163, 74, .12); color: var(--green); }
.badge-red { background: rgba(239, 68, 68, .12); color: var(--red); }
.badge-amber { background: rgba(245, 158, 11, .14); color: #b45309; }
.badge-accent { background: rgba(37, 99, 235, .12); color: var(--accent); }
.plus { color: var(--green); font-weight: 700; }
.minus { color: var(--red); font-weight: 700; }

.lk-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; color: var(--accent); background: rgba(37, 99, 235, .12); transition: .2s var(--ease); }
.lk-icon-btn:hover { background: var(--accent); color: #fff; }
.lk-icon-btn.red { color: var(--red); background: rgba(239, 68, 68, .1); }
.lk-icon-btn.red:hover { background: var(--red); color: #fff; }
.lk-actions { display: flex; gap: 6px; justify-content: flex-end; }
.lk-thumb { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border-radius: 10px; vertical-align: middle; color: var(--accent); background: rgba(37, 99, 235, .12); overflow: hidden; }
.lk-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Admin (reuses the header-pill styling for its tab row) */
.lk-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px; margin-bottom: 22px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .94); border: 1px solid var(--stroke); box-shadow: var(--shadow), var(--shadow-inset); }
.lk-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: var(--r-pill); font-weight: 600; font-size: 14px; color: var(--text-2); }
.lk-tabs a:hover { color: var(--text); background: var(--glass-soft); }
.lk-tabs a.active { color: #fff; background: var(--accent-grad); box-shadow: 0 6px 16px rgba(37, 99, 235, .35); }
.lk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.lk-toolbar h4 { margin: 0; font-size: 17px; font-weight: 800; }
.lk-toolbar .tools { display: flex; gap: 8px; flex-wrap: wrap; }
.lk-toolbar input, .lk-toolbar select { height: 42px; width: 220px; font-size: 14px; }
.lk-btn-sm { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 18px; border: 0; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; color: #fff; background: var(--accent-grad); box-shadow: 0 6px 16px rgba(37, 99, 235, .35); }
.lk-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.lk-stat { padding: 18px; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow), var(--shadow-inset); }
.lk-stat span { display: block; font-size: 13px; color: var(--text-3); font-weight: 600; }
.lk-stat b { display: block; font-size: 22px; font-weight: 800; color: var(--text); }
.lk-bars { display: flex; align-items: flex-end; gap: 6px; height: 200px; }
.lk-bars { overflow-x: auto; } /* narrow screens: chart scrolls inside its card instead of overflowing */
.lk-bars div { flex: 1; min-width: 34px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; font-size: 11px; color: var(--text-3); }
.lk-bars i { display: block; width: 100%; max-width: 30px; border-radius: 6px 6px 2px 2px; background: var(--accent); }
.lk-two { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.lk-pkg-row { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.lk-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.lk-form-grid .full { grid-column: 1 / -1; }
.lk-cover-picker { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.lk-cover-preview { width: 180px; aspect-ratio: 3 / 2; border-radius: var(--r-sm); overflow: hidden; display: grid; place-items: center; background: #0d1428; color: #94a3b8; font-size: 13px; flex: none; }
.lk-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.lk-cover-preview span { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lk-cover-preview i { font-size: 22px; }
.lk-cover-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.lk-cover-actions [hidden] { display: none !important; }

/* ---------- Responsive (reference breakpoints) ---------- */
@media (max-width: 991.98px) {
  .lk-header { display: none; }
  .lk-mobile-bar { display: flex; }
  body { padding-top: calc(62px + env(safe-area-inset-top, 0px)); }
  html, body { overflow-x: hidden; max-width: 100%; }
  .lk-section { padding-top: 16px; }
  .lk-footer { margin-bottom: 8px; }
  .lk-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .lk-two { grid-template-columns: 1fr; }
}
@media (min-width: 992px) { .lk-mobile-bar, .lk-sidebar, .lk-sidebar-overlay { display: none !important; } }
@media (max-width: 767.98px) {
  .lk-category-grid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
  .lk-items-grid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
  .lk-info-grid, .lk-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .lk-info-card { padding: 18px; }
  /* Stack the actions full-width with the primary on top. flex: none keeps the 50px height; flex-basis 0% collapsed it in a column. */
  .lk-popup-header { padding: 20px 20px 0; }
  .lk-popup-body { padding: 14px 20px 18px; }
  .lk-popup-buttons { flex-direction: column-reverse; gap: 10px; padding: 0 20px 20px; }
  .lk-popup-buttons .btn { flex: none; width: 100%; height: 50px; font-size: 16px; }
  .lk-popup-buttons .btn:only-child { min-width: 0; margin-inline: 0; }
  .lk-popup-buttons .close1 { height: 46px; font-size: 15px; }
  .lk-toolbar input, .lk-toolbar select, .lk-toolbar .tools { width: 100%; }
  .lk-toasts { left: 16px; right: 16px; }
  .lk-tabs { border-radius: var(--r); }
}
@media (max-width: 480px) {
  .lk-pay-grid { grid-template-columns: repeat(2, 1fr); }
  .lk-pay-card { padding: 18px 16px; border-radius: 18px; }
  .lk-pay-head { margin-bottom: 14px; }
  .lk-pay-head .ttl { font-size: 16px; }
  .lk-pay-qr img { max-width: 240px; }
  .lk-pay-summary.is-transfer { padding: 4px 2px 4px 12px; }
  .lk-pay-summary.is-transfer .r { column-gap: 6px; font-size: 13.5px; }
  .lk-pay-summary.is-transfer .tot b { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) { *, ::before, ::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
