:root {
  /* Force a single light theme on every device, ignoring the OS dark/light
     preference and mobile "auto dark" engines. */
  color-scheme: light only;
  --loko-green: #16543d;
  --loko-green-deep: #12392b;
  --loko-green-soft: #e8f1ec;
  --loko-red: #dc0d15;
  --loko-red-soft: #fff0f2;
  --loko-cream: #f3f3f1;
  --loko-sun: #fff7df;
  --loko-card: #ffffff;
  --loko-line: #d8dfd8;
  --loko-text: #18211d;
  --loko-muted: #64706b;
  --loko-shadow: 0 10px 26px rgba(18, 57, 43, 0.12);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

/* Скролл живёт внутри .app-scroll, поэтому само окно не прокручиваем —
   иначе появилась бы вторая полоса прокрутки поверх фиксированной рамки. */
body {
  overflow: hidden;
}

body {
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--loko-text);
  background:
    radial-gradient(circle at top right, rgba(220, 13, 21, 0.09), transparent 24%),
    radial-gradient(circle at top left, rgba(22, 84, 61, 0.12), transparent 20%),
    linear-gradient(180deg, #edf3ef 0%, #f7f7f5 18%, #f2f2ef 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

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

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;       /* запасной вариант для старых браузеров */
  height: 100dvh;      /* динамическая высота — учитывает панель iOS Safari */
  /* Точная видимая высота из JS (window.innerHeight). В standalone-PWA и
     встроенных браузерах Android 100dvh нередко считается ВЫШЕ реально видимой
     области, и нижнее меню «сползает» под системную панель — labels обрезаются.
     --app-height фиксирует оболочку по фактической высоте; при отключённом JS
     остаётся запасной 100dvh. */
  height: var(--app-height, 100dvh);
  overflow: hidden;
}

/* Прокручивается только контент; нижнее меню вынесено наружу .app-shell-флекса,
   поэтому всегда остаётся внизу экрана и не требует position:fixed (который
   прячется за динамической панелью iOS Safari и во встроенных браузерах). */
.app-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(22, 84, 61, 0.98);
  color: #fff;
  box-shadow: 0 12px 24px rgba(14, 45, 34, 0.18);
}

/* В кабинете участника/гостя (body.is-guest) верхняя плашка «ЛокоЛето 2026»
   НЕ должна следовать за экраном — она прокручивается вместе с контентом.
   Нижнее меню при этом остаётся жёстко зафиксированным (.mobile-nav: fixed). */
.is-guest .topbar {
  position: static;
}

