/* =============================================
   NEXUS FITNESS — AUTH STYLES
   auth.css
   ============================================= */

/* ── Auth Page Layout ── */
.auth-page {
  min-height: 100vh;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  top: -300px;
  left: -300px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255,61,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.auth-page::after {
  content: '';
  position: absolute;
  bottom: -300px;
  right: -300px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,215,0,0.04) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Auth Card ── */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-card.wide {
  max-width: 640px;
}

/* ── Auth Logo ── */
.auth-logo {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.auth-logo span {
  color: var(--accent-primary);
}

.auth-tagline {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

/* ── Auth Heading ── */
.auth-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ── Auth Form Fields ── */
.auth-form .form-floating {
  margin-bottom: 1rem;
}

.auth-form .form-floating > .form-control {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
  height: 56px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.auth-form .form-floating > .form-control:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--glow);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.auth-form .form-floating > label {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.auth-form .form-floating > .form-control::placeholder {
  color: transparent;
}

.auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label,
.auth-form .form-floating > .form-control:focus ~ label {
  color: var(--accent-primary);
  font-size: 0.75rem;
}

/* ── Password Visibility Toggle ── */
.password-wrap {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  z-index: 10;
  transition: color var(--transition);
}

.password-toggle:hover {
  color: var(--accent-primary);
}

/* ── Remember Me / Checkbox ── */
.auth-checkbox-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

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

.auth-checkbox span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-forgot-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.auth-forgot-link:hover {
  color: var(--accent-primary);
}

/* ── Auth Submit Button ── */
.btn-auth-submit {
  width: 100%;
  padding: 0.9rem 2rem;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow);
}

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

/* ── Guest Button ── */
.btn-auth-guest {
  width: 100%;
  padding: 0.9rem 2rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 1.5rem;
}

.btn-auth-guest:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ── Auth Redirect Link ── */
.auth-redirect {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

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

.auth-redirect a:hover {
  color: var(--accent-secondary);
}

/* ── Auth Error Message ── */
.auth-error {
  background: rgba(255,61,0,0.1);
  border: 1px solid rgba(255,61,0,0.3);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--danger);
  margin-bottom: 1rem;
  display: none;
}

.auth-error.visible {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Auth Success Message ── */
.auth-success {
  background: rgba(57,255,20,0.1);
  border: 1px solid rgba(57,255,20,0.3);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: var(--success);
  margin-bottom: 1rem;
  display: none;
}

.auth-success.visible {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Register Gender Radio ── */
.gender-options {
  display: flex;
  gap: 0.75rem;
}

.gender-option {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.gender-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gender-option:has(input:checked),
.gender-option.selected {
  border-color: var(--accent-primary);
  background: rgba(255,61,0,0.05);
  color: var(--accent-primary);
}

.gender-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  cursor: pointer;
}

.gender-option.selected .gender-label {
  color: var(--accent-primary);
}

/* ── Profile Page ── */
.profile-page {
  min-height: 100vh;
  background: var(--bg-dark);
  padding-top: 90px;
}

.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  padding: 3rem 0;
}

/* ── Profile Sidebar ── */
.profile-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2rem;
  position: sticky;
  top: 90px;
}

.profile-avatar-wrap {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.profile-avatar-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  margin: 0 auto 1rem;
  box-shadow: 0 0 0 4px var(--bg-card), 0 0 0 6px var(--accent-primary);
  animation: avatarAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-user-name {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.profile-member-since {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.profile-plan-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-top: 0.5rem;
}

.profile-plan-badge.basic  { background: rgba(160,160,160,0.2); color: var(--text-secondary); }
.profile-plan-badge.pro    { background: rgba(255,61,0,0.15); color: var(--accent-primary); border: 1px solid rgba(255,61,0,0.3); }
.profile-plan-badge.elite  { background: rgba(255,215,0,0.15); color: var(--accent-secondary); border: 1px solid rgba(255,215,0,0.3); }
.profile-plan-badge.none   { background: rgba(160,160,160,0.1); color: var(--text-secondary); }

/* ── Profile Nav ── */
.profile-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.profile-nav li {
  margin-bottom: 0.25rem;
}

.profile-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.profile-nav-btn:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}

.profile-nav-btn.active {
  background: rgba(255,61,0,0.1);
  color: var(--accent-primary);
}

.profile-nav-btn i {
  width: 18px;
  text-align: center;
  font-size: 1rem;
}

/* ── Profile Main Content ── */
.profile-main {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2rem;
  min-height: 500px;
}

.profile-section {
  display: none;
}

.profile-section.active {
  display: block;
}

.profile-section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* ── Dashboard Stats ── */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.dashboard-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
}

.dashboard-stat-card:hover {
  border-color: rgba(255,61,0,0.2);
}

.dashboard-stat-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-primary);
}

.dashboard-stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.dashboard-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Orders Table ── */
.orders-table-wrap {
  overflow-x: auto;
}

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

.orders-table th {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.orders-table td {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.orders-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.order-id-cell {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* ── Status Badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
}

.status-badge.processing { background: rgba(255,215,0,0.15); color: var(--warning); }
.status-badge.shipped    { background: rgba(0,212,255,0.15); color: #00D4FF; }
.status-badge.delivered  { background: rgba(57,255,20,0.15); color: var(--success); }
.status-badge.cancelled  { background: rgba(255,61,0,0.15); color: var(--danger); }

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-badge.processing::before { background: var(--warning); }
.status-badge.shipped::before    { background: #00D4FF; }
.status-badge.delivered::before  { background: var(--success); }
.status-badge.cancelled::before  { background: var(--danger); }

/* ── Quick Actions ── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--text-secondary);
}

.quick-action-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(255,61,0,0.05);
  transform: translateY(-2px);
}

.quick-action-icon {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.quick-action-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

/* ── Profile Form ── */
.profile-form .form-group {
  margin-bottom: 1.25rem;
}

.profile-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.profile-form input:focus,
.profile-form select:focus,
.profile-form textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--glow);
}

.profile-form input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

.profile-form input::placeholder {
  color: var(--text-secondary);
}

.profile-form select {
  cursor: pointer;
}

.profile-form select option {
  background: var(--bg-card);
}

/* ── Address Card ── */
.address-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
}

.address-card-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.address-card-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.address-card-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}

.address-action-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}

.address-action-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ── Order Modal ── */
.order-modal .modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.5);
  color: var(--text-primary);
}

.order-modal .modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

.order-modal .modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
}

.order-modal .btn-close {
  filter: invert(1);
}

.order-modal .modal-body {
  padding: 1.5rem;
}

.order-modal .modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

/* ── Order Detail Item ── */
.order-detail-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.order-detail-item:last-child {
  border-bottom: none;
}

.order-detail-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--bg-surface);
}

.order-detail-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.order-detail-qty {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.order-detail-price {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* ── Checkout Success Modal ── */
.success-modal .modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  text-align: center;
  padding: 2rem;
}

.success-modal .modal-body {
  padding: 2rem;
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(57,255,20,0.1);
  border: 2px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: var(--success);
}

.success-order-id {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.success-delivery-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ── Profile Avatar Color Picker ── */
.avatar-color-picker {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  justify-content: center;
}

.avatar-color-option {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition);
}

.avatar-color-option:hover,
.avatar-color-option.selected {
  transform: scale(1.2);
  border-color: var(--text-primary);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.empty-state-icon {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1.5rem;
  display: block;
}

.empty-state h4 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.empty-state p {
  font-size: 0.9rem;
  max-width: 300px;
  margin: 0 auto 1.5rem;
}
