/* ── Auth Pages ── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2em; }

.auth-card {
  width: 100%; max-width: 440px;
  background: #fff; border-radius: 1.25em;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  overflow: hidden;
}

.auth-card-header {
  padding: 2.5em 2.5em 1.5em;
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 0.75em;
}
.auth-logo { width: 120px; margin-bottom: 0.5em; }
.auth-card-header h2 { font-family: "Onest", sans-serif; font-size: 1.5rem; font-weight: 800; text-transform: none; }
.auth-card-header p { font-family: "Onest", sans-serif; font-size: 0.85rem; opacity: 0.5; text-transform: none; }

.auth-card-body { padding: 0 2.5em 2.5em; }

.auth-error {
  background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.2);
  color: #e74c3c; padding: 0.75em 1em; border-radius: 0.5em; margin-bottom: 1.25em;
  font-family: "Onest", sans-serif; font-size: 0.8rem; text-transform: none; text-align: center;
}

.auth-success {
  background: rgba(46,204,113,0.08); border: 1px solid rgba(46,204,113,0.2);
  color: #2ecc71; padding: 0.75em 1em; border-radius: 0.5em; margin-bottom: 1.25em;
  font-family: "Onest", sans-serif; font-size: 0.8rem; text-transform: none; text-align: center;
}

.auth-form { display: flex; flex-direction: column; gap: 1em; }

.auth-field { display: flex; flex-direction: column; gap: 0.3em; }
.auth-field label { font-family: "Onest", sans-serif; font-size: 0.75rem; font-weight: 700; text-transform: none; opacity: 0.6; }
.auth-field input {
  border: 1.5px solid rgba(0,0,0,0.1); background: #fafaf8; border-radius: 0.6em;
  padding: 0.85em 1em; font-family: "Onest", sans-serif; font-size: 0.9rem;
  transition: all 0.3s;
}
.auth-field input:focus { border-color: var(--primary); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(108,92,231,0.1); }

.auth-field-row { display: flex; gap: 0.75em; }
.auth-field-row .auth-field { flex: 1; }

.auth-submit {
  width: 100%; padding: 1em;
  background: var(--primary); color: #fff; border: none; border-radius: 0.6em;
  font-family: "Onest", sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.3s; text-transform: none;
  margin-top: 0.5em;
}
.auth-submit:hover { background: #5a4bd1; box-shadow: 0 4px 20px rgba(108,92,231,0.35); transform: translateY(-2px); }

.auth-links {
  display: flex; justify-content: space-between; margin-top: 1.25em;
  padding-top: 1.25em; border-top: 1px solid rgba(0,0,0,0.06);
}
.auth-links a { font-family: "Onest", sans-serif; font-size: 0.8rem; color: var(--primary); text-transform: none; transition: opacity 0.3s; }
.auth-links a:hover { opacity: 0.7; }

.auth-divider { text-align: center; margin: 1.25em 0; position: relative; }
.auth-divider span { font-family: "Onest", sans-serif; font-size: 0.75rem; opacity: 0.4; background: #fff; padding: 0 1em; position: relative; z-index: 1; text-transform: none; }
.auth-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,0.08); }

/* 2FA Code Input */
.auth-code-input {
  display: flex; justify-content: center; gap: 0.5em; margin: 1em 0;
}
.auth-code-input input {
  width: 48px !important; height: 56px; text-align: center;
  font-family: "Onest", sans-serif; font-size: 1.5rem; font-weight: 800;
  border: 1.5px solid rgba(0,0,0,0.1); border-radius: 0.6em;
  background: #fafaf8; padding: 0 !important;
}
.auth-code-input input:focus { border-color: var(--primary); background: #fff; }

.auth-resend {
  text-align: center; margin-top: 1em;
}
.auth-resend button {
  background: none; border: none; color: var(--primary);
  font-family: "Onest", sans-serif; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; text-transform: none;
}
.auth-resend button:hover { opacity: 0.7; }

/* Profile */
.profile-page { padding-top: 8em; }
.profile-content { max-width: 1000px; margin: 0 auto; padding: 0 2em 4em; display: flex; gap: 2em; }
.profile-sidebar { width: 240px; flex-shrink: 0; }
.profile-main { flex: 1; }

/* User Card */
.profile-user-card {
  display: flex; align-items: center; gap: 1em;
  padding: 1.5em; margin-bottom: 1em;
  background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 1em;
}
.profile-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: "Onest", sans-serif; font-size: 1.2rem; font-weight: 800;
  flex-shrink: 0;
}
.profile-user-info { display: flex; flex-direction: column; gap: 0.15em; }
.profile-user-name { font-family: "Onest", sans-serif; font-size: 0.9rem; font-weight: 700; text-transform: none; }
.profile-user-email { font-family: "Onest", sans-serif; font-size: 0.7rem; opacity: 0.5; text-transform: none; }
.profile-user-role {
  font-family: "Onest", sans-serif; font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--primary); background: rgba(108,92,231,0.08);
  padding: 0.2em 0.5em; border-radius: 0.3em; width: max-content;
}

