/* ==========================================================================
   assets/css/style.css
   Chompoo AI Profile – Unified Master Stylesheet
   Mobile-first, 100% Vanilla CSS
   ========================================================================== */

/* ─────────────────────────────────────────────────────────────
   1. DESIGN TOKENS & COLOR PALETTE
   ───────────────────────────────────────────────────────────── */
:root {
  /* Brand Palette – Chompoo AI Studio Labs */
  --color-wine:    #2a0833; /* Deep violet-plum base */
  --color-sakura:  #e60067; /* Vibrant Chompoo magenta */
  --color-magenta: #ff2a85; /* Electric hot pink */
  --color-orange:  #ff6a3d; /* Sunset coral orange */
  --color-cyan:    #00b4d8; /* AI neon cyan */
  --color-navy:    #0d1124; /* Deep midnight navy text/header */
  --color-copper:  #a98a6b;
  --color-cream:   #fdf8f5;

  /* Logo Signature Gradients */
  --gradient-brand:  linear-gradient(135deg, #ff2a85 0%, #e60067 50%, #2a0833 100%);
  --gradient-accent: linear-gradient(90deg, #ff2a85 0%, #ff7a00 50%, #00b4d8 100%);
  --gradient-dark:   linear-gradient(150deg, #1a0526 0%, #0d1124 100%);
  --gradient-glow:   radial-gradient(circle at 50% 0%, rgba(255, 42, 133, 0.22) 0%, transparent 60%);

  /* Neutrals */
  --color-white:   #ffffff;
  --color-gray-50: #fafafa;
  --color-gray-100:#f4f4f5;
  --color-gray-200:#e4e4e7;
  --color-gray-300:#d4d4d8;
  --color-gray-400:#a1a1aa;
  --color-gray-600:#52525b;
  --color-gray-800:#27272a;
  --color-black:   #18181b;

  /* Semantic Feedback */
  --color-success: #16a34a;
  --color-error:   #dc2626;
  --color-warning: #d97706;
  --color-info:    #2563eb;

  /* Typography */
  --font-serif: 'Noto Serif Thai', 'Georgia', serif;
  --font-sans:  'Noto Sans Thai', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border Radius */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms ease;

  /* Layout Max Widths */
  --max-w-card:   480px;
  --max-w-dash:   880px;
  --max-w-admin: 1200px;

  /* Default Profile Theme Variables */
  --theme-primary:   #2a0833;
  --theme-secondary: #e60067;
  --theme-accent:    #ff6a3d;
  --theme-bg:        #fdf6f9;
  --theme-card:      #ffffff;
  --theme-text:      #18181b;
  --theme-muted:     #71717a;
  --theme-btn-text:  #ffffff;
}

/* ─────────────────────────────────────────────────────────────
   2. PROFILE THEMES (data-theme)
   ───────────────────────────────────────────────────────────── */
/* Theme: Wine (Chompoo AI Deep Plum Signature) */
[data-theme="wine"] {
  --theme-primary:   #23062b;
  --theme-secondary: #c20056;
  --theme-accent:    #ff2a85;
  --theme-bg:        #fbf3f8;
  --theme-card:      #ffffff;
  --theme-text:      #18181b;
  --theme-muted:     #71717a;
  --theme-btn-text:  #ffffff;
}
[data-theme="wine"] .profile-card-badge {
  background: linear-gradient(135deg, #ff2a85 0%, #e60067 50%, #2a0833 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 10px rgba(230, 0, 103, 0.4) !important;
}

/* Theme: Sakura (Chompoo AI Vivid Neon Magenta) */
[data-theme="sakura"] {
  --theme-primary:   #d80064;
  --theme-secondary: #ff3377;
  --theme-accent:    #ff7a00;
  --theme-bg:        #fff2f7;
  --theme-card:      #ffffff;
  --theme-text:      #18181b;
  --theme-muted:     #71717a;
  --theme-btn-text:  #ffffff;
}
[data-theme="sakura"] .profile-card-badge {
  background: linear-gradient(135deg, #ff7a00 0%, #ff3377 50%, #d80064 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 10px rgba(255, 51, 119, 0.45) !important;
}

/* Theme: Copper */
[data-theme="copper"] {
  --theme-primary:   #7a5c3a;
  --theme-secondary: #a98a6b;
  --theme-accent:    #d97706;
  --theme-bg:        #fdf8f4;
  --theme-card:      #ffffff;
  --theme-text:      #27272a;
  --theme-muted:     #78716c;
  --theme-btn-text:  #ffffff;
}
[data-theme="copper"] .profile-card-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 45%, #7a5c3a 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4) !important;
}

/* Theme: Cream (ครีม / Warm Luxury Ivory) */
[data-theme="cream"] {
  --theme-primary:   #8a6d4e;
  --theme-secondary: #c4a47c;
  --theme-accent:    #e60067;
  --theme-bg:        #fbf7f0;
  --theme-card:      #ffffff;
  --theme-text:      #27272a;
  --theme-muted:     #78716c;
  --theme-btn-text:  #ffffff;
}

[data-theme="cream"] .profile-hero {
  background: linear-gradient(160deg, #f7f0e6 0%, #eddcc7 100%) !important;
  box-shadow: 0 4px 20px rgba(138, 109, 78, 0.08);
}
[data-theme="cream"] .profile-name {
  color: #3b2814 !important;
}
[data-theme="cream"] .profile-nickname {
  color: #7a5c3e !important;
}
[data-theme="cream"] .profile-headline {
  color: #523f2f !important;
}
[data-theme="cream"] .profile-position,
[data-theme="cream"] .preview-job-title {
  color: #3b2814 !important;
  text-shadow: none !important;
}
[data-theme="cream"] .profile-work-badge,
[data-theme="cream"] .preview-work-badge,
[data-theme="cream"] .workplace-chip,
[data-theme="cream"] .preview-workplace-chip {
  background: rgba(122, 92, 62, 0.12) !important;
  border: 1px solid rgba(122, 92, 62, 0.25) !important;
  color: #3b2814 !important;
  box-shadow: 0 2px 6px rgba(122, 92, 62, 0.06) !important;
}
[data-theme="cream"] .profile-work-badge *,
[data-theme="cream"] .preview-work-badge *,
[data-theme="cream"] .workplace-chip *,
[data-theme="cream"] .preview-workplace-chip * {
  color: #3b2814 !important;
}
[data-theme="cream"] .profile-work-dot,
[data-theme="cream"] .preview-work-dot {
  color: #7a5c3e !important;
  opacity: 0.7 !important;
}
[data-theme="cream"] .profile-class {
  background: rgba(122, 92, 62, 0.12) !important;
  border-color: rgba(122, 92, 62, 0.25) !important;
  color: #3b2814 !important;
}
[data-theme="cream"] .profile-menu-toggle,
[data-theme="cream"] .preview-menu-btn {
  background: rgba(122, 92, 62, 0.12) !important;
  border: 1px solid rgba(122, 92, 62, 0.2) !important;
}
[data-theme="cream"] .hamburger-icon span {
  background: #3b2814 !important;
}
[data-theme="cream"] .profile-card-badge {
  background: linear-gradient(135deg, #b89065 0%, #8a6d4e 50%, #523f2f 100%) !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(82, 63, 47, 0.35) !important;
}
[data-theme="cream"] .section-label {
  color: #8a6d4e !important;
}
[data-theme="cream"] .link-btn__icon {
  background: #f7f0e6 !important;
  color: #8a6d4e !important;
}
[data-theme="cream"] .link-btn:hover {
  background: #8a6d4e !important;
  border-color: #8a6d4e !important;
  color: #ffffff !important;
}

/* Theme: Dark (ธีมมืด / Modern OLED Dark Mode) */
[data-theme="dark"] {
  --theme-primary:   #27272a;
  --theme-secondary: #09090b;
  --theme-accent:    #e60067;
  --theme-bg:        #0c0a09;
  --theme-card:      #1c1917;
  --theme-text:      #fafaf9;
  --theme-muted:     #a8a29e;
  --theme-btn-text:  #ffffff;
}

[data-theme="dark"] .profile-card-badge {
  background: linear-gradient(135deg, #52525b 0%, #27272a 60%, #18181b 100%) !important;
  color: #fafaf9 !important;
  border-color: #52525b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

[data-theme="dark"] .profile-hero {
  background: linear-gradient(160deg, #27272a 0%, #09090b 100%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .profile-avatar {
  border-color: #27272a !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6) !important;
}
[data-theme="dark"] .profile-actions {
  background: #1c1917 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .profile-action-btn {
  background: #292524 !important;
  color: #fafaf9 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}
[data-theme="dark"] .profile-action-btn:hover {
  background: #e60067 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .profile-bio-section {
  background: #1c1917 !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .section-label {
  color: #ff3377 !important;
}
[data-theme="dark"] .profile-bio-text {
  color: #e7e5e4 !important;
}
[data-theme="dark"] .link-btn {
  background: #1c1917 !important;
  color: #fafaf9 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}
[data-theme="dark"] .link-btn:hover {
  background: #e60067 !important;
  border-color: #e60067 !important;
  color: #ffffff !important;
}
[data-theme="dark"] .link-btn__icon {
  background: #292524 !important;
  color: #ff3377 !important;
}
[data-theme="dark"] .link-btn:hover .link-btn__icon {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}
[data-theme="dark"] .link-btn__arrow {
  color: #78716c !important;
}
[data-theme="dark"] .link-btn:hover .link-btn__arrow {
  color: #ffffff !important;
}

/* ─────────────────────────────────────────────────────────────
   3. RESET & BASE
   ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-gray-800);
  background: var(--color-gray-50);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--color-sakura);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--color-wine);
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────
   4. TYPOGRAPHY
   ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-wine);
}

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: var(--space-3); }
p:last-child { margin-bottom: 0; }

/* ─────────────────────────────────────────────────────────────
   5. BUTTONS
   ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: background var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible {
  outline: 3px solid var(--color-sakura);
  outline-offset: 2px;
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Variants */
.btn--primary {
  background: var(--gradient-brand);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(230, 0, 103, 0.35);
}
.btn--primary:hover {
  box-shadow: 0 6px 18px rgba(230, 0, 103, 0.5);
  transform: translateY(-1px);
  color: var(--color-white);
}
.btn--primary:active { transform: translateY(0); }

.btn--sakura {
  background: var(--color-sakura);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(179,36,92,0.3);
}
.btn--sakura:hover {
  background: #961d4c;
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn--secondary {
  background: var(--color-gray-100);
  color: var(--color-gray-800);
  border-color: var(--color-gray-200);
}
.btn--secondary:hover {
  background: var(--color-gray-200);
  color: var(--color-gray-800);
  border-color: var(--color-gray-300);
  transform: translateY(-1px);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  border-color: var(--color-gray-300);
  color: var(--color-gray-800);
}
.btn--outline:hover {
  background: var(--color-gray-100);
  border-color: var(--color-gray-400);
}

.btn--outline-wine {
  background: transparent;
  border-color: var(--color-wine);
  color: var(--color-wine);
}
.btn--outline-wine:hover {
  background: var(--color-wine);
  color: var(--color-white);
}

.btn--ghost {
  background: transparent;
  color: var(--color-gray-600);
  padding: 8px 18px;
  min-height: 38px;
}
.btn--ghost:hover {
  background: var(--color-gray-100);
  color: var(--color-gray-800);
}

.btn--danger {
  background: var(--color-error);
  color: var(--color-white);
}
.btn--danger:hover {
  background: #b91c1c;
  color: var(--color-white);
}

.btn--sm {
  padding: 8px 18px;
  font-size: 0.85rem;
  min-height: 38px;
}
.btn--lg {
  padding: 12px 28px;
  font-size: 1.05rem;
  min-height: 52px;
}
.btn--full,
.btn--block {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.btn--center {
  display: inline-flex;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────
   6. FORMS
   ───────────────────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--space-5);
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-gray-800);
  margin-bottom: 8px;
  line-height: 1.4;
  letter-spacing: 0.2px;
}
.form-label--required::after {
  content: ' *';
  color: var(--color-error);
}

.form-control {
  width: 100%;
  padding: 11px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-gray-800);
  background: var(--color-white);
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  min-height: 48px;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--color-sakura);
  box-shadow: 0 0 0 3px rgba(230,0,103,0.15);
}
.form-control::placeholder { color: var(--color-gray-400); }
.form-control:disabled {
  background: var(--color-gray-100);
  cursor: not-allowed;
  opacity: 0.7;
}

textarea.form-control {
  min-height: 110px;
  padding: 12px 16px;
  resize: vertical;
  line-height: 1.6;
}

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding: 11px 16px;
  padding-right: 2.75rem;
  min-height: 48px;
  line-height: 1.5;
}

.form-error {
  font-size: 0.82rem;
  color: var(--color-error);
  margin-top: var(--space-1);
}
.form-hint {
  font-size: 0.8rem;
  color: var(--color-gray-600);
  margin-top: var(--space-1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.pass-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: 0.4rem;
  transition: all 0.3s;
}

/* ─────────────────────────────────────────────────────────────
   7. ALERTS & FLASH MESSAGES
   ───────────────────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: var(--space-5);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  border: 1px solid transparent;
}
.alert--success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.alert--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.alert--warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.alert--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* ─────────────────────────────────────────────────────────────
   8. MODAL SYSTEM
   ───────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 1.5rem;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  transform: scale(0.92);
  transition: transform 0.2s;
}
.modal-overlay.active .modal-box { transform: scale(1); }
.modal-box h3 {
  font-family: var(--font-serif);
  color: var(--color-wine);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.modal-close {
  display: block;
  width: 100%;
  padding: 0.65rem;
  border: none;
  border-radius: 99px;
  background: var(--color-wine);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: opacity 0.15s;
}
.modal-close:hover { opacity: 0.9; }

/* ─────────────────────────────────────────────────────────────
   9. NAVIGATION / HEADER
   ───────────────────────────────────────────────────────────── */
.site-header {
  background: var(--color-navy);
  color: var(--color-cream);
  padding: 0.75rem var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  border-bottom: 2px solid;
  border-image: var(--gradient-accent) 1;
}
.site-header__logo {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--color-white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.site-header__logo img {
  height: 38px;
  width: auto;
  border-radius: 8px;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.site-header__logo:hover {
  color: var(--color-white);
  text-decoration: none;
  opacity: 0.95;
}
.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.site-header__nav a {
  color: rgba(247,240,230,0.85);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}
.site-header__nav a:hover {
  color: var(--color-cream);
  text-decoration: none;
}
.site-header__nav .btn--secondary {
  background: #ffffff;
  border: 1.5px solid #ffffff;
  color: #1e1b4b !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.site-header__nav .btn--secondary:hover,
.site-header__nav .btn--secondary:focus-visible {
  background: #fdf2f8;
  border-color: #fbcfe8;
  color: #be0055 !important;
  box-shadow: 0 4px 14px rgba(255, 42, 133, 0.25);
  transform: translateY(-1px);
  text-decoration: none !important;
}
.site-header__nav .btn--primary {
  color: #ffffff !important;
}
.site-header__nav .btn--ghost {
  color: var(--color-cream) !important;
}
.site-header__nav .btn--ghost:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 680px) {
  .site-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }
  .site-header__nav {
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    justify-content: flex-start;
  }
  .site-header__nav .btn--sm {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-height: 34px;
  }
}

/* ─────────────────────────────────────────────────────────────
   10. LAYOUT CONTAINERS & CARDS
   ───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w-dash);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
.container--card  { max-width: var(--max-w-card); }
.container--admin { max-width: var(--max-w-admin); }
.container--wide  { max-width: 1440px !important; width: 98% !important; padding: 0 var(--space-4) !important; }

.page-header {
  padding: var(--space-6) 0 var(--space-4);
  border-bottom: 1px solid var(--color-gray-200);
  margin-bottom: var(--space-6);
}
.page-header h1 { margin-bottom: var(--space-1); }
.page-header p  { color: var(--color-gray-600); font-size: 0.95rem; }

.page-main { padding: var(--space-6) 0 var(--space-12); }

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  margin-bottom: var(--space-6);
  padding: 24px;
  box-sizing: border-box;
}
.card:has(.card__header),
.card:has(.card__body) {
  padding: 0;
}

.card--elevated {
  background: var(--color-white);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  padding: 24px;
  margin-bottom: var(--space-6);
  overflow: hidden;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .card,
  .card--elevated {
    padding: 20px 16px;
  }
}
.card__header {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-wine);
}
.card__body { padding: var(--space-6); }
.card__footer {
  padding: var(--space-4) var(--space-6);
  background: var(--color-gray-50);
  border-top: 1px solid var(--color-gray-100);
}

/* ─────────────────────────────────────────────────────────────
   11. TOGGLE SWITCH
   ───────────────────────────────────────────────────────────── */
.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  user-select: none;
}
.switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch__track {
  width: 48px;
  height: 26px;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}
.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--color-white);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}
.switch__input:checked + .switch__track {
  background: var(--color-sakura);
}
.switch__input:checked + .switch__track .switch__thumb {
  transform: translateX(22px);
}
.switch__input:focus-visible + .switch__track {
  outline: 3px solid var(--color-sakura);
  outline-offset: 2px;
}
.switch__label { font-size: 0.9rem; font-weight: 500; }

/* ─────────────────────────────────────────────────────────────
   12. LOADING SPINNER
   ───────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─────────────────────────────────────────────────────────────
   13. AUTH PAGES (Login / Register / Reset)
   ───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  background: radial-gradient(circle at 85% 15%, rgba(255, 42, 133, 0.22) 0%, transparent 45%),
              radial-gradient(circle at 15% 85%, rgba(0, 180, 216, 0.18) 0%, transparent 45%),
              linear-gradient(150deg, #190526 0%, #290833 50%, #0d1124 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
}
.auth-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  padding: var(--space-8) var(--space-6);
  width: 100%;
  max-width: 440px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}
.auth-box--wide { max-width: 500px; }
.auth-top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.75rem;
}
.auth-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}
.auth-back-btn:hover {
  color: #e60067;
  background: #fff1f2;
  border-color: #fecdd3;
  transform: translateX(-3px);
}
.auth-box form {
  width: 100%;
}
.auth-box form > .btn {
  margin-left: auto;
  margin-right: auto;
}
.auth-box form > .btn--block,
.auth-box form > .btn--full {
  width: 100%;
  display: flex;
  justify-content: center;
}
.auth-box__logo {
  text-align: center;
  margin-bottom: var(--space-6);
}
.auth-logo-img {
  max-height: 85px;
  width: auto;
  margin: 0 auto 0.75rem;
  display: block;
  filter: drop-shadow(0 4px 14px rgba(230,0,103,0.2));
}
.auth-box__logo h1 {
  font-size: 1.8rem;
  color: var(--color-wine);
  margin-bottom: var(--space-1);
}
.auth-box__logo p {
  color: var(--color-gray-600);
  font-size: 0.9rem;
  margin: 0;
}
.auth-box__footer {
  text-align: center;
  margin-top: var(--space-6);
  font-size: 0.88rem;
  color: var(--color-gray-600);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-sakura);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--color-wine);
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-gray-100);
}

/* ─────────────────────────────────────────────────────────────
   14. TABLES, STATS & PAGINATION
   ───────────────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: hidden;
  width: 100%;
}
@media (max-width: 768px) {
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
th, td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-gray-200);
}
th {
  background: var(--color-gray-100);
  font-weight: 600;
  color: var(--color-gray-600);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--color-gray-50); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}
.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-card__number {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-wine);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.stat-card__label {
  font-size: 0.82rem;
  color: var(--color-gray-400);
  font-weight: 500;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
}

.pagination {
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  margin-top: 1.5rem;
}
.pagination a, .pagination span {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gray-200);
  font-size: 0.88rem;
  color: var(--color-gray-800);
  text-decoration: none;
}
.pagination a:hover {
  background: var(--color-gray-100);
}
.pagination .active {
  background: var(--color-wine);
  color: #fff;
  border-color: var(--color-wine);
}

/* ─────────────────────────────────────────────────────────────
   15. LANDING PAGE
   ───────────────────────────────────────────────────────────── */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 42, 133, 0.28) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(0, 180, 216, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(255, 106, 61, 0.12) 0%, transparent 55%),
    linear-gradient(150deg, #180524 0%, #25062c 40%, #0d1124 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.landing-hero-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  padding: 2.5rem 2rem;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  animation: landingFadeIn 0.8s ease-out;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}
@keyframes landingFadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
.landing__logo-wrap {
  margin: 0 auto 1.25rem;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.landing__logo-img {
  max-height: 140px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(255, 42, 133, 0.35));
  display: block;
  margin: 0 auto;
}
.landing__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 1.15rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.82rem;
  color: #ff9ec4;
  font-weight: 600;
  margin: 0 auto 1.5rem;
  letter-spacing: 0.04em;
  width: fit-content;
}
.landing__tagline {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto 2rem;
  line-height: 1.6;
  font-weight: 400;
  text-align: center;
  max-width: 440px;
}
.landing__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 0 auto 2rem;
  width: 100%;
}
.landing__feat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.85rem 0.5rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.landing__feat span {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.35rem;
}
.landing__actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.btn-landing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 48px;
  text-align: center;
}
.btn-landing--primary {
  background: linear-gradient(135deg, #ff2a85 0%, #e60067 50%, #3a0845 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(230, 0, 103, 0.45);
  border: none;
}
.btn-landing--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(230, 0, 103, 0.6);
  color: #ffffff;
  text-decoration: none;
}
.btn-landing--outline {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.btn-landing--outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffffff;
  transform: translateY(-2px);
  color: #ffffff;
  text-decoration: none;
}
.landing__demo {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  text-align: center;
  width: 100%;
}
.landing__demo a {
  color: #00d2ff;
  text-decoration: underline;
}
.landing__demo a:hover { color: #ffffff; }
.landing__footer {
  margin-top: 2.5rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-sans);
  text-align: center;
}

@media (max-width: 480px) {
  .landing {
    padding: 2rem 1rem;
  }
  .landing-hero-card {
    padding: 2rem 1.25rem;
    border-radius: 22px;
  }
  .landing__logo-img {
    max-height: 110px;
  }
  .landing__features {
    gap: 0.5rem;
  }
  .landing__feat {
    padding: 0.65rem 0.4rem;
    font-size: 0.78rem;
  }
  .btn-landing {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .landing {
    padding: 1.5rem 0.75rem;
  }
  .landing-hero-card {
    padding: 1.5rem 0.85rem;
    border-radius: 18px;
  }
  .landing__features {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
}

/* ─────────────────────────────────────────────────────────────
   16. PUBLIC PROFILE PAGE (/u/{slug})
   ───────────────────────────────────────────────────────────── */
body.profile-page {
  background: var(--theme-bg);
  font-family: var(--font-sans);
  min-height: 100vh;
  color: var(--theme-text);
  padding-bottom: 3rem;
}

.profile-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 0 2rem;
  position: relative;
}

.profile-hero {
  background: linear-gradient(160deg, var(--theme-primary) 0%, var(--theme-secondary) 100%);
  padding: 2.4rem 1.5rem 2.2rem;
  border-radius: 0 0 26px 26px;
  position: relative;
  text-align: center;
  overflow: visible;
}
.profile-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0 0 26px 26px;
  overflow: hidden;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}
.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  background: #e4e4e7;
  display: block;
}
.profile-card-badge {
  position: absolute;
  bottom: 2px;
  right: -2px;
  background: linear-gradient(135deg, #ff2a85 0%, #e60067 50%, #3a0845 100%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  border: 2px solid rgba(255,255,255,0.9);
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(230,0,103,0.35);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.profile-name {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 5vw, 1.75rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.2rem;
  line-height: 1.3;
}
.profile-nickname {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}
/* ─── Profile Work / Position & Companies Layout ─── */
.profile-work-info,
.preview-work-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0.35rem auto 0.55rem;
  max-width: 92%;
  box-sizing: border-box;
}

.profile-position,
.preview-job-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  text-align: center;
  word-break: break-word;
}

.profile-workplaces-list,
.preview-workplaces-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
}

.workplace-chip,
.preview-workplace-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  line-height: 1.35;
  text-align: center;
  word-break: break-word;
  transition: all 0.2s ease;
}

.workplace-chip:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.profile-work-badge,
.preview-work-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0.25rem auto 0.45rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ffffff;
  max-width: 90%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}
