/* =========================================
   BlockBite - Blockchain Food Ordering System
   Global Stylesheet
   ========================================= */

:root {
  --primary: #ff6b35;
  --primary-dark: #e55a2b;
  --secondary: #2d1b69;
  --accent: #00d4ff;
  --bg: #0f0f1e;
  --bg-alt: #1a1a2e;
  --card: #252540;
  --text: #ffffff;
  --text-muted: #a0a0b8;
  --border: #3a3a5c;
  --success: #00c896;
  --danger: #ff4757;
  --warning: #ffa502;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --radius: 12px;
  --transition: all 0.3s ease;
}

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

html {
  overflow-x: hidden;
}
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ========== LUCIDE ICON SIZING ========== */
.lucide, svg.lucide, [data-lucide] {
  display: inline-block;
  vertical-align: middle;
  stroke-width: 2;
  width: 20px;
  height: 20px;
}
.icon-xs { width: 14px !important; height: 14px !important; }
.icon-sm { width: 16px !important; height: 16px !important; }
.icon-md { width: 20px !important; height: 20px !important; }
.icon-lg { width: 28px !important; height: 28px !important; }
.icon-xl { width: 40px !important; height: 40px !important; }
.icon-2xl { width: 56px !important; height: 56px !important; }

.spinning {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

/* ========== NAVBAR ========== */
.navbar {
  background: rgba(15, 15, 30, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar .logo [data-lucide],
.navbar .logo svg {
  color: var(--primary);
  -webkit-text-fill-color: initial;
  stroke: var(--primary);
}

.menu-toggle {
  color: var(--text) !important;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-bell-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
  color: var(--text-muted);
}
.nav-bell-link:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.cart-badge {
  background: var(--primary);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  margin-left: 4px;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-user .user-name {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: var(--transition);
}
.nav-user .user-name:hover {
  background: var(--card);
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-block {
  width: 100%;
}

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

/* ========== CONTAINER ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ========== HERO (Home) ========== */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.15), transparent 50%),
    var(--bg);
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

/* ========== FEATURES ========== */
.features {
  padding: 4rem 2rem;
  background: var(--bg-alt);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== MENU / SEARCH ========== */
.menu-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex: 1;
  min-width: 250px;
  display: flex;
  align-items: center;
}

.search-wrapper .search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box {
  flex: 1;
  min-width: 250px;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
}

.search-wrapper .search-box {
  width: 100%;
  padding-left: 2.5rem;
}

.search-box:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-select {
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  cursor: pointer;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.food-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.food-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.food-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
  position: relative;
}

.food-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.food-card:hover .food-image img {
  transform: scale(1.08);
}

.food-image.fallback {
  font-size: 4rem;
}

.food-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
  color: white;
  text-align: center;
  gap: 0.5rem;
}

.food-fallback .fallback-label {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.food-info {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.food-category {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.food-name {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.food-desc {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  flex: 1;
}

.food-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.eth-price {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

/* ========== CART ========== */
.cart-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  align-items: center;
}

.cart-item-img {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  overflow: hidden;
}

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

.admin-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
  flex-shrink: 0;
}

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

.cart-item-info h4 {
  margin-bottom: 0.25rem;
}

.cart-item-info .price {
  color: var(--primary);
  font-weight: 600;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.qty-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1.25rem;
}

.cart-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.cart-summary h3 {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.summary-row.total {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

/* ========== FORMS (Auth / Checkout) ========== */
.auth-wrapper {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* Password input + eye toggle */
.password-wrapper {
  position: relative;
}
.password-wrapper .form-control {
  padding-right: 3rem;
}
.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.password-toggle:hover {
  color: var(--primary);
  background: var(--bg-alt);
}

.forgot-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--primary);
  margin-top: 0.5rem;
  text-decoration: none;
  font-weight: 500;
}
.forgot-link:hover {
  text-decoration: underline;
}

.form-row-spread {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

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

/* ========== CHECKOUT ========== */
.checkout-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
}

.wallet-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.wallet-card h3 {
  margin-bottom: 1rem;
}

.wallet-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.wallet-status.connected {
  border: 1px solid var(--success);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.status-dot.active {
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.wallet-address {
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* ========== PROFILE ========== */
.profile-wrapper {
  max-width: 1100px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 107, 53, 0.18), transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.12), transparent 60%),
    var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.profile-meta h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.profile-meta p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: var(--accent);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}
.role-badge.admin {
  background: rgba(255, 165, 2, 0.15);
  border-color: rgba(255, 165, 2, 0.3);
  color: var(--warning);
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.profile-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.profile-section h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.form-hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.activity-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.activity-stat {
  text-align: center;
  padding: 1rem 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.activity-num {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}

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

@media (max-width: 768px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  .profile-meta h2 {
    justify-content: center;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .activity-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== ORDERS ========== */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.order-id {
  font-family: monospace;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.order-date {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-pending { background: rgba(255, 165, 2, 0.2); color: var(--warning); }
.status-confirmed { background: rgba(0, 212, 255, 0.2); color: var(--accent); }
.status-preparing { background: rgba(255, 107, 53, 0.2); color: var(--primary); }
.status-delivered { background: rgba(0, 200, 150, 0.2); color: var(--success); }
.status-cancelled { background: rgba(255, 71, 87, 0.2); color: var(--danger); }

.order-items {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.tx-hash {
  font-family: monospace;
  font-size: 0.75rem;
  color: var(--accent);
}

/* ========== ADMIN ========== */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 80px);
}

.admin-sidebar {
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
}

.admin-sidebar h4 {
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar-nav a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-muted);
  transition: var(--transition);
  cursor: pointer;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: var(--card);
  color: var(--primary);
}

.admin-main {
  padding: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-change {
  font-size: 0.8rem;
  color: var(--success);
  margin-top: 0.25rem;
}

.admin-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-section h3 {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.data-table th {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.data-table tbody tr:hover {
  background: var(--bg-alt);
}

.admin-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--primary);
}
.admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.action-icons {
  display: flex;
  gap: 0.5rem;
}

.action-icons button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

.action-icons button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

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

.modal {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 500px;
  border: 1px solid var(--border);
}

.modal h3 {
  margin-bottom: 1.5rem;
}

.modal .icon-3xl {
  width: 56px;
  height: 56px;
}
.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--card);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow);
  z-index: 300;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast.error {
  border-color: var(--danger);
}

/* ========== RECEIPT PAGE ========== */
.receipt-container {
  max-width: 800px;
  margin: 0 auto;
}

.receipt-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.receipt-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.receipt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}

.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.receipt-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.receipt-brand [data-lucide],
.receipt-brand svg {
  color: var(--primary);
}

.receipt-brand h1 {
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.receipt-brand p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.receipt-status {
  font-size: 0.85rem;
}

.receipt-divider {
  border-top: 1px dashed var(--border);
  margin: 1.5rem 0;
}

.receipt-title-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.receipt-title-row h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.receipt-title-row .muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.receipt-meta {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.receipt-meta strong {
  color: var(--text);
}

.mono {
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.85rem;
}

.receipt-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.receipt-grid-2 p {
  margin: 0.15rem 0;
  font-size: 0.95rem;
}

.receipt-grid-2 .muted {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.receipt-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

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

.receipt-items-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.receipt-items-table tr:last-child td {
  border-bottom: none;
}

.receipt-totals {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.receipt-total-row.receipt-total-final {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.receipt-total-row.receipt-eth {
  font-size: 0.85rem;
  color: var(--accent);
}

.receipt-blockchain {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.06), rgba(0, 212, 255, 0.06));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.proof-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.proof-row + .proof-row {
  border-top: 1px solid var(--border);
}

.proof-label {
  color: var(--text-muted);
  white-space: nowrap;
}

.proof-value {
  text-align: right;
  word-break: break-all;
  max-width: 75%;
}

.receipt-foot {
  text-align: center;
  margin-top: 1rem;
}

.receipt-foot p {
  margin: 0.25rem 0;
  font-size: 0.85rem;
}

.receipt-foot .muted {
  color: var(--text-muted);
  font-size: 0.75rem;
}

@media (max-width: 600px) {
  .receipt-card {
    padding: 1.5rem;
  }
  .receipt-grid-2 {
    grid-template-columns: 1fr;
  }
  .receipt-meta {
    text-align: left;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  body {
    background: white !important;
    color: black !important;
  }
  .no-print, .navbar, .footer, .receipt-actions {
    display: none !important;
  }
  .receipt-container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .receipt-card {
    background: white !important;
    color: black !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .receipt-card::before { display: none; }
  .receipt-brand h1,
  .gradient-text {
    background: none !important;
    -webkit-text-fill-color: black !important;
    color: black !important;
  }
  .receipt-totals,
  .receipt-blockchain {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
  }
  .muted, .receipt-meta, .receipt-section-title {
    color: #555 !important;
  }
  .receipt-divider {
    border-top: 1px dashed #ccc !important;
  }
  a {
    color: black !important;
    text-decoration: underline !important;
  }
  .status-badge {
    border: 1px solid #999 !important;
    background: white !important;
    color: black !important;
  }
}

/* ========== HOME: HERO ENHANCEMENTS ========== */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 107, 53, 0.15);
  color: var(--primary);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

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

.hero-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 550px;
  margin: 2rem auto;
  padding: 0.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.hero-search .search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
}

.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  font-size: 1rem;
  outline: none;
}

.hero-search button {
  border-radius: 100px;
  padding: 0.65rem 1.5rem;
  white-space: nowrap;
}

/* ========== SECTION HEADINGS ========== */
.section-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

.section-head h2 {
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.section-head p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ========== CATEGORY GRID ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.category-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
  color: var(--text);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(255, 107, 53, 0.2);
}

.category-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(0, 212, 255, 0.15));
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.category-card:hover .category-icon {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  transform: scale(1.1);
}

.category-card h4 {
  margin-bottom: 0.25rem;
}

.category-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ========== POPULAR BADGE on food cards ========== */
.badge-popular {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.5);
}

/* ========== STATS SECTION ========== */
.stats-section {
  padding: 4rem 2rem;
  background:
    linear-gradient(135deg, rgba(255, 107, 53, 0.08), rgba(0, 212, 255, 0.08)),
    var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-block {
  padding: 1.5rem;
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  box-shadow: 0 10px 25px rgba(255, 107, 53, 0.35);
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== TESTIMONIALS ========== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.stars {
  color: #ffc107;
  display: flex;
  gap: 2px;
  margin-bottom: 1rem;
}
.stars [data-lucide], .stars svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.testimonial-card p {
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
}

.testimonial-author .role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== CTA SECTION ========== */
.cta-section {
  padding: 4rem 2rem;
}

.cta-card {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 107, 53, 0.25), transparent 60%),
    radial-gradient(circle at 70% 80%, rgba(0, 212, 255, 0.2), transparent 60%),
    var(--card);
  border: 1px solid var(--border);
}

.cta-card h2 {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.cta-card .hero-cta {
  justify-content: center;
}

/* ========== SCROLL REVEAL (opt-in via .reveal-on-scroll) ========== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ========== FOOTER ========== */
.footer {
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 1.5rem;
  color: var(--text-muted);
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

/* animated gradient bar at top */
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 100%;
  animation: footer-gradient-flow 5s ease infinite;
}

@keyframes footer-gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* faint glow blobs in background */
.footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 30%, rgba(255, 107, 53, 0.08), transparent 40%),
    radial-gradient(circle at 85% 70%, rgba(0, 212, 255, 0.08), transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.footer-grid,
.footer-bottom {
  position: relative;
  z-index: 1;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
}

.footer-brand .logo {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-tagline {
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 340px;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.footer-socials a:hover {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: white;
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(255, 107, 53, 0.45);
}

.footer-col h4 {
  color: var(--text);
  margin-bottom: 1.25rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.footer-col a {
  display: block;
  padding: 0.4rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.footer-col a:hover {
  color: var(--primary);
  padding-left: 6px;
}

.footer-tech {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.footer-tech span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  width: fit-content;
  transition: var(--transition);
}

.footer-tech span:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(4px);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom strong {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-made {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.footer-made [data-lucide="heart"],
.footer-made svg {
  fill: var(--primary);
  color: var(--primary);
  animation: heart-pulse 1.6s ease-in-out infinite;
}

@keyframes heart-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .footer-tagline {
    margin: 1rem auto 1.5rem;
  }
  .footer-socials {
    justify-content: center;
  }
  .footer-col h4 {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
  .footer-tech {
    align-items: center;
  }
  .hero-search {
    flex-direction: column;
    border-radius: 16px;
    padding: 1rem;
  }
  .hero-search .search-icon {
    top: 1.25rem;
  }
  .hero-search input {
    width: 100%;
  }
  .hero-search button {
    width: 100%;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }
  .navbar .logo {
    flex: 1;
  }
  .nav-bell-mobile {
    order: 2;
    display: inline-flex;
    margin-right: 0.15rem;
  }
  .menu-toggle {
    order: 3;
    display: inline-flex;
  }

  /* Hamburger button */
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    transition: background 0.18s ease, transform 0.12s ease;
  }
  .menu-toggle:hover  { background: var(--card); }
  .menu-toggle:active { transform: scale(0.92); }

  .nav-links {
    gap: 1rem;
  }

  /* Mobile hamburger menu */
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 1rem;
    right: 1rem;
    background: rgba(20, 20, 40, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem;
    gap: 0.15rem;
    display: none;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.6);
  }
  .nav-links.open {
    display: flex;
    animation: navDrop 0.22s cubic-bezier(0.32, 0.72, 0.3, 1.05);
  }
  @keyframes navDrop {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  .nav-links li { list-style: none; }
  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    transition: background 0.18s ease, color 0.18s ease;
  }
  .nav-links a:hover { background: var(--card); color: var(--primary); }
  .nav-links a.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(34, 211, 238, 0.10));
    color: var(--primary);
  }
  .nav-links a.active::after { display: none; }
  .nav-links .cart-badge {
    margin-left: auto;
    min-width: 22px;
    text-align: center;
    border-radius: 999px;
  }
  .nav-links #navAuth {
    margin-top: 0.4rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
  }
  .nav-links #navAuth > .btn {
    width: 100%;
    text-align: center;
    padding: 0.85rem;
  }
  .nav-links .nav-user {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
  }
  .nav-links .nav-user .user-name {
    max-width: none;
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--card);
    border-radius: 10px;
    justify-content: center;
  }
  .nav-links .nav-user .btn {
    width: 100%;
  }

  .hero h1 {
    font-size: 2.25rem;
  }
  .cart-wrapper,
  .checkout-wrapper {
    grid-template-columns: 1fr;
  }
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .cart-summary {
    position: static;
  }

  /* Notification dropdown — full width below navbar */
  .notify-dropdown {
    width: calc(100vw - 24px);
    max-height: 65vh;
    top: 64px !important;
    left: 12px !important;
    right: 12px !important;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  }
  .notify-header {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .notify-header h3 {
    font-size: 0.95rem;
  }
  .notify-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  .notify-actions .btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
  }
  .notify-item {
    padding: 0.75rem 0.85rem;
  }
  .notify-item-title {
    font-size: 0.85rem;
  }
  .notify-item-body {
    font-size: 0.78rem;
  }
}

/* =========================================
   LIGHT THEME — opt-in via <html data-theme="light">
   Toggle stored in localStorage, applied by app.js on every page.
   ========================================= */
:root[data-theme="light"] {
  --primary:      #ff6b35;
  --primary-dark: #e55a2b;
  --secondary:    #ffe9d5;
  --accent:       #0091b8;
  --bg:           #f6f7fb;
  --bg-alt:       #ffffff;
  --card:         #ffffff;
  --text:         #1c1c2e;
  --text-muted:   #5a5a73;
  --border:       #e2e4ee;
  --success:      #00a87a;
  --danger:       #e63a4a;
  --warning:      #f59e0b;
  --shadow:       0 4px 20px rgba(40, 40, 80, 0.08);
}
:root[data-theme="light"] body { background: var(--bg); color: var(--text); }
:root[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
}
:root[data-theme="light"] .nav-links {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 50px -10px rgba(40, 40, 80, 0.18);
}
:root[data-theme="light"] .stats-section,
:root[data-theme="light"] .features {
  background: #eef0f7;
}

/* Theme toggle button (injected into navbar by app.js) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
  margin-right: 0.5rem;
}
.theme-toggle:hover  { background: var(--card); border-color: var(--primary); }
.theme-toggle:active { transform: scale(0.92); }

/* =========================================
   MICRO-INTERACTIONS
   ========================================= */

/* Menu card hover-zoom: lifts the card + zooms the image inside */
.food-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}
.food-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.4);
}
.food-card .food-image {
  overflow: hidden;
}
.food-card .food-image img,
.food-card .food-image .food-fallback {
  transition: transform 0.45s ease;
}
.food-card:hover .food-image img,
.food-card:hover .food-image .food-fallback {
  transform: scale(1.08);
}

/* Cart badge pulse — fires whenever Cart.add bumps the count */
@keyframes cartPulse {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.6); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.cart-badge.pulse {
  animation: cartPulse 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: var(--accent);
}

/* Skeleton loader: shimmer rectangles while data fetches */
@keyframes skeletonShimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg,
    var(--card) 0%,
    rgba(255, 255, 255, 0.06) 50%,
    var(--card) 100%);
  background-size: 800px 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
  color: transparent !important;
}
:root[data-theme="light"] .skeleton {
  background: linear-gradient(90deg,
    #e8eaf2 0%,
    #f4f5fa 50%,
    #e8eaf2 100%);
  background-size: 800px 100%;
}
.skeleton-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  height: 380px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.skeleton-card .skeleton-img {
  height: 200px;
  border-radius: 0;
}
.skeleton-card .skeleton-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}
.skeleton-card .skeleton-line {
  height: 14px;
}
.skeleton-card .skeleton-line.w-60 { width: 60%; }
.skeleton-card .skeleton-line.w-40 { width: 40%; }
.skeleton-card .skeleton-line.w-90 { width: 90%; }

/* WhatsApp floating button (injected by app.js when RESTAURANT_WHATSAPP is set) */
.whatsapp-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px -4px rgba(37, 211, 102, 0.55);
  z-index: 60;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.whatsapp-fab:hover  { transform: scale(1.08); box-shadow: 0 12px 28px -4px rgba(37, 211, 102, 0.7); }
.whatsapp-fab:active { transform: scale(0.95); }
.whatsapp-fab svg, .whatsapp-fab [data-lucide] {
  width: 28px !important;
  height: 28px !important;
  stroke: #fff;
}
@media print { .whatsapp-fab { display: none; } }

/* Profile avatar — image inside, hover overlay for upload */
.profile-avatar { overflow: hidden; position: relative; }
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.profile-avatar-uploadable { cursor: pointer; }
.profile-avatar .avatar-camera {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.profile-avatar-uploadable:hover .avatar-camera { opacity: 1; }
.profile-avatar.uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M21 12a9 9 0 1 1-6.219-8.56'/></svg>") center/24px no-repeat;
  animation: spin 1s linear infinite;
}

/* Small avatar in nav — img variant */
.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0.4rem;
  vertical-align: middle;
}

/* Order chat — used on receipt + admin */
.chat-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  padding: 1rem;
}
.chat-panel h4 {
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.chat-thread {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0;
  margin-bottom: 0.75rem;
}
.chat-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem;
  font-style: italic;
}
.chat-bubble {
  max-width: 78%;
  padding: 0.55rem 0.85rem;
  border-radius: 14px;
  word-wrap: break-word;
  line-height: 1.4;
}
.chat-bubble .who {
  font-size: 0.7rem;
  opacity: 0.75;
  margin-bottom: 2px;
  font-weight: 600;
}
.chat-bubble.from-me {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.from-them {
  align-self: flex-start;
  background: var(--bg-alt);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-bubble.is-bot {
  align-self: flex-start;
  background: linear-gradient(135deg,
    rgba(0, 212, 255, 0.18),
    rgba(124, 58, 237, 0.12));
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--text);
}
.chat-bubble.is-bot .who {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chat-form {
  display: flex;
  gap: 0.5rem;
}
.chat-form input {
  flex: 1;
}
@media print { .chat-panel { display: none; } }

/* ========== hCAPTCHA THEME ========== */
#hcaptcha-login,
#hcaptcha-register,
#hcaptcha-checkout {
  margin: 0.5rem 0;
  min-height: 78px;
  overflow: hidden;
}

#hcaptcha-login > div,
#hcaptcha-register > div,
#hcaptcha-checkout > div {
  filter: none !important;
}

iframe[title="Main content of the hCaptcha CAPTCHA widget"] {
  filter: brightness(0.9) contrast(1.1) !important;
  border-radius: 8px !important;
}

@media (max-width: 480px) {
  #hcaptcha-login,
  #hcaptcha-register,
  #hcaptcha-checkout {
    min-height: 60px;
    transform-origin: 0 0;
  }
  iframe[title="Main content of the hCaptcha CAPTCHA widget"],
  iframe[title="Main content of the hCaptcha CAPTCHA challenge"] {
    max-width: 100% !important;
    transform: scale(0.85) !important;
  }
}

/* ========== NOTIFICATION BADGE & DROPDOWN ========== */
.nav-bell-desktop { display: list-item; }
.nav-bell-mobile { display: none; }

.nav-bell-mobile {
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 10px;
  transition: var(--transition);
  color: var(--text);
  position: relative;
}
.nav-bell-mobile:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
}
.nav-bell-mobile .lucide {
  width: 22px;
  height: 22px;
}
.nav-bell-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

