/* ==========================================================================
   NEXUS MAGIC VIETNAM - PRECISION LIVING DESIGN SYSTEM
   Modern Apple-inspired Glassmorphism with Nexus Signature Red Accents
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --primary: #be0017;
  --primary-accent: #e5252a;
  --primary-hover: #9c0012;
  --primary-glow: rgba(229, 37, 42, 0.28);
  --primary-light: rgba(229, 37, 42, 0.08);

  --bg: #f8f9fc;
  --bg-subtle: #f0f2f7;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --surface-glass-tint: rgba(248, 249, 252, 0.88);
  --surface-dim: #eef1f6;

  --ink-primary: #121316;
  --ink-secondary: #575a65;
  --ink-tertiary: #8b8f9e;
  --ink-inverse: #ffffff;

  --border-glass: rgba(255, 255, 255, 0.75);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: rgba(229, 37, 42, 0.4);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 10px 28px -4px rgba(229, 37, 42, 0.35);

  --status-success: #10b981;
  --status-warning: #f59e0b;
  --status-info: #0284c7;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --font-main: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --primary: #e5252a;
  --primary-accent: #ff454a;
  --primary-hover: #ff6064;
  --primary-glow: rgba(229, 37, 42, 0.45);
  --primary-light: rgba(229, 37, 42, 0.16);

  --bg: #0c0d10;
  --bg-subtle: #14161b;
  --surface: #181a20;
  --surface-glass: rgba(24, 26, 32, 0.85);
  --surface-glass-tint: rgba(20, 22, 27, 0.92);
  --surface-dim: #21242d;

  --ink-primary: #f5f6fa;
  --ink-secondary: #9ea3b5;
  --ink-tertiary: #6b7082;
  --ink-inverse: #0c0d10;

  --border-glass: rgba(255, 255, 255, 0.1);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(229, 37, 42, 0.6);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 10px 30px -4px rgba(229, 37, 42, 0.5);
}

/* Base Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--ink-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#appMain,
.gnav-wrapper,
.top-ticker,
.gfoot {
  max-width: 100vw;
  overflow-x: hidden;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container & Layout */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.gap-4 {
  gap: 1rem;
}