.profile-work-badge span,
.preview-work-badge span {
  color: inherit;
}
.profile-work-dot,
.preview-work-dot {
  opacity: 0.7;
}
.profile-class {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.9);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,0.25);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}
.profile-headline {
  color: rgba(255,255,255,0.88);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}

.profile-actions {
  background: var(--theme-card);
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  margin: -1.6rem 1rem 1.2rem;
  padding: 1.1rem 1rem;
  position: relative;
  z-index: 10;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}
.profile-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  background: var(--theme-bg);
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--theme-primary);
  transition: all 0.15s;
  text-decoration: none;
  min-width: 68px;
  -webkit-tap-highlight-color: transparent;
}
.profile-action-btn:hover, .profile-action-btn:focus-visible {
  background: var(--theme-primary);
  color: #fff;
  border-color: var(--theme-primary);
  text-decoration: none;
  transform: translateY(-1px);
}
.profile-action-btn .icon { font-size: 1.4rem; line-height: 1; }

/* ─── Profile Top-Right Hamburger Menu ──────────────────────── */
.profile-menu-wrap {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 100;
}
.profile-menu-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.profile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}
.profile-menu-toggle.active {
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.profile-menu-toggle.active .hamburger-icon span {
  background: var(--theme-primary, #2a0833);
}

.hamburger-icon {
  width: 18px;
  height: 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.hamburger-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, background 0.2s ease;
}
.profile-menu-toggle.active .hamburger-icon span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.profile-menu-toggle.active .hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: translateX(-6px);
}
.profile-menu-toggle.active .hamburger-icon span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.profile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(2px);
  z-index: 95;
  animation: fadeIn 0.2s ease;
}
.profile-menu-backdrop.active {
  display: block;
}

