@import url('/css/brand.css');

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/inter-var.woff2') format('woff2');
}

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

body {
  font-family: var(--font-sans);
  background:
    linear-gradient(180deg, rgba(255, 245, 223, 0.045), transparent 520px),
    linear-gradient(135deg, rgba(121, 228, 188, 0.06), transparent 34%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: var(--bottom-nav-h);
}

body.sheet-open {
  overflow: hidden;
}

.lang-switch {
  display: flex;
  gap: 6px;
}

.lang-btn {
  min-width: var(--touch);
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 245, 223, 0.06);
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}

.lang-btn.active {
  background: linear-gradient(135deg, var(--amber-2), #f39a41);
  color: var(--ink);
  border-color: rgba(255, 211, 109, 0.72);
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
}

.login-page .lang-switch {
  position: absolute;
  top: calc(12px + var(--safe-top));
  right: calc(12px + var(--safe-right));
}

body.login-page,
body:not(:has(.bottom-nav)) {
  padding-bottom: 0;
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + var(--safe-top)) calc(12px + var(--safe-right)) 8px calc(12px + var(--safe-left));
  background: rgba(8, 8, 6, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
}

.admin-header .brand-mark {
  margin-bottom: 0;
}

.admin-nav,
.nav-toggle,
.admin-header .lang-switch {
  display: none;
}

.header-account {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
  overflow: visible;
  z-index: 60;
}

.logout-form {
  margin: 0;
}

.logout-form--mobile {
  display: flex;
}

.account-menu {
  display: none;
  position: relative;
}

.account-menu > summary {
  list-style: none;
}

.account-menu > summary::-webkit-details-marker {
  display: none;
}

.account-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 240px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 245, 223, 0.06);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.account-menu-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-chevron {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.18s ease;
}

.account-menu[open] .account-menu-chevron {
  transform: rotate(180deg);
}

.account-menu-trigger:hover,
.account-menu-trigger:focus-visible {
  background: rgba(255, 245, 223, 0.1);
  border-color: var(--line-strong);
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 17, 14, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  z-index: 120;
}

.account-menu-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px 8px;
}

.account-menu-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--soft);
}

.account-menu-value {
  font-size: 14px;
  color: var(--muted);
  word-break: break-all;
}

.account-menu-logout {
  margin: 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: rgba(255, 245, 223, 0.08);
}

.account-menu-item--danger {
  color: var(--danger);
}

.account-menu-item-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 154, 120, 0.35);
  background: rgba(255, 154, 120, 0.12);
  color: var(--danger);
  cursor: pointer;
}

.btn-logout-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .account-menu {
    display: none !important;
  }
}

.admin-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 18px 24px;
}

.page-title {
  display: none;
}

.page-title--desktop {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1, .page-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 16px; }
h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; }
h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }

.card,
.panel {
  margin-bottom: 14px;
  border-radius: 20px;
  background: rgba(255, 245, 223, 0.035);
  overflow: hidden;
}

.card {
  padding: 16px 18px;
}

.panel-head {
  padding: 14px 18px 10px;
}

.panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--soft);
  letter-spacing: 0.01em;
}

.collect-stage {
  margin-bottom: 22px;
  padding: 8px 0 4px;
  text-align: center;
}

.collect-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 18px;
}

.collect-amount-wrap {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  max-width: 100%;
  margin-bottom: 8px;
}

.collect-amount-wrap::before {
  content: '';
  position: absolute;
  inset: -30px -40px -10px;
  background: radial-gradient(ellipse at center, rgba(242, 185, 76, 0.09), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.collect-currency {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--soft);
  position: relative;
  z-index: 1;
}

.collect-amount {
  width: min(220px, 52vw);
  border: none;
  background: transparent;
  color: var(--paper);
  font-size: clamp(3rem, 16vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  text-align: left;
  outline: none;
  position: relative;
  z-index: 1;
}

.collect-amount::placeholder {
  color: rgba(255, 245, 223, 0.18);
}

.collect-more {
  margin: 10px auto 18px;
  max-width: 280px;
  text-align: left;
}

.collect-more summary {
  list-style: none;
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 0 4px;
}

.collect-more summary::-webkit-details-marker { display: none; }

.collect-more-body {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.collect-more-body label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--soft);
}

.collect-more-body input,
.collect-more-body select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 245, 223, 0.05);
  color: var(--text);
  font-size: 16px;
  min-height: 46px;
}

