:root {
  --ink: #23212a;
  --slate: #5d6472;
  --mist: #8e93a1;
  --paper: #fbfaf7;
  --card: #ffffff;
  --line: #e7e0d7;
  --violet: #7567e8;
  --violet-deep: #43348f;
  --coral: #ff7c6e;
  --mint: #4fba8a;
  --honey: #b97815;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --focus: rgba(117, 103, 232, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.login-screen {
  align-items: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(117, 103, 232, 0.15), transparent 34%),
    radial-gradient(circle at 90% 90%, rgba(79, 186, 138, 0.12), transparent 32%),
    var(--paper);
  display: none;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
}

body:not(.authenticated) .login-screen {
  display: flex;
}

body:not(.authenticated) .admin-shell {
  display: none;
}

.login-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(58, 48, 112, 0.12);
  max-width: 430px;
  padding: 34px;
  width: 100%;
}

.login-brand {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand span {
  color: var(--mist);
  font-size: 12px;
  margin-top: 3px;
}

.login-card h1 {
  font-size: 30px;
  margin-top: 6px;
}

.login-intro {
  color: var(--slate);
  line-height: 1.7;
  margin: 12px 0 24px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form .field {
  display: grid;
  gap: 7px;
}

.login-form .field span {
  color: var(--slate);
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 44px;
  padding: 0 13px;
}

.login-submit {
  justify-content: center;
  min-height: 46px;
  margin-top: 4px;
  width: 100%;
}

.login-status {
  color: var(--honey);
  line-height: 1.6;
  min-height: 24px;
  margin-top: 14px;
}

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

.admin-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--violet), #8b86ee);
  color: #ffffff;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: var(--mist);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-group {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.nav-group[open] {
  background: #fcfbff;
  border-color: #eeeafd;
}

.nav-group summary {
  align-items: center;
  color: var(--slate);
  cursor: pointer;
  display: flex;
  gap: 9px;
  list-style: none;
  min-height: 40px;
  padding: 7px 10px;
  user-select: none;
}

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

.nav-group summary:hover,
.nav-group summary:focus-visible {
  background: #faf9ff;
  color: var(--violet-deep);
  outline: none;
}

.nav-group-icon {
  align-items: center;
  background: #f4f1ff;
  border: 1px solid #e4defd;
  border-radius: 7px;
  color: var(--violet-deep);
  display: inline-flex;
  flex: 0 0 26px;
  font-size: 11px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.nav-group-chevron {
  color: var(--mist);
  font-size: 18px;
  line-height: 1;
  margin-left: auto;
  transform: rotate(0deg);
  transition: transform 160ms ease;
}

.nav-group[open] .nav-group-chevron {
  transform: rotate(90deg);
}

.nav-group-items {
  display: grid;
  gap: 3px;
  padding: 0 6px 6px 15px;
}

.nav-group-items .nav-subitem {
  min-height: 36px;
  padding: 7px 9px;
}

.nav-group-items .nav-subitem .nav-icon {
  flex-basis: 22px;
  font-size: 11px;
  height: 22px;
  width: 22px;
}

.nav button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--slate);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav button:hover {
  background: #faf9ff;
  border-color: #ebe7ff;
  color: var(--violet-deep);
}

.nav button.active {
  background: #f4f1ff;
  border-color: #e3dcff;
  color: var(--violet-deep);
  font-weight: 700;
}

.nav-group-items .nav-subitem.active {
  box-shadow: inset 3px 0 0 var(--violet);
}

