:root {
  color-scheme: light;
  --bg: #f6f8fa;
  --ink: #1d1d1f;
  --muted: #77777c;
  --panel: rgba(255, 255, 255, 0.56);
  --line: rgba(255, 255, 255, 0.56);
  --hairline: rgba(0, 0, 0, 0.06);
  --brand: #5fb8f6;
  --brand-strong: #1677c8;
  --brand-dark: #0d3e66;
  --accent: #cdeeff;
  --soft: rgba(95, 184, 246, 0.18);
  --warning: rgba(224, 244, 255, 0.82);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.07);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #eef2f5;
  color: var(--ink);
}

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.mobile-app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background:
    radial-gradient(circle at 18% -10%, rgba(95, 184, 246, 0.32), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(255, 255, 255, 0.9), transparent 26%),
    radial-gradient(circle at 80% 30%, rgba(22, 119, 200, 0.12), transparent 34%),
    var(--bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.home-header,
.admin-header {
  position: relative;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(214, 240, 255, 0.78), rgba(255, 255, 255, 0.34)),
    url("https://images.unsplash.com/photo-1600607687920-4e2a09cf159d?auto=format&fit=crop&w=900&q=80") center/cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(30px) saturate(1.9);
}

.admin-header {
  background:
    linear-gradient(180deg, rgba(214, 240, 255, 0.76), rgba(255, 255, 255, 0.42)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=900&q=80") center/cover;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 17px;
  object-fit: cover;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.mini-label {
  margin: 0 0 7px;
  color: #1677c8;
  font-size: 12px;
  font-weight: 800;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
}

.page-home h1 {
  font-size: 28px;
  font-weight: 950;
}

.admin-link {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 0 12px;
  color: #111;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  font-size: 13px;
  font-weight: 800;
}

.search-card {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0 12px;
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-card.compact {
  min-height: 44px;
  box-shadow: none;
  border: 1px solid var(--line);
}

.search-icon {
  color: #111;
  font-size: 22px;
  line-height: 1;
}

.search-card input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

#clearSearch {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #edf1ea;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.enterprise-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  min-height: 126px;
  margin: 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62), rgba(222, 244, 255, 0.58)),
    radial-gradient(circle at 100% 0%, rgba(95, 184, 246, 0.58), transparent 42%);
  padding: 18px 18px 16px;
  box-shadow: 0 24px 56px rgba(16, 87, 145, 0.12);
  overflow: hidden;
  backdrop-filter: blur(24px) saturate(1.8);
}

.page-home .enterprise-hero {
  position: relative;
  display: block;
  min-height: 190px;
  margin: 10px 0 8px;
  border-radius: 22px;
  padding: 0;
  background: #e8f6ff;
  overflow: hidden;
}

.hero-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.page-home .enterprise-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(239, 250, 255, 0.99) 0%, rgba(239, 250, 255, 0.94) 48%, rgba(239, 250, 255, 0.28) 86%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.36));
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  min-height: 190px;
  padding: 16px 14px;
}

.hero-points {
  display: grid;
  gap: 5px;
  max-width: 318px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.hero-points li {
  position: relative;
  padding-left: 18px;
  color: rgba(20, 25, 31, 0.9);
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.32;
}

.hero-points li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe577, #ffc82f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hero-points li::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 4px;
  width: 5px;
  height: 3px;
  border-left: 2px solid #111;
  border-bottom: 2px solid #111;
  transform: rotate(-45deg);
}

.enterprise-hero strong,
.enterprise-hero span {
  display: block;
}

.enterprise-hero strong {
  max-width: 315px;
  color: #11161d;
  font-size: 26px;
  font-weight: 950;
  line-height: 1.04;
}

.enterprise-hero span {
  margin-top: 10px;
  color: rgba(29, 29, 31, 0.72);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.hero-metrics div {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.46);
  padding: 9px 12px;
  backdrop-filter: blur(18px) saturate(1.5);
}

.hero-metrics b,
.hero-metrics span {
  display: block;
}

.compact-hero {
  min-height: auto;
  margin-bottom: 0;
}

.hero-metrics b {
  font-size: 22px;
  line-height: 1;
}

.hero-metrics span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticker {
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(28px) saturate(1.9);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 22s linear infinite;
}

