/* ============================================================
   TRACK DAY SHOP — Account area
   Shared styles for /ucet/* (dashboard, orders, wishlist, …).
   Mirrors design/project/account.html structure.
   ============================================================ */

.acc-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-top: 24px;
  align-items: start;
}
@media (max-width: 900px) { .acc-shell { grid-template-columns: 1fr; } }

/* ===== SIDEBAR ===== */
.acc-side {
  position: sticky;
  top: 96px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.acc-user {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.acc-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d1d24, var(--bg-dark));
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.acc-user-name { font-weight: 700; font-size: 15px; color: var(--fg-0); line-height: 1.2; }
.acc-user-mail { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); margin-top: 4px; word-break: break-all; }

.acc-nav { display: flex; flex-direction: column; gap: 2px; }
.acc-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-1);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.acc-nav-item:hover { background: var(--bg-3); color: var(--fg-0); }
.acc-nav-item.active { background: var(--bg-dark); color: white; }
.acc-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.acc-nav-item .badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--red);
  color: white;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-weight: 600;
}
.acc-nav-item.active .badge { background: white; color: var(--bg-dark); }
.acc-nav-divider { height: 1px; background: var(--line); margin: 12px 0; }
.acc-logout {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.acc-logout:hover { color: var(--red); background: transparent; }

/* ===== MAIN ===== */
.acc-main { min-width: 0; }

.acc-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
  flex-wrap: wrap;
}
.acc-head h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 56px;
  text-transform: uppercase;
  line-height: 1;
  color: var(--fg-0);
  letter-spacing: 0.01em;
}
@media (max-width: 700px) { .acc-head h1 { font-size: 40px; } }
.acc-head h1 em { color: var(--red); font-style: italic; }
.acc-head .sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ===== KPI grid ===== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 700px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
}
.kpi .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.kpi .num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 44px;
  line-height: 1;
  margin-top: 8px;
  color: var(--fg-0);
}
.kpi .num em { color: var(--red); font-style: italic; }
.kpi .delta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--fg-2);
}

/* ===== Card sections ===== */
.acc-section {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 20px;
}
.acc-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}
.acc-section-head h2 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  text-transform: uppercase;
  color: var(--fg-0);
  line-height: 1;
}
.acc-section-head .link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
}
.acc-section-head .link:hover { text-decoration: underline; }

/* ===== Order rows ===== */
.order-list { display: flex; flex-direction: column; }
.order-row {
  display: grid;
  grid-template-columns: 130px 1fr auto auto auto;
  gap: 20px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.order-row:first-child { border-top: none; }
@media (max-width: 800px) {
  .order-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .order-row > .order-thumbs, .order-row > .order-num { grid-column: span 2; }
}
.order-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-1);
}
.order-num .date { display: block; color: var(--fg-3); font-size: 11px; margin-top: 4px; }
.order-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.order-thumbs .thumb {
  width: 44px; height: 44px;
  border-radius: var(--r-xs);
  background: var(--bg-3);
  border: 1px solid var(--line);
  background-size: cover;
  background-position: center;
}
.order-thumbs .thumb.placeholder {
  background: var(--bg-3);
  position: relative;
}
.order-thumbs .thumb.placeholder::after {
  content: "";
  position: absolute;
  inset: 30%;
  border: 1.5px solid var(--line-strong);
  border-radius: 2px;
  opacity: 0.6;
}
.order-thumbs .more {
  width: 44px; height: 44px;
  border-radius: var(--r-xs);
  background: var(--bg-3);
  border: 1px dashed var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}
