/* ==========================================================================
   Storefront design system
   Shared by every user-facing page (index, cart, orders, account, tickets,
   login, register).  Tokens first, then primitives, then components.
   ========================================================================== */

/* --- tokens -------------------------------------------------------------- */
:root {
  --bg: #0d1117;
  --bg-soft: #10161f;
  --card: #161b22;
  --card-2: #1c232d;
  --border: #262d38;
  --border-soft: #1f2632;
  --hover: #222a35;

  --primary: #58a6ff;
  --primary-dark: #1f6feb;
  --primary-soft: rgba(88, 166, 255, 0.12);

  --text: #e6edf3;
  --muted: #8b949e;
  --faint: #6e7681;

  --success: #3fb950;
  --warning: #d29922;
  --danger: #f85149;
  --error: #f85149;
  --info: #58a6ff;
  --question: #bc8cff;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  --ring: 0 0 0 3px rgba(88, 166, 255, 0.25);

  --nav-h: 62px;
}

/* --- reset --------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at 12% -8%, rgba(88, 166, 255, 0.08), transparent 60%),
    radial-gradient(700px 400px at 92% 0%, rgba(188, 140, 255, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main, .app-main {
  flex: 1;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  color: #79bbff;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--primary-soft);
}

/* --- scrollbar ----------------------------------------------------------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #2b323d;
  border-radius: 8px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: #3a4452;
}

/* --- layout -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.15rem 4.5rem;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.page-header p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 0.85rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* --- navbar -------------------------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 800;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.15rem;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.nav-brand .brand-mark {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(140deg, var(--primary), var(--primary-dark));
  color: #08111e;
  font-weight: 800;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--hover);
  color: var(--text);
}

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

.nav-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  object-fit: cover;
  background: var(--card-2);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  color: var(--text);
  cursor: pointer;
}

.badge-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #08111e;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.75rem 1rem 1rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.85rem;
  }
}

/* --- surfaces ------------------------------------------------------------ */
.card {
  background: linear-gradient(160deg, var(--card), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.card-hover {
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
  transform: translateY(-3px);
  border-color: #33405a;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.6rem;
  margin-bottom: 1.6rem;
  background:
    radial-gradient(600px 240px at 15% 0%, rgba(88, 166, 255, 0.18), transparent 60%),
    linear-gradient(150deg, #151c26, #0f141c);
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  font-weight: 750;
  letter-spacing: -0.03em;
}

.hero p {
  color: var(--muted);
  margin-top: 0.55rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.05rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, transform 0.12s, opacity 0.18s;
}

.btn:hover {
  background: var(--hover);
  border-color: #33405a;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: transparent;
  color: #08111e;
}

.btn-primary:hover {
  filter: brightness(1.07);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  background: rgba(248, 81, 73, 0.12);
  border-color: rgba(248, 81, 73, 0.35);
  color: var(--danger);
}

.btn-success {
  background: rgba(63, 185, 80, 0.14);
  border-color: rgba(63, 185, 80, 0.35);
  color: var(--success);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 0.42rem 0.7rem;
  font-size: 0.82rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  flex: none;
}

/* --- forms --------------------------------------------------------------- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.85rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control::placeholder {
  color: var(--faint);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

textarea.form-control {
  resize: vertical;
  min-height: 96px;
}

.input-wrap {
  position: relative;
}

.input-wrap > i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 0.9rem;
  pointer-events: none;
}

.input-wrap .form-control {
  padding-left: 2.35rem;
}

.input-wrap .icon-btn {
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-wrap .icon-btn:hover {
  color: var(--text);
}

.input-wrap .form-control[type="password"],
.input-wrap .form-control[id="password"] {
  padding-right: 2.5rem;
}

/* Custom Checkbox */
input[type="checkbox"] {
  appearance: none;
  background-color: var(--bg-soft);
  margin: 0;
  font: inherit;
  color: currentColor;
  width: 1.4em;
  height: 1.4em;
  border: 1px solid var(--border);
  border-radius: 0.25em;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

input[type="checkbox"]::before {
  content: "";
  width: 0.75em;
  height: 0.75em;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--primary);
  background-color: var(--primary);
  transform-origin: center;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:checked {
  background-color: var(--primary-soft);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.error-msg {
  color: var(--danger);
  font-size: 0.85rem;
  min-height: 1.2rem;
}

.help-text {
  color: var(--faint);
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

/* search */
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
}

.search-box input {
  width: 100%;
  padding: 0.7rem 0.9rem 0.7rem 2.35rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

/* --- chips / badges ------------------------------------------------------ */
.chip-row {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.18s;
}

.chip:hover {
  color: var(--text);
  border-color: #33405a;
}

.chip.active {
  background: var(--primary-soft);
  border-color: rgba(88, 166, 255, 0.45);
  color: var(--primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-pending {
  background: rgba(210, 153, 34, 0.14);
  border-color: rgba(210, 153, 34, 0.35);
  color: var(--warning);
}

.badge-processing {
  background: rgba(88, 166, 255, 0.14);
  border-color: rgba(88, 166, 255, 0.35);
  color: var(--primary);
}

.badge-completed,
.badge-open {
  background: rgba(63, 185, 80, 0.14);
  border-color: rgba(63, 185, 80, 0.35);
  color: var(--success);
}

.badge-cancelled,
.badge-closed {
  background: rgba(248, 81, 73, 0.14);
  border-color: rgba(248, 81, 73, 0.35);
  color: var(--danger);
}

.badge-muted {
  background: var(--card-2);
  border-color: var(--border);
  color: var(--muted);
}

/* --- product grid -------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.05rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(165deg, var(--card), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: #33405a;
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0b1017;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.35s;
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.9rem;
  flex: 1;
}

.product-name {
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.35;
}

.product-cat {
  font-size: 0.75rem;
  color: var(--faint);
}

.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: auto;
}

.price-now {
  font-size: 1.12rem;
  font-weight: 750;
  color: var(--text);
}

.price-was {
  font-size: 0.85rem;
  color: var(--faint);
  text-decoration: line-through;
}

.price-off {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
  background: rgba(63, 185, 80, 0.14);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.product-actions {
  display: flex;
  gap: 0.45rem;
}

.pill-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(4px);
}

.pill-tag.soldout {
  color: var(--danger);
  border: 1px solid rgba(248, 81, 73, 0.4);
}

.pill-tag.deal {
  color: var(--success);
  border: 1px solid rgba(63, 185, 80, 0.4);
}

/* --- list rows ----------------------------------------------------------- */
.list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.list-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.05rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.18s, transform 0.18s;
}

.list-row.clickable {
  cursor: pointer;
}

.list-row.clickable:hover {
  border-color: #33405a;
  transform: translateY(-2px);
}

.list-main {
  flex: 1;
  min-width: 0;
}

.list-title {
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.thumb {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: var(--card-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- detail rows --------------------------------------------------------- */
.detail-grid {
  display: grid;
  gap: 0.15rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-soft);
}

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

.detail-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-value {
  font-weight: 560;
  text-align: right;
  word-break: break-word;
}

/* --- empty / loading ----------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.25rem;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state > i {
  font-size: 2.1rem;
  color: var(--faint);
  display: block;
  margin-bottom: 0.75rem;
}

.empty-state h2 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.05rem;
}

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--card) 30%, #1f2733 50%, var(--card) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.25s infinite linear;
}

.skeleton-card {
  height: 320px;
}

.skeleton-row {
  height: 78px;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -20% 0;
  }
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(230, 237, 243, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- modal --------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.15rem;
  background: rgba(5, 8, 12, 0.72);
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  display: flex;
  animation: fade 0.18s ease;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.4rem;
  background: linear-gradient(165deg, var(--card), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop 0.2s ease;
}

.modal-wide {
  max-width: 620px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.close-modal {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card-2);
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.close-modal:hover {
  color: var(--text);
  background: var(--hover);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

/* --- notice / toast ------------------------------------------------------ */
.notice {
  display: flex;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-2);
  font-size: 0.88rem;
}

.notice.info {
  border-color: rgba(88, 166, 255, 0.35);
  background: rgba(88, 166, 255, 0.08);
}

.notice.warn {
  border-color: rgba(210, 153, 34, 0.35);
  background: rgba(210, 153, 34, 0.08);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 150%);
  z-index: 1100;
  max-width: min(92vw, 420px);
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.28s, visibility 0.28s;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.toast.success {
  border-color: rgba(63, 185, 80, 0.45);
}

.toast.error {
  border-color: rgba(248, 81, 73, 0.45);
}

/* --- auth pages ---------------------------------------------------------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.15rem;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-brand .brand-name {
  font-size: 1.6rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.auth-brand .brand-sub {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.link-row {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 1rem;
}

/* --- footer -------------------------------------------------------------- */
#site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 2rem 1.15rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* --- utilities ----------------------------------------------------------- */
.row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.grow {
  flex: 1;
}

.muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.15rem;
  align-items: start;
}

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

/* ==========================================================================
   Password strength meter (register / account)
   ========================================================================== */
.password-strength {
  height: 6px;
  margin-top: 0.5rem;
  border-radius: 99px;
  background: var(--card-2);
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--danger);
  transition: width 0.25s ease, background-color 0.25s ease;
}

/* ==========================================================================
   Delivered reward block (orders)
   ========================================================================== */
.reward-box {
  padding: 0.75rem 0.875rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  word-break: break-word;
  white-space: pre-wrap;
}

/* ==========================================================================
   Profile header (account)
   ========================================================================== */
.profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.profile-avatar {
  position: relative;
  width: 84px;
  height: 84px;
  flex: none;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--card-2);
}

.edit-avatar-btn {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.edit-avatar-btn:hover {
  background: var(--hover);
  transform: scale(1.06);
}

.avatar-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 0.625rem;
}

.avatar-option {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--card-2);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.avatar-option:hover {
  transform: scale(1.06);
}

.avatar-option.selected {
  border-color: var(--primary);
  box-shadow: var(--ring);
}

.preview-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1rem;
  border: 2px solid var(--border);
  background: var(--card-2);
}

/* ==========================================================================
   Support chat (ticket-view)
   ========================================================================== */
.chat-window {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 58vh;
  overflow-y: auto;
  padding: 0.25rem;
}

.bubble {
  max-width: min(78%, 560px);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-2);
  font-size: 0.94rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble.from-user {
  align-self: flex-end;
  background: var(--primary-soft);
  border-color: rgba(88, 166, 255, 0.35);
}

.bubble.from-admin {
  align-self: flex-start;
}

.bubble-meta {
  margin-top: 0.375rem;
  font-size: 0.72rem;
  color: var(--faint);
}

.composer {
  display: flex;
  gap: 0.625rem;
  align-items: flex-end;
  margin-top: 1rem;
}

.composer textarea {
  flex: 1;
  min-height: 52px;
  max-height: 160px;
  resize: vertical;
}

/* Mobile responsive cart UI */
@media (max-width: 500px) {
  #cart-list .list-row {
    flex-wrap: wrap;
  }
  #cart-list .list-row > .row {
    width: 100%;
    justify-content: space-between;
    margin-top: 0.25rem;
  }
}