.ticker-track span {
  flex: 0 0 auto;
  padding: 7px 22px;
  color: #0d3e66;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

@keyframes tickerScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

main {
  padding: 10px 10px 24px;
}

.catalog-shell {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 6px;
  align-items: start;
  margin-top: 2px;
}

.group-tabs {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}

.group-tabs::-webkit-scrollbar {
  display: none;
}

.group-tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.38);
  padding: 7px 5px;
  color: var(--muted);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(0, 0, 0, 0.035);
  backdrop-filter: blur(28px) saturate(1.9);
}

.order-controls {
  display: grid;
  gap: 4px;
}

.order-controls button {
  display: grid;
  width: 24px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.5));
  color: #111;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.order-controls button:hover,
.settings-actions button:hover,
.join-btn:hover {
  transform: translateY(-1px);
}

.order-controls button:active,
.settings-actions button:active,
.join-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: none;
}

.group-order-controls {
  position: absolute;
  top: 6px;
  left: 6px;
}

.group-tab svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.group-tab span {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
}

.group-tab small {
  position: absolute;
  top: 5px;
  right: 6px;
  display: inline-flex;
  min-width: 17px;
  height: 17px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(95, 184, 246, 0.34);
  color: inherit;
  padding: 0 5px;
  font-size: 9px;
  font-weight: 800;
}

.group-tab.active {
  border-color: rgba(95, 184, 246, 0.72);
  background: rgba(255, 255, 255, 0.76);
  color: #111;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 14px 30px rgba(16, 87, 145, 0.1);
}

.add-group-tab {
  border-style: dashed;
  color: #111;
}

.catalog-content {
  min-width: 0;
}

.activity-section {
  margin-top: 0;
}

.activity-list,
.admin-list {
  display: grid;
  gap: 6px;
}

.page-home .activity-list {
  gap: 10px;
}

.activity-group-section {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 10px 24px rgba(16, 87, 145, 0.045);
  backdrop-filter: blur(28px) saturate(1.8);
}

.activity-group-title {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid rgba(16, 87, 145, 0.06);
  background: rgba(239, 249, 255, 0.88);
  padding: 0 10px;
  backdrop-filter: blur(18px) saturate(1.6);
}

.activity-group-title strong {
  color: #11161d;
  font-size: 15px;
  font-weight: 950;
}

.activity-group-title span {
  color: rgba(13, 62, 102, 0.62);
  font-size: 11px;
  font-weight: 900;
}

.activity-group-list {
  display: grid;
  gap: 7px;
  padding: 4px;
}

.activity-group-list .activity-item + .activity-item {
  border-top: 0;
}

.activity-category-block {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(95, 184, 246, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.activity-category-label {
  display: grid;
  min-height: 50px;
  place-items: center;
  padding: 8px 7px;
  background: linear-gradient(180deg, rgba(221, 244, 255, 0.96), rgba(206, 235, 252, 0.86));
}

.activity-category-label span {
  display: grid;
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
  place-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: #0b4d80;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.12;
  text-align: center;
  overflow-wrap: anywhere;
}

.activity-category-rows {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 4px;
}

.activity-item,
.admin-item,
.service-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(30px) saturate(1.9);
}

.admin-catalog {
  margin-top: 0;
}

.admin-filter {
  padding-top: 4px;
}

.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 9px;
  min-height: 50px;
  align-items: center;
  padding: 7px 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

.page-home .activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px;
  gap: 9px;
  justify-content: stretch;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: none;
}

.page-home .tag {
  min-height: 24px;
  padding: 0 8px;
  color: #0b4d80;
  font-size: 11px;
  font-weight: 900;
}

.page-home .join-btn {
  justify-self: end;
}

.activity-item.pinned {
  border-color: rgba(95, 184, 246, 0.55);
  background: linear-gradient(90deg, rgba(245, 251, 255, 0.76), rgba(226, 246, 255, 0.48));
}

.item-main {
  display: grid;
  grid-template-columns: 64px max-content;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.page-home .activity-item .item-main {
  display: contents;
}

.item-topline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 7px;
}

.tag,
.status,
.group-label,
.brand-chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  justify-content: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 800;
}

.group-label {
  color: #fff;
  background: #1d1d1f;
}

