/* ============================================================
   Dermortho Lifescience – Auth & Account Styles
   ============================================================ */

/* ── AUTH PAGE ────────────────────────────────────────────── */
body.auth-page { background: var(--off-white); }

.auth-layout {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Left panel */
.auth-panel-left {
  background: linear-gradient(145deg, var(--blue-dark) 0%, var(--blue) 55%, #1a8ac4 100%);
  padding: 60px 52px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-panel-left::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(244,121,32,0.16) 0%, transparent 65%);
  animation: blob-move 10s ease-in-out infinite;
}
.auth-panel-left::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), var(--orange-light), var(--orange));
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

.auth-brand {
  margin-bottom: 36px;
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  animation: fadeInLeft 0.6s ease both;
}
.auth-brand .logo-img {
  height: 52px; width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.auth-brand .logo-name { font-size: 22px; font-weight: 800; }
.auth-brand .logo-dermo { color: var(--orange-light); }
.auth-brand .logo-rtho  { color: #ffffff; }
.auth-brand .logo-sub   { color: rgba(255,255,255,0.6); letter-spacing: 2.5px; font-size: 8.5px; }

.auth-panel-left h2 {
  font-family: var(--font-display);
  font-size: 32px; color: var(--white);
  margin-bottom: 16px; position: relative; z-index: 1;
  animation: fadeInLeft 0.6s ease 0.1s both;
}
.auth-panel-left > p {
  color: rgba(255,255,255,0.82); font-size: 15px;
  line-height: 1.8; margin-bottom: 36px;
  position: relative; z-index: 1;
  animation: fadeInLeft 0.6s ease 0.2s both;
}
.auth-benefits {
  list-style: none; display: flex; flex-direction: column;
  gap: 16px; position: relative; z-index: 1;
}
.auth-benefits li {
  display: flex; align-items: center; gap: 14px;
  color: rgba(255,255,255,0.9); font-size: 15px;
  animation: fadeInLeft 0.6s ease both;
}
.auth-benefits li:nth-child(1) { animation-delay: 0.3s; }
.auth-benefits li:nth-child(2) { animation-delay: 0.4s; }
.auth-benefits li:nth-child(3) { animation-delay: 0.5s; }
.auth-benefits li:nth-child(4) { animation-delay: 0.6s; }
.auth-benefits li i {
  width: 38px; height: 38px;
  background: rgba(244,121,32,0.2);
  border: 1px solid rgba(244,121,32,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--orange-light); font-size: 15px; flex-shrink: 0;
  transition: var(--transition);
}
.auth-benefits li:hover i { background: var(--orange); border-color: var(--orange); color: var(--white); }
.auth-panel-decor {
  position: absolute; bottom: -40px; right: -40px;
  font-size: 180px; color: rgba(255,255,255,0.03); z-index: 0;
}

/* Right panel */
.auth-panel-right {
  display: flex; align-items: center; justify-content: center;
  padding: 44px 24px; background: var(--off-white); overflow-y: auto;
}
.auth-form-box {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 46px 42px; width: 100%; max-width: 490px;
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--orange);
  animation: fadeInUp 0.5s ease both;
}
.auth-form-header { margin-bottom: 30px; }
.auth-form-header h2 {
  font-family: var(--font-display); font-size: 28px;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 8px;
}
.auth-form-header p { font-size: 14px; color: var(--gray-600); }
.auth-form-header a { color: var(--orange); font-weight: 700; }
.auth-form-header a:hover { color: var(--orange-dark); }

/* Auth alerts */
.auth-error, .auth-success {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 20px;
  animation: fadeInUp 0.3s ease both;
}
.auth-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-left: 3px solid #e53935; }
.auth-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; border-left: 3px solid #22c55e; }
.auth-error::before   { content: '\f057'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }
.auth-success::before { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }

/* Password toggle */
.input-password { position: relative; }
.input-password input { padding-right: 48px; }
.toggle-pwd {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--gray-400);
  cursor: pointer; font-size: 16px; padding: 4px; transition: color 0.2s;
}
.toggle-pwd:hover { color: var(--orange); }

