/* ═══════════════════════════════════════════════════════════════════
   auth.css — نظام تسجيل الدخول وحسابات العملاء الفاخر
   متناسق 100% مع الهوية البصرية لمركز المدينة الحديث (Light Luxury Theme)
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;800;900&display=swap');

:root {
  --auth-bg:           #FAFAF7;
  --auth-bg-alt:       #F5F2EB;
  --auth-surface:      #FFFFFF;
  --auth-border:       rgba(0, 0, 0, 0.08);
  --auth-border-gold:  rgba(197, 148, 58, 0.28);
  --auth-gold:         #C5943A;
  --auth-gold-hover:   #ad7e28;
  --auth-gold-light:   #FAF6EF;
  --auth-gold-border:  rgba(197, 148, 58, 0.22);
  --auth-emerald:      #1B5E3B;
  --auth-text:         #191919;
  --auth-text-2:       #404040;
  --auth-muted:        #737373;
  --auth-error:        #D93025;
  --auth-error-bg:     #FDF2F2;
  --auth-success:      #137333;
  --auth-success-bg:   #EDF7ED;
  --auth-input-bg:     #FAF9F6;
  --auth-radius:       20px;
  --auth-shadow:       0 16px 48px rgba(197, 148, 58, 0.09), 0 4px 16px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body.auth-page {
  max-width: 100vw;
  overflow-x: hidden;
}

body.auth-page {
  font-family: 'Cairo', 'Tajawal', sans-serif;
  direction: rtl;
  background-color: var(--auth-bg);
  background-image: none;
  color: var(--auth-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Top Brand Bar ─── */
.auth-topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--auth-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.auth-topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--auth-text);
}
.auth-topbar-brand img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  border-radius: 50%;
  border: 1.5px solid var(--auth-gold-border);
  background: #FFF;
  padding: 2px;
}
.auth-topbar-brand .brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--auth-text);
  line-height: 1.2;
}
.auth-topbar-brand .brand-sub {
  font-size: 0.72rem;
  color: var(--auth-gold);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.auth-topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--auth-text-2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  transition: all 0.2s ease;
}
.auth-topbar-back:hover {
  background: #FFF;
  border-color: var(--auth-gold);
  color: var(--auth-gold);
  transform: translateX(-2px);
}

/* ─── Main Content Container ─── */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-top: 1px solid var(--auth-border) !important;
  border-radius: var(--auth-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 34px 30px;
  position: relative;
  overflow: hidden;
}

.auth-card::before,
.auth-card::after {
  content: none !important;
  display: none !important;
}

/* ─── Mode Tabs (Login / Register) ─── */
.auth-tabs {
  display: flex;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--auth-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.auth-tab-btn.active {
  background: #FFFFFF;
  color: #1B5E3B;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* ─── Header inside Card ─── */
.auth-header {
  text-align: center;
  margin-bottom: 22px;
}
.auth-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--auth-text);
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 0.88rem;
  color: var(--auth-muted);
  line-height: 1.5;
}
.auth-app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 12px;
  background: var(--auth-gold-light);
  border: 1px solid var(--auth-border-gold);
  border-radius: 20px;
  font-size: 0.78rem;
  color: #8C6215;
  font-weight: 700;
}

/* ─── Feedback Messages ─── */
.auth-msg {
  display: none;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.5;
  animation: fadeIn 0.25s ease;
}
.auth-msg.error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--auth-error-bg);
  border: 1px solid rgba(217, 48, 37, 0.2);
  color: var(--auth-error);
}
.auth-msg.success {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--auth-success-bg);
  border: 1px solid rgba(19, 115, 51, 0.2);
  color: var(--auth-success);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Form Fields ─── */
