/* ============================================================
   Cipher Docs — Brand CSS
   Brand: Background #05080D  Surface #0B1422  Raised #101D30
   Primary #2F76E8  Cyan #21C5F6  Border #355E9E
   Text #F5F7FB  Secondary #8799B8
   Success #34C98F  Warning #F2B84B  Danger #E85767
   ============================================================ */

:root {
  --bg:        #05080D;
  --surface:   #0B1422;
  --raised:    #101D30;
  --primary:   #2F76E8;
  --cyan:      #21C5F6;
  --border:    #355E9E;
  --text:      #F5F7FB;
  --secondary: #8799B8;
  --success:   #34C98F;
  --warning:   #F2B84B;
  --danger:    #E85767;
  --radius:    10px;
  --radius-lg: 18px;
  --shadow:    0 4px 24px rgba(0,0,0,0.45);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* Layout helpers */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, box-shadow .15s, transform .1s;
  border: none;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 12px rgba(47,118,232,.35);
}
.btn--primary:hover { box-shadow: 0 4px 20px rgba(47,118,232,.5); }

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn--outline:hover { border-color: var(--primary); color: var(--cyan); }

.btn--sm { padding: .45rem 1rem; font-size: .85rem; }
.btn--lg { padding: .8rem 2rem; font-size: 1.05rem; }
.btn--full { width: 100%; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,20,34,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: .75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .02em;
  flex-shrink: 0;
}
.nav__logo {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: cover;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-left: auto;
}
.nav__link {
  color: var(--secondary);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s;
  text-decoration: none;
}
.nav__link:hover { color: var(--text); text-decoration: none; }

/* Hamburger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .25rem;
  margin-left: auto;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: .2s;
}

/* Hero */
.hero {
  padding: 5rem 1.25rem 4rem;
  text-align: center;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(47,118,232,.18) 0%, transparent 70%);
}
.hero--sm { padding: 3rem 1.25rem 2rem; }

.hero__inner { max-width: 680px; margin: 0 auto; }

.hero__logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 40px rgba(33,197,246,.25);
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 30%, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .4rem;
}

.hero__tagline {
  font-size: 1.15rem;
  color: var(--secondary);
  font-weight: 500;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}

.hero__sub {
  font-size: 1.05rem;
  color: var(--secondary);
  margin-bottom: 2rem;
}

.hero__cta {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hero__tg-link {
  display: inline-block;
  font-size: .875rem;
  color: var(--secondary);
  transition: color .15s;
}
.hero__tg-link:hover { color: var(--cyan); }

/* Sections */
.section { padding: 4rem 1.25rem; }
.section--alt { background: var(--surface); }
.section__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: .75rem;
}
.section__sub {
  text-align: center;
  color: var(--secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 28px rgba(47,118,232,.18);
  transform: translateY(-3px);
}
.card__icon { font-size: 2rem; margin-bottom: 1rem; }
.card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.card__body { color: var(--secondary); font-size: .95rem; line-height: 1.6; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.step { text-align: center; }
.step__num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 2px 12px rgba(47,118,232,.4);
}
.step__title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.step__body { color: var(--secondary); font-size: .9rem; }

/* Feature list (features page) */
.feature-list { display: flex; flex-direction: column; gap: 2rem; max-width: 780px; margin: 0 auto; }
.feature-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.feature-item__icon { font-size: 2rem; flex-shrink: 0; }
.feature-item__body h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.feature-item__body p { color: var(--secondary); font-size: .95rem; }

/* Auth pages */
.auth-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px - 60px);
  padding: 2rem 1.25rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.auth-card__logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  margin: 0 auto 1.25rem;
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: .25rem;
}

.auth-card__sub {
  text-align: center;
  color: var(--secondary);
  margin-bottom: 1.75rem;
  font-size: .9rem;
}

.auth-card__footer {
  text-align: center;
  color: var(--secondary);
  font-size: .875rem;
  margin-top: 1.25rem;
}

/* Forms */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form__group { display: flex; flex-direction: column; gap: .4rem; }
.form__label-row { display: flex; justify-content: space-between; align-items: center; }
.form__label { font-size: .875rem; font-weight: 600; color: var(--secondary); }