/* Password strength */
.password-strength { display: flex; align-items: center; gap: 8px; margin-top: 6px; height: 20px; }
.pwd-bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--gray-200); transition: background 0.3s;
}
.pwd-bar.weak        { background: #ef4444; }
.pwd-bar.fair        { background: #f97316; }
.pwd-bar.good        { background: #eab308; }
.pwd-bar.strong      { background: #22c55e; }
.pwd-bar.very-strong { background: #16a34a; }
.pwd-label { font-size: 12px; color: var(--gray-400); font-weight: 600; }

/* Form options */
.form-options {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 22px; font-size: 13px;
}
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 13px; color: var(--gray-600);
}
.checkbox-label input { accent-color: var(--orange); width: 15px; height: 15px; }
.checkbox-label a { color: var(--orange); }
.forgot-link { color: var(--orange); font-weight: 600; }
.forgot-link:hover { color: var(--orange-dark); }

.btn-auth-submit { padding: 14px; font-size: 15px; }

/* Divider */
.auth-divider {
  text-align: center; margin: 26px 0 22px;
  position: relative; color: var(--gray-400); font-size: 13px;
}
.auth-divider::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; background: var(--gray-200);
}
.auth-divider span { background: var(--white); padding: 0 14px; position: relative; }

/* Social auth */
.social-auth { display: flex; gap: 12px; }
.social-auth-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 20px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  background: var(--white); font-size: 14px; font-weight: 600;
  color: var(--gray-800); cursor: pointer; transition: var(--transition);
}
.social-auth-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-pale); }
.social-auth-btn .fa-google     { color: #ea4335; }
.social-auth-btn .fa-facebook-f { color: #1877f2; }

.auth-switch {
  text-align: center; font-size: 14px; color: var(--gray-400); margin-top: 26px;
}
.auth-switch a { color: var(--orange); font-weight: 700; }

/* ── HEADER AUTH BUTTONS ──────────────────────────────────── */
#authNav { display: flex; align-items: center; gap: 8px; }
.btn-auth {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; transition: var(--transition);
  border: 1.5px solid transparent; white-space: nowrap;
}
.btn-login  { color: var(--blue); border-color: var(--blue); background: transparent; }
.btn-login:hover { background: var(--blue); color: var(--white); }
.btn-register { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: var(--white); border-color: var(--orange); box-shadow: 0 3px 12px rgba(244,121,32,0.3); }
.btn-register:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(244,121,32,0.4); }

/* Auth dropdown */
.auth-dropdown-wrap { position: relative; }
.auth-trigger {
  display: flex; align-items: center; gap: 8px;
  background: var(--orange-pale); border: none; border-radius: 50px;
  padding: 6px 14px 6px 6px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--orange-dark);
  transition: var(--transition);
}
.auth-trigger:hover { background: var(--orange); color: var(--white); }
.auth-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: var(--white); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.auth-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-trigger .fa-chevron-down { font-size: 11px; transition: transform 0.3s; }

