/* -----------------------------------------------
   MARKETLY SUPPORT PORTAL — main.css
   Brand: #123A2A (ink) / #B8F341 (lime) / #FCFBF8 (cream)
----------------------------------------------- */

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

:root {
  --color-ink:          #123A2A;
  --color-ink-deep:     #082C20;
  --color-lime:         #B8F341;
  --color-lime-hover:   #A9E734;
  --color-page:         #FCFBF8;
  --color-surface:      #FFFFFF;
  --color-surface-soft: #F4F5EE;
  --color-surface-warm: #F7F3EA;
  --color-border:       #E6E7DF;
  --color-text:         #1D2420;
  --color-text-muted:   #657066;
  --color-text-soft:    #8A938B;
  --color-success:      #2D7D46;
  --color-error:        #E5563D;
  --color-warning:      #F0A12A;

  --font-heading:  'DM Sans', sans-serif;
  --font-body:     'DM Sans', sans-serif;
  --font-utility:  'IBM Plex Mono', monospace;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-md:   1.125rem;
  --text-lg:   1.25rem;
  --text-xl:   1.5rem;
  --text-2xl:  2rem;
  --text-3xl:  2.5rem;

  --radius-sm:  0.375rem;
  --radius:     0.75rem;
  --radius-lg:  1.25rem;
  --radius-xl:  1.75rem;
  --radius-pill: 9999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.12);

  --container:  1100px;
  --gutter:     1.5rem;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  background: var(--color-ink);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Container */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* -----------------------------------------------
   HEADER
----------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252,251,248,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--color-text);
}

.logo__name {
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.logo__tag {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Header brand group */
.header-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.header-brand__sep {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  font-weight: 400;
}

.header-brand__company {
  display: flex;
  align-items: center;
}

.header-brand__logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px 4px;
  box-shadow: 0 0 0 1px var(--color-border);
  opacity: 0.9;
  transition: opacity 150ms;
}
.header-brand__logo:hover { opacity: 1; }

/* Hero company badge */
.hero__company-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-pill);
  padding: 0.375rem 0.875rem 0.375rem 0.5rem;
  text-decoration: none;
  color: rgba(255,255,255,0.75);
  font-size: var(--text-xs);
  font-weight: 500;
  margin-bottom: 1rem;
  transition: background 150ms, border-color 150ms;
}
.hero__company-badge:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.hero__company-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
  padding: 2px 5px;
}

/* Footer company logo */
.footer-company-link {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer-company-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  padding: 3px 6px;
  opacity: 0.85;
  transition: opacity 150ms;
}
.footer-company-logo:hover { opacity: 1; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 150ms;
}
.nav-link:hover { color: var(--color-ink); }

/* -----------------------------------------------
   BUTTONS
----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 150ms, opacity 150ms, transform 100ms;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--color-ink);
  color: #fff;
}
.btn--primary:hover { background: var(--color-ink-deep); }

.btn--lime {
  background: var(--color-lime);
  color: var(--color-ink-deep);
}
.btn--lime:hover { background: var(--color-lime-hover); }

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-ink); background: var(--color-surface-soft); }

.btn--sm { padding: 0.5rem 1rem; font-size: var(--text-xs); border-radius: var(--radius-sm); }
.btn--lg { padding: 1rem 2rem; font-size: var(--text-md); }
.btn--full { width: 100%; }

/* -----------------------------------------------
   HERO SECTION
----------------------------------------------- */
.hero {
  background: var(--color-ink-deep);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__deco svg { width: 100%; height: 100%; }

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(184,243,65,0.12);
  color: var(--color-lime);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(184,243,65,0.2);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.hero__title span { color: var(--color-lime); }

.hero__subtitle {
  font-size: var(--text-md);
  color: rgba(255,255,255,0.65);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* -----------------------------------------------
   FEATURES GRID
----------------------------------------------- */
.features {
  padding: 4rem 0;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: 0.5rem;
  font-family: var(--font-utility);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 560px;
}

.features__header {
  text-align: center;
  margin-bottom: 3rem;
}
.features__header .section-desc { margin-inline: auto; }

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: box-shadow 200ms, transform 200ms;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.feature-card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-surface-soft);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
  margin-bottom: 1rem;
}

.feature-card__title {
  font-size: var(--text-md);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* -----------------------------------------------
   STATS BAR
----------------------------------------------- */
.stats-bar {
  background: var(--color-ink);
  padding: 2rem 0;
}

.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat__value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-lime);
  font-family: var(--font-utility);
}

