:root {
  --bg-canvas: #080c14;
  --bg-surface: #0d1424;
  --bg-surface-2: #121c32;
  --bg-card: rgba(13, 20, 36, 0.85);
  --bg-card-hover: rgba(18, 28, 48, 0.95);
  --bg-input: #0a1120;
  
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --brand: #10b981;
  --brand-strong: #059669;
  --brand-light: #34d399;
  --brand-glow: rgba(16, 185, 129, 0.3);
  
  --accent: #06b6d4;
  --accent-light: #38bdf8;
  --accent-glow: rgba(6, 182, 212, 0.3);
  
  --indigo: #6366f1;
  --indigo-light: #818cf8;
  --purple: #8b5cf6;
  
  --danger: #f43f5e;
  --danger-light: #fb7185;
  --danger-bg: rgba(244, 63, 94, 0.12);
  --danger-border: rgba(244, 63, 94, 0.28);
  
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.28);
  
  --ok: #10b981;
  --ok-bg: rgba(16, 185, 129, 0.12);
  --ok-border: rgba(16, 185, 129, 0.28);
  
  --info: #0ea5e9;
  --info-bg: rgba(14, 165, 233, 0.12);
  --info-border: rgba(14, 165, 233, 0.28);
  
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-glow: rgba(56, 189, 248, 0.3);
  
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px -15px rgba(0, 0, 0, 0.65);
  
  --sidebar: 260px;
  --font-sans: 'Inter', 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', 'IBM Plex Sans Thai', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background-color: var(--bg-canvas);
  background-image: 
    radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.15) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.12) 0px, transparent 45%),
    radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient glow accents */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
  opacity: 0.6;
}
.glow-1 {
  width: 450px;
  height: 450px;
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), transparent 70%);
}
.glow-2 {
  width: 500px;
  height: 500px;
  top: 15%;
  right: -150px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.14), transparent 70%);
}
.glow-3 {
  width: 600px;
  height: 600px;
  bottom: -150px;
  left: 20%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent 70%);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(16, 185, 129, 0.35);
  color: #ffffff;
}

.wrap {
  width: min(100% - 40px, 1240px);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

body.is-admin .wrap {
  width: min(100% - 48px, 1480px);
}

.site-main {
  min-height: calc(100vh - 160px);
  position: relative;
  z-index: 1;
}

.admin-main {
  min-height: calc(100vh - 140px);
  padding-bottom: 24px;
}

/* ==========================================================================
   Navigation & Store Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 11, 19, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #031412;
  font-weight: 900;
  font-size: 18px;
  background: linear-gradient(135deg, var(--brand-light), var(--accent-light));
  box-shadow: 0 0 20px var(--brand-glow);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(4deg);
}

.brand-name {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.navlinks, .navlinks-desktop {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navlinks > a:not(.btn), .navlinks-desktop > a:not(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.18s ease;
}

.navlinks > a:not(.btn):hover, .navlinks-desktop > a:not(.btn):hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.navlinks > a.active:not(.btn), .navlinks-desktop > a.active:not(.btn) {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.nav-link-icon {
  color: var(--text-muted);
  transition: color 0.18s ease;
}

.navlinks > a:hover .nav-link-icon,
.navlinks > a.active .nav-link-icon,
.navlinks-desktop > a:hover .nav-link-icon,
.navlinks-desktop > a.active .nav-link-icon {
  color: var(--brand-light);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text);
  padding: 8px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.nav-toggle:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-2);
}

/* By default, hide mobile drawer on wide screens */
.nav-drawer,
.nav-drawer-backdrop {
  display: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: #031412;
  background: linear-gradient(135deg, var(--brand-light) 0%, #2dd4bf 50%, var(--accent-light) 100%);
  box-shadow: 0 8px 24px -4px var(--brand-glow), inset 0 1px 1px rgba(255, 255, 255, 0.4);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -4px var(--brand-glow), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px -2px var(--brand-glow);
}

.btn.secondary {
  color: var(--text-soft);
  background: rgba(15, 25, 43, 0.85);
  border: 1px solid var(--border-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn.secondary:hover {
  background: rgba(22, 36, 60, 0.95);
  border-color: rgba(56, 189, 248, 0.35);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn.danger {
  color: #ffffff;
  background: linear-gradient(135deg, #e11d48, #be123c);
  border: 1px solid var(--danger-border);
  box-shadow: 0 8px 20px -4px rgba(225, 29, 72, 0.4);
}
.btn.danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn.ghost {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn.ghost:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-strong);
}

.btn-small {
  padding: 6px 12px;
  min-height: 32px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.btn-large {
  padding: 13px 24px;
  min-height: 48px;
  font-size: 15px;
}

/* ==========================================================================
   Surfaces, Cards, Glassmorphism
   ========================================================================== */

.card, .glass {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(14, 26, 44, 0.88), rgba(9, 18, 32, 0.92));
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.card {
  padding: 24px;
}

.glass {
  padding: 28px;
  background: linear-gradient(145deg, rgba(16, 31, 53, 0.75), rgba(9, 20, 36, 0.65));
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.muted {
  color: var(--text-muted);
}

.section {
  padding: 56px 0 68px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.15;
}

.section-head p {
  margin: 8px 0 0;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 15px;
}

.mobile-stack {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  padding: 88px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: var(--brand-light);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-light);
  box-shadow: 0 0 10px var(--brand-light);
  display: inline-block;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-light);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--brand-light);
  border-radius: 99px;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #ffffff;
}

.hero-desc {
  margin: 0 0 32px;
  max-width: 660px;
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions {
  margin-bottom: 32px;
}

.hero-cta-btn {
  padding: 13px 26px;
  min-height: 50px;
  font-size: 16px;
}

.hero-trust-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}

.trust-icon {
  font-size: 15px;
}

.hero-overview {
  display: grid;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(11, 23, 40, 0.55);
  transition: all 0.2s ease;
}

.stat:hover {
  background: rgba(16, 33, 58, 0.7);
  border-color: rgba(56, 189, 248, 0.25);
  transform: translateX(4px);
}

.stat-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 20px;
}

.stat-meta b {
  display: block;
  font-size: 14px;
  color: #ffffff;
}

.stat-meta small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.stat-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

/* Feature Strip Section */
.feature-section {
  padding: 20px 0 50px;
}

.feature-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(14, 26, 44, 0.7), rgba(9, 18, 32, 0.8));
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.28);
}

.feature-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: 0 0 auto;
}

.feature-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #ffffff;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ==========================================================================
   Product Catalog & Cards
   ========================================================================== */

.product-grid {
  align-items: stretch;
}

.product-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 24px 50px -10px rgba(0, 0, 0, 0.7), 0 0 25px -5px rgba(16, 185, 129, 0.15);
}

.product-card-media {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #071321;
  border-bottom: 1px solid var(--border);
}

.product-card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(6, 13, 23, 0.6));
  pointer-events: none;
}

.product-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card-media img {
  transform: scale(1.06);
}

.product-floating-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(6, 14, 25, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--brand-light);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, #153252, #081627);
  color: var(--text-muted);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.product-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
}

.product-card h3 a {
  color: #ffffff;
}

.product-card h3 a:hover {
  color: var(--brand-light);
}

.product-summary {
  margin: 0 0 14px;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}

.product-card-meta-row {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.meta-pill.accent {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.25);
  color: var(--accent-light);
}

.price-container {
  margin: auto 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.price-val {
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #ffffff;
  font-family: var(--font-display);
}

.price-val.large {
  font-size: 36px;
  color: var(--brand-light);
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-actions .btn {
  padding-inline: 12px;
}

/* ==========================================================================
   Product Detail Page
   ========================================================================== */

.back-nav-row {
  margin-bottom: 20px;
}

.back-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.18s ease, transform 0.18s ease;
}

.back-link-btn:hover {
  color: #ffffff;
  transform: translateX(-3px);
}

/* ==========================================================================
   Product Detail (Flagship SaaS Layout)
   ========================================================================== */

.product-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  flex-wrap: wrap;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.16s ease;
}
.breadcrumb-link:hover {
  color: #ffffff;
}