.collect-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber-2), #e8a035);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(242, 185, 76, 0.22);
}

.insight-panel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  padding: 18px 8px;
}

.insight-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 12px;
}

.insight-divider {
  width: 1px;
  background: var(--line);
  margin: 4px 0;
}

.insight-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--soft);
}

.insight-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: -0.03em;
  margin: 6px 0 2px;
}

.insight-meta {
  font-size: 12px;
  color: var(--muted);
}

.panel-list {
  list-style: none;
}

.panel-list-item {
  border-top: 1px solid var(--line);
}

.panel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}

.panel-row:active {
  background: rgba(255, 245, 223, 0.05);
}

.panel-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(242, 185, 76, 0.1);
  color: var(--amber-2);
  flex-shrink: 0;
}

.panel-row-icon svg {
  width: 18px;
  height: 18px;
}

.panel-row-icon--link {
  background: rgba(121, 228, 188, 0.1);
  color: var(--mint);
}

.panel-row-body .panel-row-sub + .panel-row-sub {
  margin-top: 2px;
}

.panel-row-body {
  flex: 1;
  min-width: 0;
}

.panel-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}

.panel-row-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
  letter-spacing: -0.02em;
}

.panel-row-sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.panel-row-chevron {
  width: 16px;
  height: 16px;
  color: var(--soft);
  flex-shrink: 0;
  opacity: 0.7;
}

.panel-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--soft);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.status-pill--succeeded,
.status-pill--paid {
  color: var(--mint);
  background: rgba(121, 228, 188, 0.12);
}

.status-pill--active {
  color: var(--amber-2);
  background: rgba(242, 185, 76, 0.12);
}

.status-pill--created,
.status-pill--processing {
  color: var(--amber);
  background: rgba(242, 185, 76, 0.1);
}

.status-pill--voided,
.status-pill--expired,
.status-pill--canceled {
  color: var(--soft);
  background: rgba(255, 245, 223, 0.06);
}

.status-pill--refunded,
.status-pill--disputed {
  color: var(--danger);
  background: rgba(255, 154, 120, 0.12);
}

.quick-pay .amount-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.currency-prefix {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

.amount-input {
  font-size: clamp(2.5rem, 12vw, 3.25rem);
  font-weight: 700;
  border: none;
  border-bottom: 2px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
  width: 100%;
  padding: 8px 0 12px;
  min-height: var(--touch);
  outline: none;
  line-height: 1.1;
}

.amount-input:focus { border-color: var(--amber); }

.more-fields { margin-bottom: 12px; }
.more-fields summary {
  cursor: pointer;
  color: var(--amber);
  min-height: var(--touch);
  display: flex;
  align-items: center;
  font-weight: 600;
  list-style: none;
}
.more-fields summary::-webkit-details-marker { display: none; }

.more-fields label,
label {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.more-fields input,
.more-fields select,
label input,
label select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 245, 223, 0.04);
  color: var(--text);
  font-size: 16px;
  min-height: var(--touch);
}

.btn,
.btn-primary,
.btn-danger,
.btn-google,
.btn-text,
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(255, 245, 223, 0.06);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.btn-lg {
  min-height: 52px;
  width: 100%;
  font-size: 17px;
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-2), #f39a41);
  color: var(--ink);
  border-color: rgba(255, 211, 109, 0.72);
  box-shadow: 0 14px 32px rgba(242, 185, 76, 0.16);
}