/* Top Announcement Ticker */
.top-ticker {
  background: linear-gradient(90deg, #be0017, #e5252a, #be0017);
  background-size: 200% auto;
  animation: shineGradient 6s linear infinite;
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 60;
}

@keyframes shineGradient {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.top-ticker-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ticker-badge {
  background: rgba(255, 255, 255, 0.22);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.725rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ticker-countdown {
  display: inline-flex;
  gap: 0.25rem;
  font-family: monospace;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ==========================================================================
   APPLE-STYLE GLOBAL NAVIGATION BAR (GNav)
   ========================================================================== */
.gnav-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0;
  margin-bottom: 0;
  transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
}

[data-theme="dark"] .gnav-wrapper {
  background: rgba(22, 22, 23, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gnav {
  max-width: 1024px;
  height: 44px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.gnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--ink-primary);
  text-decoration: none;
  flex-shrink: 0;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.gnav-brand:hover {
  opacity: 1;
}

.brand-emblem {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  object-fit: contain;
  box-shadow: none;
}

.brand-tag {
  display: none !important;
}

.gnav-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  list-style: none;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.gnav-link {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-secondary);
  transition: color 0.2s ease, opacity 0.2s ease;
  position: relative;
  padding: 0;
  line-height: 44px;
  height: 44px;
  cursor: pointer;
  white-space: nowrap !important;
  word-break: keep-all !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  letter-spacing: -0.01em;
  opacity: 0.82;
}

.gnav-link:hover {
  color: var(--ink-primary);
  opacity: 1;
}

.gnav-link.active {
  color: var(--primary);
  font-weight: 600;
  opacity: 1;
}

.gnav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.gnav-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.action-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  padding: 0;
  opacity: 0.85;
}

.action-btn .material-symbols-outlined {
  font-size: 18px;
}

.action-btn:hover {
  color: var(--ink-primary);
  opacity: 1;
  background: rgba(0, 0, 0, 0.05);
  transform: none;
}

[data-theme="dark"] .action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.badge-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

.mobile-menu-btn {
  display: none;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.glass-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

/* Primary & Outline Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0.65rem 1.4rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 0.925rem;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-accent));
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -4px rgba(229, 37, 42, 0.45);
  opacity: 0.95;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink-primary);
  border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
  background: var(--surface-dim);
  border-color: var(--ink-tertiary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.825rem;
}

.btn-lg {
  padding: 0.85rem 1.8rem;
  font-size: 1.05rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 3.5rem;
}

.hero-box {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.hero-ambient-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
}

.hero-content h1 span.highlight {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--primary-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p.subtitle {
  font-size: 1.125rem;
  color: var(--ink-secondary);
  margin-bottom: 1.75rem;
  max-width: 540px;
  line-height: 1.6;
}

.hero-deal-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.deal-meta {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.deal-prices {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.price-main {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.price-list {
  font-size: 1rem;
  color: var(--ink-tertiary);
  text-decoration: line-through;
}

.discount-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.hero-hero-img-box {
  position: relative;
  text-align: center;
}

.hero-hero-img {
  max-height: 380px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s ease;
}

.hero-hero-img:hover {
  transform: scale(1.02);
}

.hero-float-tag {
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-glass);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Trust Badges Strip */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.trust-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.trust-text h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.3;
}

.trust-text p {
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

/* Bento Showcase Grid */
.bento-section {
  padding: 3rem 0;
}

.section-head {
  margin-bottom: 2rem;
  text-align: center;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-primary);
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--ink-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.bento-col-8 {
  grid-column: span 8;
}

.bento-col-4 {
  grid-column: span 4;
}

.bento-col-6 {
  grid-column: span 6;
}

.bento-col-12 {
  grid-column: span 12;
}

.bento-badge {
  align-self: flex-start;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-focus);
  margin-bottom: 1rem;
}

.bento-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.bento-desc {
  font-size: 0.925rem;
  color: var(--ink-secondary);
  margin-bottom: 1.25rem;
}

.bento-interactive {
  margin-top: auto;
}

.bento-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex: 1;
  width: 100%;
  min-width: 0;
}

.bento-split-wide {
  gap: 2rem;
}

.bento-split-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.bento-split-footer {
  margin-top: auto;
}

.bento-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.bento-price-main {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.bento-price-old {
  font-size: 0.95rem;
  color: var(--ink-tertiary);
  text-decoration: line-through;
}

.bento-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bento-split-img {
  width: 210px;
  height: 210px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  background: #ffffff;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.bento-split-img:hover {
  transform: scale(1.02);
}

.bento-split-img-lg {
  width: 240px;
  height: 240px;
}

/* Category Filter Tabs */
.cat-filter-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cat-tab {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cat-tab:hover {
  background: var(--surface-dim);
  color: var(--ink-primary);
}

.cat-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

/* Product Catalog Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
}

.card-badge.hot {
  background: var(--primary);
  color: #ffffff;
}

.wishlist-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-tertiary);
  transition: var(--transition);
}

.wishlist-btn:hover,
.wishlist-btn.saved {
  color: var(--primary);
  background: var(--primary-light);
}

.product-thumb-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  transition: transform 0.4s ease;
}

.product-card:hover .product-thumb-img {
  transform: scale(1.05);
}

/* Color Swatches on Card */
.swatch-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  min-height: 20px;
}

.swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: var(--transition);
}

.swatch-dot.active,
.swatch-dot:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--primary);
}

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink-primary);
  margin-bottom: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
}

.product-name:hover {
  color: var(--primary);
}

.product-tagline {
  font-size: 0.825rem;
  color: var(--ink-secondary);
  margin-bottom: 0.85rem;
  line-height: 1.4;
  flex-grow: 1;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 0.85rem;
}

.star-icon {
  color: #f59e0b;
}

.card-pricing {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.price-current {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}

.price-old {
  font-size: 0.85rem;
  color: var(--ink-tertiary);
  text-decoration: line-through;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
}

/* Modals & Dialogs */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2rem;
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface-dim);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-secondary);
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Product Detail Modal View (PDP) */
.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 2.5rem;
}

.pdp-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pdp-main-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.pdp-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}

.pdp-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.pdp-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.7;
  transition: var(--transition);
}

.pdp-thumb.active,
.pdp-thumb:hover {
  opacity: 1;
  border-color: var(--primary);
}

.pdp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-title {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.pdp-tagline {
  color: var(--ink-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.pdp-pricing-box {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pdp-price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--primary);
}

.pdp-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.pdp-specs-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.pdp-specs-table td {
  padding: 0.6rem 0.5rem;
}

.pdp-specs-table td:first-child {
  color: var(--ink-secondary);
  font-weight: 500;
  width: 40%;
}

.pdp-specs-table td:last-child {
  color: var(--ink-primary);
  font-weight: 600;
}

/* Slide-over Cart Flyout */
.flyout-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  border-left: 1px solid var(--border-glass);
}

.flyout-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.flyout-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flyout-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.flyout-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.flyout-foot {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
}

.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-subtle);
}

