/* Timiro Forex Bureau — shared design system */
:root,
[data-theme="light"] {
  --brand-red: #e31c23;
  --brand-red-dark: #c4161c;
  --brand-red-soft: #fff0f0;
  --ink: #1a1a1a;
  --ink-muted: #5a5a5a;
  --ink-faint: #8a8a8a;
  --line: #e8e8e8;
  --surface: #ffffff;
  --surface-muted: #f7f7f8;
  --header-bg: rgba(255, 255, 255, 0.92);
  --accent-amber: #f5c842;
  --accent-blue: #5b8def;
  --accent-violet: #9b7ed9;
  --accent-orange: #f08a4b;
  --badge-service-bg: #eef4ff;
  --badge-service-fg: #3a6fd8;
  --qr-frame-bg: #ffffff;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 12px 40px rgba(26, 26, 26, 0.08);
  --shadow-sm: 0 4px 16px rgba(26, 26, 26, 0.06);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --max: 1100px;
  color-scheme: light;
}

[data-theme="dark"] {
  --brand-red: #ff3b42;
  --brand-red-dark: #e31c23;
  --brand-red-soft: #3a1517;
  --ink: #f2f2f3;
  --ink-muted: #b0b0b5;
  --ink-faint: #84848c;
  --line: #2e2e34;
  --surface: #121216;
  --surface-muted: #1c1c22;
  --header-bg: rgba(18, 18, 22, 0.92);
  --badge-service-bg: #1a2740;
  --badge-service-fg: #8eb6ff;
  --qr-frame-bg: #1c1c22;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

[data-theme="dark"] .wave-bg {
  opacity: 0.35;
  filter: invert(1) brightness(0.7);
}

[data-theme="dark"] .toast {
  background: #f2f2f3;
  color: #121216;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* —— Decorative motifs (from brand site) —— */
.dots {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(3, 8px);
  gap: 8px;
  pointer-events: none;
  z-index: 0;
}

.dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dots.amber span:nth-child(3n + 1) { background: var(--accent-amber); }
.dots.amber span:nth-child(3n + 2) { background: #f0d070; }
.dots.amber span:nth-child(3n) { background: #e8c050; }

.dots.multi span:nth-child(1),
.dots.multi span:nth-child(4),
.dots.multi span:nth-child(7) { background: var(--accent-orange); }
.dots.multi span:nth-child(2),
.dots.multi span:nth-child(5),
.dots.multi span:nth-child(8) { background: var(--accent-blue); }
.dots.multi span:nth-child(3),
.dots.multi span:nth-child(6),
.dots.multi span:nth-child(9) { background: var(--accent-violet); }

.blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.blob-amber {
  background: rgba(245, 200, 66, 0.35);
  width: 220px;
  height: 220px;
  filter: blur(2px);
}

.wave-bg {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='800' height='400' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 200 Q100 140 200 200 T400 200 T600 200 T800 200' fill='none' stroke='%23d0d8e8' stroke-width='1.5' opacity='0.5'/%3E%3Cpath d='M0 240 Q100 180 200 240 T400 240 T600 240 T800 240' fill='none' stroke='%23c8d0e0' stroke-width='1.2' opacity='0.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 70% auto;
  pointer-events: none;
  z-index: 0;
}

/* —— Logo —— */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--brand-red);
  color: #fff;
  padding: 8px 14px 8px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  line-height: 1.15;
  text-transform: uppercase;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-text {
  max-width: 140px;
}

/* —— Header / Nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.prefs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.prefs select {
  appearance: none;
  background: var(--surface-muted);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 28px 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a8a' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.prefs select:focus {
  outline: none;
  border-color: var(--brand-red);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: border-color 0.15s, background 0.15s;
}

.theme-toggle:hover {
  border-color: var(--brand-red);
  background: var(--brand-red-soft);
  color: var(--brand-red);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--brand-red);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

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

.btn-primary {
  background: var(--brand-red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-red-dark);
  box-shadow: 0 6px 20px rgba(227, 28, 35, 0.28);
}

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

.btn-ghost:hover {
  border-color: var(--ink-faint);
  background: var(--surface-muted);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn .arrow {
  font-size: 1.1em;
  line-height: 1;
}

/* —— Layout helpers —— */
.page {
  position: relative;
  min-height: calc(100vh - 70px);
  overflow: hidden;
}

.page-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.page-narrow {
  max-width: 480px;
  margin: 0 auto;
}

.page-mid {
  max-width: 640px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-red);
  margin-bottom: 12px;
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.lead {
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 36em;
}

.section-head {
  margin-bottom: 32px;
}

.section-head.center,
.center {
  text-align: center;
}

.section-head.center .lead {
  margin-inline: auto;
}

/* —— Cards —— */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
}

.card-accent {
  border-left: 4px solid var(--brand-red);
}

/* —— Forms —— */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 1rem;
  line-height: 1.4;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='%238a8a8a' d='M2.5 4.5L6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  cursor: pointer;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(227, 28, 35, 0.12);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-top: 4px;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--brand-red-soft);
  color: var(--brand-red);
  font-size: 0.88rem;
  font-weight: 600;
}

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

@media (max-width: 800px) {
  .nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .logo-text {
    display: none;
  }
}

/* —— Star rating —— */
.rating {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rating input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating label {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  transition: all 0.15s;
  font-size: 1.25rem;
  color: #d0d0d0;
}

.rating label:hover,
.rating label.is-active,
.rating label.is-hover {
  border-color: var(--brand-red);
  background: var(--brand-red-soft);
  color: var(--brand-red);
}

.rating-caption {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-top: 8px;
  min-height: 1.3em;
}

/* —— QR screen —— */
.qr-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 140px);
}