.breadcrumb-separator {
  color: var(--text-dim);
  flex-shrink: 0;
}

.breadcrumb-current {
  color: var(--text-soft);
  font-weight: 600;
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-showcase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: start;
}

.product-media-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-media-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: #08101d;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  aspect-ratio: 16 / 9;
}

.product-detail-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-media-card:hover .product-detail-image {
  transform: scale(1.02);
}

.product-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  background: radial-gradient(circle at 50% 50%, #102138, #08101d);
  color: var(--text-dim);
}

.media-tag-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(8, 16, 29, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.product-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trust-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(14, 22, 38, 0.6);
  border: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-soft);
  font-weight: 600;
}
.trust-pill svg {
  color: var(--brand-light);
  flex-shrink: 0;
}

.product-purchase-card {
  padding: 32px;
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(16, 26, 44, 0.85), rgba(9, 16, 28, 0.92));
}

.product-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.product-title {
  margin: 0 0 12px;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.product-lead-copy {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.product-spec-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.spec-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(7, 15, 27, 0.55);
  border: 1px solid var(--border);
}

.spec-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.spec-icon-zap {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--warning-light);
}
.spec-icon-clock {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: var(--accent-light);
}
.spec-icon-gift {
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #c084fc;
}
.spec-icon-shield {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--brand-light);
}

.spec-copy small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.spec-copy b {
  display: block;
  font-size: 13.5px;
  color: #ffffff;
}

.product-price-panel {
  padding: 20px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.06));
  border: 1px solid rgba(16, 185, 129, 0.25);
  margin-bottom: 24px;
}

.price-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.price-meta-label {
  font-size: 12px;
  color: var(--text-muted);
}

.price-guarantee-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-light);
}

.price-value-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.price-headline {
  font-size: 34px;
  font-weight: 800;
  color: var(--brand-light);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.price-sub-caption {
  font-size: 12px;
  color: var(--text-muted);
}

.product-cta-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.product-primary-btn {
  flex: 1.2;
}

.product-support-btn {
  flex: 0.8;
}

/* Lower Details & Fulfillment */
.product-details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  margin-top: 36px;
  align-items: start;
}

.detail-card-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--brand-light);
}
.detail-icon.accent {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: var(--accent-light);
}

.detail-card-title h3 {
  margin: 0;
  font-size: 18px;
  color: #ffffff;
}

.product-description-body {
  line-height: 1.85;
  color: var(--text-soft);
  font-size: 14.5px;
}

.fulfillment-steps {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

.fulfillment-step-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.step-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--brand-light);
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-family: var(--font-display);
}

.step-text b {
  display: block;
  color: #ffffff;
  font-size: 14px;
  margin-bottom: 4px;
}

.step-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.fulfillment-policy-callout {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.fulfillment-policy-callout svg {
  color: var(--accent-light);
  flex-shrink: 0;
  margin-top: 2px;
}
.fulfillment-policy-callout b {
  display: block;
  color: var(--accent-light);
  font-size: 13px;
  margin-bottom: 3px;
}
.fulfillment-policy-callout p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Checkout Page
   ========================================================================== */

.checkout-layout {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: start;
}

.checkout-summary h2 {
  margin: 12px 0 8px;
  font-size: 26px;
  color: #ffffff;
}

.checkout-product-image {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border: 1px solid var(--border);
}

.product-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.checkout-desc {
  font-size: 14px;
  margin: 0 0 16px;
}

.checkout-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(7, 19, 33, 0.6);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.checkout-confirm {
  position: sticky;
  top: 92px;
}

.checkout-account {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(8, 20, 34, 0.7);
  margin-bottom: 20px;
}

.checkout-account-info {
  min-width: 0;
  flex: 1;
}

.checkout-account-info small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.checkout-account-info b {
  display: block;
  color: #ffffff;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Daily Pricing Stepper */
.daily-checkout-box {
  margin: 0 0 20px;
  padding: 20px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.1), rgba(8, 23, 38, 0.7));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.daily-checkout-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.daily-checkout-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
  color: #ffffff;
}

.daily-unit-price {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-light);
  font-weight: 800;
  font-size: 13px;
}

.day-stepper {
  display: grid;
  grid-template-columns: 52px minmax(110px, 1fr) 52px;
  gap: 10px;
  align-items: stretch;
}

.day-stepper-btn {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(18, 38, 62, 0.9);
  color: #ffffff;
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.18s ease;
}

.day-stepper-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(25, 54, 88, 1);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.25);
}

.day-stepper-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.day-stepper-input {
  position: relative;
}

.day-stepper-input .input {
  height: 52px;
  text-align: center;
  padding-right: 48px;
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-display);
  background: #06111f;
  border-color: rgba(56, 189, 248, 0.35);
}

.day-stepper-input span {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

.daily-range-note {
  margin: 10px 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

.daily-total-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 13, 24, 0.65);
}

.daily-total-card small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.daily-total-card span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-soft);
}

.daily-total-price {
  text-align: right;
}

.daily-total-price strong {
  display: block;
  margin-top: 2px;
  color: #ffffff;
  font-size: 26px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.checkout-submit-btn {
  width: 100%;
}

.checkout-safe-badge {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.checkout-safe-badge svg {
  flex: 0 0 auto;
  color: var(--brand-light);
}

/* ==========================================================================
   Order & Payment Page
   ========================================================================== */

.order-page {
  padding-top: 36px;
}

/* Process Stepper */
.order-stepper-card {
  margin-bottom: 28px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 26, 44, 0.8), rgba(8, 17, 30, 0.9));
  box-shadow: var(--shadow-sm);
}

.order-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.25s ease;
}

.step-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.step-node.is-done .step-circle {
  background: var(--brand-strong);
  border-color: var(--brand-light);
  color: #ffffff;
  box-shadow: 0 0 16px var(--brand-glow);
}

.step-node.is-done .step-label {
  color: #ffffff;
}

.step-node.is-active .step-circle {
  background: var(--accent);
  border-color: var(--accent-light);
  color: #ffffff;
  box-shadow: 0 0 16px var(--accent-glow);
  animation: pulse-glow 2s infinite;
}

.step-node.is-active .step-label {
  color: var(--accent-light);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-strong);
  margin: -24px 10px 0;
  position: relative;
  z-index: 1;
}

.step-line.is-done {
  background: linear-gradient(90deg, var(--brand-light), var(--accent-light));
}

.order-layout {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 1fr);
  align-items: start;
}

.order-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.order-title {
  margin: 0 0 6px;
  font-size: 24px;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.order-product-name {
  color: var(--text-soft);
  font-size: 16px;
  margin: 0 0 16px;
}

.order-breakdown-box {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(8, 20, 34, 0.6);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.order-price-breakdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}
.order-price-breakdown span { color: var(--text-muted); }
.order-price-breakdown b { color: var(--text-soft); }

.order-price-box {
  margin-bottom: 20px;
}

.order-status-list {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.order-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.order-status-row span:first-child { color: var(--text-muted); }

.delivery-credentials-card {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), rgba(6, 20, 33, 0.7));
}

.delivery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.delivery-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-light);
}

.delivery-code {
  background: #030a12;
  border-color: rgba(16, 185, 129, 0.2);
  margin-bottom: 10px;
}

.order-help-box {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
}

.help-icon {
  font-size: 20px;
}

.order-help-box b {
  display: block;
  font-size: 13px;
  color: var(--accent-light);
  margin-bottom: 3px;
}

.order-help-box p {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* PromptPay Payment Box */
.payment-recipient-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 20px;
}