.stat__label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  margin-top: 0.25rem;
}

/* -----------------------------------------------
   PAGE HEADER (inner pages)
----------------------------------------------- */
.page-header {
  background: var(--color-ink);
  padding: 3rem 0 2.5rem;
}

.page-header__eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-lime);
  font-family: var(--font-utility);
  margin-bottom: 0.75rem;
}

.page-header__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.page-header__desc {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
}

/* -----------------------------------------------
   PAGE BODY
----------------------------------------------- */
.page-body { padding: 3rem 0 5rem; }

.page-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 640px) 1fr;
  gap: 2rem;
}

.page-grid__main { grid-column: 2; }

/* -----------------------------------------------
   CARD
----------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.card + .card { margin-top: 1.5rem; }

.card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* -----------------------------------------------
   FORMS
----------------------------------------------- */
.form-group { margin-bottom: 1.25rem; }

label, .form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.375rem;
}

.form-required { color: var(--color-error); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
select,
textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: border-color 150ms, box-shadow 150ms;
  outline: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--color-ink);
  box-shadow: 0 0 0 3px rgba(18,58,42,0.08);
}

textarea { resize: vertical; min-height: 140px; }

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  margin-top: 0.375rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* File upload */
.file-upload {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  position: relative;
}
.file-upload:hover { border-color: var(--color-ink); background: var(--color-surface-soft); }
.file-upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.file-upload__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  pointer-events: none;
}
.file-upload__label strong { color: var(--color-ink); }
.file-upload__list { margin-top: 0.75rem; text-align: left; }
.file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding: 0.375rem 0;
  border-top: 1px solid var(--color-border);
}

/* -----------------------------------------------
   ALERTS / MESSAGES
----------------------------------------------- */
.alert {
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.alert--success { background: #E8F5EC; color: #1A5E30; border: 1px solid #A3D9B1; }
.alert--error   { background: #FDF0EE; color: #9B2318; border: 1px solid #F4B5AC; }
.alert--info    { background: #EBF3FF; color: #1A4888; border: 1px solid #A3C4F5; }
.alert--warning { background: #FEF8EE; color: #8A5A00; border: 1px solid #F5D98A; }

/* -----------------------------------------------
   BADGES
----------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: var(--font-utility);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge--open     { background: #EBF3FF; color: #1A4888; }
.badge--progress { background: #FEF8EE; color: #8A5A00; }
.badge--resolved { background: #E8F5EC; color: #1A5E30; }
.badge--closed   { background: var(--color-surface-soft); color: var(--color-text-muted); }
.badge--urgent   { background: #FDF0EE; color: #9B2318; }
.badge--high     { background: #FFF4E8; color: #8A4000; }
.badge--normal   { background: var(--color-surface-soft); color: var(--color-text-muted); }
.badge--low      { background: #F0F5F0; color: #4A6B4A; }

/* -----------------------------------------------
   TICKET LIST
----------------------------------------------- */
.ticket-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
  transition: box-shadow 150ms;
  text-decoration: none;
  color: inherit;
}
.ticket-card:hover { box-shadow: var(--shadow-md); }

.ticket-card__number {
  font-family: var(--font-utility);
  font-size: var(--text-xs);
  color: var(--color-text-soft);
}
.ticket-card__subject {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.ticket-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  margin-top: 0.25rem;
}
.ticket-card__badges { display: flex; gap: 0.375rem; flex-wrap: wrap; justify-content: flex-end; }

/* -----------------------------------------------
   TRACKING / TICKET DETAIL
----------------------------------------------- */
.ticket-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.info-item__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-utility);
  margin-bottom: 0.25rem;
}

.info-item__value {
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
}

.ticket-number-display {
  font-family: var(--font-utility);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-ink);
  letter-spacing: 0.04em;
}

/* Thread */
.thread { display: flex; flex-direction: column; gap: 1rem; }

.thread-message {
  border-radius: var(--radius);
  padding: 1.25rem;
}

.thread-message--customer {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
}

.thread-message--admin {
  background: var(--color-ink-deep);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
}

.thread-message__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  margin-bottom: 0.625rem;
  color: var(--color-text-muted);
}
.thread-message--admin .thread-message__meta { color: rgba(255,255,255,0.5); }

.thread-message__author {
  font-weight: 600;
  color: var(--color-text);
}
.thread-message--admin .thread-message__author { color: var(--color-lime); }

.thread-message__body { font-size: var(--text-sm); line-height: 1.7; }
.thread-message--admin .thread-message__body { color: rgba(255,255,255,0.85); }