.nav-icon {
  align-items: center;
  background: #f4f1ff;
  border: 1px solid #e4defd;
  border-radius: 7px;
  color: var(--violet-deep);
  display: inline-flex;
  flex: 0 0 26px;
  font-size: 12px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.nav button.active .nav-icon {
  background: var(--violet);
  border-color: var(--violet);
  color: #ffffff;
}

.workspace {
  min-width: 0;
  max-width: 1880px;
  padding: 20px 28px 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.eyebrow {
  color: var(--mist);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 5px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
}

.topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.toolbar-field {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
}

.hidden-field {
  display: none !important;
}

.auth-only {
  display: none !important;
}

.login-only {
  display: inline-flex;
}

body.authenticated .login-only {
  display: none !important;
}

body.authenticated .auth-only {
  display: inline-flex !important;
}

.auth-gate {
  min-height: 180px;
  display: grid;
  align-content: center;
  gap: 10px;
}

.auth-gate h2 {
  font-size: 20px;
}

.auth-gate p {
  color: var(--slate);
  line-height: 1.7;
  max-width: 720px;
}

.toolbar-field span {
  color: var(--mist);
  font-size: 12px;
  font-weight: 700;
}

.toolbar-field input {
  border: 0;
  color: var(--ink);
  min-width: 190px;
  outline: none;
}

.compact-field input {
  min-width: 112px;
}

.token-field input {
  min-width: 130px;
}

.icon-button,
.primary-button,
.ghost-button {
  border-radius: 8px;
  cursor: pointer;
  min-height: 40px;
}

.icon-button {
  width: 40px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--slate);
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--violet), #8b86ee);
  color: #ffffff;
  font-weight: 700;
  padding: 0 16px;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--violet);
  font-weight: 700;
  padding: 0 14px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.status-bar {
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  padding: 11px 12px;
}

.status-bar.ok {
  background: #e7f6ef;
  color: #16845c;
}

