/* ACCOUNT PAGES — Login, Dashboard, Orders, Details, Addresses */

/* ─────────────────────────────────────────────────────────────
   AUTH — Login / Register Split Layout
───────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  margin: 100px 5% 25px;
}

.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* Left branding panel */
.auth-brand {
  background: linear-gradient(145deg, var(--color-ink-deep) 0%, #1a2d6b 55%, var(--color-primary) 100%);
  padding: 60px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  gap: 50px;
}

.auth-brand::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(71, 112, 194, 0.12);
  top: -140px;
  right: -120px;
  pointer-events: none;
}

.auth-brand::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  bottom: -80px;
  left: -60px;
  pointer-events: none;
}

.auth-brand-logo {
  height: 34px;
  width: fit-content;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

.auth-brand-body {
  position: relative;
  z-index: 1;
}

.auth-brand-overline {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 18px;
}

.auth-brand-title {
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 18px;
}

.auth-brand-desc {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.75;
  max-width: 360px;
}

.auth-brand-quote {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--rounded-xl);
  padding: 22px 24px;
  position: relative;
  z-index: 1;
}

.auth-brand-quote-text {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  font-style: italic;
  margin-bottom: 14px;
}

.auth-brand-quote-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand-quote-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.auth-brand-quote-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.auth-brand-quote-role {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1px;
}

/* Right form panel */
.auth-form-panel {
  padding: 60px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-form-panel-inner {
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.auth-form-panel-title {
  font-size: 25px;
  font-weight: 700;
  color: var(--color-ink-deep);
  margin-bottom: 6px;
}

.auth-form-panel-sub {
  font-size: 13.5px;
  color: var(--color-stone);
  margin-bottom: 30px;
  line-height: 1.55;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--color-surface-soft);
  border-radius: var(--rounded-full);
  padding: 4px;
  gap: 4px;
  margin-bottom: 28px;
}

.auth-tab {
  flex: 1;
  padding: 9px 16px;
  border: none;
  border-radius: var(--rounded-full);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-stone);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family);
}

.auth-tab.active {
  background: #fff;
  color: var(--color-ink-deep);
  box-shadow: 0 2px 8px rgba(18, 20, 24, 0.1);
}

/* Forms — one shown at a time */
.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-input-group {
  margin-bottom: 16px;
}

.auth-input-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-charcoal);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-lg);
  font-size: 14px;
  font-family: var(--font-family);
  color: var(--color-ink);
  background: #fff;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.auth-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.auth-input.has-toggle {
  padding-right: 44px;
}

.auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-stone);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.15s ease;
}

.auth-pw-toggle:hover {
  color: var(--color-ink);
}

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

.auth-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  margin-top: 2px;
}

.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-charcoal);
  cursor: pointer;
}

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

.auth-forgot-link {
  font-size: 13px;
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

.auth-forgot-link:hover {
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px 24px;
  background: var(--color-ink-deep);
  color: #fff;
  border: none;
  border-radius: var(--rounded-full);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition:
    background 0.2s ease,
    transform 0.15s ease;
  letter-spacing: 0.2px;
  margin-top: 4px;
}

.auth-submit-btn:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
}

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

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: var(--color-hairline-soft);
}

.auth-divider-text {
  font-size: 11px;
  color: var(--color-stone);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.auth-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-lg);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink);
  background: #fff;
  cursor: pointer;
  font-family: var(--font-family);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  text-decoration: none;
}

.auth-social-btn:hover {
  border-color: var(--color-hairline);
  box-shadow: 0 2px 8px rgba(18, 20, 24, 0.06);
}

.auth-terms {
  font-size: 12px;
  color: var(--color-stone);
  line-height: 1.6;
  margin-top: 16px;
  text-align: center;
}

.auth-terms a {
  color: var(--color-primary);
  text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   ACCOUNT LAYOUT — sidebar + content
───────────────────────────────────────────────────────────── */
.account-section {
  padding: 100px 5% 0px 5%;
}

.account-layout {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 28px;
  align-items: start;
  max-width: 1360px;
  margin: 0 auto;
}

/* ─── Sidebar ─── */
.account-sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid var(--color-hairline-soft);
  border-radius: var(--rounded-xxl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(18, 20, 24, 0.05);
}

.account-user-block {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--color-hairline-soft);
  display: flex;
  align-items: center;
  gap: 13px;
}