@media (max-width: 768px) {
  .nav-bell-desktop { display: none !important; }
  .nav-bell-mobile { display: inline-flex; }
}

.notify-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  font-size: 0.55rem;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  color: #fff;
  background: var(--danger);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(255, 71, 87, 0.3);
}

/* Notification dropdown */
.notify-dropdown {
  position: fixed;
  z-index: 10000;
  width: 380px;
  max-height: 500px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: dropdownFadeIn 0.2s ease;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.notify-panel {
  display: flex;
  flex-direction: column;
  max-height: 500px;
}
.notify-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.notify-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}
.notify-actions {
  display: flex;
  gap: 0.4rem;
}
.notify-list {
  overflow-y: auto;
  max-height: 400px;
}
.notify-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.notify-item:hover {
  background: var(--bg-alt);
}
.notify-item.read {
  opacity: 0.6;
}
.notify-item-content {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.notify-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.notify-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.notify-item-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.notify-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.notify-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}
.notify-delete:hover {
  color: var(--danger);
  background: rgba(255, 71, 87, 0.1);
}
.notify-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}
.notify-empty .icon-xl {
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

/* Notification settings */
.notify-settings {
  padding: 1rem;
}
.notify-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.notify-setting-row:last-child {
  border-bottom: none;
}
.notify-setting-row > div strong {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.15rem;
}

/* ========== TOGGLE SWITCH ========== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: var(--transition);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

@media (max-width: 768px) {
  .notify-dropdown {
    width: calc(100vw - 24px);
    max-height: 65vh;
    top: calc(60px) !important;
    left: 12px !important;
    right: 12px !important;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  }
  .notify-header {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .notify-header h3 {
    font-size: 0.95rem;
  }
  .notify-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  .notify-actions .btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
  }
  .notify-item {
    padding: 0.75rem 0.85rem;
  }
  .notify-item-title {
    font-size: 0.85rem;
  }
  .notify-item-body {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .notify-dropdown {
    width: calc(100vw - 16px);
    left: 8px !important;
    right: 8px !important;
    max-height: 70vh;
    top: calc(56px) !important;
    border-radius: 12px;
  }
  .notify-panel {
    max-height: 70vh;
  }
  .notify-list {
    max-height: calc(70vh - 56px);
  }
}

/* ========== NOTIFICATION BELL & BADGE ========== */
.nav-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.nav-bell-wrap:hover,
.nav-bell-wrap:active {
  background: rgba(255, 255, 255, 0.08);
}
.nav-bell-wrap .lucide {
  color: var(--text);
  transition: var(--transition);
}
.nav-bell-wrap:hover .lucide {
  color: var(--primary);
}
.notify-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: var(--danger);
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(255, 71, 87, 0.4);
}

