:root {
  --color-primary: #171717;
  --color-primary-shallow: #404040;
  --color-primary-deep: #525252;

  /* mx-admin core variables */
  --spacing: 0.25rem; /* 4px */
  --radius-md: 0.375rem; /* 6px */
  --radius-lg: 0.5rem; /* 8px */
  --radius-xl: 0.75rem; /* 12px */

  --sidebar-width: 220px;
  --sidebar-collapse-width: 72px;
  --subsidebar-width: 256px;
  --header-height: 56px;

  --page-bg: #f5f5f5;
  --content-bg: #ffffff;

  --sidebar-border: #e5e5e5;
  --sidebar-text: #6b6b6b;
  --sidebar-text-active: #1a1a1a;
  --sidebar-hover-bg: rgba(0, 0, 0, 0.04);
  --sidebar-active-bg: rgba(0, 0, 0, 0.06);
  --sidebar-active-indicator: #3b82f6;

  --content-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  --content-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -2px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);

  --v3a-text: #171717;
  --v3a-muted: #737373;
  --v3a-danger: #d03050;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--v3a-text);
  background: var(--page-bg);
}

#app {
  width: 100%;
  height: 100%;
}

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

.v3a-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.v3a-icon svg {
  width: 18px;
  height: 18px;
}

.v3a-muted {
  color: var(--v3a-muted);
  font-size: 13px;
  line-height: 1.8;
}

.v3a-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: min(260px, calc(100vw - 16px));
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(23, 23, 23, 0.92);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  white-space: normal;
  word-break: break-word;
}

.v3a-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Toast (mx-admin like / sonner style) */
.v3a-toaster {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

@keyframes v3a-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.v3a-toast {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  padding-right: 44px; /* reserve space for close button */
  min-height: 52px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--content-bg);
  box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.08),
    0 3px 6px 0 rgba(0, 0, 0, 0.06),
    0 5px 12px 4px rgba(0, 0, 0, 0.04);
  animation: v3a-toast-in 0.15s ease;
}

.v3a-toast-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 0;
  color: #737373;
}

.v3a-toast-icon svg {
  width: 20px;
  height: 20px;
}

.v3a-toast[data-type="success"] .v3a-toast-icon {
  color: #16a34a;
}

.v3a-toast[data-type="warn"] .v3a-toast-icon {
  color: #f59e0b;
}

.v3a-toast[data-type="error"] .v3a-toast-icon {
  color: #ef4444;
}

.v3a-toast-content {
  flex: 1;
  min-width: 0;
}

.v3a-toast-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.82);
  word-break: break-word;
}

.v3a-toast-desc {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.5;
  color: #737373;
  word-break: break-word;
}

.v3a-toast-action {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  background: transparent;
  color: #171717;
  font-size: 12px;
  cursor: pointer;
  flex: 0 0 auto;
  align-self: center;
}

.v3a-toast-action:hover {
  border-color: #404040;
  background: rgba(23, 23, 23, 0.09);
}

.v3a-toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(102, 102, 102, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.v3a-toast-close:hover {
  background: rgba(23, 23, 23, 0.09);
}

@media (prefers-reduced-motion: reduce) {
  .v3a-tooltip {
    transition: none;
  }

  .v3a-toast {
    animation: none;
  }
}

/* Login */
.v3a-login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--spacing) * 6);
  background: radial-gradient(
      1200px 600px at 20% 10%,
      rgba(23, 23, 23, 0.1),
      transparent 60%
    ),
    radial-gradient(
      1200px 600px at 80% 90%,
      rgba(23, 23, 23, 0.08),
      transparent 60%
    ),
    var(--page-bg);
}

.v3a-login-card {
  width: 420px;
  max-width: 100%;
  background: var(--content-bg);
  box-shadow: var(--content-shadow-hover);
  border-radius: var(--radius-xl);
  padding: calc(var(--spacing) * 6) calc(var(--spacing) * 6)
    calc(var(--spacing) * 5);
}

.v3a-login-brand {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 2);
  margin-bottom: calc(var(--spacing) * 5);
}

.v3a-login-logo {
  width: 44px;
  height: 44px;
  border-radius: calc(var(--radius-xl) * 1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.v3a-login-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.v3a-login-subtitle {
  font-size: 13px;
  color: var(--v3a-muted);
}

.v3a-login-form {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 3);
}

.v3a-login-actions {
  margin-top: calc(var(--spacing) * 1);
  display: flex;
  gap: calc(var(--spacing) * 2);
}

.v3a-login-actions .v3a-login-btn {
  flex: 1;
  margin-top: 0;
}

.v3a-field {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 2);
  font-size: 13px;
  color: var(--v3a-muted);
}

.v3a-field input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  outline: none;
  background: #fff;
  color: var(--v3a-text);
}

.v3a-field input:focus {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

.v3a-remember {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  font-size: 13px;
  color: var(--v3a-muted);
}

.v3a-login-btn {
  margin-top: calc(var(--spacing) * 1);
  height: 42px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.v3a-login-btn:hover {
  filter: brightness(1.05);
}

.v3a-login-btn.secondary {
  background: transparent;
  border: 1px solid var(--sidebar-border);
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v3a-login-btn.secondary:hover {
  filter: none;
  background: rgba(0, 0, 0, 0.03);
}

.v3a-login-footer {
  margin-top: calc(var(--spacing) * 4);
  font-size: 13px;
  color: var(--v3a-muted);
}

/* App layout */
.v3a-app {
  height: 100%;
  display: flex;
  width: 100%;
  min-width: 0;
}

.v3a-sidebar {
  width: var(--sidebar-width);
  background: var(--page-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
}

.v3a-sidebar.collapsed {
  width: var(--sidebar-collapse-width);
}

.v3a-sidebar.collapsed .v3a-avatar {
  display: none;
}

.v3a-side-header {
  height: var(--header-height);
  padding: 0 calc(var(--spacing) * 3);
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  border-bottom: 1px solid var(--sidebar-border);
  background: var(--content-bg);
}

.v3a-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  cursor: default;
}

.v3a-side-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.v3a-side-title-main {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--v3a-text);
}

.v3a-side-title-sub {
  font-size: 12px;
  color: var(--v3a-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3a-iconbtn {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sidebar-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.v3a-iconbtn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.v3a-menu {
  padding: calc(var(--spacing) * 4) calc(var(--spacing) * 3)
    calc(var(--spacing) * 6);
  overflow: auto;
}

.v3a-menu-item {
  position: relative;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  color: var(--sidebar-text);
}

.v3a-menu-item:hover {
  background: var(--sidebar-hover-bg);
}

.v3a-menu-item.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
}

.v3a-menu-left {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  min-width: 0;
}

.v3a-menu-label {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v3a-menu-right {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
}

.v3a-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--sidebar-border);
  color: var(--v3a-muted);
  background: #fff;
}

.v3a-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
  color: rgba(0, 0, 0, 0.45);
}

.v3a-chev.open {
  transform: rotate(90deg);
}

.v3a-sub {
  margin: calc(var(--spacing) * 2) 0 calc(var(--spacing) * 3)
    calc(var(--spacing) * 4);
  padding-left: calc(var(--spacing) * 3);
  border-left: 1px dashed rgba(0, 0, 0, 0.18);
}

.v3a-subitem {
  position: relative;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--sidebar-text);
}

.v3a-subitem:hover {
  background: var(--sidebar-hover-bg);
}

.v3a-subitem.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-text-active);
}

.v3a-subsidebar {
  width: var(--subsidebar-width);
  background: var(--page-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
}

.v3a-subsidebar-hd {
  height: var(--header-height);
  padding: 0 calc(var(--spacing) * 3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sidebar-border);
  background: var(--content-bg);
}

.v3a-subsidebar-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--v3a-text);
}

.v3a-subsidebar-bd {
  padding: 0;
  overflow: auto;
}

.v3a-subsidebar-item {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: transparent;
  position: relative;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.72);
}

.v3a-subsidebar-item:last-child {
  border-bottom: 0;
}

.v3a-subsidebar-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.v3a-subsidebar-item.active {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.82);
}

.v3a-subsidebar-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2);
}

.v3a-subsidebar-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.v3a-subsidebar-item-icon.active {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.55);
}

.v3a-subsidebar-item-icon .v3a-icon,
.v3a-subsidebar-item-icon .v3a-icon svg {
  width: 14px;
  height: 14px;
}

.v3a-subsidebar-item-text {
  flex: 1;
  min-width: 0;
}

.v3a-subsidebar-item-title {
  font-size: 13px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.82);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3a-subsidebar-item-subtitle {
  margin-top: 2px;
  font-size: 11px;
  color: #737373;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3a-subsidebar-item .v3a-chev {
  margin-left: auto;
}

.v3a-subsidebar-sub {
  padding: 6px 0 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.v3a-subsidebar-subitem {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 0;
  background: transparent;
  position: relative;
  height: 32px;
  padding: 0 16px 0 60px;
  border-radius: 0;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.72);
}

.v3a-subsidebar-subitem:hover {
  background: rgba(0, 0, 0, 0.03);
}

.v3a-subsidebar-subitem.active {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.82);
}

.v3a-subsidebar-subitem:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2);
}

