:root {
  --bg: #020408;
  --surface: #0d1117;
  --surface2: #161b22;
  --surface3: #1c2230;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --accent: #00e5a0;
  --accent-dim: rgba(0,229,160,0.1);
  --accent-glow: rgba(0,229,160,0.3);
  --red: #ff6b7a;
  --red-dim: rgba(220,53,69,0.1);
  --blue: #378add;
  --blue-dim: rgba(0,112,243,0.1);
  --yellow: #ffc107;
  --text: #f0f6fc;
  --muted: #8b949e;
  --muted2: #6e7681;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--surface3); }

/* ===================== PAGE ANIMATION ===================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.page-enter {
  animation: fadeInUp 0.4s ease forwards;
}

/* ===================== NAVBAR ===================== */
.navbar {
  background: rgba(2,4,8,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity var(--transition);
}

.navbar-brand:hover { opacity: 0.85; }

.nav-link {
  color: var(--muted) !important;
  transition: color var(--transition);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover { color: var(--text) !important; }
.nav-link.active { color: var(--text) !important; }

.btn-nav {
  background: var(--accent);
  color: #000 !important;
  padding: 0.4rem 1.1rem !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem !important;
  transition: transform var(--transition), box-shadow var(--transition) !important;
}

.btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ===================== LOGO DOT ===================== */
.logo-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

/* ===================== HERO ===================== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,229,160,0.08) 0%, transparent 70%);
  top: -150px; left: 50%;
  transform: translateX(-50%);
  animation: pulse 6s infinite;
}

.orb-2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,112,243,0.07) 0%, transparent 70%);
  bottom: 0; right: 10%;
}

.orb-3 {
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,229,160,0.06) 0%, transparent 70%);
  bottom: 20%; left: 5%;
}

.hero-content {
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.6s ease;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid rgba(0,229,160,0.2);
  color: var(--accent);
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  margin-bottom: 2rem;
  font-weight: 500;
}

.badge-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.accent { color: var(--accent); }
.red-accent { color: var(--red); }

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================== STATS ===================== */
.stats-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

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

.stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}

/* ===================== BUTTONS ===================== */
.btn-primary {
  background: var(--accent);
  color: #000;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 0 25px rgba(0,229,160,0.15);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 35px var(--accent-glow);
  color: #000;
}

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

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

.btn-secondary {
  color: var(--muted);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--border2);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.btn-secondary:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid rgba(220,53,69,0.2);
  transition: background var(--transition), border-color var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.btn-danger:hover {
  background: rgba(220,53,69,0.2);
  color: var(--red);
}

.w-100 { width: 100%; justify-content: center; }

/* Loading spinner in button */
.btn-primary.loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 6px;
}

/* ===================== FEATURES SECTION ===================== */
.features { padding: 6rem 0; }

.section-label {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.feature-card {
  background: var(--surface);
  padding: 2rem;
  transition: background var(--transition);
}

.feature-card:hover { background: var(--surface2); }

.feat-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ===================== CTA SECTION ===================== */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,229,160,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* ===================== AUTH FORMS ===================== */
.auth-container {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 430px;
  animation: fadeInUp 0.4s ease;
  box-shadow: var(--shadow);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0.75rem 0 0.4rem;
}

.auth-header p { color: var(--muted); font-size: 0.9rem; }

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

.form-group label {
  display: block;
  font-size: 0.83rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  font-size: 0.9rem;
  pointer-events: none;
}

.input-wrapper .form-control {
  padding-left: 2.4rem;
}

.input-wrapper .eye-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.input-wrapper .eye-btn:hover { color: var(--text); }

.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 0.72rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.form-control:focus {
  outline: none;
  border-color: rgba(0,229,160,0.5);
  box-shadow: 0 0 0 3px rgba(0,229,160,0.08);
}

.form-control::placeholder { color: var(--muted2); }

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

select.form-control option {
  background: var(--surface2);
  color: var(--text);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-footer a:hover { text-decoration: underline; }

/* ===================== FORM SECTION CARD ===================== */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.form-section-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

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

.form-grid-2 .full-width { grid-column: 1 / -1; }

/* ===================== PAGE HEADER ===================== */
.page-header {
  padding: 2rem 0 1.5rem;
}

.page-header h1 {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.page-header p { color: var(--muted); font-size: 0.9rem; }

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ===================== DASHBOARD ===================== */
.dashboard { padding: 1rem 0 4rem; }

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

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.dash-card:hover {
  border-color: rgba(0,229,160,0.18);
  transform: translateY(-1px);
}

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.dash-card-header h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.dash-card-body p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  display: flex;
  gap: 8px;
}

.label {
  color: var(--text);
  font-weight: 500;
  min-width: 90px;
  flex-shrink: 0;
}

.dash-card .btn-secondary {
  margin-top: 1rem;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
}

/* ===================== PROFILE COMPLETION ===================== */
.progress-bar-wrap {
  background: var(--surface2);
  border-radius: 100px;
  height: 6px;
  overflow: hidden;
  margin-top: 4px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #00b37a);
  border-radius: 100px;
  transition: width 0.6s ease;
}

/* ===================== SHARE BAR ===================== */
.share-bar {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-link {
  font-size: 0.85rem;
  color: var(--accent);
  flex: 1;
  word-break: break-all;
  font-family: monospace;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 0.3rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: border-color var(--transition), color var(--transition);
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
}

.copy-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ===================== PRODUCT SELECTOR ===================== */
.product-option {
  flex: 1;
  min-width: 140px;
  padding: 1.2rem;
  border-radius: var(--radius);
  text-align: center;
  text-decoration: none;
  border: 2px solid var(--border);
  background: transparent;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  display: block;
}

.product-option:hover { transform: translateY(-2px); }
.product-option.active-card { border-color: rgba(0,229,160,0.4); background: var(--accent-dim); }
.product-option.active-bracelet { border-color: rgba(220,53,69,0.4); background: var(--red-dim); }

/* ===================== ALERTS ===================== */
.alert {
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInUp 0.3s ease;
}

.alert-success {
  background: rgba(0,229,160,0.08);
  border: 1px solid rgba(0,229,160,0.2);
  color: var(--accent);
}

.alert-danger {
  background: rgba(220,53,69,0.08);
  border: 1px solid rgba(220,53,69,0.2);
  color: var(--red);
}

.alert-info {
  background: var(--blue-dim);
  border: 1px solid rgba(0,112,243,0.2);
  color: var(--blue);
}

.alert-warning {
  background: rgba(255,193,7,0.08);
  border: 1px solid rgba(255,193,7,0.2);
  color: var(--yellow);
}

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.6;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
  transition: opacity var(--transition);
}

.alert-close:hover { opacity: 1; }

/* ===================== ADMIN STYLES ===================== */
.admin-stat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: border-color var(--transition);
}

.admin-stat:hover { border-color: var(--border2); }

.admin-stat-number {
  font-family: 'Syne', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.admin-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td { background: var(--surface2); }
.admin-table tr:last-child td { border-bottom: none; }

/* ===================== BADGES ===================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
}

.badge-user { background: rgba(255,255,255,0.05); color: var(--muted); border: 1px solid var(--border); }
.badge-subadmin { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(0,112,243,0.2); }
.badge-admin { background: rgba(255,193,7,0.1); color: var(--yellow); border: 1px solid rgba(255,193,7,0.2); }
.badge-card { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,229,160,0.2); }
.badge-bracelet { background: var(--red-dim); color: var(--red); border: 1px solid rgba(220,53,69,0.2); }
.badge-active { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,229,160,0.2); }
.badge-disabled { background: var(--red-dim); color: var(--red); border: 1px solid rgba(220,53,69,0.2); }

/* ===================== ACTION BUTTONS ===================== */
.act-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  margin: 2px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.act-edit { background: var(--blue-dim); color: var(--blue); border: 1px solid rgba(0,112,243,0.2); }
.act-edit:hover { background: rgba(0,112,243,0.2); }
.act-reset { background: rgba(255,193,7,0.1); color: var(--yellow); border: 1px solid rgba(255,193,7,0.2); }
.act-reset:hover { background: rgba(255,193,7,0.2); }
.act-toggle { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,229,160,0.2); }
.act-toggle:hover { background: rgba(0,229,160,0.2); }
.act-toggle-off { background: var(--red-dim); color: var(--red); border: 1px solid rgba(220,53,69,0.2); }
.act-delete { background: var(--red-dim); color: var(--red); border: 1px solid rgba(220,53,69,0.2); }
.act-delete:hover { background: rgba(220,53,69,0.2); }
.act-view { background: rgba(255,255,255,0.04); color: var(--muted); border: 1px solid var(--border); }
.act-view:hover { background: rgba(255,255,255,0.08); color: var(--text); }

/* ===================== MODAL ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 490px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.25s ease;
}

.modal-box h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: color var(--transition);
  padding: 0;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

/* ===================== ADMIN SEARCH ===================== */
.search-input {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border-radius: 10px;
  font-size: 0.85rem;
  width: 280px;
  transition: border-color var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.search-input:focus { outline: none; border-color: rgba(0,229,160,0.4); }

.search-wrapper {
  position: relative;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* ===================== AVATAR ===================== */
.avatar-sm {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
}

.avatar-sm-text {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid rgba(0,229,160,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 0.9rem; color: var(--accent);
  flex-shrink: 0;
}

.avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--accent);
}

.avatar-lg-text {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--accent-dim);
  border: 3px solid rgba(0,229,160,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 2rem; color: var(--accent);
}

/* ===================== CHAT STYLES ===================== */
.msg { display: flex; margin-bottom: 0.75rem; }
.msg.user { justify-content: flex-end; }
.msg.bot { justify-content: flex-start; }

.msg-bubble {
  max-width: 75%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.msg.user .msg-bubble {
  background: var(--accent);
  color: #000;
  border-bottom-right-radius: 4px;
}

.msg.bot .msg-bubble {
  background: var(--surface2);
  color: var(--text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

.typing .msg-bubble {
  color: var(--muted);
  font-style: italic;
}

/* ===================== SOCIAL BUTTONS ===================== */
.social-btn {
  flex: 1;
  min-width: 80px;
  text-align: center;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 500;
}

.social-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.social-instagram { background: rgba(225,48,108,0.1); border: 1px solid rgba(225,48,108,0.2); color: #e1306c; }
.social-linkedin { background: var(--blue-dim); border: 1px solid rgba(0,112,243,0.2); color: var(--blue); }
.social-github { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text); }
.social-twitter { background: rgba(29,155,240,0.1); border: 1px solid rgba(29,155,240,0.2); color: #1d9bf0; }
.social-whatsapp { background: rgba(37,211,102,0.1); border: 1px solid rgba(37,211,102,0.2); color: #25d366; }
.social-website { background: var(--accent-dim); border: 1px solid rgba(0,229,160,0.2); color: var(--accent); }

/* ===================== PROFILE CARD ===================== */
.profile-cover {
  height: 120px;
  position: relative;
  overflow: hidden;
}

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

.profile-cover-placeholder {
  height: 100%;
  background: linear-gradient(135deg, rgba(0,229,160,0.15), rgba(0,112,243,0.1));
}

.micronfc-brand {
  position: absolute;
  top: 1rem; right: 1rem;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.75rem;
}

.contact-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.contact-icon-green { background: var(--accent-dim); border: 1px solid rgba(0,229,160,0.15); }
.contact-icon-red { background: var(--red-dim); border: 1px solid rgba(220,53,69,0.15); }
.contact-icon-whatsapp { background: rgba(37,211,102,0.08); border: 1px solid rgba(37,211,102,0.2); }

/* ===================== BOT CONTEXT FORM ===================== */
.bot-tips {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}

.bot-tips h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.bot-tips ul {
  list-style: none;
  padding: 0;
}

.bot-tips ul li {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.25rem 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.bot-tips ul li::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
}

/* ===================== CHAT PAGE ===================== */
.chat-page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem;
  height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
}

.chat-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.chat-page-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--surface);
}

.chat-page-input-row {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ===================== PHOTO PREVIEW ===================== */
.photo-preview {
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}

.photo-preview img {
  display: block;
  width: 100%;
  object-fit: cover;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .page-header-row { flex-direction: column; align-items: flex-start; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-2 .full-width { grid-column: 1; }
  .hero h1 { letter-spacing: -1px; }
  .auth-card { padding: 1.75rem; }
  .search-input { width: 100%; }
  .stats-row { gap: 1.5rem; }
  .chat-page-wrap { padding: 0; height: calc(100vh - 72px); }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }
  .dashboard-grid { gap: 1rem; }
}
/* ===================== MOBILE FIXES ===================== */

/* Navbar */
@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .navbar-nav {
    gap: 0.25rem !important;
    flex-wrap: nowrap;
    align-items: center;
  }

  .nav-link {
    font-size: 0.78rem !important;
    padding: 0.3rem 0.4rem !important;
  }

  .btn-nav {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.7rem !important;
  }

  /* Dashboard Header */
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.75rem;
  }

  .dashboard-header a,
  .dashboard-header button {
    width: 100%;
    justify-content: center;
  }

  .dashboard-header h1 {
    font-size: 1.4rem;
  }

  /* Share Bar */
  .share-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .share-bar .copy-btn {
    width: 100%;
    justify-content: center;
  }

  /* Chat Popup */
  .chat-popup {
    width: calc(100vw - 2rem) !important;
    right: 1rem !important;
    left: 1rem !important;
    bottom: 5rem !important;
    height: 70vh !important;
    max-height: 480px !important;
  }

  .chat-fab {
    bottom: 1.2rem !important;
    right: 1.2rem !important;
    width: 52px !important;
    height: 52px !important;
  }

  /* Admin Table */
  .admin-table {
    font-size: 0.78rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.6rem 0.5rem;
  }

  /* إخفاء columns مش مهمة على الموبايل */
  .admin-table .hide-mobile {
    display: none;
  }

  /* Admin Header */
  .admin-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .admin-header-row .btn-primary,
  .admin-header-row .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Edit User Grid */
  .admin-edit-grid {
    grid-template-columns: 1fr !important;
  }

  /* Auth Card */
  .auth-container {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 2rem;
  }

  .auth-card {
    padding: 1.5rem;
    border-radius: 16px;
  }

  /* Modals */
  .modal-box {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
    padding: 1.5rem;
  }

  /* Profile Cards */
  .profile-cover {
    height: 100px;
  }

  /* Bot Tips */
  .bot-tips { display: none; }
}

/* Small phones */
@media (max-width: 390px) {
  .navbar-brand { font-size: 1rem; }

  .nav-link { font-size: 0.72rem !important; }

  .dashboard-grid { gap: 0.75rem; }

  .dash-card { padding: 1.1rem; }

  .act-btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
  }

  .admin-stat-number { font-size: 1.8rem; }

  .hero h1 { font-size: 2rem; }

  .chat-popup {
    height: 65vh !important;
  }
}

/* ===== FIX: لا سحب أفقي ===== */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.container {
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ===== FIX: الجداول على الموبايل ===== */
@media (max-width: 768px) {
  .table-responsive-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 16px 16px;
  }
}