.profile-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.25), 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px 8px;
  transform-origin: top right;
  transform: scale(0.9) translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  z-index: 100;
}
.profile-menu-dropdown.active {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.profile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px 8px 12px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 6px;
}
.profile-menu-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.3px;
}
.profile-menu-close {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}
.profile-menu-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.profile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #1e293b;
  font-family: 'Noto Sans Thai', sans-serif;
  text-align: left;
  transition: background 0.15s, transform 0.1s;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.profile-menu-item:hover, .profile-menu-item:focus-visible {
  background: #f8fafc;
  color: var(--theme-primary, #2a0833);
  transform: translateX(3px);
  text-decoration: none;
}
.profile-menu-item .item-icon {
  font-size: 1.25rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 10px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.profile-menu-item:hover .item-icon {
  background: rgba(42, 8, 51, 0.08);
}
.profile-menu-item .item-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.profile-menu-item .item-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}
.profile-menu-item .item-desc {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.2;
  margin-top: 2px;
}
.profile-menu-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 4px 6px;
}
.profile-menu-item--highlight {
  background: rgba(42, 8, 51, 0.04);
  border: 1px dashed rgba(42, 8, 51, 0.2);
}
.profile-menu-item--highlight:hover {
  background: rgba(42, 8, 51, 0.08);
}
.profile-menu-item--highlight .item-label {
  color: var(--theme-primary, #2a0833);
}

.profile-body {
  padding: 0 1rem;
  margin-top: 1.25rem;
}

.profile-bio-section {
  background: var(--theme-card);
  border-radius: 16px;
  padding: 1.25rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.section-label {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-primary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.profile-bio-text {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--theme-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-links-section { margin-bottom: 1rem; }
.link-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  background: var(--theme-card);
  border-radius: 14px;
  margin-bottom: 0.6rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  text-decoration: none;
  color: var(--theme-text);
  transition: all 0.15s;
  border: 1.5px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.link-btn:hover, .link-btn:focus-visible {
  border-color: var(--theme-primary);
  background: var(--theme-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  text-decoration: none;
}
.link-btn__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--theme-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--theme-primary);
  transition: all 0.15s;
}
.link-btn:hover .link-btn__icon,
.link-btn:focus-visible .link-btn__icon {
  background: rgba(255,255,255,0.2);
  color: #fff;
}
.link-btn__icon svg { width: 20px; height: 20px; }
.link-btn__label {
  font-size: 0.95rem;
  font-weight: 600;
  flex: 1;
}
.link-btn__arrow {
  color: var(--theme-muted);
  font-size: 1rem;
  flex-shrink: 0;
  transition: color 0.15s;
}
.link-btn:hover .link-btn__arrow { color: rgba(255,255,255,0.7); }

.profile-gallery-section { margin-bottom: 1rem; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
.gallery-item {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--theme-bg);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
  display: block;
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item__caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 0.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.gallery-item:hover .gallery-item__caption { opacity: 1; }
.gallery-item__caption span {
  font-size: 0.72rem;
  color: #fff;
  line-height: 1.3;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox__img {
  max-width: 92vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
}
.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__caption {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  text-align: center;
  background: rgba(0,0,0,0.4);
  padding: 0.4rem 1rem;
  border-radius: 99px;
  max-width: 90vw;
}

.profile-footer {
  text-align: center;
  padding: 2rem 1rem 1rem;
  font-size: 0.75rem;
  color: var(--theme-muted);
}
.profile-footer a { color: var(--theme-muted); }

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background: var(--theme-bg);
}
.error-page__emoji { font-size: 4rem; margin-bottom: 1rem; }
.error-page h1 { color: var(--theme-primary); margin-bottom: 0.5rem; }
.error-page p  { color: var(--theme-muted); margin-bottom: 1.5rem; }

@media (min-width: 480px) {
  .profile-wrap { padding: 1.5rem 0.75rem 3rem; position: relative; }
  .profile-hero { border-radius: 24px; }
  .profile-hero::before { border-radius: 24px; }
  .profile-actions { display: none; }
  .profile-body { padding: 0; }
}

/* ─────────────────────────────────────────────────────────────
   17. DASHBOARD & LIVE PHONE PREVIEW
   ───────────────────────────────────────────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}
@media (min-width: 1024px) {
  .dash-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 420px);
    align-items: start;
    padding: 2rem 1.5rem 5rem;
  }
}

.dash-forms-col { min-width: 0; }
.dash-preview-col { display: none; }

@media (min-width: 1024px) {
  .dash-preview-col {
    display: block;
    position: sticky;
    top: 80px;
    height: calc(100vh - 100px);
    overflow-y: auto;
    padding-bottom: 2rem;
    scrollbar-width: thin;
  }
}

.btn-mobile-preview {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border-radius: 99px;
  background: var(--gradient-brand);
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(230, 0, 103, 0.45);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-mobile-preview:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(230, 0, 103, 0.6);
  color: #fff;
}
@media (min-width: 1024px) {
  .btn-mobile-preview { display: none !important; }
}

.mobile-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.mobile-preview-overlay.active {
  opacity: 1;
  visibility: visible;
}
.mobile-preview-container {
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 36px;
  position: relative;
}
.mobile-preview-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 1100;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-mockup {
  background: #0d1124;
  border: 12px solid #161a33;
  border-radius: 46px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}
.phone-mockup__screen {
  background: var(--theme-bg, #f9f0f4);
  max-height: 720px;
  overflow-y: auto;
  scrollbar-width: none;
}
.phone-mockup__screen::-webkit-scrollbar { display: none; }
.phone-mockup__header {
  background: #27272a;
  color: #a1a1aa;
  font-size: 0.72rem;
  padding: 0.4rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.avatar-edit-box {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  padding: 1.5rem 1.75rem;
  background: #f8fafc;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}
.avatar-preview-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  border: 3.5px solid #fff;
  background: #e4e4e7;
  flex-shrink: 0;
}
.avatar-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.avatar-actions-wrap .btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}
.avatar-actions-wrap .btn {
  padding: 9px 20px;
  font-size: 0.88rem;
  min-height: 40px;
}

/* ─────────────────────────────────────────────────────────────
   Dashboard Layout & Visual Spacing Refinements
   ───────────────────────────────────────────────────────────── */
.form-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 640px) {
  .form-2col {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.url-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--color-white);
  padding: 16px 22px;
  border-radius: 16px;
  border: 1px solid var(--color-gray-200);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}
.url-bar a {
  font-weight: 600;
  color: var(--color-sakura);
  text-decoration: none;
  word-break: break-all;
}

/* Live Preview Refinements (Phone Mockup inside Dashboard) */
.live-preview-screen .profile-bio-section {
  padding: 16px 18px !important;
  border-radius: 14px;
  margin-bottom: 0.85rem;
}
.live-preview-screen .link-btn {
  padding: 12px 16px !important;
  margin-bottom: 0.65rem !important;
  border-radius: 14px;
  gap: 12px;
}
.live-preview-screen .link-btn__icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px;
}
.live-preview-screen .link-btn__label {
  font-size: 0.88rem !important;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   Theme Color Swatch Picker (Horizontal Row Layout)
   ───────────────────────────────────────────────────────────── */
.theme-picker {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 1.5rem !important;
  flex-wrap: wrap !important;
  padding: 8px 0 4px;
}

.theme-swatch-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s ease;
}

.theme-swatch-item:hover {
  transform: translateY(-2px);
}

.theme-swatch {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  border: 3.5px solid #ffffff !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15), 0 0 0 1.5px rgba(0, 0, 0, 0.12) !important;
  outline: none !important;
  margin: 0 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  flex-shrink: 0;
}

.theme-swatch:checked {
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(230, 0, 103, 0.4), 0 0 0 3px #e60067 !important;
  border: 3px solid #ffffff !important;
}

.theme-swatch-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #64748b;
  transition: color 0.2s ease;
}

.theme-swatch-item:hover .theme-swatch-label,
.theme-swatch:checked + .theme-swatch-label {
  color: #1e1b4b;
  font-weight: 700;
}

.theme-swatch--custom {
  position: relative;
}
.theme-swatch--custom::after {
  content: '🎨';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}
.btn-pro-preset {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-pro-preset:hover {
  transform: translateY(-2px);
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.btn-pro-preset:active {
  transform: translateY(0);
}

/* Cropper Modal */
.cropper-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.cropper-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.cropper-modal-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 1.5rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  text-align: center;
}
.cropper-viewport-wrap {
  position: relative;
  width: 290px;
  height: 290px;
  margin: 1.25rem auto;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 3px #ff2a85, 0 10px 30px rgba(255, 42, 133, 0.25);
  background: #180320;
  touch-action: none;
  cursor: grab;
  user-select: none;
  box-sizing: border-box;
}
.cropper-viewport-wrap:active { cursor: grabbing; }
#cropperCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #180320;
}
.cropper-controls {
  margin: 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}
.cropper-controls label {
  font-size: 0.85rem;
  color: var(--color-gray-600);
}
.cropper-controls input[type="range"] { width: 180px; }

/* Drag & Drop Links */
.drag-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
.drag-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
  user-select: none;
}
.drag-item.dragging {
  opacity: 0.5;
  border-color: var(--color-sakura);
  box-shadow: 0 8px 20px rgba(179,36,92,0.15);
  transform: scale(1.02);
}
.drag-item.drag-over {
  border-color: var(--color-sakura);
  border-style: dashed;
  background: rgba(179,36,92,0.04);
}
.drag-handle {
  cursor: grab;
  color: var(--color-gray-400);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0.2rem;
  touch-action: none;
}
.drag-handle:active { cursor: grabbing; }
.drag-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-gray-100);
  color: var(--color-wine);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.drag-item__icon svg { width: 18px; height: 18px; }
.drag-item__content {
  flex: 1;
  min-width: 0;
}
.drag-item__title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-gray-800);
}
.drag-item__subtitle {
  font-size: 0.78rem;
  color: var(--color-gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.drag-item__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.drag-item--hidden {
  opacity: 0.5;
  background: var(--color-gray-50);
}
.drag-item--over-quota {
  border-style: dashed;
  border-color: #fde68a;
  background: #fffdf5;
}

/* Gallery Manager */
.gallery-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.gallery-manage-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-gray-100);
  aspect-ratio: 1;
  border: 1.5px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.gallery-manage-card--hidden-plan {
  border: 2px dashed #fbcfe8;
  filter: grayscale(35%);
  opacity: 0.78;
}
.gallery-manage-card--hidden-plan:hover {
  filter: grayscale(0%);
  opacity: 1;
}
.gallery-manage-card__status-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.gallery-manage-card__status-tag--hidden {
  background: rgba(190, 24, 93, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.gallery-manage-card__status-tag--visible {
  background: rgba(5, 150, 105, 0.88);
}
.gallery-manage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-manage-card__del {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(220, 38, 38, 0.9);
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.gallery-manage-card__del:hover {
  transform: scale(1.1);
  background: #b91c1c;
}
.gallery-manage-card__caption {
  position: absolute;
  bottom: 0;
  inset-inline: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.5rem 0.4rem 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dashboard Toast */
.dash-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #18181b;
  color: #ffffff;
  padding: 10px 24px;
  border-radius: 99px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  z-index: 99999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  pointer-events: none;
}
.dash-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────
   18. ADMIN PANEL
   ───────────────────────────────────────────────────────────── */
.admin-nav-link {
  color: rgba(247,240,230,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.admin-nav-link:hover, .admin-nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
  text-decoration: none;
}

.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.batch-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.batch-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.batch-modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.user-avatar-mini {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--color-gray-200);
  background: var(--color-gray-100);
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .grid-2col { grid-template-columns: 1fr 1fr; }
}

/* ─────────────────────────────────────────────────────────────
   19. UTILITY CLASSES
   ───────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-muted  { color: var(--color-gray-600); }
.text-wine   { color: var(--color-wine); }
.text-sakura { color: var(--color-sakura); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.78rem; }
.text-lg     { font-size: 1.125rem; }
.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }

.d-flex          { display: flex; }
.d-grid          { display: grid; }
.d-none          { display: none !important; }
.align-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1           { gap: var(--space-1); }
.gap-2           { gap: var(--space-2); }
.gap-3           { gap: var(--space-3); }
.flex-wrap       { flex-wrap: wrap; }
.flex-column     { flex-direction: column; }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.w-full { width: 100%; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ─────────────────────────────────────────────────────────────
   20. RESPONSIVE BREAKPOINTS
   ───────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .container { padding: 0 var(--space-6); }
  .auth-box  { padding: var(--space-10) var(--space-8); }
}

@media (min-width: 1024px) {
  .page-main { padding: var(--space-10) var(--space-8); }
}

/* ─────────────────────────────────────────────────────────────
   21. PHYSICAL SMART CARD PRINTING STYLES (CR80 85.6mm x 54mm)
   ───────────────────────────────────────────────────────────── */

/* Themes for CR80 Print Card */
.theme-slate {
  --card-dark-bg: #424653;
  --card-dark-shadow: #282b33;
  --card-light-bg: #dedee4;
  --card-vert-primary: #3b4252;
  --card-vert-accent: #4c566a;
  --card-vert-wave-bg: #88c0d0;
  --card-vert-wave-fg: #3b4252;
}
.theme-wine {
  --card-dark-bg: #2a0833;
  --card-dark-shadow: #18031e;
  --card-light-bg: #faeef6;
  --card-vert-primary: #801336;
  --card-vert-accent: #c72c41;
  --card-vert-wave-bg: #f38ba8;
  --card-vert-wave-fg: #801336;
}
.theme-sakura {
  --card-dark-bg: #801336;
  --card-dark-shadow: #4d0a20;
  --card-light-bg: #fff0f5;
  --card-vert-primary: #a61248;
  --card-vert-accent: #e60067;
  --card-vert-wave-bg: #ff85b8;
  --card-vert-wave-fg: #e60067;
}
.theme-copper {
  --card-dark-bg: #4d3824;
  --card-dark-shadow: #2e2115;
  --card-light-bg: #f5ede4;
  --card-vert-primary: #6d4c2b;
  --card-vert-accent: #a0522d;
  --card-vert-wave-bg: #e2b17a;
  --card-vert-wave-fg: #6d4c2b;
}
.theme-midnight {
  --card-dark-bg: #18191c;
  --card-dark-shadow: #0b0c0d;
  --card-light-bg: #ebecee;
  --card-vert-primary: #18191c;
  --card-vert-accent: #2d3748;
  --card-vert-wave-bg: #718096;
  --card-vert-wave-fg: #18191c;
}
.theme-navy {
  --card-dark-bg: #102a43;
  --card-dark-shadow: #061727;
  --card-light-bg: #e0f2fe;
  --card-vert-primary: #0056b3;
  --card-vert-accent: #0066cc;
  --card-vert-wave-bg: #3fa0f7;
  --card-vert-wave-fg: #0056b3;
}
.theme-emerald {
  --card-dark-bg: #133926;
  --card-dark-shadow: #081d13;
  --card-light-bg: #e8f5e9;
  --card-vert-primary: #135e38;
  --card-vert-accent: #2e8b57;
  --card-vert-wave-bg: #6ee7b7;
  --card-vert-wave-fg: #135e38;
}

/* Page body in print view */
.print-page-body {
  background-color: #eef0f4;
  color: #1e2025;
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Top Sticky Print Toolbar (Screen Only) */
.print-toolbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: #2a0833;
  color: #ffffff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}
.print-toolbar__header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.print-toolbar__back-wrap {
  display: flex;
  align-items: center;
}
.print-toolbar__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 99px;
  white-space: nowrap;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  text-decoration: none;
  transition: all 0.2s ease;
}
.print-toolbar__back-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.28) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: translateX(-2px);
  text-decoration: none;
}
.print-toolbar__quick-edit {
  display: flex;
  align-items: center;
}
.print-toolbar__edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  white-space: nowrap;
}
.print-toolbar__title-block {
  display: flex;
  flex-direction: column;
}
.print-toolbar__title-block .badge-tag {
  background: rgba(255,255,255,0.15);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  width: fit-content;
  margin-bottom: 2px;
}
.print-toolbar__heading {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  line-height: 1.35;
  letter-spacing: 0.2px;
  word-break: normal;
  overflow-wrap: break-word;
}
.print-toolbar__card-id {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  margin-top: 1px;
}
.print-toolbar__center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.print-mode-selector {
  display: flex;
  background: rgba(0,0,0,0.28);
  border-radius: 99px;
  padding: 3px;
  gap: 3px;
}
.mode-btn {
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.75);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mode-btn:hover {
  color: #ffffff;
}
.mode-btn.active {
  background: #ffffff;
  color: #2a0833;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.mode-label-desktop {
  display: inline;
}
.mode-label-mobile {
  display: none;
}
.print-toolbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.print-toolbar .btn--secondary {
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 42, 133, 0.45);
  color: #ff9ec4 !important;
  backdrop-filter: blur(8px);
}
.print-toolbar .btn--secondary:hover,
.print-toolbar .btn--secondary:focus-visible {
  background: var(--color-sakura, #e60067) !important;
  border-color: var(--color-sakura, #e60067) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(230, 0, 103, 0.45);
  transform: translateY(-1px);
  text-decoration: none !important;
}
.print-toolbar a.btn:hover {
  text-decoration: none !important;
}
.mobile-sticky-print-bar {
  display: none;
}

/* ── Card Styling & Theme Control Bar (Screen Only) ─────── */
.print-styling-bar {
  background: #191c26;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 9px 20px;
}
.print-styling-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  flex-wrap: wrap;
}
.styling-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.styling-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.styling-label svg {
  flex-shrink: 0;
  opacity: 0.85;
}
.template-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tpl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.tpl-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.tpl-btn.active {
  background: var(--color-copper, #c77966);
  border-color: #ffffff;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(199, 121, 102, 0.45);
}
.wood-preview-btn {
  background: rgba(210, 166, 121, 0.16);
  border: 1px solid rgba(210, 166, 121, 0.4);
  color: #deb887;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.wood-preview-btn:hover {
  background: rgba(210, 166, 121, 0.28);
  color: #ffffff;
  border-color: #deb887;
}
.wood-preview-btn.active {
  background: #c89565;
  color: #2b1810;
  border-color: #f5deb3;
  box-shadow: 0 0 12px rgba(200, 149, 101, 0.45);
}
.wood-preview-btn.is-hidden {
  display: none !important;
}
.theme-swatches-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.theme-swatch-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.theme-swatch-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.theme-swatch-btn.active {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.swatch-circle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}


/* ── Base styles for Left Contacts (shown in tpl-qrfront) ── */
.card-cr80__left-contacts {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
  overflow: hidden;
  max-width: 100%;
}
.card-cr80__left-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-cr80__left-contact-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #e2e8f0;
}
.card-cr80__left-contact-icon svg {
  width: 12px;
  height: 12px;
}
.card-cr80__left-contact-val {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Base styles for Front QR Wrap (shown in tpl-qrfront) ── */
.card-cr80__front-qr-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: auto 0;
}
.card-cr80__front-qr-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-cr80__front-qr-box .card-cr80__qr-code {
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-cr80__front-qr-hint {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #475569;
  text-transform: uppercase;
  margin-top: 5px;
}

/* ── Base styles for Back Empty Minimal Wrap (shown in tpl-qrfront) ── */
.card-cr80__back-empty-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  gap: 12px;
  margin: auto 0;
}
.card-cr80__back-empty-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.card-cr80__back-empty-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  background: #ffffff;
  border-radius: 6px;
  padding: 3px 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}
.card-cr80__back-empty-brand {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-transform: uppercase;
}
.card-cr80__back-empty-nfc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ── Template: tpl-qrfront Active Behavior ──────────────── */
.card-cr80.tpl-qrfront .card-cr80__left {
  width: 46%;
  padding: 22px 14px 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  background: 
    radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--card-dark-bg, #424653) 0%, rgba(0, 0, 0, 0.22) 100%),
    var(--card-dark-bg, #424653);
  position: relative;
  z-index: 1;
}
.card-cr80.tpl-qrfront .card-cr80__avatar-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  margin-bottom: 2px;
}
.card-cr80.tpl-qrfront .card-cr80__name-box {
  margin-top: 5px;
}
.card-cr80.tpl-qrfront .card-cr80__name {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.2px;
  color: #ffffff;
}
.card-cr80.tpl-qrfront .card-cr80__title {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
  letter-spacing: 0.2px;
}

