/*
 * Client Site Admin
 * A dependency-free design layer for server-rendered management screens.
 * Use semantic HTML first; the utility classes below only add layout and polish.
 */

:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --bg-subtle: #f9fafb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #f7f8fa;
  --ink: #18212f;
  --ink-strong: #101827;
  --ink-muted: #667085;
  --ink-faint: #98a2b3;
  --line: #e3e7ec;
  --line-strong: #cfd6df;
  --primary: #2855cf;
  --primary-strong: #1d43ae;
  --primary-soft: #edf2ff;
  --primary-faint: #f6f8ff;
  --success: #16745a;
  --success-soft: #e9f8f1;
  --warning: #9a6100;
  --warning-soft: #fff7df;
  --danger: #b42318;
  --danger-soft: #fff0ef;
  --info: #2166a5;
  --info-soft: #eaf5ff;
  --shadow-xs: 0 1px 2px rgba(16, 24, 39, 0.05);
  --shadow-sm: 0 1px 3px rgba(16, 24, 39, 0.08), 0 1px 2px rgba(16, 24, 39, 0.04);
  --shadow-md: 0 10px 24px rgba(16, 24, 39, 0.09), 0 2px 6px rgba(16, 24, 39, 0.04);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --sidebar-width: 256px;
  --content-width: 1280px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", Meiryo, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.015em;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

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

button,
select {
  text-transform: none;
}

button,
[role="button"] {
  cursor: pointer;
}

button:disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-strong);
  text-decoration: underline;
}

hr {
  height: 1px;
  margin: 24px 0;
  border: 0;
  background: var(--line);
}

h1,
h2,
h3,
h4,
p,
figure {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--ink-strong);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

h1 {
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 30px);
}

h2 {
  margin-bottom: 12px;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

h4 {
  margin-bottom: 6px;
  font-size: 14px;
}

::selection {
  background: #cdddff;
  color: var(--ink-strong);
}

:focus-visible {
  outline: 3px solid rgba(40, 85, 207, 0.3);
  outline-offset: 2px;
}

.visually-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-150%);
  border-radius: var(--radius-xs);
  background: var(--ink-strong);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

/* Authentication */
.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
  background: var(--surface);
}

.auth-aside {
  position: relative;
  display: flex;
  min-height: 100%;
  padding: clamp(30px, 6vw, 72px);
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  background: #14234a;
  color: #eaf0ff;
  isolation: isolate;
}

.auth-aside::before,
.auth-aside::after {
  position: absolute;
  z-index: -1;
  width: min(46vw, 560px);
  height: min(46vw, 560px);
  content: "";
  border-radius: 50%;
  filter: blur(1px);
}

.auth-aside::before {
  top: -210px;
  right: -230px;
  background: radial-gradient(circle, rgba(92, 139, 255, 0.72) 0%, rgba(63, 108, 223, 0.12) 52%, transparent 72%);
}

.auth-aside::after {
  bottom: -270px;
  left: -230px;
  background: radial-gradient(circle, rgba(46, 203, 181, 0.35) 0%, rgba(46, 133, 181, 0.1) 56%, transparent 72%);
}

.auth-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-decoration: none;
}

.auth-brand:hover,
.brand:hover {
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #5e85ff, #3c5fc4);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.28), 0 4px 12px rgba(14, 30, 81, 0.28);
}

.auth-aside .brand-mark {
  background: #fff;
  color: #254da9;
}

.auth-copy {
  max-width: 520px;
  margin: auto 0;
  padding: 80px 0;
}

.auth-copy h1 {
  max-width: 540px;
  margin-bottom: 18px;
  color: #fff;
  font-size: clamp(30px, 3.7vw, 48px);
  letter-spacing: 0.025em;
  line-height: 1.35;
}

.auth-copy p {
  max-width: 480px;
  margin-bottom: 0;
  color: #cad8fb;
  font-size: 15px;
  line-height: 1.9;
}

.auth-note {
  color: #b8c8ee;
  font-size: 12px;
}

.auth-main {
  display: flex;
  min-width: 0;
  padding: clamp(28px, 5vw, 72px);
  align-items: center;
  justify-content: center;
  background: var(--surface);
}

.auth-card {
  width: min(100%, 440px);
}

.auth-card > .brand {
  display: none;
  margin-bottom: 46px;
  color: var(--ink-strong);
}

.auth-heading {
  margin-bottom: 28px;
}

.auth-heading h1 {
  margin-bottom: 8px;
}

.auth-heading p {
  margin: 0;
  color: var(--ink-muted);
}

.auth-footer {
  margin: 28px 0 0;
  color: var(--ink-muted);
  text-align: center;
}

.auth-separator {
  display: flex;
  margin: 24px 0;
  align-items: center;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 12px;
}

.auth-separator::before,
.auth-separator::after {
  width: 100%;
  height: 1px;
  content: "";
  background: var(--line);
}

/* App shell and navigation */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  width: var(--sidebar-width);
  height: 100vh;
  padding: 18px 12px;
  overflow-y: auto;
  flex-direction: column;
  border-right: 1px solid #e6eaf0;
  background: #fff;
}

.sidebar .brand {
  min-height: 46px;
  padding: 0 10px;
  color: var(--ink-strong);
}

.site-switcher {
  position: relative;
  display: block;
  width: 100%;
  margin: 24px 0 16px;
  padding: 12px 34px 12px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--ink);
  text-align: left;
}

.site-switcher:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.site-switcher::after {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  content: "";
  transform: translateY(-65%) rotate(45deg);
  border-right: 1.5px solid var(--ink-muted);
  border-bottom: 1.5px solid var(--ink-muted);
}

.site-switcher-label,
.eyebrow,
.field-label small {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1.4;
  text-transform: uppercase;
}