.tag {
  max-width: 100%;
  overflow: hidden;
  color: #0d3e66;
  background: rgba(95, 184, 246, 0.18);
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.brand-chip {
  max-width: 110px;
  overflow: hidden;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  color: #8b570d;
  background: var(--warning);
  display: none;
}

.activity-item h3,
.admin-item h3 {
  margin: 0;
  color: #1d1d1f;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.page-home .activity-item h3 {
  min-width: 0;
  justify-self: start;
  text-align: left;
  font-size: 17px;
  font-weight: 950;
}

.activity-item p,
.service-card p,
.admin-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.join-btn {
  display: inline-flex;
  width: 58px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 13px;
  background: linear-gradient(180deg, #2da1f2, #116fca);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 7px 14px rgba(17, 111, 202, 0.18);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.join-btn.loading {
  width: 128px;
  pointer-events: none;
  opacity: 0.92;
}

.join-btn.loading svg {
  display: none;
}

.join-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.join-btn.disabled {
  background: #b5beb6;
}

.join-loading-toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 50;
  max-width: calc(100vw - 32px);
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(19, 31, 45, 0.92);
  color: #fff;
  box-shadow: 0 14px 36px rgba(13, 24, 38, 0.22);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.join-loading-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.delete-row-btn {
  display: grid;
  width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(176, 45, 31, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 238, 235, 0.52));
  color: #b02d1f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 8px 18px rgba(176, 45, 31, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.delete-row-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.delete-row-btn:hover {
  transform: translateY(-1px);
}

.delete-row-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.12);
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(18, 24, 32, 0.32);
  padding: 24px;
  backdrop-filter: blur(18px) saturate(1.4);
}

.toast-message {
  position: fixed;
  top: 22px;
  right: 24px;
  z-index: 80;
  min-width: 180px;
  max-width: min(360px, calc(100vw - 48px));
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(17, 134, 80, 0.92);
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(18px) saturate(1.6);
}

.toast-message.error {
  background: rgba(176, 45, 31, 0.94);
}

.toast-message[hidden] {
  display: none;
}

.admin-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(95, 184, 246, 0.3), transparent 34%),
    rgba(238, 242, 245, 0.76);
  padding: 24px;
  backdrop-filter: blur(22px) saturate(1.5);
}

.admin-auth-overlay[hidden] {
  display: none;
}

.admin-locked .mobile-app {
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

.admin-auth-card {
  display: grid;
  gap: 18px;
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  padding: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(30px) saturate(1.8);
}

.admin-auth-card h2 {
  margin: 0;
  color: #11161d;
  font-size: 24px;
  font-weight: 950;
}

.admin-auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.admin-auth-card input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0 14px;
  color: var(--ink);
  outline-color: var(--brand);
  font-size: 16px;
  font-weight: 800;
}

.admin-auth-card button {
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: #1677c8;
  color: #fff;
  font-weight: 950;
  cursor: pointer;
}

.auth-error {
  margin: -8px 0 0;
  color: #b02d1f;
  font-size: 13px;
  font-weight: 800;
}

.confirm-overlay[hidden] {
  display: none;
}

.confirm-dialog {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  padding: 18px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(30px) saturate(1.8);
}

.confirm-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 229, 119, 0.7);
  color: #11161d;
}

.confirm-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.confirm-copy h2 {
  margin: 0;
  color: #11161d;
  font-size: 20px;
  font-weight: 950;
}

.confirm-copy p {
  margin: 8px 0 0;
  color: rgba(29, 29, 31, 0.66);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

.confirm-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.confirm-actions button {
  min-width: 96px;
  min-height: 40px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}

.confirm-secondary {
  border: 1px solid rgba(22, 119, 200, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(29, 29, 31, 0.72);
}

.confirm-danger {
  border: 1px solid rgba(176, 45, 31, 0.22);
  background: #d9362b;
  color: #fff;
  box-shadow: 0 10px 20px rgba(217, 54, 43, 0.18);
}

.empty-state {
  display: grid;
  gap: 9px;
  justify-items: center;
  border: 1px dashed #c5ccc5;
  border-radius: 16px;
  background: #fff;
  padding: 28px 20px;
  text-align: center;
}

.empty-state span {
  color: var(--muted);
  font-size: 14px;
}

.empty-state a {
  color: #111;
  font-weight: 800;
}

.service-card {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
  padding: 16px;
}

.service-card .mini-label {
  color: var(--brand);
}

.service-card h2,
.editor-card h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.qr-box {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px dashed #aab5ad;
  border-radius: 16px;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, #fff, #fff 8px, #f0f3ed 8px, #f0f3ed 16px);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.category-settings {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 8px 22px rgba(0, 0, 0, 0.026);
  backdrop-filter: blur(30px) saturate(1.9);
}

.category-settings label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.category-settings input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  padding: 9px 10px;
  color: var(--ink);
  outline-color: var(--brand);
  backdrop-filter: blur(16px);
}

.site-settings-panel {
  display: grid;
  gap: 12px;
}

.site-settings-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.site-settings-panel textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  padding: 10px 12px;
  color: var(--ink);
  outline-color: var(--brand);
  font-weight: 750;
  line-height: 1.5;
  backdrop-filter: blur(16px);
}