.recipient-col {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(8, 20, 34, 0.7);
  border: 1px solid var(--border);
}

.recipient-col.full {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.08));
  border-color: rgba(16, 185, 129, 0.2);
}

.recipient-col small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.copyable-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.copyable-pill strong {
  font-size: 22px;
  color: var(--brand-light);
  font-family: var(--font-display);
}

.mini-copy-btn {
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.mini-copy-btn:hover {
  background: var(--brand-light);
  color: #031412;
  border-color: var(--brand-light);
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 16px 0 20px;
}

.qrbox {
  display: inline-block;
  padding: 20px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  text-align: center;
}

.qr-badge {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #003764;
  margin-bottom: 12px;
}

.qr-amount-footer {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  color: #0f172a;
  font-weight: 900;
  font-size: 18px;
  font-family: var(--font-display);
}

.qr-instruction {
  text-align: center;
  font-size: 13px;
  margin: 0 0 20px;
}

/* Slip Dropzone */
.slip-upload-dropzone {
  position: relative;
  border: 2px dashed rgba(56, 189, 248, 0.35);
  border-radius: var(--radius);
  background: rgba(8, 22, 38, 0.5);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
}

.slip-upload-dropzone:hover,
.slip-upload-dropzone.drag-hover {
  border-color: var(--accent-light);
  background: rgba(14, 165, 233, 0.1);
}

.slip-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.slip-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.upload-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.slip-dropzone-content b {
  color: #ffffff;
  font-size: 14px;
}

.slip-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.slip-preview-img {
  max-width: 100%;
  max-height: 260px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  object-fit: contain;
  box-shadow: var(--shadow);
}

.slip-preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.slip-filename {
  font-size: 12px;
  color: var(--text-soft);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slip-submit-btn {
  width: 100%;
  margin-top: 14px;
}

.payment-confirmed-box {
  padding: 40px 24px;
  text-align: center;
}

.confirmed-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid var(--brand-light);
  color: var(--brand-light);
  display: grid;
  place-items: center;
  font-size: 28px;
  margin: 0 auto 18px;
  box-shadow: 0 0 25px var(--brand-glow);
}

.payment-confirmed-box h3 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #ffffff;
}

.payment-confirmed-box p {
  max-width: 440px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.confirmed-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.input, select, textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  color: #ffffff;
  background: var(--bg-input);
  padding: 12px 16px;
  min-height: 46px;
  transition: all 0.2s ease;
}

textarea {
  resize: vertical;
  line-height: 1.65;
  min-height: 90px;
}

.input::placeholder, textarea::placeholder {
  color: var(--text-dim);
}

.input:focus, select:focus, textarea:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: #081525;
}

.input-with-icon {
  position: relative;
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-with-icon .input {
  padding-left: 42px;
}

/* ==========================================================================
   Tables & Data Grids
   ========================================================================== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(6, 15, 27, 0.6);
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th, .table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--text-muted);
  background: #0c182a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.035);
}

.table td {
  font-size: 14px;
  color: var(--text-soft);
}

.table td b {
  color: #ffffff;
}

/* ==========================================================================
   Badges, Status Pills, Signals
   ========================================================================== */

.badge, .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  border-radius: var(--radius-full);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: var(--brand-light);
  background: rgba(16, 185, 129, 0.1);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 5px 11px;
}

.badge-accent {
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-light);
}

.status {
  color: var(--text-soft);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.status-ok {
  color: var(--brand-light);
  border-color: var(--ok-border);
  background: var(--ok-bg);
}

.status-warning {
  color: var(--warning-light);
  border-color: var(--warning-border);
  background: var(--warning-bg);
}

.status-muted {
  color: var(--text-muted);
  border-color: var(--border);
}

.alert {
  margin: 18px auto 0;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-2);
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}

.alert.success {
  border-color: var(--ok-border);
  background: var(--ok-bg);
  color: #d1fae5;
}

.alert.error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: #ffe4e6;
}

.empty-state {
  padding: 38px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-align: center;
  background: rgba(6, 15, 26, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-icon {
  font-size: 36px;
  margin-bottom: 4px;
}

.empty-state b {
  font-size: 16px;
  color: #ffffff;
}

.empty-state p {
  margin: 0 0 14px;
  font-size: 13px;
  max-width: 380px;
}

/* ==========================================================================
   Account Page
   ========================================================================== */

.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}

.account-person {
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.account-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #031412;
  font-weight: 900;
  font-size: 26px;
  background: linear-gradient(135deg, var(--brand-light), var(--accent-light));
  box-shadow: 0 8px 25px var(--brand-glow);
}

.account-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-light);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.account-person h2 {
  margin: 0 0 4px;
  font-size: 26px;
  color: #ffffff;
}

.account-person p {
  margin: 0;
  font-size: 14px;
}

.account-summary {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.account-summary-item {
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(6, 17, 30, 0.6);
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-icon {
  font-size: 22px;
}

.account-summary-item small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.account-summary-item b {
  display: block;
  font-size: 18px;
  color: #ffffff;
  font-family: var(--font-display);
}

.account-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-head h3 {
  margin: 0;
  font-size: 18px;
  color: #ffffff;
}

.order-link {
  color: var(--accent-light);
  font-weight: 800;
}
.order-link:hover {
  text-decoration: underline;
}

.order-number-pill {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
}

.entitlement-list {
  display: grid;
  gap: 14px;
}

.entitlement-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(7, 19, 33, 0.65);
  transition: all 0.2s ease;
}

.entitlement-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.entitlement-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.entitlement-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.entitlement-icon {
  font-size: 16px;
}

.entitlement-head b {
  font-size: 15px;
  color: #ffffff;
}

.entitlement-detail {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.entitlement-expiry {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.entitlement-expiry b {
  color: var(--brand-light);
}

/* ==========================================================================
   Support & Chat Experience
   ========================================================================== */

.support-layout {
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  align-items: start;
}

.support-intro h2 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 3.8vw, 44px);
  color: #ffffff;
}

.support-lead {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.support-guide {
  display: grid;
  gap: 14px;
}

.support-guide-head {
  margin-bottom: 6px;
}

.guide-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  color: var(--warning-light);
  margin-bottom: 4px;
}

.support-guide-head h3 {
  margin: 0;
  font-size: 18px;
  color: #ffffff;
}

.support-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--brand-light);
  font-weight: 900;
  display: grid;
  place-items: center;
  font-size: 12px;
}

.support-step b {
  display: block;
  font-size: 14px;
  color: #ffffff;
}

.support-step small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.support-contact-info {
  margin-top: 20px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

.chat {
  height: 420px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #050e18, #071321);
  scrollbar-color: #1e334a transparent;
  display: flex;
  flex-direction: column;
}

.msg {
  max-width: 80%;
  width: max-content;
  padding: 11px 14px;
  margin: 6px 0;
  border-radius: 16px 16px 16px 4px;
  background: #0f243c;
  border: 1px solid var(--border);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.msg.me {
  margin-left: auto;
  border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, #064e43, #0d3844);
  border-color: rgba(16, 185, 129, 0.3);
}

.msg-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.msg-meta {
  display: block;
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 10px;
}

.msg.me .msg-meta {
  color: #a7f3d0;
}

.chat-compose {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 14px;
}

.chat-textarea {
  min-height: 80px;
}

.chat-compose-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(15, 30, 48, 0.85);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chat-file-button:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(22, 44, 72, 1);
  color: #ffffff;
}

.chat-file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

.chat-send-btn {
  margin-left: auto;
}

.chat-login-gate {
  padding: 50px 24px;
}

.gate-icon {
  font-size: 40px;
}

/* ==========================================================================
   Authentication Pages
   ========================================================================== */

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 180px);
  padding: 40px 0;
}

.auth-card {
  width: min(100%, 480px);
  padding: 38px;
  text-align: center;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.auth-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--brand-light);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.auth-badge-pill.admin {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--indigo-light);
}