.cart-item-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-variant {
  font-size: 0.775rem;
  color: var(--ink-tertiary);
  margin-bottom: 0.4rem;
}

.cart-item-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--surface);
  overflow: hidden;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--ink-secondary);
}

.qty-btn:hover {
  background: var(--surface-dim);
  color: var(--ink-primary);
}

.qty-val {
  min-width: 24px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Coupon Box */
.coupon-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.coupon-input {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  font-size: 0.875rem;
  text-transform: uppercase;
}

.coupon-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Checkout Form Styles */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink-primary);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Payment Method Selector */
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.payment-option {
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.payment-option.active {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Comparison Matrix Table */
.compare-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.compare-table th,
.compare-table td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--ink-secondary);
  background: var(--bg-subtle);
  width: 22%;
}

.compare-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 0 auto 0.5rem;
}

/* AI Shopping Advisor (F5Nexus Chat Widget) */
.chat-fab {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 90;
  background: linear-gradient(135deg, var(--primary), #e5252a);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.8rem 1.4rem;
  box-shadow: var(--shadow-glow);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.chat-fab:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 36px -4px rgba(229, 37, 42, 0.55);
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: #34c759;
  box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(52, 199, 89, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0);
  }
}

.chat-modal {
  position: fixed;
  bottom: 5.5rem;
  right: 1.75rem;
  width: 380px;
  max-width: calc(100vw - 2.5rem);
  height: 540px;
  max-height: calc(100vh - 8rem);
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  z-index: 95;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: var(--transition);
}

.chat-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-head {
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-accent));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-avatar-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg);
}

.chat-bubble {
  max-width: 85%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.45;
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--surface);
  color: var(--ink-primary);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 4px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--primary);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.chat-chip {
  font-size: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
}

.chat-chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.chat-input-bar {
  padding: 0.75rem 1rem;
  display: flex;
  gap: 0.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
}

.chat-input {
  flex: 1;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  background: var(--bg-subtle);
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary);
}

