:root {
  --bg: #f7f8f6;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-solid: #ffffff;
  --text: #0d1117;
  --muted: #697386;
  --line: rgba(15, 23, 42, 0.12);
  --line-strong: rgba(15, 23, 42, 0.18);
  --green: #087a62;
  --green-soft: #e7f6f1;
  --blue: #315a97;
  --blue-soft: #eef4ff;
  --yellow: #9a6a00;
  --yellow-soft: #fff6dc;
  --red: #bf2b2b;
  --red-soft: #fff0f0;
  --shadow: 0 22px 60px rgba(27, 42, 58, 0.11);
  --radius: 18px;
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(8, 122, 98, 0.08), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

body::-webkit-scrollbar,
.user-list::-webkit-scrollbar,
.support-messages::-webkit-scrollbar,
.support-thread-list::-webkit-scrollbar {
  width: 0;
  height: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.52;
}

.admin-auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.admin-auth-card,
.admin-shell {
  width: min(1180px, calc(100vw - 32px));
}

.admin-auth-card {
  display: grid;
  gap: 28px;
  max-width: 430px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #101820, #087a62);
  box-shadow: 0 16px 34px rgba(8, 122, 98, 0.18);
}

.brand strong {
  display: block;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.admin-login-form,
.moderation-form,
.broadcast-form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 8px;
  color: #303948;
  font-weight: 800;
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  outline: none;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.35;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input {
  height: 52px;
  padding: 0 16px;
}

textarea {
  min-height: 86px;
  resize: vertical;
  padding: 14px 16px;
}

input:focus,
textarea:focus {
  border-color: rgba(8, 122, 98, 0.45);
  box-shadow: 0 0 0 4px rgba(8, 122, 98, 0.08);
  background: #ffffff;
}

.form-error {
  margin: 0;
  color: var(--red);
  font-weight: 800;
  font-size: 13px;
}

.admin-shell {
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 0 30px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0 16px;
  background: rgba(248, 249, 247, 0.78);
  backdrop-filter: blur(18px);
}

.admin-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.admin-tabs button {
  min-width: 118px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #4d5869;
  font-weight: 900;
  font-size: 15px;
}

.admin-tabs button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 10px 28px rgba(30, 41, 59, 0.08);
}

.metrics,
.admin-lower {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.metric,
.admin-card,
.user-list-panel,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(27, 42, 58, 0.06);
  backdrop-filter: blur(18px);
}

.metric {
  padding: 15px 16px;
}

.metric span,
.section-head p,
.detail-head p,
.panel-title p {
  display: block;
  margin: 0 0 4px;
  color: #818a99;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 14px 0;
}

.search-field {
  position: relative;
  display: block;
}

.search-field .ui-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  translate: 0 -50%;
  color: #6d7788;
}

.search-field input {
  padding-left: 48px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(330px, 0.95fr) minmax(420px, 1.45fr);
  gap: 14px;
  align-items: start;
}

.admin-workspace > *,
.admin-lower > *,
.metrics > * {
  min-width: 0;
}

.user-list-panel,
.detail-panel,
.admin-card {
  padding: 14px;
}

.panel-title,
.section-head,
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title strong,
.section-head strong {
  font-size: 16px;
  line-height: 1.15;
}

.user-list {
  display: grid;
  gap: 8px;
  max-height: 700px;
  overflow: auto;
}

.user-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.user-row.active {
  border-color: rgba(8, 122, 98, 0.42);
  background: linear-gradient(135deg, rgba(231, 246, 241, 0.94), rgba(255, 255, 255, 0.9));
}

.user-row.blocked {
  background: rgba(255, 240, 240, 0.78);
}

.row-check {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0;
}

.row-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.row-check span {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
}

.row-check input:checked + span {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 5px #ffffff;
}

.user-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
}

.role-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #eef4f1;
  color: var(--green);
}

.user-copy {
  min-width: 0;
}

.user-copy strong,
.support-inbox-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.18;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy small,
.support-inbox-row small,
.muted {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-copy .id-line {
  margin-top: 2px;
  color: #909aaa;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 760;
}

.user-row-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #697386;
  font-size: 11px;
  font-weight: 900;
}

.user-row-meta > span:last-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row-meta em,
.support-inbox-row em {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f3f5;
  color: #5e6877;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status.ok {
  background: var(--green-soft);
  color: var(--green);
}

