/* =========================================
   SALON VIP THEME & DESIGN SYSTEM
   ========================================= */
:root {
  --bg-main: #0B1118;
  --bg-card: #131B24;
  --bg-card-hover: #1A2532;
  --bg-card-glass: rgba(19, 27, 36, 0.85);
  
  --gold-primary: #D4AF37;
  --gold-light: #F3E5AB;
  --gold-dark: #AA820A;
  --gold-gradient: linear-gradient(135deg, #ECC86A 0%, #D4AF37 50%, #B8860B 100%);
  --gold-glow: 0 8px 32px rgba(212, 175, 55, 0.25);
  
  --vip-card-bg: linear-gradient(135deg, #1C2430 0%, #0D141C 50%, #070B0F 100%);
  --platinum-card-bg: linear-gradient(135deg, #2A3644 0%, #17202A 100%);
  
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --border-color: rgba(212, 175, 55, 0.2);
  --border-subtle: rgba(255, 255, 255, 0.08);
  
  --color-emerald: #10B981;
  --color-purple: #8B5CF6;
  --color-red: #EF4444;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(212, 175, 55, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.navbar {
  background: var(--bg-card-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  background: var(--gold-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0B1118;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.brand-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 2px;
  font-weight: 600;
}

.nav-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px;
  border-radius: 30px;
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 9px 18px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  color: var(--text-primary);
}

.nav-btn.active {
  background: var(--gold-gradient);
  color: #0B1118;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.btn-primary {
  background: var(--gold-gradient);
  color: #0B1118;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--gold-glow);
}

/* =========================================
   MAIN CONTENT & STATS
   ========================================= */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px;
  width: 100%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: var(--border-color);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.gold { background: rgba(212, 175, 55, 0.15); color: var(--gold-primary); }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--color-emerald); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); color: var(--color-purple); }
.stat-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--color-red); }

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* =========================================
   TAB PANES
   ========================================= */
.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   HERO SEARCH BOX (TAB 1)
   ========================================= */
.hero-search-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  padding: 40px;
  border-radius: var(--radius-xl);
  text-align: center;
  margin-bottom: 35px;
  position: relative;
  overflow: hidden;
}

.hero-search-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.12), transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.hero-search-box h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.hero-search-box p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 580px;
  margin: 0 auto 28px;
}

.search-input-wrapper {
  max-width: 680px;
  margin: 0 auto 20px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper svg {
  position: absolute;
  left: 20px;
  color: var(--gold-primary);
}

.search-input-wrapper input {
  width: 100%;
  background: #0B1118;
  border: 2px solid rgba(212, 175, 55, 0.3);
  padding: 18px 50px 18px 56px;
  border-radius: 35px;
  color: #fff;
  font-size: 1.1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
}

.clear-btn {
  position: absolute;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

.quick-hints {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hint-tag {
  color: var(--gold-light);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.hint-tag:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
}

/* =========================================
   VIP DIGITAL CARD COMPONENT
   ========================================= */
.results-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
}

.vip-card-wrapper {
  width: 100%;
  max-width: 520px;
  background: var(--vip-card-bg);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(212, 175, 55, 0.15);
}

.vip-card-wrapper::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12), transparent 70%);
  pointer-events: none;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.card-chip {
  width: 44px;
  height: 32px;
  background: linear-gradient(135deg, #d4af37 0%, #aa820a 100%);
  border-radius: 6px;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.5);
}

.card-tier-badge {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.5);
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.1);
}

.card-number-display {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--gold-light);
  margin-bottom: 24px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.card-holder-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.card-name-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.card-holder-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  text-transform: uppercase;
}

.card-holder-phone {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 1px;
}

/* LINKED OLD CARDS BOX */
.linked-cards-box {
  width: 100%;
  max-width: 520px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px dashed rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.linked-cards-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #F87171;
  margin-bottom: 8px;
}

.old-cards-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.old-tag {
  background: rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
}

/* =========================================
   TABLES & DATA GRIDS (TAB 2 & TAB 3)
   ========================================= */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.table-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.table-header .subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.filter-search input, #table-sort-select {
  background: #0B1118;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

.filter-search input:focus, #table-sort-select:focus {
  border-color: var(--gold-primary);
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 20px;
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
  padding: 16px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.data-table tr:hover td {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.badge-card {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
}

.badge-old {
  background: rgba(239, 68, 68, 0.15);
  color: #FCA5A5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.8rem;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--gold-gradient);
  color: #0B1118;
  border-color: var(--gold-primary);
}

/* PAGINATION */
.pagination-bar {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
}

.page-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
}

.page-btn.active {
  background: var(--gold-gradient);
  color: #0B1118;
  font-weight: 700;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* =========================================
   MODAL DIALOG
   ========================================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  background: #0B1118;
  border: 1px solid var(--border-subtle);
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
}

.form-group input:focus {
  border-color: var(--gold-primary);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

/* TOAST */
.toast-notification {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1E293B;
  color: #fff;
  border: 1px solid var(--gold-primary);
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-size: 0.9rem;
  z-index: 200;
  display: none;
  animation: slideUp 0.3s ease;
}

.toast-notification.active {
  display: block;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }
  .nav-tabs {
    justify-content: center;
  }
  .hero-search-box {
    padding: 24px 16px;
  }
  .hero-search-box h2 {
    font-size: 1.5rem;
  }
}