.site-switcher-name {
  display: block;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav,
.nav-list,
.nav-group {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
  gap: 3px;
}

.nav-group + .nav-group {
  margin-top: 23px;
}

.nav-group-label {
  padding: 0 10px 6px;
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.nav-link {
  display: flex;
  min-height: 42px;
  padding: 9px 10px;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: var(--surface-muted);
  color: var(--ink-strong);
  text-decoration: none;
}

.nav-link.is-active,
.nav-link[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.nav-icon {
  display: inline-grid;
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  place-items: center;
  color: currentColor;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.nav-count {
  min-width: 19px;
  padding: 1px 6px;
  margin-left: auto;
  border-radius: var(--radius-pill);
  background: #e7ebf1;
  color: #667085;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
}

.nav-link.is-active .nav-count {
  background: #d9e4ff;
  color: var(--primary-strong);
}

.sidebar-footer {
  padding-top: 18px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.user-menu {
  display: flex;
  padding: 9px 8px;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.user-menu:hover {
  background: var(--surface-muted);
  color: inherit;
  text-decoration: none;
}

.avatar {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #dce5ff;
  color: #3156af;
  font-size: 12px;
  font-weight: 700;
}

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

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

.user-menu-name,
.user-menu-role {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-name {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 700;
}

.user-menu-role {
  color: var(--ink-muted);
  font-size: 11px;
}

.app-content {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 68px;
  padding: 12px clamp(20px, 3vw, 42px);
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid rgba(227, 231, 236, 0.9);
  background: rgba(244, 245, 247, 0.88);
  backdrop-filter: blur(16px);
}

.topbar-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 8px;
}

.main {
  width: min(100%, calc(var(--content-width) + 84px));
  padding: clamp(24px, 4vw, 42px);
  margin: 0 auto;
}

.main--wide {
  width: 100%;
  max-width: none;
}

.page-header {
  display: flex;
  margin-bottom: 28px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-header-copy {
  min-width: 0;
}

.page-header h1 {
  margin-bottom: 4px;
}

.page-header p {
  margin-bottom: 0;
  color: var(--ink-muted);
}

.page-header-actions,
.action-group,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.page-header-actions {
  flex: 0 0 auto;
}

.breadcrumb {
  display: flex;
  padding: 0;
  margin: 0 0 10px;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--ink-muted);
  font-size: 12px;
  list-style: none;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 5px;
}

.breadcrumb li + li::before {
  width: 4px;
  height: 4px;
  content: "";
  transform: rotate(45deg);
  border-top: 1px solid var(--ink-faint);
  border-right: 1px solid var(--ink-faint);
}

.breadcrumb a {
  color: var(--ink-muted);
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Buttons, pills, messages */
.button,
button.button,
input[type="submit"].button,
input[type="button"].button,
input[type="reset"].button {
  display: inline-flex;
  min-height: 38px;
  padding: 8px 13px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

.button:hover {
  color: var(--ink-strong);
  text-decoration: none;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.52;
  pointer-events: none;
}

.button--primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(25, 58, 162, 0.18);
}

.button--primary:hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
  color: #fff;
}

.button--secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: #344054;
  box-shadow: var(--shadow-xs);
}

.button--secondary:hover {
  border-color: #b7c1ce;
  background: #fafbfc;
}

.button--soft {
  border-color: transparent;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.button--soft:hover {
  background: #dfe9ff;
  color: var(--primary-strong);
}

.button--ghost {
  border-color: transparent;
  background: transparent;
  color: #475467;
}

.button--ghost:hover {
  background: var(--surface-muted);
  color: var(--ink-strong);
}

.button--danger {
  border-color: #f3c8c4;
  background: #fff;
  color: var(--danger);
}

.button--danger:hover {
  border-color: #e9aaa4;
  background: var(--danger-soft);
  color: #9f1c13;
}

.button--danger-solid {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.button--danger-solid:hover {
  border-color: #941c13;
  background: #941c13;
  color: #fff;
}

.button--success {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.button--success:hover {
  border-color: #105d47;
  background: #105d47;
  color: #fff;
}

.button--sm {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  line-height: 20px;
}

.button--lg {
  min-height: 46px;
  padding: 11px 17px;
  border-radius: 9px;
  font-size: 14px;
}

.button--block {
  width: 100%;
}

.button__icon,
.icon-button svg,
.button svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #475467;
  box-shadow: var(--shadow-xs);
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
  color: var(--ink-strong);
}

.icon-button--danger:hover {
  border-color: #efc0bb;
  background: var(--danger-soft);
  color: var(--danger);
}

.badge,
.status-badge,
.tag {
  display: inline-flex;
  min-height: 22px;
  padding: 2px 8px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--radius-pill);
  background: #eef1f5;
  color: #566274;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 18px;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
  background: currentColor;
}

.badge--primary,
.status-badge--published,
.status-published {
  background: var(--success-soft);
  color: var(--success);
}

.badge--draft,
.status-badge--draft,
.status-draft {
  background: #f0f2f5;
  color: #64748b;
}

.badge--private,
.status-badge--private,
.status-private {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge--danger,
.status-badge--error,
.status-error {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge--info,
.status-badge--scheduled,
.status-scheduled {
  background: var(--info-soft);
  color: var(--info);
}

.tag {
  min-height: 24px;
  background: #f2f4f7;
  color: #475467;
  font-weight: 600;
}

.flash-stack {
  display: grid;
  margin-bottom: 22px;
  gap: 10px;
}

.flash,
.alert {
  position: relative;
  display: flex;
  padding: 12px 42px 12px 14px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: #344054;
  box-shadow: var(--shadow-xs);
}

.flash-icon,
.alert-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.flash-body,
.alert-body {
  min-width: 0;
}

.flash-title,
.alert-title {
  display: block;
  margin-bottom: 1px;
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.flash p,
.alert p {
  margin: 0;
  font-size: 13px;
}

.flash--success,
.alert--success {
  border-color: #b8e5d3;
  background: #f3fcf8;
  color: #146047;
}

.flash--success .flash-icon,
.alert--success .alert-icon {
  background: #ccefdc;
}

.flash--error,
.alert--error,
.flash--danger,
.alert--danger {
  border-color: #f2c5c1;
  background: #fff8f7;
  color: #a6291e;
}

.flash--error .flash-icon,
.alert--error .alert-icon,
.flash--danger .flash-icon,
.alert--danger .alert-icon {
  background: #ffe0dd;
}

.flash--warning,
.alert--warning {
  border-color: #f0d99d;
  background: #fffaf0;
  color: #895900;
}

.flash--warning .flash-icon,
.alert--warning .alert-icon {
  background: #ffebb6;
}

.flash--info,
.alert--info {
  border-color: #bedcf3;
  background: #f4faff;
  color: #245e91;
}

.flash--info .flash-icon,
.alert--info .alert-icon {
  background: #d9edfc;
}

.flash-dismiss,
.alert-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: currentColor;
  opacity: 0.68;
}

.flash-dismiss:hover,
.alert-dismiss:hover {
  background: rgba(255, 255, 255, 0.72);
  opacity: 1;
}

/* Cards and dashboard */
.card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.card--flat {
  box-shadow: none;
}

.card--interactive {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card--interactive:hover {
  border-color: #c9d3e0;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.card__header,
.panel-header,
.card-header {
  display: flex;
  min-height: 58px;
  padding: 16px 19px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.card__header h2,
.card__header h3,
.panel-header h2,
.panel-header h3,
.card-header h2,
.card-header h3 {
  margin: 0;
  font-size: 15px;
}

.card__header p,
.panel-header p,
.card-header p {
  margin: 2px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.card__body,
.panel-body,
.card-body {
  padding: 19px;
}

.card__footer,
.panel-footer,
.card-footer {
  display: flex;
  padding: 14px 19px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: #fcfcfd;
}

.card__footer--between,
.panel-footer--between {
  justify-content: space-between;
}

.dashboard-grid {
  display: grid;
  gap: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.stat-label {
  display: block;
  margin-bottom: 9px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-value {
  display: block;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-meta {
  display: flex;
  margin-top: 11px;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 11px;
}

.stat-meta--positive {
  color: var(--success);
}

.stat-meta--negative {
  color: var(--danger);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.95fr);
  align-items: start;
  gap: 20px;
}

.section-heading {
  display: flex;
  margin: 4px 0 12px;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
}

.section-heading a {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
}

.activity-list,
.timeline {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
}

.activity-item {
  display: flex;
  padding: 14px 0;
  align-items: flex-start;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}

.activity-item:first-child {
  padding-top: 0;
}

.activity-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--primary);
}

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

.activity-copy p {
  margin: 0;
  color: #344054;
  font-size: 13px;
}

.activity-time {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 11px;
}

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

.quick-action {
  display: flex;
  min-height: 82px;
  padding: 13px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.quick-action:hover {
  border-color: #c7d4ee;
  background: var(--primary-faint);
  color: var(--primary-strong);
  text-decoration: none;
  transform: translateY(-1px);
}

.quick-action-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
}

.quick-action span:last-child {
  font-size: 12px;
  font-weight: 700;
}

/* Lists, filters and tables */
.toolbar,
.list-toolbar {
  display: flex;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.toolbar__grow,
.list-toolbar__grow {
  min-width: min(100%, 220px);
  flex: 1 1 260px;
}

.search-field {
  position: relative;
}

.search-field::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  width: 12px;
  height: 12px;
  content: "";
  transform: translateY(-55%);
  border: 1.6px solid #8a96a8;
  border-radius: 50%;
  pointer-events: none;
}

.search-field::after {
  position: absolute;
  z-index: 1;
  top: calc(50% + 4px);
  left: 23px;
  width: 6px;
  height: 1.6px;
  content: "";
  transform: rotate(45deg);
  border-radius: 2px;
  background: #8a96a8;
  pointer-events: none;
}

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

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.filter-chip {
  display: inline-flex;
  min-height: 32px;
  padding: 5px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  color: #596679;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.filter-chip:hover {
  border-color: #c8d2df;
  color: var(--ink-strong);
  text-decoration: none;
}

.filter-chip.is-active,
.filter-chip[aria-pressed="true"] {
  border-color: #cbd9fa;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  min-width: 650px;
  border-spacing: 0;
  border-collapse: separate;
  text-align: left;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  background: #fafbfc;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.3;
  white-space: nowrap;
}

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

.data-table tbody tr {
  transition: background 0.12s ease;
}

.data-table tbody tr:hover {
  background: #fafcff;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .cell-title {
  display: block;
  max-width: 350px;
  overflow: hidden;
  color: var(--ink-strong);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table .cell-subtitle {
  display: block;
  max-width: 350px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-actions {
  display: flex;
  min-width: 136px;
  justify-content: flex-end;
  gap: 5px;
}

.content-list {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
}

.content-row {
  display: grid;
  padding: 15px 17px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  transition: background 0.12s ease;
}

.content-row:first-child {
  border-radius: var(--radius) var(--radius) 0 0;
}

.content-row:last-child {
  border-bottom: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}

.content-row:hover {
  background: #fbfcff;
}

.content-row__order {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: #f1f3f7;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.content-row__main {
  min-width: 0;
}

.content-row__title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-row__title a,
.content-row__title span {
  overflow: hidden;
  color: var(--ink-strong);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-row__title a:hover {
  color: var(--primary);
}

.content-row__meta {
  display: flex;
  margin-top: 3px;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: var(--ink-muted);
  font-size: 11px;
}

.content-row__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.row-thumbnail {
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 8px;
  background: #edf0f5;
}

.row-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sort-handle {
  display: inline-grid;
  width: 25px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #98a2b3;
  cursor: grab;
}

.sort-handle::before {
  width: 12px;
  height: 16px;
  content: "";
  background-image: radial-gradient(circle, currentColor 1.2px, transparent 1.35px);
  background-position: 0 0, 6px 0;
  background-size: 6px 6px;
}

.sort-handle:active {
  cursor: grabbing;
}

.list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.list-card .content-row {
  padding-right: 18px;
  padding-left: 18px;
}

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

.pagination-summary {
  color: var(--ink-muted);
  font-size: 12px;
}

.pagination-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-links a,
.pagination-links span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.pagination-links a:hover {
  background: #fff;
  color: var(--ink-strong);
}

.pagination-links .is-current,
.pagination-links [aria-current="page"] {
  border-color: #d2ddf7;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

/* Forms */
.form-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.form-section {
  padding: clamp(18px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.form-section-heading {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.form-section-heading h2,
.form-section-heading h3 {
  margin: 0;
  font-size: 16px;
}

.form-section-heading p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

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

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

.form-grid--compact {
  gap: 13px 14px;
}

.field,
.form-field {
  min-width: 0;
}

.field--full,
.form-field--full,
.span-2 {
  grid-column: 1 / -1;
}

.field-label,
.field > label,
.form-field > label {
  display: flex;
  margin-bottom: 6px;
  align-items: baseline;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.field-label small {
  margin: 0 0 0 auto;
}

.required {
  display: inline-flex;
  padding: 1px 5px;
  align-items: center;
  border-radius: 4px;
  background: #fff0ef;
  color: var(--danger);
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
}

.optional {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
}

.input,
.select,
.textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
select,
textarea {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--ink-strong);
  font-size: 14px;
  line-height: 20px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}

select {
  padding-right: 33px;
  background-image: linear-gradient(45deg, transparent 50%, #667085 50%), linear-gradient(135deg, #667085 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

select[multiple] {
  min-height: 116px;
  padding: 7px;
  background-image: none;
}

textarea,
.textarea {
  min-height: 118px;
  resize: vertical;
}

textarea.textarea--sm {
  min-height: 80px;
}

textarea.textarea--lg {
  min-height: 250px;
}

input[type="file"] {
  width: 100%;
  min-height: 40px;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-muted);
  font-size: 12px;
}

input[type="file"]::file-selector-button {
  padding: 6px 9px;
  margin-right: 9px;
  border: 0;
  border-radius: 5px;
  background: #eef2f8;
  color: #475467;
  font-weight: 700;
}

input::placeholder,
textarea::placeholder {
  color: #a6b0bf;
  opacity: 1;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b9c4d2;
}

.input:focus,
.select:focus,
.textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40, 85, 207, 0.13);
}

input:disabled,
select:disabled,
textarea:disabled,
.input:disabled,
.select:disabled,
.textarea:disabled {
  border-color: var(--line);
  background: #f4f5f7;
  color: #98a2b3;
  cursor: not-allowed;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #db5c51;
  background: #fffafa;
}

.field.is-invalid input:focus,
.field.is-invalid select:focus,
.field.is-invalid textarea:focus,
input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12);
}

.field.is-valid input,
.field.is-valid select,
.field.is-valid textarea {
  border-color: #58ae8d;
}

.field-help,
.field-error,
.field-success {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.55;
}

.field-help {
  color: var(--ink-muted);
}

.field-error {
  color: var(--danger);
  font-weight: 600;
}

.field-success {
  color: var(--success);
  font-weight: 600;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group > input,
.input-group > select,
.input-group > .input {
  min-width: 0;
  border-radius: 8px 0 0 8px;
}

.input-group > .button,
.input-group-addon {
  display: inline-flex;
  min-width: 42px;
  padding: 0 11px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: #f8f9fb;
  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.input-group > .button:hover {
  background: #eef2f7;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 45px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.password-toggle:hover {
  background: #f2f4f7;
  color: var(--ink-strong);
}

.choice-row,
.checkbox-row,
.radio-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.choice-row input,
.checkbox-row input,
.radio-row input {
  width: 17px;
  height: 17px;
  padding: 0;
  margin: 2px 0 0;
  flex: 0 0 17px;
  accent-color: var(--primary);
  -webkit-appearance: auto;
  appearance: auto;
}

.choice-row label,
.checkbox-row label,
.radio-row label {
  color: #475467;
  font-size: 13px;
  line-height: 1.55;
}

.choice-row label strong,
.checkbox-row label strong,
.radio-row label strong {
  display: block;
  color: var(--ink-strong);
}

.checkbox-list,
.radio-list {
  display: grid;
  gap: 9px;
}

.choice-card {
  position: relative;
  display: flex;
  min-height: 72px;
  padding: 13px 14px;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.choice-card:hover {
  border-color: #c4d1e6;
}

.choice-card input {
  width: 17px;
  height: 17px;
  padding: 0;
  margin: 2px 0 0;
  flex: 0 0 17px;
  accent-color: var(--primary);
}

.choice-card:has(input:checked) {
  border-color: #aabff1;
  background: var(--primary-faint);
}

.choice-card-copy {
  min-width: 0;
}

.choice-card-title {
  display: block;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 700;
}

.choice-card-description {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 11px;
  line-height: 1.5;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.switch-track {
  position: relative;
  display: block;
  width: 36px;
  height: 21px;
  flex: 0 0 36px;
  border-radius: var(--radius-pill);
  background: #c7ced8;
  transition: background 0.15s ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 39, 0.2);
  transition: transform 0.15s ease;
}

.switch input:checked + .switch-track {
  background: var(--primary);
}

.switch input:checked + .switch-track::after {
  transform: translateX(15px);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(40, 85, 207, 0.25);
  outline-offset: 2px;
}

.switch-label {
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

.form-actions {
  position: sticky;
  z-index: 10;
  bottom: 0;
  display: flex;
  padding: 13px clamp(18px, 3vw, 28px);
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 -8px 20px rgba(16, 24, 39, 0.04);
  backdrop-filter: blur(8px);
}

.form-actions__main,
.form-actions__aside {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.form-actions__aside {
  margin-left: auto;
}

.form-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 11px;
}

.editor {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
}

.editor:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40, 85, 207, 0.13);
}

.editor-toolbar {
  display: flex;
  min-height: 40px;
  padding: 5px 7px;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.editor-toolbar button {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.editor-toolbar button:hover,
.editor-toolbar button.is-active {
  background: #e7edfa;
  color: var(--primary-strong);
}

.editor-content {
  min-height: 220px;
  padding: 12px;
  outline: none;
  color: var(--ink);
  line-height: 1.8;
}

.editor-content:empty::before {
  content: attr(data-placeholder);
  color: #a6b0bf;
  pointer-events: none;
}

/* File/image upload and repeatable rows */
.upload-dropzone {
  position: relative;
  display: grid;
  min-height: 148px;
  padding: 20px;
  place-items: center;
  border: 1.5px dashed #b9c5d4;
  border-radius: 10px;
  background: #fafcff;
  color: var(--ink-muted);
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upload-dropzone:hover,
.upload-dropzone.is-dragover {
  border-color: #7e9be4;
  background: var(--primary-faint);
}

.upload-dropzone input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  display: grid;
  width: 35px;
  height: 35px;
  margin: 0 auto 8px;
  place-items: center;
  border-radius: 10px;
  background: #e8efff;
  color: var(--primary);
}

.upload-title {
  display: block;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.upload-help {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 11px;
}

.image-preview {
  position: relative;
  display: none;
  width: 100%;
  max-width: 380px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #eef1f5;
}

.image-preview.is-visible {
  display: block;
}

.image-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
}

.image-preview-caption {
  display: flex;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink-muted);
  font-size: 11px;
}

.repeater {
  display: grid;
  gap: 9px;
}

.repeater-item,
.fee-row {
  display: grid;
  padding: 11px;
  grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.1fr) auto;
  align-items: end;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fcfcfd;
}

.repeater-item .field-label,
.fee-row .field-label {
  margin-bottom: 4px;
  font-size: 11px;
}

.repeater-item .input,
.repeater-item input,
.repeater-item select,
.fee-row .input,
.fee-row input,
.fee-row select {
  min-height: 36px;
}

.repeater-add {
  justify-self: start;
}

.draggable-list {
  display: grid;
  gap: 8px;
}

.draggable-item {
  display: flex;
  padding: 10px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.draggable-item.is-dragging {
  opacity: 0.45;
}

.draggable-item__copy {
  min-width: 0;
  flex: 1;
}

.draggable-item__title {
  display: block;
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draggable-item__meta {
  display: block;
  color: var(--ink-muted);
  font-size: 11px;
}

/* Tabs, settings, empty states */
.tabs {
  display: flex;
  margin-bottom: 20px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  gap: 3px;
  -webkit-overflow-scrolling: touch;
}

.tab {
  display: inline-flex;
  min-height: 40px;
  padding: 9px 12px 8px;
  align-items: center;
  gap: 7px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink-strong);
}

.tab.is-active,
.tab[aria-selected="true"] {
  border-bottom-color: var(--primary);
  color: var(--primary-strong);
}

.tab-panel[hidden] {
  display: none;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(185px, 0.35fr) minmax(0, 1fr);
  align-items: start;
  gap: 25px;
}

.settings-nav {
  display: grid;
  padding: 7px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.settings-nav a {
  display: block;
  padding: 9px 10px;
  border-radius: 7px;
  color: #475467;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.settings-nav a:hover {
  background: #f5f7fa;
  color: var(--ink-strong);
}

.settings-nav a.is-active,
.settings-nav a[aria-current="page"] {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.setting-row {
  display: flex;
  padding: 16px 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.setting-row:first-child {
  padding-top: 0;
}

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

.setting-row__copy {
  min-width: 0;
}

.setting-row__title {
  display: block;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 700;
}

.setting-row__description {
  display: block;
  max-width: 600px;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 12px;
}

.setting-row__control {
  flex: 0 0 auto;
}

.danger-zone {
  border-color: #f0c7c3;
}

.danger-zone .card__header,
.danger-zone .panel-header {
  border-bottom-color: #f4d9d6;
  background: #fffafa;
}

.empty-state {
  display: grid;
  min-height: 280px;
  padding: 40px 24px;
  place-items: center;
  text-align: center;
}

.empty-state__inner {
  max-width: 390px;
}

.empty-state__icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
}

.empty-state__icon svg {
  width: 26px;
  height: 26px;
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: 6px;
  font-size: 17px;
}

.empty-state p {
  margin: 0 auto 18px;
  color: var(--ink-muted);
  font-size: 13px;
}

.empty-state--compact {
  min-height: 170px;
  padding: 28px 20px;
}

.empty-state--compact .empty-state__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border-radius: 12px;
}

.empty-state--compact .empty-state__icon svg {
  width: 20px;
  height: 20px;
}

/* Public site preview */
.preview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 20px;
}

.preview-frame {
  overflow: hidden;
  border: 1px solid #cfd6df;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.preview-toolbar {
  display: flex;
  min-height: 44px;
  padding: 8px 12px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8f9fb;
}

.preview-dots {
  display: flex;
  gap: 5px;
}

.preview-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c6ced9;
}

.preview-address {
  min-width: 0;
  padding: 4px 9px;
  flex: 1;
  overflow: hidden;
  border: 1px solid #e4e8ee;
  border-radius: 5px;
  background: #fff;
  color: #7a8595;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-canvas {
  min-height: 560px;
  background: #fff;
}

.preview-canvas iframe {
  display: block;
  width: 100%;
  min-height: 560px;
  border: 0;
  background: #fff;
}

.preview-placeholder {
  display: grid;
  min-height: 560px;
  padding: 40px;
  place-items: center;
  background: linear-gradient(135deg, #f5f7fb, #fff);
  color: var(--ink-muted);
  text-align: center;
}

.preview-sidebar {
  display: grid;
  gap: 14px;
}

.preview-sidebar .card__body {
  padding: 15px;
}

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

.preview-summary-row {
  display: flex;
  padding-bottom: 9px;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 11px;
}

.preview-summary-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.preview-summary-row strong {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Modals, toasts and loading */
.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(16, 24, 39, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: min(100%, 520px);
  max-height: min(720px, calc(100vh - 40px));
  overflow: auto;
  transform: translateY(7px) scale(0.985);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 55px rgba(16, 24, 39, 0.3);
  transition: transform 0.18s ease;
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  padding: 18px 20px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2,
.modal-header h3 {
  margin: 0;
  font-size: 17px;
}

.modal-body {
  padding: 20px;
}

.modal-body > :last-child {
  margin-bottom: 0;
}

.modal-footer {
  display: flex;
  padding: 14px 20px;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: #fcfcfd;
}

body.has-modal-open {
  overflow: hidden;
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(calc(100vw - 40px), 380px);
  gap: 8px;
}

.toast-region .flash {
  box-shadow: var(--shadow-md);
}

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  background: #e9edf2;
  color: transparent !important;
  user-select: none;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: shimmer 1.45s infinite;
}

.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.is-loading::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 15px;
  content: "";
  transform: translate(-50%, -50%);
  border: 2px solid #667085;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.button--primary.is-loading::after,
.button--success.is-loading::after,
.button--danger-solid.is-loading::after {
  border-color: #fff;
  border-right-color: transparent;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Small composable utilities */
.stack {
  display: grid;
  gap: 16px;
}

.stack--xs { gap: 5px; }
.stack--sm { gap: 9px; }
.stack--lg { gap: 24px; }
.stack--xl { gap: 32px; }

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cluster--sm { gap: 5px; }
.cluster--lg { gap: 16px; }

.muted { color: var(--ink-muted) !important; }
.faint { color: var(--ink-faint) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-primary { color: var(--primary) !important; }
.text-right { text-align: right !important; }
.text-center { text-align: center !important; }
.nowrap { white-space: nowrap !important; }
.break-word { overflow-wrap: anywhere; }
.w-full { width: 100% !important; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.hidden { display: none !important; }

/* Responsive handling */
.mobile-only {
  display: none !important;
}

@media (max-width: 1050px) {
  :root { --sidebar-width: 222px; }

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

  .preview-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  body {
    font-size: 14px;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    display: none;
  }

  .auth-main {
    min-height: 100vh;
  }

  .auth-card > .brand {
    display: inline-flex;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 70;
    top: 0;
    left: 0;
    width: min(288px, calc(100vw - 38px));
    height: 100dvh;
    transform: translateX(-105%);
    box-shadow: 14px 0 35px rgba(16, 24, 39, 0.13);
    transition: transform 0.2s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 60;
    inset: 0;
    display: block;
    background: rgba(16, 24, 39, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .sidebar-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    min-height: 60px;
    padding: 10px 18px;
  }

  .main {
    padding: 22px 18px 35px;
  }

  .mobile-only {
    display: inline-flex !important;
  }

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

  .split-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .settings-nav a {
    flex: 0 0 auto;
  }

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

  .preview-canvas,
  .preview-canvas iframe,
  .preview-placeholder {
    min-height: 460px;
  }
}

@media (max-width: 620px) {
  h1 { font-size: 24px; }

  .auth-main {
    padding: 26px 20px;
    align-items: flex-start;
  }

  .auth-card > .brand {
    margin-bottom: 38px;
  }

  .page-header {
    margin-bottom: 21px;
    flex-direction: column;
    gap: 13px;
  }

  .page-header-actions {
    width: 100%;
  }

  .page-header-actions .button--primary:last-child {
    flex: 1;
  }

  .topbar-actions .button:not(.icon-button) {
    display: none;
  }

  .stats-grid,
  .form-grid,
  .form-grid--three,
  .preview-sidebar {
    grid-template-columns: 1fr;
  }

  .field--full,
  .form-field--full,
  .span-2 {
    grid-column: auto;
  }

  .card__header,
  .panel-header,
  .card-header,
  .card__body,
  .panel-body,
  .card-body {
    padding-right: 15px;
    padding-left: 15px;
  }

  .card__header,
  .panel-header,
  .card-header {
    align-items: flex-start;
  }

  .card__footer,
  .panel-footer,
  .card-footer {
    padding-right: 15px;
    padding-left: 15px;
  }

  .toolbar,
  .list-toolbar {
    align-items: stretch;
  }

  .toolbar__grow,
  .list-toolbar__grow {
    flex-basis: 100%;
  }

  .toolbar > .button,
  .list-toolbar > .button {
    flex: 1;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    min-width: 0;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .data-table tbody {
    display: grid;
    gap: 10px;
  }

  .data-table tr {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-xs);
  }

  .data-table td {
    display: grid;
    padding: 6px 0;
    grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.3fr);
    align-items: baseline;
    gap: 12px;
    border: 0;
    font-size: 12px;
  }

  .data-table td::before {
    content: attr(data-label);
    color: var(--ink-muted);
    font-size: 11px;
    font-weight: 700;
  }

  .data-table td[data-label=""]::before {
    display: none;
  }

  .data-table td[data-label=""] {
    display: flex;
    justify-content: flex-end;
  }

  .data-table .cell-title,
  .data-table .cell-subtitle {
    max-width: 100%;
    white-space: normal;
  }

  .cell-actions {
    min-width: 0;
  }

  .content-row {
    padding: 13px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 9px;
  }

  .content-row__actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .content-row__order {
    grid-row: span 2;
  }

  .repeater-item,
  .fee-row {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .repeater-item > .field,
  .fee-row > .field {
    grid-column: 1 / -1;
  }

  .repeater-item > .icon-button,
  .fee-row > .icon-button {
    grid-column: 2;
  }

  .form-actions {
    position: static;
    padding: 14px 15px;
    align-items: stretch;
  }

  .form-actions__main,
  .form-actions__aside {
    width: 100%;
  }

  .form-actions__aside {
    margin-left: 0;
  }

  .form-actions .button--primary {
    flex: 1;
  }

  .setting-row {
    flex-direction: column;
    gap: 10px;
  }

  .setting-row__control {
    width: 100%;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination-links {
    width: 100%;
    justify-content: space-between;
  }

  .empty-state {
    min-height: 230px;
    padding: 32px 18px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body { background: #fff; }
  .sidebar,
  .topbar,
  .page-header-actions,
  .form-actions,
  .flash-stack,
  .no-print { display: none !important; }
  .app-shell { display: block; }
  .main { width: 100%; padding: 0; }
  .card,
  .panel,
  .list-card,
  .table-wrap { box-shadow: none; }
}

/* Runtime template layer: compact aliases for the dependency-free Node views. */
.brand__mark { /* legacy alias retained for generated links */ }
.sidebar__nav { margin-top: 20px; }
.sidebar__footer { padding-top: 18px; margin-top: auto; border-top: 1px solid var(--line); }
.nav-heading { padding: 17px 10px 5px; margin: 0; color: var(--ink-faint); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.app-main { min-width: 0; }
.topbar { justify-content: space-between; }
.topbar h1 { margin: 0; font-size: 18px; }
.topbar .eyebrow { margin: 0 0 2px; }
.menu-toggle { display: none; padding: 4px 7px; margin-right: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.site-switcher { width: auto; min-width: 220px; margin: 0; padding: 7px 12px; overflow: visible; background: #fff; }
.site-switcher summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--ink-strong); font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.site-switcher summary::-webkit-details-marker { display: none; }
.site-switcher > div { position: absolute; z-index: 30; top: calc(100% + 8px); right: 0; display: grid; width: min(310px, 80vw); max-height: 55vh; padding: 7px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow-md); }
.site-switcher:not([open]) > div { display: none; }
.site-switcher__item { display: flex; padding: 9px; align-items: center; justify-content: space-between; gap: 8px; border-radius: 7px; color: var(--ink); font-size: 12px; text-decoration: none; }
.site-switcher__item:hover,.site-switcher__item.is-current { background: var(--primary-soft); color: var(--primary-strong); text-decoration: none; }
.site-switcher__item small { color: var(--ink-muted); }
.flash { position: relative; display: flex; padding: 12px 42px 12px 14px; margin: 0 0 18px; align-items: center; border: 1px solid; border-radius: 9px; font-size: 13px; }
.flash button { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 5px; background: transparent; color: inherit; font-size: 18px; }
.form-stack { display: grid; gap: 16px; }
.form-stack > label, .editor-form label, .setting-form label { display: grid; gap: 6px; color: var(--ink-strong); font-size: 13px; font-weight: 650; }
.form-stack label small, .editor-form label small, .setting-form label small { color: var(--ink-muted); font-size: 11px; font-weight: 400; }
.form-stack label em, .editor-form label em { margin-left: 6px; color: var(--danger); font-size: 10px; font-style: normal; }
.button--wide { width: 100%; justify-content: center; }
.text-link { display: inline-block; font-size: 12px; font-weight: 700; text-align: center; }
.password-field { display: flex; overflow: hidden; border-radius: 7px; }
.password-field input { min-width: 0; flex: 1; border-radius: 7px 0 0 7px; }
.password-field button { padding: 0 11px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 7px 7px 0; background: #fff; color: var(--ink-muted); font-size: 11px; }
.dashboard-intro,.site-hero,.list-header,.editor-header { display: flex; padding: 2px 0 24px; margin-bottom: 24px; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.dashboard-intro h2,.site-hero h2,.list-header h2,.editor-header h2 { margin: 0 0 6px; }
.dashboard-intro p,.site-hero p,.list-header p,.editor-header p { max-width: 690px; margin: 0; color: var(--ink-muted); }
.site-hero__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.site-grid,.metric-grid,.target-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); gap: 15px; margin-bottom: 24px; }
.site-card,.target-card,.metric-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-xs); }
.site-card__heading { display: flex; align-items: center; gap: 12px; }
.site-card__heading h2 { margin: 0; font-size: 16px; }
.site-card__monogram { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary-strong); font-weight: 800; }
.chip-row { display: flex; min-height: 34px; margin: 14px 0; flex-wrap: wrap; gap: 5px; }
.chip { padding: 3px 7px; border-radius: 99px; background: #eef1f5; color: #475467; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.site-card__stats { display: flex; margin-bottom: 16px; gap: 20px; color: var(--ink-muted); font-size: 11px; }
.site-card__stats strong { display: block; color: var(--ink-strong); font-size: 19px; }
.metric-card { display: block; color: var(--ink); text-decoration: none; }
.metric-card:hover { border-color: #b6c5ed; box-shadow: var(--shadow-sm); text-decoration: none; }
.metric-card span,.metric-card small { display: block; color: var(--ink-muted); font-size: 11px; font-weight: 700; }
.metric-card strong { display: block; margin: 7px 0 3px; color: var(--ink-strong); font-size: 30px; line-height: 1; }
.panel { margin-bottom: 24px; }
.panel__header { display: flex; min-height: 58px; padding: 16px 19px; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.panel__header h2 { margin: 0; font-size: 15px; }
.panel__header p { margin: 2px 0 0; color: var(--ink-muted); font-size: 12px; }
.table-scroll { overflow-x: auto; }
.table-scroll table { width: 100%; min-width: 560px; border-collapse: collapse; }
.table-scroll th,.table-scroll td { padding: 12px 18px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 12px; text-align: left; vertical-align: middle; }
.table-scroll th { color: var(--ink-muted); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
.table-title { display: block; color: var(--ink-strong); font-weight: 700; }
.table-title + small { color: var(--ink-muted); font-size: 10px; }
.thumb { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; }
.thumb--empty { display: grid; place-items: center; background: #f0f2f5; color: var(--ink-faint); }
.drag-cell { width: 45px; }
.sort-number { color: var(--ink-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.table-actions { white-space: nowrap; }
.table-actions form { display: inline-flex; }
.icon-action { display: inline-grid; width: 30px; height: 30px; margin: 0 1px; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: #475467; font-size: 13px; text-decoration: none; }
button.icon-action:hover,.icon-action:hover { border-color: #afc0eb; background: var(--primary-soft); color: var(--primary-strong); text-decoration: none; }
.badge { display: inline-block; padding: 3px 7px; border-radius: 99px; font-size: 10px; font-weight: 700; }
.badge--published { background: var(--success-soft); color: var(--success); }
.badge--draft { background: var(--warning-soft); color: var(--warning); }
.badge--hidden { background: #eef0f3; color: #596273; }
.helper-text { color: var(--ink-muted); font-size: 11px; }
.back-link { display: inline-block; margin-bottom: 13px; font-size: 12px; font-weight: 700; }
.editor-form { display: grid; gap: 20px; }
.editor-form fieldset { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-xs); }
.editor-form legend { padding: 0 7px; color: var(--ink-strong); font-size: 14px; font-weight: 750; }
.form-grid { display: grid; gap: 15px; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.image-field { padding: 10px; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--bg-subtle); }
.upload-status { display: flex; margin-top: 8px; align-items: center; gap: 8px; color: var(--ink-muted); font-size: 11px; }
.upload-status .image-preview { display: block; width: 54px; height: 40px; object-fit: cover; }
.check-label { display: flex !important; align-items: center; align-self: end; gap: 7px; min-height: 42px; font-weight: 500 !important; }
.check-label input { min-height: auto; }
.repeater { margin-top: 20px; }
.repeater__head { display: flex; margin-bottom: 10px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.repeater__head h3,.repeater__head p { margin: 0; }
.repeater__head p { color: var(--ink-muted); font-size: 11px; }
.repeat-rows { display: grid; gap: 8px; }
.repeat-row { display: grid; padding: 9px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-subtle); }
.repeat-row--credit { grid-template-columns: minmax(0, 1.2fr) minmax(0,.7fr) minmax(0,1fr) auto; }
.editor-actions { display: flex; padding: 14px 0; justify-content: flex-end; gap: 8px; }
.danger-zone { padding-top: 10px; margin-top: 8px; border-top: 1px solid #f1ceca; }
.danger-zone .text-danger { padding: 0; border: 0; background: transparent; font-size: 12px; font-weight: 700; }
.public-preview,.public-site { overflow: hidden; border: 1px solid #d7d1c8; border-radius: 14px; background: #f3f1eb; box-shadow: var(--shadow-sm); }
.public-preview__bar { display: flex; padding: 8px 13px; justify-content: space-between; background: #1d1d1a; color: #fff; font-size: 10px; letter-spacing: .08em; }
.public-site__header { display: flex; padding: 40px 6vw; align-items: baseline; justify-content: space-between; border-bottom: 1px solid #d8d2c8; background: #f8f6f1; }
.public-site__header p { margin: 0; color: #31312d; font-size: 13px; }
.public-site__header strong { font-size: clamp(18px, 3vw, 35px); letter-spacing: .08em; }
.public-section { padding: 46px 6vw; border-bottom: 1px solid #d8d2c8; }
.public-kicker { margin-bottom: 5px; color: #77736b; font-size: 11px; letter-spacing: .12em; }
.public-section > h2 { margin-bottom: 26px; font-size: clamp(28px, 5vw, 48px); letter-spacing: .05em; }
.public-subhead { margin: 25px 0 12px; color: #69645d; font-size: 12px; letter-spacing: .12em; }
.public-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 16px; }
.public-card { overflow: hidden; padding: 18px; border: 1px solid #d8d2c8; border-radius: 5px; background: #fffdf8; }
.public-card > img { width: calc(100% + 36px); height: 190px; margin: -18px -18px 16px; object-fit: cover; }
.public-card time { display: block; color: #77736b; font-size: 11px; }
.public-card h3 { margin: 5px 0 11px; font-size: 18px; }
.public-card p { color: #48453f; font-size: 13px; }
.public-card ul { padding-left: 18px; color: #48453f; font-size: 12px; }
.public-fees { padding: 0 !important; list-style: none; }
.public-fees li { display: flex; padding: 4px 0; justify-content: space-between; border-bottom: 1px dotted #d8d2c8; }
.public-button,.public-link-row a { display: inline-block; padding: 7px 9px; margin: 5px 4px 0 0; border: 1px solid #292723; color: #292723; font-size: 11px; font-weight: 700; text-decoration: none; }
.public-button:hover,.public-link-row a:hover { background: #292723; color: #fff; text-decoration: none; }
.public-link { display: inline-block; margin-top: 10px; font-size: 12px; }
.public-site__footer { padding: 25px 6vw; background: #292723; color: #f7f5ef; font-size: 11px; }
.publish-callout { padding: 24px; margin-bottom: 20px; border: 1px solid #c8d6fb; border-radius: var(--radius); background: #f5f8ff; }
.publish-callout h2 { margin: 0 0 8px; }
.publish-callout p:last-child { margin: 0; color: #46577d; }
.target-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.target-card h3 { margin: 0 0 7px; }
.target-card p { margin: 0; color: var(--ink-muted); font-size: 12px; }
.target-card__actions { display: grid; flex-shrink: 0; gap: 8px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.setting-form { display: grid; padding: 19px; gap: 0; }
.form-panel { padding: 19px; }
.feature-checks { display: flex; padding: 11px; flex-wrap: wrap; align-items: center; gap: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-subtle); }
.feature-checks strong { width: 100%; color: var(--ink-muted); font-size: 11px; }
.feature-checks label { display: inline-flex !important; align-items: center; gap: 5px; font-size: 11px !important; font-weight: 650 !important; }
.feature-checks input { min-height: auto; }
.toggle-row { display: flex !important; padding: 14px 0; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.toggle-row span { display: grid; gap: 2px; }
.toggle-row small { color: var(--ink-muted); font-size: 11px; font-weight: 400; }
.toggle-row input { width: 18px; height: 18px; }
.prose { padding: 19px; color: var(--ink-muted); font-size: 13px; }
.empty-state { border-radius: var(--radius); }
@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .topbar { padding: 12px 18px; }
  .site-switcher { min-width: 0; max-width: 180px; }
  .form-grid--two,.settings-grid { grid-template-columns: 1fr; }
  .dashboard-intro,.site-hero,.list-header,.editor-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .repeat-row,.repeat-row--credit { grid-template-columns: 1fr; }
  .repeat-row .icon-action { justify-self: end; }
  .table-scroll th,.table-scroll td { padding: 10px; }
  .target-card { align-items: flex-start; flex-direction: column; }
}
