/* ==========================================================================
   CloudCush — auth.css
   Dreamy sky & white clouds background with centered glassmorphic card.
   Matches reference styling exactly. Clean, modern, luxury.
   ========================================================================== */

.auth-standalone-body {
  margin: 0;
  padding: 0;
  width: 100vw;
  min-height: 100vh;
  background: url('../images/auth_sky_bg.png') no-repeat center center / cover;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-family: var(--font-body), sans-serif;
  overflow-x: hidden;
}

.auth-standalone-body *,
.auth-standalone-body *::before,
.auth-standalone-body *::after {
  box-sizing: border-box;
}

/* Canvas background element */
#authStandCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* ==========================================================================
   BACKGROUND EMBELLISHMENTS — Light Ring and Radial Arc
   ========================================================================== */

.auth-background-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.45) 0%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

.auth-background-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 780px;
  height: 780px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 1;
}

.auth-background-rings::after {
  content: "";
  position: absolute;
  inset: -80px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   VIEWPORT WRAP
   ========================================================================== */

.auth-viewport-wrap {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

/* ==========================================================================
   AUTH GLASS CARD
   ========================================================================== */

.auth-glass-card {
  width: 100%;
  max-width: 560px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 32px;
  box-shadow: 
    0 25px 55px rgba(15, 23, 42, 0.05),
    0 4px 16px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
  padding: 32px 48px;
  display: flex;
  flex-direction: column;
  position: relative;
  animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ==========================================================================
   CARD HEADER
   ========================================================================== */

.auth-card-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 4px 12px rgba(15, 23, 42, 0.03),
    0 1px 2px rgba(15, 23, 42, 0.01);
  margin: 0 auto 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
}
.auth-card-icon-box i {
  font-size: 24px;
  color: #0f172a;
}

.auth-card-title {
  font-family: var(--font-body), sans-serif;
  font-size: 23px;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
}

.auth-card-subtitle {
  font-family: var(--font-body), sans-serif;
  font-size: 13.5px;
  color: #475569;
  text-align: center;
  line-height: 1.55;
  margin: 0 0 16px;
}

/* ==========================================================================
   FORM & FIELDS
   ========================================================================== */

.auth-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.auth-field-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.04);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 13px 16px 13px 44px;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  color: #0f172a;
  outline: none;
  transition: all 0.25s ease;
}

.auth-field-input::placeholder {
  color: #94a3b8;
}

.auth-field-input:focus {
  background: #ffffff;
  border-color: rgba(142, 177, 217, 0.6);
  box-shadow: 0 0 0 4px rgba(142, 177, 217, 0.15);
}

.auth-field-icon {
  position: absolute;
  left: 16px;
  color: #64748b;
  font-size: 16px;
  pointer-events: none;
  transition: color 0.25s ease;
  z-index: 2;
}

.auth-field-input:focus ~ .auth-field-icon {
  color: #0f172a;
}

.auth-field-toggle {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
  padding: 4px;
  display: flex;
  align-items: center;
  z-index: 2;
  transition: color 0.2s ease;
}
.auth-field-toggle:hover {
  color: #0f172a;
}

.auth-forgot-link-right {
  align-self: flex-end;
  font-size: 12.5px;
  font-weight: 500;
  color: #0f172a;
  text-decoration: none;
  margin-top: 4px;
  margin-bottom: 12px;
  transition: opacity 0.2s ease;
}
.auth-forgot-link-right:hover {
  opacity: 0.8;
}

/* ==========================================================================
   CTA BUTTON
   ========================================================================== */

.auth-submit-btn-dark {
  width: 100%;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 14px;
  cursor: pointer;
  box-shadow: 
    0 4px 12px rgba(15, 23, 42, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn-dark:hover {
  transform: translateY(-1.5px);
  box-shadow: 
    0 6px 18px rgba(15, 23, 42, 0.2);
  filter: brightness(1.05);
}

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

/* ==========================================================================
   SOCIAL LOGIN
   ========================================================================== */

.auth-social-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 12px 0;
  font-size: 12px;
  color: #64748b;
}

.auth-social-divider-line {
  flex: 1;
  height: 1px;
  border-bottom: 1.5px dotted rgba(15, 23, 42, 0.12);
}

.auth-social-buttons-row {
  display: flex;
  gap: 10px;
}

.auth-social-btn-white {
  flex: 1;
  height: 48px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: all 0.25s ease;
}

.auth-social-btn-white:hover {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.auth-social-btn-white svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================================
   FOOTER LINKS & REDIRECTS
   ========================================================================== */

.auth-switch-link-bottom {
  font-size: 13.5px;
  color: #475569;
  text-align: center;
  margin-top: 14px;
}

.auth-switch-link-bottom a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.auth-switch-link-bottom a:hover {
  border-bottom-color: #0f172a;
}

/* ==========================================================================
   ADDITIONAL REGISTRATION LAYOUTS
   ========================================================================== */

.auth-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-consent-stack {
  margin-top: 8px;
  margin-bottom: 12px;
}

.auth-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.auth-checkbox-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0f172a;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.auth-checkbox-label {
  font-size: 13px;
  color: #475569;
  line-height: 1.4;
}

.auth-checkbox-label a {
  color: #0f172a;
  font-weight: 500;
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE SCALING
   ========================================================================== */

@media (max-width: 480px) {
  .auth-glass-card {
    padding: 36px 24px;
    border-radius: 24px;
  }
  .auth-fields-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .auth-background-rings {
    width: 600px;
    height: 600px;
  }
}

/* ==========================================================================
   ACCOUNT DASHBOARD — Apple-inspired minimal luxury UI
   ========================================================================== */

.account-page-wrapper {
  background-color: var(--bg);
  min-height: 100vh;
  padding: 120px 24px 80px;
  position: relative;
  font-family: var(--font-body);
}

.account-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
}

/* Sidebar navigation */
.account-sidebar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(80, 50, 20, 0.02);
  position: sticky;
  top: 100px;
  z-index: 10;
}

.account-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.account-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f7eedf;
  border: 1px solid rgba(229, 169, 59, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
  font-weight: 600;
}

.account-user-info {
  display: flex;
  flex-direction: column;
}

.account-user-name {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.account-user-email {
  font-size: 12px;
  color: var(--text-light);
}

.account-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-nav-btn i {
  font-size: 16px;
  opacity: 0.7;
}

.account-nav-btn:hover {
  background: var(--bg);
  color: var(--primary);
}

.account-nav-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(42, 61, 86, 0.15);
}

.account-nav-btn.active i {
  opacity: 1;
}

/* Main Content panels */
.account-main-content {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 4px 24px rgba(80, 50, 20, 0.02);
  min-height: 520px;
}

.account-panel {
  display: none;
}

.account-panel.active {
  display: block;
}

.account-panel-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  font-style: italic;
  color: var(--primary);
  margin-bottom: 8px;
}

