:root {
  --color-cream: #F5F0E8;
  --color-ink: #1A1A1A;
  --color-blue: #3B8FE8;
  --color-milk: #FFFDF8;
  --color-bamboo: #5C7A43;
  --color-blush: #E7A6A1;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Lora', serif;
  --radius-soft: 20px;
  --radius-large: 24px;
  --panda-shadow:
    12px 14px 28px rgba(68, 57, 45, 0.18),
    -10px -10px 22px rgba(255, 255, 255, 0.78),
    inset 4px 4px 10px rgba(255, 255, 255, 0.62),
    inset -6px -7px 16px rgba(76, 62, 48, 0.11),
    0 0 0 1px rgba(59, 143, 232, 0.08);
  --panda-shadow-pressed:
    6px 7px 16px rgba(68, 57, 45, 0.15),
    -5px -5px 14px rgba(255, 255, 255, 0.7),
    inset 7px 7px 18px rgba(83, 69, 53, 0.15),
    inset -7px -7px 18px rgba(255, 255, 255, 0.72),
    0 0 0 1px rgba(59, 143, 232, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[x-cloak] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--color-cream);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(59, 143, 232, 0.13), transparent 24rem),
    linear-gradient(135deg, #F5F0E8 0%, #FFF9F1 48%, #EAF2F9 100%);
  font-family: var(--font-body);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.panda-surface,
.panda-button,
.panda-input,
.message-bubble,
.icon-button,
.ghost-button,
.file-button,
.notice {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-soft);
  background: rgba(245, 240, 232, 0.78);
  box-shadow: var(--panda-shadow);
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.auth-stage {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 480px);
  gap: 32px;
  width: min(1040px, 100%);
  align-items: center;
}