.auth-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.auth-subtitle {
  margin: 0 auto 24px;
  max-width: 380px;
  line-height: 1.65;
  font-size: 14px;
}

.google-login-btn {
  width: 100%;
  background: #ffffff;
  color: #1e293b;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  border: 1px solid #e2e8f0;
}

.google-login-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.auth-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.5;
}

.admin-auth-card {
  text-align: left;
}

.admin-auth-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-auth-icon {
  background: linear-gradient(135deg, var(--indigo), var(--purple));
  color: #ffffff;
  margin: 0;
  flex: 0 0 auto;
}

.admin-submit-btn {
  width: 100%;
  margin-top: 8px;
}

.admin-auth-footer {
  margin-top: 20px;
  text-align: center;
}

/* ==========================================================================
   Admin Shell & Navigation
   ========================================================================== */

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 300;
  width: var(--sidebar);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #091321 0%, #060b13 100%);
  box-shadow: 15px 0 50px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  overflow-x: hidden;
}

.admin-sidebar-head {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.sidebar-close {
  display: none;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
}

.admin-sidebar-section-label {
  padding: 0 12px 10px;
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.admin-menu {
  display: grid;
  gap: 6px;
}

.admin-menu a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.16s ease;
}

.admin-menu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.admin-menu a.active {
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.25);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.admin-menu a.active::before {
  content: "";
  position: absolute;
  left: -16px;
  width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--brand-light);
  box-shadow: 0 0 12px var(--brand-glow);
}

.menu-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  transition: color 0.16s ease;
}

.menu-icon svg {
  width: 18px;
  height: 18px;
}

.admin-menu a:hover .menu-icon {
  color: var(--text-soft);
}

.admin-menu a.active .menu-icon {
  color: var(--brand-light);
}

.notification-link .notification-count {
  margin-left: auto;
}

.notification-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--danger);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.5);
}
.notification-count.is-empty {
  display: none;
}

.admin-sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.sidebar-store-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.16s ease;
}
.sidebar-store-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-user {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(9, 21, 36, 0.6);
}

.user-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e3a5f, #0d2847);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  color: #ffffff;
  font-size: 14px;
}

.user-avatar.small {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.sidebar-user-copy b {
  display: block;
  font-size: 12px;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy small {
  display: block;
  font-size: 10px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  display: grid;
  place-items: center;
  color: var(--text-muted);
}
.sidebar-logout:hover {
  color: var(--danger-light);
}

.admin-shell {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 180;
  height: 68px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 11, 19, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.sidebar-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text);
  padding: 6px;
  cursor: pointer;
}

.admin-topbar-title span {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
}

.admin-topbar-title small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.admin-topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-soft);
  transition: all 0.16s ease;
}
.topbar-icon:hover {
  background: var(--bg-surface-2);
  color: #ffffff;
}

.topbar-icon i {
  position: absolute;
  width: 8px;
  height: 8px;
  right: 7px;
  top: 7px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg-surface);
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(11, 23, 40, 0.7);
}

.topbar-profile-copy b {
  display: block;
  font-size: 12px;
  color: #ffffff;
}

.topbar-profile-copy small {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

.sidebar-backdrop {
  display: none;
}

/* ==========================================================================
   Admin Dashboard & Action Center
   ========================================================================== */

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.dashboard-kpi {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(14, 26, 44, 0.8), rgba(8, 17, 30, 0.88));
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.dashboard-kpi:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.dashboard-kpi-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.kpi-today .dashboard-kpi-icon {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.28);
  color: var(--accent-light);
}

.kpi-revenue .dashboard-kpi-icon {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.28);
  color: var(--brand-light);
}

.kpi-family .dashboard-kpi-icon {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.28);
  color: var(--indigo-light);
}

.kpi-notifications .dashboard-kpi-icon {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.28);
  color: var(--danger-light);
}

.kpi-members .dashboard-kpi-icon {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.28);
  color: #c084fc;
}

.kpi-admins .dashboard-kpi-icon {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
  color: var(--warning-light);
}

.dashboard-kpi small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.dashboard-kpi b {
  display: block;
  margin-top: 3px;
  color: #ffffff;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-family: var(--font-display);
}

.dashboard-kpi span {
  display: block;
  margin-top: 2px;
  color: var(--text-dim);
  font-size: 10px;
}

/* Action Center */
.dashboard-attention {
  margin-top: 24px;
}

.attention-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.attention-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
  color: #ffffff;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.attention-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(9, 21, 36, 0.7);
  transition: all 0.2s ease;
}

.attention-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.attention-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.attention-card.danger .attention-icon {
  background: rgba(244, 63, 94, 0.15);
  color: var(--danger-light);
}
.attention-card.danger:hover {
  border-color: rgba(244, 63, 94, 0.4);
}

.attention-card.info .attention-icon {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-light);
}
.attention-card.info:hover {
  border-color: rgba(14, 165, 233, 0.4);
}

.attention-card.info-soft .attention-icon {
  background: rgba(99, 102, 241, 0.15);
  color: var(--indigo-light);
}
.attention-card.info-soft:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.attention-card.warning .attention-icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning-light);
}
.attention-card.warning:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.attention-card.danger-soft .attention-icon {
  background: rgba(251, 113, 133, 0.15);
  color: #fda4af;
}

.attention-card small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}

.attention-card b {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  color: #ffffff;
  font-family: var(--font-display);
}

.attention-card div > span {
  display: block;
  color: var(--text-dim);
  font-size: 10px;
}

.attention-arrow {
  color: var(--text-dim);
  font-style: normal;
  transition: transform 0.18s ease;
}

.attention-card:hover .attention-arrow {
  transform: translateX(3px);
  color: #ffffff;
}

.dashboard-orders-card {
  margin-top: 24px;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   Order Signals
   ========================================================================== */

.order-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.signal-danger {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.signal-warning {
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.signal-info {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.signal-success {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.signal-muted {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.status-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.danger {
  background: var(--danger-light);
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.6);
}

.legend-dot.warning {
  background: var(--warning-light);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.legend-dot.success {
  background: var(--brand-light);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.pagination-summary {
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.16s ease;
}

.pagination-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.4);
  background: var(--bg-surface-2);
  color: #ffffff;
}

.pagination-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 182, 212, 0.2));
  border-color: var(--brand-light);
  color: #ffffff;
  box-shadow: 0 0 12px var(--brand-glow);
}

.pagination-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ==========================================================================
   Order Filter Panel & Toolbars
   ========================================================================== */

.order-filter-panel {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(14, 28, 48, 0.7), rgba(8, 18, 32, 0.7));
}

.order-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-search-box {
  position: relative;
  flex: 1;
}

.order-search-box .input {
  padding-left: 42px;
}

.order-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
}

.order-filter-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.order-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(7, 18, 30, 0.6);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.order-filter-tab b {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 10px;
}

.order-filter-tab:hover,
.order-filter-tab.active {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(14, 165, 233, 0.12);
  color: #ffffff;
}

.order-filter-tab.active b {
  background: var(--accent-light);
  color: #031412;
}

/* ==========================================================================
   Toasts
   ========================================================================== */

.system-toast-stack {
  position: fixed;
  right: 20px;
  top: 80px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 36px));
  pointer-events: none;
}