/* ========== NOTIFICATION DROPDOWN ========== */
.notify-dropdown {
  position: fixed;
  z-index: 10000;
  width: 380px;
  max-height: 500px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: dropdownFadeIn 0.2s ease;
}
@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.notify-panel {
  display: flex;
  flex-direction: column;
  max-height: 500px;
}
.notify-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.notify-header h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}
.notify-actions {
  display: flex;
  gap: 0.4rem;
}
.notify-list {
  overflow-y: auto;
  max-height: 400px;
}
.notify-item {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.notify-item:hover {
  background: var(--bg-alt);
}
.notify-item.read {
  opacity: 0.6;
}
.notify-item-content {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.notify-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.notify-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.notify-item-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.notify-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.notify-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
}
.notify-delete:hover {
  color: var(--danger);
  background: rgba(255, 71, 87, 0.1);
}
.notify-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}
.notify-empty .icon-xl {
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

/* ========== NOTIFICATION SETTINGS ========== */
.notify-settings {
  padding: 1rem;
}
.notify-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.notify-setting-row:last-child {
  border-bottom: none;
}
.notify-setting-row > div strong {
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.15rem;
}

/* ========== TOGGLE SWITCH ========== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: var(--transition);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary);
}
.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

@media (max-width: 768px) {
  .notify-dropdown {
    width: calc(100vw - 24px);
    max-height: 65vh;
    top: calc(60px) !important;
    left: 12px !important;
    right: 12px !important;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  }
  .notify-header {
    padding: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .notify-header h3 {
    font-size: 0.95rem;
  }
  .notify-actions {
    flex-direction: column;
    gap: 0.25rem;
  }
  .notify-actions .btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
  }
  .notify-item {
    padding: 0.75rem 0.85rem;
  }
  .notify-item-title {
    font-size: 0.85rem;
  }
  .notify-item-body {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .notify-dropdown {
    width: calc(100vw - 16px);
    left: 8px !important;
    right: 8px !important;
    max-height: 70vh;
    top: calc(56px) !important;
    border-radius: 12px;
  }
  .notify-panel {
    max-height: 70vh;
  }
  .notify-list {
    max-height: calc(70vh - 56px);
  }
  .nav-bell-wrap {
    padding: 0.4rem;
    margin-right: 0.15rem;
  }
  .nav-bell-wrap .lucide {
    width: 20px;
    height: 20px;
  }
  .notify-badge {
    min-width: 13px;
    height: 13px;
    font-size: 0.5rem;
    line-height: 13px;
    top: 2px;
    right: 2px;
  }
}

/* ========== RECEIPT FLEX CARD (Shareable Image) ========== */
.receipt-flex-card {
  position: absolute;
  left: -9999px;
  width: 500px;
  background: linear-gradient(135deg, #0f0f1e 0%, #1a1a2e 100%);
  border-radius: 24px;
  overflow: hidden;
  color: #ffffff;
  font-family: system-ui, -apple-system, sans-serif;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.card-header {
  background: linear-gradient(90deg, rgba(255, 107, 53, 0.15), rgba(0, 212, 255, 0.15));
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.card-header .brand {
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b35, #00d4ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-header .brand svg {
  stroke: #ff6b35;
  width: 24px;
  height: 24px;
}
.badge-crypto {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-crypto svg {
  width: 14px;
  height: 14px;
  stroke: #00d4ff;
}
.card-body {
  padding: 1.5rem;
}
.order-id {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1rem;
  font-family: monospace;
}
.items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.flex-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flex-item-name {
  font-size: 0.95rem;
  font-weight: 500;
}
.flex-item-qty {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}
.flex-item-price {
  font-weight: 600;
  color: #ff6b35;
}
.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 1.25rem 0;
}
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.total-row .label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}
.total-row .amount {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b35, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.crypto-row {
  text-align: right;
}
.crypto-amount {
  font-size: 0.85rem;
  font-family: monospace;
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}
.card-footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.tx-hash {
  font-family: monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.network {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.watermark {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.2);
  margin-top: 0.5rem;
  font-weight: 600;
  letter-spacing: 2px;
}

/* =========================================
   FRAUD DETECTION (Isolation Forest UI)
   ========================================= */

/* ── Section title ── */
.fraud-section .page-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.fraud-section .page-subtitle strong {
  color: var(--accent);
  font-weight: 700;
}

/* ── Fraud alert banner ── */
.fraud-alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,71,87,0.15) 0%, rgba(255,71,87,0.08) 100%);
  border: 1px solid rgba(255,71,87,0.35);
  animation: fraudBannerSlide 0.4s ease-out;
}
@keyframes fraudBannerSlide {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fraud-alert-banner-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,71,87,0.2);
  color: var(--danger);
}
.fraud-alert-banner-body {
  flex: 1;
  min-width: 0;
}
.fraud-alert-banner-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--danger);
  margin-bottom: 0.25rem;
}
.fraud-alert-banner-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.fraud-alert-banner-dismiss {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.fraud-alert-banner-dismiss:hover {
  background: rgba(255,71,87,0.25);
  color: var(--danger);
}

/* ── Scanner animation ── */
.fraud-scanner {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
}

.fraud-scanner svg {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 0 12px rgba(255, 107, 53, 0.25));
}