/* -----------------------------------------------
   SEARCH & FILTER BAR (admin)
----------------------------------------------- */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.5rem;
}

.filter-bar input,
.filter-bar select {
  width: auto;
  min-width: 160px;
}

/* -----------------------------------------------
   SUPPORT SCOPE NOTICE
----------------------------------------------- */
.support-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.support-scope__col {
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.support-scope__col--yes {
  background: #E8F5EC;
  border: 1px solid #A3D9B1;
}

.support-scope__col--no {
  background: #FDF0EE;
  border: 1px solid #F4B5AC;
}

.support-scope__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.support-scope__col--yes .support-scope__title { color: #1A5E30; }
.support-scope__col--no  .support-scope__title { color: #9B2318; }

.support-scope__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

.support-scope__col--yes .support-scope__icon { background: #2D7D46; color: #fff; }
.support-scope__col--no  .support-scope__icon { background: #E5563D; color: #fff; }

.support-scope__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.support-scope__list li {
  font-size: var(--text-sm);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}

.support-scope__col--yes .support-scope__list li { color: #1A5E30; }
.support-scope__col--no  .support-scope__list li { color: #7A2015; }

.support-scope__list li::before {
  content: '–';
  position: absolute;
  left: 0;
  opacity: 0.5;
}

.support-scope__note {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--color-surface-soft);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-ink);
}

.support-scope__note a {
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
}
.support-scope__note a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .support-scope { grid-template-columns: 1fr; }
}

/* -----------------------------------------------
   FOOTER
----------------------------------------------- */
.site-footer {
  background: var(--color-ink-deep);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand__name {
  font-size: var(--text-md);
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-brand__tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.45);
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: center;
}
.footer-nav a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  transition: color 150ms;
}
.footer-nav a:hover { color: var(--color-lime); }

.footer-bottom {
  padding-top: 1.25rem;
  text-align: center;
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
  font-family: var(--font-utility);
}

/* -----------------------------------------------
   PAGINATION
----------------------------------------------- */
.pagination {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
  margin-top: 2rem;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  text-decoration: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.pagination a:hover { border-color: var(--color-ink); color: var(--color-ink); }
.pagination .active { background: var(--color-ink); color: #fff; border-color: var(--color-ink); }

/* -----------------------------------------------
   CUSTOMER REPLY FORM (track.php)
----------------------------------------------- */
.customer-reply-card { border-top: 3px solid var(--color-lime); }

.customer-reply-form textarea { min-height: 120px; }

/* -----------------------------------------------
   MOBILE NAV — HAMBURGER
----------------------------------------------- */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--color-text);
  transition: background 150ms, border-color 150ms;
  flex-shrink: 0;
  padding: 0;
}
.nav-toggle:hover {
  background: var(--color-surface-soft);
  border-color: var(--color-ink);
}

/* Icon state — use explicit class selectors, same specificity (0,1,0) each */
.nav-toggle-icon--open  { display: block; }
.nav-toggle-icon--close { display: none;  }

/* is-active class (set by JS on open) switches icons */
.nav-toggle.is-active .nav-toggle-icon--open  { display: none;  }
.nav-toggle.is-active .nav-toggle-icon--close { display: block; }

/* External-link icon in nav */
.nav-link .icon-external {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.2em;
  opacity: 0.55;
  transition: opacity 150ms;
}
.nav-link:hover .icon-external { opacity: 1; }

/* -----------------------------------------------
   RESPONSIVE — MOBILE FIRST
----------------------------------------------- */

/* ── 1100px: slightly tighter container ── */
@media (max-width: 1160px) {
  :root { --container: 960px; }
}

/* ── 900px: submit aside collapses ── handled in submit layout section ── */

/* ── 768px: core layout changes ── */
@media (max-width: 768px) {

  /* Show hamburger button */
  .nav-toggle { display: flex; }

  /*
   * Mobile nav overlay.
   * Keep display:flex always — hide via visibility/opacity/transform instead of
   * display:none so that transitions work and the display toggle bug is avoided.
   * z-index: 9999 breaks out of the sticky header's stacking context.
   */
  .site-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    position: fixed;
    top: 65px;   /* header height (64px) + 1px border */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;

    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 0.5rem var(--gutter) 2rem;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);

    /* Closed state */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 0ms 220ms;
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 220ms ease, transform 220ms ease, visibility 0ms 0ms;
  }

  .site-nav .nav-link {
    display: block;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--text-base);
    color: var(--color-text);
  }

  .site-nav .nav-link:last-of-type { border-bottom: none; }

  .site-nav .btn {
    margin-top: 1.25rem;
    width: 100%;
    justify-content: center;
  }

  /* Header brand: hide "by Shopiexpert" on small screens */
  .header-brand__sep { display: none; }
  .header-brand__company { display: none; }

  /* Hero */
  .hero { padding: 3rem 0 2.5rem; }
  .hero__title { font-size: var(--text-2xl); }
  .hero__subtitle { font-size: var(--text-base); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { text-align: center; justify-content: center; }

  /* Stats */
  .stats-bar__grid { grid-template-columns: repeat(3,1fr); gap: 1rem; }

  /* Features: 2-col */
  .features__grid { grid-template-columns: 1fr 1fr; }

  /* Page header */
  .page-header { padding: 2rem 0 1.5rem; }
  .page-header__title { font-size: var(--text-xl); }

  /* Page grid (track page) */
  .page-grid { grid-template-columns: 1fr; }
  .page-grid__main { grid-column: 1; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; }

  /* Ticket info grid */
  .ticket-info-grid { grid-template-columns: 1fr 1fr; }

  /* Thread messages */
  .thread-message { padding: 1rem; }

  /* Section title */
  .section-title { font-size: var(--text-xl); }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  .footer-nav {
    justify-content: center;
    gap: 0.875rem;
  }
}

/* ── 600px: single-column finish ── */
@media (max-width: 600px) {

  /* Scope notice: stack columns */
  .support-scope { grid-template-columns: 1fr; }

  /* Aside image card stats: hide on very small */
  .support-image-card__stats { grid-template-columns: repeat(3,1fr); }

  /* Ticket info: 1 col */
  .ticket-info-grid { grid-template-columns: 1fr; }

  /* Features: 1-col */
  .features__grid { grid-template-columns: 1fr; }

  /* Stats bar: 3 stays readable at 375+ but reduce font */
  .stat__value { font-size: var(--text-xl); }

  /* Card padding */
  .card { padding: 1.25rem; }

  /* Submit image card: shorter image */
  .support-image-card__img { max-height: 200px; object-position: 50% 15%; }
  .support-image-card__stats { display: none; }

  /* Thread message author smaller */
  .thread-message__meta { font-size: 0.75rem; }
}

/* ── 480px: tight phones ── */
@media (max-width: 480px) {
  :root { --gutter: 1rem; }

  .hero { padding: 2.5rem 0 2rem; }
  .hero__title { font-size: var(--text-xl); }
  .hero__label { font-size: 0.6875rem; }

  .page-header__title { font-size: var(--text-lg); }
  .page-body { padding: 1.5rem 0 3rem; }

  /* Stats: 3-col still works at 375, just reduce size */
  .stats-bar { padding: 1.5rem 0; }
  .stats-bar__grid { gap: 0.5rem; }
  .stat__value { font-size: var(--text-lg); }
  .stat__label { font-size: 0.6875rem; }

  .btn--lg { padding: 0.875rem 1.5rem; font-size: var(--text-base); }

  /* Footer */
  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
  }
  .footer-brand__tagline br { display: none; }

  /* Hours list */
  .hours-list li { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
}

/* -----------------------------------------------
   FORM OPTIONAL / REQUIRED LABELS
----------------------------------------------- */
.form-optional {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--color-text-soft);
  font-family: var(--font-utility);
  margin-left: 0.25rem;
}