.auth-field {
  margin-bottom: 18px;
}
.auth-field label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--auth-text-2);
  margin-bottom: 6px;
}
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-icon {
  position: absolute;
  right: 14px;
  color: var(--auth-muted);
  font-size: 1.05rem;
  pointer-events: none;
}
.auth-input {
  width: 100%;
  padding: 12px 42px 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--auth-border);
  background: var(--auth-input-bg);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--auth-text);
  outline: none;
  transition: all 0.2s ease;
}
.auth-input:focus {
  border-color: #2E7D32;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}
.auth-input::placeholder {
  color: #A0A0A0;
  font-size: 0.88rem;
}

/* Phone input with prefix */
.auth-phone-group {
  display: flex;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  background: var(--auth-input-bg);
  overflow: hidden;
  transition: all 0.2s ease;
}
.auth-phone-group:focus-within {
  border-color: #2E7D32;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
}
.auth-phone-prefix {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  background: var(--auth-bg-alt);
  border-left: 1px solid var(--auth-border);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--auth-gold);
  white-space: nowrap;
}
.auth-phone-group .auth-input {
  border: none;
  border-radius: 0;
  padding: 12px 14px;
  background: transparent;
}
.auth-phone-group .auth-input:focus {
  box-shadow: none;
}

/* Password Eye Toggle */
.auth-pwd-toggle {
  position: absolute;
  left: 12px;
  background: none;
  border: none;
  color: var(--auth-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  line-height: 1;
}
.auth-pwd-toggle:hover {
  color: var(--auth-gold);
}

/* ─── Links (Forgot Password) ─── */
.auth-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -6px;
  margin-bottom: 20px;
  font-size: 0.84rem;
}
.auth-forgot-link {
  color: var(--auth-gold);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}
.auth-forgot-link:hover {
  color: var(--auth-gold-hover);
  text-decoration: underline;
}

/* ─── Buttons ─── */
.auth-submit-btn {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #C5943A 0%, #D8A953 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(197, 148, 58, 0.28);
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(197, 148, 58, 0.38);
}
.auth-submit-btn:active {
  transform: translateY(0);
}
.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-btn-outline {
  width: 100%;
  padding: 11px 20px;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  background: transparent;
  color: var(--auth-text-2);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 10px;
}
.auth-btn-outline:hover {
  background: var(--auth-input-bg);
  border-color: var(--auth-gold);
  color: var(--auth-gold);
}

.auth-wa-btn {
  background: #25D366 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.3) !important;
}
.auth-wa-btn:hover {
  background: #20BA5A !important;
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.4) !important;
}

.auth-btn-resend {
  background: #FFFFFF;
  border: 1px dashed var(--auth-border);
  border-radius: 10px;
  padding: 10px 18px;
  color: #1B5E3B;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-btn-resend:hover:not(:disabled) {
  background: #EBF5EB;
  border-color: #2E7D32;
  color: #1B5E3B;
}
.auth-btn-resend:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  border-style: solid;
  background: #F5F5F5;
  color: var(--auth-muted);
}
.auth-notice-box {
  background: #F4FBF6;
  border: 1px solid #C8E6C9;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: #1B5E3B;
  line-height: 1.6;
}
.auth-notice-box svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #2E7D32;
}

/* ─── OTP Boxes ─── */
.otp-boxes-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 18px 0;
  direction: ltr;
}
.otp-box-input {
  width: 48px;
  height: 52px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--auth-text);
  background: var(--auth-input-bg);
  border: 2px solid var(--auth-border);
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
}
.otp-box-input:focus {
  border-color: #25D366;
  background: #FFF;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}
.otp-box-input.filled {
  border-color: #25D366;
  background: #EBF5EB;
}

/* ─── Footer inside page ─── */
.auth-page-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--auth-muted);
}
.auth-page-footer a {
  color: var(--auth-gold);
  text-decoration: none;
}

/* ─── Topbar Compact Actions ─── */
.acc-topbar-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  color: var(--auth-text);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
}
.acc-topbar-mini-btn:hover {
  background: var(--auth-gold-light);
  border-color: var(--auth-gold);
  color: var(--auth-gold);
}
.acc-topbar-mini-btn.logout {
  color: var(--auth-error);
  border-color: rgba(217, 48, 37, 0.2);
}
.acc-topbar-mini-btn.logout:hover {
  background: var(--auth-error-bg);
}

/* ─── Account Page Styles (Clean Luxury & Sliding Mobile Drawer) ─── */
.acc-layout {
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 60px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
  box-sizing: border-box;
}

aside.acc-sidebar {
  position: sticky;
  top: 75px;
  align-self: start;
}

.acc-drawer-toggle-btn {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  color: var(--auth-text);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}
.acc-drawer-toggle-btn:hover {
  background: var(--auth-gold-light);
  border-color: var(--auth-gold);
  color: var(--auth-gold);
}