.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.account-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--color-ink-deep);
  margin-bottom: 2px;
  line-height: 1.3;
}

.account-user-email {
  font-size: 11.5px;
  color: var(--color-stone);
  line-height: 1.3;
}

.account-nav {
  list-style: none;
  padding: 10px 8px 12px;
}

.account-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--color-slate);
  text-decoration: none;
  border-radius: var(--rounded-lg);
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.account-nav-link:hover {
  background: var(--color-surface-soft);
  color: var(--color-ink-deep);
}

.account-nav-link.active {
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-weight: 600;
}

.account-nav-link svg {
  flex-shrink: 0;
  opacity: 0.55;
}

.account-nav-link.active svg,
.account-nav-link:hover svg {
  opacity: 1;
}

.account-nav-divider {
  height: 1px;
  background: var(--color-hairline-soft);
  margin: 8px 12px;
}

.account-nav-link--logout:hover {
  background: #fff5f5;
  color: #c0392b;
}

/* ─── Content ─── */
.account-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.account-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.account-page-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--color-ink-deep);
  margin-bottom: 2px;
}

.account-page-sub {
  font-size: 13px;
  color: var(--color-stone);
}

/* ─────────────────────────────────────────────────────────────
   DASHBOARD
───────────────────────────────────────────────────────────── */
.account-welcome-card {
  background: linear-gradient(145deg, var(--color-ink-deep) 0%, #1a2d6b 55%, var(--color-primary) 100%);
  border-radius: var(--rounded-xxl);
  padding: 30px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  overflow: hidden;
  position: relative;
}

.account-welcome-card::before {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  top: -110px;
  right: -60px;
  pointer-events: none;
}

.account-welcome-text {
  position: relative;
  z-index: 1;
}

.account-welcome-greeting {
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
}

.account-welcome-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.account-welcome-action {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.account-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.account-stat-card {
  background: #fff;
  border: 1px solid var(--color-hairline-soft);
  border-radius: var(--rounded-xl);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(18, 20, 24, 0.04);
}

.account-stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--rounded-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.account-stat-icon--blue {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.account-stat-icon--green {
  background: #dcf5e7;
  color: #15803d;
}
.account-stat-icon--amber {
  background: #fff3d0;
  color: #92400e;
}
.account-stat-icon--slate {
  background: #f1f1f3;
  color: var(--color-slate);
}

.account-stat-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--color-ink-deep);
  line-height: 1;
}

.account-stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-stone);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

/* ─────────────────────────────────────────────────────────────
   SHARED CARD CONTAINER
───────────────────────────────────────────────────────────── */
.account-card {
  background: #fff;
  border: 1px solid var(--color-hairline-soft);
  border-radius: var(--rounded-xxl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(18, 20, 24, 0.04);
}

.account-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-hairline-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.account-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-ink-deep);
}

.account-card-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}

.account-card-link:hover {
  text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────
   ORDERS TABLE
───────────────────────────────────────────────────────────── */
.orders-filter-bar {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-hairline-soft);
  flex-wrap: wrap;
  background: var(--color-surface-soft);
}

.orders-filter-btn {
  padding: 5px 13px;
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-slate);
  background: #fff;
  cursor: pointer;
  font-family: var(--font-family);
  transition: all 0.15s ease;
}

.orders-filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.orders-filter-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

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

.orders-table th {
  padding: 11px 20px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-stone);
  text-align: left;
  background: var(--color-surface-soft);
  border-bottom: 1px solid var(--color-hairline-soft);
  white-space: nowrap;
}

.orders-table td {
  padding: 13px 20px;
  font-size: 13px;
  color: var(--color-charcoal);
  border-bottom: 1px solid var(--color-hairline-soft);
  vertical-align: middle;
}

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

.orders-table tr.order-table-row:hover td {
  background: #fafbff;
}