/* Interactive Product Card in Chat */
.chat-product-card {
  margin-top: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.chat-product-card img {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

/* Reviews List Styles */
.reviews-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.review-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.review-author {
  font-weight: 700;
  font-size: 0.95rem;
}

.verified-tag {
  font-size: 0.725rem;
  color: var(--status-success);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 600;
}

/* Admin Dashboard Table */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: 0.25rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-badge.pending {
  background: #fef3c7;
  color: #d97706;
}

.status-badge.pending_payment {
  background: #ffedd5;
  color: #c2410c;
  border: 1px dashed #ea580c;
}

.status-badge.confirmed {
  background: #e0f2fe;
  color: #0284c7;
}

.status-badge.shipping {
  background: #ede9fe;
  color: #7c3aed;
}

.status-badge.done {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.canceled {
  background: #fee2e2;
  color: #b91c1c;
}

/* Toast Notifications */
.toast-msg {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink-primary);
  color: var(--ink-inverse);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.gfoot {
  background: var(--surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2.5rem;
  margin-top: 4rem;
}

.gfoot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.gfoot-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--ink-primary);
}

.gfoot-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.gfoot-col a {
  color: var(--ink-secondary);
  font-size: 0.875rem;
  transition: var(--transition);
}

.gfoot-col a:hover {
  color: var(--primary);
}

.gfoot-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: var(--ink-tertiary);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Responsive Media Queries */
@media (max-width: 960px) {
  .gnav-menu {
    gap: 1.15rem;
  }

  .gnav-link {
    font-size: 11.5px;
  }
}

@media (max-width: 840px) {
  .gnav-menu {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2.15rem;
  }

  .hero-deal-pill {
    justify-content: center;
  }

  .hero-content p.subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-col-8,
  .bento-col-4,
  .bento-col-6 {
    grid-column: span 12;
  }

  .pdp-grid {
    grid-template-columns: 1fr;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .gfoot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .admin-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gnav-wrapper {
    top: 0;
    padding: 0;
    margin-bottom: 0;
  }

  .gnav {
    height: 44px;
    padding: 0 0.85rem;
  }

  .gnav-brand {
    font-size: 0.95rem;
    gap: 0.4rem;
  }

  .brand-emblem {
    width: 22px;
    height: 22px;
  }

  .action-btn {
    width: 30px;
    height: 30px;
  }

  .gnav-actions {
    gap: 0.25rem;
  }

  .top-ticker {
    font-size: 0.725rem;
    padding: 0.35rem 0.5rem;
  }

  .top-ticker-content {
    gap: 0.35rem;
  }

  .ticker-badge {
    font-size: 0.65rem;
    padding: 0.1rem 0.35rem;
  }

  .hero-section {
    padding: 0.75rem 0 1.5rem;
  }

  .hero-box {
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
  }

  .hero-content h1 {
    font-size: 1.65rem;
    line-height: 1.25;
  }

  .hero-content p.subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .hero-deal-pill {
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    gap: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .deal-prices {
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.6rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-hero-img {
    max-height: 280px;
    width: 100%;
    max-width: 280px;
    object-fit: contain;
  }

  .hero-float-tag {
    max-width: calc(100% - 1rem);
    white-space: normal;
    font-size: 0.75rem;
    padding: 0.45rem 0.85rem;
    text-align: center;
    justify-content: center;
  }

  .section-head {
    margin-bottom: 1.5rem;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .section-desc {
    font-size: 0.9rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .product-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
  }

  .product-img-wrap {
    height: 200px;
  }

  .cat-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .cat-tabs::-webkit-scrollbar {
    display: none;
  }

  .bento-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-lg);
  }

  .bento-split {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 1rem;
  }

  .bento-split-img,
  .bento-split-img-lg {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
  }

  .bento-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }

  .bento-actions .btn {
    width: 100%;
    padding: 0.55rem 0.5rem;
    font-size: 0.8rem;
  }

  #bentoThermosBtns {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem !important;
  }

  #bentoThermosBtns .btn {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.45rem 0.35rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .gfoot {
    padding: 2.5rem 0 1.5rem;
  }

  .gfoot-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .gfoot-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .trust-strip {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .chat-fab .fab-label {
    display: none;
  }

  .chat-fab {
    padding: 0.8rem;
    border-radius: var(--radius-full);
    bottom: 1rem;
    right: 1rem;
  }

  .chat-modal {
    width: 95vw;
    right: 2.5vw;
    bottom: 85px;
    height: 75vh;
    max-height: 560px;
    border-radius: var(--radius-lg);
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .modal-content,
  .auth-modal,
  .admin-auth-modal {
    width: 92%;
    max-width: 440px;
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.9rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-img-wrap {
    height: 220px;
  }

  .hero-content h1 {
    font-size: 1.45rem;
  }

  .section-title {
    font-size: 1.45rem;
  }

  .bento-title {
    font-size: 1.25rem;
  }

  .payment-methods,
  .sso-grid {
    grid-template-columns: 1fr;
  }

  .modal-content,
  .auth-modal,
  .admin-auth-modal {
    padding: 1.25rem 0.85rem;
  }
}

/* ==========================================================================
   AUTHENTICATION INTERFACE (NEXUS ID)
   ========================================================================== */
.auth-wrapper {
  padding: 2.5rem 0 4rem;
}

.auth-split-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  align-items: center;
}

.auth-perk-card {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.auth-perk-card:hover {
  transform: translateX(4px);
  border-color: var(--border-focus);
}

.auth-perk-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-glass-panel {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.auth-tabs-nav {
  display: flex;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  padding: 0.35rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-subtle);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.auth-tab-btn.active {
  background: var(--surface);
  color: var(--ink-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 0.9rem;
  color: var(--ink-tertiary);
  pointer-events: none;
  font-size: 1.2rem;
}

.input-icon-right {
  position: absolute;
  right: 0.8rem;
  background: none;
  border: none;
  color: var(--ink-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 0.2rem;
}

.input-icon-right:hover {
  color: var(--ink-primary);
}

.input-has-left-icon {
  padding-left: 2.75rem !important;
}

.input-has-right-icon {
  padding-right: 2.5rem !important;
}

.pwd-strength-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin-top: 0.5rem;
  height: 4px;
}

.strength-segment {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  transition: var(--transition);
}

.strength-segment.active-weak {
  background: #ef4444;
}

.strength-segment.active-medium {
  background: #f59e0b;
}

.strength-segment.active-good {
  background: #3b82f6;
}

.strength-segment.active-strong {
  background: #10b981;
}

.sso-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.sso-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.sso-btn:hover {
  background: var(--surface-dim);
  border-color: var(--ink-tertiary);
}

.welcome-voucher-box {
  background: linear-gradient(135deg, rgba(229, 37, 42, 0.08), rgba(229, 37, 42, 0.02));
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   ADMIN CONSOLE & RBAC MANAGEMENT
   ========================================================================== */
.admin-shell {
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-layout-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1;
}

.admin-sidebar {
  background: var(--bg-subtle);
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-nav-group-title {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ink-tertiary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  padding: 0 0.75rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
}

.admin-nav-item:hover {
  background: var(--surface);
  color: var(--ink-primary);
}

.admin-nav-item.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-subtle);
}

.admin-main-canvas {
  padding: 2rem;
  overflow-y: auto;
}

.role-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.role-card {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.role-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-focus);
}

.role-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.role-badge-pill {
  font-size: 0.675rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.matrix-table th {
  background: var(--bg-subtle);
  font-weight: 700;
  font-size: 0.825rem;
  color: var(--ink-secondary);
  text-align: center;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
  text-align: left;
}

.perm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
}

.perm-allow {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.perm-view {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.perm-deny {
  background: var(--bg-subtle);
  color: var(--ink-tertiary);
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
}

.staff-table th,
.staff-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.staff-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

/* User Account Menu Popover */
.user-menu-popover {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 220px;
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  z-index: 100;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}

.user-menu-popover.show {
  display: flex;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-primary);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.user-menu-item:hover {
  background: var(--surface-dim);
}

.user-menu-item.logout {
  color: var(--primary);
  border-top: 1px solid var(--border-subtle);
  margin-top: 0.25rem;
  padding-top: 0.65rem;
}

@media (max-width: 992px) {
  .auth-split-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .admin-layout-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    display: none;
  }

  .role-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   AUTH MODAL SYSTEM — Login / Register / Admin Login
   ========================================================================== */

/* Auth Modal Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.auth-overlay.active {
  display: flex;
  opacity: 1;
}

/* Auth Modal Box */
.auth-modal {
  background: var(--surface);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(229, 37, 42, 0.12);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-overlay.active .auth-modal {
  transform: translateY(0) scale(1);
}

/* Auth Modal Header */
.auth-modal-head {
  background: linear-gradient(135deg, var(--primary) 0%, #c0392b 100%);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.auth-modal-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  object-fit: cover;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.auth-modal-head h2 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.auth-modal-head p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  margin: 0.3rem 0 0;
}

/* Auth Modal Close Button */
.auth-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.auth-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.auth-tab-btn {
  flex: 1;
  padding: 0.85rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-tertiary);
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface);
}

/* Auth Tab Panels */
.auth-tab-panel {
  display: none;
  padding: 1.75rem 2rem;
}

.auth-tab-panel.active {
  display: block;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Auth Input Group */
.auth-input-group {
  position: relative;
  margin-bottom: 1rem;
}

.auth-input-group .input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-tertiary);
  font-size: 18px;
  pointer-events: none;
}

.auth-input-group input {
  width: 100%;
  padding: 0.75rem 0.85rem 0.75rem 2.6rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: var(--ink-primary);
  transition: var(--transition);
  box-sizing: border-box;
}

.auth-input-group input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-input-group .toggle-pw {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--ink-tertiary);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  display: flex;
  align-items: center;
}

/* CAPTCHA Widget */
.captcha-wrap {
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.captcha-canvas-wrap {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.captcha-canvas-wrap canvas {
  display: block;
}

.captcha-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.captcha-input-wrap label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-secondary);
}

.captcha-input-wrap input {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.9rem;
  font-family: monospace;
  letter-spacing: 0.1em;
  color: var(--ink-primary);
  transition: var(--transition);
  box-sizing: border-box;
}

.captcha-input-wrap input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.captcha-refresh-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--ink-secondary);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.captcha-refresh-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.captcha-error {
  font-size: 0.78rem;
  color: #e5252a;
  font-weight: 600;
  display: none;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

/* Social Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  font-size: 0.8rem;
  color: var(--ink-tertiary);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* Submit Button */
.auth-submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--primary-accent), var(--primary-hover));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-glow);
  letter-spacing: 0.02em;
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -4px rgba(229, 37, 42, 0.4);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Auth Footer Note */
.auth-footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-tertiary);
  margin-top: 1rem;
}