.v3a-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.v3a-topbar {
  height: var(--header-height);
  padding: 0 calc(var(--spacing) * 6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--content-bg);
  border-bottom: 1px solid var(--sidebar-border);
}

.v3a-crumb {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
}

.v3a-topbar-right {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
}

.v3a-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sidebar-border);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
}

.v3a-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.v3a-btn.primary {
  background: var(--color-primary);
  border-color: transparent;
  color: #fff;
}

.v3a-btn.primary:hover {
  filter: brightness(1.05);
}

.v3a-iconaction {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sidebar-border);
  background: #fff;
  color: rgba(0, 0, 0, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.v3a-iconaction:hover {
  background: rgba(0, 0, 0, 0.04);
}

.v3a-iconaction.primary {
  background: var(--color-primary);
  border-color: transparent;
  color: #fff;
}

.v3a-iconaction.primary:hover {
  background: var(--color-primary-shallow);
}

.v3a-iconaction:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2);
}

.v3a-iconaction:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.v3a-iconaction .v3a-icon,
.v3a-iconaction .v3a-icon svg {
  width: 18px;
  height: 18px;
}

.v3a-iconaction.v3a-iconaction-lg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.v3a-iconaction.v3a-iconaction-lg .v3a-icon,
.v3a-iconaction.v3a-iconaction-lg .v3a-icon svg {
  width: 20px;
  height: 20px;
}

.v3a-content {
  padding: 0;
  overflow: auto;
  flex: 1;
  min-height: 0;
  background: #fff; /* mx-admin main content is white */
}

.v3a-container {
  width: 100%;
  margin: 0;
  padding-inline: calc(var(--spacing) * 4); /* 16px (mx-admin: px-4) */
  padding-top: calc(var(--spacing) * 6); /* 24px */
  padding-bottom: calc(var(--spacing) * 8); /* 32px (mx-admin: pb-8) */
  max-width: none;
}

@media (min-width: 48rem) {
  .v3a-container {
    padding-inline: calc(var(--spacing) * 8); /* 32px (mx-admin: md:px-8) */
  }

  .v3a-container.v3a-container-write {
    --v3a-write-pad: calc(var(--spacing) * 8);
  }
}

.v3a-container.v3a-container-write {
  padding: 0;
  --v3a-write-pad: calc(var(--spacing) * 6);
}

.v3a-container.v3a-container-write > .v3a-pagehead {
  padding: calc(var(--spacing) * 6) var(--v3a-write-pad)
    calc(var(--spacing) * 4);
  margin-bottom: 0;
}

.v3a-container.v3a-container-write > .v3a-alert,
.v3a-container.v3a-container-write > .v3a-card,
.v3a-container.v3a-container-write > .v3a-muted {
  margin-inline: var(--v3a-write-pad);
}

.v3a-grid {
  display: grid;
  gap: calc(var(--spacing) * 4);
}

.v3a-grid.stats {
  margin-bottom: calc(var(--spacing) * 8);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 48rem) {
  .v3a-grid.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.v3a-grid.charts {
  gap: calc(var(--spacing) * 6);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 64rem) {
  .v3a-grid.charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.v3a-statsgrid {
  margin-bottom: calc(var(--spacing) * 8);
  gap: calc(var(--spacing) * 4);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 48rem) {
  .v3a-statsgrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.v3a-statcard {
  padding: calc(var(--spacing) * 5);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-xl);
  background: var(--content-bg);
  transition: box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.v3a-statcard:hover {
  box-shadow: var(--content-shadow-hover);
}

.v3a-statlabel {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 500;
  margin-bottom: calc(var(--spacing) * 1);
}

.v3a-statvalue {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(0, 0, 0, 0.88);
}

.v3a-stathint {
  margin-top: calc(var(--spacing) * 2);
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

.v3a-staticon {
  position: absolute;
  right: calc(var(--spacing) * 4);
  top: calc(var(--spacing) * 4);
  width: calc(var(--spacing) * 8);
  height: calc(var(--spacing) * 8);
  color: rgba(0, 0, 0, 0.12);
}

.v3a-staticon svg {
  width: 100%;
  height: 100%;
}

.v3a-chartsgrid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* mx-admin: 2 columns */
  gap: 16px; /* mx-admin: gap-4 */
}

@media (max-width: 48rem) {
  .v3a-chartsgrid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.v3a-chartcard {
  border-radius: var(--radius-lg); /* mx-admin: rounded-lg */
  border: 1px solid var(--sidebar-border); /* mx-admin: border-neutral-200 */
  background: #fff;
  overflow: hidden;
}

.v3a-charttitle {
  font-size: 14px; /* mx-admin: text-sm */
  font-weight: 500;
  color: #404040; /* mx-admin: text-neutral-700 */
  margin: 0;
}

.v3a-quickactions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 2);
}

.v3a-chipbtn {
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fafafa;
  color: rgba(0, 0, 0, 0.75);
  font-size: 12px;
  cursor: pointer;
}

.v3a-chipbtn:hover {
  background: #f5f5f5;
}

.v3a-chipbtn.active {
  border-color: rgba(0, 0, 0, 0.08);
  background: var(--color-primary-shallow);
  color: var(--color-primary);
}

/* Dashboard grid (keep legacy class name) */
.v3a-dashboard {
  display: grid;
  gap: calc(var(--spacing) * 6);
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 64rem) {
  .v3a-dashboard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .v3a-dashboard .v3a-card:first-child {
    grid-column: span 2;
  }
}

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

@media (max-width: 64rem) {
  .v3a-grid.two {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

.v3a-write-shell {
  position: relative;
}

.v3a-write-main {
  min-width: 0;
}

.v3a-write-editor {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: calc(100dvh - 72px);
}

.v3a-write-editor-header {
  padding: calc(var(--spacing) * 6) var(--v3a-write-pad)
    calc(var(--spacing) * 2);
  border-bottom: 0;
}

.v3a-write-title {
  width: 100%;
  background: transparent;
  outline: none;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: calc(var(--spacing) * 3) calc(var(--spacing) * 2);
  font-size: 24px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
}

.v3a-write-title::placeholder {
  color: #a3a3a3;
}

.v3a-write-subtitle {
  margin-top: calc(var(--spacing) * 2);
  padding-left: calc(var(--spacing) * 2);
}

.v3a-write-subline {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  padding: 0;
  font-size: 14px;
  color: var(--v3a-muted);
  min-width: 0;
}

.v3a-write-baseurl {
  user-select: none;
  color: #a3a3a3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.v3a-write-baseurl-suffix {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  flex: 0 0 auto;
}

.v3a-write-slug {
  background: transparent;
  outline: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0 2px;
  color: #525252;
  min-width: 0;
  max-width: 100%;
  transition: border-color 0.15s ease;
}

.v3a-write-slug::placeholder {
  color: #a3a3a3;
}

.v3a-write-slug:hover {
  border-bottom-color: var(--sidebar-border);
}

.v3a-write-slug:focus {
  border-bottom-color: #a3a3a3;
}

.v3a-write-editor-content {
  min-width: 0;
  padding: 0 var(--v3a-write-pad) 0;
  flex: 1;
  min-height: 0;
  display: flex;
}

.v3a-write-textarea {
  width: 100%;
  min-height: 60vh;
  padding: 0 calc(var(--spacing) * 2);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: rgba(0, 0, 0, 0.82);
  font-size: 16px;
  line-height: 1.8;
  resize: none;
}

.v3a-vditor {
  width: 100%;
  flex: 1;
  min-width: 0;
}

.v3a-vditor .vditor {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.v3a-vditor .vditor-toolbar {
  position: sticky;
  top: var(--v3a-vditor-toolbar-top, 0px);
  z-index: 70;
  border-bottom: 1px solid var(--sidebar-border);
  background: var(--content-bg);
}

.v3a-vditor .vditor-content {
  border: 0;
  background: transparent;
}

.v3a-vditor .vditor-reset {
  font-family: inherit;
}

.v3a-write-side {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(92vw, 380px);
  max-height: none;
  padding: 0;
  background: #fff;
  border-left: 1px solid var(--sidebar-border);
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
  box-shadow: var(--content-shadow-hover);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 100;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.v3a-write-side.open {
  transform: translateX(0);
}

.v3a-write-side-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  z-index: 90;
}

.v3a-modal-mask {
  position: fixed;
  inset: 0;
  padding: 24px;
  background: rgba(0, 0, 0, 0.35);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v3a-tour-mask {
  position: fixed;
  inset: 0;
  z-index: 2100;
}

.v3a-tour-blocker {
  position: absolute;
  inset: 0;
  background: transparent;
}

.v3a-tour-spotlight {
  position: fixed;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
  transition: top 0.15s ease, left 0.15s ease, width 0.15s ease,
    height 0.15s ease;
}

.v3a-tour-bubble {
  position: fixed;
  width: min(360px, calc(100vw - 24px));
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.08),
    0 3px 6px 0 rgba(0, 0, 0, 0.06), 0 5px 12px 4px rgba(0, 0, 0, 0.04);
  padding: 14px 14px 12px;
  overflow: auto;
  overscroll-behavior: contain;
  pointer-events: auto;
}

.v3a-tour-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.v3a-tour-title {
  font-size: 14px;
  font-weight: 650;
  color: #171717;
}

.v3a-tour-progress {
  margin-left: auto;
  font-size: 12px;
  color: var(--v3a-muted);
}

.v3a-tour-desc {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.75);
}

.v3a-tour-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.v3a-modal-card {
  width: 480px;
  max-width: 90vw;
  border-radius: var(--radius-xl);
  border: 1px solid #e5e5e5;
  background: #fff;
  box-shadow: 0 1px 2px -2px rgba(0, 0, 0, 0.08),
    0 3px 6px 0 rgba(0, 0, 0, 0.06), 0 5px 12px 4px rgba(0, 0, 0, 0.04);
  position: relative;
}

.v3a-modal-head {
  padding: 19px 24px 0;
  text-align: center;
}

.v3a-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #171717;
}

.v3a-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 22px;
  height: 22px;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(102, 102, 102, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v3a-modal-close:hover {
  background: rgba(23, 23, 23, 0.09);
}

.v3a-modal-close:active {
  background: rgba(23, 23, 23, 0.13);
}

.v3a-modal-body {
  padding: 20px 24px 24px;
}

.v3a-modal-card.v3a-plugin-config-modal {
  width: min(820px, 96vw);
  max-width: 96vw;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.v3a-modal-card.v3a-plugin-config-modal .v3a-modal-head {
  flex: 0 0 auto;
}

.v3a-modal-card.v3a-plugin-config-modal .v3a-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 14px;
}

.v3a-plugin-config-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.v3a-modal-card.v3a-permission-info-modal {
  width: min(980px, 96vw);
  max-width: 96vw;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.v3a-modal-card.v3a-permission-info-modal .v3a-modal-head {
  flex: 0 0 auto;
}

.v3a-modal-card.v3a-permission-info-modal .v3a-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.v3a-modal-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: var(--v3a-muted);
}

.v3a-plugin-config-legacy {
  padding: 0 2px 2px;
  font-size: 12px;
}

.v3a-plugin-config-legacy form {
  margin: 0;
}

.v3a-plugin-config-legacy ul.typecho-option {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.v3a-plugin-config-legacy ul.typecho-option > li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 10px 16px;
  align-items: start;
}

.v3a-plugin-config-legacy ul.typecho-option > li:last-child {
  border-bottom: 0;
}

.v3a-plugin-config-legacy ul.typecho-option > li > .typecho-label:only-child {
  grid-column: 1 / -1;
  padding-top: 0;
}

.v3a-plugin-config-legacy ul.typecho-option > li > .typecho-label {
  grid-column: 1;
  margin: 0;
  padding-top: 6px;
}

.v3a-plugin-config-legacy ul.typecho-option > li > .typecho-label.v3a-typecho-label-heading {
  grid-column: 1 / -1;
  padding-top: 0;
}

.v3a-plugin-config-legacy ul.typecho-option > li > .typecho-label.v3a-typecho-label-heading ~ * {
  grid-column: 1 / -1;
}

.v3a-plugin-config-legacy ul.typecho-option > li.v3a-typecho-option-heading {
  grid-template-columns: 1fr;
}

.v3a-plugin-config-legacy ul.typecho-option > li.v3a-typecho-option-heading > :not(.typecho-label) {
  grid-column: 1 / -1;
}

.v3a-plugin-config-legacy ul.typecho-option > li > :not(.typecho-label) {
  grid-column: 2;
}

.v3a-plugin-config-legacy ul.typecho-option > li > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.v3a-plugin-config-legacy .typecho-label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--v3a-text);
}

.v3a-plugin-config-legacy .typecho-label h2,
.v3a-plugin-config-legacy .typecho-label h3 {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--v3a-text);
  line-height: 1.3;
}

.v3a-plugin-config-legacy ul.typecho-option > li.v3a-typecho-option-heading > .typecho-label,
.v3a-plugin-config-legacy ul.typecho-option > li.v3a-typecho-option-heading > .typecho-label h2,
.v3a-plugin-config-legacy ul.typecho-option > li.v3a-typecho-option-heading > .typecho-label h3 {
  color: var(--v3a-danger);
}

.v3a-plugin-config-legacy .description {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--v3a-muted);
}