/* Frosted glass container for contact items in qrfront */
.card-cr80.tpl-qrfront .card-cr80__left-contacts {
  display: flex;
  flex-direction: column;
  gap: 5.5px;
  margin: 8px 0;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.card-cr80.tpl-qrfront .card-cr80__left-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.2;
}
.card-cr80.tpl-qrfront .card-cr80__left-contact-icon {
  width: 19px;
  height: 19px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-cr80.tpl-qrfront .card-cr80__left-contact-icon svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}
.card-cr80.tpl-qrfront .card-cr80__left-contact-val {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* Company Box at bottom of left column */
.card-cr80.tpl-qrfront .card-cr80__company-box {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: auto;
}
.card-cr80.tpl-qrfront .card-cr80__company-label {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.card-cr80.tpl-qrfront .card-cr80__company-name {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

/* Right Column (Light Gradient with Elevated QR Card) */
.card-cr80.tpl-qrfront .card-cr80__right {
  width: 54%;
  padding: 24px 18px 18px 18px;
  background: 
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.92) 0%, rgba(240, 243, 248, 0.98) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}
.card-cr80.tpl-qrfront .card-cr80__ribbon {
  top: 0;
  right: 20px;
  padding: 6px 14px 7px 12px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  background: linear-gradient(135deg, var(--card-dark-bg, #424653), #1a1c26);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  gap: 5px;
}
.card-cr80.tpl-qrfront .card-cr80__ribbon-icon {
  width: 12px;
  height: 12px;
  color: #f6ad55;
}
.card-cr80.tpl-qrfront .card-cr80__ribbon-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
}
.card-cr80.tpl-qrfront .card-cr80__contact-list {
  display: none !important;
}
.card-cr80.tpl-qrfront .card-cr80__front-qr-wrap {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto 0;
}
.card-cr80.tpl-qrfront .card-cr80__front-qr-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: 
    0 14px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-cr80.tpl-qrfront .card-cr80__front-qr-box .card-cr80__qr-code {
  width: 118px;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-cr80.tpl-qrfront .card-cr80__front-qr-box .card-cr80__qr-code canvas,
.card-cr80.tpl-qrfront .card-cr80__front-qr-box .card-cr80__qr-code img {
  width: 118px !important;
  height: 118px !important;
  display: block;
}
.card-cr80.tpl-qrfront .card-cr80__front-qr-hint {
  font-family: 'Montserrat', sans-serif;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 10px;
}

/* Template: tpl-qrfront Back Card Behavior (Luxury Emblem Minimalist) */
.card-cr80.tpl-qrfront.card-cr80--back {
  background: 
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
    linear-gradient(135deg, var(--card-dark-bg, #424653) 0%, #151821 100%) !important;
  padding: 24px 28px;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center !important;
  position: relative;
  overflow: hidden;
}
.card-cr80.tpl-qrfront.card-cr80--back::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.card-cr80.tpl-qrfront.card-cr80--back::after {
  content: '';
  position: absolute;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.card-cr80.tpl-qrfront .card-cr80__back-header {
  display: none !important;
}
.card-cr80.tpl-qrfront .card-cr80__qr-container {
  display: none !important;
}
.card-cr80.tpl-qrfront .card-cr80__back-empty-wrap {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.card-cr80.tpl-qrfront .card-cr80__back-empty-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.card-cr80.tpl-qrfront .card-cr80__back-empty-logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  padding: 5px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.card-cr80.tpl-qrfront .card-cr80__back-empty-brand {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2.2px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.card-cr80.tpl-qrfront .card-cr80__back-empty-nfc {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Montserrat', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 5px 16px;
  border-radius: 99px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.card-cr80.tpl-qrfront .card-cr80__back-empty-nfc svg {
  width: 15px;
  height: 15px;
  color: #f6ad55;
}

/* ── Base styles for Wood Card Layout (TPL-WOOD) ── */
.card-cr80__wood-front {
  display: none;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 26px 20px 26px;
  color: #2b1810;
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  position: relative;
}
.card-cr80__wood-back {
  display: none;
  width: 100%;
  height: 100%;
}

/* Template: tpl-wood Active State (100% Transparent Background) */
.card-cr80.tpl-wood {
  background: transparent !important;
  background-color: transparent !important;
  color: #2b1810 !important;
  border: 1.5px dashed rgba(43, 24, 16, 0.35);
  box-shadow: none !important;
}
.card-cr80.tpl-wood .card-cr80__left,
.card-cr80.tpl-wood .card-cr80__right,
.card-cr80.tpl-wood .card-cr80__back-header,
.card-cr80.tpl-wood .card-cr80__qr-container,
.card-cr80.tpl-wood .card-cr80__back-empty-wrap {
  display: none !important;
}
.card-cr80.tpl-wood .card-cr80__wood-front {
  display: flex !important;
}
.card-cr80.tpl-wood.card-cr80--back .card-cr80__wood-back {
  display: block !important;
}

/* Realistic Wood Grain Simulation (When toggled on screen preview) */
.card-cr80.tpl-wood.wood-texture-preview {
  background: 
    linear-gradient(90deg, rgba(222,168,118,0.95), rgba(204,148,98,0.97), rgba(226,172,122,0.95)),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(135,75,30,0.06) 2px, rgba(135,75,30,0.06) 4px) !important;
  box-shadow: 0 16px 40px rgba(70, 35, 12, 0.25), 0 3px 10px rgba(70, 35, 12, 0.12) !important;
  border: 1px solid rgba(130, 75, 30, 0.4) !important;
}

/* Header: NFC Badge (Top Right) */
.card-wood__header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 8px;
}
.card-wood__title-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  margin-right: 16px;
}
.card-wood__title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 2.8px;
  color: #2b1810;
  white-space: nowrap;
}
.card-wood__title-line {
  flex: 1;
  height: 1.5px;
  background: #2b1810;
  margin-left: 12px;
}
.card-wood__nfc-badge {
  border: 1.5px solid #2b1810;
  border-radius: 6px;
  padding: 2.5px 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
  font-size: 11.5px;
  letter-spacing: 0.8px;
  color: #2b1810;
  font-family: 'Montserrat', sans-serif;
  flex-shrink: 0;
  margin-left: auto;
}
.card-wood__nfc-icon {
  width: 15px;
  height: 15px;
  color: #2b1810;
}

/* Body: Left Contacts + Vertical Divider + Right QR */
.card-wood__body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Left Column */
.card-wood__left {
  width: 53%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  padding-right: 12px;
  box-sizing: border-box;
}

/* Profile Identity Box (ชื่อ ตำแหน่งงาน อาชีพ) */
.card-wood__profile-box {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
}
.card-wood__name {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 15.5px;
  font-weight: 800;
  color: #2b1810;
  letter-spacing: 0.25px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-wood__roles {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 3px;
}
.card-wood__job {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #2b1810;
  opacity: 0.95;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-wood__occupation,
.card-wood__workplace {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 9.5px;
  font-weight: 600;
  color: #2b1810;
  opacity: 0.82;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-wood__profile-sep {
  height: 1px;
  background: rgba(43, 24, 16, 0.4);
  margin: 6px 0 2px 0;
  width: 100%;
}

/* Contact List */
.card-wood__contacts-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  flex: 1;
}
.card-wood__contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(43, 24, 16, 0.35);
}
.card-wood__contact-item:last-child {
  border-bottom: none;
}
.card-wood__contact-icon-circle {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #2b1810;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-wood__contact-icon-circle svg {
  width: 13.5px;
  height: 13.5px;
  fill: currentColor;
}
.card-wood__contact-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-wood__contact-label {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #2b1810;
  opacity: 0.85;
  margin-bottom: 1px;
  line-height: 1.15;
}
.card-wood__contact-value {
  font-size: 11.5px;
  font-weight: 700;
  color: #2b1810;
  letter-spacing: 0.25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Middle Divider */
.card-wood__divider {
  width: 1.5px;
  height: 90%;
  background: rgba(43, 24, 16, 0.35);
  margin: 0 10px;
  flex-shrink: 0;
}

/* Right Column */
.card-wood__right {
  width: 43%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 8px;
  box-sizing: border-box;
}
.card-wood__qr-frame {
  position: relative;
  padding: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-wood__bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: #2b1810;
  border-style: solid;
}
.card-wood__bracket--tl {
  top: 0; left: 0;
  border-width: 2.2px 0 0 2.2px;
}
.card-wood__bracket--tr {
  top: 0; right: 0;
  border-width: 2.2px 2.2px 0 0;
}
.card-wood__bracket--bl {
  bottom: 0; left: 0;
  border-width: 0 0 2.2px 2.2px;
}
.card-wood__bracket--br {
  bottom: 0; right: 0;
  border-width: 0 2.2px 2.2px 0;
}
.card-wood__qr-box {
  width: 135px;
  height: 135px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}
.card-wood__qr-code {
  width: 135px;
  height: 135px;
  background: transparent;
}
.card-wood__qr-code canvas,
.card-wood__qr-code img {
  width: 135px !important;
  height: 135px !important;
  display: block;
  mix-blend-mode: multiply;
  background: transparent !important;
}
.card-wood__qr-subtext {
  margin-top: 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #2b1810;
  font-family: 'Montserrat', sans-serif;
  text-align: center;
}

/* ── Base styles for Vertical Card Layout (TPL-VERTICAL) ── */
.card-cr80__vertical-front,
.card-cr80__vertical-back {
  display: none;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  color: var(--card-vert-primary, #0056b3);
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
}

/* Template: tpl-vertical Active State */
.card-cr80.tpl-vertical {
  width: 337.5px !important;
  height: 535px !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 3px 10px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid #e2e8f0;
}

.card-cr80.tpl-vertical .card-cr80__left,
.card-cr80.tpl-vertical .card-cr80__right,
.card-cr80.tpl-vertical .card-cr80__wood-front,
.card-cr80.tpl-vertical .card-cr80__back-header,
.card-cr80.tpl-vertical .card-cr80__qr-container,
.card-cr80.tpl-vertical .card-cr80__back-empty-wrap,
.card-cr80.tpl-vertical .card-cr80__wood-back {
  display: none !important;
}

.card-cr80.tpl-vertical.card-cr80--front .card-cr80__vertical-front {
  display: flex !important;
}

.card-cr80.tpl-vertical.card-cr80--back .card-cr80__vertical-back {
  display: flex !important;
}

/* Yellow Brand Badge (Top Header) */
.card-vertical__brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  overflow: hidden;
}
.card-vertical__brand-img {
  height: 38px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Circular Avatar with Thick Vibrant Blue Border */
.card-vertical__avatar-wrap {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 4.5px solid var(--card-vert-accent, #0066cc);
  box-shadow: 0 4px 16px rgba(0, 102, 204, 0.18);
  overflow: hidden;
  margin-top: 14px;
  background: #f0f4f8;
  flex-shrink: 0;
  z-index: 2;
}
.card-vertical__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Name, Title, Line, Workplace */
.card-vertical__identity-wrap {
  width: 100%;
  text-align: center;
  margin-top: 12px;
  padding: 0 16px;
  box-sizing: border-box;
  z-index: 2;
}
.card-vertical__name {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--card-vert-primary, #0056b3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.2;
  word-break: break-word;
}
.card-vertical__job {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--card-vert-primary, #0056b3);
  margin-top: 3px;
  line-height: 1.25;
}
.card-vertical__divider-line {
  width: 78%;
  height: 1.5px;
  background: var(--card-vert-accent, #0066cc);
  margin: 6px auto;
}
.card-vertical__workplace {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--card-vert-primary, #0056b3);
  line-height: 1.25;
}

/* Body: Two Columns (Left Contacts, Right QR) */
.card-vertical__body-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 22px 18px 0 18px;
  box-sizing: border-box;
  z-index: 2;
  position: relative;
  flex: 1;
}
.card-vertical__contacts-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 8px;
}
.card-vertical__contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-vertical__contact-icon {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--card-vert-primary, #0056b3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-vertical__contact-icon svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.card-vertical__contact-text {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--card-vert-primary, #0056b3);
  line-height: 1.2;
  word-break: break-all;
}

/* Right Column: QR Code + NFC */
.card-vertical__qr-col {
  width: 105px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.card-vertical__qr-box {
  background: #ffffff;
  padding: 2px;
  border-radius: 4px;
}
.card-vertical__qr-code {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-vertical__qr-code canvas,
.card-vertical__qr-code img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.card-vertical__nfc-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: flex-end;
  margin-top: 6px;
  margin-right: 6px;
}
.card-vertical__nfc-waves {
  width: 28px;
  height: 28px;
}
.card-vertical__nfc-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: var(--card-vert-primary, #0056b3);
  letter-spacing: 0.8px;
  line-height: 1;
  margin-top: 2px;
}

/* Bottom Decorative Layered Waves */
.card-vertical__waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 58px;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.card-vertical__waves-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.card-vertical__wave-bg {
  fill: var(--card-vert-wave-bg, #3fa0f7);
}
.card-vertical__wave-fg {
  fill: var(--card-vert-wave-fg, #0056b3);
}

/* Back Side of Vertical Card */
.card-vertical__back-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 20px;
  box-sizing: border-box;
  z-index: 2;
}
.card-vertical__back-avatar-small {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid var(--card-vert-accent, #0066cc);
  overflow: hidden;
  margin-bottom: 8px;
}
.card-vertical__back-avatar-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-vertical__back-name {
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--card-vert-primary, #0056b3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.card-vertical__back-qr-box {
  background: #ffffff;
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 86, 179, 0.15);
  border: 1px solid rgba(0, 86, 179, 0.15);
}
.card-vertical__back-qr-box .card-vertical__qr-code {
  width: 140px;
  height: 140px;
}
.card-vertical__back-scan-hint {
  font-family: 'Montserrat', sans-serif;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--card-vert-primary, #0056b3);
  letter-spacing: 1.2px;
  margin-top: 10px;
}
.card-vertical__back-url {
  font-family: monospace;
  font-size: 8.5px;
  color: #4a5568;
  margin-top: 4px;
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 4px;
}
.card-vertical__back-nfc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-vert-primary, #0056b3);
  color: #ffffff;
  font-family: 'Montserrat', sans-serif;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: 99px;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0, 86, 179, 0.25);
}

/* 3D Flip in Vertical Mode */
body.tpl-is-vertical .flip-card-inner {
  width: 337.5px;
  height: 535px;
}

/* Tips Banner */
.print-tips-banner {
  background: #fdf3f7;
  border-bottom: 1px solid #f6d1e1;
  padding: 12px 20px;
  font-size: 0.84rem;
  color: #631435;
  line-height: 1.5;
}
.print-tips-banner a {
  color: #961d4c;
  text-decoration: underline;
  font-weight: 700;
}
.print-tips-banner a:hover {
  color: #c20056;
}
.print-tips-banner div[style*="rgba(255,255,255"],
.print-tips-banner div[style*="rgba(255, 255, 255"] {
  color: #83274e !important;
}
.print-tips-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.print-tips-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.print-tips-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #631435;
}
.print-tips-item__icon {
  font-size: 1rem;
  flex-shrink: 0;
  line-height: 1.3;
}
.print-tips-item__text {
  flex: 1;
}
.print-tips-link {
  color: #961d4c !important;
  text-decoration: underline;
  font-weight: 700;
  display: inline-block;
  margin-left: 4px;
}
.print-tips-link:hover {
  color: #c20056 !important;
}
.print-tips-action-desktop {
  flex-shrink: 0;
}

/* Print Stage */
.print-stage {
  padding: 40px 20px;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.print-sheet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  align-items: center;
}

/* Card Print Unit & Crop Marks */
.card-print-unit {
  position: relative;
  display: inline-block;
  padding: 10px;
}
.crop-mark {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border-color: #a0a4b0;
}
.crop-mark--tl {
  top: 0; left: 0;
  border-top: 1.5px dashed #8e93a0;
  border-left: 1.5px dashed #8e93a0;
}
.crop-mark--tr {
  top: 0; right: 0;
  border-top: 1.5px dashed #8e93a0;
  border-right: 1.5px dashed #8e93a0;
}
.crop-mark--bl {
  bottom: 0; left: 0;
  border-bottom: 1.5px dashed #8e93a0;
  border-left: 1.5px dashed #8e93a0;
}
.crop-mark--br {
  bottom: 0; right: 0;
  border-bottom: 1.5px dashed #8e93a0;
  border-right: 1.5px dashed #8e93a0;
}

/* Standard CR80 Card Dimensions (Screen display: 535px x 337.5px = 1.585:1 ratio) */
.card-cr80 {
  width: 535px;
  height: 337.5px;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.18), 0 3px 10px rgba(0,0,0,0.08);
  position: relative;
  overflow: hidden;
  user-select: none;
  box-sizing: border-box;
}

/* ── FRONT SIDE ─────────────────────────────────────────────── */
.card-cr80--front {
  display: flex;
  flex-direction: row;
}
.card-cr80__left {
  width: 41%;
  background: var(--card-dark-bg, #424653);
  color: #ffffff;
  padding: 22px 18px 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
  position: relative;
}
.card-cr80__avatar-wrap {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 3.5px solid #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  background: #dedee4;
  flex-shrink: 0;
}
.card-cr80__avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.card-cr80__name-box {
  margin-top: 10px;
}
.card-cr80__name {
  font-family: 'Montserrat', 'Oswald', 'Noto Sans Thai', sans-serif;
  font-weight: 800;
  font-size: 15.5px;
  line-height: 1.18;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  word-break: break-word;
}
.card-cr80__title {
  font-size: 10.5px;
  color: #c1c5d0;
  font-weight: 400;
  margin-top: 3px;
  line-height: 1.25;
}
.card-cr80__company-box {
  margin-top: auto;
  padding-top: 10px;
}
.card-cr80__company-label {
  font-size: 7.5px;
  font-weight: 700;
  color: #9ea3b1;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.card-cr80__company-name {
  font-family: 'Montserrat', 'Oswald', 'Noto Sans Thai', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 1px;
}

.card-cr80__right {
  width: 59%;
  background: var(--card-light-bg, #dedee4);
  position: relative;
  padding: 46px 20px 16px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

/* Hanging Ribbon Badge */
.card-cr80__ribbon {
  position: absolute;
  top: 0;
  right: 26px;
  background: var(--card-dark-bg, #424653);
  color: #ffffff;
  padding: 7px 16px 8px 12px;
  border-bottom-left-radius: 11px;
  border-bottom-right-radius: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  z-index: 5;
}
.card-cr80__ribbon::before {
  content: "";
  position: absolute;
  top: 0;
  left: -7px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-right: 7px solid var(--card-dark-shadow, #282b33);
}
.card-cr80__ribbon::after {
  content: "";
  position: absolute;
  top: 0;
  right: -7px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-left: 7px solid var(--card-dark-shadow, #282b33);
}
.card-cr80__ribbon-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: #ffffff;
}
.card-cr80__ribbon-text {
  font-family: 'Montserrat', 'Oswald', 'Noto Sans Thai', sans-serif;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #ffffff;
  white-space: nowrap;
}

/* Contact List Rows */
.card-cr80__contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 2px;
}
.card-cr80__contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-cr80__contact-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #232730;
  flex-shrink: 0;
}
.card-cr80__contact-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card-cr80__contact-label {
  font-size: 8px;
  color: #676d7d;
  font-weight: 600;
  line-height: 1.15;
}
.card-cr80__contact-value {
  font-size: 11px;
  color: #181b22;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-all;
}

/* ── BACK SIDE (QR CODE) ────────────────────────────────────── */
.card-cr80--back {
  background: var(--card-dark-bg, #424653);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 22px;
  position: relative;
  text-align: center;
  box-sizing: border-box;
}
.card-cr80__back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.card-cr80__back-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-transform: uppercase;
}
.card-cr80__back-logo {
  height: 20px;
  width: auto;
  object-fit: contain;
  background: #ffffff;
  border-radius: 4px;
  padding: 2px 4px;
}
.card-cr80__back-nfc {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 8.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.14);
  padding: 3px 8px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}
.card-cr80__qr-container {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto 0;
}
.card-cr80__qr-code {
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-cr80__qr-code canvas,
.card-cr80__qr-code img {
  width: 100% !important;
  height: 100% !important;
  display: block;
}
.card-cr80__back-footer {
  width: 100%;
  text-align: center;
}
.card-cr80__back-title {
  font-family: 'Noto Sans Thai', 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.3px;
}
.card-cr80__back-subtitle {
  font-size: 8.5px;
  color: #c1c5d0;
  margin-top: 2px;
}
.card-cr80__back-url {
  font-size: 8px;
  color: rgba(255,255,255,0.7);
  font-family: monospace;
  margin-top: 4px;
  background: rgba(0,0,0,0.22);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* ── 3D INTERACTIVE FLIP MODAL ──────────────────────────────── */
.flip-modal-wrap {
  display: none;
  position: fixed;
  top: 55px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 18, 22, 0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  backdrop-filter: blur(8px);
}
.flip-modal-wrap.active {
  display: flex;
}
.flip-card-perspective {
  perspective: 1200px;
  cursor: pointer;
}
.flip-card-inner {
  width: 535px;
  height: 337.5px;
  position: relative;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.flip-card-back {
  transform: rotateY(180deg);
}
.flip-hint-text {
  color: #ffffff;
  margin-top: 22px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0.85;
}

/* Desktop & Wide Screen Layout for Print Toolbar */
@media (min-width: 641px) {
  .print-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
  }
  .print-toolbar__header-row {
    display: contents;
  }
  .print-toolbar__back-wrap {
    order: 1;
    flex-shrink: 0;
  }
  .print-toolbar__title-block {
    order: 2;
    flex-shrink: 0;
  }
  .print-toolbar__center {
    order: 3;
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .print-toolbar__quick-edit {
    order: 4;
    flex-shrink: 0;
  }
  .print-toolbar__right {
    order: 5;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }
}

/* Mobile responsive layout for Print Card (< 640px) */
@media (max-width: 640px) {
  body.print-page-body {
    padding-bottom: 84px; /* Space for sticky print bar */
  }

  /* 1. Header Toolbar: Vertical stack on mobile */
  .print-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    gap: 10px;
  }

  .print-toolbar__header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
  }
  .print-toolbar__back-wrap {
    flex: 1;
  }
  .print-toolbar__back-btn {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.85rem;
    box-sizing: border-box;
  }
  .print-toolbar__quick-edit {
    flex-shrink: 0;
  }
  .print-toolbar__edit-btn {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 0.85rem;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  /* 2. Title Block: Natural Thai word-wrap without awkward clipping */
  .print-toolbar__title-block {
    width: 100%;
    text-align: left;
    padding: 2px 0;
  }
  .print-toolbar__heading {
    font-size: 1.05rem;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: break-word;
    margin: 2px 0;
  }
  .print-toolbar__card-id {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    word-break: normal;
    overflow-wrap: break-word;
  }

  /* 3. 3 Mode Selector Buttons: 3 equal grid columns, thumb-friendly */
  .print-toolbar__center {
    width: 100%;
  }
  .print-mode-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    gap: 5px;
    padding: 4px;
    border-radius: 12px;
    box-sizing: border-box;
  }
  .mode-btn {
    min-height: 46px;
    padding: 6px 3px;
    border-radius: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    line-height: 1.2;
    text-align: center;
  }
  .mode-btn .mode-icon {
    font-size: 1.1rem;
    line-height: 1;
  }
  .mode-label-desktop {
    display: none !important;
  }
  .mode-label-mobile {
    display: block !important;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  /* 4. Hide Desktop Print Button in Header (replaced by bottom sticky button) */
  .print-toolbar__right {
    display: none !important;
  }

  /* ── Mobile Styling Bar (Theme & Template controls) ─────── */
  .print-styling-bar {
    padding: 12px 14px;
  }
  .print-styling-container {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .styling-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }
  .styling-label {
    font-size: 0.84rem;
  }
  .template-btn-group {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }
  .tpl-btn {
    min-height: 44px;
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.85rem;
    box-sizing: border-box;
  }
  .wood-preview-btn {
    min-height: 44px;
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 0.85rem;
    box-sizing: border-box;
  }
  .theme-swatches-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    gap: 8px;
    box-sizing: border-box;
  }
  .theme-swatch-btn {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 0.82rem;
    justify-content: center;
    box-sizing: border-box;
  }
  .swatch-circle {
    width: 16px;
    height: 16px;
  }

  /* ── Mobile Tips Banner ─────────────────────────────────── */
  .print-tips-banner {
    padding: 12px 14px;
  }
  .print-tips-container {
    flex-direction: column;
    align-items: stretch;
  }
  .print-tips-content {
    gap: 10px;
  }
  .print-tips-item {
    font-size: 0.82rem;
  }
  .print-tips-action-desktop {
    display: none !important;
  }

  /* ── Mobile Sticky Bottom Print Bar ─────────────────────── */
  .mobile-sticky-print-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(42, 8, 51, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 14px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 12px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 999;
    box-sizing: border-box;
  }
  .btn--mobile-print {
    width: 100%;
    min-height: 48px;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #e60067 0%, #ff2a85 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(230, 0, 103, 0.45);
    box-sizing: border-box;
    cursor: pointer;
  }
  .btn--mobile-print:active {
    transform: scale(0.98);
  }

  /* Mobile responsive preview scaling */
  .flip-card-perspective {
    max-width: 94vw;
  }
  .flip-card-inner {
    width: min(535px, 90vw);
    height: calc(min(535px, 90vw) * 337.5 / 535);
  }
  .card-cr80 {
    transform: scale(0.65);
    transform-origin: center center;
    margin: -50px 0;
  }
  .card-print-unit {
    padding: 0;
  }
  .crop-mark {
    display: none;
  }
}

/* Extra small mobile adjustments (320px–360px) */
@media (max-width: 360px) {
  .print-toolbar {
    padding: 10px 10px;
  }
  .print-toolbar__heading {
    font-size: 0.95rem;
  }
  .print-toolbar__back-btn,
  .print-toolbar__edit-btn {
    font-size: 0.78rem;
    padding: 6px 8px;
  }
  .mode-label-mobile {
    font-size: 0.68rem;
  }
  .theme-swatches-group {
    grid-template-columns: 1fr;
  }
  .card-cr80 {
    transform: scale(0.55);
    margin: -75px 0;
  }
}

/* ─────────────────────────────────────────────────────────────
   @MEDIA PRINT: EXACT CR80 PHYSICAL CARD CALIBRATION
   ───────────────────────────────────────────────────────────── */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body.print-page-body {
    padding-bottom: 0 !important;
  }

  .no-print,
  .site-header,
  .print-toolbar,
  .print-customizer,
  .print-styling-bar,
  .print-tips-banner,
  .mobile-sticky-print-bar,
  .flip-modal-wrap {
    display: none !important;
  }

  /* Sheet mode (A4 with crop marks) */
  body.print-mode-sheet .print-stage {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10mm 0 !important;
    gap: 8mm !important;
  }

  body.print-mode-sheet .print-sheet-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 10mm !important;
    align-items: center !important;
    justify-content: center !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* PVC direct card printer mode */
  body.print-mode-pvc {
    margin: 0 !important;
    padding: 0 !important;
  }

  body.print-mode-pvc @page {
    size: 85.6mm 54mm !important;
    margin: 0 !important;
  }

  body.print-mode-pvc .print-stage {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.print-mode-pvc .card-print-unit {
    width: 85.6mm !important;
    height: 54mm !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  body.print-mode-pvc .crop-mark {
    display: none !important;
  }

  /* Universal exact physical card dimensions (85.6mm x 54mm) */
  .card-cr80 {
    width: 85.6mm !important;
    height: 54mm !important;
    border-radius: 3.18mm !important;
    box-shadow: none !important;
    border: 0.2mm solid rgba(0,0,0,0.12) !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    transform: none !important;
    margin: 0 !important;
  }

  /* Left panel calibration on print */
  .card-cr80__left {
    padding: 3.8mm 3.2mm 3.2mm 3.5mm !important;
  }
  .card-cr80__avatar-wrap {
    width: 21mm !important;
    height: 21mm !important;
    border-radius: 50% !important;
    border-width: 0.65mm !important;
    margin-bottom: 1.5mm !important;
  }
  .card-cr80__name {
    font-size: 8.5pt !important;
    letter-spacing: 0.15mm !important;
    line-height: 1.15 !important;
  }
  .card-cr80__title {
    font-size: 5.5pt !important;
    margin-top: 0.5mm !important;
    line-height: 1.2 !important;
  }
  .card-cr80__company-label {
    font-size: 4pt !important;
  }
  .card-cr80__company-name {
    font-size: 5.8pt !important;
  }

  /* Right panel calibration on print */
  .card-cr80__right {
    padding: 8mm 3.5mm 3mm 3.8mm !important;
  }
  .card-cr80__ribbon {
    right: 4mm !important;
    padding: 1.4mm 3mm 1.6mm 2.2mm !important;
    border-bottom-left-radius: 2mm !important;
    border-bottom-right-radius: 2mm !important;
  }
  .card-cr80__ribbon-icon {
    width: 3mm !important;
    height: 3mm !important;
  }
  .card-cr80__ribbon-text {
    font-size: 5.5pt !important;
  }
  .card-cr80__contact-list {
    gap: 1.6mm !important;
  }
  .card-cr80__contact-row {
    gap: 2mm !important;
  }
  .card-cr80__contact-icon {
    width: 4mm !important;
    height: 4mm !important;
  }
  .card-cr80__contact-label {
    font-size: 4.5pt !important;
  }
  .card-cr80__contact-value {
    font-size: 5.8pt !important;
  }

  /* Back card calibration on print */
  .card-cr80--back {
    padding: 3.5mm 4mm !important;
    justify-content: flex-start !important;
  }
  .card-cr80__back-header {
    padding-bottom: 1.2mm !important;
  }
  .card-cr80__back-brand {
    font-size: 5.8pt !important;
  }
  .card-cr80__back-logo {
    height: 3.8mm !important;
  }
  .card-cr80__back-nfc {
    font-size: 4.8pt !important;
    padding: 0.6mm 1.8mm !important;
  }
  .card-cr80__qr-container {
    padding: 2mm !important;
    border-radius: 2.8mm !important;
    margin: auto 0 !important;
  }
  .card-cr80__qr-code {
    width: 28mm !important;
    height: 28mm !important;
  }

  /* Calibration for tpl-qrfront on print (85.6mm x 54mm) */
  .card-cr80.tpl-qrfront .card-cr80__left {
    width: 46% !important;
    padding: 4.5mm 2.8mm 2.6mm 3.2mm !important;
    justify-content: space-between !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__avatar-wrap {
    width: 13.5mm !important;
    height: 13.5mm !important;
    border-radius: 50% !important;
    border-width: 0.55mm !important;
    margin-bottom: 0.6mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__name-box {
    margin-top: 0.6mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__name {
    font-size: 7.5pt !important;
    line-height: 1.15 !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__title {
    font-size: 5pt !important;
    margin-top: 0.3mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__left-contacts {
    gap: 1mm !important;
    margin: 1.6mm 0 !important;
    padding: 1.4mm 1.8mm !important;
    border-radius: 1.8mm !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 0.2mm solid rgba(255, 255, 255, 0.2) !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__left-contact-item {
    font-size: 4.8pt !important;
    gap: 1.4mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__left-contact-icon {
    width: 3mm !important;
    height: 3mm !important;
    border-radius: 0.8mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__left-contact-icon svg {
    width: 2mm !important;
    height: 2mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__company-box {
    padding-top: 1mm !important;
    margin-top: auto !important;
    border-top: 0.2mm solid rgba(255, 255, 255, 0.2) !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__company-label {
    font-size: 3.5pt !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__company-name {
    font-size: 5.2pt !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__right {
    width: 54% !important;
    padding: 4.5mm 3mm 3mm 3mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__ribbon {
    right: 3.5mm !important;
    padding: 1.2mm 2.8mm 1.4mm 2.2mm !important;
    border-bottom-left-radius: 1.5mm !important;
    border-bottom-right-radius: 1.5mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__ribbon-text {
    font-size: 5pt !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__front-qr-box {
    padding: 1.8mm !important;
    border-radius: 2.5mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__front-qr-box .card-cr80__qr-code {
    width: 25.5mm !important;
    height: 25.5mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__front-qr-hint {
    font-size: 4pt !important;
    margin-top: 1mm !important;
  }
  .card-cr80.tpl-qrfront.card-cr80--back {
    padding: 4mm !important;
    justify-content: center !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__back-empty-logo img {
    height: 8.5mm !important;
    border-radius: 2mm !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__back-empty-brand {
    font-size: 7.6pt !important;
  }
  .card-cr80.tpl-qrfront .card-cr80__back-empty-nfc {
    font-size: 5pt !important;
    padding: 1mm 3mm !important;
  }

  /* Calibration for tpl-wood on print (85.6mm x 54mm) - 100% Transparent Background */
  .card-cr80.tpl-wood {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
  }
  .card-cr80__wood-front {
    padding: 3.6mm 4.5mm 3.2mm 4.5mm !important;
  }
  .card-wood__header {
    margin-bottom: 1.8mm !important;
    justify-content: flex-end !important;
  }
  .card-wood__title {
    font-size: 7.2pt !important;
    letter-spacing: 0.35mm !important;
  }
  .card-wood__title-line {
    height: 0.3mm !important;
    margin-left: 2.2mm !important;
  }
  .card-wood__nfc-badge {
    border-width: 0.35mm !important;
    border-radius: 1mm !important;
    padding: 0.5mm 1.5mm !important;
    font-size: 5.5pt !important;
    gap: 1mm !important;
  }
  .card-wood__nfc-icon {
    width: 2.8mm !important;
    height: 2.8mm !important;
  }
  .card-wood__left {
    width: 53% !important;
    padding-right: 2.2mm !important;
    justify-content: flex-start !important;
  }
  .card-wood__profile-box {
    margin-bottom: 0.5mm !important;
  }
  .card-wood__name {
    font-size: 7.8pt !important;
    letter-spacing: 0.1mm !important;
    line-height: 1.15 !important;
  }
  .card-wood__roles {
    gap: 0.3mm !important;
    margin-top: 0.6mm !important;
  }
  .card-wood__job {
    font-size: 5.4pt !important;
    line-height: 1.2 !important;
  }
  .card-wood__occupation,
  .card-wood__workplace {
    font-size: 4.6pt !important;
    line-height: 1.2 !important;
  }
  .card-wood__profile-sep {
    height: 0.25mm !important;
    margin: 1mm 0 0.6mm 0 !important;
  }
  .card-wood__contacts-wrap {
    flex: 1 !important;
    justify-content: space-around !important;
  }
  .card-wood__contact-item {
    padding: 0.7mm 0 !important;
    gap: 1.8mm !important;
    border-bottom-width: 0.2mm !important;
  }
  .card-wood__contact-icon-circle {
    width: 4.2mm !important;
    height: 4.2mm !important;
  }
  .card-wood__contact-icon-circle svg {
    width: 2.3mm !important;
    height: 2.3mm !important;
  }
  .card-wood__contact-label {
    font-size: 3.8pt !important;
    letter-spacing: 0.12mm !important;
    margin-bottom: 0.2mm !important;
    line-height: 1.15 !important;
  }
  .card-wood__contact-value {
    font-size: 5.5pt !important;
    letter-spacing: 0.06mm !important;
    line-height: 1.15 !important;
  }
  .card-wood__divider {
    width: 0.25mm !important;
    margin: 0 1.8mm !important;
  }
  .card-wood__right {
    width: 44% !important;
    padding-left: 1.5mm !important;
  }
  .card-wood__qr-frame {
    padding: 1.6mm !important;
  }
  .card-wood__bracket {
    width: 2.6mm !important;
    height: 2.6mm !important;
    border-width: 0.4mm !important;
  }
  .card-wood__qr-box {
    width: 23mm !important;
    height: 23mm !important;
  }
  .card-wood__qr-code,
  .card-wood__qr-code canvas,
  .card-wood__qr-code img {
    width: 23mm !important;
    height: 23mm !important;
  }
  .card-wood__qr-subtext {
    font-size: 5pt !important;
    letter-spacing: 0.3mm !important;
    margin-top: 1.3mm !important;
  }
  .card-cr80.tpl-wood.card-cr80--back {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Calibration for tpl-vertical on print (54mm x 85.6mm) */
  body.tpl-is-vertical .card-cr80,
  .card-cr80.tpl-vertical {
    width: 54mm !important;
    height: 85.6mm !important;
    border-radius: 3.18mm !important;
    border: 0.2mm solid rgba(0,0,0,0.12) !important;
    background: #ffffff !important;
    box-shadow: none !important;
  }

  body.print-mode-pvc.tpl-is-vertical @page {
    size: 54mm 85.6mm !important;
    margin: 0 !important;
  }
  body.print-mode-pvc.tpl-is-vertical .card-print-unit {
    width: 54mm !important;
    height: 85.6mm !important;
  }

  .card-cr80.tpl-vertical .card-vertical__brand-badge {
    margin-top: 3.2mm !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 1.2mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__brand-img {
    height: 6.2mm !important;
    width: auto !important;
    display: block !important;
  }

  .card-cr80.tpl-vertical .card-vertical__avatar-wrap {
    width: 24mm !important;
    height: 24mm !important;
    border-width: 0.8mm !important;
    margin-top: 2.2mm !important;
  }

  .card-cr80.tpl-vertical .card-vertical__identity-wrap {
    margin-top: 1.8mm !important;
    padding: 0 2mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__name {
    font-size: 8.2pt !important;
    letter-spacing: 0.15mm !important;
    line-height: 1.15 !important;
  }
  .card-cr80.tpl-vertical .card-vertical__job {
    font-size: 6pt !important;
    margin-top: 0.5mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__divider-line {
    width: 78% !important;
    height: 0.3mm !important;
    margin: 1mm auto !important;
  }
  .card-cr80.tpl-vertical .card-vertical__workplace {
    font-size: 6pt !important;
  }

  .card-cr80.tpl-vertical .card-vertical__body-row {
    padding: 3.5mm 3mm 0 3mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__contacts-col {
    gap: 1.3mm !important;
    padding-right: 1.5mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__contact-item {
    gap: 1.4mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__contact-icon {
    width: 4mm !important;
    height: 4mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__contact-icon svg {
    width: 2.4mm !important;
    height: 2.4mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__contact-text {
    font-size: 5.8pt !important;
    line-height: 1.15 !important;
  }

  .card-cr80.tpl-vertical .card-vertical__qr-col {
    width: 17mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__qr-box {
    padding: 0.4mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__qr-code {
    width: 16mm !important;
    height: 16mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__qr-code canvas,
  .card-cr80.tpl-vertical .card-vertical__qr-code img {
    width: 16mm !important;
    height: 16mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__nfc-wrap {
    margin-top: 1mm !important;
    margin-right: 1mm !important;
    align-items: center !important;
    align-self: flex-end !important;
  }
  .card-cr80.tpl-vertical .card-vertical__nfc-waves {
    width: 5.2mm !important;
    height: 5.2mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__nfc-text {
    font-size: 7pt !important;
    margin-top: 0.4mm !important;
  }

  .card-cr80.tpl-vertical .card-vertical__waves {
    height: 9.5mm !important;
  }

  /* Back print calibration */
  .card-cr80.tpl-vertical .card-vertical__back-content {
    padding: 2mm 3mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__back-avatar-small {
    width: 9mm !important;
    height: 9mm !important;
    border-width: 0.4mm !important;
    margin-bottom: 1.2mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__back-name {
    font-size: 7pt !important;
    margin-bottom: 2mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__back-qr-box {
    padding: 1.2mm !important;
    border-radius: 2mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__back-qr-box .card-vertical__qr-code {
    width: 22mm !important;
    height: 22mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__back-qr-box .card-vertical__qr-code canvas,
  .card-cr80.tpl-vertical .card-vertical__back-qr-box .card-vertical__qr-code img {
    width: 22mm !important;
    height: 22mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__back-scan-hint {
    font-size: 4.8pt !important;
    margin-top: 1.5mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__back-url {
    font-size: 4.2pt !important;
    padding: 0.5mm 1.5mm !important;
    margin-top: 0.8mm !important;
  }
  .card-cr80.tpl-vertical .card-vertical__back-nfc-badge {
    font-size: 4.5pt !important;
    padding: 0.6mm 1.8mm !important;
    margin-top: 1.8mm !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   BATCH CARD PRINTING & TABLE BULK SELECTION
   ───────────────────────────────────────────────────────────── */
.table-select-col {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}
.batch-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-sakura);
  vertical-align: middle;
}
tr.is-selected {
  background-color: rgba(230, 0, 103, 0.07) !important;
}

/* Floating / Sticky Batch Action Bar */
.batch-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: linear-gradient(135deg, #2a0833 0%, #17031e 100%);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 14px;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(42, 8, 51, 0.25), 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid rgba(230, 0, 103, 0.35);
  transition: all 0.25s ease;
}
.batch-action-bar.is-sticky {
  position: sticky;
  top: 72px;
  z-index: 90;
}
.batch-action-bar__info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}
.batch-action-bar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sakura);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 2px 10px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(230,0,103,0.4);
}
.batch-action-bar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.batch-btn-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ff2a85 0%, #e60067 100%);
  color: #ffffff !important;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(230, 0, 103, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  font-size: 0.9rem;
}
.batch-btn-print:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(230, 0, 103, 0.6);
}
.batch-btn-print:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Clickable Stat Cards */
a.stat-card,
.stat-card,
.stat-card--clickable,
.stat-card--clickable:hover,
.stat-card--clickable:focus,
.stat-card--clickable:active,
.stat-card--clickable *,
.stat-card--clickable:hover *,
.stat-card--clickable:focus *,
.stat-card--clickable:active * {
  text-decoration: none !important;
}
.stat-card--clickable {
  color: inherit;
  cursor: pointer;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}
.stat-card--clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(42, 8, 51, 0.12);
  border-color: rgba(230, 0, 103, 0.45);
}
.stat-card--clickable::after {
  content: '↗';
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-gray-400);
  transition: color 0.15s ease, transform 0.15s ease;
}
.stat-card--clickable:hover::after {
  color: var(--color-sakura);
  transform: translate(2px, -2px);
}

/* Remove underlines from table links in admin */
.table-wrapper a,
.table-wrapper a:hover,
.table-wrapper a:focus,
.table-wrapper a:active {
  text-decoration: none !important;
}

/* Compact dashboard tables without horizontal scrollbar */
.table-wrapper--no-scroll,
.members-table-wrapper,
.cards-table-wrapper {
  overflow-x: hidden !important;
  overflow-y: visible !important;
  width: 100% !important;
}
.table-wrapper--no-scroll table,
.members-table,
.cards-table {
  width: 100% !important;
  table-layout: auto !important;
  border-collapse: collapse !important;
}
.table-wrapper--no-scroll th,
.table-wrapper--no-scroll td,
.members-table th,
.members-table td,
.cards-table th,
.cards-table td {
  padding: 8px 10px !important;
  word-break: normal !important;
  vertical-align: middle !important;
}
.members-table th,
.cards-table th {
  font-size: 0.8rem !important;
  white-space: nowrap !important;
}
.members-table td,
.cards-table td {
  font-size: 0.86rem !important;
}
.members-table .nowrap-cell,
.cards-table .nowrap-cell,
.nowrap-cell {
  white-space: nowrap !important;
}
.members-table .member-name-text,
.cards-table .member-name-text,
.member-name-text {
  white-space: nowrap !important;
  word-break: keep-all !important;
}
.members-table .member-job-text {
  max-width: 200px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}
.cards-table .cards-url-text,
.cards-url-text {
  max-width: 240px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
}

/* ==========================================================================
   CHOMPOO AI ADMIN DASHBOARD – MOCKUP REDESIGN (Exact Replica)
   ========================================================================== */

.admin-canvas-bg {
  background: #f0f4f9;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  background-image: 
    radial-gradient(circle at 94% 6%, rgba(255, 42, 133, 0.16) 0%, transparent 35%),
    radial-gradient(circle at 86% 16%, rgba(142, 36, 170, 0.14) 0%, transparent 30%),
    radial-gradient(circle at 8% 92%, rgba(0, 180, 216, 0.10) 0%, transparent 35%);
  background-attachment: fixed;
  font-family: var(--font-sans);
  color: #1e293b;
  overflow-x: clip;
}

/* Outer Top Header - Full Viewport Width */
.dash-topbar-outer {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  position: relative;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}
.dash-topbar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
}
.dash-topbar-logo-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}
.dash-topbar-brand-title {
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
  background: linear-gradient(90deg, #2a0833 0%, #1e1b4b 55%, #ff7a00 80%, #00b4d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}
.dash-topbar-brand-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #64748b;
  margin-top: 4px;
  text-transform: uppercase;
}
.dash-topbar-brand-bar {
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2a85, #00b4d8);
  display: inline-block;
}
.dash-topbar-slogan {
  text-align: right;
}
.dash-topbar-slogan h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #1e1b4b;
  margin: 0 0 4px;
}
.dash-topbar-slogan p {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
}
.dash-topbar-slogan .slogan-bar {
  width: 60px;
  height: 3.5px;
  background: linear-gradient(90deg, #ff1a8c, #ff7a00);
  border-radius: 999px;
  margin-left: auto;
  margin-top: 6px;
}

/* Master Frame Container - Full Viewport Width & Height */
.dash-master-frame {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  background: #ffffff;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 75px);
  overflow: visible;
}

/* Sidebar */
.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #6c0a4d 0%, #3a0538 35%, #180320 100%);
  padding: 30px 18px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  align-self: flex-start;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}
.dash-sidebar-header {
  text-align: center;
  padding-bottom: 20px;
}
.dash-sidebar-logo-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 4px 10px rgba(255, 42, 133, 0.3));
}
.dash-sidebar-brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  line-height: 1.2;
}
.dash-sidebar-brand-badge {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 2px;
}

.dash-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}
.dash-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none !important;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.dash-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}
.dash-sidebar-link.active {
  background: linear-gradient(90deg, #ff1a8c 0%, #e60067 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 26, 140, 0.45);
}
.dash-sidebar-link .link-icon {
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
}

.dash-sidebar-footer {
  text-align: center;
  padding-top: 24px;
}
.dash-sidebar-leaf-art {
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
}
.dash-sidebar-footer-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}
.dash-sidebar-footer-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
}

/* Main Dashboard Panel */
.dash-main-panel {
  flex: 1;
  min-width: 0;
  background: #f7f9fd;
  padding: 30px 34px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Top Welcome Bar */
.dash-welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.dash-welcome-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-welcome-sub {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0;
}
.dash-user-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-notify-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #475569;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none !important;
}
.dash-notify-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.dash-notify-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  background: #c20056;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
}
.dash-admin-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 4px 14px 4px 5px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  position: relative;
  text-decoration: none !important;
  color: #1e293b;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.15s ease;
}
.dash-admin-chip:hover {
  background: #f8fafc;
}
.dash-admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff2a85;
}
.dash-admin-avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff2a85, #7b1fa2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}
.dash-admin-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  border: 1px solid #e2e8f0;
  min-width: 170px;
  padding: 6px 0;
  display: none;
  z-index: 50;
}
.dash-admin-dropdown.show {
  display: block;
}
.dash-admin-dropdown a, 
.dash-admin-dropdown button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 16px;
  font-size: 0.85rem;
  color: #334155;
  text-decoration: none !important;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.dash-admin-dropdown a:hover,
.dash-admin-dropdown button:hover {
  background: #f1f5f9;
  color: #be0055;
}

/* Metric Cards Row */
.dash-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 16px;
  align-items: stretch;
}
.dash-metric-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.03);
  text-decoration: none !important;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dash-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(42, 8, 51, 0.08);
  border-color: rgba(255, 42, 133, 0.3);
}
.dash-metric-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dash-metric-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}
.dash-metric-icon-box.purple {
  background: #f3e8ff;
  color: #7e22ce;
}
.dash-metric-icon-box.pink {
  background: #ffe4e6;
  color: #be123c;
}
.dash-metric-icon-box.orange {
  background: #fef3c7;
  color: #b45309;
}
.dash-metric-icon-box.blue {
  background: #e0f2fe;
  color: #0369a1;
}
.dash-metric-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1;
}
.dash-metric-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 600;
  margin-top: 10px;
}
.dash-metric-trend {
  font-size: 0.78rem;
  color: #10b981;
  font-weight: 700;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Action Button with Sparkle Effect */
.dash-action-btn-wrap {
  display: flex;
  align-items: center;
  position: relative;
}
.dash-action-btn-sparkle {
  position: absolute;
  top: -8px;
  left: 12px;
  font-size: 0.9rem;
  animation: dashSparkle 1.8s infinite alternate ease-in-out;
  pointer-events: none;
}
@keyframes dashSparkle {
  0% { transform: scale(0.9) rotate(-6deg); opacity: 0.7; }
  100% { transform: scale(1.15) rotate(6deg); opacity: 1; }
}
.dash-action-btn {
  background: linear-gradient(135deg, #ff1493 0%, #7b1fa2 100%);
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(255, 20, 147, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  text-decoration: none !important;
}
.dash-action-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 28px rgba(255, 20, 147, 0.6);
}

/* 2 Columns Grid for Panels */
.dash-grid-2col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}

/* Panel Card Base */
.dash-panel-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px 24px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}
.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.dash-panel-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-panel-title .title-icon {
  font-size: 1.15rem;
}
.dash-panel-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ff2a85;
  text-decoration: none !important;
  transition: color 0.15s ease, transform 0.15s ease;
}
.dash-panel-link:hover {
  color: #d80064;
  transform: translateX(2px);
}
.dash-panel-select {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
}

/* Chart Styles */
.dash-chart-wrap {
  width: 100%;
  position: relative;
}
.dash-chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.dash-chart-point {
  transition: r 0.15s ease, stroke-width 0.15s ease;
  cursor: pointer;
}
.dash-chart-point:hover {
  r: 6.5;
  stroke-width: 3.5;
}

/* Recent Activity List */
.dash-activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dash-activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 0.15s ease;
  text-decoration: none !important;
  color: inherit;
}
.dash-activity-item:hover {
  background: #f8fafc;
}
.dash-activity-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.dash-activity-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.dash-activity-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
}
.dash-activity-info {
  min-width: 0;
  flex: 1;
}
.dash-activity-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-activity-email {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-activity-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  text-align: right;
}
.dash-activity-meta {
  font-size: 0.78rem;
  color: #64748b;
}
.dash-activity-time {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}
.dash-activity-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.dash-activity-badge.pink {
  background: #ffe4e6;
  color: #9f1239;
}
.dash-activity-badge.blue {
  background: #e0f2fe;
  color: #075985;
}
.dash-activity-badge.orange {
  background: #fef3c7;
  color: #92400e;
}

/* Popular Profiles Grid */
.dash-popular-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.dash-popular-card {
  background: #f8fafc;
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid #edf2f7;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.dash-popular-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
  background: #ffffff;
}
.dash-popular-avatar-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 10px;
}
.dash-popular-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.dash-popular-avatar.ring-pink { border-color: #ff2a85; }
.dash-popular-avatar.ring-purple { border-color: #6366f1; }
.dash-popular-avatar.ring-cyan { border-color: #06b6d4; }
.dash-popular-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}
.dash-popular-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  color: #ffffff;
  margin-bottom: 8px;
}
.dash-popular-badge.pink {
  background: #ff2a85;
}
.dash-popular-badge.purple {
  background: #6366f1;
}
.dash-popular-badge.cyan {
  background: #06b6d4;
}
.dash-popular-scans {
  font-size: 0.78rem;
  color: #64748b;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Promo Banner Card */
.dash-promo-card {
  background: linear-gradient(135deg, #d81b60 0%, #8e24aa 50%, #f4511e 100%);
  border-radius: 20px;
  padding: 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 24px rgba(216, 27, 96, 0.25);
}
.dash-promo-content {
  flex: 1;
  z-index: 2;
  padding-right: 14px;
}
.dash-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.95);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.dash-promo-badge-text {
  font-size: 0.78rem;
  font-weight: 900;
  background: linear-gradient(90deg, #d81b60, #8e24aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 0.5px;
}
.dash-promo-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.35;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.dash-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #d81b60 !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.dash-promo-btn:hover {
  transform: translateY(-1px);
}
.dash-promo-art {
  width: 140px;
  height: 120px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

/* Master Footer */
.dash-master-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 8px;
}
.dash-footer-tagline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-weight: 600;
}
.dash-footer-color-bar {
  width: 32px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff2a85, #8e24aa, #00b4d8);
  display: inline-block;
}

/* Modal for Batch Printing / Quick Action */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.dash-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.dash-modal-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 32px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.dash-modal-overlay.active .dash-modal-card {
  transform: scale(1);
}
.dash-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.dash-modal-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

@media (max-width: 480px) {
  .dash-modal-card {
    padding: 24px 18px;
    border-radius: 20px;
  }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .dash-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-grid-2col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dash-master-frame {
    flex-direction: column;
  }
  .dash-sidebar {
    width: 100%;
    position: static;
    height: auto;
    max-height: none;
    overflow-y: visible;
    padding: 20px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .dash-sidebar-header {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 0;
  }
  .dash-sidebar-logo-icon {
    margin: 0;
  }
  .dash-sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0;
  }
  .dash-sidebar-footer {
    display: none;
  }
  .dash-topbar-outer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px !important;
  }
  .dash-topbar-slogan {
    text-align: left;
  }
  .dash-topbar-slogan .slogan-bar {
    margin-left: 0;
  }
  .dash-metrics-row {
    grid-template-columns: 1fr;
  }
  .dash-popular-grid {
    grid-template-columns: 1fr;
  }
  .dash-main-panel {
    padding: 20px 16px;
  }
}

/* ==========================================================================
   CHOMPOO AI ADMIN – USER DETAIL REDESIGN (Exact Replica)
   ========================================================================== */

.ud-topbar {
  background: #180320;
  color: #ffffff;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ud-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  color: #ffffff;
}
.ud-topbar-logo-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.ud-topbar-brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}
.ud-topbar-brand-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
}
.ud-topbar-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ud-notify-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  position: relative;
  text-decoration: none !important;
  transition: background 0.15s ease;
}
.ud-notify-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.ud-notify-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 3px;
  background: #c20056;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #180320;
}
.ud-admin-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
}
.ud-admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ff2a85;
}

/* Master Body Layout: Sidebar + Main */
.ud-body-layout {
  display: flex;
  min-height: calc(100vh - 63px);
  background: #f7f9fd;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Sidebar */
.ud-sidebar {
  width: 230px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #1f0426 0%, #17021e 50%, #0f0113 100%);
  padding: 24px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  margin: 0 !important;
}
.ud-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ud-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.2s ease;
}
.ud-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(3px);
}
.ud-nav-item.active {
  background: linear-gradient(90deg, #ff1493 0%, #e60067 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 20, 147, 0.45);
}
.ud-nav-icon {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
}

.ud-sidebar-footer {
  text-align: center;
  padding-top: 20px;
}
.ud-sidebar-fruit-emblem {
  width: 76px;
  height: 76px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 6px 16px rgba(255, 42, 133, 0.35));
}
.ud-sidebar-footer-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffffff;
}
.ud-sidebar-footer-sub {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1px;
}
.ud-sidebar-footer-tag {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 6px;
  line-height: 1.3;
}

/* Main Panel */
.ud-main-panel {
  flex: 1;
  min-width: 0;
  padding: 28px 34px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Page Header Bar */
.ud-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.ud-page-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ud-page-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fdf2f8;
  border: 1px solid #fce7f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.ud-page-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}
.ud-page-sub {
  font-size: 0.88rem;
  color: #64748b;
  margin: 3px 0 0;
}
.ud-search-box {
  position: relative;
  width: 320px;
  max-width: 100%;
}
.ud-search-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 10px 42px 10px 18px;
  font-size: 0.88rem;
  color: #1e293b;
  outline: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ud-search-input:focus {
  border-color: #ff2a85;
  box-shadow: 0 0 0 3px rgba(255, 42, 133, 0.12);
}
.ud-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.95rem;
  pointer-events: none;
}

/* User Hero Banner Card */
.ud-hero-banner {
  background: linear-gradient(135deg, #1f0426 0%, #35053c 50%, #17011d 100%);
  border-radius: 22px;
  padding: 24px 28px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(31, 4, 38, 0.18);
}
.ud-hero-banner::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 0, 103, 0.35) 0%, rgba(142, 36, 170, 0.15) 50%, transparent 70%);
  pointer-events: none;
}
.ud-hero-banner::before {
  content: '';
  position: absolute;
  right: 60px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 42, 133, 0.25) 0%, transparent 65%);
  pointer-events: none;
}
.ud-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  z-index: 2;
}
.ud-hero-avatar-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3.5px solid #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  background: #ffffff;
}
.ud-hero-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ud-hero-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ud-hero-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}
.ud-hero-badge-member {
  background: #e60067;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
}
.ud-hero-email-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  margin: 6px 0 10px;
}
.ud-hero-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ud-hero-chip {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ud-hero-right {
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2;
  flex-wrap: wrap;
}
.ud-btn-edit {
  background: linear-gradient(90deg, #ff1493 0%, #e60067 100%);
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 15px rgba(255, 20, 147, 0.45);
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ud-btn-edit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 20, 147, 0.6);
}

/* 2-Column Grid Layout */
.ud-grid-2col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}
.ud-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Clean Panel Card Base */
.ud-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px 24px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}
.ud-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ud-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ud-card-title .title-icon {
  font-size: 1.15rem;
  color: #8b5cf6;
}

/* Data Table Rows (ข้อมูลส่วนตัว) */
.ud-data-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f8fafc;
  font-size: 0.88rem;
  gap: 12px;
}
.ud-data-row:last-child {
  border-bottom: none;
}
.ud-data-label {
  color: #64748b;
  font-weight: 500;
  flex-shrink: 0;
  width: 42%;
}
.ud-data-val {
  color: #1e293b;
  font-weight: 600;
  text-align: right;
  flex: 1;
  word-break: break-word;
}
.ud-theme-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

/* Contact Links List */
.ud-contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ud-contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 12px;
  transition: background 0.15s ease;
  gap: 12px;
}
.ud-contact-item:hover {
  background: #f8fafc;
}
.ud-contact-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.ud-contact-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f3e8ff;
  color: #6d28d9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.ud-contact-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}
.ud-contact-val {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ud-contact-badge {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
}

/* Member Status Card Details */
.ud-status-badge-active {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.ud-status-badge-suspended {
  background: #fee2e2;
  color: #991b1b;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.ud-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #f8fafc;
}
.ud-status-row:last-of-type {
  border-bottom: none;
}
.ud-status-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-weight: 500;
}
.ud-status-val {
  color: #1e293b;
  font-weight: 700;
  font-size: 0.85rem;
}
.ud-btn-send-msg {
  width: 100%;
  background: linear-gradient(90deg, #ff1493 0%, #e60067 100%);
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 11px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(255, 20, 147, 0.4);
  margin-top: 16px;
  text-decoration: none !important;
  transition: transform 0.15s ease;
}
.ud-btn-send-msg:hover {
  transform: translateY(-1px);
}

/* Card No Box (Card 2 Right) */
.ud-cardno-big {
  font-size: 1.5rem;
  font-weight: 900;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.ud-copy-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}
.ud-copy-btn:hover {
  color: #ff2a85;
}
.ud-card-field {
  margin-bottom: 12px;
}
.ud-card-field-label {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 3px;
}
.ud-card-field-val {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #edf2f7;
  font-size: 0.82rem;
}
.ud-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.ud-btn-print-cr80 {
  flex: 1;
  background: #6d28d9;
  color: #ffffff !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  cursor: pointer;
}
.ud-btn-download-card {
  flex: 1;
  background: #f3e8ff;
  color: #7c3aed !important;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 999px;
  text-align: center;
  text-decoration: none !important;
  border: 1px solid #e9d5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* Recent Activity Timeline (Card 3 Right) */
.ud-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ud-timeline-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  gap: 10px;
}
.ud-timeline-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ud-dot.green { background: #10b981; }
.ud-dot.blue { background: #0284c7; }
.ud-dot.purple { background: #9333ea; }
.ud-timeline-title {
  font-weight: 700;
  color: #1e293b;
}
.ud-timeline-time {
  color: #94a3b8;
  font-size: 0.75rem;
  white-space: nowrap;
}
.ud-timeline-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.ud-timeline-badge.green {
  background: #dcfce7;
  color: #15803d;
}
.ud-timeline-badge.blue {
  background: #e0f2fe;
  color: #0369a1;
}
.ud-timeline-badge.purple {
  background: #f3e8ff;
  color: #9333ea;
}
.ud-timeline-link {
  display: block;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff2a85;
  text-decoration: none !important;
  margin-top: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
  .ud-grid-2col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .ud-body-layout {
    flex-direction: column;
  }
  .ud-sidebar {
    width: 100%;
    position: static;
    height: auto;
    max-height: none;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .ud-sidebar-footer {
    display: none;
  }
  .ud-main-panel {
    padding: 20px 16px;
  }
  .ud-hero-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .sidebar-collapse-btn {
    display: none !important;
  }
}

/* ==========================================================================
   SIDEBAR TOGGLE (OPEN / HIDE COLLAPSIBLE SIDEBAR)
   ========================================================================== */

/* Toggle Button on Sidebar */
.dash-sidebar,
.ud-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  align-self: flex-start;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              min-width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              margin 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease;
}
.dash-sidebar::-webkit-scrollbar,
.ud-sidebar::-webkit-scrollbar {
  width: 5px;
}
.dash-sidebar::-webkit-scrollbar-track,
.ud-sidebar::-webkit-scrollbar-track {
  background: transparent;
}
.dash-sidebar::-webkit-scrollbar-thumb,
.ud-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}
.dash-sidebar::-webkit-scrollbar-thumb:hover,
.ud-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.sidebar-collapse-btn {
  position: absolute;
  top: 18px;
  right: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #6c0a4d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
  z-index: 20;
  transition: all 0.2s ease;
}
.sidebar-collapse-btn:hover {
  transform: scale(1.15);
  background: #ff1a8c;
  color: #ffffff;
  border-color: #ff1a8c;
  box-shadow: 0 4px 14px rgba(255, 26, 140, 0.45);
}

/* Collapsed State */
.dash-sidebar.collapsed,
.ud-sidebar.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  border: none !important;
}

/* Hamburger / Open Toggle Button in Content Area */
.sidebar-toggle-hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  margin-right: 8px;
  flex-shrink: 0;
}
.sidebar-toggle-hamburger:hover {
  background: #fdf2f8;
  color: #be0055;
  border-color: #fce7f3;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 26, 140, 0.15);
}

/* Floating Tab when sidebar is collapsed */
.sidebar-floating-toggle {
  position: fixed;
  left: 0;
  top: 160px;
  z-index: 999;
  background: linear-gradient(135deg, #ff1a8c 0%, #6c0a4d 100%);
  color: #ffffff;
  padding: 10px 14px 10px 10px;
  border-radius: 0 16px 16px 0;
  box-shadow: 2px 6px 20px rgba(108, 10, 77, 0.4);
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sidebar-floating-toggle:hover {
  transform: translateX(4px);
  box-shadow: 4px 8px 24px rgba(255, 26, 140, 0.55);
}
.sidebar-floating-toggle.show {
  display: flex;
}

/* ==========================================================================
   CHOMPOO AI ADMIN – MEMBERS MANAGEMENT REDESIGN (Exact Replica)
   ========================================================================== */

.members-page-bg {
  background: #fbf7fb;
  min-height: 100vh;
  margin: 0;
  padding: 0 0 60px;
  background-image: 
    radial-gradient(circle at 94% 8%, rgba(255, 42, 133, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 6% 92%, rgba(230, 0, 103, 0.08) 0%, transparent 35%);
  background-attachment: fixed;
  font-family: var(--font-sans);
  color: #1e293b;
  position: relative;
  overflow-x: hidden;
}

/* Background watermark fruit art */
.members-watermark-top {
  position: absolute;
  top: 10px;
  right: -20px;
  width: 240px;
  height: 240px;
  opacity: 0.35;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}
.members-watermark-bottom {
  position: absolute;
  bottom: 0;
  left: -20px;
  width: 220px;
  height: 220px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

/* Container */
.members-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 32px;
  position: relative;
  z-index: 1;
}

/* Top bar with Admin chip & notification */
.members-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}
.members-notify-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e293b;
  font-size: 1.15rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-decoration: none !important;
  border: 1px solid #f1e5ed;
  transition: all 0.2s ease;
}
.members-notify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 42, 133, 0.15);
}
.members-notify-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  background: #ff2a85;
  border-radius: 50%;
  border: 2px solid #ffffff;
}
.members-admin-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid #f1e5ed;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  position: relative;
}
.members-admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #ff2a85, #8e24aa);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Page Header Title */
.members-header-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: #23062b;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
}
.members-header-sub {
  font-size: 1rem;
  color: #71717a;
  margin: 0 0 24px;
}

/* Hero Metric Card */
.members-metric-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px 36px;
  box-shadow: 0 8px 30px rgba(230, 0, 103, 0.05), 0 2px 6px rgba(0,0,0,0.02);
  border: 1px solid rgba(255, 230, 243, 0.85);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}