.system-toast {
  pointer-events: auto;
  display: block;
  padding: 14px 18px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(11, 23, 40, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  color: #ffffff;
  animation: toast-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.system-toast b {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.system-toast small {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

@keyframes toast-in {
  from { transform: translateY(-12px) scale(0.95); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  padding: 44px 0 54px;
  border-top: 1px solid var(--border);
  background: rgba(4, 9, 16, 0.85);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--brand-light);
  font-size: 11px;
  font-weight: 700;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.footer-badges {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--text-dim);
}

.admin-footer {
  margin-left: 0;
}

/* ==========================================================================
   Admin Settings (Modern SaaS Dashboard View)
   ========================================================================== */

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.settings-main {
  display: grid;
  gap: 24px;
}

.settings-card {
  padding: 28px;
}

.settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.settings-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.icon-brand {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: var(--indigo-light);
}
.icon-home {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  color: var(--accent-light);
}
.icon-promptpay {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--brand-light);
}
.icon-line {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
}
.icon-test {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--warning-light);
}

.section-title-wrap h3 {
  margin: 0 0 3px;
  font-size: 18px;
  color: #ffffff;
}
.section-title-wrap p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.brand-settings-box {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: rgba(7, 16, 29, 0.5);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.logo-preview-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-preview-box {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.logo-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-char-fallback {
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-light);
}

.logo-meta b {
  display: block;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 3px;
}
.logo-meta small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.logo-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.custom-file-upload-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed var(--border-strong);
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.custom-file-upload-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--brand-light);
  color: #ffffff;
}
.custom-file-upload-btn input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.check-toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--danger-light);
  cursor: pointer;
}
.check-toggle-line input {
  accent-color: var(--danger);
  width: 16px;
  height: 16px;
}

/* Settings Side Panels */
.settings-side {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 20px;
}

.settings-profile-card {
  padding: 24px;
}
.settings-profile-head {
  margin-bottom: 16px;
}
.settings-profile-head h4 {
  margin: 4px 0 0;
  font-size: 17px;
  color: #ffffff;
}

.settings-brand-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(7, 17, 30, 0.6);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.preview-logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-light), var(--accent-light));
  display: grid;
  place-items: center;
  color: #031412;
  font-weight: 800;
  overflow: hidden;
}
.preview-logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.preview-brand-copy b {
  display: block;
  font-size: 14px;
  color: #ffffff;
}
.preview-brand-copy small {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

.settings-status-checklist {
  display: grid;
  gap: 12px;
}

.checklist-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  background: var(--text-dim);
}
.status-indicator.active {
  background: var(--brand-light);
  box-shadow: 0 0 8px var(--brand-light);
}

.checklist-item b {
  display: block;
  font-size: 12.5px;
  color: #ffffff;
}
.checklist-item small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
}

.settings-save-panel {
  padding: 24px;
  border-color: rgba(56, 189, 248, 0.25);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
}

.save-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-light);
  margin-bottom: 8px;
}
.save-panel-head h3 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
}

.settings-save-panel p {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.6;
}

.settings-submit-btn {
  width: 100%;
  justify-content: center;
}

.settings-test-card {
  margin-top: 24px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.test-card-content {
  display: flex;
  align-items: center;
  gap: 16px;
}
.test-card-content h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: #ffffff;
}
.test-card-content p {
  margin: 0;
  font-size: 13px;
  max-width: 580px;
}
/* ==========================================================================
   Admin Products & Inventory Management
   ========================================================================== */

.admin-products-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.admin-table-card {
  overflow: hidden;
}

.admin-table-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.admin-table-toolbar .admin-search {
  flex: 1;
  min-width: 200px;
}

.admin-table-toolbar .admin-filter {
  width: auto;
  min-width: 140px;
}

.admin-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.admin-product-thumb {
  width: 58px;
  height: 40px;
  min-width: 58px;
  max-width: 58px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

div.admin-product-thumb.product-image-placeholder {
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: var(--text-dim);
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
}

.table th:first-child,
.table td:first-child {
  width: 74px;
  min-width: 74px;
}

.admin-product-name {
  min-width: 170px;
}

.admin-product-name b {
  display: block;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 2px;
}

.admin-product-name small {
  display: block;
  color: var(--text-dim);
  font-size: 11px;
}

.pricing-mode-note {
  display: block;
  font-size: 11px;
  color: var(--accent-light);
  margin-top: 2px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-lock-note {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.admin-help {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}

.admin-side-stack {
  display: grid;
  gap: 24px;
}

.admin-edit-preview {
  width: 100%;
  max-height: 280px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  margin: 12px 0 16px;
  display: block;
  box-shadow: var(--shadow-sm);
}

div.admin-edit-preview.product-image-placeholder {
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, #102138, #08101d);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   Admin Order Inspection & Payment Slip Viewer
   ========================================================================== */

.back-nav-row {
  margin-bottom: 20px;
}

.back-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  transition: all 0.18s ease;
  text-decoration: none;
}

.back-link-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  transform: translateX(-2px);
}

.admin-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 28px;
  align-items: start;
}

.admin-order-main {
  display: grid;
  gap: 24px;
}

.admin-order-side {
  position: sticky;
  top: 90px;
}

.admin-order-card {
  padding: 26px;
}

.admin-order-product-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(16, 33, 56, 0.6) 0%, rgba(8, 16, 29, 0.7) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 18px;
}

.product-banner-copy h4 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.product-banner-copy p {
  margin: 0;
  font-size: 13px;
}

.product-banner-price {
  text-align: right;
  flex-shrink: 0;
}

.product-banner-price small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.product-banner-price b {
  display: block;
  font-size: 24px;
  color: var(--brand-light);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.daily-order-admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  margin-bottom: 18px;
}

.daily-order-admin-summary small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.daily-order-admin-summary b {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
}

.order-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(6, 14, 25, 0.55);
  border: 1px solid var(--border);
  margin: 18px 0;
}

.order-status-item small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.admin-order-note-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 13px;
  color: var(--text-soft);
}

.admin-order-note-box b {
  display: block;
  color: #f59e0b;
  font-size: 12px;
  margin-bottom: 4px;
}

.admin-delivery-info-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.24);
}

.admin-delivery-info-box b {
  display: block;
  color: var(--brand-light);
  font-size: 12px;
  margin-bottom: 6px;
}

/* ==========================================================================
   Admin Payment Slip Inspection Box (Contained & Professional)
   ========================================================================== */

.admin-slip-card {
  margin-top: 0;
}

.admin-slip-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  border-radius: var(--radius-sm);
  background: #030811;
  border: 1px solid var(--border);
  position: relative;
}

.admin-slip-img-wrap {
  width: 100%;
  max-width: 300px;
  max-height: 440px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #07101d;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 2px 10px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.admin-slip-img-wrap:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 24px rgba(16, 185, 129, 0.15);
}

.admin-slip-img-wrap a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.admin-slip-img {
  display: block;
  max-width: 100%;
  max-height: 440px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.28s ease;
}

.admin-slip-img-wrap:hover .admin-slip-img {
  transform: scale(1.02);
}

.admin-slip-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 300px;
  margin-top: 16px;
  gap: 12px;
}

.admin-slip-meta-bar small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.admin-slip-full-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ==========================================================================
   Admin Action Panel & Fulfilled Indicators
   ========================================================================== */

.admin-action-section {
  display: grid;
  gap: 20px;
}

.admin-action-box {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(6, 14, 25, 0.55);
  border: 1px solid var(--border);
}

.admin-approve-btn {
  width: 100%;
  justify-content: center;
  margin-top: 14px;
}

.admin-assignment-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.assignment-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.assignment-title b {
  font-size: 14px;
  color: #ffffff;
}

.admin-fulfilled-box {
  text-align: center;
  padding: 24px 16px;
}

.fulfilled-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--brand-light);
  color: var(--brand-light);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

/* ==========================================================================
   Chat & Customer Support Messaging System (Admin & Storefront)
   ========================================================================== */

.admin-chat-page {
  padding: 16px 0 24px;
}

.admin-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.chat-head-status {
  flex-shrink: 0;
}

.admin-chat-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
  height: clamp(520px, calc(100vh - 210px), 740px);
}

/* Sidebar: Customers List */
.admin-chat-customers {
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: rgba(8, 16, 28, 0.75);
  border: 1px solid var(--border);
}

.chat-sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11, 23, 40, 0.65);
}

.chat-sidebar-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 14px;
}