.v3a-plugin-config-legacy input[type="text"],
.v3a-plugin-config-legacy input[type="url"],
.v3a-plugin-config-legacy input[type="password"],
.v3a-plugin-config-legacy input[type="email"],
.v3a-plugin-config-legacy input[type="number"],
.v3a-plugin-config-legacy select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  outline: none;
  background: #fff;
  color: rgba(0, 0, 0, 0.82);
  font-size: 12px;
}

.v3a-plugin-config-legacy textarea {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  outline: none;
  background: #fff;
  color: rgba(0, 0, 0, 0.82);
  font-size: 12px;
  line-height: 1.7;
  resize: vertical;
}

.v3a-plugin-config-legacy input[type="text"]:focus,
.v3a-plugin-config-legacy input[type="url"]:focus,
.v3a-plugin-config-legacy input[type="password"]:focus,
.v3a-plugin-config-legacy input[type="email"]:focus,
.v3a-plugin-config-legacy input[type="number"]:focus,
.v3a-plugin-config-legacy select:focus,
.v3a-plugin-config-legacy textarea:focus {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

.v3a-plugin-config-legacy input[type="checkbox"],
.v3a-plugin-config-legacy input[type="radio"] {
  margin-right: 6px;
}

.v3a-plugin-config-legacy .btn,
.v3a-plugin-config-legacy button,
.v3a-plugin-config-legacy input[type="button"],
.v3a-plugin-config-legacy input[type="submit"] {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--v3a-text);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

@media (max-width: 48rem) {
  .v3a-plugin-config-legacy ul.typecho-option > li {
    grid-template-columns: 1fr;
  }

  .v3a-plugin-config-legacy ul.typecho-option > li > .typecho-label,
  .v3a-plugin-config-legacy ul.typecho-option > li > :not(.typecho-label) {
    grid-column: 1 / -1;
  }

  .v3a-plugin-config-legacy ul.typecho-option > li > .typecho-label {
    padding-top: 0;
  }
}

.v3a-plugin-config-legacy .btn:hover,
.v3a-plugin-config-legacy button:hover,
.v3a-plugin-config-legacy input[type="button"]:hover,
.v3a-plugin-config-legacy input[type="submit"]:hover {
  background: rgba(0, 0, 0, 0.04);
}

.v3a-plugin-config-legacy .btn:active,
.v3a-plugin-config-legacy button:active,
.v3a-plugin-config-legacy input[type="button"]:active,
.v3a-plugin-config-legacy input[type="submit"]:active {
  background: rgba(0, 0, 0, 0.06);
}

.v3a-plugin-config-legacy .primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

.v3a-plugin-config-legacy .primary:hover {
  border-color: var(--color-primary-shallow);
  background: var(--color-primary-shallow);
}

.v3a-plugin-config-legacy .btn-warn {
  border-color: var(--v3a-danger);
  background: var(--v3a-danger);
  color: #fff;
}

.v3a-plugin-config-legacy .btn-warn:hover {
  border-color: #b72844;
  background: #b72844;
}

.v3a-plugin-config-legacy ul.typecho-option.typecho-option-submit,
.v3a-plugin-config-legacy ul.typecho-option-submit {
  display: none;
}

.v3a-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v3a-modal-card .v3a-input,
.v3a-modal-card .v3a-select {
  width: 100%;
}

.v3a-modal-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3a-modal-label {
  font-size: 14px;
  font-weight: 400;
  color: #171717;
}

.v3a-modal-input {
  font-size: 14px;
}

.v3a-modal-textarea {
  min-height: 90px;
}

.v3a-json-field-editor {
  height: 320px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.v3a-json-field-editor .cm-editor {
  height: 100%;
}

.v3a-json-field-editor .cm-scroller {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.v3a-json-field-editor .cm-gutters {
  background: rgba(0, 0, 0, 0.02);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.v3a-modal-feedback {
  font-size: 12px;
  color: var(--v3a-danger);
  line-height: 1.6;
}

.v3a-feedback {
  font-size: 12px;
  color: var(--v3a-danger);
  line-height: 1.6;
}

.v3a-permalink-rewrite-hint {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v3a-permalink-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3a-permalink-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--v3a-muted);
  line-height: 1.5;
  cursor: pointer;
}

.v3a-permalink-option-text {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.v3a-permalink-custom {
  width: 100%;
  max-width: 360px;
}

.v3a-modal-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.v3a-modal-card.v3a-plugin-config-modal .v3a-modal-actions {
  margin-top: 12px;
}

.v3a-modal-actions .v3a-modal-btn {
  border-radius: 34px;
  padding: 0 18px;
  font-size: 14px;
}

.v3a-modal-card .v3a-input.v3a-input-error {
  border-color: var(--v3a-danger);
}

.v3a-modal-card .v3a-input.v3a-input-error:focus {
  border-color: var(--v3a-danger);
  box-shadow: 0 0 0 2px rgba(208, 48, 80, 0.2);
}

.v3a-write-drawer-header {
  position: relative;
  padding: 16px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: var(--v3a-text);
}

.v3a-write-drawer-title {
  flex: 1;
  min-width: 0;
  padding-right: 44px;
}

.v3a-write-drawer-close {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 2px;
  color: rgba(102, 102, 102, 1);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.v3a-write-drawer-close:hover {
  background: rgba(23, 23, 23, 0.09);
}

.v3a-write-drawer-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2);
}

.v3a-write-drawer-close .v3a-icon,
.v3a-write-drawer-close .v3a-icon svg {
  width: 12px;
  height: 12px;
}

.v3a-write-drawer-body {
  flex: 1 0 0;
  overflow: auto;
  padding: 16px 20px;
}

.v3a-write-side .v3a-kv > * {
  min-width: 0;
}

.v3a-write-side .v3a-input,
.v3a-write-side .v3a-select,
.v3a-write-side .v3a-textarea {
  width: 100%;
  min-width: 0;
}

.v3a-write-side .v3a-table {
  table-layout: fixed;
}

.v3a-write-side .v3a-divider {
  display: none;
}

.v3a-write-side .v3a-kv {
  margin-top: calc(var(--spacing) * 6);
}

.v3a-write-section {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 3);
}

.v3a-write-section-head {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  margin-bottom: calc(var(--spacing) * 1);
}

.v3a-write-section-head .v3a-icon,
.v3a-write-section-head .v3a-icon svg {
  width: 16px;
  height: 16px;
  color: rgba(0, 0, 0, 0.45);
}

.v3a-write-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.55);
}