.auth-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  min-width: 230px; overflow: hidden;
  opacity: 0; pointer-events: none;
  transform: translateY(-10px) scale(0.97);
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  z-index: 9999;
  border-top: 3px solid var(--orange);
}
.auth-dropdown.open { opacity: 1; pointer-events: all; transform: translateY(0) scale(1); }
.auth-dropdown-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--orange-pale), #fde8d8);
  border-bottom: 1px solid rgba(244,121,32,0.15);
}
.auth-dropdown-header strong { display: block; font-size: 14px; color: var(--orange-dark); }
.auth-dropdown-header small  { font-size: 12px; color: var(--gray-400); }
.auth-dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; font-size: 14px; color: var(--gray-600);
  transition: var(--transition);
}
.auth-dropdown a:hover { background: var(--orange-pale); color: var(--orange); }
.auth-dropdown a i { width: 16px; color: var(--blue); font-size: 14px; }
.auth-dropdown hr { border: none; border-top: 1px solid var(--gray-200); margin: 4px 0; }
.logout-link i { color: #ef4444 !important; }
.logout-link:hover { background: #fef2f2 !important; color: #ef4444 !important; }

/* ── ACCOUNT PAGE ─────────────────────────────────────────── */
.account-section { background: var(--off-white); }
.account-layout { display: grid; grid-template-columns: 268px 1fr; gap: 28px; align-items: start; }
.account-sidebar { position: sticky; top: 90px; }

.account-user-card {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  border-radius: var(--radius-md); padding: 26px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; margin-bottom: 16px; gap: 12px;
  box-shadow: var(--shadow-orange);
  animation: fadeInUp 0.5s ease both;
}
.user-avatar-large {
  width: 68px; height: 68px;
  background: rgba(255,255,255,0.2);
  border: 3px solid rgba(255,255,255,0.4);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; color: var(--white);
}
.user-info strong { display: block; color: var(--white); font-size: 16px; font-weight: 700; }
.user-info span   { display: block; color: rgba(255,255,255,0.8); font-size: 13px; }
.member-since     { font-size: 11px !important; color: rgba(255,255,255,0.6) !important; margin-top: 2px; }

.account-nav {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.account-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; font-size: 14px; color: var(--gray-600);
  border-bottom: 1px solid var(--gray-200); transition: var(--transition);
}
.account-nav a:last-child { border-bottom: none; }
.account-nav a:hover { background: var(--orange-pale); color: var(--orange); }
.account-nav a.active {
  background: linear-gradient(135deg, var(--orange-pale), #fde8d8);
  color: var(--orange); font-weight: 700;
  border-left: 3px solid var(--orange);
}
.account-nav a i { width: 18px; font-size: 15px; color: var(--blue); }
.account-nav a.active i { color: var(--orange); }
.account-nav .logout-link i { color: #ef4444; }
.account-nav .logout-link:hover { background: #fef2f2 !important; color: #ef4444 !important; }

.account-content {
  background: var(--white); border-radius: var(--radius-md);
  border: 1px solid var(--gray-200); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.account-content-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 30px; border-bottom: 2px solid var(--orange-pale);
  gap: 12px; flex-wrap: wrap;
}
.account-content-header h2 {
  font-family: var(--font-display); font-size: 22px;
  color: var(--blue-dark); display: flex; align-items: center; gap: 10px;
}
.account-content-header h2 i { color: var(--orange); font-size: 20px; }
.orders-filter select {
  padding: 8px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm); font-size: 13px;
  outline: none; cursor: pointer; color: var(--gray-800); transition: var(--transition);
}
.orders-filter select:focus { border-color: var(--orange); }

/* ── ORDER CARDS ──────────────────────────────────────────── */
.order-card {
  border-bottom: 1px solid var(--gray-100);
  padding: 26px 30px; transition: background 0.2s;
}
.order-card:last-child { border-bottom: none; }
.order-card:hover { background: var(--off-white); }
.order-card-header {
  display: grid; grid-template-columns: 1.5fr 1.2fr 1fr 1.2fr 1.2fr auto;
  gap: 12px; align-items: center; margin-bottom: 20px; flex-wrap: wrap;
}
.order-label {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--gray-400); margin-bottom: 4px; font-weight: 700;
}
.order-id { font-size: 15px; color: var(--orange); font-family: monospace; font-weight: 700; }
.order-total-val { font-size: 16px; color: var(--blue-dark); font-weight: 800; }
.order-status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.order-items-preview { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.order-item-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--off-white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); padding: 8px 14px;
  flex: 1; min-width: 180px; max-width: 260px;
  transition: var(--transition);
}
.order-item-chip:hover { border-color: var(--orange-light); }
.order-item-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--orange-pale), #fde8d8);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--orange); font-size: 15px; flex-shrink: 0;
}
.order-item-name { display: block; font-size: 13px; font-weight: 700; color: var(--gray-800); }
.order-item-qty  { display: block; font-size: 12px; color: var(--gray-400); }
.order-more-items {
  display: flex; align-items: center; padding: 8px 16px;
  background: var(--gray-100); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--gray-400); font-weight: 700; align-self: center;
}