.chat-customer-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.chat-customer-list::-webkit-scrollbar {
  width: 6px;
}

.chat-customer-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

.chat-customer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.18s ease;
  position: relative;
}

.chat-customer-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.chat-customer-item.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 78, 59, 0.22) 100%);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.customer-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.customer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #182e4b 0%, #0d1a2c 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  transition: all 0.18s ease;
}

.chat-customer-item.active .customer-avatar {
  background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.28);
}

.online-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand-light);
  border: 2px solid #081220;
}

.chat-customer-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.customer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.customer-name {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-time {
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
}

.customer-email {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-customer-empty {
  padding: 40px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
}

.chat-customer-empty svg {
  color: var(--text-dim);
  margin-bottom: 4px;
}

.chat-customer-empty b {
  color: var(--text-soft);
  font-size: 14px;
}

.chat-customer-empty p {
  font-size: 12px;
  margin: 0;
}

.chat-sidebar-pagination {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: rgba(8, 16, 28, 0.4);
}

/* Main Chat Room */
.admin-chat-room {
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #050b14;
  border: 1px solid var(--border);
}

.chat-room-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(11, 23, 40, 0.65);
  flex-shrink: 0;
}

.chat-room-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.chat-room-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #ffffff;
  font-weight: 700;
  font-size: 17px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  flex-shrink: 0;
}

.chat-room-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-room-info h4 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-room-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.chat-room-email {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dot-sep {
  opacity: 0.5;
}

.chat-order-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--brand-light);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.18s ease;
}

.chat-order-link:hover {
  text-decoration: underline;
  opacity: 0.9;
}

.chat-room-actions {
  flex-shrink: 0;
}

/* Chat Messages Viewport */
.chat-viewport-wrap,
.chat-container-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(14, 30, 52, 0.28), transparent 70%), #040912;
}

.chat {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.chat::-webkit-scrollbar {
  width: 6px;
}

.chat::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Chat Messages Bubbles */
.msg {
  display: flex;
  flex-direction: column;
  max-width: 76%;
  width: fit-content;
  align-self: flex-start;
  gap: 6px;
  animation: msgFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.msg-text {
  padding: 12px 18px;
  border-radius: 16px 16px 16px 4px;
  background: rgba(18, 33, 54, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.msg-meta {
  font-size: 11px;
  color: var(--text-dim);
  padding: 0 4px;
}

/* Outgoing Message (Me) */
.msg.me {
  align-self: flex-end;
  align-items: flex-end;
}

.msg.me .msg-text {
  border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, #0d7557 0%, #064e3b 100%);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.16), 0 2px 6px rgba(0, 0, 0, 0.3);
}

.msg.me .msg-meta {
  color: var(--brand-light);
  opacity: 0.88;
}

/* Chat Attachments */
.msg-attachments {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.chat-attachment {
  text-decoration: none;
}

.chat-attachment-image {
  display: block;
  max-width: 280px;
  max-height: 240px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #030811;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.chat-attachment-image:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.4);
}

.chat-attachment-image img {
  display: block;
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.chat-attachment-image:hover img {
  transform: scale(1.03);
}

.chat-attachment-image span {
  display: block;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(3, 8, 17, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-attachment-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(9, 18, 32, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  transition: all 0.18s ease;
  max-width: 320px;
}

.chat-attachment-file:hover {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.chat-file-ext {
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--brand-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.chat-file-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.chat-file-copy b {
  font-size: 13px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-file-copy small {
  font-size: 11px;
  color: var(--text-dim);
}

/* Chat Compose Form */
.chat-compose {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: #060c17;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.chat-input-wrapper {
  position: relative;
  width: 100%;
}

.chat-compose-textarea,
.chat-textarea {
  width: 100%;
  min-height: 56px;
  max-height: 140px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(14, 25, 42, 0.85);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  font-size: 14px;
  resize: none;
  font-family: inherit;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.chat-compose-textarea:focus,
.chat-textarea:focus {
  background: rgba(16, 29, 50, 0.95);
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.chat-compose-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-tools-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-file-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.chat-file-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  color: #ffffff;
}

.chat-file-button input[type="file"] {
  display: none;
}

.file-hint,
.file-limit-note {
  font-size: 11px;
}

.chat-tools-right {
  display: flex;
  align-items: center;
}

.chat-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.chat-file-selection {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-selected-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 12px;
  color: var(--text-soft);
}

.chat-selected-file b {
  color: #ffffff;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-form-error {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  font-size: 12px;
}

/* Empty Chat Panel */
.admin-chat-empty-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  height: 100%;
  text-align: center;
  color: var(--text-dim);
}

.empty-chat-graphic {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: grid;
  place-items: center;
  color: var(--brand-light);
  margin-bottom: 20px;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.1);
}

.admin-chat-empty-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #ffffff;
}

.admin-chat-empty-panel p {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
  line-height: 1.6;
}

/* Storefront Support Chat Card Height & Enhancements */
.support-chat-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  min-height: 600px;
}

.support-chat-card .chat-header-panel {
  padding: 18px 24px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 23, 40, 0.65);
}

.support-chat-card .chat-container-wrap {
  height: 520px;
}

/* ==========================================================================
   Responsive Rules
   ========================================================================== */

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 60px;
  }
  .hero-overview {
    max-width: 640px;
  }
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .attention-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two, .account-grid, .product-detail, .support-layout, .checkout-layout, .order-layout, .product-showcase-layout, .product-details-grid, .settings-grid, .admin-products-layout, .admin-order-layout {
    grid-template-columns: 1fr;
  }
  .product-showcase-layout, .admin-products-layout, .admin-order-layout {
    gap: 24px;
  }
  .checkout-confirm, .settings-side, .admin-order-side {
    position: static;
  }
  .admin-chat-layout {
    grid-template-columns: 1fr;
    height: auto;
    gap: 20px;
  }
  .admin-chat-customers {
    max-height: 250px;
    height: auto;
  }
  .admin-chat-room {
    height: 560px;
  }
  .admin-sidebar {
    transform: translateX(-102%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }
  body.sidebar-open .admin-sidebar {
    transform: translateX(0);
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(3, 8, 14, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }
  .sidebar-close {
    display: grid;
    place-items: center;
  }
  .admin-shell {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: grid;
    place-items: center;
  }
}

@media (max-width: 768px) {
  .wrap, body.is-admin .wrap {
    width: min(100% - 28px, 100%);
  }
  
  .navlinks-desktop {
    display: none !important;
  }
  
  .nav-toggle {
    display: grid;
    place-items: center;
  }
  
  body.nav-open {
    overflow: hidden;
  }
  
  /* Mobile Navigation Drawer Backdrop */
  .nav-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(3, 8, 14, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.24s ease, visibility 0.24s ease;
  }
  
  .nav-drawer-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  /* Mobile Navigation Drawer */
  .nav-drawer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(340px, 86vw);
    z-index: 999;
    padding: 24px 20px;
    border-left: 1px solid var(--border-strong);
    background: #081220;
    background: linear-gradient(180deg, #0a1728 0%, #060e1b 100%);
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.85);
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-drawer.open {
    transform: translateX(0);
  }
  
  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-drawer-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.18s ease;
  }
  
  .nav-drawer-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }
  
  .nav-drawer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
  }
  
  .nav-drawer-links > a {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s ease;
  }
  
  .nav-drawer-links > a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
  }
  
  .nav-drawer-links > a.active {
    color: #ffffff;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.3);
  }
  
  .drawer-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all 0.18s ease;
  }
  
  .nav-drawer-links > a:hover .drawer-icon,
  .nav-drawer-links > a.active .drawer-icon {
    color: var(--brand-light);
    background: rgba(16, 185, 129, 0.18);
  }
  
  .nav-drawer-logout {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 14px !important;
    color: #f87171 !important;
  }
  
  .nav-drawer-logout:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
  }
  
  .nav-drawer-logout .drawer-icon {
    color: #f87171 !important;
  }
  
  .nav-drawer-auth {
    margin-top: 14px;
  }
  
  .nav-drawer-login-btn {
    width: 100%;
    justify-content: center;
  }
  
  .nav-drawer-footer {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--border);
  }
  
  .drawer-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--brand-light);
    font-weight: 700;
  }
  
  .hero {
    padding: 50px 0 40px;
  }
  .hero-title {
    font-size: clamp(32px, 8.5vw, 48px);
  }
  .feature-strip-grid {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 36px 0 48px;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .account-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }
  .account-summary {
    width: 100%;
  }
  .account-summary-item {
    flex: 1;
  }
  .footer-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-meta {
    align-items: flex-start;
  }
  .order-stepper {
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .step-label {
    font-size: 10px;
  }
  .attention-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-kpis {
    grid-template-columns: 1fr;
  }
  .product-trust-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .product-purchase-card, .settings-card {
    padding: 20px 18px;
  }
  .product-cta-group {
    flex-direction: column;
    align-items: stretch;
  }
  .product-primary-btn, .product-support-btn {
    width: 100%;
    justify-content: center;
  }
  .settings-section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-order-product-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .product-banner-price {
    text-align: left;
  }
  .order-status-grid,
  .daily-order-admin-summary {
    grid-template-columns: 1fr;
  }
  .admin-slip-frame {
    padding: 20px 14px;
  }
  .admin-slip-meta-bar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
  }
  .admin-slip-full-btn {
    width: 100%;
    justify-content: center;
  }
  .admin-chat-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .chat-compose-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .chat-tools-right,
  .chat-send-btn {
    width: 100%;
    justify-content: center;
  }
  .msg {
    max-width: 88%;
  }
}