.order-num {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--color-ink-deep);
  font-family: monospace;
  letter-spacing: 0.3px;
}

.order-date {
  font-size: 11.5px;
  color: var(--color-stone);
  margin-top: 2px;
}

.order-items-preview {
  font-size: 13px;
  color: var(--color-charcoal);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-items-count {
  font-size: 11px;
  color: var(--color-stone);
  margin-top: 2px;
}

.order-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-ink-deep);
  white-space: nowrap;
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--rounded-full);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-badge--delivered {
  background: #dcf5e7;
  color: #15803d;
}
.status-badge--processing {
  background: #fff3d0;
  color: #92400e;
}
.status-badge--shipped {
  background: var(--color-primary-soft);
  color: var(--color-primary-deep);
}
.status-badge--cancelled {
  background: #fee2e2;
  color: #991b1b;
}
.status-badge--pending {
  background: #f1f1f3;
  color: var(--color-slate);
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.order-view-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--color-primary-soft);
  border-radius: var(--rounded-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-primary);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-family);
  text-decoration: none;
  display: inline-block;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.order-view-btn:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

/* Quick actions */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 18px 20px;
}

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-lg);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
  background: #fff;
}

.quick-action-card:hover {
  border-color: var(--color-primary-soft);
  box-shadow: 0 4px 16px rgba(71, 112, 194, 0.08);
  transform: translateY(-2px);
}

.quick-action-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--rounded-lg);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quick-action-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-deep);
}

.quick-action-sub {
  font-size: 11px;
  color: var(--color-stone);
  margin-top: 1px;
}

/* ─────────────────────────────────────────────────────────────
   ACCOUNT DETAILS — Form
───────────────────────────────────────────────────────────── */
.account-form-block {
  padding: 26px 26px 28px;
}

.account-form-block + .account-form-block {
  border-top: 1px solid var(--color-hairline-soft);
}

.account-form-block-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-ink-deep);
  margin-bottom: 4px;
}

.account-form-block-sub {
  font-size: 13px;
  color: var(--color-stone);
  margin-bottom: 22px;
  line-height: 1.5;
}

.account-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.account-field-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.account-field-group.span-2 {
  grid-column: 1 / -1;
}

.account-field-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-charcoal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.account-field-input,
.account-field-select {
  padding: 11px 14px;
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-lg);
  font-size: 13.5px;
  font-family: var(--font-family);
  color: var(--color-ink);
  background: #fff;
  outline: none;
  width: 100%;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.account-field-input:focus,
.account-field-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.account-field-input:disabled {
  background: var(--color-surface-soft);
  color: var(--color-stone);
  cursor: not-allowed;
}

.account-field-hint {
  font-size: 11.5px;
  color: var(--color-stone);
  margin-top: 2px;
}

.account-form-actions {
  padding: 18px 26px;
  border-top: 1px solid var(--color-hairline-soft);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: var(--color-surface-soft);
}

.account-btn-save {
  padding: 10px 22px;
  background: var(--color-ink-deep);
  color: #fff;
  border: none;
  border-radius: var(--rounded-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition:
    background 0.2s ease,
    transform 0.15s ease;
}

.account-btn-save:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
}

.account-btn-cancel {
  padding: 10px 22px;
  background: transparent;
  color: var(--color-slate);
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.account-btn-cancel:hover {
  border-color: var(--color-hairline);
  color: var(--color-ink);
}

/* Toggle switches */
.account-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-hairline-soft);
}

.account-toggle-row:last-child {
  border-bottom: none;
}

.account-toggle-text-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-ink-deep);
  margin-bottom: 2px;
}

.account-toggle-text-sub {
  font-size: 12px;
  color: var(--color-stone);
  line-height: 1.5;
}

.account-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.account-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.account-toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-hairline-soft);
  border-radius: var(--rounded-full);
  cursor: pointer;
  transition: background 0.2s ease;
}

.account-toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  left: 3px;
  top: 3px;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.account-toggle input:checked + .account-toggle-slider {
  background: var(--color-primary);
}

.account-toggle input:checked + .account-toggle-slider::before {
  transform: translateX(18px);
}