.members-metric-card.two-cols {
  grid-template-columns: 1.2fr 1fr;
}
.members-metric-item {
  display: flex;
  align-items: center;
  gap: 18px;
}
.members-metric-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(230, 0, 103, 0.25);
}
.members-metric-icon-wrap.pink {
  background: linear-gradient(135deg, #ff2a85 0%, #e60067 100%);
  color: #ffffff;
}
.members-metric-icon-wrap.sub-pink {
  width: 44px;
  height: 44px;
  background: #ff2a85;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 42, 133, 0.25);
}
.members-metric-icon-wrap.sub-purple {
  width: 44px;
  height: 44px;
  background: #8e24aa;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(142, 36, 170, 0.25);
}
.members-metric-label {
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 4px;
}
.members-metric-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: #180320;
  line-height: 1;
}
.members-metric-unit {
  font-size: 1.1rem;
  font-weight: 700;
  color: #180320;
  margin-left: 4px;
}
.members-metric-value-sub {
  font-size: 1.55rem;
  font-weight: 800;
  color: #180320;
  line-height: 1;
}

/* Action & Search Filter Bar */
.members-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.members-search-wrap {
  flex: 1;
  min-width: 280px;
  position: relative;
}
.members-search-input {
  width: 100%;
  height: 46px;
  border-radius: 999px;
  border: 1px solid #f1e5ed;
  background: #ffffff;
  padding: 0 20px 0 44px;
  font-size: 0.92rem;
  color: #1e293b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  outline: none;
  transition: all 0.2s ease;
}
.members-search-input:focus {
  border-color: #ff2a85;
  box-shadow: 0 0 0 3px rgba(255, 42, 133, 0.12);
}
.members-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  pointer-events: none;
}
.members-status-select {
  height: 46px;
  border-radius: 999px;
  border: 1px solid #f1e5ed;
  background: #ffffff;
  padding: 0 36px 0 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #334155;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  min-width: 150px;
}
.members-add-btn {
  height: 46px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff1a8c 0%, #e60067 100%);
  color: #ffffff;
  border: none;
  padding: 0 24px;
  font-size: 0.92rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(230, 0, 103, 0.35);
  transition: all 0.2s ease;
  text-decoration: none !important;
}
.members-add-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 0, 103, 0.45);
}
.members-btn-secondary {
  height: 46px;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  border: 1px solid #f1e5ed;
  padding: 0 20px;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  text-decoration: none !important;
}
.members-btn-secondary:hover {
  background: #fdf2f8;
  color: #be0055;
  border-color: #fbcfe8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 0, 103, 0.15);
}

