/* Ulio-inspired Design System - Restaurant Growth Platform */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Dark purple/indigo theme */
  --bg: #0f0a1a;
  --bg-elevated: #1a1230;
  --bg-card: #1e1438;
  --bg-card-hover: #251a45;
  --text: #ffffff;
  --text-muted: #a8a0b8;
  --text-dim: #7a6f8f;
  --accent: #9d5aef;
  --accent-light: #b87aff;
  --accent-glow: rgba(157, 90, 239, 0.4);
  --gradient-start: #9d5aef;
  --gradient-end: #c94fd6;
  --border: rgba(157, 90, 239, 0.25);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Particle/starry background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, rgba(157, 90, 239, 0.3), transparent),
    radial-gradient(2px 2px at 40px 70px, rgba(201, 79, 214, 0.2), transparent),
    radial-gradient(2px 2px at 50px 160px, rgba(157, 90, 239, 0.25), transparent),
    radial-gradient(2px 2px at 90px 40px, rgba(184, 122, 255, 0.2), transparent),
    radial-gradient(2px 2px at 130px 80px, rgba(157, 90, 239, 0.15), transparent);
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
}

/* Subtle gradient overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(157, 90, 239, 0.15), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Ensure content sits above background */
.container, .login-container, .card, .checkout-container, main { position: relative; z-index: 1; }

/* Shared nav (used by nav.js) */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--text); }
.nav-logo-icon {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 8px;
}
.nav-links { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(157, 90, 239, 0.35);
  transition: all 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(157, 90, 239, 0.45); opacity: 0.95; }

/* Profile dropdown - top right */
.profile-dropdown {
  position: relative;
  display: inline-block;
}
.nav-user-area {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.nav-username {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
@media (max-width: 640px) {
  .nav-username {
    max-width: 100px;
    font-size: 0.85rem;
  }
}
.profile-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: white;
  cursor: pointer;
  border: 2px solid var(--border);
  overflow: hidden;
  transition: all 0.2s;
}
.profile-avatar:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(157, 90, 239, 0.3);
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  padding: 8px 0;
  z-index: 1000;
  display: none;
}
.profile-dropdown-menu.show {
  display: block;
}
.profile-dropdown-menu a,
.profile-dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}
.profile-dropdown-menu a:hover,
.profile-dropdown-menu button:hover {
  background: rgba(157, 90, 239, 0.15);
}
.profile-dropdown-menu .dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}
.profile-dropdown-menu .dropdown-email {
  padding: 8px 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Primary CTA button - purple gradient */
.btn-primary, .nav-cta, .submit-button, .cta-button {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover, .nav-cta:hover, .submit-button:hover, .cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px var(--accent-glow);
  opacity: 0.95;
}

/* Secondary button */
.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.btn-secondary:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* Cards with purple border glow */
.card, .pricing-card, .stat-card, .payment-section, .activity-feed, .data-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  transition: all 0.2s;
}
.card:hover, .pricing-card:hover {
  border-color: rgba(157, 90, 239, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Badge pill */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(157, 90, 239, 0.2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
}

/* Form inputs */
.form-group input, .form-group select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(157, 90, 239, 0.15);
}

/* Links */
a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

/* Scroll reveal - add .reveal class to elements */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