.fraud-scanner::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, var(--primary), transparent, var(--accent), transparent);
  opacity: 0.15;
  animation: fraudSpin 3s linear infinite;
  pointer-events: none;
}

@keyframes fraudSpin {
  to { transform: rotate(360deg); }
}

.fraud-scan-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.3));
}

.fraud-scan-details {
  margin: 0.75rem auto;
  max-width: 360px;
  background: linear-gradient(135deg, var(--card), var(--bg-alt));
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  text-align: left;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.fraud-scan-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.fraud-scan-detail-row:last-child {
  border-bottom: none;
}

.fraud-scan-detail-row span:last-child {
  font-weight: 600;
  color: var(--text);
}

.fraud-scan-steps {
  text-align: left;
  max-width: 340px;
  margin: 1.25rem auto 0;
  font-size: 0.85rem;
}

.fraud-scan-step {
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  border-radius: 8px;
  transition: background 0.3s, color 0.3s, padding-left 0.3s;
}

.fraud-scan-step.completed {
  color: var(--success);
}

.fraud-scan-step.active {
  color: var(--accent);
  background: rgba(0, 212, 255, 0.06);
  padding-left: 0.9rem;
}

.fraud-scan-step .step-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.fraud-scan-title {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.fraud-scan-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ── Fraud Confirmation Modal ── */
.fraud-confirm-icon-wrap {
  margin-bottom: 1.2rem;
}

.fraud-confirm-step h3 {
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
}

#fraudConfirmPct {
  color: var(--danger);
  font-weight: 800;
}

#fraudVerifyEmailDisplay {
  color: var(--text);
}