.btn-danger {
  background: rgba(255, 154, 120, 0.18);
  color: var(--danger);
  border-color: rgba(255, 154, 120, 0.4);
}

.btn-google {
  background: rgba(255, 245, 223, 0.06);
  border-color: var(--line-strong);
  width: 100%;
}

.btn-text {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 14px;
  min-height: auto;
  padding: 0;
}

.btn-sm {
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

.sticky-action-bar {
  position: sticky;
  bottom: calc(var(--bottom-nav-h) + 8px);
  z-index: 12;
  margin-top: 16px;
  padding-top: 8px;
}

.sticky-action-bar--flush {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--bottom-nav-h);
  margin: 0;
  padding: 12px calc(16px + var(--safe-right)) 12px calc(16px + var(--safe-left));
  background: rgba(8, 8, 6, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 30;
}

.sticky-action-bar--flush .btn + .btn-row {
  margin-top: 8px;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn-row .btn {
  flex: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 245, 223, 0.035);
}

.stat-label { font-size: 12px; font-weight: 600; color: var(--soft); }
.stat-value { font-size: 1.35rem; font-weight: 700; margin: 6px 0 2px; color: var(--paper); }
.stat-sub { font-size: 12px; color: var(--muted); }

.record-list {
  list-style: none;
}

.record-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.record-item:active { background: rgba(255, 245, 223, 0.05); }

.record-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.record-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--paper);
}

.record-meta,
.record-sub {
  font-size: 13px;
  color: var(--muted);
}

.record-empty {
  text-align: center;
  color: var(--soft);
  padding: 28px 16px;
  border-top: 1px solid var(--line);
}

.badge,
.status-pill {
  text-transform: capitalize;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.badge-succeeded, .badge-paid { background: rgba(121, 228, 188, 0.16); color: var(--mint); }
.badge-active { background: rgba(242, 185, 76, 0.16); color: var(--amber-2); }
.badge-created, .badge-processing { background: rgba(242, 185, 76, 0.12); color: var(--amber); }
.badge-voided, .badge-expired, .badge-canceled { background: rgba(255, 245, 223, 0.08); color: var(--soft); }
.badge-refunded, .badge-disputed { background: rgba(255, 154, 120, 0.16); color: var(--danger); }

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.filters::-webkit-scrollbar,
.admin-main::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.json-block::-webkit-scrollbar {
  display: none;
}

.admin-main,
.table-wrap,
.json-block {
  scrollbar-width: none;
}

.filter-btn {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 8px 14px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.filter-btn.active {
  background: rgba(255, 245, 223, 0.1);
  color: var(--paper);
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.search-form input[type="search"] {
  width: 100%;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 245, 223, 0.04);
  color: var(--text);
  font-size: 16px;
  min-height: var(--touch);
}

.search-form .btn-row {
  display: flex;
  gap: 8px;
}

.search-form .btn-row .btn {
  flex: 1;
}

.qr-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - var(--bottom-nav-h) - 72px);
  padding-bottom: calc(120px + var(--bottom-nav-h));
}

.qr-scroll {
  flex: 1;
  text-align: center;
  padding: 8px 0 16px;
}

.qr-code {
  margin: 0 auto 16px;
  max-width: min(320px, 78vw);
  padding: 16px;
  background: #fff;
  border-radius: calc(var(--radius) + 4px);
}

.qr-code svg { width: 100%; height: auto; display: block; }

.qr-amount {
  font-size: clamp(2rem, 10vw, 2.5rem);
  font-weight: 700;
  color: var(--paper);
}

.qr-ref { color: var(--muted); margin-top: 8px; font-size: 15px; }

.qr-status {
  margin: 16px 0;
  color: var(--muted);
  font-size: 15px;
}

.qr-status.waiting::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

.qr-paid.hidden,
.hidden { display: none; }

.paid-check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(121, 228, 188, 0.16);
  color: var(--mint);
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px auto 16px;
  border: 1px solid rgba(121, 228, 188, 0.32);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 28px 20px;
  box-shadow: var(--shadow-soft);
}