.v3a-write-formitem {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 2);
}

.v3a-write-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
}

.v3a-required {
  margin-left: 2px;
  color: var(--v3a-danger);
}

.v3a-write-select {
  position: relative;
  width: 100%;
}

.v3a-write-select-trigger {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--sidebar-border);
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: #404040;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.v3a-write-select-trigger:hover {
  border-color: #404040;
}

.v3a-write-select-trigger:focus-visible {
  border-color: #404040;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2);
}

.v3a-write-select-value {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-size: 13px;
}

.v3a-write-select-value.placeholder {
  color: rgba(194, 194, 194, 1);
}

.v3a-write-select-arrow {
  color: rgba(194, 194, 194, 1);
  transition: transform 0.15s ease;
  transform: rotate(90deg);
}

.v3a-write-select.open .v3a-write-select-arrow {
  transform: rotate(-90deg);
}

.v3a-write-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 10;
  max-height: 240px;
  overflow: auto;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--content-shadow-hover);
}

.v3a-write-select-option {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  gap: 8px;
}

.v3a-write-select-option:hover {
  background: rgba(0, 0, 0, 0.04);
}

.v3a-write-select-option.selected,
.v3a-write-select-option.active {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.9);
}

.v3a-write-select-option-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3a-write-categorybox {
  max-height: 160px;
  overflow: auto;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
}

.v3a-write-categorybox:focus-within {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

.v3a-write-categoryitem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.v3a-write-categoryname {
  min-width: 0;
}

.v3a-write-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.v3a-write-category-tags {
  position: relative;
}

.v3a-write-placeholder {
  font-size: 12px;
  color: rgba(194, 194, 194, 1);
  user-select: none;
}

.v3a-write-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 7px;
  border-radius: 2px;
  border: 1px solid var(--sidebar-border);
  background: rgb(250, 250, 252);
  color: #404040;
  font-size: 12px;
  max-width: 100%;
}

.v3a-write-tag-remove {
  width: 18px;
  height: 18px;
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(102, 102, 102, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 4px;
  border-radius: 2px;
}

.v3a-write-tag-remove:hover {
  background: rgba(23, 23, 23, 0.09);
}

.v3a-write-tag-remove .v3a-icon,
.v3a-write-tag-remove .v3a-icon svg {
  width: 14px;
  height: 14px;
}

.v3a-write-tag-editor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.v3a-write-tag-suggest {
  left: 0;
  right: auto;
  min-width: 180px;
  width: max-content;
  max-width: min(320px, calc(100vw - 48px));
}

.v3a-write-tags-input {
  height: 28px;
  width: 64px;
  padding: 0 12px;
  border: 1px solid var(--sidebar-border);
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: rgba(0, 0, 0, 0.82);
  font-size: 14px;
}

.v3a-write-tags-input:focus {
  border-color: #404040;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2);
}

.v3a-write-tags-add {
  height: 28px;
  border-radius: 6px;
  border: 1px dashed var(--sidebar-border);
  background: transparent;
  padding: 0 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.72);
}

.v3a-write-tags-add:hover {
  border-color: #404040;
  background: transparent;
}

.v3a-write-tags-add .v3a-icon,
.v3a-write-tags-add .v3a-icon svg {
  width: 16px;
  height: 16px;
}

@media (max-width: 48rem) {
  .v3a-sidebar,
  .v3a-subsidebar {
    display: none;
  }
}

.v3a-card {
  background: var(--content-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: 4px;
  box-shadow: var(--content-shadow);
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

.v3a-card:hover {
  box-shadow: var(--content-shadow-hover);
}

.v3a-card .hd {
  padding: calc(var(--spacing) * 4) calc(var(--spacing) * 5);
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing) * 4);
}

.v3a-card .hd .title {
  font-size: 13px;
  color: var(--v3a-muted);
  font-weight: 500;
}

.v3a-card .bd {
  padding: calc(var(--spacing) * 5);
}

.v3a-stat {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 1);
}

.v3a-stat .value {
  font-size: 24px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.v3a-stat .hint {
  font-size: 12px;
  color: var(--v3a-muted);
}

.v3a-chart {
  width: 100%;
  height: 250px; /* mx-admin: 250px */
}

.v3a-alert {
  margin-bottom: calc(var(--spacing) * 4);
  padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4);
  border-radius: var(--radius-md);
  border: 1px solid rgba(208, 48, 80, 0.25);
  background: rgba(208, 48, 80, 0.08);
  color: rgba(0, 0, 0, 0.85);
  font-size: 13px;
}

.v3a-list {
  max-height: 250px;
  overflow: auto;
  padding: 0 16px 12px; /* mx-admin: px-4 pb-3 */
  display: flex;
  flex-direction: column;
  gap: 4px; /* mx-admin: space-y-1 */
}

.v3a-list .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px; /* mx-admin: gap-3 */
  padding: 6px 8px; /* mx-admin: px-2 py-1.5 */
  border-radius: var(--radius-md);
  transition: background-color 0.15s ease;
}

.v3a-list .row:hover {
  background: #f5f5f5; /* mx-admin: hover:bg-neutral-100 */
}

.v3a-rank {
  width: 20px; /* mx-admin: h-5 */
  height: 20px; /* mx-admin: w-5 */
  padding: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px; /* mx-admin: text-xs */
  font-weight: 500;
  color: #a3a3a3; /* mx-admin: text-neutral-400 */
}

.v3a-rank.top {
  background: #171717; /* mx-admin: bg-neutral-900 */
  color: #fff;
}

.v3a-list .row > .v3a-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  color: #a3a3a3; /* mx-admin: text-neutral-400 */
  font-size: 12px; /* mx-admin: text-xs */
}

.v3a-list .row > .v3a-badge .v3a-icon {
  width: 12px;
  height: 12px;
}

.v3a-list .row > .v3a-badge .v3a-icon svg {
  width: 12px;
  height: 12px;
}

.row-left {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  min-width: 0;
}

.row-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v3a-list .row-title {
  font-size: 14px; /* mx-admin: text-sm */
  color: #404040; /* mx-admin: text-neutral-700 */
}

.v3a-list .row:hover .row-title {
  color: #171717; /* mx-admin: group-hover:text-neutral-900 */
}

.v3a-tags {
  height: 250px;
  overflow: auto;
  padding: 0 16px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.v3a-tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fafafa;
  border: 1px solid var(--sidebar-border);
  font-size: 12px;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-empty {
  font-size: 14px;
  color: var(--v3a-muted);
  padding: 8px 16px 12px;
}

.v3a-list .v3a-empty {
  padding: 8px 0 12px;
}

/* Dashboard (mx-admin aligned) */
.v3a-dash-head {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
  margin: 0 0 24px;
}

.v3a-dash-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-dash-actions {
  margin-left: auto;
}

.v3a-section {
  margin-bottom: calc(var(--spacing) * 8); /* 32px (mx-admin: mb-8) */
}

.v3a-section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing) * 3);
}

.v3a-section-title {
  font-size: 18px; /* mx-admin: text-lg */
  font-weight: 500; /* mx-admin: font-medium */
  color: #404040; /* mx-admin: text-neutral-700 */
}

.v3a-section-tools {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  font-size: 12px; /* mx-admin: text-xs */
  color: #a3a3a3; /* mx-admin: text-neutral-400 */
}

.v3a-section-tools .v3a-muted {
  font-size: 12px;
  color: #a3a3a3;
}

.v3a-section-tools .v3a-iconbtn {
  margin-left: 0;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
}

.v3a-section-tools .v3a-iconbtn:hover {
  background: transparent;
}

.v3a-section-tools .v3a-icon {
  width: 14px;
  height: 14px;
}

.v3a-section-tools .v3a-icon svg {
  width: 14px;
  height: 14px;
}

.v3a-section-line {
  margin-top: 8px; /* mx-admin: mt-2 */
  margin-bottom: 16px; /* mx-admin: mb-4 (applied to header block) */
  height: 1px;
  background: #e5e5e5; /* mx-admin: bg-neutral-200 */
}