.status.warn {
  background: var(--yellow-soft);
  color: var(--yellow);
}

.status.danger {
  background: var(--red-soft);
  color: var(--red);
}

.detail-panel {
  position: sticky;
  top: 98px;
  max-height: calc(100dvh - 112px);
  overflow: auto;
}

.admin-accordion {
  display: block;
}

.admin-accordion summary {
  list-style: none;
  cursor: pointer;
}

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

.profile-accordion {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.admin-accordion-summary {
  position: relative;
  padding-right: 30px;
}

.admin-accordion-summary::after {
  content: "⌄";
  position: absolute;
  top: 50%;
  right: 2px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
  transform: translateY(-50%);
}

.admin-accordion[open] > .admin-accordion-summary::after {
  content: "⌃";
}

.admin-accordion-summary small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-accordion-body {
  margin-top: 12px;
}

.detail-head {
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.detail-head h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 30px;
  line-height: 1.04;
}

.detail-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.admin-id-pill {
  max-width: 100%;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  color: #647084;
  background: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 820;
}

.admin-id-pill span {
  color: #8a94a5;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-id-pill strong {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.detail-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
}

.detail-grid span {
  display: block;
  color: #818a99;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-grid .admin-id-pill {
  width: 100%;
  justify-content: flex-start;
}

.support-card,
.lawyer-admin-card,
.danger-zone {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.support-thread {
  display: grid;
  gap: 10px;
}

.support-messages {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border-radius: 14px;
  background: rgba(247, 248, 246, 0.86);
}

.support-message {
  max-width: 82%;
  justify-self: start;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.support-message.own {
  justify-self: end;
  border-color: rgba(8, 122, 98, 0.22);
  background: linear-gradient(135deg, #0f896e, #087a62);
  color: #ffffff;
}

.support-message span,
.support-message time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.support-message.own span,
.support-message.own time {
  color: rgba(255, 255, 255, 0.74);
}

.support-message p {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.support-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  gap: 8px;
}

.support-composer input {
  height: 50px;
}

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

.lawyer-moderation-photos {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid rgba(8, 122, 98, 0.16);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(8, 122, 98, 0.07), rgba(255, 255, 255, 0.74));
}

.lawyer-moderation-details {
  display: grid;
  gap: 9px;
  margin: 10px 0 12px;
}

.lawyer-moderation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lawyer-moderation-grid article,
.lawyer-moderation-text,
.lawyer-moderation-list,
.lawyer-moderation-checklist,
.lawyer-moderation-documents {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.66);
}

.lawyer-moderation-grid span,
.lawyer-moderation-text span,
.lawyer-moderation-list > span,
.lawyer-moderation-checklist > span,
.lawyer-moderation-documents > span {
  display: block;
  margin-bottom: 4px;
  color: #818a99;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.lawyer-moderation-grid strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lawyer-moderation-text p,
.lawyer-moderation-list p,
.lawyer-moderation-documents p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.lawyer-moderation-list div,
.lawyer-moderation-checklist div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lawyer-moderation-list em,
.lawyer-moderation-checklist em {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #4d5869;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
}

.lawyer-moderation-list em {
  overflow-wrap: anywhere;
}

.lawyer-moderation-checklist em.ok {
  background: var(--green-soft);
  color: var(--green);
}

.lawyer-moderation-checklist .ui-icon {
  width: 13px;
  height: 13px;
}

.lawyer-moderation-documents > div {
  display: grid;
  gap: 6px;
}

.lawyer-moderation-documents article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px;
  border-radius: 10px;
  background: rgba(247, 248, 246, 0.86);
}

.lawyer-moderation-documents strong,
.lawyer-moderation-documents small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lawyer-moderation-documents strong {
  font-size: 12px;
  line-height: 1.2;
}

.lawyer-moderation-documents small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.lawyer-moderation-documents .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--green);
}

.lawyer-moderation-photos.empty {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  color: var(--muted);
  background: rgba(247, 248, 246, 0.82);
  border-color: var(--line);
}

.lawyer-moderation-photos.empty > span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(8, 122, 98, 0.08);
  color: var(--green);
}

.lawyer-moderation-photos-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lawyer-moderation-photos strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

.lawyer-moderation-photos small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

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