.account-panel-subtitle {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 32px;
}

/* Summary Grid */
.account-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.account-summary-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.account-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.account-summary-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--text-light);
}

.account-summary-value {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
}

.account-summary-desc {
  font-size: 12px;
  color: var(--text-light);
}

/* Form Grid */
.account-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
}

.account-form-full {
  grid-column: span 2;
}

/* Order History Table */
.order-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  margin-top: 16px;
}

.order-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.order-table th {
  background: #f8fafc;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
}

.order-table td {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}

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

.order-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-item-img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  background: #f8fafc;
  border: 1px solid var(--border);
}

.order-item-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-item-name {
  font-weight: 600;
  color: var(--primary);
}

.order-item-meta {
  font-size: 12px;
  color: var(--text-light);
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.order-status.delivered {
  background: #f0fdf4;
  color: #16a34a;
}

/* Saved Addresses Grid */
.addresses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.address-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s ease;
}

.address-card.default {
  border-color: var(--primary);
  background: #fcfdfd;
}

.address-badge {
  align-self: flex-start;
  background: rgba(52, 73, 102, 0.08);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.address-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.address-details {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 20px;
}

.address-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.address-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  padding: 0;
  transition: color 0.2s ease;
}

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

.address-action-btn.delete {
  color: #dc2626;
}

.address-action-btn.delete:hover {
  color: #991b1b;
}

.address-card-add {
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  min-height: 200px;
  transition: all 0.2s ease;
  color: var(--text-light);
}

.address-card-add:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(52, 73, 102, 0.02);
}

.address-card-add i {
  font-size: 28px;
}

.address-card-add span {
  font-size: 13px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .account-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .account-sidebar {
    position: relative;
    top: 0;
  }
  .account-main-content {
    padding: 24px;
  }
  .account-form-grid {
    grid-template-columns: 1fr;
  }
  .account-form-full {
    grid-column: span 1;
  }
}

/* ==========================================================================
   ACCOUNT FLASH MESSAGES
   ========================================================================== */

.account-flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  transition: opacity 0.3s ease;
}

.account-flash i {
  font-size: 18px;
  flex-shrink: 0;
}

.account-flash-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  opacity: 0.6;
  transition: opacity 0.2s;
  color: inherit;
}

.account-flash-close:hover {
  opacity: 1;
}

.account-flash-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.account-flash-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ==========================================================================
   ADDRESS MODAL OVERLAY
   ========================================================================== */

.account-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.account-modal-overlay.open {
  display: flex;
}

.account-modal {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 580px;
  max-height: 85vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.15);
  animation: modalSlideUp 0.3s ease;
}

/* Custom scrollbar for modal */
.account-modal::-webkit-scrollbar {
  width: 6px;
}

.account-modal::-webkit-scrollbar-track {
  background: transparent;
  margin: 12px 0;
}

.account-modal::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  transition: background 0.2s;
}

.account-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.3);
}

/* Firefox scrollbar */
.account-modal {
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.15) transparent;
}

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

.account-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border, #e8e5e0);
}

.account-modal-header h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.account-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
  line-height: 1;
}

.account-modal-close:hover {
  color: var(--primary);
}

.account-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border, #e8e5e0);
}

/* ==========================================================================
   ORDER STATUS BADGE VARIANTS
   ========================================================================== */

.order-status.pending {
  background: #fffbeb;
  color: #b45309;
}

.order-status.processing {
  background: #eff6ff;
  color: #1d4ed8;
}

.order-status.shipped {
  background: #f0f9ff;
  color: #0369a1;
}

.order-status.cancelled {
  background: #fef2f2;
  color: #dc2626;
}

/* Select field styling for account forms */
.account-form-grid select.auth-field-input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

/* ==========================================================================
   MISSING AUTH UTILITY CLASSES
   ========================================================================== */

.auth-field-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light, #64748b);
  margin-bottom: 6px;
}

.auth-field-input--no-icon {
  padding-left: 16px !important;
}

.auth-form-fields {
  display: flex;
  flex-direction: column;
}

.auth-submit-btn {
  width: 100%;
  background: linear-gradient(180deg, var(--primary, #2a3d56) 0%, var(--primary-dark, #1e293b) 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 14px;
  cursor: pointer;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-submit-btn:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
  filter: brightness(1.05);
}

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

.auth-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