.v3a-realtime-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px; /* mx-admin: gap-3 */
}

.v3a-realtime-card {
  display: flex;
  align-items: center;
  gap: 16px; /* mx-admin: gap-4 */
  border-radius: var(--radius-lg); /* mx-admin: rounded-lg */
  background: #fafafa; /* mx-admin: bg-neutral-50 */
  padding: 16px; /* mx-admin: p-4 */
}

.v3a-realtime-meta {
  min-width: 0;
}

.v3a-realtime-icon {
  position: relative;
  flex: 0 0 auto;
  color: #a3a3a3; /* mx-admin: text-neutral-400 */
}

.v3a-realtime-icon .v3a-icon {
  width: 24px;
  height: 24px;
}

.v3a-realtime-icon .v3a-icon svg {
  width: 24px;
  height: 24px;
}

.v3a-realtime-icon.online .dot {
  position: absolute;
  right: -4px; /* mx-admin: -right-1 */
  top: -4px; /* mx-admin: -top-1 */
  width: 10px; /* mx-admin: h-2.5 */
  height: 10px; /* mx-admin: w-2.5 */
}

.v3a-realtime-icon.online .dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #4ade80; /* green-400 */
  opacity: 0.75;
  animation: v3a-ping 1.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.v3a-realtime-icon.online .dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #22c55e; /* green-500 */
}

@keyframes v3a-ping {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.v3a-realtime-value {
  font-size: 20px; /* mx-admin: text-xl */
  font-weight: 600; /* mx-admin: font-semibold */
  font-variant-numeric: tabular-nums;
}

.v3a-realtime-label {
  font-size: 14px; /* mx-admin: text-sm */
  color: #737373; /* mx-admin: text-neutral-500 */
}

.v3a-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px; /* mx-admin: gap-x-4 */
  row-gap: 4px; /* mx-admin: gap-y-1 */
}

@media (min-width: 40rem) {
  .v3a-quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* mx-admin: sm:grid-cols-4 */
  }
}

.v3a-quick-item {
  border-radius: var(--radius-md); /* mx-admin: rounded-md */
  padding: 12px; /* mx-admin: p-3 */
  transition: background-color 0.15s ease;
}

.v3a-quick-item:hover,
.v3a-quick-item:focus-within {
  background: #f5f5f5; /* mx-admin: hover:bg-neutral-100 */
}

.v3a-quick-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px; /* mx-admin: gap-2 */
}

.v3a-quick-name {
  font-size: 14px; /* mx-admin: text-sm */
  color: #737373; /* mx-admin: text-neutral-500 */
}

.v3a-quick-icon {
  margin-top: 4px; /* mx-admin: mt-1 */
  flex: 0 0 auto;
  color: #a3a3a3; /* mx-admin: text-neutral-400 */
  display: inline-flex;
}

.v3a-quick-icon svg {
  width: 24px;
  height: 24px;
}

.v3a-quick-count {
  margin-top: 4px; /* mx-admin: mt-1 */
  font-size: 20px; /* mx-admin: text-xl */
  font-weight: 600; /* mx-admin: font-semibold */
  font-variant-numeric: tabular-nums;
}

.v3a-quick-btns {
  margin-top: 12px; /* mx-admin: mt-3 */
  display: flex;
  align-items: center;
  gap: 8px; /* mx-admin: gap-2 */
}

.v3a-mini-btn {
  height: 28px; /* mx-admin: n-button small */
  padding: 0 10px;
  border-radius: 6px; /* mx-admin: radius 6 */
  border: 1px solid #e5e5e5;
  background: rgba(23, 23, 23, 0.05);
  font-size: 12px;
  color: #404040;
  cursor: pointer;
}

.v3a-mini-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.v3a-mini-btn:hover {
  background: rgba(23, 23, 23, 0.09);
}

.v3a-mini-btn:active {
  background: rgba(23, 23, 23, 0.13);
}

.v3a-mini-btn.primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.v3a-mini-btn.primary:hover {
  background: var(--color-primary-shallow);
  border-color: var(--color-primary-shallow);
}

.v3a-mini-btn.primary:active {
  background: var(--color-primary-deep);
  border-color: var(--color-primary-deep);
}

.v3a-table td .v3a-mini-btn {
  border: 0;
  background: transparent;
  padding: 0;
  height: auto;
  line-height: 1.6;
  border-radius: 0;
  vertical-align: middle;
}

.v3a-table td .v3a-mini-btn + .v3a-mini-btn {
  margin-left: 12px;
}

.v3a-table td .v3a-mini-btn:hover {
  background: transparent;
  text-decoration: underline;
}

.v3a-table td .v3a-mini-btn:active {
  background: transparent;
}

.v3a-table td .v3a-mini-btn.primary {
  color: rgb(37, 99, 235);
}

.v3a-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px; /* mx-admin: gap-x-4 */
  row-gap: 4px; /* mx-admin: gap-y-1 */
}

@media (min-width: 40rem) {
  .v3a-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* mx-admin: sm:grid-cols-3 */
  }
}

@media (min-width: 48rem) {
  .v3a-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* mx-admin: md:grid-cols-4 */
  }
}

@media (min-width: 64rem) {
  .v3a-metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)); /* mx-admin: lg:grid-cols-6 */
  }
}

.v3a-metric-item {
  display: flex;
  align-items: center;
  gap: 12px; /* mx-admin: gap-3 */
  border-radius: var(--radius-md); /* mx-admin: rounded-md */
  padding: 12px; /* mx-admin: p-3 */
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.v3a-metric-item:hover {
  background: #f5f5f5; /* mx-admin: hover:bg-neutral-100 */
}

.v3a-metric-icon {
  flex: 0 0 auto;
  color: #a3a3a3; /* mx-admin: text-neutral-400 */
  display: inline-flex;
}

.v3a-metric-icon svg {
  width: 24px;
  height: 24px;
}

.v3a-metric-meta {
  min-width: 0;
  flex: 1;
}

.v3a-metric-label {
  font-size: 14px; /* mx-admin: text-sm */
  color: #737373; /* mx-admin: text-neutral-500 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v3a-metric-value {
  font-size: 20px; /* mx-admin: text-xl */
  font-weight: 500; /* mx-admin: font-medium */
  font-variant-numeric: tabular-nums;
}

.v3a-charthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px; /* mx-admin: py-3 px-4 */
}

.v3a-charticon {
  display: inline-flex;
  color: #a3a3a3; /* mx-admin: text-neutral-400 */
}

.v3a-charticon svg {
  width: 14px;
  height: 14px;
  display: block;
  overflow: visible;
}

/* Page building blocks (Plan1) */
.v3a-head-left {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  min-width: 0;
}

.v3a-collapse-btn {
  margin-left: 0;
  flex: 0 0 auto;
}

.v3a-pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing) * 4);
  margin-bottom: calc(var(--spacing) * 4);
}

.v3a-pagehead-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-pagehead-actions {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
  flex-wrap: wrap;
}

.v3a-pagehead.v3a-pagehead-sticky {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--content-bg);
  border-bottom: 0;
}

.v3a-write-side-toggle {
  order: 99;
}

.v3a-posts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing) * 4);
  margin-bottom: calc(var(--spacing) * 4);
}

.v3a-posts-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-posts-actions {
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 2);
}

.v3a-actionbtn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.v3a-actionbtn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.v3a-actionbtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.v3a-actionbtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2);
}

.v3a-actionbtn.danger {
  background: rgba(208, 48, 80, 0.12);
  color: var(--v3a-danger);
}

.v3a-actionbtn.success {
  background: rgba(24, 160, 88, 0.12);
  color: rgb(24, 160, 88);
}

.v3a-actionbtn.warn {
  background: rgba(240, 160, 32, 0.14);
  color: rgb(240, 160, 32);
}

.v3a-actionbtn.primary {
  background: rgba(37, 99, 235, 0.12);
  color: rgb(37, 99, 235);
}

.v3a-actionbtn.primary:hover {
  background: rgba(37, 99, 235, 0.18);
}

.v3a-actionbtn.primary.active {
  background: rgba(37, 99, 235, 0.22);
  color: rgb(29, 78, 216);
}