@media (max-width: 800px) {
  .qr-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .qr-layout .lead {
    margin-inline: auto;
  }

  .qr-actions {
    justify-content: center !important;
  }
}

.qr-panel {
  position: relative;
  display: flex;
  justify-content: center;
}

.qr-frame {
  position: relative;
  z-index: 1;
  background: var(--qr-frame-bg);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

[data-theme="dark"] .qr-frame img {
  filter: invert(1) hue-rotate(180deg);
}

.qr-frame img,
.qr-frame svg {
  width: min(260px, 70vw);
  height: auto;
  display: block;
  margin-inline: auto;
}

.qr-caption {
  text-align: center;
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.qr-invite {
  text-align: center;
  margin-top: 14px;
  display: grid;
  gap: 2px;
}

.qr-invite__sw {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.qr-invite__en {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-red);
  line-height: 1.25;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.link-box {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.link-box__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.link-box__url {
  color: var(--brand-red);
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-all;
}

.link-box__url:hover {
  text-decoration: underline;
}

.steps {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  padding-top: 2px;
}

/* —— Auth / centered panels —— */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 70px);
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}

.auth-card .logo {
  margin-bottom: 28px;
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.auth-card .lead {
  margin-bottom: 28px;
  font-size: 0.95rem;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.auth-footer a {
  color: var(--brand-red);
  font-weight: 600;
}

.password-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.password-row a {
  font-size: 0.8rem;
  color: var(--brand-red);
  font-weight: 600;
}

/* —— Feedback list —— */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}

.toolbar-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.date-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.date-filter label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.date-filter input[type="date"] {
  appearance: none;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  min-height: 38px;
}

.date-filter input[type="date"]:focus {
  outline: none;
  border-color: var(--brand-red);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* —— Branch QR grid (staff) —— */
.branch-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 8px;
}

@media (max-width: 800px) {
  .branch-qr-grid {
    grid-template-columns: 1fr;
  }
}

.branch-qr-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 560px) {
  .branch-qr-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.branch-qr-card__frame {
  background: var(--qr-frame-bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 14px;
}

.branch-qr-card__frame img {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin-inline: auto;
}

.branch-qr-card__frame .qr-invite {
  margin-top: 10px;
}

.branch-qr-card__frame .qr-invite__sw {
  font-size: 0.86rem;
}

.branch-qr-card__frame .qr-invite__en {
  font-size: 0.78rem;
}

.branch-qr-card__body {
  min-width: 0;
}

.branch-qr-card__body h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.branch-qr-card__url {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-muted);
  word-break: break-all;
  margin-bottom: 14px;
}

.branch-qr-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 560px) {
  .branch-qr-card__actions {
    justify-content: center;
  }
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover,
.chip.active {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background: var(--brand-red-soft);
}

.search {
  position: relative;
  min-width: 220px;
}

.search input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

@media (max-width: 640px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

.stat {
  background: var(--surface-muted);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  border: 1px solid var(--line);
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.stat-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feedback-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-red);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.feedback-item:hover {
  box-shadow: var(--shadow);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-red-soft);
  color: var(--brand-red);
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.feedback-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-bottom: 6px;
}

.feedback-meta strong {
  font-size: 0.95rem;
}

.stars-inline {
  color: var(--brand-red);
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.time {
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.feedback-body {
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.feedback-sender {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.feedback-sender[hidden] {
  display: none !important;
}

.feedback-sender__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.feedback-sender__list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 0.88rem;
}

.feedback-sender__list dt {
  color: var(--ink-muted);
  font-weight: 600;
}

.feedback-sender__list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  word-break: break-word;
}

.feedback-sender__phone {
  color: var(--brand-red);
  text-decoration: none;
}

.feedback-sender__phone:hover {
  text-decoration: underline;
}

.feedback-main {
  min-width: 0;
}

.feedback-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-translation {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-blue);
}

.feedback-translation__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.feedback-translation__text {
  color: var(--ink);
  font-size: 0.92rem;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-muted);
  color: var(--ink-muted);
  white-space: nowrap;
}

.badge-service {
  background: var(--badge-service-bg);
  color: var(--badge-service-fg);
}

.badge-lang {
  background: #f3f0ff;
  color: #6b5bb8;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

[data-theme="dark"] .badge-lang {
  background: #2a2440;
  color: #c4b5fd;
}

.badge-new {
  background: var(--brand-red-soft);
  color: var(--brand-red);
}

.section-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
}

.live-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.live-status[data-state="live"] {
  color: #1a7f4b;
  background: #e8f7ef;
  border-color: #b6e4c9;
}

.live-status[data-state="live"]::before {
  background: #22a35a;
  box-shadow: 0 0 0 3px rgba(34, 163, 90, 0.25);
}

.live-status[data-state="connecting"]::before {
  background: #e6a817;
  animation: live-pulse 1.2s ease-in-out infinite;
}

.live-status[data-state="offline"] {
  color: var(--brand-red);
  background: var(--brand-red-soft);
  border-color: transparent;
}

.live-status[data-state="offline"]::before {
  background: var(--brand-red);
}

[data-theme="dark"] .live-status[data-state="live"] {
  color: #7ddea8;
  background: #143224;
  border-color: #1f4d35;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 640px) {
  .feedback-item {
    grid-template-columns: auto 1fr;
  }

  .feedback-item .badge {
    grid-column: 2;
  }
}

/* —— Demo hub —— */
.hub {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 36px;
}

@media (max-width: 640px) {
  .hub-grid {
    grid-template-columns: 1fr;
  }
}

.hub-card {
  display: block;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(227, 28, 35, 0.35);
}

.hub-card .num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-red);
  margin-bottom: 10px;
}

.hub-card h2 {
  margin-bottom: 8px;
}

.hub-card p {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.hub-card .link {
  font-weight: 600;
  color: var(--brand-red);
  font-size: 0.9rem;
}

/* —— Success toast (feedback submit) —— */
.toast {
  display: none;
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 100;
  box-shadow: var(--shadow);
}

.toast.show {
  display: block;
  animation: rise 0.35s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-muted);
}

/* —— Footer strip —— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Staff PWA install prompt —— */
.pwa-install {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.pwa-install[hidden] {
  display: none !important;
}

.pwa-install__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}

.pwa-install__copy {
  flex: 1;
  min-width: 0;
}

.pwa-install__copy strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.3;
}

.pwa-install__copy p {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

.pwa-install__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.pwa-install__actions .btn {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.78rem;
}

@media (max-width: 480px) {
  .pwa-install {
    flex-wrap: wrap;
  }

  .pwa-install__actions {
    flex-direction: row;
    width: 100%;
  }

  .pwa-install__actions .btn {
    flex: 1;
  }
}