.lawyer-moderation-photo {
  min-width: 0;
  display: grid;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.lawyer-moderation-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(8, 122, 98, 0.16);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(27, 42, 58, 0.08);
}

.lawyer-moderation-photo span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.danger-zone {
  grid-template-columns: 1fr 1fr;
}

.admin-lower {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.9fr);
  margin-top: 14px;
  align-items: start;
}

.support-thread-list,
.archive-list,
.event-list {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.support-inbox,
.archive-panel {
  align-self: start;
}

.support-inbox .section-head,
.archive-panel .section-head {
  margin-bottom: 8px;
}

.support-thread-list.compact,
.archive-list.compact {
  max-height: 244px;
  padding-right: 1px;
  overscroll-behavior: contain;
}

.support-inbox-toggle,
.archive-toggle {
  width: 100%;
  height: 36px;
  margin-top: 8px;
  border: 1px solid rgba(8, 122, 98, 0.14);
  border-radius: 12px;
  background: rgba(8, 122, 98, 0.07);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.archive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.archive-row strong,
.archive-row small,
.archive-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-row strong {
  font-size: 14px;
  font-weight: 900;
}

.archive-row small,
.archive-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.archive-actions {
  display: flex;
  gap: 6px;
}

.support-inbox-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  color: inherit;
  text-align: left;
}

.support-inbox-row.active {
  border-color: rgba(8, 122, 98, 0.38);
  background: var(--green-soft);
}

.support-inbox-row time {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.support-inbox-row em {
  position: absolute;
  right: 8px;
  top: 8px;
}

.event-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.event-row:last-child {
  border-bottom: 0;
}

.event-row time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  font-weight: 850;
}

.empty-state.small {
  padding: 12px;
  font-size: 13px;
}

.primary-button,
.soft-button,
.ghost-button,
.danger-button,
.send-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text);
  background: #ffffff;
  font-weight: 900;
  font-size: 14px;
}

.primary-button {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, #101820, #087a62);
  box-shadow: 0 14px 34px rgba(8, 122, 98, 0.16);
}

.soft-button {
  background: rgba(255, 255, 255, 0.78);
}

.soft-button.compact,
.danger-button.compact {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  background: transparent;
}

.danger-button {
  border-color: rgba(191, 43, 43, 0.18);
  color: var(--red);
  background: var(--red-soft);
}

.send-button {
  width: 50px;
  min-height: 50px;
  border-color: transparent;
  color: #ffffff;
  background: var(--green);
}

.ui-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 20;
  translate: -50% 0;
  padding: 11px 15px;
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.92);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(16, 24, 32, 0.18);
  font-weight: 900;
  font-size: 13px;
}