.status-bar.warn {
  background: #fff4d8;
  color: var(--honey);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.dashboard-metrics {
  display: grid;
  gap: 14px;
  grid-column: span 12;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-metrics .metric {
  grid-column: auto;
}

.metric {
  display: grid;
  gap: 8px;
}

.metric span {
  color: var(--mist);
  font-size: 12px;
  font-weight: 700;
}

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

.delta {
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #f0ebe4;
  margin-bottom: 14px;
  padding-bottom: 10px;
}

.section-title span {
  max-width: 52%;
  text-align: right;
}

.section-title h2 {
  font-size: 16px;
}

.admin-section-nav-wrap {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  grid-column: span 12;
  min-width: 0;
  padding: 6px 8px;
  position: sticky;
  top: 10px;
  z-index: 1;
}

.admin-section-nav-label {
  color: var(--mist);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  padding: 0 4px;
}

.admin-section-nav {
  align-items: center;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  min-width: 0;
  padding: 1px;
  scrollbar-width: thin;
}

.admin-section-nav a {
  border-radius: 7px;
  color: var(--slate);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.admin-section-nav a:hover,
.admin-section-nav a:focus-visible {
  background: #f4f1ff;
  color: var(--violet-deep);
  outline: none;
}

.section-title span {
  color: var(--mist);
  font-size: 12px;
}

.read-only-notice {
  background: #fcfbff;
  border-style: dashed;
}

.read-only-notice .empty-panel {
  color: var(--slate);
}

.read-only-notice .section-title {
  margin-bottom: 8px;
}

.read-only-notice .section-title span {
  background: #f0edff;
  border-radius: 999px;
  color: var(--violet-deep);
  padding: 4px 8px;
}

.table {
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  width: 100%;
}

.table thead,
.table tbody,
.table tr {
  width: 100%;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: middle;
}

.table th {
  background: var(--card);
  color: var(--mist);
  font-size: 12px;
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.table td {
  color: #393642;
  font-size: 13px;
}

.table tbody tr {
  transition: background 140ms ease;
}

.table tbody tr:hover {
  background: #fcfbff;
}

.tag {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.tag.green {
  background: #e7f6ef;
  color: #16845c;
}

.tag.red {
  background: #ffe8e5;
  color: #d94b3f;
}

.tag.violet {
  background: #eeeaff;
  color: var(--violet-deep);
}

.tag.yellow {
  background: #fff4d8;
  color: var(--honey);
}

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

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

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 40px;
  padding: 0 10px;
}

.field select[multiple] {
  min-height: 92px;
  padding: 7px 10px;
}

.field-help {
  color: var(--mist);
  display: block;
  font-size: 12px;
  line-height: 1.5;
}

.table-note {
  margin-top: 8px;
}

.field textarea {
  line-height: 1.55;
  min-height: 108px;
  padding: 10px;
  resize: vertical;
}

.form-help {
  color: var(--slate);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.check-field {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
}

.check-field input {
  min-height: 0;
  width: 16px;
}

.check-list {
  display: grid;
  gap: 10px;
}

.check-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.filter-bar {
  align-items: end;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px;
}

.filter-bar .field {
  flex: 1 1 220px;
  margin: 0;
}

.filter-bar .compact-field {
  min-width: 160px;
}

.compact-button {
  min-height: 36px;
  padding: 8px 14px;
  white-space: nowrap;
}

.pagination-bar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
}

.finance-summary {
  margin-bottom: 18px;
}

.user-membership-summary {
  background: linear-gradient(135deg, #fbf8ff, #fffaf2);
  border: 1px solid #e2d8fb;
  border-radius: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
}

.user-membership-head,
.user-membership-meta {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.user-membership-meta {
  color: var(--slate);
  flex-wrap: wrap;
  font-size: 12px;
  margin-top: 8px;
}

.user-membership-summary .form-help {
  margin: 8px 0 0;
}

.user-membership-actions {
  border-top: 1px dashed #ded6f3;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
}

.user-asset-actions {
  background: #f8fbff;
  border: 1px solid #d9e5f4;
  border-radius: 10px;
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
}

.user-asset-actions .form-help {
  margin: 0;
}

.user-membership-actions-title {
  color: #4d456a;
  font-size: 12px;
  font-weight: 700;
}

.user-membership-actions-title span {
  color: var(--slate);
  font-weight: 400;
  margin-left: 8px;
}

.user-membership-action-row {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-membership-action-row .field {
  flex: 1 1 220px;
  margin: 0;
}

.user-membership-action-row .compact-button {
  flex: 0 0 auto;
}

.check-item {
  align-items: center;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.check-item.task-link {
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  width: 100%;
}

.check-item.task-link:hover,
.check-item.task-link:focus-visible {
  border-color: #c9bfff;
  box-shadow: 0 8px 18px rgba(91, 76, 180, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.task-arrow {
  color: var(--violet-deep);
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  margin-left: 10px;
}

.check-item em {
  color: var(--mist);
  font-size: 12px;
  font-style: normal;
}

.split-panel {
  margin-bottom: 14px;
}

.subhead {
  font-size: 14px;
  margin: 14px 0 8px;
}

.one-col {
  grid-template-columns: 1fr;
}

.span-all {
  grid-column: 1 / -1;
}

.field > span {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
}

.field input[type="file"] {
  align-items: center;
  background: #fbfaf7;
  cursor: pointer;
  display: flex;
  padding: 9px 10px;
}

.asset-code-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}

.asset-code-palette button {
  background: #f6f4ff;
  border: 1px solid #dfd8ff;
  border-radius: 999px;
  color: var(--violet-deep);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 0 10px;
}

.asset-code-palette button:hover {
  background: #ece8ff;
}

.asset-catalog-toolbar {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  padding: 12px;
}

.asset-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.asset-filter-button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--slate);
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
}

.asset-filter-button b {
  background: #f0edff;
  border-radius: 999px;
  color: var(--violet-deep);
  font-size: 11px;
  min-width: 18px;
  padding: 2px 5px;
  text-align: center;
}

.asset-filter-button.active,
.asset-filter-button:hover {
  background: #756fe8;
  border-color: #756fe8;
  color: #fff;
}

.asset-filter-button.active b,
.asset-filter-button:hover b {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.asset-search {
  display: flex;
  gap: 8px;
  max-width: 520px;
}

.asset-search input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 1;
  min-height: 34px;
  padding: 0 10px;
}

.asset-list-summary {
  color: var(--mist);
  font-size: 12px;
  margin: 4px 0 10px;
}

.admin-self-password {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 14px;
}

.admin-self-password h3 {
  color: var(--ink);
  font-size: 15px;
  margin: 0 0 6px;
}

.admin-self-password .config-form {
  margin-top: 10px;
}

.admin-dialog-backdrop {
  align-items: center;
  background: rgba(27, 25, 44, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 50;
}

.admin-dialog {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(37, 36, 42, 0.22);
  max-width: 460px;
  padding: 22px;
  width: 100%;
}

.admin-dialog-head {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.admin-dialog-head h2 {
  color: var(--ink);
  font-size: 20px;
  margin: 2px 0 0;
}

.admin-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}

.asset-preview {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(124, 112, 238, 0.12), rgba(47, 205, 190, 0.08)),
    #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  height: 46px;
  justify-content: center;
  overflow: hidden;
  width: 46px;
}

.asset-preview img {
  display: block;
  height: 34px;
  object-fit: contain;
  width: 34px;
}

.asset-preview img.is-fallback {
  opacity: 0.78;
}

.asset-preview.broken {
  color: var(--mist);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.asset-preview.empty {
  color: var(--mist);
  font-weight: 700;
}

.asset-preview.file {
  color: var(--slate);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.asset-code-cell,
.badge-icon-editor-body {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.asset-code-cell code,
.badge-icon-editor-body code {
  color: var(--violet-deep);
  font-size: 11px;
  white-space: nowrap;
}

.badge-icon-editor {
  display: grid;
  gap: 8px;
}

.badge-icon-editor .field-label {
  color: var(--slate);
  font-size: 12px;
  font-weight: 700;
}

.badge-icon-editor-body {
  background: #fbfaf7;
  border: 1px dashed var(--line);
  border-radius: 10px;
  min-height: 64px;
  padding: 8px 10px;
}

.prop-icon-editor-body {
  align-items: center;
  background: #fbfaf7;
  border: 1px dashed var(--line);
  border-radius: 10px;
  display: inline-flex;
  gap: 8px;
  min-height: 64px;
  padding: 8px 10px;
}

.badge-icon-editor-body .field-help {
  color: var(--mist);
  font-size: 12px;
  line-height: 1.5;
}

.asset-preview-panel {
  display: grid;
  gap: 12px;
}

.asset-preview-panel p {
  color: var(--mist);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.badge-asset-preview {
  align-items: center;
  display: inline-flex;
  gap: 10px;
}

.badge-asset-preview code {
  color: var(--slate);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.badge-editor-preview {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.empty-panel {
  background: #fbfaf7;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--mist);
  font-size: 13px;
  line-height: 1.6;
  padding: 18px;
}

.asset-preview-large {
  align-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 211, 128, 0.32), transparent 32%),
    linear-gradient(145deg, rgba(124, 112, 238, 0.14), rgba(47, 205, 190, 0.08));
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  min-height: 148px;
}

.asset-preview-large .asset-preview {
  border-radius: 18px;
  height: 104px;
  width: 104px;
}

.asset-preview-large .asset-preview img {
  height: 82px;
  width: 82px;
}

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

.row-actions .mini-button {
  min-width: 64px;
}

.muted-cell {
  color: var(--mist);
  font-size: 12px;
  white-space: nowrap;
}

.toolbar-actions {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.mini-button {
  background: #f7f5ff;
  border: 1px solid #ded7ff;
  border-radius: 999px;
  color: var(--violet-deep);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  padding: 0 10px;
}

.mini-button.danger {
  background: #fff0ee;
  border-color: #ffd4ce;
  color: #c23d34;
}

@media (max-width: 1080px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    height: auto;
    overflow: visible;
    padding: 12px 14px 10px;
    position: sticky;
    top: 0;
    z-index: 3;
  }

  .nav {
    align-items: flex-start;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .nav-group {
    flex: 0 0 auto;
    overflow: visible;
    position: relative;
  }

  .nav-group summary {
    min-width: 112px;
    padding: 7px 9px;
  }

  .nav-group-items {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 28px rgba(58, 48, 112, 0.12);
    left: 0;
    min-width: 180px;
    padding: 6px;
    position: absolute;
    top: calc(100% + 4px);
    z-index: 5;
  }

  .nav-group-items .nav-subitem {
    min-width: 166px;
  }

  .topbar-actions,
  .topbar {
    align-items: stretch;
  }

  .toolbar-field,
  .primary-button,
  .ghost-button,
  .icon-button {
    min-height: 42px;
  }
}

.mini-button:hover {
  background: #ece8ff;
}

@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .workspace {
    padding: 16px 15px 32px;
  }

  .card {
    padding: 13px;
  }

  .toolbar-field {
    flex: 1 1 160px;
    min-width: 0;
  }

  .toolbar-field {
    flex: 1 1 220px;
  }

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

  .toolbar-field input {
    min-width: 0;
    width: 100%;
  }

  .nav {
    grid-template-columns: none;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .admin-section-nav-wrap {
    position: sticky;
    top: 6px;
  }

  .admin-section-nav-label {
    display: none;
  }

  .dashboard-metrics {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .section-title span {
    max-width: none;
    text-align: left;
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 {
    grid-column: span 1;
  }
}