.acc-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.acc-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.acc-drawer-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #FAF9F6;
  border-bottom: 1px solid var(--auth-border);
}
.acc-drawer-close-btn {
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--auth-text-2);
  cursor: pointer;
}
.acc-drawer-close-btn:hover {
  background: #F3F4F6;
  color: #000;
}

.acc-menu-item.danger {
  color: #DC2626 !important;
}
.acc-menu-item.danger svg {
  color: #DC2626 !important;
}
.acc-menu-item.danger:hover {
  background: #FEF2F2 !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  color: #B91C1C !important;
}

@media (max-width: 860px) {
  .acc-drawer-toggle-btn {
    display: inline-flex;
  }
  .acc-layout {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px 50px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }
  aside.acc-sidebar {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 285px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    background: #FFFFFF !important;
    z-index: 99999 !important;
    box-shadow: -8px 0 28px rgba(0, 0, 0, 0.22) !important;
    transform: translateX(100%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
  }
  aside.acc-sidebar.drawer-open {
    transform: translateX(0) !important;
  }
  .acc-drawer-header {
    display: flex !important;
  }
  .acc-sidebar-card {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 18px 14px 30px !important;
    flex: 1;
    margin: 0 !important;
    overflow-y: auto;
  }
  .acc-menu {
    display: flex !important;
    flex-direction: column !important;
    overflow: visible !important;
    margin-top: 14px !important;
    gap: 8px !important;
  }
  .acc-menu-item {
    width: 100% !important;
    border-radius: 12px !important;
    padding: 11px 14px !important;
    font-size: 0.92rem !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 600px) {
  .auth-topbar {
    padding: 10px 10px !important;
    gap: 6px !important;
  }
  .auth-topbar-brand img {
    height: 34px !important;
    width: 34px !important;
  }
  .auth-topbar-brand .brand-name {
    font-size: 0.88rem !important;
  }
  .auth-topbar-brand .brand-sub {
    font-size: 0.65rem !important;
  }
  .acc-topbar-mini-btn, .acc-drawer-toggle-btn {
    padding: 5px 8px !important;
    font-size: 0.74rem !important;
    gap: 3px !important;
  }
  .acc-card {
    padding: 16px 12px !important;
    border-radius: 14px !important;
  }
  .acc-portal-banner {
    padding: 16px 12px !important;
    border-radius: 14px !important;
  }
  .acc-stat-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .acc-stat-box {
    padding: 10px 4px !important;
  }
  .acc-stat-num {
    font-size: 1.25rem !important;
  }
  .acc-stat-label {
    font-size: 0.7rem !important;
  }
}

.acc-card {
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  padding: 24px 20px;
  margin-bottom: 18px;
}

.acc-user-badge {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--auth-border);
}
.acc-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--auth-gold-light);
  border: 2px solid var(--auth-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 10px;
  color: var(--auth-gold);
}
.acc-user-name {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--auth-text);
  margin-bottom: 4px;
}
.acc-user-phone {
  font-size: 0.9rem;
  color: var(--auth-muted);
  font-weight: 700;
  direction: ltr;
  display: inline-block;
  font-family: 'Cairo', monospace, sans-serif;
}

.acc-menu {
  list-style: none;
  margin-top: 14px;
}
.acc-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--auth-text-2);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 4px;
  border: 1px solid transparent;
}
.acc-menu-item:hover {
  background: var(--auth-gold-light);
  color: var(--auth-gold);
}
.acc-menu-item.active {
  background: var(--auth-gold-light);
  color: var(--auth-gold);
  border-color: var(--auth-gold-border);
  font-weight: 800;
}
.acc-menu-item svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.acc-menu-item.logout {
  color: var(--auth-error);
  margin-top: 14px;
  border-top: 1px solid var(--auth-border);
  padding-top: 12px;
  border-radius: 0 0 12px 12px;
}
.acc-menu-item.logout:hover {
  background: var(--auth-error-bg);
  color: var(--auth-error);
  border-color: rgba(217, 48, 37, 0.2);
}

.acc-portal-banner {
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  padding: 22px 24px;
  margin-bottom: 18px;
  position: relative;
}
.acc-portal-welcome {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--auth-text);
  margin-bottom: 4px;
}
.acc-portal-sub {
  font-size: 0.86rem;
  color: var(--auth-muted);
  font-weight: 600;
}