@media (max-width: 520px) {
  .product-actions {
    grid-template-columns: 1fr;
  }
  .payment-recipient-card {
    grid-template-columns: 1fr;
  }
  .recipient-col.full {
    grid-column: span 1;
  }
  .attention-grid {
    grid-template-columns: 1fr;
  }
  .account-summary {
    flex-direction: column;
  }
  .price-value-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .brand-settings-box {
    padding: 14px;
  }
  .logo-upload-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .custom-file-upload-btn {
    width: 100%;
    justify-content: center;
  }
  .price-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

/* ==========================================================================
   User Profile Avatars & Admin OAuth Styling
   ========================================================================== */

.avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  flex-shrink: 0;
}

.user-avatar,
.account-avatar,
.customer-avatar,
.chat-room-avatar,
.person-avatar,
.member-avatar,
.member-profile-avatar,
.admin-profile-avatar {
  position: relative;
  overflow: hidden;
}

.user-avatar.mini {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 10px;
}

.member-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e3a5f, #0d2847);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  color: #ffffff;
  font-size: 15px;
  flex-shrink: 0;
}

.person-cell {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.person-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #182e4b, #0d1a2c);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 800;
  color: #ffffff;
  font-size: 13px;
  flex-shrink: 0;
}

.person-avatar.admin-avatar {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  border-color: rgba(99, 102, 241, 0.3);
}

.member-profile-avatar,
.admin-profile-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a5f, #0d2847);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  color: #ffffff;
  font-size: 22px;
  flex-shrink: 0;
}

.admin-profile-avatar {
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  border-color: rgba(99, 102, 241, 0.35);
  margin: 0 auto 16px;
}

.admin-oauth-section {
  margin-bottom: 22px;
}

.admin-google-btn {
  margin-bottom: 0;
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  margin: 18px 0 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-divider span {
  padding: 0 12px;
}

/* ==========================================================================
   Admin Database Management System
   ========================================================================== */
.admin-database-page {
  animation: fadeIn 0.3s ease-out;
}

.db-head {
  margin-bottom: 24px;
}

.db-head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.db-kpi-card {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.db-kpi-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.db-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-kpi-icon.icon-storage {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.db-kpi-icon.icon-tables {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.db-kpi-icon.icon-health {
  color: #a855f7;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.db-kpi-icon.icon-backup {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.db-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.db-kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.db-kpi-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-display);
  letter-spacing: -0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-kpi-sub {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.db-nav-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}

.db-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-soft);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.db-tab-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.1);
}

.db-tab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.15));
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15);
}

.db-tab-badge {
  background: rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--text);
}

.db-tab-btn.active .db-tab-badge {
  background: rgba(16, 185, 129, 0.4);
  color: #ffffff;
}

/* Tab 1: Overview Grid */
.db-overview-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1080px) {
  .db-overview-grid {
    grid-template-columns: 1fr;
  }
}

.db-overview-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.db-table-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: color 0.15s ease;
}

.db-table-link:hover {
  color: var(--accent-light);
}

.table-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  color: var(--accent-light);
  flex-shrink: 0;
}

.db-row-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}

.db-row-badge.has-data {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.db-row-badge.is-empty {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-dim);
}

.db-meta-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

.db-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 12px;
}

.db-meta-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.db-meta-key {
  color: var(--text-muted);
}

.db-meta-val {
  color: var(--text);
  text-align: right;
}

.code-path {
  font-family: var(--font-sans);
  font-size: 12px;
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--accent-light);
  word-break: break-all;
}

/* Tab 2: Tables Explorer */
.db-table-selector-wrap {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.db-table-nav-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.db-table-select-quick-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.db-quick-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  white-space: nowrap;
}

.db-quick-label svg {
  color: var(--accent-light);
}

.db-select-inline {
  height: 38px;
  min-height: 38px;
  padding: 6px 32px 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  background: rgba(8, 20, 36, 0.95);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  cursor: pointer;
  width: auto;
  min-width: 220px;
}

.db-select-inline:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.db-table-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.db-table-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.db-table-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--text);
}

.db-table-pill.active {
  background: rgba(16, 185, 129, 0.16);
  border-color: var(--brand);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
}

.db-table-pill .pill-count {
  font-size: 11px;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.35);
  padding: 1px 6px;
  border-radius: 6px;
}

.db-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
  flex-wrap: wrap;
}

.db-table-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-large-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-light);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-table-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.db-schema-drawer {
  padding: 22px;
  background: rgba(4, 8, 16, 0.5);
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.2s ease-out;
}

.db-schema-drawer h4 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.db-schema-table {
  font-size: 13px;
}

.db-schema-index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.db-schema-index-list li {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.db-code-block {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  background: #060a12;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 16px;
  border-radius: 10px;
  color: #38bdf8;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0;
}

.db-search-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: rgba(0, 0, 0, 0.1);
}

.db-search-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.db-limit-selector {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.db-limit-btn {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  transition: all 0.15s ease;
}

.db-limit-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.db-limit-btn.active {
  color: #ffffff;
  background: var(--brand);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}

.db-table-count-summary {
  font-size: 13px;
  color: var(--text-muted);
}

.db-sort-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  transition: color 0.15s ease;
}

.db-sort-header:hover,
.db-sort-header.is-sorted {
  color: var(--accent-light);
}

.db-sort-header .sort-indicator {
  font-size: 11px;
  opacity: 0.6;
}

.db-sort-header.is-sorted .sort-indicator {
  opacity: 1;
}

.pk-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-radius: 4px;
  padding: 1px 4px;
  font-size: 9px;
  font-weight: 800;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.db-data-scroll {
  position: relative;
  overflow-x: auto;
  scrollbar-width: thin;
  max-width: 100%;
}

