:root {
  --ink: #2b2735;
  --muted: #6b6578;
  --line: rgba(167, 139, 199, 0.16);
  --card: rgba(255, 255, 255, 0.82);
  --plum: #a78bc7;
  --plum-deep: #8f7aae;
  --plum-soft: #efe8f6;
  --ok: #5d734f;
  --sage: #7b9270;
  --danger: #c53d61;
  --yandex: #fc3f1d;
  --bg: #f6f3fa;
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 600px at -10% -10%, rgba(167, 139, 199, 0.18), transparent 64%),
    radial-gradient(800px 650px at 105% 10%, rgba(123, 146, 112, 0.12), transparent 60%),
    linear-gradient(145deg, #f6f3fa 0%, #f0ecf6 44%, #f4f6f1 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.25;
  background-image: radial-gradient(rgba(57, 39, 69, 0.12) 0.5px, transparent 0.5px);
  background-size: 5px 5px;
}

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

button {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0) scale(0.985); }

.app {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 20px 110px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  background:
    radial-gradient(720px 480px at 20% 10%, rgba(229, 209, 237, 0.9), transparent 62%),
    radial-gradient(640px 520px at 90% 20%, rgba(247, 222, 215, 0.7), transparent 58%),
    linear-gradient(160deg, #f8f5fb 0%, #f5f0f7 48%, #faf6f3 100%);
}

.boot-mark {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 4px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(61, 39, 71, 0.16);
  animation: boot-soft 1.6s ease-in-out infinite;
}

.boot-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(88, 58, 104, 0.14);
  border-top-color: #5a3068;
  border-radius: 50%;
  animation: boot-spin 0.75s linear infinite;
}

.boot-screen strong {
  margin-top: 4px;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.boot-screen span {
  color: var(--muted);
  font-size: 13px;
}

@keyframes boot-spin {
  to { transform: rotate(360deg); }
}

@keyframes boot-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login .admin-card {
  position: relative;
  overflow: hidden;
}

.admin-login .admin-card::before {
  position: absolute;
  top: -86px;
  right: -64px;
  width: 188px;
  height: 188px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle at 35% 35%, rgba(224, 184, 221, 0.7), rgba(224, 184, 221, 0));
}

.admin-login h1 {
  position: relative;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: 24px;
  letter-spacing: -0.08em;
}

.admin-card {
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  background: #fff;
  box-shadow:
    0 18px 55px rgba(61, 41, 75, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.admin-shell {
  width: 100%;
}

.admin-shell .admin-card {
  width: 100%;
}

.admin-form textarea {
  white-space: pre-wrap;
}

.admin-card h1,
.admin-card h2 {
  margin: 0 0 8px;
  letter-spacing: -0.045em;
}

.admin-card h2 {
  font-size: 20px;
  font-weight: 800;
}

.content-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 12px;
}

.content-section-nav button {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--plum-deep);
  background: var(--plum-soft);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.content-section-nav button.is-active {
  color: #fff;
  background: linear-gradient(135deg, #8f7aae, var(--plum-deep));
}

.admin-form {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin-top: 16px;
}

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

.admin-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #51485a;
  font-size: 12px;
  font-weight: 700;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 14px;
  outline: none;
  border: 1px solid rgba(87, 65, 101, 0.13);
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(51, 32, 66, 0.03);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.admin-form select {
  appearance: none;
  padding-right: 38px;
  background-image:
    linear-gradient(45deg, transparent 50%, #6f6578 50%),
    linear-gradient(135deg, #6f6578 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.admin-form textarea {
  min-height: 128px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  border-color: rgba(115, 65, 134, 0.58);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(141, 91, 159, 0.11);
}

.admin-form button[type="submit"],
.admin-topbar button,
.chat-admin-actions button {
  padding: 12px 16px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #9c7ac7, var(--plum-deep));
  box-shadow: 0 8px 18px rgba(143, 122, 174, 0.22);
  font-size: 13px;
  font-weight: 800;
}

.admin-form button[type="submit"]:hover,
.admin-topbar button:hover,
.chat-admin-actions button:hover {
  box-shadow: 0 12px 25px rgba(143, 122, 174, 0.28);
}

.admin-form button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.admin-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-weight: 700;
}

.admin-checkbox input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--plum);
}

.admin-topbar {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 12px 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 12px 35px rgba(70, 51, 82, 0.07);
  backdrop-filter: blur(24px);
}

.admin-tabs {
  position: sticky;
  top: 74px;
  z-index: 4;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(70, 51, 82, 0.06);
}

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

.admin-tab {
  flex: 1 0 auto;
  min-width: 88px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 13px;
  color: #6f6578;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.admin-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, #9c7ac7, var(--plum-deep));
  box-shadow: 0 8px 16px rgba(143, 122, 174, 0.2);
}

.admin-tab:hover { transform: none; }
.admin-tab.is-active:hover { transform: none; }

.tab-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.tab-panel {
  width: 100% !important;
  min-width: 0;
}

.admin-topbar > div { display: flex; align-items: center; gap: 11px; }

.admin-topbar-logo {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 11px;
  box-shadow: 0 3px 9px rgba(61, 39, 71, 0.13);
}

.login-logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(61, 39, 71, 0.14);
}