.topbar__inner,
.desktop-nav,
.shell {
  width: min(calc(100% - 24px), var(--content));
  margin: 0 auto;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__logo {
  flex: 0 0 auto;
  width: 104px;
  height: 52px;
  background: #fff url('/static/icons/logo-lokoleto.svg') center / 86% auto no-repeat;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.topbar__center {
  display: none;
}

.topbar__center-caption {
  font-size: 11px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  font-weight: 700;
}

.topbar__center-name {
  font-size: 15px;
  line-height: 1.2;
  color: #fff;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand__copy strong {
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.brand__copy small {
  opacity: 0.88;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar__side {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__meta {
  display: none;
  text-align: right;
}

.topbar__meta span,
.topbar__meta small {
  display: block;
}

.topbar__meta span {
  font-size: 13px;
  font-weight: 700;
}

.topbar__meta small {
  font-size: 11px;
  opacity: 0.76;
}

.header-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 700;
}

.desktop-nav {
  display: none;
}

.shell {
  padding: 18px 0 24px;
}

.hero,
.profile-hero,
.grid,
.single-column,
.hero__stats,
.profile-grid,
.info-grid {
  display: grid;
  gap: 14px;
  /* Явная колонка minmax(0,1fr): иначе auto-колонка берёт max-content,
     и длинная строка растягивает карточку за край экрана. */
  grid-template-columns: minmax(0, 1fr);
}

.single-column {
  width: min(100%, 760px);
  margin: 0 auto;
}

.page-stack {
  display: grid;
  gap: 14px;
}

.card {
  background: var(--loko-card);
  border: 1px solid rgba(22, 84, 61, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--loko-shadow);
  padding: 18px;
}

.card--accent {
  background: linear-gradient(180deg, #ffffff 0%, #edf5f0 100%);
  border-color: rgba(22, 84, 61, 0.16);
}

.card--hero,
.hero__panel {
  position: relative;
  overflow: hidden;
}

.hero__panel {
  padding: 22px 20px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(150deg, rgba(22, 84, 61, 0.98) 0%, rgba(27, 97, 72, 0.95) 60%, rgba(220, 13, 21, 0.72) 150%),
    #16543d;
  color: #fff;
  box-shadow: var(--loko-shadow);
}

.hero__panel::after,
.card--hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -28% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero__lead,
.muted {
  color: var(--loko-muted);
}

.hero__panel .hero__lead {
  color: rgba(255, 255, 255, 0.88);
}

.eyebrow,
.card__label,
.info-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--loko-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero__panel .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 9vw, 46px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(22px, 5.8vw, 28px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

p {
  font-size: 15px;
  line-height: 1.45;
}

.card__value,
.metric {
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1;
  font-weight: 900;
  color: var(--loko-green-deep);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(18, 57, 43, 0.12);
}

.button--primary {
  background: var(--loko-red);
  color: #fff;
}

.button--ghost {
  background: #fff;
  color: var(--loko-green);
  border: 1px solid rgba(22, 84, 61, 0.12);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__actions .button {
  flex: 1 1 180px;
}

.form,
.demo-accounts {
  display: grid;
  gap: 14px;
}

.demo-accounts code {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  background: #f3f5f4;
  color: var(--loko-green-deep);
  font-size: 14px;
  font-weight: 700;
}

.form label {
  display: grid;
  gap: 8px;
}

.form input,
.form select,
.form textarea,
.form-inline input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--loko-line);
  border-radius: 16px;
  background: #fff;
  color: var(--loko-text);
}

.form textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

.form-inline {
  display: grid;
  gap: 10px;
}

.alert {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
}

.alert--error {
  background: var(--loko-red-soft);
  color: #9f2634;
}

.alert--success {
  background: var(--loko-green-soft);
  color: #215e40;
}

.section-head,
.list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.list__row {
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 14px 0;
  border-top: 1px solid rgba(22, 84, 61, 0.08);
}

/* Text column may shrink so action buttons never force horizontal overflow. */
.list__row > div:first-child {
  min-width: 0;
}

/* On phones, an action group inside a list row drops to its own full-width line. */
@media (max-width: 640px) {
  .list__row .hero__actions {
    flex: 1 1 100%;
  }
}

.list__row:first-child {
  padding-top: 0;
  border-top: 0;
}

.list__row p {
  margin-bottom: 0;
  font-size: 14px;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-top: 1px solid rgba(22, 84, 61, 0.08);
}

.check-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.check-row input {
  width: 20px;
  height: 20px;
  margin-top: 3px;
}

.check-row__copy {
  display: grid;
  gap: 4px;
}

.check-row__copy small {
  color: var(--loko-muted);
  font-size: 14px;
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f2f5f2;
  color: var(--loko-green-deep);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qr-card {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}

.qr-card img {
  width: min(100%, 260px);
  aspect-ratio: 1;
  border-radius: 18px;
  background: #fff;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(22, 84, 61, 0.08);
}

.scanner-frame {
  width: 100%;
  min-height: 320px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f6f8f6 0%, #eef2ee 100%);
  overflow: hidden;
}

.code-block {
  display: block;
  overflow-x: auto;
  padding: 14px;
  border-radius: 16px;
  background: #f3f5f4;
  color: var(--loko-green-deep);
}

.mobile-nav {
  flex: 0 0 auto;       /* всегда внизу .app-shell, не сжимается и не скроллится */
  margin: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 35;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 8px;
  /* Непрозрачный фон без backdrop-filter: размытие на position:fixed
     ломает композитинг во встроенных браузерах мессенджеров (Telegram/VK
     WebView, старый iOS Safari) — плашка пропадает/мигает при скролле.
     Сплошной фон гарантирует, что меню всегда отрисовано поверх контента. */
  background: #ffffff;
  border: 1px solid rgba(22, 84, 61, 0.08);
  border-radius: 24px;
  box-shadow: 0 -10px 30px rgba(15, 39, 31, 0.10), 0 4px 24px rgba(15,39,31,.08);
}

.mobile-nav__item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-height: 54px;
  padding: 7px 4px;
  border-radius: 18px;
  color: var(--loko-muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: background .18s ease, color .18s ease;
}

.mobile-nav__item.is-active {
  background: var(--loko-green-soft);
  color: var(--loko-green-deep);
}

.mobile-nav__icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.mobile-nav__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.desktop-nav__link.is-active {
  background: var(--loko-green);
  border-color: var(--loko-green);
  color: #fff;
}

table {
  font-size: 14px;
}

.table-wrap {
  overflow: auto;
  margin: 0 -4px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px;
  border-bottom: 1px solid #e7ece8;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--loko-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table code {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.4;
}

@media (min-width: 760px) {
  .topbar__meta {
    display: block;
  }

  .desktop-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 0 0;
  }

  .desktop-nav__link {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    /* Пилюли лежат на светлом фоне страницы (тёмная шапка выше и sticky) —
       белые полупрозрачные цвета делали меню невидимым на десктопе. */
    background: rgba(22, 84, 61, 0.08);
    border: 1px solid rgba(22, 84, 61, 0.14);
    color: var(--loko-green-deep);
    font-size: 14px;
    font-weight: 700;
  }

  .shell {
    padding-top: 22px;
    padding-bottom: 34px;
  }

  /* Нижнее меню оставляем и на десктопе (частая жалоба: «на компьютере нет
     меню» — у участников в кабинете другой навигации нет вовсе). На широком
     экране не растягиваем на всю ширину, а сжимаем в «док» по центру. */
  .mobile-nav {
    width: min(560px, calc(100% - 24px));
    margin-left: auto;
    margin-right: auto;
  }

  .hero,
  .profile-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.82fr);
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grid--scanner {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  }

  .profile-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-inline {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── Extended components (Blocks 1-2) ───────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn-primary { background: var(--loko-green); color: #fff; }
.btn-secondary { background: #f0f3f1; color: var(--loko-text); border: 1px solid var(--loko-line); }
.btn-danger { background: #dc0d15; color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.page-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.03em;
  margin: 0;
}

.card__head { padding: 20px 22px 0; }
.card__body { padding: 18px 22px 22px; }
.card__title { font-size: 20px; font-weight: 900; margin: 0 0 6px; letter-spacing: -.02em; }
.card__sub { color: var(--loko-muted); font-size: 13px; margin: 0; }
.mb-4 { margin-bottom: 20px !important; }
.mt-4 { margin-top: 20px !important; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-success { background: #d4edda; color: #1a5c30; }
.badge-muted { background: #e8eeeb; color: var(--loko-muted); }
.badge-danger { background: #fde8ea; color: #9a1a20; }
.badge-role { background: var(--loko-green-soft); color: var(--loko-green); }

.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.alert-success { background: #d4edda; color: #1a5c30; border: 1px solid #b7dfbe; }
.alert-danger { background: #fde8ea; color: #9a1a20; border: 1px solid #f4b8bb; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--loko-text); }
.form-control {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--loko-line);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: var(--loko-text);
  outline: none;
  transition: border-color .15s;
}
.form-control:focus { border-color: var(--loko-green); }
.form-hint { font-size: 12px; color: var(--loko-muted); margin: 4px 0 0; }
.form-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; cursor: pointer; }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--loko-line);
  font-size: 14px;
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--loko-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; flex: 0 0 auto; }
.info-value { font-weight: 700; text-align: right; }

.row-muted { opacity: .55; }

/* ── Mobile responsive helpers ───────────────────────────────────────────────── */

/* Two-column grid that stacks to single column on mobile */
.two-col-responsive {
  display: grid;
  gap: 18px;
}
@media (min-width: 680px) {
  .two-col-responsive {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
  .two-col-responsive--wide {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
}

/* Break long tokens/URLs in table cells */
.data-table td {
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 240px;
}

/* Truncate very long single-line tokens in lists */
.token-truncate {
  display: inline-block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* Scanner start button — large, mobile-friendly */
.scanner-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  border-radius: 18px;
  background: var(--loko-green);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  margin-bottom: 12px;
  transition: opacity .15s;
}
.scanner-start-btn:hover { opacity: .9; }
.scanner-start-btn:active { opacity: .75; }

/* Balance chip — prominent green background */
.balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--loko-green);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

/* Ensure memo and preview grids stack on mobile */
.memo-grid,
.preview-grid {
  display: grid;
  gap: 18px;
}
@media (min-width: 680px) {
  .memo-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: start;
  }
  .preview-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    align-items: start;
  }
}

/* Large touch target for form submit buttons */
.btn-touch {
  min-height: 52px;
  font-size: 16px;
}

/* Mobile: wallet balance banner */
.wallet-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--loko-green) 0%, var(--loko-green-deep) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}
.wallet-banner__amount {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}
.wallet-banner__label {
  font-size: 13px;
  opacity: .85;
  margin-top: 4px;
}

@media (max-width: 759px) {
  .topbar {
    background: transparent;
    box-shadow: none;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 0;
  }
  .topbar__inner {
    width: 100%;
    max-width: none;
    min-height: unset;
    padding: 10px 14px;
    border-radius: 22px;
    background: linear-gradient(180deg, #1c5b45 0%, #184d3b 100%);
    box-shadow: 0 18px 40px rgba(18, 54, 42, 0.22);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
  }
  .brand__copy { display: none; }
  .brand__logo { width: 84px; height: 40px; background-size: 86% auto; }
  .topbar__center {
    display: grid;
    gap: 3px;
    min-width: 0;
  }
  .topbar__side .topbar__meta { display: none; }
  .header-chip {
    min-height: 36px;
    padding: 0 12px;
    font-size: 12px;
  }
}

.mobile-nav__item--scan {
  min-height: 68px;
  border-radius: 22px;
  background: rgba(22, 84, 61, 0.10);
  color: var(--loko-green);
  transform: translateY(-8px);
}

.mobile-nav__item--scan .mobile-nav__icon svg {
  width: 24px;
  height: 24px;
}

.mobile-nav__item--scan.is-active {
  background: var(--loko-green);
  color: #fff;
  transform: translateY(-8px);
  box-shadow: 0 14px 24px rgba(22, 84, 61, 0.28);
}

.hero--centered {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 64px);
}

.hero--centered .hero__panel {
  width: min(100%, 400px);
  text-align: center;
}

.hero__actions--column {
  flex-direction: column;
  align-items: stretch;
}

.hero__actions--column .button {
  flex: none;
  width: 100%;
}
.chip-icon { width:1em; height:1em; vertical-align:-.15em; display:inline-block; }

/* ── Admin data tables: stack into cards on mobile ──────────────────────────────
   Tables tagged `.data-table--cards` drop their header row on narrow screens and
   render each row as a labelled card (label from each cell's `data-label`).
   Keeps desktop as a real table; avoids cramped horizontal scrolling on phones. */
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.admin-toolbar .button,
.admin-toolbar .btn {
  flex: 0 1 auto;
}

@media (max-width: 640px) {
  .data-table--cards,
  .data-table--cards tbody,
  .data-table--cards tr,
  .data-table--cards td {
    display: block;
    width: 100%;
  }
  .data-table--cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .data-table--cards tr {
    margin-bottom: 12px;
    padding: 6px 14px;
    border: 1px solid rgba(22, 84, 61, 0.12);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 4px 14px rgba(18, 57, 43, 0.05);
  }
  .data-table--cards tr:last-child {
    margin-bottom: 0;
  }
  .data-table--cards td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    max-width: none;
    padding: 9px 0;
    border-bottom: 1px solid #eef2ef;
    text-align: right;
  }
  .data-table--cards td:last-child {
    border-bottom: 0;
  }
  .data-table--cards td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 auto;
    max-width: 45%;
    color: var(--loko-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: left;
  }
  /* Full-width cells: action buttons and "nothing found" messages */
  .data-table--cards td[data-full] {
    justify-content: stretch;
    text-align: left;
  }
  .data-table--cards td[data-full] .button,
  .data-table--cards td[data-full] .btn,
  .data-table--cards td[data-full] form {
    width: 100%;
  }
  .data-table--cards td[data-full] .button,
  .data-table--cards td[data-full] .btn {
    justify-content: center;
  }
}

/* ============================================================
   Portrait orientation.
   Installed PWA stays portrait via manifest "orientation":
   "portrait-primary". A regular browser tab can't lock the
   sensor, and the old landscape "rotate phone" overlay falsely
   triggered when the on-screen keyboard shrank the viewport
   height below its width — blocking input on phones. The layout
   is responsive in any orientation, so the overlay was removed.
   ============================================================ */