.v3a-actionbtn.primary:focus-visible {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.v3a-actionbtn .v3a-icon {
  width: 18px;
  height: 18px;
}

.v3a-actionbtn .v3a-icon svg {
  width: 18px;
  height: 18px;
}

.v3a-actionbtn.v3a-actionbtn-lg {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.v3a-actionbtn.v3a-actionbtn-lg .v3a-icon,
.v3a-actionbtn.v3a-actionbtn-lg .v3a-icon svg {
  width: 20px;
  height: 20px;
}

.v3a-posts-search {
  margin-bottom: calc(var(--spacing) * 4);
  display: flex;
  align-items: center;
  gap: calc(var(--spacing) * 3);
}

.v3a-searchbox {
  position: relative;
  width: 360px;
  max-width: 100%;
}

.v3a-searchbox .v3a-input {
  width: 100%;
  padding-left: 34px;
}

.v3a-searchbox-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #a3a3a3;
  pointer-events: none;
  display: inline-flex;
}

.v3a-searchbox-icon svg {
  width: 16px;
  height: 16px;
}

.v3a-check {
  --v3a-check-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3C/svg%3E");
  --v3a-check-icon-checked: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  --v3a-check-icon-indeterminate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='3' rx='2'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");

  width: 18px;
  height: 18px;
  appearance: none;
  -webkit-appearance: none;
  background-color: currentColor;
  color: rgba(0, 0, 0, 0.38);
  display: inline-block;
  vertical-align: middle;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  margin: 0;
  flex: 0 0 auto;
  -webkit-mask: var(--v3a-check-icon) no-repeat center / contain;
  mask: var(--v3a-check-icon) no-repeat center / contain;
}

.v3a-check:hover {
  color: rgba(0, 0, 0, 0.55);
}

.v3a-check:checked {
  color: var(--color-primary);
  -webkit-mask-image: var(--v3a-check-icon-checked);
  mask-image: var(--v3a-check-icon-checked);
}

.v3a-check:indeterminate {
  color: var(--color-primary);
  -webkit-mask-image: var(--v3a-check-icon-indeterminate);
  mask-image: var(--v3a-check-icon-indeterminate);
}

.v3a-check:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

.v3a-check:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.v3a-posts-table th:nth-child(1),
.v3a-posts-table td:nth-child(1) {
  width: 44px;
}

.v3a-posts-table th:nth-child(5),
.v3a-posts-table th:nth-child(6),
.v3a-posts-table td:nth-child(5),
.v3a-posts-table td:nth-child(6) {
  width: 86px;
  text-align: center;
}

.v3a-posts-table th:nth-child(10),
.v3a-posts-table td:nth-child(10) {
  width: 80px;
  text-align: right;
}

.v3a-posts-table .v3a-pill .v3a-icon {
  width: 14px;
  height: 14px;
}

.v3a-posts-table .v3a-pill .v3a-icon svg {
  width: 14px;
  height: 14px;
}

.v3a-taxonomy-table-tags th:nth-child(3),
.v3a-taxonomy-table-tags td:nth-child(3) {
  width: 86px;
  text-align: center;
}

.v3a-taxonomy-table-tags th:nth-child(4),
.v3a-taxonomy-table-tags td:nth-child(4) {
  width: 140px;
  text-align: right;
}

.v3a-taxonomy-table-cats th:nth-child(2),
.v3a-taxonomy-table-cats td:nth-child(2) {
  width: 96px;
  text-align: center;
}

.v3a-taxonomy-table-cats th:nth-child(5),
.v3a-taxonomy-table-cats td:nth-child(5) {
  width: 86px;
  text-align: center;
}

.v3a-taxonomy-table-cats th:nth-child(6),
.v3a-taxonomy-table-cats td:nth-child(6) {
  width: 140px;
  text-align: right;
}

.v3a-taxonomy-desc {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.v3a-pill.v3a-taxonomy-default-btn {
  display: none;
  cursor: pointer;
  border-color: rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.55);
}

.v3a-taxonomy-table-cats tbody tr:hover .v3a-pill.v3a-taxonomy-default-btn {
  display: inline-flex;
}

.v3a-pill.v3a-taxonomy-default-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.72);
}

.v3a-pill.v3a-taxonomy-default-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.v3a-link-danger {
  color: var(--v3a-danger);
  cursor: pointer;
}

.v3a-link-danger:hover {
  text-decoration: underline;
}

.v3a-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 84px;
  margin-top: 0;
}

.v3a-pagebtn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sidebar-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.v3a-pagebtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.v3a-pagecurrent {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  background: #fff;
}

.v3a-pagejump {
  width: 64px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  outline: none;
  background: #fff;
  font-size: 13px;
}

.v3a-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing) * 4);
  align-items: center;
}

.v3a-fieldrow {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 2);
  min-width: 180px;
  font-size: 13px;
  color: var(--v3a-muted);
}

.v3a-input,
.v3a-select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  outline: none;
  background: #fff;
  color: rgba(0, 0, 0, 0.82);
  font-size: 13px;
}

.v3a-textarea {
  width: 100%;
  min-height: 260px;
  padding: 10px;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  outline: none;
  background: #fff;
  color: rgba(0, 0, 0, 0.82);
  font-size: 13px;
  line-height: 1.7;
  resize: vertical;
}

.v3a-input:focus,
.v3a-select:focus,
.v3a-textarea:focus {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

.v3a-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.v3a-table th,
.v3a-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: left;
  vertical-align: middle;
}

.v3a-table thead th {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.55);
  background: #fafafa;
}

.v3a-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02);
}

.v3a-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--sidebar-border);
  background: #fff;
  color: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  white-space: nowrap;
}

.v3a-pill.success {
  border-color: rgba(24, 160, 88, 0.25);
  background: rgba(24, 160, 88, 0.08);
}

.v3a-pill.warn {
  border-color: rgba(240, 160, 32, 0.25);
  background: rgba(240, 160, 32, 0.08);
}

.v3a-pill.danger {
  border-color: rgba(208, 48, 80, 0.25);
  background: rgba(208, 48, 80, 0.08);
}

/* Friends */
.v3a-friends-tabs {
  display: flex;
  align-items: center;
  gap: 36px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  border-bottom: 0;
  margin-bottom: calc(var(--spacing) * 4);
  height: 44px;
}

.v3a-friends-tab {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: #171717;
  padding: 0;
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  position: relative;
}

.v3a-friends-tab:hover {
  background: transparent;
}

.v3a-friends-tab.active {
  font-weight: 500;
}

.v3a-friends-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: #171717;
}

.v3a-friends-count {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 0, 0, 0.06);
  color: #737373;
  font-variant-numeric: tabular-nums;
}

.v3a-friends-count.danger {
  background: rgba(208, 48, 80, 0.12);
  color: var(--v3a-danger);
}

.v3a-friends-tablecard .bd {
  overflow-x: auto;
}

.v3a-friends-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.7);
}

.v3a-friends-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v3a-friends-avatar-text {
  font-size: 13px;
  line-height: 1;
}

.v3a-friends-name {
  color: rgba(0, 0, 0, 0.82);
}

.v3a-friends-name:hover {
  text-decoration: underline;
}

.v3a-friends-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v3a-friends-message,
.v3a-friends-health {
  font-size: 12px;
  margin-top: 2px;
}

.v3a-kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: calc(var(--spacing) * 3) calc(var(--spacing) * 5);
  align-items: center;
}

.v3a-kv-span {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 2);
  align-items: flex-start;
}

.v3a-kv-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 48rem) {
  .v3a-kv {
    grid-template-columns: 1fr;
  }
}

.v3a-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: calc(var(--spacing) * 4) 0;
}

/* Settings (mx-admin like) */
.v3a-settings-user {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.v3a-settings-user.v3a-settings-user-wide {
  max-width: none;
  margin: 0;
}

.v3a-settings-user-head {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 0;
}

.v3a-settings-avatar {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  flex: 0 0 auto;
  background: #fafafa;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

.v3a-settings-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v3a-settings-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.55);
  background: #f5f5f5;
}

.v3a-settings-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.15s ease;
  color: #fff;
}

.v3a-settings-avatar:hover .v3a-settings-avatar-overlay {
  opacity: 1;
}

.v3a-settings-avatar-overlay .v3a-icon,
.v3a-settings-avatar-overlay .v3a-icon svg {
  width: 20px;
  height: 20px;
}

.v3a-settings-user-meta {
  flex: 1;
  min-width: 0;
}

.v3a-settings-user-name {
  font-size: 18px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.88);
}

.v3a-settings-user-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #737373;
}

.v3a-settings-user-pills {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.v3a-settings-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: #737373;
}

.v3a-settings-user-pill .v3a-icon,
.v3a-settings-user-pill .v3a-icon svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.v3a-settings-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.v3a-settings-section-hd {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v3a-settings-section-hd-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.v3a-settings-section-hd-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.v3a-settings-section-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.v3a-settings-section-icon .v3a-icon,
.v3a-settings-section-icon .v3a-icon svg {
  width: 16px;
  height: 16px;
}

.v3a-settings-section-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-settings-section-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: #737373;
}

.v3a-settings-fields {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.v3a-settings-row {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

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

.v3a-settings-row-label label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-settings-row-help {
  margin-top: 4px;
  font-size: 12px;
  color: #737373;
  line-height: 1.5;
}

.v3a-settings-row-control {
  min-width: 0;
}

.v3a-settings-row-control .v3a-input,
.v3a-settings-row-control .v3a-select,
.v3a-settings-row-control .v3a-textarea {
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 48rem) {
  .v3a-settings-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
  }

  .v3a-settings-row-label {
    width: 220px;
    max-width: 40%;
    flex: 0 0 auto;
  }

  .v3a-settings-row-control {
    flex: 1;
  }
}

.v3a-settings-actions {
  padding: 14px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.v3a-settings-savebar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v3a-settings-savehint {
  font-size: 12px;
  color: #737373;
  white-space: nowrap;
}

@media (max-width: 48rem) {
  .v3a-settings-savehint {
    display: none;
  }
}

/* Settings: switch + mail template */
.v3a-optionlist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.v3a-option-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.v3a-theme-shot {
  width: 180px;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.04);
}

.v3a-theme-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.v3a-theme-info {
  min-width: 0;
  flex: 1;
}

.v3a-theme-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-theme-meta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
}

.v3a-theme-meta a {
  margin-left: 8px;
}