.db-data-table {
  font-size: 13px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Sticky Left (Checkbox) */
.col-sticky-left {
  position: sticky;
  left: 0;
  background: #091322;
  box-shadow: 3px 0 10px rgba(0, 0, 0, 0.45);
}
thead .col-sticky-left {
  z-index: 5;
  background: #0d1b30;
}
tbody td.col-sticky-left {
  z-index: 3;
}

/* Sticky Right (Actions) */
.col-sticky-right {
  position: sticky;
  right: 0;
  background: #091322;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.45);
}
thead .col-sticky-right {
  z-index: 5;
  background: #0d1b30;
}
tbody td.col-sticky-right {
  z-index: 3;
}

/* Row Hover & Selection */
.db-data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}
.db-data-table tbody tr:hover td.col-sticky-left,
.db-data-table tbody tr:hover td.col-sticky-right {
  background: #0f223d;
}

.db-data-table tbody tr.is-selected td {
  background: rgba(56, 189, 248, 0.12) !important;
}
.db-data-table tbody tr.is-selected td.col-sticky-left,
.db-data-table tbody tr.is-selected td.col-sticky-right {
  background: #112847 !important;
}

.db-data-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
  vertical-align: middle;
}

.db-data-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-cell-null {
  color: var(--text-dim);
  font-style: italic;
  font-size: 11px;
}

.db-cell-hash {
  color: var(--text-dim);
  font-style: italic;
  font-size: 11px;
  opacity: 0.6;
}

.db-cell-date {
  font-size: 12px;
  color: var(--text-soft);
}

.db-json-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  font-family: monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.db-json-chip:hover {
  background: rgba(99, 102, 241, 0.3);
  color: #ffffff;
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

/* Tab 3: Backups & Restore */
.db-backups-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1080px) {
  .db-backups-layout {
    grid-template-columns: 1fr;
  }
}

.db-backups-forms {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.db-backup-name-box {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-light);
}

.db-backup-filename {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}

.db-backup-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

/* Tab 4: Maintenance */
.db-maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.db-action-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.db-action-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.db-action-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-action-icon.icon-vacuum {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-light);
}

.db-action-icon.icon-optimize {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--brand-light);
}

.db-action-head h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.db-action-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.db-action-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  border: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.db-integrity-reports {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
}

.db-report-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-report-line {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-family: monospace;
}

.db-report-line.ok {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.db-report-line.error {
  background: rgba(244, 63, 94, 0.1);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Tab 5: SQL Console */
.db-preset-chips-wrap {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.1);
}

.db-preset-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.db-preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.db-preset-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.db-sql-form {
  padding: 20px;
}

.db-sql-textarea {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 14px;
  line-height: 1.6;
  background: #060a12;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 14px;
}

.db-sql-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* Modal for JSON & details */
.db-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.db-modal-card {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.db-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.db-modal-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.db-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 6px;
}

.db-modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.db-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.db-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

/* Database Row Actions & Modals */
.db-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.db-form-modal {
  max-width: 820px;
}

.db-form-body {
  max-height: 65vh;
  overflow-y: auto;
  padding: 20px 24px;
}

.db-form-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.db-edit-field {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}

.db-edit-field:focus-within {
  border-color: var(--accent-light);
  background: rgba(255, 255, 255, 0.04);
}

.db-field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.db-field-label-row label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.db-null-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  margin: 0;
}

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

.db-null-checkbox:hover {
  color: var(--text);
}

.db-modal-foot-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.db-modal-foot-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Floating Bulk Actions Bar */
.db-bulk-bar {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  animation: slideUp 0.25s ease-out;
}

.db-bulk-bar-content {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 20px;
  background: rgba(11, 23, 40, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9999px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(56, 189, 248, 0.2);
}

.db-bulk-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #f8fafc;
  white-space: nowrap;
}

.db-bulk-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 9999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  display: inline-grid;
  place-items: center;
}

.db-bulk-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Delete Confirmation Modal & Bypass Foreign Keys */
.db-delete-modal-card {
  max-width: 520px;
  border-color: rgba(244, 63, 94, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(244, 63, 94, 0.15);
}

.db-delete-head {
  border-bottom: 1px solid rgba(244, 63, 94, 0.2);
}

.db-delete-head-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.db-delete-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #f43f5e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.db-modal-subtitle {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.db-delete-desc {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 0 0 14px;
}

.db-delete-preview-box {
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 13px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  color: #f8fafc;
  word-break: break-all;
  margin-bottom: 16px;
  max-height: 120px;
  overflow-y: auto;
}

.db-force-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 8px;
}

.db-force-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.db-force-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--warning, #f59e0b);
  cursor: pointer;
  flex-shrink: 0;
}

.db-force-text b {
  display: block;
  color: #fbbf24;
  font-size: 13.5px;
  margin-bottom: 3px;
}

.db-force-text small {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ==========================================================================
   Order Status Pills & Pulse Dots
   ========================================================================== */
.status-warning .pulse-dot {
  background: var(--warning-light, #fbbf24);
  box-shadow: 0 0 10px var(--warning-light, #fbbf24);
}

.status-danger {
  color: var(--danger-light, #fb7185);
  border-color: var(--danger-border, rgba(244, 63, 94, 0.28));
  background: var(--danger-bg, rgba(244, 63, 94, 0.12));
}

.status-danger .pulse-dot {
  background: var(--danger-light, #fb7185);
  box-shadow: 0 0 10px var(--danger-light, #fb7185);
}

/* ==========================================================================
   Customer Notification Dropdown & Popover
   ========================================================================== */
.user-notification-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.topbar-icon.user-notify-btn {
  position: relative;
  width: 38px;
  height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.18s ease;
}

.topbar-icon.user-notify-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-strong);
  color: #ffffff;
}

.topbar-icon .notification-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--danger, #f43f5e);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--bg-canvas, #080c14);
}

.topbar-icon .notification-count.is-empty {
  display: none;
}

.user-notification-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 350px;
  max-width: calc(100vw - 32px);
  background: rgba(13, 20, 36, 0.96);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7);
  z-index: 1000;
  animation: toast-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.notify-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.notify-popover-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text);
}

.notify-popover-title svg {
  color: var(--accent-light);
}

.notify-popover-mark-all {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.notify-popover-mark-all:hover {
  background: rgba(6, 182, 212, 0.12);
  color: #ffffff;
}

.notify-popover-body {
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notify-popover-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  text-decoration: none;
  transition: background 0.15s ease;
  position: relative;
}

.notify-popover-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notify-popover-item.is-unread {
  background: rgba(6, 182, 212, 0.06);
}

.notify-popover-item.is-unread::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 8px var(--accent-light);
}

.notify-popover-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--accent-light);
}

.notify-popover-content {
  flex: 1;
  min-width: 0;
}

.notify-popover-item-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 3px;
}

.notify-popover-item-msg {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 4px;
  word-break: break-word;
}

.notify-popover-item-time {
  font-size: 10.5px;
  color: var(--text-dim);
}

.notify-popover-foot {
  padding: 11px 18px;
  border-top: 1px solid var(--border);
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.notify-view-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-light);
  text-decoration: none;
}

.notify-view-all:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Account Notifications & Activities Panel
   ========================================================================== */
.account-notifications-panel {
  grid-column: 1 / -1;
  margin-top: 12px;
}

.notification-activity-list {
  display: grid;
  gap: 10px;
}

.notification-activity-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transition: all 0.16s ease;
}

.notification-activity-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
}

.notification-activity-item.is-unread {
  border-color: rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.04);
}

.notify-activity-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.notify-activity-icon.notify-type-payment_approved,
.notify-activity-icon.notify-type-order_fulfilled {
  color: var(--brand-light);
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.notify-activity-icon.notify-type-slip_submitted {
  color: var(--warning-light);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
}

.notify-activity-icon.notify-type-support_reply {
  color: var(--accent-light);
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.1);
}

.notify-activity-content {
  flex: 1;
  min-width: 0;
}

.notify-activity-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 3px;
}

.notify-activity-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.notify-unread-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.notify-activity-time {
  font-size: 11.5px;
  margin-left: auto;
}

.notify-activity-msg {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.notify-activity-action {
  flex-shrink: 0;
}