/* -----------------------------------------------
   SUCCESS CARD
----------------------------------------------- */
/* -----------------------------------------------
   SUCCESS STATE — Animated
----------------------------------------------- */
.submit-success {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

/* Confetti burst origin */
.success-confetti {
  position: absolute;
  top: 108px;
  left: 50%;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2;
}

.confetti-piece {
  position: absolute;
  width: var(--size, 8px);
  height: var(--size, 8px);
  border-radius: var(--round, 3px);
  background: var(--color, #B8F341);
  opacity: 0;
  animation: confettiFly var(--dur, 1s) var(--delay, 0s) cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes confettiFly {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  70%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(var(--x, 0px), var(--y, 80px)) rotate(var(--rot, 360deg)) scale(0.5); }
}

/* Card */
.success-card {
  position: relative;
  z-index: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card, 14px);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.08);
  animation: successCardIn 550ms cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

@keyframes successCardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Dark header area */
.success-check-wrap {
  background: #082C20;
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.success-check-wrap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184,243,65,0.07) 0%, transparent 65%);
  pointer-events: none;
}

/* Pulse rings */
.success-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  width: 80px;
  height: 80px;
  pointer-events: none;
}

.success-rings span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(184,243,65,0.35);
  animation: ringPulse 2.4s ease-out 900ms infinite;
  opacity: 0;
}
.success-rings span:nth-child(2) { animation-delay: 1.2s; }
.success-rings span:nth-child(3) { animation-delay: 1.7s; }