.auth-footer-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-note a:hover {
  text-decoration: underline;
}

/* ==============================
   ADMIN LOGIN MODAL (Special)
   ============================== */
.admin-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.admin-auth-overlay.active {
  display: flex;
  opacity: 1;
}

.admin-auth-modal {
  background: linear-gradient(160deg, #0f1117 0%, #1a1d29 100%);
  border: 1px solid rgba(229, 37, 42, 0.25);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(229, 37, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  position: relative;
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-auth-overlay.active .admin-auth-modal {
  transform: scale(1);
}

.admin-auth-header {
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(229, 37, 42, 0.15);
  position: relative;
}

.admin-shield-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, rgba(229, 37, 42, 0.2), rgba(229, 37, 42, 0.05));
  border: 2px solid rgba(229, 37, 42, 0.35);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 0 30px rgba(229, 37, 42, 0.2);
}

.admin-shield-icon .material-symbols-outlined {
  font-size: 32px;
  color: #e5252a;
}

.admin-auth-header h2 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.25rem;
}

.admin-auth-header p {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.82rem;
}

.admin-security-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(229, 37, 42, 0.1);
  border: 1px solid rgba(229, 37, 42, 0.25);
  color: #e5252a;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 0.75rem;
}

.admin-auth-body {
  padding: 2rem;
}

