/* ============================================
   MJ's Corner — Auth & User Account Styles
   ============================================ */

.auth-page {
  background: var(--bg-primary);
  min-height: 100vh;
}

.auth-main {
  padding-top: calc(var(--header-height) + 24px);
  padding-bottom: 48px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 15% 20%, var(--accent-glow) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(212, 44, 44, 0.08) 0%, transparent 45%),
    var(--bg-primary);
}

.auth-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
  animation: fadeInUp 0.5s ease-out;
}

/* Nav Ghost Button */
.btn-ghost-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-ghost-nav:hover {
  color: var(--accent);
  background: var(--accent-light);
  border-color: var(--accent);
  transform: translateX(-2px);
}

/* Auth Card */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.auth-tab {
  flex: 1;
  padding: 16px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-base);
  border-bottom: 3px solid transparent;
}

.auth-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.auth-tab.active {
  color: var(--accent);
  background: var(--bg-card);
  border-bottom-color: var(--accent);
}

/* Auth Panel */
.auth-panel {
  display: none;
  padding: 28px 24px;
}

.auth-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.admin-badge-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

/* Demo Shortcuts Box */
.demo-box {
  margin-bottom: 20px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  text-align: center;
}

.demo-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.btn-demo {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-demo:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-demo.customer:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.btn-demo.admin:hover {
  border-color: #f59e0b;
  color: #d97706;
  background: var(--warning-light);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-tertiary);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

/* Form */
.auth-form .form-group {
  margin-bottom: 16px;
}

.form-group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 0.85rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  accent-color: var(--accent);
}

.forgot-link {
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-decoration: none;
}

.forgot-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.btn-auth-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), #e63946);
  color: white;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 44, 44, 0.45);
}

.btn-auth-submit.admin {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.35);
}

.btn-auth-submit.admin:hover {
  box-shadow: 0 6px 24px rgba(217, 119, 6, 0.5);
}

.admin-credentials-hint {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border-left: 3px solid #f59e0b;
}

.auth-toggle-mode {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btn-text-link {
  color: var(--accent);
  font-weight: 700;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
  font-size: inherit;
  text-decoration: underline;
}

.guest-action {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.guest-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.guest-link:hover {
  color: var(--accent);
}

/* Feature Highlights */
.auth-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.highlight-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.highlight-item .icon {
  font-size: 1.3rem;
}

.highlight-item strong {
  display: block;
  font-size: 0.8rem;
  color: var(--text-primary);
}

.highlight-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

@media (max-width: 480px) {
  .auth-highlights {
    grid-template-columns: 1fr;
  }
  .highlight-item {
    flex-direction: row;
    text-align: left;
    padding: 10px 14px;
  }
}

/* ============================================
   Header User Controls (for index.html & admin)
   ============================================ */
.user-auth-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.btn-header-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--accent);
  color: white !important;
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-header-login:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.user-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-profile-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.user-avatar-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6b6b);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
}

/* User Dropdown */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 8px 0;
  z-index: 210;
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.user-dropdown.show {
  display: block;
}

.user-dropdown-header {
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.user-dropdown-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-email {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
  text-decoration: none;
}

.user-dropdown-item:hover {
  background: var(--bg-secondary);
  color: var(--accent);
}

.user-dropdown-item.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Checkout User Banner */
.checkout-user-banner {
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.checkout-user-banner .user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-user-banner .change-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.8rem;
}

/* Order Type Selector in Checkout */
.checkout-type-container {
  margin-bottom: 20px;
}

.form-section-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.checkout-type-container .order-type-grid {
  margin-bottom: 0;
  max-width: 100%;
}

.pickup-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pickup-info-box .pickup-icon {
  font-size: 1.3rem;
}

/* Welcome Screen Feature Chips */
.welcome-badge {
  display: inline-block;
  padding: 6px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
  border: 1px solid rgba(212, 44, 44, 0.15);
}

.welcome-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
  width: 100%;
  max-width: 440px;
}

.feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.feature-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.welcome-actions {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ============================================
   Floating "Go to Checkout" Bar
   ============================================ */
.floating-checkout-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), var(--shadow-accent);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 150;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: slideUpBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUpBounce {
  from { opacity: 0; transform: translate(-50%, 40px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.floating-bar-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.floating-bar-badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 6px;
}

.floating-bar-price {
  display: flex;
  flex-direction: column;
}

.floating-bar-price span:first-child {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.floating-bar-savings {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success);
}

.btn-floating-checkout {
  padding: 12px 22px;
  background: linear-gradient(135deg, var(--accent), #e63946);
  color: white;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-accent);
  transition: all var(--transition-base);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-floating-checkout:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(212, 44, 44, 0.45);
}

/* ============================================
   Checkout Coupon / Promo Code
   ============================================ */
.checkout-promo-box {
  margin-bottom: 20px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px;
}

.promo-input-group {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.promo-input-group input {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 0.9rem;
}

.promo-input-group button {
  padding: 10px 18px;
  background: var(--accent);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.promo-input-group button:hover {
  background: var(--accent-hover);
}

.promo-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.promo-chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.promo-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: scale(1.03);
}

.applied-coupon-tag {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--success-light);
  color: var(--success);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
}

.btn-remove-coupon {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.btn-remove-coupon:hover {
  color: var(--danger);
  background: rgba(0,0,0,0.05);
}

/* ============================================
   Saved Addresses (per account in checkout)
   ============================================ */
.saved-addresses-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.address-option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.address-option-card:hover {
  border-color: var(--accent);
}

.address-option-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.address-option-card input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--accent);
}

.address-option-info {
  flex: 1;
}

.address-option-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.address-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: var(--text-primary);
}

.address-default-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
}

.address-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.btn-add-address-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
  margin-bottom: 12px;
  padding: 4px 0;
}

.btn-add-address-toggle:hover {
  text-decoration: underline;
}

.add-address-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  animation: fadeIn 0.25s ease-out;
}

.dine-in-info-banner {
  padding: 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ============================================
   Profile Modal & History Section
   ============================================ */
.profile-modal {
  max-width: 650px;
}

.profile-nav-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  padding: 0 16px;
}

.profile-tab {
  padding: 14px 18px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg-card);
}

.profile-tab-content {
  display: none;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.profile-tab-content.active {
  display: block;
}

.profile-address-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.profile-order-card {
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

.profile-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.profile-order-items {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.profile-order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}

/* ============================================
   Admin Menu Image Upload & Offer %
   ============================================ */
.btn-file-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: 4px;
}

.btn-file-upload:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.file-input-hidden {
  display: none;
}

.offer-pct-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-light);
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