@keyframes ringPulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* SVG checkmark */
.success-check-svg {
  position: relative;
  z-index: 1;
  width: 76px;
  height: 76px;
  filter: drop-shadow(0 0 18px rgba(184,243,65,0.28));
}

.success-check-svg__bg {
  fill: rgba(184,243,65,0.1);
}

.success-check-svg__circle {
  fill: none;
  stroke: #B8F341;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  transform-origin: 26px 26px;
  transform: rotate(-90deg);
  animation: drawCircle 650ms cubic-bezier(0.65, 0, 0.35, 1) 250ms forwards;
}

.success-check-svg__mark {
  fill: none;
  stroke: #B8F341;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 42;
  stroke-dashoffset: 42;
  animation: drawMark 380ms cubic-bezier(0.65, 0, 0.35, 1) 820ms forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}
@keyframes drawMark {
  to { stroke-dashoffset: 0; }
}

/* Title in dark area */
.success-heading {
  color: #fff;
  font-size: var(--text-xl);
  font-weight: 700;
  text-align: center;
  margin: 0;
  opacity: 0;
  animation: fadeUp 380ms ease-out 1050ms forwards;
}

.success-heading-sub {
  color: rgba(255,255,255,0.45);
  font-size: var(--text-sm);
  text-align: center;
  margin: 0;
  font-family: var(--font-utility);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: fadeUp 380ms ease-out 1150ms forwards;
}

/* Body */
.success-body {
  padding: 1.75rem 1.75rem 2rem;
}

.success-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin: 0 0 1.5rem;
  opacity: 0;
  animation: fadeUp 380ms ease-out 1250ms forwards;
}

/* Ticket box */
.success-ticket-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card, 12px);
  padding: 1rem 1.125rem;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: fadeUp 380ms ease-out 1350ms forwards;
}

.success-ticket-box__meta {
  min-width: 0;
}

.success-ticket-box__label {
  font-size: 0.6875rem;
  color: var(--color-text-soft);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-utility);
  margin: 0 0 3px;
}

.success-ticket-box__number {
  font-family: var(--font-utility);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-ink);
  margin: 0;
  letter-spacing: 0.04em;
}

/* Copy button */
.success-copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn, 8px);
  padding: 0.4rem 0.875rem;
  font-size: var(--text-xs);
  font-family: var(--font-utility);
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 150ms, color 150ms, background 150ms;
}

.success-copy-btn:hover {
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.success-copy-btn.is-copied {
  border-color: var(--color-success);
  color: var(--color-success);
  background: #E8F5EC;
}

/* CTA row */
.success-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 380ms ease-out 1450ms forwards;
}

.success-cta .btn {
  flex: 1;
  text-align: center;
  min-width: 140px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.label-sm {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  font-family: var(--font-utility);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* -----------------------------------------------
   SUBMIT PAGE — FORM ANIMATIONS
----------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.submit-form .form-group--animated {
  animation: fadeInUp 0.4s ease both;
}
.submit-form .form-group--animated:nth-child(1) { animation-delay: 0.05s; }
.submit-form .form-group--animated:nth-child(2) { animation-delay: 0.1s; }
.submit-form .form-group--animated:nth-child(3) { animation-delay: 0.15s; }
.submit-form .form-group--animated:nth-child(4) { animation-delay: 0.2s; }
.submit-form .form-group--animated:nth-child(5) { animation-delay: 0.25s; }
.submit-form .form-group--animated:nth-child(6) { animation-delay: 0.3s; }
.submit-form .form-group--animated:nth-child(7) { animation-delay: 0.35s; }

/* -----------------------------------------------
   SUBMIT PAGE — TWO-COLUMN LAYOUT
----------------------------------------------- */
.submit-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.submit-layout__aside {
  position: sticky;
  top: calc(var(--header-h, 64px) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Image card */
.support-image-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.support-image-card__img-wrap {
  position: relative;
  line-height: 0;
}

.support-image-card__img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
  max-height: 340px;
}

.support-image-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.support-image-card__title {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.4rem;
}

.support-image-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: 1rem;
}

/* Inline hours inside image card */
.support-hours-inline {
  border-top: 1px solid var(--color-border);
  padding-top: 0.875rem;
}

.support-hours-inline__label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.support-hours-inline__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.support-hours-inline__list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  padding: 0.4rem 0.625rem;
  background: var(--color-surface-soft);
  border-radius: var(--radius-sm, 6px);
}

.support-hours-inline__list li.is-off {
  color: var(--color-text-soft);
}

.support-hours-inline__list li span:last-child {
  font-family: var(--font-utility);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: 0.02em;
}

/* Documentation link card */
.docs-card {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
  text-decoration: none;
  transition: border-color 150ms, box-shadow 150ms, transform 150ms;
}

.docs-card:hover {
  border-color: var(--color-ink);
  box-shadow: 0 4px 16px rgba(18,58,42,0.1);
  transform: translateY(-1px);
}

.docs-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: #E8F5EC;
  border-radius: var(--radius-sm, 6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink);
}