.fraud-email-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.fraud-clock-icon {
  width: 10px;
  height: 10px;
}

.fraud-confirm-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.fraud-confirm-icon.danger {
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.15), rgba(255, 71, 87, 0.05));
  box-shadow: 0 0 20px rgba(255, 71, 87, 0.15);
}

.fraud-confirm-icon.warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(251, 191, 36, 0.05));
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
}

.fraud-confirm-icon svg {
  width: 32px;
  height: 32px;
}

.fraud-confirm-icon.danger svg {
  color: var(--danger);
  filter: drop-shadow(0 0 6px rgba(255, 71, 87, 0.4));
}

.fraud-confirm-icon.warning svg {
  color: var(--warning);
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.4));
}

.fraud-reasons {
  text-align: left;
  background: linear-gradient(135deg, var(--bg), var(--bg-alt));
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 71, 87, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.fraud-reasons > div {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0;
}

.fraud-reasons > div + div {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.fraud-reason-icon {
  width: 14px;
  height: 14px;
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ── Email Row ── */
.fraud-email-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.fraud-email-row .form-input {
  flex: 1;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.fraud-email-row .form-input:focus {
  border-color: var(--warning);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.12);
}

.fraud-email-row .form-input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── Email Preview Card ── */
.fraud-email-preview {
  background: linear-gradient(145deg, var(--bg-alt), var(--card));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  margin-bottom: 1rem;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.fraud-email-preview-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.fraud-email-preview-header .title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.fraud-email-preview-header .time {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.fraud-email-preview-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

/* ── Code Display (the big code shown in email preview) ── */
.fraud-code-display {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.45em;
  text-align: center;
  padding: 0.85rem;
  background: linear-gradient(145deg, var(--card), #1a1a30);
  border-radius: 12px;
  font-family: 'Courier New', 'Consolas', monospace;
  border: 1.5px solid var(--border);
  color: var(--warning);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(251, 191, 36, 0.05);
  transition: all 0.3s ease;
}

.fraud-code-display.success {
  color: var(--success);
  border-color: rgba(0, 200, 150, 0.3);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 200, 150, 0.08);
}

.fraud-email-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.55rem;
  text-align: center;
}

/* ── Code Input Section ── */
.fraud-code-section {
  text-align: left;
  margin-bottom: 0.85rem;
}

.fraud-code-section label {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.fraud-verify-code {
  text-align: center;
  letter-spacing: 0.45em;
  font-size: 1.3rem;
  font-family: 'Courier New', 'Consolas', monospace;
  font-weight: 800;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}

.fraud-verify-code:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.fraud-verify-code::placeholder {
  color: var(--text-muted);
  opacity: 0.35;
  letter-spacing: 0.2em;
}

/* ── Error Message ── */
.fraud-verify-error {
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.9rem;
  background: rgba(255, 71, 87, 0.08);
  border: 1px solid rgba(255, 71, 87, 0.25);
  border-radius: 10px;
  text-align: center;
  color: var(--danger);
  backdrop-filter: blur(4px);
  line-height: 1.5;
}

/* ── Fraud Badge in checkout summary ── */
.fraud-badge {
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(4px);
}

.fraud-badge.clean {
  background: linear-gradient(135deg, rgba(0, 200, 150, 0.1), rgba(0, 200, 150, 0.04));
  border: 1px solid rgba(0, 200, 150, 0.25);
  color: var(--success);
}

.fraud-badge.flagged {
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.12), rgba(255, 71, 87, 0.04));
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: var(--danger);
}

.fraud-badge.warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.04));
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--warning);
}