/* ─────────────────────────────────────────────────────────────
   SAVED ADDRESSES
───────────────────────────────────────────────────────────── */
.address-grid {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.address-card {
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-xl);
  padding: 20px;
  position: relative;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.address-card:hover {
  border-color: var(--color-primary-soft);
  box-shadow: 0 4px 16px rgba(71, 112, 194, 0.07);
}

.address-card--default {
  border-color: var(--color-primary);
  background: linear-gradient(135deg, #fafbff 0%, #f2f6ff 100%);
}

.address-card--add {
  border: 1.5px dashed var(--color-hairline);
  background: var(--color-surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  min-height: 170px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
  border-radius: var(--rounded-xl);
  padding: 20px;
}

.address-card--add:hover {
  border-color: var(--color-primary);
  background: #f2f6ff;
}

.address-add-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.address-add-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-primary);
}

.address-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--rounded-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.address-type-badge--default {
  background: var(--color-primary);
  color: #fff;
}

.address-type-badge--other {
  background: var(--color-surface-soft);
  color: var(--color-slate);
}

.address-recipient {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-ink-deep);
  margin-bottom: 6px;
}

.address-phone {
  font-size: 12px;
  color: var(--color-stone);
  margin-bottom: 8px;
}

.address-lines {
  font-size: 13px;
  color: var(--color-charcoal);
  line-height: 1.65;
  margin-bottom: 16px;
}

.address-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.address-action-btn {
  padding: 5px 12px;
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-full);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--color-slate);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-family);
  transition: all 0.15s ease;
}

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

.address-action-btn--danger:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fff5f5;
}

/* ─────────────────────────────────────────────────────────────
   ADDRESS MODAL
───────────────────────────────────────────────────────────── */
.address-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 18, 58, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.address-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.address-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 20px));
  opacity: 0;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  background: #fff;
  border-radius: var(--rounded-xxl);
  z-index: 1001;
  overflow-y: auto;
  pointer-events: none;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  box-shadow: 0 32px 80px rgba(2, 18, 58, 0.18);
}

.address-modal.active {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: all;
}

.address-modal-header {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--color-hairline-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.address-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-ink-deep);
}

.address-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-soft);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-slate);
  font-size: 16px;
  transition: background 0.15s ease;
}

.address-modal-close:hover {
  background: var(--color-hairline-soft);
}

.address-modal-body {
  padding: 24px;
}

.address-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.address-modal-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.address-modal-field.span-2 {
  grid-column: 1 / -1;
}

.address-modal-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-charcoal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.address-modal-input,
.address-modal-select {
  padding: 11px 14px;
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-lg);
  font-size: 13.5px;
  font-family: var(--font-family);
  color: var(--color-ink);
  background: #fff;
  outline: none;
  width: 100%;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.address-modal-input:focus,
.address-modal-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.address-modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--color-hairline-soft);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--color-surface-soft);
}

/* ─────────────────────────────────────────────────────────────
   ORDER VIEW
───────────────────────────────────────────────────────────── */
.order-view-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-stone);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.15s ease;
}

.order-view-back:hover {
  color: var(--color-primary);
}

/* Status tracker */
.order-track-wrap {
  padding: 28px 26px;
}

.order-track-steps {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}

.order-track-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
}

.order-track-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--color-hairline);
  background: #fff;
  color: var(--color-hairline);
  transition: all 0.2s ease;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.order-track-step.completed .order-track-step-icon {
  border-color: #15803d;
  background: #dcf5e7;
  color: #15803d;
}

.order-track-step.active .order-track-step-icon {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.order-track-text {
  text-align: center;
}

.order-track-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-stone);
  white-space: nowrap;
}

.order-track-step.completed .order-track-label,
.order-track-step.active .order-track-label {
  color: var(--color-ink-deep);
}

.order-track-date {
  font-size: 10.5px;
  color: var(--color-stone);
  margin-top: 2px;
  white-space: nowrap;
}

.order-track-connector {
  flex: 1;
  height: 2.5px;
  background: var(--color-hairline-soft);
  margin-top: 17px;
  min-width: 20px;
}