.v3a-theme-desc {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
}

.v3a-theme-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.v3a-theme-row-item {
  cursor: pointer;
}

.v3a-theme-row-item.active {
  background: rgba(0, 0, 0, 0.02);
}

.v3a-theme-config-extra {
  padding: 0 16px 14px;
}

.v3a-theme-config-frame {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  min-height: 560px;
}

.v3a-mini-btn.v3a-mini-btn-link {
  border: 0;
  background: transparent;
  padding: 0;
  height: auto;
  line-height: 1.6;
  border-radius: 0;
}

.v3a-mini-btn.v3a-mini-btn-link:hover {
  background: transparent;
  text-decoration: underline;
}

.v3a-mini-btn.v3a-mini-btn-link:active {
  background: transparent;
}

.v3a-mini-btn.v3a-mini-btn-link:disabled {
  text-decoration: none;
}

.v3a-theme-editor {
  min-height: 360px;
}

/* Theme editor (split view, mx-admin like) */
.v3a-theme-edit {
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  overflow: hidden;
}

.v3a-theme-edit-split {
  display: grid;
  grid-template-columns: var(--v3a-theme-edit-left, 260px) 5px minmax(0, 1fr);
  height: clamp(560px, calc(100vh - 240px), 920px);
}

.v3a-theme-edit-left,
.v3a-theme-edit-right {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.v3a-theme-edit-left {
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  background: var(--content-bg);
}

.v3a-theme-edit-left-head {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.v3a-theme-edit-searchbox {
  width: 100%;
}

.v3a-theme-edit-search-input {
  width: 100%;
}

.v3a-theme-edit-tree {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 6px;
}

.v3a-theme-edit-tree-group {
  margin-bottom: 6px;
}

.v3a-theme-edit-tree-folder,
.v3a-theme-edit-tree-file {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
  color: rgba(0, 0, 0, 0.82);
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
}

.v3a-theme-edit-tree-folder:hover,
.v3a-theme-edit-tree-file:hover {
  background: rgba(0, 0, 0, 0.04);
}

.v3a-theme-edit-tree-folder.open {
  background: rgba(0, 0, 0, 0.03);
}

.v3a-theme-edit-tree-chev {
  display: inline-flex;
  color: #a3a3a3;
  transition: transform 0.15s ease;
}

.v3a-theme-edit-tree-chev.open {
  transform: rotate(90deg);
}

.v3a-theme-edit-tree-ico {
  display: inline-flex;
  color: #f59e0b;
}

.v3a-theme-edit-tree-ico.file {
  color: #fb923c;
}

.v3a-theme-edit-tree-ico .v3a-icon,
.v3a-theme-edit-tree-ico .v3a-icon svg {
  width: 16px;
  height: 16px;
}

.v3a-theme-edit-tree-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3a-theme-edit-tree-files {
  padding: 4px 0 4px 22px;
}

.v3a-theme-edit-tree-file {
  font-size: 12px;
  padding: 7px 10px;
}

.v3a-theme-edit-tree-file.active {
  background: var(--color-primary-shallow);
  color: #fff;
}

.v3a-theme-edit-tree-file.active .v3a-theme-edit-tree-ico,
.v3a-theme-edit-tree-file.active .v3a-icon {
  color: #fff;
}

.v3a-theme-edit-resizer {
  position: relative;
  cursor: col-resize;
  background: transparent;
}

.v3a-theme-edit-resizer::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 48px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease;
}

.v3a-theme-edit-resizer:hover::before {
  background: rgba(0, 0, 0, 0.35);
}

.v3a-theme-edit-right {
  background: var(--content-bg);
}

.v3a-theme-edit-right-head {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.v3a-theme-edit-right-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
}

.v3a-theme-edit-right-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
  min-width: 0;
}

.v3a-theme-edit-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.v3a-theme-edit-right-note {
  font-size: 12px;
  line-height: 1.6;
}

.v3a-theme-edit-dirty {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
  flex: 0 0 auto;
}

.v3a-theme-edit-editor {
  flex: 1;
  min-height: 0;
  position: relative;
}

.v3a-theme-edit-editor textarea.v3a-theme-editor {
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent;
  height: 100% !important;
  min-height: 0;
  resize: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.v3a-theme-edit-cm {
  height: 100%;
}

.v3a-theme-edit-cm .cm-editor {
  height: 100%;
}

.v3a-theme-edit-cm .cm-scroller {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.v3a-theme-edit-cm .cm-gutters {
  background: rgba(0, 0, 0, 0.02);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
}

.v3a-theme-edit-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(1px);
}

@media (max-width: 48rem) {
  .v3a-theme-edit-split {
    grid-template-columns: 1fr;
    height: auto;
  }
  .v3a-theme-edit-resizer {
    display: none;
  }
  .v3a-theme-edit-left {
    border-right: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }
  .v3a-theme-edit-editor {
    min-height: 420px;
  }
}

.v3a-settings-fields-table {
  padding: 0;
}

.v3a-settings-table th,
.v3a-settings-table td {
  padding: 14px 16px;
}

.v3a-settings-tablecard .v3a-table tbody tr:last-child td {
  border-bottom: 0;
}

.v3a-plugin-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-plugin-desc {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
}

.v3a-link {
  color: var(--color-primary);
  text-decoration: none;
}

.v3a-link:hover {
  text-decoration: underline;
}

@media (max-width: 48rem) {
  .v3a-theme-row {
    flex-direction: column;
    gap: 12px;
  }
  .v3a-theme-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

.v3a-switch {
  display: inline-flex;
  align-items: center;
  position: relative;
  cursor: pointer;
  user-select: none;
}

.v3a-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.v3a-switch-ui {
  width: 40px;
  height: 22px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.14);
  position: relative;
  transition: background-color 0.2s ease;
}

.v3a-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.3), inset 0 0 1px 0 rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.v3a-switch input:checked + .v3a-switch-ui {
  background: var(--color-primary);
}

.v3a-switch input:checked + .v3a-switch-ui::after {
  transform: translateX(18px);
}

.v3a-switch input:focus-visible + .v3a-switch-ui {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
}

.v3a-switch input:disabled + .v3a-switch-ui {
  opacity: 0.5;
  cursor: not-allowed;
}

.v3a-mailtpl-card {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.v3a-mailtpl-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fafafa;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.v3a-mailtpl-card-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.62);
}

.v3a-mailtpl-preview {
  padding: 12px;
  max-height: 260px;
  overflow: auto;
}

.v3a-mailtpl-vars {
  padding: 10px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fafafa;
  font-size: 12px;
  color: #737373;
  line-height: 1.6;
}

.v3a-mailtpl-vars-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.62);
  margin-bottom: 6px;
}

.v3a-settings-row-help code,
.v3a-mailtpl-vars code,
.v3a-muted code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.72);
  display: inline-block;
  margin: 2px 6px 2px 0;
}

.v3a-code-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
  line-height: 1.6;
  min-height: 260px;
  white-space: pre;
}

.v3a-container.v3a-container-files {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 0;
}

.v3a-files-card {
  border: 0;
  box-shadow: none;
  padding: calc(var(--spacing) * 1);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.v3a-files-card:hover {
  box-shadow: none;
}

.v3a-files-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.v3a-files-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 16px;
  background: var(--content-bg);
}

.v3a-filegrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: calc(var(--spacing) * 4);
}