.fraud-badge.scanning {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.04));
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--accent);
}

/* ── Admin: Live Test Simulator ── */
.fraud-simulator-section {
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--card), transparent);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.04);
}

.fraud-simulator-section h3 {
  color: var(--accent);
}

.fraud-simulator-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.fraud-test-score {
  text-align: center;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-alt), var(--card));
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.fraud-test-score::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg at 50% 50%, transparent, rgba(0, 212, 255, 0.03), transparent, rgba(255, 107, 53, 0.03), transparent);
  animation: fraudSpin 8s linear infinite;
  pointer-events: none;
}

.fraud-test-score > * {
  position: relative;
  z-index: 1;
}

.fraud-test-score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}

.fraud-test-score-value {
  font-size: 3.25rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.fraud-test-bar-wrap {
  position: relative;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin: 0.75rem auto;
  max-width: 400px;
  overflow: hidden;
}

.fraud-test-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.5s;
  box-shadow: 0 0 12px currentColor;
}

.fraud-test-label {
  font-weight: 700;
  font-size: 1.1rem;
}

.fraud-training-info {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.8rem;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.fraud-simulator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  padding: 0.5rem 0;
}

.fraud-simulator-grid input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  height: 6px;
  cursor: pointer;
}

.fraud-simulator-grid .form-group label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.fraud-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.fraud-checkboxes {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.fraud-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  transition: background 0.2s;
}

.fraud-checkbox-label:hover {
  background: rgba(255, 255, 255, 0.04);
}