/* Members Table Card */
.members-table-card {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(241, 230, 240, 0.7);
  overflow: hidden;
}
.members-ui-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.members-ui-table th {
  background: #ffffff;
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}
.members-ui-table td {
  padding: 16px 20px;
  font-size: 0.9rem;
  color: #334155;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}
.members-ui-table tr:last-child td {
  border-bottom: none;
}
.members-ui-table tr:hover td {
  background: #fdfafc;
}

/* Checkbox */
.member-custom-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid #cbd5e1;
  accent-color: #e60067;
  cursor: pointer;
}

/* Member Info Cell */
.member-info-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}
.member-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fce7f3;
}
.member-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.member-name-link {
  font-weight: 700;
  color: #1e1b4b;
  font-size: 0.95rem;
  text-decoration: none !important;
  display: block;
  white-space: nowrap;
}
.member-name-link:hover {
  color: #e60067;
}
.member-sub-role {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
  white-space: nowrap;
}

/* Status Badges */
.member-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.member-status-pill.active {
  background: #ffeaf3;
  color: #be0055;
}
.member-status-pill.inactive {
  background: #f1f5f9;
  color: #475569;
}

/* Actions Cell */
.member-actions-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.member-action-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.2s ease;
  text-decoration: none !important;
}
.member-action-icon-btn:hover {
  background: #fdf2f8;
  color: #be0055;
}