.login-card .brand-mark { margin-bottom: 20px; }

.divider { text-align: center; color: var(--soft); margin: 20px 0; }

.alert {
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 15px;
}

.alert-error {
  background: rgba(255, 154, 120, 0.14);
  color: var(--danger);
  border: 1px solid rgba(255, 154, 120, 0.3);
}

.alert-success {
  background: rgba(120, 200, 140, 0.12);
  color: #8fd4a0;
  border: 1px solid rgba(120, 200, 140, 0.28);
}

.muted { color: var(--muted); font-size: 14px; }
.mono { font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; }

.detail-grid { display: grid; gap: 16px; margin-bottom: 16px; }

.detail-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  font-size: 15px;
}

.detail-list dt {
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
}

.detail-list dd { color: var(--text); margin-bottom: 4px; }

.timeline { list-style: none; font-size: 15px; }
.timeline li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.timeline a { color: var(--amber); text-decoration: none; }

.json-block {
  background: var(--ink);
  color: var(--muted);
  padding: 14px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid var(--line);
}

.inline-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.user-card {
  padding: 16px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  margin-bottom: 10px;
}

.user-card-email {
  font-weight: 700;
  margin-bottom: 8px;
  word-break: break-all;
}

.user-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.invite-result { margin-top: 12px; font-size: 14px; word-break: break-all; }
.invite-result.hidden { display: none; }

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 4px;
  padding: 8px calc(10px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(10px + var(--safe-left));
  background: rgba(8, 8, 6, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 4px;
  border: none;
  background: none;
  color: var(--soft);
  text-decoration: none;
  border-radius: 12px;
  transition: color 0.18s ease, background 0.18s ease;
}

.bottom-nav-item.active {
  color: var(--paper);
  background: rgba(255, 245, 223, 0.07);
}

.bottom-nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.bottom-nav-item.active .bottom-nav-icon-wrap {
  color: var(--amber-2);
}

.bottom-nav-icon {
  width: 22px;
  height: 22px;
}

.bottom-nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav-item.active .bottom-nav-label {
  color: var(--amber-2);
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(4, 3, 2, 0.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.action-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  transform: translateY(calc(100% + 12px));
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  padding: 0 calc(12px + var(--safe-right)) calc(8px + var(--safe-bottom)) calc(12px + var(--safe-left));
  overflow: hidden;
}

.action-sheet.is-open {
  transform: translateY(0);
}

.sheet-panel {
  background: linear-gradient(180deg, rgba(30, 27, 20, 0.98), rgba(20, 18, 14, 0.98));
  border: 1px solid var(--line-strong);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow);
  padding: 8px 14px 14px;
  overflow: hidden;
}

.sheet-grab {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 245, 223, 0.22);
  margin: 4px auto 14px;
}

.sheet-title {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
  margin-bottom: 14px;
}

.menu-group {
  background: rgba(255, 245, 223, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
}

.menu-group:last-child {
  margin-bottom: 0;
}

.menu-form {
  margin: 0;
}

.menu-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.menu-group > a:last-child.menu-cell,
.menu-group > .menu-form:last-child .menu-cell {
  border-bottom: none;
}

.menu-cell.is-active {
  color: var(--amber-2);
}

.menu-cell--static {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: default;
}

.menu-cell--account {
  gap: 6px;
}

.menu-cell--danger {
  justify-content: center;
  color: var(--danger);
  font-weight: 700;
}

.menu-cell-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--soft);
}

.menu-email {
  font-size: 14px;
  color: var(--muted);
  word-break: break-all;
}

.menu-chevron {
  width: 18px;
  height: 18px;
  color: var(--soft);
  flex-shrink: 0;
}

.lang-switch--segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
  padding: 4px;
  border-radius: 12px;
  background: rgba(8, 8, 6, 0.55);
  border: 1px solid var(--line);
}

.lang-switch--segmented .lang-btn {
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-size: 14px;
}