.fraud-checkbox-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.fraud-presets {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.fraud-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.fraud-table-wrap table {
  min-width: 700px;
}

.fraud-table-wrap table th {
  background: var(--bg-alt);
  font-size: 0.72rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.8rem 0.85rem;
  border-bottom: 2px solid var(--border);
}

.fraud-table-wrap table td {
  padding: 0.7rem 0.85rem;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.fraud-table-wrap table tbody tr {
  transition: background 0.15s;
}

.fraud-table-wrap table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.fraud-table-wrap table tbody tr:hover {
  background: rgba(0, 212, 255, 0.04);
}

.fraud-empty {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
}

.fraud-empty svg {
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

/* ── Admin: table header ── */
/* ── Fraud Analytics Dashboard ── */
.fraud-analytics h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}
.fraud-analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.fraud-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
}
.fraud-stat-card.flagged { border-color: rgba(255,71,87,0.3); background: rgba(255,71,87,0.06); }
.fraud-stat-card.clean   { border-color: rgba(0,200,83,0.3);  background: rgba(0,200,83,0.06); }
.fraud-stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.fraud-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}
.fraud-stat-card.flagged .fraud-stat-value { color: var(--danger); }
.fraud-stat-card.clean   .fraud-stat-value { color: var(--success); }
.fraud-analytics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.fraud-analytics-chart-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}
.fraud-analytics-chart-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.fraud-analytics-chart-box canvas {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
.fraud-patterns-list {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
}
.fraud-pattern-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.fraud-pattern-bar-label {
  width: 110px;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.fraud-pattern-bar-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.fraud-pattern-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.fraud-pattern-bar-count {
  width: 30px;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .fraud-analytics-grid { grid-template-columns: repeat(2, 1fr); }
  .fraud-analytics-row   { grid-template-columns: 1fr; }
}

.fraud-table-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.fraud-stats-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ── Confirm modal text ── */
.fraud-confirm-pct {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.fraud-confirm-lock {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.fraud-confirm-lock svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

.fraud-confirm-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.35rem;
  line-height: 1.5;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Modal layout ── */
.fraud-confirm-modal {
  max-width: 460px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 71, 87, 0.15);
}

.fraud-confirm-step {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.fraud-confirm-step[style*="display: none"] {
  opacity: 0;
  transform: scale(0.96);
}

.fraud-scan-overlay {
  z-index: 1001;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.fraud-scan-modal {
  max-width: 480px;
  text-align: center;
  border: 1px solid rgba(255, 107, 53, 0.15);
}

.fraud-scan-phase {
  margin-bottom: 1.5rem;
}

/* ========== FRAUD BUTTONS ========== */

.fraud-actions {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Base fraud button overrides for consistent sizing */
.fraud-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
}

.fraud-actions .btn-danger {
  min-width: 140px;
}

.fraud-actions .btn-secondary {
  min-width: 100px;
}

.fraud-actions .btn-primary {
  min-width: 120px;
}

/* Send code button in email row */
.fraud-email-row .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Hover stacking for fraud modal buttons */
.fraud-actions .btn-danger:hover {
  background: #e03a48;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 71, 87, 0.35);
}

.fraud-actions .btn-danger:active {
  transform: translateY(0);
}

.fraud-actions .btn-primary:active,
.fraud-email-row .btn-primary:active {
  transform: translateY(0);
}

.fraud-email-row .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.35);
}

/* Disabled states */
.fraud-actions .btn:disabled,
.fraud-email-row .btn:disabled,
.fraud-presets .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Fraud preset buttons — color-coded by severity */
.fraud-presets .btn-preset-normal {
  border-color: var(--success);
  color: var(--success);
}
.fraud-presets .btn-preset-normal:hover {
  background: rgba(0, 200, 150, 0.15);
  border-color: var(--success);
}

.fraud-presets .btn-preset-suspicious {
  border-color: var(--warning);
  color: var(--warning);
}
.fraud-presets .btn-preset-suspicious:hover {
  background: rgba(255, 165, 2, 0.15);
  border-color: var(--warning);
}

.fraud-presets .btn-preset-extreme {
  border-color: var(--danger);
  color: var(--danger);
}
.fraud-presets .btn-preset-extreme:hover {
  background: rgba(255, 71, 87, 0.15);
  border-color: var(--danger);
}

/* Admin fraud action buttons */
.fraud-training-info .btn,
.fraud-table-header .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.fraud-training-info .btn:hover,
.fraud-table-header .btn:hover {
  transform: translateY(-1px);
}

.fraud-training-info .btn:active,
.fraud-table-header .btn:active {
  transform: translateY(0);
}

/* Retrain button — accent border */
#fraudRetrainBtn {
  border-color: var(--accent);
  color: var(--accent);
}
#fraudRetrainBtn:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: var(--accent);
}

/* Cancel Order button — subtle danger tint on hover */
#fraudCancelBtn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255, 71, 87, 0.08);
}

/* Verify Identity button icon spacing */
#fraudVerifyBtn svg,
#fraudVerifySubmitBtn svg,
#fraudSendCodeBtn svg {
  width: 16px;
  height: 16px;
}

/* Refresh button */
#fraudRefreshBtn svg,
#fraudRetrainBtn svg {
  transition: transform 0.3s ease;
}
#fraudRefreshBtn:hover svg,
#fraudRetrainBtn:hover svg {
  transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 768px) {
  .fraud-test-score-value {
    font-size: 2.25rem;
  }
  .fraud-simulator-grid {
    grid-template-columns: 1fr;
  }
  .fraud-checkboxes {
    gap: 0.75rem;
  }
  .fraud-checkbox-label {
    width: 100%;
  }
  .fraud-presets {
    flex-direction: column;
  }
  .fraud-presets .btn {
    width: 100%;
    justify-content: center;
  }
  .fraud-training-info {
    flex-direction: column;
    gap: 0.5rem;
  }
  .fraud-email-row {
    flex-direction: column;
  }
  .fraud-email-row .btn {
    width: 100%;
  }
  .fraud-code-display {
    font-size: 1.1rem;
  }
  .fraud-reasons {
    font-size: 0.8rem;
    padding: 0.6rem 0.75rem;
  }
  .fraud-scan-details {
    max-width: 100%;
    font-size: 0.75rem;
  }
  .fraud-scan-steps {
    font-size: 0.8rem;
  }
  .fraud-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .fraud-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .fraud-email-row .btn-primary {
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .fraud-test-score-value {
    font-size: 1.75rem;
  }
  .fraud-scanner {
    width: 60px;
    height: 60px;
  }
  .fraud-scanner svg {
    width: 60px;
    height: 60px;
  }
  .fraud-confirm-icon {
    width: 48px;
    height: 48px;
  }
  .fraud-confirm-icon svg {
    width: 24px;
    height: 24px;
  }
  .fraud-code-display {
    font-size: 1rem;
    padding: 0.5rem;
  }
  .fraud-scan-detail-row {
    font-size: 0.75rem;
  }
  .fraud-table-wrap table {
    min-width: 550px;
  }
  .fraud-email-preview {
    padding: 0.75rem;
  }
}

/* ── Wallet Transfer ── */
.status-awaiting_payment {
  background: rgba(124, 58, 237, 0.2);
  color: #a78bfa;
}

.wt-section {
  margin-top: 1rem;
  border-radius: 16px;
  background: var(--card);
  padding: 1.5rem;
  position: relative;
}

.wt-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.wt-header-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.wt-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wt-qr-amount {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.wt-qr-wrap {
  background: #1a1a2e;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  line-height: 0;
}

.wt-qr-wrap canvas, .wt-qr-wrap img {
  display: block;
}

.wt-amount-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.wt-amount-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.wt-amount-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.wt-amount-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--success);
}

.wt-network-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  align-self: flex-start;
}

.wt-address-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
}

.wt-address-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.wt-address-value {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
  flex: 1;
  letter-spacing: 0.3px;
}

.wt-copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
  flex-shrink: 0;
  white-space: nowrap;
}

.wt-copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 255, 0.06);
}

.wt-copy-btn.copied {
  border-color: var(--success);
  color: var(--success);
}

.wt-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.wt-status-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0;
}

.wt-status-wrap.wt-status-error {
  color: var(--danger);
}

.wt-status-wrap.wt-status-success {
  color: var(--success);
}

.wt-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
  flex-shrink: 0;
  animation: wtPulse 1.5s ease-in-out infinite;
}

.wt-confirmed {
  background: var(--success);
  animation: none;
}