.order-track-connector.done {
  background: #15803d;
}

.order-track-connector.partial {
  background: linear-gradient(to right, #15803d 50%, var(--color-hairline-soft) 50%);
}

/* Event log */
.order-track-events-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-stone);
  margin-bottom: 14px;
}

.order-track-event {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 11px 0;
  border-top: 1px solid var(--color-hairline-soft);
}

.order-track-event:first-of-type {
  border-top: none;
  padding-top: 0;
}

.order-track-event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-hairline);
  margin-top: 5px;
  flex-shrink: 0;
}

.order-track-event-dot--active {
  background: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.order-track-event-dot--done {
  background: #15803d;
}

.order-track-event-body {
  flex: 1;
}

.order-track-event-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-deep);
  margin-bottom: 2px;
}

.order-track-event-meta {
  font-size: 11.5px;
  color: var(--color-stone);
}

/* Order view 2-col grid */
.order-view-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.order-view-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Items */
.order-items-list {
  padding: 0 24px;
}

.order-item-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-hairline-soft);
}

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

.order-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--rounded-lg);
  background: var(--color-surface-soft);
  border: 1px solid var(--color-hairline-soft);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-hairline);
}

.order-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.order-item-info {
  flex: 1;
  min-width: 0;
}

.order-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-ink-deep);
  margin-bottom: 3px;
  line-height: 1.4;
}

.order-item-sku {
  font-size: 11.5px;
  color: var(--color-stone);
  font-family: monospace;
  margin-bottom: 6px;
}

.order-item-qty-row {
  font-size: 12px;
  color: var(--color-charcoal);
  display: flex;
  gap: 12px;
}

.order-item-price-col {
  text-align: right;
  flex-shrink: 0;
}

.order-item-unit-price {
  font-size: 12px;
  color: var(--color-stone);
  margin-bottom: 2px;
}

.order-item-total {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-ink-deep);
  white-space: nowrap;
}

/* Summary */
.order-summary-wrap {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.order-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 13px;
  color: var(--color-charcoal);
  border-top: 1px solid var(--color-hairline-soft);
}

.order-summary-line:first-child {
  border-top: none;
  padding-top: 0;
}

.order-summary-line-label {
  color: var(--color-stone);
}

.order-summary-line--total {
  border-top: 2px solid var(--color-hairline);
  margin-top: 4px;
  padding-top: 12px;
}

.order-summary-total-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-ink-deep);
}

.order-summary-total-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-ink-deep);
}

.order-free-badge {
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #dcf5e7;
  padding: 2px 8px;
  border-radius: var(--rounded-full);
}

/* Info blocks — shipping, payment */
.order-info-block {
  padding: 18px 22px;
}

.order-info-block + .order-info-block {
  border-top: 1px solid var(--color-hairline-soft);
}

.order-info-block-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-stone);
  margin-bottom: 10px;
}

.order-info-text {
  font-size: 13px;
  color: var(--color-charcoal);
  line-height: 1.7;
}

.order-info-name {
  font-weight: 700;
  color: var(--color-ink-deep);
  margin-bottom: 2px;
}

.order-pay-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-pay-icon {
  width: 38px;
  height: 24px;
  border-radius: 5px;
  background: var(--color-ink-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-pay-icon svg {
  color: #fff;
}

.order-pay-info {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-ink-deep);
}

.order-pay-sub {
  font-size: 11.5px;
  color: var(--color-stone);
  margin-top: 1px;
}

/* Help / actions footer */
.order-help-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  background: var(--color-surface-soft);
  border-top: 1px solid var(--color-hairline-soft);
  flex-wrap: wrap;
}

.order-help-text {
  font-size: 13px;
  color: var(--color-charcoal);
}

.order-help-text a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.order-help-text a:hover {
  text-decoration: underline;
}