.acc-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 680px) {
  .acc-stat-grid { grid-template-columns: 1fr; }
}
.acc-stat-box {
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}
.acc-stat-num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--auth-gold);
  line-height: 1.1;
  font-family: 'Cairo', sans-serif;
}
.acc-stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--auth-text-2);
  margin-top: 5px;
}

/* ─── Orders Grid (2 Side-by-Side on Mobile) ─── */
.acc-orders-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (max-width: 768px) {
  .acc-orders-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

.acc-order-box {
  background: #FFFFFF;
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.acc-order-box:hover {
  border-color: var(--auth-gold);
  box-shadow: 0 4px 16px rgba(197, 148, 58, 0.08);
}
.acc-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--auth-border);
  margin-bottom: 10px;
}
.acc-order-num {
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--auth-text);
  font-family: monospace, sans-serif;
}
.acc-order-date {
  font-size: 0.76rem;
  color: var(--auth-muted);
  font-weight: 600;
}
.acc-order-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
}
.acc-order-items {
  font-size: 0.85rem;
  color: var(--auth-text-2);
  line-height: 1.5;
  margin-bottom: 12px;
}
.acc-order-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--auth-border);
}
.acc-order-total {
  font-size: 0.96rem;
  font-weight: 900;
  color: var(--auth-gold);
}
.acc-order-btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--auth-gold-light);
  border: 1px solid var(--auth-gold-border);
  color: var(--auth-gold);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}
.acc-order-btn-detail:hover {
  background: var(--auth-gold);
  color: #FFF;
}

@media (max-width: 768px) {
  .acc-order-box {
    padding: 10px 8px !important;
    border-radius: 10px !important;
  }
  .acc-order-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    padding-bottom: 6px !important;
    margin-bottom: 6px !important;
  }
  .acc-order-num {
    font-size: 0.82rem !important;
  }
  .acc-order-date {
    font-size: 0.68rem !important;
  }
  .acc-order-badge {
    font-size: 0.66rem !important;
    padding: 2px 6px !important;
    margin-top: 2px;
  }
  .acc-order-items {
    font-size: 0.72rem !important;
    line-height: 1.35 !important;
    margin-bottom: 8px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .acc-order-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding-top: 6px !important;
  }
  .acc-order-total {
    font-size: 0.84rem !important;
    text-align: center;
  }
  .acc-order-btn-detail {
    width: 100% !important;
    font-size: 0.72rem !important;
    padding: 5px 4px !important;
    justify-content: center !important;
  }
}

/* ─── Order Details Modal (Like Mobile App) ─── */
.acc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.acc-modal-overlay.open {
  display: flex;
}
.acc-modal-sheet {
  background: #FFFFFF;
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--auth-border);
  padding: 24px;
  position: relative;
  animation: modalSlideUp 0.22s ease-out;
}
@keyframes modalSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.acc-modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F3F4F6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  color: #374151;
  transition: all 0.2s ease;
}
.acc-modal-close:hover {
  background: #E5E7EB;
  color: #000;
}
.acc-modal-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--auth-text);
  margin-bottom: 4px;
  padding-left: 36px;
}
.acc-modal-subtitle {
  font-size: 0.8rem;
  color: var(--auth-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--auth-border);
}
.acc-modal-sec-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--auth-text);
  margin: 14px 0 8px;
}
.acc-modal-items-list {
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.acc-modal-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--auth-border);
  font-size: 0.85rem;
}
.acc-modal-item-row:last-child {
  border-bottom: none;
}
.acc-modal-summary-box {
  background: #FFF;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.acc-modal-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  padding: 4px 0;
  color: var(--auth-text-2);
}
.acc-modal-summary-row.total {
  font-weight: 900;
  color: var(--auth-gold);
  font-size: 1.05rem;
  border-top: 1px solid var(--auth-border);
  padding-top: 8px;
  margin-top: 4px;
}
.acc-modal-wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  border-radius: 12px;
  background: #25D366;
  color: #FFF;
  font-weight: 800;
  font-size: 0.92rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  transition: all 0.2s ease;
}
.acc-modal-wa-btn:hover {
  background: #20BA5A;
}

/* Spinner */
.auth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: authSpin 0.7s linear infinite;
  display: inline-block;
}
@keyframes authSpin {
  to { transform: rotate(360deg); }
}