/* Action Dropdown Menu */
.member-action-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 100;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1e5ed;
  min-width: 180px;
  padding: 6px;
  display: none;
  flex-direction: column;
}
.member-action-dropdown.show {
  display: flex;
}
.member-action-dropdown a,
.member-action-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: #334155;
  text-decoration: none !important;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}
.member-action-dropdown a:hover,
.member-action-dropdown button:hover {
  background: #fdf2f8;
  color: #be0055;
}

/* Table Footer / Pagination */
.members-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid #f8fafc;
  flex-wrap: wrap;
  gap: 12px;
}
.members-footer-count {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}
.members-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}
.members-page-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}
.members-page-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.members-page-btn.active {
  background: #e60067;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(230, 0, 103, 0.35);
}

/* Responsive */
@media (max-width: 900px) {
  .members-metric-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }
  .members-container {
    padding: 16px;
  }
  .table-wrapper--no-scroll,
  .members-table-wrapper,
  .cards-table-wrapper,
  .members-table-card {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* ─────────────────────────────────────────────────────────
   CHOMPOO POPULAR PROFILES PODIUM (Matching Reference Mockup)
   Order: Rank 2 (Left) | Rank 1 (Center) | Rank 3 (Right)
   ───────────────────────────────────────────────────────── */
.popular-podium-wrap {
  padding-top: 26px;
  margin-bottom: 34px;
  overflow: visible;
}

.popular-podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  gap: 22px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .popular-podium-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.popular-podium-card {
  position: relative;
  border-radius: 24px;
  padding: 34px 22px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-decoration: none !important;
  overflow: visible;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.popular-podium-card:hover {
  transform: translateY(-4px);
}

/* Rank 1: Gold / Soft Peach Center */
.popular-podium-card.rank-1 {
  background: linear-gradient(180deg, #fff2e7 0%, #fff8f3 100%);
  border: 1.5px solid rgba(254, 215, 170, 0.85);
  box-shadow: 0 14px 38px rgba(245, 158, 11, 0.16);
  transform: translateY(-8px);
}
.popular-podium-card.rank-1:hover {
  transform: translateY(-12px);
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.22);
}
@media (max-width: 860px) {
  .popular-podium-card.rank-1 {
    transform: none;
  }
  .popular-podium-card.rank-1:hover {
    transform: translateY(-4px);
  }
}

/* Rank 2: Silver / Soft Pastel Blue Left */
.popular-podium-card.rank-2 {
  background: linear-gradient(180deg, #edf2fc 0%, #f6f8fd 100%);
  border: 1.5px solid rgba(199, 210, 254, 0.7);
  box-shadow: 0 8px 24px rgba(100, 116, 139, 0.08);
}
.popular-podium-card.rank-2:hover {
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.14);
}

/* Rank 3: Bronze / Soft Pastel Pink Right */
.popular-podium-card.rank-3 {
  background: linear-gradient(180deg, #fdf0f2 0%, #fff6f8 100%);
  border: 1.5px solid rgba(254, 205, 211, 0.7);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.08);
}
.popular-podium-card.rank-3:hover {
  box-shadow: 0 12px 32px rgba(244, 63, 94, 0.14);
}

/* Crown on top edge */
.popular-crown-badge {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.12));
}