@media (max-width: 1024px) {
  .auth-stage {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.auth-brand {
  padding: 20px;
}

.auth-brand h1,
.card-heading h2,
.profile-panel h1,
.admin-hero h1,
.admin-panel h2,
.rail-head h1,
.pane-head h2,
.empty-chat h2,
.modal-card h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-brand h1 {
  max-width: 11ch;
  font-size: 4.8rem;
  line-height: 0.9;
}

@media (max-width: 768px) {
  .auth-brand h1 {
    font-size: 3.5rem;
  }
}

@media (max-width: 480px) {
  .auth-brand h1 {
    font-size: 2.4rem;
    max-width: none;
  }
}

.auth-brand p,
.card-heading p,
.profile-panel p,
.empty-chat p {
  font-size: 1rem;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-blue);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panda-mark {
  position: relative;
  width: 128px;
  height: 110px;
  margin-bottom: 28px;
  border-radius: 48% 48% 44% 44%;
  background: var(--color-milk);
  box-shadow: var(--panda-shadow);
}

.panda-mark::before,
.panda-mark::after {
  position: absolute;
  top: -18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--color-ink);
  content: "";
}

.panda-mark::before {
  left: 10px;
}

.panda-mark::after {
  right: 10px;
}

.panda-mark span::before,
.panda-mark span::after {
  position: absolute;
  top: 38px;
  width: 30px;
  height: 24px;
  border-radius: 999px;
  background: var(--color-ink);
  content: "";
}

.panda-mark span::before {
  left: 27px;
  transform: rotate(-18deg);
}

.panda-mark span::after {
  right: 27px;
  transform: rotate(18deg);
}

.panda-mark-small {
  width: 72px;
  height: 62px;
  margin: 0 auto 18px;
}

.panda-mark-small::before,
.panda-mark-small::after {
  width: 24px;
  height: 24px;
  top: -10px;
}

.panda-mark-small span::before,
.panda-mark-small span::after {
  top: 22px;
  width: 17px;
  height: 14px;
}

.panda-mark-small span::before {
  left: 15px;
}

.panda-mark-small span::after {
  right: 15px;
}

.auth-card,
.profile-panel {
  padding: 28px;
}

.card-heading {
  margin-bottom: 24px;
}

.card-heading h2 {
  font-size: 2rem;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.stack-form label,
.search-box {
  display: grid;
  gap: 8px;
  color: rgba(26, 26, 26, 0.7);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.panda-input {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 0;
  color: var(--color-ink);
  background: rgba(255, 253, 248, 0.66);
  outline: none;
}

@media (max-width: 480px) {
  .panda-input {
    min-height: 44px;
    padding: 12px 14px;
    font-size: 1rem;
  }
}

.panda-input:focus,
.panda-button:focus-visible,
.icon-button:focus-visible,
.ghost-button:focus-visible,
.conversation-item:focus-visible,
.person-row:focus-visible,
.file-button:focus-within {
  outline: 3px solid rgba(59, 143, 232, 0.34);
  outline-offset: 3px;
}

.code-input {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.18em;
}

.panda-button,
.ghost-button {
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .panda-button,
  .ghost-button {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 0.75rem;
  }
}

.panda-button:active,
.icon-button:active,
.ghost-button:active {
  box-shadow: var(--panda-shadow-pressed);
}

.panda-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.panda-button-blue {
  color: white;
  background: color-mix(in srgb, var(--color-blue) 84%, white);
}

.divider-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: rgba(26, 26, 26, 0.48);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.divider-label::before,
.divider-label::after {
  flex: 1;
  height: 1px;
  background: rgba(26, 26, 26, 0.14);
  content: "";
}

.notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notice-good {
  color: #214F2E;
  background: rgba(211, 235, 202, 0.82);
}

.notice-bad {
  color: #6B2525;
  background: rgba(246, 202, 197, 0.86);
}

.dev-note {
  margin: 18px 0 0;
  color: rgba(26, 26, 26, 0.58);
  font-size: 0.9rem;
  line-height: 1.55;
}

.dev-note code {
  font-family: Consolas, monospace;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 24px;
}

@media (max-width: 480px) {
  .topbar {
    padding: 12px 14px;
    gap: 12px;
  }
}

.brand-lockup,
.topnav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.brand-dot {
  width: 32px;
  height: 28px;
  border-radius: 48% 48% 44% 44%;
  background: var(--color-milk);
  box-shadow: var(--panda-shadow);
}

.topnav a {
  padding: 8px 10px;
  border-radius: 14px;
}

.topnav .icon-button {
  margin-left: auto;
}

@media (max-width: 600px) {
  .topnav {
    gap: 8px;
  }

  .topnav a {
    padding: 6px 8px;
    font-size: 0.75rem;
  }

  .topnav .icon-button {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
}

@media (max-width: 400px) {
  .topnav a:not(:last-child) {
    display: none;
  }

  .topnav {
    flex: 1;
    justify-content: flex-end;
  }
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-soft);
  background: rgba(245, 240, 232, 0.78);
  box-shadow: var(--panda-shadow);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  transition: all 0.15s ease;
}

.icon-button:hover {
  background: rgba(245, 240, 232, 0.88);
  transform: translateY(-1px);
}

.icon-button:active {
  box-shadow: var(--panda-shadow-pressed);
  transform: translateY(0);
}

@media (max-width: 480px) {
  .icon-button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

.identity-badge {
  position: relative;
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  margin-left: 8px;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 999px;
  box-shadow:
    5px 6px 12px rgba(68, 57, 45, 0.22),
    -3px -3px 8px rgba(255, 255, 255, 0.66),
    inset 2px 2px 5px rgba(255, 255, 255, 0.48),
    inset -3px -4px 9px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.22);
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.identity-badge-owner {
  border: 1px solid rgba(95, 58, 22, 0.56);
  color: #FFF0BF;
  background-color: #7B4B20;
  background-image:
    linear-gradient(115deg, rgba(255, 244, 184, 0.34), rgba(70, 41, 18, 0.12) 36%, rgba(24, 16, 10, 0.24) 100%),
    url("/assets/img/badges/owner-gold.png");
  background-position: center;
  background-size: cover;
  text-shadow: 0 1px 2px rgba(31, 18, 8, 0.72);
}

.identity-badge-verified {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #F7F4EC;
  background:
    linear-gradient(145deg, #050505 0%, #1B1B1B 46%, #000 100%);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
}

.identity-badge-verified::after {
  position: absolute;
  inset: -45% auto -45% -70%;
  width: 52%;
  transform: skewX(-22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  animation: badge-shine 2.35s linear infinite;
  content: "";
}

@keyframes badge-shine {
  from {
    left: -70%;
  }

  to {
    left: 130%;
  }
}

.toast-wrap {
  position: fixed;
  z-index: 20;
  right: 20px;
  top: 74px;
  width: min(360px, calc(100vw - 40px));
}

@media (max-width: 480px) {
  .toast-wrap {
    right: 10px;
    left: 10px;
    width: auto;
  }
}

.chat-app {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 20px;
  height: calc(100vh - 82px);
  padding: 0 20px 20px;
}

@media (max-width: 1024px) {
  .chat-app {
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    gap: 16px;
    padding: 0 16px 16px;
  }
}

@media (max-width: 768px) {
  .chat-app {
    grid-template-columns: 1fr;
    height: auto;
    min-height: calc(100vh - 82px);
    padding: 0 12px 12px;
    gap: 12px;
  }
}

.conversation-rail,
.message-pane {
  min-height: 0;
  padding: 20px;
}

@media (max-width: 768px) {
  .conversation-rail,
  .message-pane {
    min-height: 360px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .conversation-rail,
  .message-pane {
    min-height: 280px;
    padding: 12px;
  }
}

.conversation-rail {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 18px;
}

.rail-head,
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.rail-head h1 {
  font-size: 2rem;
}

@media (max-width: 768px) {
  .rail-head h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .rail-head h1 {
    font-size: 1.25rem;
  }
}

.search-results,
.conversation-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 3px;
}

.person-row,
.conversation-item {
  display: grid;
  gap: 12px;
  width: 100%;
  align-items: center;
  padding: 12px;
  border: 0;
  border-radius: 18px;
  color: var(--color-ink);
  background: rgba(255, 253, 248, 0.4);
  text-align: left;
}

.person-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.conversation-item {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.conversation-item.active {
  background: rgba(59, 143, 232, 0.15);
  box-shadow: var(--panda-shadow-pressed);
}

.avatar-sm,
.avatar-md,
.avatar-xl {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.75);
  box-shadow: var(--panda-shadow);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
}

.avatar-sm {
  width: 44px;
  height: 44px;
  font-size: 0.85rem;
}

.avatar-md {
  width: 54px;
  height: 54px;
}

.avatar-xl {
  width: 104px;
  height: 104px;
  font-size: 2rem;
}

.avatar-xl img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.conversation-copy {
  min-width: 0;
}

.conversation-copy strong,
.person-row strong {
  display: block;
  overflow: hidden;
  font-family: var(--font-display);
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.conversation-copy small,
.person-row small {
  display: block;
  overflow: hidden;
  color: rgba(26, 26, 26, 0.58);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  min-width: 26px;
  padding: 4px 7px;
  border-radius: 999px;
  color: white;
  background: var(--color-blue);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.person-action {
  color: var(--color-blue);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
  color: rgba(26, 26, 26, 0.62);
  line-height: 1.5;
}

.empty-state strong {
  color: var(--color-ink);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.message-pane {
  display: grid;
  min-width: 0;
}

.message-pane.empty {
  place-items: center;
}

.empty-chat {
  max-width: 360px;
  text-align: center;
}

.pane-live {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  min-height: 0;
  gap: 14px;
}

.pane-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(26, 26, 26, 0.1);
}

.pane-head > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.pane-head h2 {
  overflow: hidden;
  font-size: 1.5rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pane-head p {
  margin: 4px 0 0;
  color: rgba(26, 26, 26, 0.58);
}

.messages-scroll {
  display: flex;
  min-height: 0;
  overflow: auto;
  flex-direction: column;
  gap: 10px;
  padding: 8px 6px 18px;
}

.message-row {
  display: flex;
  justify-content: flex-start;
}

.message-row.mine {
  justify-content: flex-end;
}

.message-bubble {
  width: fit-content;
  max-width: min(620px, 78%);
  padding: 12px 14px;
  background: rgba(255, 253, 248, 0.77);
}

@media (max-width: 480px) {
  .message-bubble {
    max-width: 88%;
    padding: 10px 12px;
  }
}

.message-row.mine .message-bubble {
  color: #062340;
  background: color-mix(in srgb, var(--color-blue) 20%, white);
}

.message-author {
  display: block;
  margin-bottom: 5px;
  color: rgba(26, 26, 26, 0.55);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-bubble p {
  margin: 0;
  line-height: 1.58;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.deleted-copy {
  color: rgba(26, 26, 26, 0.48);
  font-style: italic;
}

.message-bubble footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
  color: rgba(26, 26, 26, 0.5);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.message-image {
  display: block;
  max-width: min(320px, 100%);
  max-height: 280px;
  margin-top: 9px;
  border-radius: 16px;
  object-fit: cover;
}

.file-chip {
  display: inline-block;
  max-width: 100%;
  margin-top: 9px;
  overflow: hidden;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.typing-line,
.attachment-name {
  min-height: 18px;
  margin: 0;
  color: rgba(26, 26, 26, 0.55);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.composer {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

@media (max-width: 480px) {
  .composer {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
  }

  .composer .panda-button {
    grid-column: 1 / -1;
    margin-top: 8px;
  }
}

.composer textarea {
  min-height: 50px;
  max-height: 140px;
  resize: vertical;
}

.file-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

@media (max-width: 480px) {
  .file-button {
    width: 44px;
    height: 44px;
  }
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.modal-backdrop {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(26, 26, 26, 0.28);
}

@media (max-width: 480px) {
  .modal-backdrop {
    padding: 16px;
  }
}

.modal-card {
  width: min(460px, 100%);
  padding: 24px;
}

@media (max-width: 480px) {
  .modal-card {
    padding: 18px;
    width: min(360px, 95vw);
  }
}

.group-search-results {
  max-height: 220px;
}

.selected-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(59, 143, 232, 0.13);
  box-shadow: var(--panda-shadow);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-chip button {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--color-ink);
  background: rgba(255, 255, 255, 0.72);
  font-family: var(--font-display);
  font-weight: 700;
}

.profile-page {
  display: grid;
  min-height: calc(100vh - 82px);
  place-items: center;
  padding: 20px;
}

.profile-panel {
  display: grid;
  width: min(520px, 100%);
  gap: 22px;
}

@media (max-width: 480px) {
  .profile-panel {
    width: min(360px, 95vw);
    gap: 18px;
  }
}

.admin-page {
  display: grid;
  gap: 20px;
  padding: 0 20px 20px;
}

@media (max-width: 480px) {
  .admin-page {
    padding: 0 10px 10px;
  }
}

.admin-hero,
.admin-panel {
  padding: 24px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 768px) {
  .admin-hero {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-hero > div {
    order: 2;
  }

  .admin-hero .owner-card {
    order: 1;
  }
}

.admin-hero h1 {
  font-size: clamp(2rem, 6vw, 4.1rem);
  line-height: 0.95;
}

@media (max-width: 480px) {
  .admin-hero h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }
}

.admin-hero p {
  max-width: 620px;
  margin: 10px 0 0;
  color: rgba(26, 26, 26, 0.65);
  line-height: 1.6;
}

.owner-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  min-width: min(320px, 100%);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.44);
}

.owner-card strong,
.admin-user-main strong {
  display: block;
  overflow: hidden;
  font-family: var(--font-display);
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.owner-card small,
.admin-user-main small {
  display: block;
  overflow: hidden;
  color: rgba(26, 26, 26, 0.58);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1024px) {
  .admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 18px;
  align-content: center;
}

@media (max-width: 480px) {
  .stat-card {
    padding: 16px;
    border-radius: 18px;
  }
}

.stat-card span,
.status-pill,
.owner-protected {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stat-card strong {
  font-family: var(--font-display);
  font-size: 2.2rem;
}

.admin-panel {
  display: grid;
  gap: 18px;
}

@media (max-width: 480px) {
  .admin-panel {
    padding: 16px;
    border-radius: 18px;
  }
}

.admin-panel-head,
.admin-filters {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

@media (max-width: 768px) {
  .admin-panel-head,
  .admin-filters {
    align-items: stretch;
    flex-direction: column;
  }
}

.admin-panel h2 {
  font-size: 2rem;
}

.admin-filters label {
  display: grid;
  flex: 1;
  gap: 8px;
  color: rgba(26, 26, 26, 0.7);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admin-filters select {
  appearance: none;
}

.admin-users {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto minmax(280px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.42);
}

@media (max-width: 1024px) {
  .admin-user-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .admin-user-row .status-pill,
  .admin-user-row .admin-actions {
    grid-column: 2 / 3;
    justify-self: end;
  }
}

@media (max-width: 640px) {
  .admin-user-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
  }

  .admin-user-row .status-pill,
  .admin-user-row .admin-actions,
  .admin-user-row .owner-protected {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

.admin-user-main {
  min-width: 0;
}

.status-pill {
  justify-self: start;
  padding: 7px 9px;
  border-radius: 999px;
  color: #1E2A1B;
  background: rgba(214, 235, 202, 0.82);
}

.status-suspended {
  color: #6B2525;
  background: rgba(246, 202, 197, 0.86);
}

.status-removed {
  color: rgba(26, 26, 26, 0.72);
  background: rgba(26, 26, 26, 0.1);
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(88px, 1fr));
  gap: 8px;
}

@media (max-width: 480px) {
  .admin-actions {
    grid-template-columns: 1fr;
  }
}

.admin-actions .ghost-button {
  min-height: 40px;
  padding: 9px 10px;
  font-size: 0.68rem;
}

.danger-button {
  color: #6B2525;
}

.danger-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.owner-protected {
  margin: 0;
  justify-self: end;
  color: rgba(26, 26, 26, 0.56);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .identity-badge-verified::after {
    animation: none !important;
  }
}

/* Accessibility helpers */
.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 14px;
  color: var(--color-ink);
  background: var(--color-milk);
  box-shadow: var(--panda-shadow);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid rgba(59, 143, 232, 0.48);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topnav a:focus-visible,
.brand-lockup:focus-visible {
  outline: 3px solid rgba(59, 143, 232, 0.34);
  outline-offset: 3px;
}

.field-help {
  margin: -8px 0 0;
  color: rgba(26, 26, 26, 0.62);
  font-size: 0.88rem;
  line-height: 1.45;
}