.form__input {
  background: var(--raised);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .95rem;
  padding: .6rem .9rem;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,118,232,.2);
}
.form__input::placeholder { color: var(--secondary); }

.form__link { font-size: .85rem; color: var(--cyan); }
.form__link:hover { text-decoration: underline; }

/* Alerts */
.alert {
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .9rem;
  margin-bottom: .5rem;
  border: 1px solid transparent;
}
.alert--error {
  background: rgba(232,87,103,.12);
  border-color: var(--danger);
  color: #f9a0aa;
}
.alert--success {
  background: rgba(52,201,143,.12);
  border-color: var(--success);
  color: #7cdfc2;
}
.alert__list { padding-left: 1.1rem; list-style: disc; }
.alert__list li + li { margin-top: .3rem; }

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem;
}
.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
}
.footer__copy { color: var(--secondary); font-size: .85rem; }
.footer__links { display: flex; gap: 1.25rem; }
.footer__links a { color: var(--secondary); font-size: .85rem; transition: color .15s; }
.footer__links a:hover { color: var(--text); text-decoration: none; }

/* Responsive */
@media (max-width: 640px) {
  .nav__burger { display: flex; }

  .nav__links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    gap: .75rem;
    z-index: 99;
  }
  .nav__links--open { display: flex; }

  .nav__link { padding: .5rem 0; border-bottom: 1px solid var(--border); }
  .btn--sm { width: 100%; justify-content: center; }
  .auth-card { padding: 1.75rem 1.25rem; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ── Auth card icon ──────────────────────────────────────────────────────── */
.auth-card__icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
}

/* ── Recovery codes grid ─────────────────────────────────────────────────── */
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
  margin: 1.25rem 0;
}

.code-pill {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem .75rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--cyan);
  text-align: center;
  user-select: all;
}

/* ── Dashboard welcome banner ────────────────────────────────────────────── */
.dash-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.dash-welcome__title { font-size: 1.35rem; font-weight: 700; margin-bottom: .2rem; }
.dash-welcome__email { color: var(--secondary); font-size: .9rem; }

/* ── Dashboard cards grid ────────────────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.dash-card {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem;
  transition: border-color .2s, box-shadow .2s;
}
.dash-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(47,118,232,.15);
}
.dash-card__icon { font-size: 1.75rem; margin-bottom: .75rem; }
.dash-card__label {
  font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--secondary); margin-bottom: .35rem;
}
.dash-card__value { font-size: 1.1rem; font-weight: 700; }
.dash-card__value--muted { color: var(--secondary); font-weight: 500; }
.dash-card__value--ok    { color: var(--success); }
.dash-card__hint { color: var(--secondary); font-size: .8rem; margin-top: .35rem; line-height: 1.4; }

/* ── Dashboard info block ────────────────────────────────────────────────── */
.dash-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.dash-info__row { display: flex; align-items: center; gap: 1rem; font-size: .9rem; flex-wrap: wrap; }
.dash-info__key { color: var(--secondary); font-weight: 600; min-width: 120px; flex-shrink: 0; }
.dash-info__val { color: var(--text); }
.dash-info__val--ok { color: var(--success); font-weight: 600; }

@media (max-width: 480px) {
  .code-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}

/* ── W4 Dashboard additions ───────────────────────────────────────────────── */

/* Badges */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-pending  { background: rgba(242,184,75,.15);  color: var(--warning); border: 1px solid rgba(242,184,75,.3); }
.badge-delivered{ background: rgba(52,201,143,.15);  color: var(--success); border: 1px solid rgba(52,201,143,.3); }
.badge-failed   { background: rgba(232,87,103,.15);  color: var(--danger);  border: 1px solid rgba(232,87,103,.3); }
.badge-waiting  { background: rgba(242,184,75,.15);  color: var(--warning); border: 1px solid rgba(242,184,75,.3); }
.badge-credited { background: rgba(52,201,143,.15);  color: var(--success); border: 1px solid rgba(52,201,143,.3); }
.badge-rejected { background: rgba(232,87,103,.15);  color: var(--danger);  border: 1px solid rgba(232,87,103,.3); }