.popular-crown-svg {
  width: 44px;
  height: 36px;
  display: block;
}

/* Avatar Areas */
.popular-avatar-simple {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  margin: 6px auto 14px;
  overflow: hidden;
  border: 3.5px solid #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  position: relative;
  background: #f1f5f9;
}

.popular-avatar-simple img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.popular-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 900;
}
.popular-avatar-fallback.blue {
  background: #e0e7ff;
  color: #4338ca;
}
.popular-avatar-fallback.gold {
  background: #fef3c7;
  color: #b45309;
}
.popular-avatar-fallback.pink {
  background: #ffe4e6;
  color: #be123c;
}

/* Golden Laurel Wreath Avatar (Rank 1) */
.popular-avatar-laurel-wrap {
  position: relative;
  width: 154px;
  height: 114px;
  margin: 2px auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popular-laurel-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 154px;
  height: 120px;
  pointer-events: none;
  z-index: 1;
}

.popular-avatar-center {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  overflow: hidden;
  border: 3.5px solid #ffffff;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
  position: relative;
  z-index: 2;
  background: #fef3c7;
}

.popular-avatar-center img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Name & Subtitle */
.popular-card-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.popular-card-name {
  font-size: 1.24rem;
  font-weight: 800;
  color: #1e1b4b;
  margin: 0 0 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.popular-card-sub {
  font-size: 0.88rem;
  color: #8c9ba5;
  margin: 0 0 14px;
  line-height: 1.4;
  max-width: 90%;
  min-height: 20px;
}

/* Eye Counter (แทนหัวใจตามคำขอของผู้ใช้) */
.popular-eye-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.popular-podium-card.rank-1 .popular-eye-box {
  background: #ffeaf3;
  border-color: rgba(255, 42, 133, 0.15);
}
.popular-podium-card.rank-2 .popular-eye-box {
  background: #edf2fc;
  border-color: rgba(99, 102, 241, 0.15);
}
.popular-podium-card.rank-3 .popular-eye-box {
  background: #fdf0f4;
  border-color: rgba(244, 63, 94, 0.15);
}

.popular-eye-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.popular-eye-count {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ff2a85;
  letter-spacing: -0.2px;
}

.popular-podium-card.rank-1 .popular-eye-count {
  color: #e60067;
}
.popular-podium-card.rank-2 .popular-eye-count {
  color: #3b82f6;
}
.popular-podium-card.rank-3 .popular-eye-count {
  color: #db2777;
}

.popular-eye-unit {
  font-size: 0.85rem;
  font-weight: 700;
  color: #64748b;
  margin-left: 2px;
}

/* Quick Action Buttons */
.popular-quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.popular-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.popular-pill-btn:hover {
  background: #ffffff;
  color: #be0055;
  border-color: #be0055;
  box-shadow: 0 4px 12px rgba(190, 0, 85, 0.18);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────
   LARGE DISPLAY ADJUSTMENTS (1920px+)
   Sidebar remains flush to the left edge of the screen
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1920px) {
  .dash-master-frame,
  .ud-body-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .dash-topbar-outer,
  .ud-topbar {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
}

/* ==========================================================================
   SEND EMAIL MODAL (POPUP FOR SENDING EMAIL TO MEMBERS)
   ========================================================================== */
.email-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.email-modal-overlay.active {
  display: flex;
}
.email-modal-box {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.email-modal-header {
  background: linear-gradient(135deg, #1f0426 0%, #3a0538 50%, #6c0a4d 100%);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.email-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
}
.email-modal-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s;
}
.email-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}
.email-modal-form {
  padding: 24px;
  box-sizing: border-box;
}
.email-form-group {
  margin-bottom: 16px;
}
.email-form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.email-recipient-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fdf2f8;
  border: 1px solid #fce7f3;
  padding: 10px 14px;
  border-radius: 10px;
}
.email-form-input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.email-form-input:focus,
.email-form-textarea:focus {
  border-color: #ff2a85;
  box-shadow: 0 0 0 3px rgba(255, 42, 133, 0.15);
}
.email-form-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.email-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}