.admin-login h1 {
  text-align: center;
}

.admin-login .muted {
  text-align: center;
}

.install-hint {
  max-width: 260px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.admin-topbar strong {
  display: block;
  font-family: "Unbounded", "Manrope", sans-serif;
  font-size: 13px;
  letter-spacing: -0.06em;
}

.admin-topbar p { margin: 2px 0 0; }
.admin-topbar button { padding: 9px 14px; font-size: 12px; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.admin-stats-compact article {
  min-height: 84px;
  padding: 16px;
}

.admin-stats article {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(61, 41, 75, 0.055);
  backdrop-filter: blur(20px);
}

.admin-stats article::after {
  position: absolute;
  top: -28px;
  right: -22px;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  content: "";
  opacity: 0.8;
  background: #eee6f3;
}

.admin-stats article:nth-child(2)::after { background: #e7f3ec; }
.admin-stats article:nth-child(3)::after { background: #fff0d9; }
.admin-stats article:nth-child(4)::after { background: #f8e7ea; }
.admin-stats article:nth-child(5)::after { background: #e8edf9; }

.admin-stats strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.admin-stats span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
}

.error { margin: 0; color: var(--danger); font-size: 12px; }
.status { margin: 0; color: var(--ok); font-size: 12px; font-weight: 700; }

.image-attach { display: grid; gap: 10px; }

.image-attach-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px 16px;
  border: 1.5px dashed rgba(104, 72, 122, 0.28);
  border-radius: 18px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 243, 250, 0.86));
  box-shadow: none;
  text-align: left;
}

.image-attach-btn.has-image {
  border-style: solid;
  border-color: rgba(104, 72, 122, 0.16);
  background: linear-gradient(180deg, #fff, #f7f1f9);
}

.image-attach-btn:hover {
  transform: none;
  border-color: rgba(104, 72, 122, 0.45);
  box-shadow: 0 8px 22px rgba(61, 41, 75, 0.08);
}

.image-attach-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #7a4a88, var(--plum-deep));
  box-shadow: 0 8px 16px rgba(55, 21, 66, 0.18);
}

.image-attach-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.image-attach-copy strong {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.image-attach-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.url-details {
  border-radius: 14px;
  background: rgba(250, 248, 252, 0.7);
}

.url-details summary {
  padding: 12px 14px;
  color: #6a6074;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

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

.url-label {
  padding: 0 14px 14px !important;
}

.stock-image-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.stock-image-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.admin-form .stock-image-btn,
.stock-image-btn {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: transparent;
  box-shadow: none;
}

.admin-form .stock-image-btn:hover,
.stock-image-btn:hover {
  transform: none;
  box-shadow: none;
}

.stock-image-btn.is-active .stock-image-frame {
  box-shadow: 0 0 0 3px rgba(143, 122, 174, 0.85);
}

.stock-image-frame {
  position: relative;
  display: block;
  width: 100%;
  padding-bottom: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #efe8f6;
}

.stock-image-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.admin-image-preview { display: grid; gap: 9px; }

.admin-image-preview img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border: 1px solid rgba(87, 65, 101, 0.1);
  border-radius: 17px;
  background: #eee;
}

.admin-image-preview button {
  justify-self: start;
  padding: 8px 11px;
  background: #766c7d;
  box-shadow: none;
  font-size: 11px;
}

.user-card-list,
.pay-card-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.user-card,
.pay-card {
  padding: 14px;
  border: 1px solid rgba(89, 69, 104, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.user-card-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
}

.user-card-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-card-meta strong {
  font-size: 14px;
  letter-spacing: -0.03em;
}

.user-card-meta span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card-foot,
.pay-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(89, 69, 104, 0.07);
  color: var(--muted);
  font-size: 11px;
}

.pay-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-user-avatar {
  width: 37px;
  height: 37px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #7f4b8c, var(--plum));
  box-shadow: 0 4px 10px rgba(67, 31, 78, 0.16);
  font-size: 12px;
  font-weight: 800;
}

.admin-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--yandex);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}

.pay-pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.pay-pill.is-active { color: var(--ok); background: #e4f4e9; }
.pay-pill.is-expired { color: var(--muted); background: #f0edf2; }
.pay-pill.is-pending { color: #956b00; background: #fff1cf; }
.pay-pill.is-failed { color: var(--danger); background: #fde8ed; }
.pay-pill.is-none { color: var(--muted); background: #f0edf2; }

.admin-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-section-head > button {
  padding: 10px 13px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #54235f, var(--plum-deep));
  box-shadow: 0 7px 16px rgba(55, 21, 66, 0.17);
  font-size: 12px;
  font-weight: 800;
}

.chat-room-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.chat-room-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(89, 69, 104, 0.08);
  border-radius: 18px;
  color: inherit;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
  text-align: left;
}

.chat-room-card:hover {
  transform: none;
  border-color: rgba(104, 72, 122, 0.22);
  box-shadow: 0 10px 24px rgba(61, 41, 75, 0.07);
}

.chat-room-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, #7a4a88, var(--plum-deep));
  font-size: 16px;
  font-weight: 800;
}

.chat-room-copy { min-width: 0; }

.chat-room-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-room-title-row strong {
  font-size: 14px;
  letter-spacing: -0.03em;
}

.chat-room-title-row span {
  min-width: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--plum);
  background: var(--plum-soft);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.chat-room-copy em {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-room-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chat-room-tags i {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #f0edf2;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.chat-room-tags i.is-open { color: var(--ok); background: #e4f4e9; }
.chat-room-tags i.is-locked { color: #8a6a00; background: #fff1cf; }
.chat-room-tags i.is-premium { color: var(--plum); background: #efe6f4; }

.chat-thread-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.chat-thread-top h2 { margin: 0 0 2px; }

.chat-back-btn {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 13px;
  color: var(--plum);
  background: var(--plum-soft);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
}

.chat-room-controls {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(89, 69, 104, 0.08);
  border-radius: 16px;
  background: rgba(250, 248, 252, 0.75);
}

.chat-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #51485a;
  font-size: 13px;
  font-weight: 700;
}

.chat-switch input {
  width: 42px;
  height: 24px;
  margin: 0;
  accent-color: var(--plum);
}

.chat-thread {
  display: grid;
  gap: 10px;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding: 4px 2px 8px;
}

.chat-bubble-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(89, 69, 104, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.chat-bubble-card.is-pinned {
  border-color: rgba(141, 91, 159, 0.28);
  background: linear-gradient(180deg, #faf5fc, #fff);
}

.chat-bubble-card.is-team .chat-bubble-avatar {
  background: linear-gradient(145deg, #4f7d63, #2f6b49);
}

.chat-bubble-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #8a5a97, var(--plum));
  font-size: 12px;
  font-weight: 800;
}

.chat-bubble-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
}

.chat-bubble-head strong {
  font-size: 13px;
  letter-spacing: -0.02em;
}

.chat-bubble-head time {
  color: var(--muted);
  font-size: 11px;
}

.chat-pin-badge {
  display: inline-block;
  margin: 6px 0 2px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--plum);
  background: var(--plum-soft);
  font-size: 10px;
  font-weight: 800;
}

.chat-bubble-main p {
  margin: 7px 0 10px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-bubble-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-bubble-actions button {
  padding: 7px 10px;
  border-radius: 10px;
  box-shadow: none;
  font-size: 11px;
}

.chat-bubble-actions .danger,
button.danger {
  background: linear-gradient(135deg, #dc5c7d, #b62c53);
}

.chat-empty {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 180px;
  padding: 28px 18px;
  border: 1.5px dashed rgba(104, 72, 122, 0.18);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.chat-empty strong {
  color: var(--ink);
  font-size: 15px;
}

@media (max-width: 720px) {
  .app {
    padding: 12px 12px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  .admin-topbar {
    top: 8px;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px 10px 10px 12px;
    border-radius: 17px;
  }

  .admin-topbar > div:last-child {
    flex: 1 1 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .admin-form-row {
    grid-template-columns: 1fr;
  }

  .stock-image-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-topbar-logo {
    width: 30px;
    height: 30px;
    border-radius: 9px;
  }

  .admin-topbar strong { font-size: 12px; }
  .admin-topbar button { padding: 8px 11px; font-size: 11px; }

  .admin-tabs {
    top: 66px;
    gap: 4px;
    margin-bottom: 12px;
    padding: 5px;
    border-radius: 16px;
  }

  .admin-tab {
    flex: 0 0 auto;
    min-width: auto;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 11px;
  }

  .admin-stats-compact article {
    min-height: 76px;
    padding: 13px;
    border-radius: 18px;
  }

  .admin-stats strong { font-size: 24px; }
  .admin-card { padding: 16px; border-radius: 20px; }
  .admin-form button[type="submit"] {
    width: 100%;
  }
  .admin-image-preview img { max-height: 120px; }
  .feed-admin-card {
    padding: 12px;
    border-radius: 16px;
  }
  .feed-admin-thumb {
    width: 100%;
    max-width: none;
  }
  .content-del-btn {
    width: 100%;
    justify-content: center;
    padding: 11px 12px;
  }
  .admin-card h2 { font-size: 18px; }

  .user-card-head {
    grid-template-columns: auto 1fr;
  }

  .user-card-head .pay-pill {
    grid-column: 2;
    justify-self: start;
  }

  .image-attach-btn {
    min-height: 68px;
    padding: 12px;
    border-radius: 16px;
  }

  .image-attach-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .chat-thread-top { align-items: center; }
  .chat-bubble-actions button { flex: 1 1 auto; }
}

@media (max-width: 420px) {
  .stock-image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-form {
    gap: 12px;
  }
}

.feed-admin-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.feed-admin-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.feed-admin-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.feed-admin-copy strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.3;
}

.feed-admin-copy .muted {
  overflow-wrap: anywhere;
}

.feed-admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.content-del-btn {
  justify-self: start;
  width: fit-content;
  white-space: nowrap;
}

.feed-admin-top strong {
  display: block;
  margin-bottom: 4px;
}

.feed-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-admin-actions button,
.danger-btn {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--plum-deep);
  background: var(--plum-soft);
  font-size: 13px;
  font-weight: 700;
}

.danger-btn {
  color: #fff;
  background: linear-gradient(180deg, #d25578, var(--danger));
}

.feed-admin-thumb {
  display: block;
  width: min(100%, 240px);
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
  background: #efe8f6;
}

.feed-admin-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.feed-comments-block {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.feed-comments-block h3 {
  margin: 0;
  font-size: 16px;
}

.feed-comment-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.feed-comment-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.feed-comment-card p {
  margin: 0;
  line-height: 1.45;
}

@media (min-width: 860px) {
  .admin-tabs { top: 82px; }
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f1e6;
  color: var(--ok);
  font-size: 11px;
  font-weight: 800;
}

.live-chip.is-down {
  background: #fde8ed;
  color: var(--danger);
}

.live-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(123, 146, 112, 0.18);
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.ops-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.ops-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.ops-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.toolbar input,
.toolbar select {
  flex: 1 1 160px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.user-actions select {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
}

.user-actions button,
.ghost-btn {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--plum-deep);
  background: var(--plum-soft);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.user-actions .ok-btn {
  color: #fff;
  background: linear-gradient(135deg, #879b78, var(--sage));
}

.announce-box textarea {
  min-height: 110px;
}

.movie-admin-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.movie-admin-card h3 {
  margin: 0;
  font-size: 16px;
}

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