/* Progress bar */
.order-progress { display: flex; align-items: center; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.progress-step  { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 auto; }
.progress-step span { font-size: 11px; color: var(--gray-400); white-space: nowrap; font-weight: 600; }
.progress-step.done span,
.progress-step.active span { color: var(--orange); }
.progress-step.active span { font-weight: 800; }
.progress-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gray-200); border: 2px solid var(--gray-200); transition: var(--transition);
}
.progress-step.done .progress-dot  { background: var(--orange); border-color: var(--orange); }
.progress-step.active .progress-dot {
  background: var(--white); border-color: var(--orange); border-width: 3px;
  box-shadow: 0 0 0 3px rgba(244,121,32,0.25);
  animation: pulse-ring 1.2s ease-out infinite;
}
.progress-line { flex: 1; height: 2px; background: var(--gray-200); min-width: 24px; margin-top: -20px; }
.cancelled-note {
  display: flex; align-items: center; gap: 8px;
  color: #ef4444; font-size: 14px; font-weight: 700; padding: 10px 0;
}

/* Empty orders */
.empty-orders {
  flex-direction: column; align-items: center;
  text-align: center; padding: 80px 20px; gap: 16px; color: var(--gray-400);
}
.empty-orders i { font-size: 76px; color: var(--gray-200); }
.empty-orders h3 { font-size: 22px; color: var(--gray-800); }

/* Order detail modal */
.order-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; padding-right: 44px;
}
.order-detail-header h3 { font-family: var(--font-display); font-size: 22px; color: var(--blue-dark); }
.order-detail-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  background: var(--off-white); border-radius: var(--radius-sm);
  padding: 18px; margin-bottom: 26px;
}
.order-detail-meta > div span { display: block; font-size: 11px; text-transform: uppercase; color: var(--gray-400); margin-bottom: 3px; font-weight: 700; }
.order-detail-meta > div strong { font-size: 14px; color: var(--gray-800); }
.detail-section-title {
  font-size: 15px; font-weight: 700; color: var(--blue-dark);
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 2px solid var(--orange-pale);
  display: flex; align-items: center; gap: 8px;
}
.detail-section-title::before {
  content: ''; width: 3px; height: 16px;
  background: var(--orange); border-radius: 2px; display: inline-block;
}
.order-detail-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.order-detail-item {
  display: grid; grid-template-columns: 42px 1fr auto auto;
  gap: 12px; align-items: center; padding: 12px;
  background: var(--off-white); border-radius: var(--radius-sm);
  transition: var(--transition);
}
.order-detail-item:hover { background: var(--orange-pale); }
.order-detail-item-info strong { display: block; font-size: 14px; color: var(--gray-800); }
.order-detail-item-info span  { font-size: 12px; color: var(--gray-400); }
.order-detail-item-qty { font-size: 14px; color: var(--gray-400); }
.order-detail-item-price { font-size: 15px; font-weight: 800; color: var(--orange); }
.order-detail-totals {
  background: var(--off-white); border-radius: var(--radius-sm);
  padding: 18px; margin-bottom: 22px;
}
.order-address-box {
  display: flex; gap: 14px; padding: 16px;
  background: var(--blue-pale); border-radius: var(--radius-sm);
  border-left: 3px solid var(--blue); font-size: 14px;
}
.order-address-box i { color: var(--blue); font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.order-address-box strong { display: block; font-size: 15px; color: var(--gray-800); margin-bottom: 4px; }
.order-address-box p { color: var(--gray-600); line-height: 1.7; margin: 0; }

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-panel-left { display: none; }
  .auth-panel-right { padding: 40px 20px; min-height: calc(100vh - 74px); }
  .auth-form-box { padding: 34px 26px; }
}
@media (max-width: 768px) {
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .order-card-header { grid-template-columns: 1fr 1fr; }
  .order-detail-meta { grid-template-columns: 1fr; }
  .btn-login { display: none; }
}
@media (max-width: 480px) {
  .order-card { padding: 16px; }
  .order-card-header { grid-template-columns: 1fr; }
  .order-items-preview { flex-direction: column; }
  .order-item-chip { max-width: 100%; }
  .order-progress { display: none; }
  .auth-form-box { padding: 26px 18px; }
  .account-content-header { padding: 16px 18px; }
}