.docs-card__body {
  flex: 1;
  min-width: 0;
}

.docs-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.docs-card__desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

.docs-card__arrow {
  flex-shrink: 0;
  color: var(--color-text-soft);
  transition: color 150ms, transform 150ms;
}

.docs-card:hover .docs-card__arrow {
  color: var(--color-ink);
  transform: translate(2px, -2px);
}

/* Track card */
.support-track-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
  padding: 1.25rem;
  text-align: center;
}

.support-track-card__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

/* Collapse aside below 900px */
@media (max-width: 900px) {
  .submit-layout {
    grid-template-columns: 1fr;
  }

  .submit-layout__aside {
    position: static;
    /* Show aside above the form on small screens for visual impact */
    order: -1;
  }

  .support-image-card__img {
    max-height: 220px;
    object-position: 50% 20%;
  }

  .support-image-card__stats {
    display: none;
  }
}

/* -----------------------------------------------
   TOAST NOTIFICATION SYSTEM
----------------------------------------------- */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 2.5rem));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1rem 1rem 1.125rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left-width: 3px;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  pointer-events: auto;
  animation: toastIn 300ms cubic-bezier(0.34,1.56,0.64,1) both;
}

.toast--success { border-left-color: var(--color-success); }
.toast--error   { border-left-color: var(--color-sale); }
.toast--info    { border-left-color: var(--color-ink); }

.toast.is-leaving {
  animation: toastOut 250ms ease forwards;
}

.toast__icon {
  flex-shrink: 0;
  margin-top: 1px;
  width: 18px;
  height: 18px;
}
.toast--success .toast__icon { color: var(--color-success); }
.toast--error   .toast__icon { color: var(--color-sale); }
.toast--info    .toast__icon { color: var(--color-ink); }

.toast__body { flex: 1; min-width: 0; }

.toast__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
}

.toast__msg {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 0.2rem;
  line-height: 1.4;
}

.toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: var(--color-text-soft);
  line-height: 1;
  border-radius: 4px;
  transition: color 120ms, background 120ms;
}
.toast__close:hover {
  color: var(--color-text);
  background: var(--color-surface-soft);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(calc(100% + 1.25rem)); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); max-height: 200px; margin-bottom: 0; }
  to   { opacity: 0; transform: translateX(40px); max-height: 0; margin-bottom: -0.625rem; padding-top: 0; padding-bottom: 0; }
}

/* -----------------------------------------------
   BUTTON LOADING STATE
----------------------------------------------- */
.btn.is-loading {
  pointer-events: none;
  opacity: 0.8;
  gap: 0.6rem;
}
.btn-spin {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btnSpin 650ms linear infinite;
  flex-shrink: 0;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }

/* -----------------------------------------------
   CHARACTER COUNTER
----------------------------------------------- */
.char-counter {
  font-size: var(--text-xs);
  color: var(--color-text-soft);
  text-align: right;
  margin-top: 0.375rem;
  font-family: var(--font-utility);
  transition: color 200ms;
}
.char-counter.is-short { color: var(--color-warning); }
.char-counter.is-ok    { color: var(--color-success); }
.char-counter.is-limit { color: var(--color-sale); }

/* -----------------------------------------------
   FIELD VALIDATION STATE
----------------------------------------------- */
.form-group .field-error {
  font-size: var(--text-xs);
  color: var(--color-sale);
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: var(--color-sale) !important;
  box-shadow: 0 0 0 3px rgba(229,86,61,0.1);
}
input.is-valid,
select.is-valid,
textarea.is-valid {
  border-color: var(--color-success);
}