@media (max-width: 900px) {
  .admin-shell,
  .admin-auth-card {
    width: min(100% - 24px, 680px);
  }

  .admin-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .admin-topbar > .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .admin-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .admin-tabs button {
    flex: 1;
    min-width: 0;
  }

  .ghost-button {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    justify-self: end;
  }

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

  .admin-workspace,
  .admin-lower {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .admin-shell,
  .admin-auth-card {
    width: min(100% - 12px, 680px);
  }

  .admin-shell {
    padding-top: max(6px, env(safe-area-inset-top));
    padding-bottom: 14px;
  }

  .admin-auth {
    padding: 10px;
  }

  .admin-auth-card {
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
  }

  .admin-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 5px 0 7px;
  }

  .admin-auth-card,
  .user-list-panel,
  .detail-panel,
  .admin-card {
    border-radius: 12px;
    padding: 8px;
  }

  .brand {
    gap: 7px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand span {
    margin-top: 2px;
    font-size: 10px;
  }

  .admin-tabs {
    grid-column: 1 / -1;
  }

  .admin-tabs {
    padding: 3px;
    border-radius: 11px;
  }

  .admin-tabs button {
    height: 30px;
    border-radius: 8px;
    font-size: 12px;
  }

  .ghost-button,
  .primary-button,
  .soft-button,
  .danger-button {
    min-height: 34px;
    border-radius: 10px;
    font-size: 12px;
  }

  .ghost-button {
    width: auto;
    justify-self: end;
    padding: 0 10px;
  }

  .soft-button.compact,
  .danger-button.compact {
    min-height: 30px;
    padding: 0 8px;
    font-size: 11px;
  }

  input {
    height: 38px;
    padding: 0 11px;
    font-size: 13px;
  }

  textarea {
    min-height: 58px;
    padding: 9px 11px;
    font-size: 12px;
  }

  label {
    gap: 5px;
    font-size: 11px;
  }

  .metrics,
  .admin-lower {
    gap: 6px;
  }

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

  .metric {
    padding: 7px 8px;
    border-radius: 11px;
  }

  .metric span,
  .section-head p,
  .detail-head p,
  .panel-title p {
    margin-bottom: 2px;
    font-size: 9px;
  }

  .admin-toolbar,
  .moderation-actions,
  .danger-zone {
    grid-template-columns: 1fr;
  }

  .admin-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    margin: 8px 0;
  }

  .search-field .ui-icon {
    left: 11px;
  }

  .search-field input {
    padding-left: 35px;
  }

  .metric strong {
    font-size: 17px;
  }

  .panel-title,
  .section-head,
  .detail-head {
    gap: 6px;
    margin-bottom: 6px;
  }

  .panel-title strong,
  .section-head strong {
    font-size: 12px;
  }

  .user-list {
    gap: 5px;
  }

  .user-row,
  .support-inbox-row,
  .archive-row {
    gap: 6px;
    padding: 6px;
    border-radius: 10px;
  }

  .user-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .row-check {
    width: 24px;
    height: 24px;
  }

  .row-check span {
    width: 16px;
    height: 16px;
    border-radius: 5px;
  }

  .role-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
  }

  .user-row-main {
    gap: 7px;
  }

  .user-copy strong,
  .support-inbox-row strong {
    font-size: 12px;
  }

  .user-copy small,
  .support-inbox-row small,
  .muted {
    font-size: 10px;
  }

  .user-copy .id-line {
    font-size: 9px;
  }

  .user-row-meta {
    gap: 4px;
    font-size: 10px;
  }

  .status {
    min-height: 19px;
    padding: 0 6px;
    font-size: 9.5px;
  }

  .detail-head h1 {
    font-size: 18px;
  }

  .detail-head {
    padding-bottom: 7px;
  }

  .detail-head span {
    font-size: 10.5px;
  }

  .admin-id-pill {
    min-height: 21px;
    padding: 3px 6px;
  }

  .admin-id-pill strong {
    font-size: 9px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 7px 0;
  }

  .detail-grid article {
    padding: 7px;
    border-radius: 10px;
  }

  .detail-grid span {
    font-size: 8.8px;
  }

  .detail-grid strong {
    font-size: 11px;
  }

  .support-card,
  .lawyer-admin-card,
  .danger-zone {
    margin-top: 7px;
    padding: 7px;
    border-radius: 11px;
  }

  .support-messages {
    max-height: 190px;
    padding: 6px;
    border-radius: 10px;
  }

  .support-message {
    padding: 6px 8px;
    border-radius: 10px;
  }

  .support-message p {
    font-size: 11px;
  }

  .lawyer-moderation-details {
    gap: 6px;
    margin: 7px 0 8px;
  }

  .lawyer-moderation-grid {
    gap: 5px;
  }

  .lawyer-moderation-grid article,
  .lawyer-moderation-text,
  .lawyer-moderation-list,
  .lawyer-moderation-checklist,
  .lawyer-moderation-documents {
    padding: 7px;
    border-radius: 10px;
  }

  .lawyer-moderation-grid span,
  .lawyer-moderation-text span,
  .lawyer-moderation-list > span,
  .lawyer-moderation-checklist > span,
  .lawyer-moderation-documents > span {
    font-size: 8.8px;
  }

  .lawyer-moderation-grid strong {
    font-size: 11px;
  }

  .lawyer-moderation-text p,
  .lawyer-moderation-list p,
  .lawyer-moderation-documents p {
    font-size: 10.5px;
  }

  .lawyer-moderation-list em,
  .lawyer-moderation-checklist em {
    padding: 4px 6px;
    font-size: 9.8px;
  }

  .support-composer {
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .support-composer input {
    height: 36px;
  }

  .send-button {
    width: 36px;
    min-height: 36px;
  }

  .ui-icon {
    width: 16px;
    height: 16px;
  }

  .panel-title,
  .section-head,
  .detail-head {
    align-items: flex-start;
  }

  .support-message {
    max-width: 94%;
  }
}