.site-settings-panel button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: #1677c8;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.category-settings input:disabled,
.category-settings button:disabled {
  opacity: 0.45;
}

.switch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.switch-row {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink) !important;
  background: rgba(255, 255, 255, 0.58);
}

.switch-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.settings-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-actions button {
  min-height: 38px;
  border: 1px solid rgba(22, 119, 200, 0.2);
  border-radius: 12px;
  background: #1677c8;
  color: #fff;
  font-weight: 900;
  box-shadow: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.settings-actions button:nth-child(2) {
  border: 1px solid rgba(22, 119, 200, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: #0d3e66;
  box-shadow: none;
}

.settings-actions .danger-action {
  border: 1px solid rgba(176, 45, 31, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: #b02d1f;
  box-shadow: none;
}

.product-editor {
  display: grid;
  gap: 6px;
}

.product-editor input {
  min-width: 0;
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  padding: 0 10px;
  color: var(--ink);
  outline-color: var(--brand);
  backdrop-filter: blur(16px);
}

.admin-product {
  position: relative;
  min-height: 86px;
  padding-left: 24px;
}

.row-index {
  display: inline-flex;
  width: 34px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.68);
  color: rgba(29, 29, 31, 0.58);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.row-order-controls {
  position: absolute;
  top: 10px;
  left: 8px;
}

@media (min-width: 481px) {
  .mobile-app {
    min-height: 100vh;
  }
}

.page-admin .mobile-app {
  max-width: none;
  min-width: 1180px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% -10%, rgba(95, 184, 246, 0.28), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(22, 119, 200, 0.12), transparent 30%),
    #f6f6f8;
  box-shadow: none;
}

.page-admin .admin-header,
.page-admin main {
  max-width: 1440px;
  margin: 0 auto;
}

.page-admin .admin-header {
  border-radius: 0 0 30px 30px;
  padding: 24px 32px;
}

.page-admin main {
  padding: 18px 32px 40px;
}

.desktop-admin-grid {
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 420px;
  gap: 18px;
  align-items: start;
}

.page-admin .admin-catalog {
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
}

.page-admin .admin-product {
  grid-template-columns: 54px 42px 1fr 48px;
  min-height: 70px;
  padding: 10px 12px;
  align-items: center;
}

.page-admin .admin-product .item-main {
  display: block;
}

.page-admin .product-editor {
  grid-template-columns: minmax(180px, 0.34fr) minmax(320px, 0.66fr);
  gap: 8px;
}

.page-admin .product-editor input {
  min-height: 38px;
}

.page-admin .admin-product .join-btn {
  width: 64px;
  min-height: 38px;
  border-radius: 12px;
  font-size: 12px;
  gap: 0;
  background: #1677c8;
  box-shadow: none;
}

.page-admin .row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.page-admin .group-tabs {
  max-height: calc(100vh - 160px);
  gap: 8px;
}

.page-admin .group-tab {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  justify-items: stretch;
  align-items: center;
  min-height: 48px;
  border-radius: 14px;
  padding: 8px 10px;
  text-align: left;
}

.page-admin .group-tab svg {
  width: 18px;
  height: 18px;
}

.page-admin .group-tab span {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-admin .group-tab small {
  position: static;
  min-width: 24px;
  height: 22px;
}

.page-admin .group-order-controls {
  position: static;
  display: flex;
  gap: 4px;
  grid-column: 1 / -1;
  justify-content: flex-end;
  width: 100%;
  margin-top: 4px;
}

.page-admin .group-order-controls button {
  width: 28px;
  height: 24px;
  border-radius: 9px;
}

.page-admin .add-group-tab {
  grid-template-columns: 24px 1fr;
}

.page-admin .add-group-tab span {
  align-self: center;
}

@media (min-width: 900px) {
  .page-admin {
    background:
      radial-gradient(circle at 16% -10%, rgba(95, 184, 246, 0.28), transparent 34%),
      radial-gradient(circle at 90% 0%, rgba(45, 102, 195, 0.1), transparent 32%),
      #eef0f4;
  }

  .page-admin .mobile-app {
    max-width: none;
    min-height: 100vh;
    background:
      radial-gradient(circle at 18% -10%, rgba(95, 184, 246, 0.28), transparent 32%),
      radial-gradient(circle at 90% 0%, rgba(45, 102, 195, 0.08), transparent 30%),
      #f6f6f8;
    box-shadow: none;
  }

  .page-admin .admin-header,
  .page-admin main {
    max-width: 1440px;
    margin: 0 auto;
  }

  .page-admin .admin-header {
    border-radius: 0 0 30px 30px;
    padding: 24px 32px;
  }

  .page-admin main {
    padding: 18px 32px 40px;
  }

  .desktop-admin-grid {
    display: grid;
    grid-template-columns: minmax(760px, 1fr) 420px;
    gap: 18px;
    align-items: start;
  }

  .page-admin .admin-catalog {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 14px;
  }

  .page-admin .category-settings {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    padding: 16px;
    margin-bottom: 12px;
  }

  .page-admin .category-settings .switch-grid,
  .page-admin .category-settings .settings-actions {
    grid-column: 1 / -1;
  }

  .page-admin .admin-product {
    grid-template-columns: 54px 42px 1fr 48px;
    min-height: 70px;
    padding: 10px 12px;
    align-items: center;
  }

  .page-admin .row-order-controls {
    position: static;
    display: flex;
    gap: 4px;
  }

  .page-admin .row-order-controls button {
    width: 24px;
    height: 28px;
  }

  .page-admin .admin-product .item-main {
    display: block;
  }

  .page-admin .product-editor {
    grid-template-columns: minmax(180px, 0.34fr) minmax(320px, 0.66fr);
    gap: 8px;
  }

  .page-admin .product-editor input {
    min-height: 38px;
  }

  .page-admin .admin-product .join-btn {
    width: 64px;
    min-height: 38px;
    border-radius: 12px;
    font-size: 12px;
    gap: 0;
  }

  .analytics-panel,
  .chart-card,
  .table-card,
  .metric-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62), 0 12px 32px rgba(0, 0, 0, 0.045);
    backdrop-filter: blur(30px) saturate(1.9);
  }

  .analytics-panel {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 12px;
    padding: 16px;
  }

  .dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .dashboard-header h2,
  .chart-card h3,
  .table-card h3 {
    margin: 0;
    color: var(--ink);
  }

  .dashboard-header h2 {
    font-size: 24px;
  }

  .dashboard-header select {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.58);
    padding: 0 12px;
    color: var(--ink);
    font-weight: 800;
  }

  .metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .metric-card {
    padding: 14px;
  }

  .metric-card strong,
  .metric-card span {
    display: block;
  }

  .metric-card strong {
    font-size: 26px;
    line-height: 1;
  }

  .metric-card span {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .chart-card,
  .table-card {
    padding: 14px;
  }

  .daily-chart {
    display: flex;
    align-items: end;
    gap: 8px;
    min-height: 132px;
    margin-top: 12px;
    overflow-x: auto;
  }

  .bar-item {
    display: grid;
    min-width: 38px;
    justify-items: center;
    gap: 5px;
  }

  .bar-value {
    width: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--brand), rgba(17, 103, 184, 0.96));
  }

  .bar-item span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
  }

  .bar-item strong {
    font-size: 11px;
  }

  .mini-table {
    display: grid;
    gap: 8px;
    margin-top: 12px;
  }

  .mini-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.42);
    padding: 0 10px;
  }

  .mini-row span {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mini-row strong {
    color: var(--ink);
  }

  .empty-row {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    padding: 8px 0;
  }

  .page-admin .row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
  }
}