/* Responsive data table */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 520px;
}
.data-table th {
  text-align: left;
  padding: .6rem .9rem;
  color: var(--secondary);
  font-size: .775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: .7rem .9rem;
  border-bottom: 1px solid rgba(53,94,158,.25);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(47,118,232,.05); }

/* Balance card */
.balance-card {
  background: linear-gradient(135deg,rgba(47,118,232,.15) 0%,rgba(33,197,246,.07) 100%);
  border: 1px solid rgba(47,118,232,.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.balance-card__label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--secondary);
  margin-bottom: .3rem;
}
.balance-card__amount {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--cyan);
}

/* Dashboard section block */
.dash-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
}
.dash-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.dash-section__title { font-size: .95rem; font-weight: 700; }
.dash-section__link  { font-size: .85rem; color: var(--cyan); }
.dash-section__body  { padding: 0; }

/* Balance display (full page) */
.balance-amount {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--cyan);
}

/* Transaction colour classes */
.tx-credit { color: var(--success); font-weight: 700; }
.tx-debit  { color: var(--danger);  font-weight: 700; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2.75rem 1.5rem;
  color: var(--secondary);
}
.empty-state__icon { font-size: 2.25rem; margin-bottom: .6rem; }
.empty-state__text { font-size: 1rem; margin-bottom: .35rem; color: var(--text); }
.empty-state__hint { font-size: .875rem; }

@media (max-width: 560px) {
  .balance-card { flex-direction: column; align-items: flex-start; }
  .balance-card__amount { font-size: 1.75rem; }
}
﻿
/* ============================================================
   W5 Shop additions
   ============================================================ */

/* Alert */
.alert {
  padding: .9rem 1.2rem;
  border-radius: var(--radius);
  font-size: .9rem;
  border: 1px solid transparent;
}
.alert--danger {
  background: rgba(232,87,103,.1);
  border-color: var(--danger);
  color: var(--danger);
}

/* Region card grid */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.region-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  transition: border-color .18s, box-shadow .18s;
}
.region-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(47,118,232,.18);
}