/* Nav */
.profile-nav { display: flex; flex-direction: column; gap: 0.2em; }
.profile-nav-item {
  display: flex; align-items: center; gap: 0.6em;
  padding: 0.75em 1em; border-radius: 0.6em;
  font-family: "Onest", sans-serif; font-size: 0.8rem; font-weight: 600;
  color: var(--fg); text-transform: none; transition: all 0.3s;
}
.profile-nav-item svg { flex-shrink: 0; opacity: 0.5; }
.profile-nav-item:hover { background: rgba(108,92,231,0.06); }
.profile-nav-item:hover svg { opacity: 1; color: var(--primary); }
.profile-nav-item.active { background: var(--primary); color: #fff; }
.profile-nav-item.active svg { opacity: 1; color: #fff; }
.profile-nav-item.danger { color: #e74c3c; }
.profile-nav-item.danger svg { color: #e74c3c; }

/* Sections */
.profile-section {
  background: #fff; border: 1px solid rgba(0,0,0,0.06);
  border-radius: 1em; padding: 2em; margin-bottom: 1.25em;
}
.profile-section-header { margin-bottom: 1.5em; }
.profile-section-header h3 { font-family: "Onest", sans-serif; font-size: 1.1rem; margin-bottom: 0.3em; }
.profile-section-header p { font-family: "Onest", sans-serif; font-size: 0.8rem; text-transform: none; opacity: 0.45; }
.profile-section select {
  border: 1.5px solid rgba(0,0,0,0.1); background: #fafaf8; border-radius: 0.6em;
  padding: 0.85em 1em; font-family: "Onest"; font-size: 0.9rem; width: 100%;
}

/* Security Cards */
.profile-security-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25em; border: 1px solid rgba(0,0,0,0.06); border-radius: 0.75em;
}
.security-card-left { display: flex; align-items: center; gap: 1em; }
.security-card-left svg { flex-shrink: 0; color: var(--primary); }
.security-card-left div { display: flex; flex-direction: column; gap: 0.15em; }
.security-title { font-family: "Onest", sans-serif; font-size: 0.85rem; font-weight: 700; text-transform: none; }
.security-desc { font-family: "Onest", sans-serif; font-size: 0.7rem; opacity: 0.45; text-transform: none; }
.security-action {
  font-family: "Onest", sans-serif; font-size: 0.75rem; font-weight: 700;
  color: var(--primary); text-transform: none;
  padding: 0.5em 1em; border: 1px solid rgba(108,92,231,0.2); border-radius: 0.4em;
  transition: all 0.3s;
}
.security-action:hover { background: var(--primary); color: #fff; }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.1); border-radius: 24px; transition: 0.3s;
}
.toggle-slider:before {
  content: ""; position: absolute; height: 18px; width: 18px;
  left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

/* Orders */
.profile-orders { display: flex; flex-direction: column; gap: 0.5em; }
.profile-order {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25em; border: 1px solid rgba(0,0,0,0.06); border-radius: 0.75em;
  transition: border-color 0.3s;
}
.profile-order { text-decoration: none; color: var(--fg); cursor: pointer; }
.profile-order:hover { border-color: rgba(108,92,231,0.2); }
.profile-order-left { display: flex; flex-direction: column; gap: 0.2em; }
.profile-order-num { font-family: "Onest", sans-serif; font-size: 0.85rem; font-weight: 700; text-transform: none; }
.profile-order-date { font-family: "Onest", sans-serif; font-size: 0.7rem; opacity: 0.4; text-transform: none; }
.profile-order-right { display: flex; align-items: center; gap: 1em; }
.profile-order-total { font-family: "Onest", sans-serif; font-size: 1rem; font-weight: 900; color: var(--primary); text-transform: none; }
.profile-order-status { padding: 0.25em 0.7em; border-radius: 2em; font-family: "Onest", sans-serif; font-size: 0.65rem; font-weight: 700; text-transform: none; }
.status-pending { background: rgba(243,156,18,0.1); color: #f39c12; }
.status-confirmed { background: rgba(52,152,219,0.1); color: #3498db; }
.status-completed { background: rgba(46,204,113,0.1); color: #2ecc71; }
.status-cancelled { background: rgba(231,76,60,0.1); color: #e74c3c; }

/* Empty State */
.profile-empty {
  display: flex; flex-direction: column; align-items: center; gap: 1em;
  padding: 3em; text-align: center;
}
.profile-empty p { font-family: "Onest", sans-serif; font-size: 0.85rem; opacity: 0.4; text-transform: none; }

/* Order Detail */
.od-header { display: flex; justify-content: space-between; align-items: flex-start; }
.od-header-left { display: flex; flex-direction: column; gap: 0.3em; }
.od-header-left h3 { font-family: "Onest", sans-serif; font-size: 1.3rem; }
.od-date { font-family: "Onest", sans-serif; font-size: 0.75rem; opacity: 0.45; text-transform: none; }

.od-items { display: flex; flex-direction: column; gap: 0; }
.od-item {
  display: flex; align-items: center; gap: 1.25em;
  padding: 1.25em 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.od-item:last-child { border-bottom: none; }
.od-item-img { width: 72px; height: 72px; border-radius: 0.5em; overflow: hidden; flex-shrink: 0; background: #f5f5f0; }
.od-item-img img { width: 100%; height: 100%; object-fit: cover; }
.od-item-info { flex: 1; display: flex; flex-direction: column; gap: 0.2em; }
.od-item-title { font-family: "Onest", sans-serif; font-size: 0.9rem; font-weight: 600; text-transform: none; color: var(--fg); transition: color 0.3s; }
.od-item-title:hover { color: var(--primary); }
.od-item-var { font-family: "Onest", sans-serif; font-size: 0.7rem; opacity: 0.5; text-transform: none; line-height: 1.4; }
.od-item-qty { font-family: "Onest", sans-serif; font-size: 0.75rem; opacity: 0.45; text-transform: none; }
.od-item-total { font-family: "Onest", sans-serif; font-size: 1rem; font-weight: 900; color: var(--primary); text-transform: none; white-space: nowrap; }

.od-summary { border-top: 1px solid rgba(0,0,0,0.06); padding-top: 1em; margin-top: 0.5em; display: flex; flex-direction: column; gap: 0.5em; }
.od-summary-row { display: flex; justify-content: space-between; font-family: "Onest", sans-serif; font-size: 0.85rem; text-transform: none; }
.od-grand { font-size: 1.1rem; font-weight: 900; color: var(--primary); padding-top: 0.75em; border-top: 1px solid rgba(0,0,0,0.06); }

.od-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25em; }
.od-info-rows { display: flex; flex-direction: column; gap: 0; }
.od-info-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 0.75em 0; border-bottom: 1px solid rgba(0,0,0,0.04);
  font-family: "Onest", sans-serif; font-size: 0.8rem; text-transform: none;
}
.od-info-row:last-child { border-bottom: none; }
.od-info-row span { opacity: 0.5; }
.od-info-row strong { font-weight: 600; text-align: right; max-width: 60%; }

@media (max-width: 1000px) {
  .od-header { flex-direction: column; gap: 0.75em; }
  .od-item { flex-direction: column; align-items: flex-start; gap: 0.75em; }
  .od-item-total { align-self: flex-end; }
  .od-info-grid { grid-template-columns: 1fr; }
  .od-info-row { flex-direction: column; gap: 0.25em; }
  .od-info-row strong { text-align: left; max-width: 100%; }
}

@media (max-width: 1000px) {
  .auth-card-header { padding: 2em 1.5em 1em; }
  .auth-card-body { padding: 0 1.5em 2em; }
  .auth-field-row { flex-direction: column; gap: 1em; }
  .profile-content { flex-direction: column; padding: 0 1.25em 2em; }
  .profile-sidebar { width: 100%; }
  .profile-nav { flex-direction: row; flex-wrap: wrap; gap: 0.3em; }
  .profile-nav-item { font-size: 0.7rem; padding: 0.6em 0.8em; }
  .profile-nav-item svg { display: none; }
  .profile-user-card { padding: 1em; }
  .profile-section { padding: 1.5em; }
  .profile-security-card { flex-direction: column; gap: 1em; align-items: flex-start; }
  .profile-order { flex-direction: column; align-items: flex-start; gap: 0.75em; }
  .profile-order-right { width: 100%; justify-content: space-between; }
}