@media (min-width: 40rem) {
  .v3a-filegrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 48rem) {
  .v3a-filegrid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .v3a-filegrid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 80rem) {
  .v3a-filegrid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.v3a-fileitem {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  position: relative;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  display: block;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.v3a-fileitem:hover {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.v3a-fileitem:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.2), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.v3a-fileitem.selected,
.v3a-fileitem.selected:hover {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.v3a-fileselect {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  padding: 2px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 30;
  transition: background-color 0.15s ease, color 0.15s ease;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}

.v3a-fileselect:hover {
  background: rgba(255, 255, 255, 0.18);
}

.v3a-fileselect.selected {
  color: #fff;
}

.v3a-fileselect:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.v3a-fileselect svg {
  width: 100%;
  height: 100%;
}

.v3a-fileselect.selected svg rect {
  fill: rgba(37, 99, 235, 1);
  stroke: rgba(37, 99, 235, 1);
}

.v3a-fileselect.selected svg path {
  stroke: #fff;
}

.v3a-fileitem img,
.v3a-fileitem video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v3a-filethumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a3a3a3;
  background: #fafafa;
}

.v3a-filethumb-fallback .v3a-icon,
.v3a-filethumb-fallback .v3a-icon svg {
  width: 24px;
  height: 24px;
}

.v3a-filethumb-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px;
  padding-top: 32px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  color: #fff;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.v3a-fileitem:hover .v3a-filethumb-overlay,
.v3a-fileitem:focus-visible .v3a-filethumb-overlay,
.v3a-fileitem:focus-within .v3a-filethumb-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.v3a-filethumb-name {
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 8px;
}

.v3a-filethumb-actions {
  display: flex;
  gap: 4px;
  align-items: center;
}

.v3a-filethumb-action {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  height: 24px;
  width: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.v3a-filethumb-action:hover {
  background: rgba(255, 255, 255, 0.2);
}

.v3a-filethumb-action.danger {
  color: rgba(248, 113, 113, 1);
}

.v3a-filethumb-action.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

.v3a-filethumb-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.v3a-filethumb-action .v3a-icon,
.v3a-filethumb-action .v3a-icon svg {
  width: 14px;
  height: 14px;
}

.v3a-modal-card.v3a-file-preview-modal {
  width: 860px;
  max-width: 95vw;
}

.v3a-file-preview-body {
  width: 100%;
  max-height: 70vh;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.v3a-file-preview-body img,
.v3a-file-preview-body video {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.v3a-modal-card.v3a-files-upload-modal {
  width: 520px;
  max-width: 95vw;
}

.v3a-files-upload-dragger {
  border: 1px dashed rgba(0, 0, 0, 0.12);
  background: #fafafa;
  border-radius: 12px;
  padding: 56px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.v3a-files-upload-dragger:hover {
  border-color: rgba(0, 0, 0, 0.28);
  background: #f5f5f5;
}

.v3a-files-upload-dragger.dragging {
  border-color: rgba(37, 99, 235, 0.8);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.v3a-files-upload-dragger.busy {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.v3a-files-upload-icon,
.v3a-files-upload-icon svg {
  width: 48px;
  height: 48px;
}

.v3a-files-upload-icon {
  color: rgba(0, 0, 0, 0.38);
}

.v3a-files-upload-title {
  font-size: 14px;
  color: #404040;
}

/* Comments (master-detail, mx-admin like) */
.v3a-container.v3a-container-comments {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.v3a-container.v3a-container-comments > .v3a-pagehead {
  padding: calc(var(--spacing) * 4) calc(var(--spacing) * 4)
    calc(var(--spacing) * 3);
  margin-bottom: 0;
}

@media (min-width: 48rem) {
  .v3a-container.v3a-container-comments > .v3a-pagehead {
    padding-inline: calc(var(--spacing) * 8);
    padding-top: calc(var(--spacing) * 6);
  }
}

.v3a-container.v3a-container-comments > .v3a-comments-split {
  flex: 1;
  min-height: 0;
}

.v3a-comments-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--spacing) * 4);
  min-height: 0;
}

@media (min-width: 64rem) {
  .v3a-comments-split {
    /* Keep the resizer as an overlay so it doesn't consume layout width */
    grid-template-columns: var(--v3a-comments-left, 360px) 0 minmax(0, 1fr);
    gap: 0;
    height: auto;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    overflow: hidden;
    background: #fff;
  }

  .v3a-comments-left,
  .v3a-comments-right {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  /* Make the split look like one container (avoid double borders/shadows) */
  .v3a-comments-left .v3a-card,
  .v3a-comments-right .v3a-card {
    border: 0;
    box-shadow: none;
    border-radius: 0;
  }

  .v3a-comments-right {
    background: #fff;
  }

  .v3a-comments-right .v3a-card {
    background: transparent;
  }

  .v3a-comments-left {
    border-right: 1px solid rgba(0, 0, 0, 0.06);
  }
}

.v3a-comments-resizer {
  display: none;
}

@media (min-width: 64rem) {
  .v3a-comments-resizer {
    display: block;
    position: relative;
    z-index: 5;
    cursor: col-resize;
    background: transparent;
    touch-action: none;
    width: 14px;
    margin-left: -7px;
  }

  .v3a-comments-resizer::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 48px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.15s ease;
  }

  .v3a-comments-resizer:hover::before {
    background: rgba(0, 0, 0, 0.35);
  }
}

.v3a-comments-panel {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.v3a-comments-panel > .bd {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.v3a-comments-panel > .hd {
  padding: 8px 12px;
}

.v3a-comments-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.v3a-comments-filter {
  min-width: 140px;
}

.v3a-comments-count {
  font-size: 12px;
}

.v3a-comments-toolbar {
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.v3a-searchbox.v3a-searchbox-full {
  width: 100%;
  flex: 1;
}

.v3a-comments-alert {
  margin: 12px 12px 0;
}

.v3a-comments-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.v3a-comments-empty {
  padding: 60px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
}

.v3a-comments-empty-icon,
.v3a-comments-empty-icon svg {
  width: 40px;
  height: 40px;
}

.v3a-comments-empty-icon {
  color: rgba(0, 0, 0, 0.18);
}

.v3a-comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.v3a-comment-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.v3a-comment-item.active {
  background: rgba(0, 0, 0, 0.06);
}

.v3a-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 auto;
  margin-top: 2px;
  overflow: hidden;
}

.v3a-comment-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: block;
  object-fit: cover;
}

.v3a-comment-body {
  min-width: 0;
  flex: 1;
}

.v3a-comment-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.v3a-comment-author {
  font-size: 13px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.82);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3a-comment-time {
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}

.v3a-comment-reply {
  font-size: 12px;
  font-weight: 400;
  flex: 0 0 auto;
}

.v3a-comment-excerpt {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.72);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v3a-comment-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.v3a-comments-footer {
  padding: 8px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
}

.v3a-comments-pagehint {
  font-size: 12px;
}

.v3a-comments-footer .v3a-pagebtn,
.v3a-comments-footer .v3a-pagecurrent {
  width: 28px;
  height: 28px;
}

.v3a-comments-footer .v3a-icon,
.v3a-comments-footer .v3a-icon svg {
  width: 16px;
  height: 16px;
}

.v3a-comments-detail-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.v3a-comments-iconbtn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: rgba(0, 0, 0, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.v3a-comments-iconbtn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.82);
}

.v3a-comments-iconbtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.v3a-comments-iconbtn.danger:hover {
  background: rgba(208, 48, 80, 0.08);
  color: var(--v3a-danger);
}

.v3a-comments-iconbtn .v3a-icon,
.v3a-comments-iconbtn .v3a-icon svg {
  width: 16px;
  height: 16px;
}

.v3a-comments-detail-shell {
  padding: 0;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.v3a-comments-detail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.v3a-comments-detail-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.v3a-comments-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.v3a-comments-main-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v3a-comments-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex: 0 0 auto;
  overflow: hidden;
}

.v3a-comments-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: block;
  object-fit: cover;
}

.v3a-comments-main-meta {
  min-width: 0;
}

.v3a-comments-main-author {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.v3a-comments-main-name {
  font-weight: 600;
  color: rgba(0, 0, 0, 0.88);
}

.v3a-comments-main-reply {
  font-size: 12px;
  color: #a3a3a3;
}

.v3a-comments-main-time {
  margin-top: 4px;
  font-size: 12px;
  color: #737373;
}

.v3a-comments-content {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(0, 0, 0, 0.9);
  word-break: break-word;
}

.v3a-comments-source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.72);
  min-width: 0;
}

a.v3a-comments-source:hover {
  background: rgba(0, 0, 0, 0.04);
}

.v3a-comments-source-label {
  color: #a3a3a3;
  flex: 0 0 auto;
}

.v3a-comments-source-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-comments-source-arrow {
  margin-left: auto;
  color: #a3a3a3;
}

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

@media (min-width: 40rem) {
  .v3a-comments-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .v3a-comments-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.v3a-comments-info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.v3a-comments-info-label {
  font-size: 12px;
  font-weight: 600;
  color: #737373;
}

.v3a-comments-info-value,
.v3a-comments-info-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.85);
  min-width: 0;
}

.v3a-comments-info-link:hover {
  text-decoration: underline;
}

.v3a-comments-info-icon,
.v3a-comments-info-icon svg {
  width: 14px;
  height: 14px;
}

.v3a-comments-info-icon {
  color: #a3a3a3;
  flex: 0 0 auto;
}

.v3a-comments-info-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3a-comments-replybar {
  flex: 0 0 auto;
  background: var(--content-bg);
  padding: 16px;
}

.v3a-comments-replywrap {
  max-width: 760px;
  margin: 0 auto;
}

.v3a-comments-replybox {
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-lg);
  background: var(--content-bg);
  box-shadow: var(--content-shadow);
  overflow: hidden;
}

.v3a-comments-replybox:focus-within {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.12);
}

.v3a-comments-replytextarea {
  width: 100%;
  border: 0;
  outline: none;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  min-height: 92px;
  max-height: 260px;
  background: transparent;
  color: rgba(0, 0, 0, 0.82);
}

.v3a-comments-replycontrols {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v3a-comments-emoji {
  position: relative;
}

.v3a-comments-emoji-btn {
  border: 0;
  background: transparent;
  padding: 6px;
  border-radius: var(--radius-md);
  color: #a3a3a3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.v3a-comments-emoji-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.72);
}

.v3a-comments-emoji-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  box-shadow: var(--content-shadow-hover);
  display: grid;
  grid-template-columns: repeat(6, 32px);
  gap: 4px;
  z-index: 20;
}

.v3a-comments-emoji-item {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.v3a-comments-emoji-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

.v3a-comments-send {
  display: flex;
  align-items: center;
  gap: 12px;
}

.v3a-comments-send-hint {
  display: none;
  font-size: 12px;
  color: #a3a3a3;
}

@media (min-width: 40rem) {
  .v3a-comments-send-hint {
    display: inline-block;
  }
}

.v3a-btn.v3a-btn-sm {
  height: 28px;
  padding: 0 14px;
  font-size: 12px;
  border-radius: var(--radius-md);
}