.admin-input-group {
  position: relative;
  margin-bottom: 1rem;
}

.admin-input-group .input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.3);
  font-size: 18px;
  pointer-events: none;
}

.admin-input-group input {
  width: 100%;
  padding: 0.85rem 0.85rem 0.85rem 2.6rem;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-main);
  font-size: 0.9rem;
  color: #fff;
  transition: var(--transition);
  box-sizing: border-box;
}

.admin-input-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.admin-input-group input:focus {
  outline: none;
  border-color: rgba(229, 37, 42, 0.6);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(229, 37, 42, 0.12);
}

.admin-input-group .toggle-pw {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  display: flex;
  align-items: center;
}

.admin-input-group .toggle-pw:hover {
  color: rgba(255, 255, 255, 0.7);
}

.admin-submit-btn {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, #e5252a, #9c0012);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 8px 24px rgba(229, 37, 42, 0.4);
  letter-spacing: 0.03em;
  margin-top: 0.5rem;
}

.admin-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(229, 37, 42, 0.5);
}

.admin-hint-text {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.25);
  margin-top: 1.25rem;
}

/* ==============================
   GNAV USER STATE (Logged In)
   ============================== */
.gnav-user-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--primary-light);
  border: 1px solid rgba(229, 37, 42, 0.2);
  border-radius: 9999px;
  padding: 0.3rem 0.75rem 0.3rem 0.3rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
  white-space: nowrap;
}

.gnav-user-chip:hover {
  background: rgba(229, 37, 42, 0.12);
}

.gnav-user-avatar {
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, var(--primary-accent), #c0392b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Error Message */
.auth-error-msg {
  background: rgba(229, 37, 42, 0.08);
  border: 1px solid rgba(229, 37, 42, 0.25);
  border-radius: var(--radius-sm);
  color: #e5252a;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.auth-error-msg.show {
  display: flex;
}

.admin-error-msg {
  background: rgba(229, 37, 42, 0.12);
  border: 1px solid rgba(229, 37, 42, 0.3);
  border-radius: var(--radius-sm);
  color: #ff6b6b;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.admin-error-msg.show {
  display: flex;
}

/* Success state */
.auth-success-state {
  text-align: center;
  padding: 2rem;
}

.auth-success-state .success-icon {
  font-size: 56px;
  color: var(--status-success);
  margin-bottom: 1rem;
}

.auth-success-state h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.auth-success-state p {
  color: var(--ink-secondary);
  font-size: 0.88rem;
}

/* Shake animation for wrong input */
@keyframes shakeX {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-6px);
  }

  40%,
  80% {
    transform: translateX(6px);
  }
}

.shake {
  animation: shakeX 0.4s ease;
}

/* Forgot password link */
.forgot-pw-link {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  color: var(--ink-tertiary);
  text-decoration: none;
  margin-top: -0.5rem;
  margin-bottom: 0.75rem;
}

.forgot-pw-link:hover {
  color: var(--primary);
}

/* Remember me checkbox */
.auth-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  color: var(--ink-secondary);
  cursor: pointer;
}

.auth-checkbox-row input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* RBAC & Role Management Enhancements */
.perm-badge.clickable {
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.perm-badge.clickable:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.perm-badge.clickable:active {
  transform: scale(0.95);
}

.role-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.role-pill-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.role-pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(229, 37, 42, 0.3);
}

.staff-role-select {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink-primary);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.staff-role-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(229, 37, 42, 0.15);
}

.audit-log-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

.audit-log-badge.success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.audit-log-badge.info {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.audit-log-badge.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.audit-log-badge.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}