.order-action-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.order-action-btn {
  padding: 7px 14px;
  border: 1.5px solid var(--color-hairline-soft);
  border-radius: var(--rounded-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-slate);
  background: #fff;
  cursor: pointer;
  font-family: var(--font-family);
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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

.order-action-btn--danger:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fff5f5;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .account-layout {
    grid-template-columns: 240px 1fr;
    gap: 20px;
  }

  .account-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-actions-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .account-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    padding: 48px 40px;
    order: 2;
  }

  .auth-form-panel {
    padding: 0px 44px 48px 44px;
    order: 1;
  }

  .auth-form-panel-inner {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-form-panel {
    padding: 0px 24px 40px 24px;
    justify-content: flex-start;
  }

  .account-section {
    padding: 80px 4% 60px;
  }

  .account-layout {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: static;
  }

  .account-user-block {
    padding: 16px 14px;
  }

  .account-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .auth-input-row {
    grid-template-columns: 1fr;
  }

  .address-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .account-form-grid {
    grid-template-columns: 1fr;
  }

  .account-welcome-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .orders-table thead {
    display: none;
  }

  .orders-table,
  .orders-table tbody,
  .orders-table tr.order-table-row,
  .orders-table td {
    display: block;
    width: 100%;
  }

  .orders-table tr.order-table-row {
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-hairline-soft);
  }

  .orders-table td {
    padding: 2px 0;
    border: none;
  }

  .address-modal {
    max-width: calc(100% - 32px);
  }

  .address-modal-grid {
    grid-template-columns: 1fr;
  }

  .address-modal-field.span-2 {
    grid-column: 1;
  }
}

@media (max-width: 1100px) {
  .order-view-grid {
    grid-template-columns: 1fr 300px;
  }
}

@media (max-width: 900px) {
  .order-view-grid {
    grid-template-columns: 1fr;
  }

  .order-view-right {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .order-view-right > .account-card {
    flex: 1;
    min-width: 260px;
  }
}

@media (max-width: 768px) {
  .order-track-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .order-track-label,
  .order-track-date {
    display: none;
  }

  .order-view-right {
    flex-direction: column;
  }

  .order-view-right > .account-card {
    min-width: unset;
  }

  .order-help-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .account-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .account-stat-num {
    font-size: 24px;
  }

  .account-stat-card {
    padding: 14px 13px;
  }

  .order-item-img {
    width: 56px;
    height: 56px;
  }
}

/* ── Inline Style Migrations ── */

/* Dashboard empty state */
.account-empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--color-stone);
}
.account-empty-btn {
  margin-top: 16px;
  display: inline-flex;
}

/* Address empty note */
.address-empty-note {
  color: var(--color-stone);
  font-size: 13px;
  margin-top: 12px;
}

/* Account card margin-top */
.account-card--mt {
  margin-top: 24px;
}
.account-card--mt-sm {
  margin-top: 16px;
}

/* Auth form */
.auth-form-tab:not([data-form='login']) {
  display: none;
}
.auth-auto-password-note {
  font-size: 12px;
  color: var(--color-stone);
  margin-bottom: 16px;
}
.eye-closed {
  display: none;
}

/* Orders empty state */
.orders-empty-state {
  display: none;
  padding: 56px 24px;
  text-align: center;
}
.orders-no-orders-state {
  padding: 64px 24px;
  text-align: center;
}
.orders-empty-icon {
  color: var(--color-hairline);
  margin-bottom: 14px;
}
.orders-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-ink-deep);
  margin-bottom: 6px;
}
.orders-empty-subtitle {
  font-size: 13px;
  color: var(--color-stone);
}
.orders-no-orders-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink-deep);
  margin-bottom: 8px;
}
.orders-no-orders-subtitle {
  font-size: 13px;
  color: var(--color-stone);
  margin-bottom: 24px;
}

/* View order */
.order-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.order-items-count {
  font-size: 12px;
  color: var(--color-stone);
}
.order-summary-line--discount {
  color: var(--color-primary);
}
.order-summary-total-label {
  font-weight: 700;
}
.order-summary-total-value {
  font-weight: 700;
}
.order-address-text {
  font-size: 13px;
  color: var(--color-ink-muted);
  line-height: 1.6;
}
.order-payment-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-stone);
}
.order-item-variation {
  color: var(--color-stone);
}