.wt-actions {
  display: flex;
  gap: 0.5rem;
}

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

/* Payment confirmed state */
.wt-success {
  text-align: center;
  padding: 1rem;
}

.wt-success-icon {
  width: 48px;
  height: 48px;
  color: var(--success);
  margin-bottom: 0.5rem;
}

.wt-success-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 0.3rem;
}

.wt-success-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* =========================================
   UI POLISH — Animations, hover effects, micro-interactions
   ========================================= */

/* ---------- Page fade-in ---------- */
body {
  animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---------- Auth card entrance ---------- */
.auth-card {
  animation: slideUp 0.5s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Input focus glow ---------- */
.form-control:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}
.search-box:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

/* ---------- Button press effect ---------- */
.btn:active {
  transform: scale(0.96);
}
.btn-primary:active {
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

/* ---------- Toast enhancement (top-right, slide-down) ---------- */
.toast {
  top: 1.5rem;
  right: 1.5rem;
  bottom: auto;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  border-left: 4px solid var(--success);
  backdrop-filter: blur(12px);
  background: rgba(37, 37, 64, 0.95);
  min-width: 280px;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.error {
  border-left-color: var(--danger);
}

/* ---------- Card hover glow ---------- */
.feature-card:hover,
.food-card:hover {
  box-shadow: 0 8px 30px rgba(255, 107, 53, 0.15);
}

/* ---------- Cart item hover ---------- */
.cart-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.1);
}

/* ---------- Stats section counter animation ---------- */
.stats-section {
  position: relative;
  overflow: hidden;
}
.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.08), transparent 70%);
  pointer-events: none;
}

/* ---------- Section reveal ---------- */
.features {
  transition: background 0.4s ease;
}

/* ---------- Navbar link active indicator polish ---------- */
.nav-links a.active::after {
  bottom: -5px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ---------- Theme toggle hover ---------- */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.theme-toggle:hover {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Order card polish ---------- */
.order-card {
  border-left: 4px solid transparent;
  transition: var(--transition);
}
.order-card:hover {
  border-left-color: var(--primary);
}

/* ---------- Receipt polish ---------- */
.receipt-card {
  transition: box-shadow 0.3s ease;
}
.receipt-card:hover {
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

/* ---------- Hero section polish ---------- */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-content {
  animation: slideUp 0.6s ease;
}

/* ---------- Badge pulse ---------- */
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
.cart-badge:not(:empty):not([class*="0"]) {
  animation: badgePulse 2s ease-in-out infinite;
}

/* ---------- Loading shimmer ---------- */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--bg-alt) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

/* ---------- Custom scrollbar ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---------- Selection color ---------- */
::selection {
  background: var(--primary);
  color: white;
}

/* ---------- Fraud scan overlay polish ---------- */
.fraud-scan-overlay {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fraud-scan-overlay .modal {
  background: linear-gradient(160deg, rgba(30,30,55,0.97), rgba(15,15,30,0.98));
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(255,107,53,0.06);
  animation: fraudModalEnter 0.4s cubic-bezier(0.16,1,0.3,1);
}

@keyframes fraudModalEnter {
  from { opacity: 0; transform: scale(0.92) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.fraud-scanner {
  animation: fraudPulse 2s ease-in-out infinite;
}

@keyframes fraudPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255,107,53,0.2)); }
  50%      { filter: drop-shadow(0 0 20px rgba(255,107,53,0.4)); }
}

.fraud-scanner svg {
  filter: drop-shadow(0 0 12px rgba(255,107,53,0.25));
  transition: filter 0.6s ease;
}

.fraud-scan-steps {
  perspective: 600px;
}

.fraud-scan-step {
  transform-origin: left;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}

.fraud-scan-step.active {
  animation: stepGlow 1.5s ease-in-out infinite;
}

@keyframes stepGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(0,212,255,0.05); }
  50%      { box-shadow: 0 0 16px rgba(0,212,255,0.15); }
}

.fraud-scan-step.completed {
  animation: stepComplete 0.4s cubic-bezier(0.16,1,0.3,1);
}

@keyframes stepComplete {
  from { transform: translateX(-8px); opacity: 0.5; }
  to   { transform: translateX(0); opacity: 1; }
}

.fraud-scan-details {
  animation: detailsFadeIn 0.5s ease;
}

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

.fraud-scan-detail-row {
  transition: color 0.3s ease;
}

.fraud-scan-detail-row span:last-child {
  transition: color 0.3s ease;
}

/* ── Fraud Confirm Modal polish ── */
.fraud-confirm-modal {
  background: linear-gradient(160deg, rgba(30,30,55,0.97), rgba(15,15,30,0.98));
  border: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: fraudModalEnter 0.4s cubic-bezier(0.16,1,0.3,1);
}

.fraud-confirm-step {
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16,1,0.3,1);
}

.fraud-confirm-icon-wrap {
  animation: iconBounce 0.6s cubic-bezier(0.16,1,0.3,1);
}

@keyframes iconBounce {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.fraud-confirm-pct {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.fraud-confirm-lock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding: 0.5rem;
  background: rgba(255,71,87,0.06);
  border-radius: 8px;
  border: 1px solid rgba(255,71,87,0.1);
}

.fraud-reasons {
  animation: detailsFadeIn 0.5s ease;
}

.fraud-email-row {
  animation: detailsFadeIn 0.4s ease;
}

.fraud-email-preview {
  animation: detailsFadeIn 0.5s ease;
  transition: box-shadow 0.3s ease;
}

.fraud-email-preview:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

.fraud-code-display {
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

.fraud-code-section {
  animation: detailsFadeIn 0.5s ease;
}

.fraud-verify-error {
  animation: shakeError 0.4s ease;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  40%      { transform: translateX(4px); }
  60%      { transform: translateX(-3px); }
  80%      { transform: translateX(3px); }
}

/* ── Fraud actions row ── */
.fraud-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.fraud-actions .btn {
  flex: 1;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s cubic-bezier(0.16,1,0.3,1);
}

.fraud-actions .btn:active {
  transform: scale(0.97);
}

/* ── Fraud badge polish ── */
.fraud-badge {
  transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}

.fraud-badge.clean:hover {
  border-color: rgba(0,200,150,0.4);
  box-shadow: 0 0 16px rgba(0,200,150,0.06);
}

.fraud-badge.flagged:hover {
  border-color: rgba(255,71,87,0.4);
  box-shadow: 0 0 16px rgba(255,71,87,0.06);
}


