/* =========================================================
   Account, auth (login / signup / password) & dashboard UI
   Brand: black #000, orange #f14f0f, cream #fff7f2
   ========================================================= */
:root {
  --acc-orange: #f14f0f;
  --acc-orange-dark: #d43f03;
  --acc-black: #0d0d0d;
  --acc-ink: #1a1a1a;
  --acc-muted: #6b6b6b;
  --acc-line: #ececec;
  --acc-cream: #fff7f2;
  --acc-white: #ffffff;
  --acc-radius: 14px;
  --acc-shadow: 0 6px 30px rgba(0, 0, 0, 0.07);
}

/* ---------- Alerts (shared) ---------- */
.acc-alerts { margin-bottom: 18px; }
.acc-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 10px;
  border: 1px solid transparent;
}
.acc-alert i { margin-top: 2px; }
.acc-alert-success { background: #ecfdf3; color: #146c43; border-color: #c6f0d6; }
.acc-alert-danger, .acc-alert-error { background: #fef2f2; color: #b42318; border-color: #fbd5d5; }
.acc-alert-info { background: #eff8ff; color: #175cd3; border-color: #cfe5fb; }
.acc-alert-warning { background: #fffaeb; color: #b54708; border-color: #fde7b0; }
.acc-alert-close {
  margin-left: auto;
  background: none;
  border: 0;
  color: inherit;
  opacity: .6;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.acc-alert-close:hover { opacity: 1; }

/* ---------- Auth pages ---------- */
.auth-page {
  background: var(--acc-cream);
  padding: 56px 16px 72px;
  min-height: 70vh;
}
.auth-shell {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  background: var(--acc-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.08);
}
.auth-shell.auth-wide { max-width: 1060px; grid-template-columns: 0.85fr 1.25fr; }

.auth-aside {
  background: var(--acc-black);
  color: #fff;
  padding: 44px 40px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.auth-aside::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 79, 15, 0.45), rgba(241, 79, 15, 0) 70%);
  pointer-events: none;
}
.auth-aside-logo img { width: 190px; height: auto; }
.auth-aside h2 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
  margin: 34px 0 12px;
  color: #fff;
}
.auth-aside h2 span { color: var(--acc-orange); }
.auth-aside p { color: rgba(255, 255, 255, 0.7); font-size: 14px; line-height: 1.6; margin: 0; }
.auth-perks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.auth-perks li { display: flex; align-items: center; gap: 12px; font-size: 14px; color: rgba(255, 255, 255, 0.88); }
.auth-perks i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(241, 79, 15, 0.15);
  color: var(--acc-orange);
  font-size: 15px;
  flex-shrink: 0;
}
.auth-aside-foot { margin-top: auto; padding-top: 32px; font-size: 13px; color: rgba(255, 255, 255, 0.55); }

.auth-main { padding: 44px 44px 40px; }
.auth-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--acc-orange);
  margin-bottom: 8px;
}
.auth-main h1 { font-size: 28px; font-weight: 800; color: var(--acc-ink); margin: 0 0 6px; }
.auth-sub { color: var(--acc-muted); font-size: 14px; margin: 0 0 26px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f4f4f4;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 26px;
}
.auth-tabs a {
  text-align: center;
  padding: 9px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--acc-muted);
  text-decoration: none;
}
.auth-tabs a.active { background: #fff; color: var(--acc-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }

/* Fields */
.acc-field { margin-bottom: 16px; }
.acc-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--acc-ink);
  margin-bottom: 6px;
}
.acc-input-wrap { position: relative; }
.acc-input-wrap > i.acc-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a3a3a3;
  font-size: 14px;
  pointer-events: none;
}
.acc-field input[type="text"],
.acc-field input[type="email"],
.acc-field input[type="password"],
.acc-field input[type="number"],
.acc-field input[type="tel"],
.acc-field select,
.acc-field textarea,
.acc-field .form-control {
  width: 100%;
  height: 48px;
  border: 1.5px solid #e3e3e3;
  border-radius: 10px;
  background: #fff;
  padding: 0 14px;
  font-size: 14px;
  color: var(--acc-ink);
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.acc-field textarea { height: auto; min-height: 100px; padding: 12px 14px; }
.acc-input-wrap.has-icon input { padding-left: 40px; }
.acc-input-wrap.has-toggle input { padding-right: 46px; }
.acc-field input:focus,
.acc-field select:focus,
.acc-field textarea:focus,
.acc-field .form-control:focus {
  outline: none;
  border-color: var(--acc-orange);
  box-shadow: 0 0 0 4px rgba(241, 79, 15, 0.12);
}
.acc-field input::placeholder { color: #b0b0b0; font-size: 13px; }
.acc-field input[type="file"] {
  width: 100%;
  border: 1.5px dashed #d8d8d8;
  border-radius: 10px;
  padding: 11px 12px;
  font-size: 13px;
  background: #fafafa;
  height: auto;
}
.acc-field.has-error input,
.acc-field.has-error .form-control { border-color: #e5484d; }
.acc-error { color: #b42318; font-size: 12.5px; margin-top: 6px; }
.acc-error ul { list-style: none; padding: 0; margin: 0; }
.acc-hint { color: var(--acc-muted); font-size: 12.5px; margin-top: 6px; }

.acc-toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #8a8a8a;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
}
.acc-toggle-pass:hover { color: var(--acc-ink); background: #f4f4f4; }

.acc-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.acc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }

.acc-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -4px 0 20px;
  font-size: 13px;
}
.acc-link { color: var(--acc-orange); font-weight: 600; text-decoration: none; }
.acc-link:hover { color: var(--acc-orange-dark); text-decoration: underline; }

.acc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: var(--acc-black);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
}
.acc-btn:hover { background: var(--acc-orange); color: #fff; }
.acc-btn:active { transform: translateY(1px); }
.acc-btn-block { width: 100%; }
.acc-btn-orange { background: var(--acc-orange); }
.acc-btn-orange:hover { background: var(--acc-orange-dark); }
.acc-btn-ghost { background: #fff; color: var(--acc-ink); border: 1.5px solid #e3e3e3; }
.acc-btn-ghost:hover { background: #fff; color: var(--acc-orange); border-color: var(--acc-orange); }
.acc-btn-sm { height: 38px; padding: 0 16px; font-size: 13px; border-radius: 8px; }

.auth-switch { text-align: center; margin-top: 22px; font-size: 14px; color: var(--acc-muted); }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 12px; color: #9a9a9a; }

.auth-notice { text-align: center; padding: 10px 0; }
.auth-notice-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(241, 79, 15, 0.1);
  color: var(--acc-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.auth-notice p { color: var(--acc-muted); font-size: 14px; line-height: 1.6; }
.auth-notice strong { color: var(--acc-ink); word-break: break-all; }

@media (max-width: 860px) {
  .auth-shell, .auth-shell.auth-wide { grid-template-columns: 1fr; }
  .auth-aside { padding: 26px 24px; }
  .auth-aside h2 { font-size: 20px; margin: 18px 0 6px; }
  .auth-aside .auth-perks, .auth-aside-foot, .auth-aside p { display: none; }
  .auth-aside-logo img { width: 150px; }
}
@media (max-width: 576px) {
  .auth-page { padding: 24px 12px 40px; }
  .auth-main { padding: 28px 20px 26px; }
  .auth-main h1 { font-size: 24px; }
  .acc-grid-2, .acc-grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Dashboard layout ---------- */
.acc-page { background: var(--acc-cream); padding: 40px 0 72px; min-height: 70vh; }
.acc-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }

.acc-side {
  background: #fff;
  border-radius: var(--acc-radius);
  box-shadow: var(--acc-shadow);
  padding: 22px 16px;
  position: sticky;
  top: 20px;
}
.acc-user { display: flex; align-items: center; gap: 12px; padding: 0 6px 18px; border-bottom: 1px solid var(--acc-line); margin-bottom: 12px; }
.acc-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--acc-black);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  text-transform: uppercase;
}
.acc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.acc-avatar.lg { width: 84px; height: 84px; font-size: 28px; }
.acc-user-name { font-weight: 700; font-size: 15px; color: var(--acc-ink); line-height: 1.2; }
.acc-user-mail { font-size: 12px; color: var(--acc-muted); word-break: break-all; }

.acc-nav { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.acc-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #3a3a3a;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.acc-nav a i { width: 18px; text-align: center; color: #9a9a9a; }
.acc-nav a:hover { background: #f6f6f6; color: var(--acc-ink); }
.acc-nav a.active { background: rgba(241, 79, 15, 0.1); color: var(--acc-orange); font-weight: 600; }
.acc-nav a.active i { color: var(--acc-orange); }
.acc-nav .acc-logout { margin-top: 10px; border-top: 1px solid var(--acc-line); padding-top: 10px; }
.acc-nav .acc-logout a { color: #b42318; }
.acc-nav .acc-logout a i { color: #e5484d; }

.acc-content { min-width: 0; }
.acc-head { margin-bottom: 22px; }
.acc-head h1 { font-size: 26px; font-weight: 800; color: var(--acc-ink); margin: 0 0 4px; }
.acc-head p { color: var(--acc-muted); font-size: 14px; margin: 0; }

.acc-card {
  background: #fff;
  border-radius: var(--acc-radius);
  box-shadow: var(--acc-shadow);
  padding: 26px;
  margin-bottom: 22px;
}
.acc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.acc-card-head h2 { font-size: 17px; font-weight: 700; margin: 0; color: var(--acc-ink); }

.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.acc-stat {
  background: #fff;
  border-radius: var(--acc-radius);
  box-shadow: var(--acc-shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}
a.acc-stat:hover { transform: translateY(-3px); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.1); color: inherit; }
.acc-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: rgba(241, 79, 15, 0.1);
  color: var(--acc-orange);
  flex-shrink: 0;
}
.acc-stat-icon.dark { background: var(--acc-black); color: #fff; }
.acc-stat-label { font-size: 13px; color: var(--acc-muted); }
.acc-stat-value { font-size: 22px; font-weight: 800; color: var(--acc-ink); line-height: 1.2; }

.acc-profile { display: flex; align-items: center; gap: 20px; }
.acc-profile-meta { display: grid; gap: 6px; font-size: 14px; color: #3a3a3a; }
.acc-profile-meta i { width: 18px; color: var(--acc-orange); margin-right: 6px; }

/* Orders */
.acc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.acc-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--acc-muted);
  padding: 0 14px 12px;
  border-bottom: 1px solid var(--acc-line);
}
.acc-table td { padding: 15px 14px; border-bottom: 1px solid var(--acc-line); color: #3a3a3a; vertical-align: middle; }
.acc-table tr:last-child td { border-bottom: 0; }
.acc-table tbody tr:hover td { background: #fcfcfc; }
.acc-order-no { font-weight: 700; color: var(--acc-ink); text-decoration: none; }
.acc-order-no:hover { color: var(--acc-orange); }
.acc-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f1f1;
  color: #444;
}
.acc-pill.ok { background: #ecfdf3; color: #146c43; }
.acc-pill.warn { background: #fffaeb; color: #b54708; }
.acc-pill.bad { background: #fef2f2; color: #b42318; }

.acc-empty { text-align: center; padding: 36px 10px; }
.acc-empty i { font-size: 40px; color: #d6d6d6; margin-bottom: 14px; }
.acc-empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.acc-empty p { color: var(--acc-muted); font-size: 14px; margin-bottom: 18px; }

.acc-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 992px) {
  .acc-layout { grid-template-columns: 1fr; gap: 18px; }
  .acc-side { position: static; padding: 14px; }
  .acc-user { padding-bottom: 12px; margin-bottom: 10px; }
  .acc-nav { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .acc-nav::-webkit-scrollbar { display: none; }
  .acc-nav a { white-space: nowrap; padding: 9px 14px; background: #f6f6f6; }
  .acc-nav .acc-logout { margin: 0; border: 0; padding: 0; }
}
@media (max-width: 768px) {
  .acc-page { padding: 22px 0 40px; }
  .acc-stats { grid-template-columns: 1fr; gap: 12px; }
  .acc-card { padding: 20px 16px; }
  .acc-head h1 { font-size: 22px; }
  .acc-profile { flex-direction: column; text-align: center; }

  /* Order table becomes stacked cards */
  .acc-table thead { display: none; }
  .acc-table, .acc-table tbody, .acc-table tr, .acc-table td { display: block; width: 100%; }
  .acc-table tr { border: 1px solid var(--acc-line); border-radius: 12px; padding: 6px 4px; margin-bottom: 12px; }
  .acc-table td { border: 0; padding: 7px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .acc-table td::before { content: attr(data-label); font-weight: 600; color: var(--acc-muted); text-align: left; }
  .acc-table tbody tr:hover td { background: transparent; }
}

/* Avatar: initials underneath, photo on top (removed if it fails to load) */
.acc-avatar { position: relative; }
.acc-avatar img { position: absolute; inset: 0; }

/* Stop the swipeable mobile nav from stretching the layout past the screen */
.acc-side, .acc-content { min-width: 0; }
@media (max-width: 992px) {
  .acc-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Order status pills ---------- */
.acc-pill i { font-size: 11px; margin-right: 2px; }
.acc-pill.st-pending { background: #fffaeb; color: #b54708; }
.acc-pill.st-processing { background: #eff8ff; color: #175cd3; }
.acc-pill.st-shipped { background: #f4f3ff; color: #5925dc; }
.acc-pill.st-delivered { background: #ecfdf3; color: #146c43; }
.acc-pill.st-cancelled { background: #fef2f2; color: #b42318; }

/* ---------- Order detail ---------- */
.od-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 14px; }
.od-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.od-head .acc-pill { font-size: 13px; padding: 6px 14px; }

.od-track { list-style: none; padding: 0; margin: 6px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.od-track li { text-align: center; position: relative; padding: 0 6px; }
.od-track li::before {
  content: ""; position: absolute; top: 21px; left: -50%; width: 100%; height: 3px; background: #ececec; z-index: 0;
}
.od-track li:first-child::before { display: none; }
.od-track li.done::before, .od-track li.current::before { background: #12b76a; }
.od-dot {
  position: relative; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 10px;
  background: #f1f1f1; color: #a0a0a0; font-size: 16px; border: 3px solid #fff;
}
.od-track li.done .od-dot { background: #12b76a; color: #fff; }
.od-track li.current .od-dot { background: #f14f0f; color: #fff; box-shadow: 0 0 0 5px rgba(241, 79, 15, 0.15); }
.od-label { display: block; font-size: 13.5px; font-weight: 700; color: #9a9a9a; }
.od-track li.done .od-label, .od-track li.current .od-label { color: var(--acc-ink); }
.od-when { display: block; font-size: 12px; color: var(--acc-muted); margin-top: 2px; }
.od-status-note { margin: 20px 0 0; padding: 12px 14px; background: var(--acc-cream); border-radius: 10px; font-size: 14px; color: #3a3a3a; }

.od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.od-dl { margin: 0; display: grid; gap: 12px; }
.od-dl div { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.od-dl dt { font-size: 13px; color: var(--acc-muted); font-weight: 500; }
.od-dl dd { margin: 0; font-weight: 700; color: var(--acc-ink); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.od-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f4f4f4; padding: 4px 8px; border-radius: 6px; font-size: 13px; }
.od-copy { border: 1px solid #e3e3e3; background: #fff; border-radius: 6px; font-size: 12px; padding: 3px 8px; cursor: pointer; color: #555; }
.od-copy:hover { border-color: var(--acc-orange); color: var(--acc-orange); }
.od-address { font-size: 14px; line-height: 1.7; color: #3a3a3a; }
.od-address strong { color: var(--acc-ink); }
.od-contact { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--acc-line); font-size: 13.5px; color: #555; display: grid; gap: 4px; word-break: break-all; }
.od-contact i { color: var(--acc-orange); width: 18px; }

.od-items { list-style: none; padding: 0; margin: 0; }
.od-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.od-item:last-child { border-bottom: 0; }
.od-thumb { position: relative; width: 60px; height: 60px; border-radius: 10px; background: #f6f6f6; }
.od-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 5px; border-radius: 10px; font-size: 0; color: transparent; }
.od-thumb b { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; border-radius: 10px; background: #000; color: #fff; font-size: 11px; line-height: 20px; text-align: center; padding: 0 5px; }
.od-item-name { font-weight: 700; font-size: 15px; }
.od-item-name a { color: var(--acc-ink); text-decoration: none; }
.od-item-name a:hover { color: var(--acc-orange); }
.od-item-var { font-size: 12.5px; color: var(--acc-muted); }
.od-item-price { font-weight: 800; font-size: 15px; white-space: nowrap; }
.od-totals { border-top: 1px solid var(--acc-line); margin-top: 6px; padding-top: 12px; max-width: 360px; margin-left: auto; }
.od-totals div { display: flex; justify-content: space-between; font-size: 14px; color: #555; padding: 5px 0; }
.od-totals strong { color: var(--acc-ink); }
.od-totals .od-grand { border-top: 1px dashed #e2e2e2; margin-top: 6px; padding-top: 12px; font-size: 16px; font-weight: 700; color: var(--acc-ink); }
.od-totals .od-grand strong { font-size: 22px; font-weight: 800; }
.od-free { color: #146c43 !important; }

@media (max-width: 768px) {
  .od-grid { grid-template-columns: 1fr; gap: 0; }
  .od-dot { width: 36px; height: 36px; font-size: 13px; }
  .od-track li::before { top: 17px; }
  .od-label { font-size: 11.5px; }
  .od-when { font-size: 10.5px; }
  .od-totals { max-width: none; }
}
@media print {
  .topbar, .header, .offcanvas-menu, .bottom-nav, footer, .acc-side, .od-back, .od-print, #push-banner { display: none !important; }
  .acc-page { background: #fff; padding: 0; }
  .acc-layout { grid-template-columns: 1fr; }
  .acc-card { box-shadow: none; border: 1px solid #ddd; }
}