.lang-switch--segmented .lang-btn.active {
  background: rgba(255, 245, 223, 0.1);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.menu-cell .lang-switch:not(.lang-switch--segmented) {
  width: 100%;
}

.share-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.share-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--soft);
}

.share-field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 245, 223, 0.05);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.share-field.is-copied {
  border-color: rgba(121, 228, 188, 0.45);
  background: rgba(121, 228, 188, 0.08);
}

.share-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--paper-2);
}

.share-action {
  position: relative;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--amber-2);
}

.share-icon {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.share-field.is-copied .share-icon--copy {
  opacity: 0;
  transform: scale(0.8);
}

.share-icon--check {
  opacity: 0;
  transform: scale(0.8);
  color: var(--mint);
}

.share-field.is-copied .share-icon--check {
  opacity: 1;
  transform: scale(1);
}

.share-tools {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.share-tools::-webkit-scrollbar {
  display: none;
}

.share-tool {
  flex: 1;
  min-width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 68px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 245, 223, 0.04);
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.share-tool svg {
  width: 20px;
  height: 20px;
}

.share-tool--danger {
  color: var(--danger);
  border-color: rgba(255, 154, 120, 0.28);
  background: rgba(255, 154, 120, 0.06);
}

.toast-stack {
  position: fixed;
  top: calc(12px + var(--safe-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(24, 22, 17, 0.94);
  border: 1px solid var(--line-strong);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.32, 0.72, 0, 1);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast--success::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(121, 228, 188, 0.5);
}

.toast--error::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.table-wrap,
.data-table {
  display: none;
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .admin-nav,
  .admin-header .lang-switch {
    display: flex;
  }

  .logout-form--mobile {
    display: none;
  }

  .account-menu {
    display: block;
  }

  .nav-toggle,
  .bottom-nav,
  .sheet-backdrop,
  .action-sheet {
    display: none !important;
  }

  .admin-header {
    padding: 12px 20px;
  }

  .admin-nav {
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
  }

  .admin-nav a {
    padding: 10px 12px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
  }

  .admin-nav a:hover {
    background: rgba(255, 245, 223, 0.06);
    color: var(--text);
  }

  .admin-main {
    padding: 24px 20px 48px;
  }

  .page-title {
    display: block;
  }

  h1, .page-title { font-size: 1.5rem; margin-bottom: 20px; }

  .collect-stage {
    margin-bottom: 28px;
  }

  .card { padding: 20px; margin-bottom: 20px; }

  .sticky-action-bar {
    position: static;
    padding-top: 0;
  }

  .sticky-action-bar--flush {
    position: static;
    padding: 0;
    background: none;
    backdrop-filter: none;
  }

  .qr-page {
    min-height: auto;
    padding-bottom: 0;
  }

  .qr-code { max-width: 280px; }

  .search-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .search-form input[type="search"] {
    flex: 1;
    min-width: 200px;
  }

  .detail-list {
    grid-template-columns: 140px 1fr;
    gap: 8px 16px;
  }

  .detail-list dt { font-size: 14px; }
  .detail-list dd { margin-bottom: 0; }

  .inline-form {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .record-list,
  .panel-list { display: none; }

  .table-wrap {
    display: block;
    overflow-x: auto;
  }

  .data-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-1);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
  }

  .data-table th,
  .data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }

  .data-table th {
    background: rgba(255, 245, 223, 0.04);
    font-weight: 600;
    color: var(--muted);
  }

  .clickable-row { cursor: pointer; }
  .clickable-row:hover { background: rgba(255, 245, 223, 0.04); }
  .empty { text-align: center; color: var(--soft); }

  .user-card-list { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-backdrop,
  .action-sheet,
  .toast,
  .share-icon,
  .share-field {
    transition: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover,
  .btn-primary:hover {
    transform: translateY(-1px);
  }

  .record-item:hover {
    background: rgba(255, 245, 223, 0.04);
  }
}