.region-card__flag {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

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

.region-card__name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.region-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.region-card__action {
  flex-shrink: 0;
}

/* Stock badge */
.stock-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.stock-badge--ok {
  background: rgba(52,201,143,.15);
  color: var(--success);
  border: 1px solid rgba(52,201,143,.3);
}
.stock-badge--empty {
  background: rgba(232,87,103,.12);
  color: var(--danger);
  border: 1px solid rgba(232,87,103,.3);
}
.stock-badge--tbd {
  background: rgba(242,184,75,.12);
  color: var(--warning);
  border: 1px solid rgba(242,184,75,.3);
}

/* Tier table */
.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  min-width: 480px;
}
.tier-table th {
  text-align: left;
  padding: .6rem .9rem;
  color: var(--secondary);
  font-size: .775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tier-table td {
  padding: .75rem .9rem;
  border-bottom: 1px solid rgba(53,94,158,.2);
  vertical-align: middle;
}
.tier-table tr:last-child td { border-bottom: none; }
.tier-table tr:hover td { background: rgba(47,118,232,.04); }

/* Buy button */
.btn-buy {
  background: var(--success);
  color: #fff;
  border: none;
  box-shadow: 0 2px 10px rgba(52,201,143,.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem 1.1rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-buy:hover { opacity: .88; transform: translateY(-1px); }
.btn-buy:active { transform: translateY(0); }

/* Success banner */
.success-banner {
  background: linear-gradient(135deg, rgba(52,201,143,.15) 0%, rgba(33,197,246,.07) 100%);
  border: 1px solid rgba(52,201,143,.4);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}

/* Badge variants for orders page */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
}
.badge-delivered {
  background: rgba(52,201,143,.15);
  color: var(--success);
}
.badge-failed {
  background: rgba(232,87,103,.12);
  color: var(--danger);
}
.badge-pending {
  background: rgba(242,184,75,.12);
  color: var(--warning);
}

@media (max-width: 560px) {
  .shop-grid { grid-template-columns: 1fr; }
  .region-card { flex-wrap: wrap; }
  .region-card__action { width: 100%; }
  .region-card__action .btn { width: 100%; text-align: center; }
}


/* ---- W6 Support ---------------------------------------------------------- */

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

.msg-bubble {
  max-width: 72%;
  padding: .75rem 1rem;
  border-radius: 12px;
  line-height: 1.55;
  font-size: .92rem;
  word-break: break-word;
}

.msg-user {
  align-self: flex-end;
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.msg-support {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 3px;
}

.msg-meta {
  font-size: .72rem;
  opacity: .72;
  margin-bottom: .3rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.msg-user .msg-meta  { color: rgba(255,255,255,.85); }
.msg-support .msg-meta { color: var(--secondary); }

.msg-content { white-space: pre-wrap; }

.ticket-closed-banner {
  background: rgba(120,120,140,.12);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1.25rem;
  color: var(--secondary);
  font-size: .92rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

.support-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .95rem;
  font-family: inherit;
  line-height: 1.55;
  padding: .75rem 1rem;
  resize: vertical;
  transition: border-color .15s;
  outline: none;
}
.support-textarea:focus {
  border-color: var(--primary);
}

@media (max-width: 560px) {
  .msg-bubble { max-width: 90%; }
}


/* ---- W7 Admin Panel ------------------------------------------------------ */

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 120px);
  gap: 0;
}

.admin-sidebar {
  background: var(--raised);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.admin-sidebar__badge {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  padding: 0 .5rem;
  margin-bottom: 1rem;
}

.admin-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.admin-nav-link {
  display: block;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  color: var(--secondary);
  font-size: .92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s, color .12s;
}
.admin-nav-link:hover {
  background: rgba(47,118,232,.1);
  color: var(--text);
  text-decoration: none;
}
.admin-nav-link--active {
  background: rgba(47,118,232,.18);
  color: var(--primary);
}

.admin-content {
  padding: 2rem 2.5rem;
  min-width: 0;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1.75rem;
}

.admin-page-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
}

.admin-page-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.admin-section {
  margin-top: 2rem;
}

.admin-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.admin-quick-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* Stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.stat-card--primary { border-color: var(--primary); }
.stat-card--warn    { border-color: var(--warning); }

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: .35rem;
}

.stat-label {
  font-size: .82rem;
  color: var(--secondary);
  font-weight: 500;
  letter-spacing: .02em;
}

/* Admin table */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.admin-table th {
  background: var(--raised);
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .75rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(53,94,158,.18);
  vertical-align: middle;
  color: var(--text);
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(47,118,232,.05); }

/* Flash messages */
.flash {
  padding: .8rem 1.25rem;
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.flash-success {
  background: rgba(52,201,143,.12);
  border: 1px solid rgba(52,201,143,.35);
  color: var(--success);
}

.flash-error {
  background: rgba(232,87,103,.12);
  border: 1px solid rgba(232,87,103,.35);
  color: var(--danger);
}

@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    padding: .75rem 1rem;
    gap: .35rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .admin-sidebar__badge { display: none; }
  .admin-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .35rem;
  }
  .admin-content {
    padding: 1.25rem 1rem;
  }
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── W8: Smart Inventory Import ─────────────────────────────────────── */

/* Drag-and-drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  user-select: none;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: rgba(47,118,232,.06);
}

.drop-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: .75rem;
}

.drop-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .3rem;
}

.drop-sub {
  font-size: .85rem;
  color: var(--secondary);
  margin: .3rem 0 .75rem;
}

.drop-limit {
  font-size: .78rem;
  color: var(--secondary);
  margin: .75rem 0 0;
}

/* Progress panel */
.import-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
}

.progress-bar-track {
  background: var(--raised);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-bottom: .6rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .4s ease;
}

.progress-msg {
  font-size: .85rem;
  color: var(--secondary);
  min-height: 1.2em;
  margin: 0;
}

/* Import counters row */
.import-counters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1rem;
}

.counter-item {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .35rem .75rem;
  font-size: .82rem;
  color: var(--text);
  font-weight: 500;
}

/* Import history section */
.import-history {
  max-width: 720px;
}
