/* ================================================
   AUTH.CSS — LegendStore Login & Profile Styles
   ================================================ */

/* ── Auth Page Body ── */
.auth-body {
  min-height: 100vh;
  background: #080a10;
  display: flex;
  flex-direction: column;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}
.auth-bg {
  position: fixed; inset: 0; z-index: 0;
}
.auth-bg-image {
  position: absolute; inset: 0;
  background: url('assets/img/fondo login web.jpeg') center/cover no-repeat;
  filter: blur(1px) brightness(0.65);
  transform: scale(1.04);
}
.auth-bg-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(212,168,83,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, rgba(99,102,241,0.12) 0%, transparent 50%),
    linear-gradient(to right, rgba(8,10,16,0.75) 0%, rgba(8,10,16,0.3) 50%, rgba(8,10,16,0.8) 100%);
}

/* ── Auth Navbar ── */
.auth-navbar {
  position: relative; z-index: 10;
  padding: 1rem 2rem;
  display: flex; align-items: center;
}

/* ── Container ── */
.auth-container {
  position: relative; z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 4rem;
  align-items: center;
  align-content: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
  width: 100%;
  margin-top: -6rem;
}

/* ── Branding (left) ── */
.auth-branding { display: flex; flex-direction: column; gap: 1.5rem; }
.auth-brand-logo {
  width: 110px;
  height: 110px;
  filter: drop-shadow(0 0 20px rgba(212,168,83,0.5));
  margin-bottom: 0.5rem;
}
.auth-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid rgba(212,168,83,0.6);
  box-shadow: 0 0 24px rgba(212,168,83,0.35), 0 0 60px rgba(212,168,83,0.15);
}
.auth-branding h1 {
  font-size: 3rem; font-weight: 900; color: #fff; line-height: 1.1; margin: 0;
}
.auth-branding h1 span { color: #ffcc00; }
.auth-branding p { font-size: 1.05rem; color: rgba(255,255,255,0.6); line-height: 1.6; margin: 0; }
.auth-brand-bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.auth-brand-bullets li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.95rem; color: rgba(255,255,255,0.8); font-weight: 500;
}
.auth-brand-bullets li i { color: #22c55e; }

/* ── Auth Card ── */
.auth-card {
  background: rgba(10,12,22,0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(212,168,83,0.25);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}

/* ── Tabs ── */
.auth-tabs {
  display: flex; gap: 0;
  background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 4px;
  margin-bottom: 1.75rem;
}
.auth-tab {
  flex: 1; padding: 0.65rem; border: none;
  background: transparent; color: rgba(255,255,255,0.45);
  font-size: 0.9rem; font-weight: 600; border-radius: 9px;
  cursor: pointer; transition: all 0.25s; font-family: 'Inter', sans-serif;
}
.auth-tab.active {
  background: rgba(212,168,83,0.15);
  color: #ffcc00;
  border: 1px solid rgba(212,168,83,0.35);
}

/* ── Alert ── */
.auth-alert {
  padding: 0.75rem 1rem; border-radius: 10px;
  font-size: 0.875rem; font-weight: 500; margin-bottom: 1rem;
}
.auth-alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.auth-alert-success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #4ade80; }

/* ── Form ── */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-field { display: flex; flex-direction: column; gap: 0.4rem; }
.auth-field label { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.5); letter-spacing: 0.06em; text-transform: uppercase; }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-wrap > i:first-child {
  position: absolute; left: 1rem; color: rgba(255,255,255,0.3); font-size: 0.9rem; pointer-events: none;
}
.auth-input-wrap input {
  width: 100%; box-sizing: border-box;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: #fff;
  font-size: 0.95rem; outline: none;
  transition: border-color 0.2s, background 0.2s;
  font-family: 'Inter', sans-serif;
}
.auth-input-wrap input:focus {
  border-color: rgba(212,168,83,0.6);
  background: rgba(255,255,255,0.08);
}
.auth-input-wrap input::placeholder { color: rgba(255,255,255,0.25); }
.auth-eye {
  position: absolute; right: 0.85rem;
  background: transparent; border: none; color: rgba(255,255,255,0.3);
  cursor: pointer; padding: 0.25rem; transition: color 0.2s;
}
.auth-eye:hover { color: #ffcc00; }

.auth-forgot { text-align: right; }
.auth-forgot a { font-size: 0.8rem; color: rgba(255,255,255,0.4); text-decoration: none; }
.auth-forgot a:hover { color: #ffcc00; }

.auth-terms { display: flex; align-items: center; gap: 0.5rem; }
.auth-terms input[type="checkbox"] { width: 16px; height: 16px; accent-color: #ffcc00; cursor: pointer; }
.auth-terms label { font-size: 0.82rem; color: rgba(255,255,255,0.5); cursor: pointer; }
.auth-terms a { color: #ffcc00; text-decoration: none; }

/* ── Buttons ── */
.auth-btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 1rem; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #d4a853, #c9a227);
  color: #0a0c14; font-size: 1rem; font-weight: 800;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 20px rgba(212,168,83,0.3);
  width: 100%;
}
.auth-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(212,168,83,0.45); }
.auth-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.auth-btn-discord {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 0.9rem; border-radius: 12px;
  background: rgba(88,101,242,0.15); border: 1px solid rgba(88,101,242,0.4);
  color: #7289da; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s; font-family: 'Inter', sans-serif;
}
.auth-btn-discord:hover { background: rgba(88,101,242,0.25); transform: translateY(-1px); }
.auth-btn-discord i { font-size: 1.2rem; }

/* ── Divider ── */
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.25rem 0;
  color: rgba(255,255,255,0.2); font-size: 0.78rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08);
}

/* ── Switch text ── */
.auth-switch { text-align: center; margin-top: 1.25rem; font-size: 0.85rem; color: rgba(255,255,255,0.4); }
.auth-switch a { color: #ffcc00; text-decoration: none; font-weight: 600; }

/* =========================================
   NAVBAR USER MENU
   ========================================= */
.nav-login-btn {
  padding: 0.5rem 1.1rem; border-radius: 8px;
  background: rgba(212,168,83,0.15); border: 1px solid rgba(212,168,83,0.4);
  color: #ffcc00; font-size: 0.85rem; font-weight: 600; text-decoration: none;
  display: flex; align-items: center; gap: 6px; transition: all 0.2s;
}
.nav-login-btn:hover { background: rgba(212,168,83,0.25); }

.nav-user-menu { position: relative; }
.nav-user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #d4a853, #c9a227);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.2s; border: 2px solid rgba(212,168,83,0.5);
}
.nav-user-avatar:hover { transform: scale(1.05); }
.nav-avatar-letter { font-size: 0.9rem; font-weight: 800; color: #0a0c14; }
.nav-user-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 12px);
  background: rgba(10,12,22,0.97); border: 1px solid rgba(212,168,83,0.25);
  border-radius: 16px; min-width: 220px; z-index: 1000;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7); overflow: hidden;
}
.nav-user-dropdown.active { display: block; }
.nud-header { padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
.nud-name { font-size: 0.95rem; font-weight: 700; color: #fff; }
.nud-email { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 2px; }
.nud-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.75rem 1.25rem; color: rgba(255,255,255,0.7);
  text-decoration: none; font-size: 0.875rem; transition: all 0.15s;
}
.nud-item:hover { background: rgba(212,168,83,0.08); color: #ffcc00; }
.nud-item i { width: 16px; text-align: center; }
.nud-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 0.25rem 0; }
.nud-logout { color: rgba(239,68,68,0.7); }
.nud-logout:hover { background: rgba(239,68,68,0.08); color: #f87171; }

/* =========================================
   PROFILE BODY
   ========================================= */
.profile-body { background: #080a10; min-height: 100vh; font-family: 'Inter', sans-serif; }
.profile-wrapper {
  display: grid; grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 70px);
  max-width: 1300px; margin: 0 auto; padding: 2rem 1.5rem;
  gap: 2rem;
}

/* ── Sidebar ── */
.profile-sidebar {
  background: rgba(10,12,22,0.85); border: 1px solid rgba(212,168,83,0.15);
  border-radius: 20px; padding: 2rem 1.25rem; height: fit-content;
  position: sticky; top: 90px;
}
.ps-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-bottom: 2rem; }
.ps-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #d4a853, #c9a227);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; color: #0a0c14;
  border: 3px solid rgba(212,168,83,0.4);
}
.ps-name { font-size: 1rem; font-weight: 700; color: #fff; }
.ps-email { font-size: 0.75rem; color: rgba(255,255,255,0.4); }
.ps-member-badge {
  display: flex; align-items: center; gap: 5px;
  padding: 0.2rem 0.65rem; border-radius: 50px;
  background: rgba(212,168,83,0.1); border: 1px solid rgba(212,168,83,0.3);
  font-size: 0.72rem; font-weight: 700; color: #ffcc00;
}
.ps-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.ps-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.7rem 1rem; border-radius: 10px; color: rgba(255,255,255,0.55);
  text-decoration: none; font-size: 0.875rem; font-weight: 500; transition: all 0.2s;
}
.ps-nav-item:hover { background: rgba(255,255,255,0.04); color: #fff; }
.ps-nav-item.active { background: rgba(212,168,83,0.12); color: #ffcc00; border: 1px solid rgba(212,168,83,0.25); }
.ps-nav-item i { width: 16px; text-align: center; }
.ps-logout { color: rgba(239,68,68,0.6) !important; margin-top: 1rem; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 1rem !important; }
.ps-logout:hover { background: rgba(239,68,68,0.08) !important; color: #f87171 !important; }

/* ── Profile Main ── */
.profile-main { display: flex; flex-direction: column; gap: 1.5rem; }
.profile-section { display: none; flex-direction: column; gap: 1.5rem; }
.profile-section.active { display: flex; }

.prof-section-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 0.5rem; }
.prof-section-header h1 { font-size: 1.8rem; font-weight: 800; color: #fff; margin: 0; }
.prof-section-header h3 { font-size: 1.1rem; font-weight: 700; color: #fff; margin: 0; }
.prof-section-header p { font-size: 0.9rem; color: rgba(255,255,255,0.45); margin: 0; }
.prof-view-all { font-size: 0.85rem; color: #ffcc00; text-decoration: none; }

/* Stats Grid */
.prof-stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem;
}
.prof-stat-card {
  background: rgba(10,12,22,0.85); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 1.25rem;
  display: flex; align-items: center; gap: 1rem;
  transition: border-color 0.2s;
}
.prof-stat-card:hover { border-color: rgba(212,168,83,0.25); }
.prof-stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.prof-stat-icon.gold { background: rgba(212,168,83,0.15); color: #ffcc00; }
.prof-stat-icon.green { background: rgba(34,197,94,0.15); color: #22c55e; }
.prof-stat-icon.blue { background: rgba(59,130,246,0.15); color: #3b82f6; }
.prof-stat-icon.purple { background: rgba(168,85,247,0.15); color: #a855f7; }
.prof-stat-value { font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1; }
.prof-stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.4); margin-top: 3px; }

/* Quick Actions */
.prof-quick-actions { background: rgba(10,12,22,0.85); border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 1.5rem; }
.prof-quick-actions h3 { font-size: 1rem; font-weight: 700; color: #fff; margin: 0 0 1rem 0; }
.prof-qa-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.75rem; }
.prof-qa-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  padding: 1rem; border-radius: 12px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  text-decoration: none; color: rgba(255,255,255,0.7); font-size: 0.8rem; font-weight: 600;
  transition: all 0.2s;
}
.prof-qa-card:hover { background: rgba(212,168,83,0.08); border-color: rgba(212,168,83,0.25); color: #fff; }
.prof-qa-card i { font-size: 1.4rem; }

/* Recent Orders & Full Orders */
.prof-recent-orders, .prof-orders-panel { background: rgba(10,12,22,0.85); border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 1.5rem; }
.prof-orders-header {
  display: grid; grid-template-columns: 1fr 2fr 1fr 1fr 1fr;
  padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.72rem; font-weight: 700; color: rgba(255,255,255,0.3);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem;
}
.prof-order-row {
  display: grid; grid-template-columns: 1fr 2fr 1fr 1fr 1fr;
  padding: 0.85rem 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: center; transition: background 0.15s; border-radius: 8px;
}
.prof-order-row:last-child { border-bottom: none; }
.prof-order-code { font-size: 0.82rem; font-weight: 700; color: #ffcc00; font-family: monospace; }
.prof-order-service { font-size: 0.85rem; color: #fff; font-weight: 500; }
.prof-order-date { font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.prof-order-amount { font-size: 0.9rem; font-weight: 700; color: #fff; }
.prof-order-status { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* Empty State */
.prof-empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  padding: 3rem; color: rgba(255,255,255,0.3); text-align: center;
}
.prof-empty-state i { font-size: 3rem; }
.prof-empty-state a { color: #ffcc00; text-decoration: none; }

/* Settings */
.prof-settings-card {
  background: rgba(10,12,22,0.85); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 1.75rem; display: flex; flex-direction: column; gap: 1.25rem;
}
.prof-settings-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }
.prof-settings-card.danger { border-color: rgba(239,68,68,0.15); }

/* Toast */
.settings-toast {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
  padding: 0.9rem 1.5rem; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.toast-success { background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); color: #4ade80; }
.toast-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.4); color: #f87171; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .auth-container { grid-template-columns: 1fr; max-width: 480px; }
  .auth-branding { display: none; }
  .prof-stats-grid { grid-template-columns: repeat(2,1fr); }
  .prof-qa-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .profile-wrapper { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; display: flex; flex-direction: row; flex-wrap: wrap; gap: 1rem; padding: 1.25rem; }
  .ps-avatar-wrap { flex-direction: row; margin-bottom: 0; }
  .ps-nav { flex-direction: row; flex-wrap: wrap; }
  .prof-orders-header, .prof-order-row { grid-template-columns: 1fr 2fr 1fr; }
  .prof-order-date, .prof-order-amount { display: none; }
}