.order-total {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 24px;
  color: var(--fg-0);
  white-space: nowrap;
}
.status-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  white-space: nowrap;
  font-weight: 600;
}
.status-pill.delivered  { background: rgba(14,159,93,0.12); color: #0e9f5d; }
.status-pill.shipping   { background: rgba(217,144,0,0.15); color: #b8741a; }
.status-pill.processing { background: var(--bg-3); color: var(--fg-2); }
.status-pill.confirmed  { background: rgba(37,99,235,0.12); color: #2563eb; }
.status-pill.new        { background: rgba(37,99,235,0.12); color: #2563eb; }
.status-pill.cancelled  { background: rgba(227,6,19,0.10); color: var(--red); }
.status-pill.returned   { background: var(--bg-3); color: var(--fg-2); }
.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-order {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--bg-2);
  cursor: pointer;
  text-decoration: none;
  color: var(--fg-1);
  display: inline-block;
  font-weight: 500;
}
.btn-order:hover { border-color: var(--bg-dark); color: var(--fg-0); }
.btn-order.primary { background: var(--bg-dark); color: white; border-color: var(--bg-dark); }
.btn-order.primary:hover { background: var(--bg-dark-2); color: white; }

/* ===== Order tracker ===== */
.order-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
@media (max-width: 600px) { .order-track { grid-template-columns: repeat(2, 1fr); gap: 16px 0; } }
/* Dot + horizontal connector live ABOVE the text — labels stack below them
   so the connecting line never crosses through label or time strings. */
.tr-step {
  position: relative;
  padding-top: 28px;
  padding-right: 8px;
}
.tr-step::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 2px solid var(--line);
  z-index: 2;
}
.tr-step.done::before { background: #0e9f5d; border-color: #0e9f5d; }
.tr-step.active::before { background: var(--red); border-color: var(--red); animation: trPulse 1.6s infinite; }
.tr-step::after {
  content: "";
  position: absolute;
  left: 14px; top: 6px;
  height: 2px; right: 8px;
  background: var(--line);
  z-index: 1;
}
.tr-step.done::after { background: #0e9f5d; }
.tr-step:last-child::after { display: none; }
.tr-step .lbl { font-size: 13px; font-weight: 600; color: var(--fg-0); line-height: 1.3; }
.tr-step .time { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); margin-top: 4px; letter-spacing: 0.04em; line-height: 1.3; }
@keyframes trPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(227,6,19,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(227,6,19,0); }
}

/* ===== Wishlist ===== */
.wish-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .wish-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .wish-grid { grid-template-columns: 1fr; } }
.wish-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-2);
  display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s;
}
.wish-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.wish-card .ph {
  aspect-ratio: 4/3;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
  display: block;
  overflow: hidden;
}
.wish-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.wish-card .ph.empty {
  display: grid;
  place-items: center;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.wish-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.wish-cat { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.1em; text-transform: uppercase; }
.wish-name { font-weight: 600; font-size: 15px; line-height: 1.3; color: var(--fg-0); text-decoration: none; }
.wish-name:hover { color: var(--red); }
.wish-price { font-family: var(--font-display); font-style: italic; font-size: 22px; margin-top: auto; padding-top: 8px; color: var(--fg-0); }
.wish-price .compare { font-size: 13px; text-decoration: line-through; color: var(--fg-3); margin-left: 6px; font-style: normal; font-family: var(--font-body); }
.wish-stock { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.wish-stock.in    { color: #0e9f5d; }
.wish-stock.out   { color: var(--red); }
.wish-stock.made  { color: var(--amber); }
.wish-row { display: flex; gap: 8px; padding: 0 16px 16px; }
.wish-row .btn-order { flex: 1; text-align: center; }

/* ===== Form fields ===== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 700px) { .form-grid .span-2 { grid-column: span 1; } }
.acc-field { display: flex; flex-direction: column; gap: 6px; }
.acc-field label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.acc-field input,
.acc-field select,
.acc-field textarea {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 0 14px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-2);
  color: var(--fg-0);
}
.acc-field textarea { height: auto; padding: 12px 14px; min-height: 100px; resize: vertical; }
.acc-field input:focus,
.acc-field select:focus,
.acc-field textarea:focus {
  outline: none;
  border-color: var(--bg-dark);
}
.form-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ===== Loyalty card ===== */
.loyalty-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  margin-bottom: 20px;
  border-left: 4px solid var(--red);
}
.loyalty-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.loyalty-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 32px;
  line-height: 1;
  text-transform: uppercase;
}
.loyalty-bar {
  margin-top: 14px;
  background: var(--bg-3);
  border-radius: var(--r-pill);
  height: 6px;
  overflow: hidden;
}
.loyalty-bar > span {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: var(--r-pill);
  transition: width 0.5s;
}

/* ===== Empty state ===== */
.acc-empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--fg-3);
}
.acc-empty .ico { font-size: 56px; margin-bottom: 12px; opacity: 0.4; }
.acc-empty .ttl { font-family: var(--font-display); font-style: italic; font-size: 28px; color: var(--fg-1); text-transform: uppercase; }
.acc-empty p { font-size: 14px; margin-top: 6px; max-width: 380px; margin-left: auto; margin-right: auto; }

/* ===== Flash messages ===== */
.acc-flash {
  padding: 14px 18px;
  border-radius: var(--r-xs);
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 500;
}
.acc-flash.success { background: rgba(14,159,93,0.10); border: 1px solid rgba(14,159,93,0.25); color: #0e9f5d; }
.acc-flash.error   { background: rgba(227,6,19,0.08); border: 1px solid rgba(227,6,19,0.25); color: var(--red); }

/* ===== Pagination ===== */
.acc-pager { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.acc-pager a, .acc-pager span {
  min-width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  padding: 0 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--fg-1);
  text-decoration: none;
}
.acc-pager .active, .acc-pager a:hover { background: var(--bg-dark); color: white; border-color: var(--bg-dark); }

/* ===== Points history ===== */
.points-table {
  width: 100%;
  border-collapse: collapse;
}
.points-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-3);
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.points-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}
.points-table tr:last-child td { border-bottom: none; }
.points-table .tx-date { font-family: var(--font-mono); color: var(--fg-2); white-space: nowrap; font-size: 12px; }
.points-table .tx-amount {
  text-align: right;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  white-space: nowrap;
}
.points-table .tx-amount.plus  { color: #0e9f5d; }
.points-table .tx-amount.minus { color: var(--red); }
.points-table .tx-type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--bg-3);
  color: var(--fg-2);
  font-weight: 600;
  display: inline-block;
}
.points-table .tx-type.earned { background: rgba(14,159,93,0.10); color: #0e9f5d; }
.points-table .tx-type.redeemed { background: rgba(227,6,19,0.10); color: var(--red); }
.points-table .tx-type.bonus, .points-table .tx-type.reward, .points-table .tx-type.review { background: rgba(217,144,0,0.12); color: #b8741a; }

/* ===== B2B card ===== */
.b2b-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: var(--r-md);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.b2b-card .b2b-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(37,99,235,0.10);
  color: var(--info);
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-weight: 700;
}

/* ===== Misc helpers ===== */
.acc-hint {
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 12px;
  text-align: center;
}

@media (max-width: 600px) {
  .acc-section { padding: 18px; }
  .acc-side { padding: 18px; position: static; }
}
