:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg: #f7f7fa;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --surface-raised: #fcfcfd;
  --text: #111827;
  --text-soft: #374151;
  --muted: #6b7280;
  --muted-light: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d7dce3;
  --navy: #111827;
  --navy-hover: #1f2937;
  --lavender: #6f5fd7;
  --lavender-soft: #f0edff;
  --lavender-border: #ddd7ff;
  --green: #166534;
  --green-soft: #eaf8ef;
  --amber: #92400e;
  --amber-soft: #fff7e6;
  --red: #b42318;
  --red-soft: #feeceb;
  --gray-soft: #f3f4f6;
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-sm: 0 8px 20px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 20px 50px rgba(17, 24, 39, 0.09);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --content-max: 1480px;
  --focus: 0 0 0 3px rgba(111, 95, 215, 0.18);
  --site-reference-max-width: 1200px;
  --site-reference-header-height: 92px;
  --site-reference-button-height: 48px;
  --site-reference-hero-compact: 430px;
  --site-reference-hero-standard: 532px;
  --site-reference-hero-large: 650px;
  --site-reference-radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

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

button {
  align-items: center;
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: var(--radius-sm);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 650;
  gap: 8px;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  text-align: center;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, color 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

button:hover {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
  box-shadow: var(--shadow-sm);
}

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

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: var(--focus);
  outline: 0;
}

button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-soft);
}

.ghost:hover {
  background: var(--surface-soft);
  border-color: var(--border-strong);
  color: var(--text);
}

.text-button {
  background: transparent;
  border: 0;
  color: var(--lavender);
  font-weight: 650;
  min-height: auto;
  padding: 2px 0;
  width: fit-content;
}

.text-button:hover {
  background: transparent;
  box-shadow: none;
  color: var(--navy);
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  display: grid;
  gap: 12px 20px;
  grid-template-areas:
    "brand org actions"
    "nav nav nav";
  grid-template-columns: auto minmax(260px, 1fr) auto;
  padding: 14px clamp(18px, 3vw, 32px) 10px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand-block {
  align-items: center;
  display: flex;
  gap: 10px;
  grid-area: brand;
  min-height: 38px;
  padding-right: 20px;
  position: relative;
  white-space: nowrap;
}

.brand-block::after {
  background: var(--border);
  content: "";
  height: 28px;
  position: absolute;
  right: 0;
  width: 1px;
}

.brand-block strong,
.brand-block small {
  display: block;
  line-height: 1.05;
}

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

.brand-block small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
  margin-top: 3px;
}

.brand-mark {
  align-items: center;
  background: var(--navy);
  border-radius: 10px;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.brand-mark::before {
  background: #ffffff;
  border-radius: 3px;
  content: "";
  height: 13px;
  transform: rotate(45deg);
  width: 13px;
}

.org-picker {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 2px;
  grid-area: org;
  max-width: 420px;
  min-height: 42px;
  padding: 6px 12px;
}

.org-picker span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.org-picker select {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  min-height: 20px;
  padding: 0;
}

.org-picker.is-static {
  cursor: default;
}

.org-picker.is-static select {
  appearance: none;
  color: var(--text);
  cursor: default;
  opacity: 1;
  pointer-events: none;
}

.org-picker.is-empty {
  border-color: #fac7c3;
}

.nav {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
  grid-area: nav;
  overflow-x: auto;
  padding-top: 10px;
  scrollbar-width: thin;
}

.nav a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-soft);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 650;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav a:hover {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}

.nav a.active {
  background: var(--lavender-soft);
  border-color: var(--lavender-border);
  color: var(--lavender);
}

.nav a.service-locked {
  color: var(--muted);
  opacity: 0.72;
}

.nav a.service-locked::after {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  content: "Non inclus";
  font-size: 10px;
  font-weight: 760;
  line-height: 1;
  padding: 4px 6px;
}

.nav-icon,
.icon-button::before,
.metric-icon,
.button-icon,
.status-dot {
  display: inline-flex;
  flex: 0 0 auto;
}

.nav-icon {
  color: currentColor;
  font-size: 0;
  height: 16px;
  width: 16px;
}

.nav-icon::before,
.icon-button::before {
  background: currentColor;
  content: "";
  display: block;
  height: 16px;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  width: 16px;
}

[data-main-menu="dashboard"] .nav-icon::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 3h8v8H3zM13 3h8v5h-8zM13 10h8v11h-8zM3 13h8v8H3z'/%3E%3C/svg%3E");
}

[data-main-menu="tablet"] .nav-icon::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm1 3v14h10V5z'/%3E%3C/svg%3E");
}

[data-main-menu="website"] .nav-icon::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20a10 10 0 0 0 0-20zm6.9 9h-3.1a15.5 15.5 0 0 0-1.2-5.1A8.1 8.1 0 0 1 18.9 11zM12 4.1c.7 1 1.5 3.2 1.7 6.9h-3.4c.2-3.7 1-5.9 1.7-6.9zM4.2 13h3.9c.1 2 .5 3.8 1 5.1A8 8 0 0 1 4.2 13zm3.9-2H4.2a8 8 0 0 1 4.9-5.1A16 16 0 0 0 8.1 11zM12 19.9c-.7-1-1.5-3.2-1.7-6.9h3.4c-.2 3.7-1 5.9-1.7 6.9zM14.9 18.1c.5-1.3.9-3.1 1-5.1h3.9a8 8 0 0 1-4.9 5.1z'/%3E%3C/svg%3E");
}

[data-main-menu="payments"] .nav-icon::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm8 1.5a4.5 4.5 0 0 0-4.2 3H6v2h1.4a5 5 0 0 0 0 1H6v2h1.8a4.5 4.5 0 0 0 7 2.1l-1.3-1.5a2.4 2.4 0 0 1-3.3-.6H13v-2H9.5a2.8 2.8 0 0 1 0-1H13v-2h-2.8a2.4 2.4 0 0 1 3.3-.6l1.3-1.5a4.5 4.5 0 0 0-2.8-.9z'/%3E%3C/svg%3E");
}

[data-main-menu="receipt"] .nav-icon::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 2h12v20l-3-2l-3 2l-3-2l-3 2zM8 6v2h8V6zm0 5v2h8v-2zm0 5v2h5v-2z'/%3E%3C/svg%3E");
}

[data-main-menu="settings"] .nav-icon::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.4 13.5c.1-.5.1-1 .1-1.5s0-1-.1-1.5l2-1.5l-2-3.5l-2.4 1a8 8 0 0 0-2.6-1.5L14 2h-4l-.4 2.5A8 8 0 0 0 7 6L4.6 5L2.6 8.5l2 1.5c-.1.5-.1 1-.1 1.5s0 1 .1 1.5l-2 1.5l2 3.5l2.4-1a8 8 0 0 0 2.6 1.5L10 22h4l.4-2.5A8 8 0 0 0 17 18l2.4 1l2-3.5zM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5z'/%3E%3C/svg%3E");
}

[data-main-menu="analytics"] .nav-icon::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 19h16v2H2V3h2zm2-2V9h3v8zm5 0V5h3v12zm5 0v-6h3v6z'/%3E%3C/svg%3E");
}

[data-main-menu="superadmin"] .nav-icon::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2l8 4v6c0 5-3.4 8.7-8 10c-4.6-1.3-8-5-8-10V6zm0 4.1L7 8.6V12c0 3.4 2 6 5 7.1c3-1.1 5-3.7 5-7.1V8.6z'/%3E%3C/svg%3E");
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  grid-area: actions;
  justify-content: end;
}

.icon-button {
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0;
  min-height: 36px;
  padding: 0;
  width: 36px;
}

#refreshButton::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.7 6.3A8 8 0 0 0 4.3 10H2l3.4 3.4L8.8 10H6.4a6 6 0 0 1 10-2.3L14 10h7V3zM6.3 17.7A8 8 0 0 0 19.7 14H22l-3.4-3.4L15.2 14h2.4a6 6 0 0 1-10 2.3L10 14H3v7z'/%3E%3C/svg%3E");
}

#logoutButton::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3H4v18h6v-2H6V5h4zm6.6 5.4L15.2 9.8l1.2 1.2H10v2h6.4l-1.2 1.2l1.4 1.4L20.4 12z'/%3E%3C/svg%3E");
}

.user-chip {
  align-items: center;
  border-left: 1px solid var(--border);
  display: flex;
  gap: 9px;
  min-height: 36px;
  padding-left: 10px;
}

.avatar {
  align-items: center;
  background: var(--lavender-soft);
  border: 1px solid var(--lavender-border);
  border-radius: 999px;
  color: var(--lavender);
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.user-chip strong,
.user-chip small {
  display: block;
  line-height: 1.1;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip strong {
  font-size: 12px;
  font-weight: 700;
}

.user-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 550;
}

.workspace {
  min-width: 0;
}

body.auth-only .sidebar {
  display: none;
}

body.auth-only .workspace {
  align-items: center;
  background:
    radial-gradient(circle at top left, rgba(111, 95, 215, 0.12), transparent 36%),
    var(--bg);
  display: grid;
  min-height: 100vh;
  padding: 32px 18px;
}

.auth-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 430px;
  padding: 34px;
  width: 100%;
}

.auth-panel h2,
.workspace h2,
.panel h3,
.detail-section-card h4 {
  letter-spacing: 0;
  margin: 0;
}

.auth-panel h2 {
  font-size: 28px;
  line-height: 1.08;
}

.auth-copy,
.muted,
.field-hint,
.page-subtitle {
  color: var(--muted);
  font-weight: 450;
  line-height: 1.45;
}

.auth-copy,
.page-subtitle {
  font-size: 14px;
  margin: 8px 0 0;
}

.field-hint {
  font-size: 12px;
}

.muted {
  font-size: 13px;
}

#dashboardPanel {
  min-width: 0;
}

.topbar,
.view {
  margin: 0 auto;
  max-width: var(--content-max);
  width: 100%;
}

.topbar {
  display: grid;
  gap: 18px;
  padding: 30px clamp(18px, 3vw, 32px) 0;
}

.title-row {
  align-items: flex-end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.topbar h2 {
  font-size: clamp(28px, 3vw, 32px);
  font-weight: 720;
  line-height: 1.08;
}

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

.subnav {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 22px;
  min-height: 44px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.subnav-link {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 1px;
}

.subnav-link:hover {
  background: transparent;
  box-shadow: none;
  color: var(--text);
}

.subnav-link.active {
  background: transparent;
  border-bottom-color: var(--lavender);
  color: var(--text);
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.status {
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 650;
  margin: 16px auto 0;
  max-width: calc(var(--content-max) - 64px);
  padding: 12px 14px;
}

.auth-panel .status {
  margin: 0;
}

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

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

.view {
  padding: 24px clamp(18px, 3vw, 32px) 32px;
}

.panel,
.detail-section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 22px;
}

.panel:hover,
.detail-section-card:hover {
  border-color: var(--border-strong);
}

.detail-panel {
  margin-top: 0;
}

.section-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-header h3,
.section-header h4,
.panel h3,
.detail-section-card h4 {
  font-size: 18px;
  font-weight: 680;
  line-height: 1.2;
}

.dashboard-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 20px;
}

.dashboard-summary.dashboard-home-wrap {
  display: block;
  margin-bottom: 24px;
}

.dashboard-home {
  display: grid;
  gap: 16px;
}

.dashboard-home-premium {
  gap: 18px;
}

.dashboard-command-card {
  align-items: stretch;
  background: linear-gradient(135deg, #0f172a, #182338);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: #fff;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  overflow: hidden;
  padding: 28px;
}

.dashboard-command-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.dashboard-command-card .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.dashboard-command-card h3 {
  color: #fff;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0;
}

.dashboard-command-card p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
  max-width: 680px;
}

.dashboard-command-metrics {
  align-content: stretch;
  display: grid;
  gap: 10px;
}

.dashboard-command-metrics .dashboard-hero-stat {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-command-metrics .dashboard-hero-stat strong,
.dashboard-command-metrics .dashboard-hero-stat small {
  color: #fff;
}

.dashboard-chip-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-overview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
}

.dashboard-hero-card,
.dashboard-health-card,
.dashboard-panel-card,
.dashboard-kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.dashboard-hero-card {
  align-items: end;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.dashboard-hero-card::after {
  background:
    linear-gradient(135deg, rgba(111, 95, 215, 0.14), rgba(22, 101, 52, 0.08)),
    radial-gradient(circle at 85% 20%, rgba(17, 24, 39, 0.08), transparent 32%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.dashboard-hero-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero-card h3,
.dashboard-health-card h3 {
  color: var(--text);
  font-size: 28px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.05;
  margin: 5px 0 8px;
}

.dashboard-hero-card p,
.dashboard-health-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  max-width: 620px;
}

.dashboard-hero-stats {
  display: grid;
  gap: 10px;
  min-width: 240px;
}

.dashboard-hero-stat {
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px;
}

.dashboard-hero-stat strong {
  color: var(--text);
  display: block;
  font-size: 22px;
  font-weight: 780;
  line-height: 1;
}

.dashboard-hero-stat small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 650;
  margin-top: 4px;
}

.dashboard-health-card {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 210px;
  padding: 24px;
}

.dashboard-score-ring {
  align-items: center;
  background: conic-gradient(var(--green) var(--score), var(--gray-soft) 0);
  border-radius: 50%;
  display: grid;
  flex: 0 0 auto;
  height: 112px;
  justify-items: center;
  place-content: center;
  position: relative;
  width: 112px;
}

.dashboard-score-ring::before {
  background: var(--surface);
  border-radius: 50%;
  content: "";
  inset: 10px;
  position: absolute;
}

.dashboard-score-ring strong,
.dashboard-score-ring span {
  position: relative;
  z-index: 1;
}

.dashboard-score-ring strong {
  color: var(--text);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.dashboard-score-ring span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-top: 4px;
  text-transform: uppercase;
}

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

.dashboard-kpi-card {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 116px;
  padding: 16px;
}

.dashboard-kpi-card small,
.dashboard-kpi-card em {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.35;
}

.dashboard-kpi-card strong {
  color: var(--text);
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  margin: 8px 0 6px;
}

.dashboard-live-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.dashboard-panel-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.dashboard-bar-row {
  display: grid;
  gap: 8px;
}

.dashboard-bar-label {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.dashboard-bar-label span:not(.metric-icon) {
  color: var(--text);
  font-size: 13px;
  font-weight: 680;
}

.dashboard-bar-label strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-bar-track {
  background: var(--gray-soft);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.dashboard-bar-track span {
  background: linear-gradient(90deg, var(--lavender), var(--green));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 6px;
}

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

.dashboard-attention-row {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: inherit;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 12px;
  text-align: left;
}

.dashboard-attention-row:hover,
.dashboard-attention-row:focus-visible {
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.dashboard-attention-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-attention-copy strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 760;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-attention-copy small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-attention-tags {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.dashboard-empty-line {
  background: var(--green-soft);
  border: 1px solid rgba(22, 101, 52, 0.16);
  border-radius: var(--radius-md);
  color: var(--green);
  display: grid;
  gap: 4px;
  padding: 14px;
}

.dashboard-empty-line strong {
  font-size: 14px;
}

.dashboard-empty-line span {
  font-size: 13px;
  line-height: 1.4;
}

.dashboard-action-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.dashboard-module-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.dashboard-action-grid .dashboard-menu-card {
  min-height: 126px;
}

.dashboard-work-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

.dashboard-priority-card,
.dashboard-selected-card {
  min-height: 180px;
}

.dashboard-selected-card {
  align-content: start;
}

.dashboard-selected-card h4 {
  color: var(--text);
  font-size: 22px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 4px 0 8px;
}

.compact-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.dashboard-list-header {
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 18px;
}

.stat-card,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 18px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.stat-card:hover,
.metric-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.metric-topline {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.metric-icon {
  align-items: center;
  background: var(--lavender-soft);
  border: 1px solid var(--lavender-border);
  border-radius: 10px;
  color: var(--lavender);
  display: inline-flex;
  flex: 0 0 auto;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.dashboard-menu-card {
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 14px;
  justify-items: start;
  min-height: 146px;
  min-width: 0;
  padding: 18px;
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  white-space: normal;
  width: 100%;
}

.dashboard-menu-card:hover,
.dashboard-menu-card:focus-visible {
  background: var(--surface);
  border-color: var(--border-strong);
  color: inherit;
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.dashboard-menu-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dashboard-menu-copy strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dashboard-menu-copy span {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.dashboard-menu-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.metric-icon svg,
.button-icon svg {
  display: block;
  height: 17px;
  width: 17px;
}

.stat-card span,
.metric-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.stat-card strong,
.metric-value {
  color: var(--text);
  font-size: 30px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
}

.stat-card small,
.metric-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.35;
}

.superadmin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.split-grid,
.settings-grid {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
}

.settings-grid > [data-detail-section-panel]:not(.hidden) {
  grid-column: 1 / -1;
}

.compact-form {
  max-width: 960px;
}

.detail-panel {
  position: relative;
}

.services-access-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
}

.compact-header {
  align-items: center;
  margin-bottom: 2px;
}

.service-toggle {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px;
}

.service-toggle input {
  height: 18px;
  min-height: 18px;
  width: 18px;
}

.service-toggle strong,
.service-toggle small {
  display: block;
}

.service-toggle small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-top: 3px;
}

.service-disabled-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  color: #9a3412;
  font-size: 13px;
  font-weight: 650;
  margin-top: 16px;
  padding: 12px 14px;
}

.locked-detail-panel {
  filter: blur(4px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.locked-service-page {
  display: grid;
  min-height: 440px;
  place-items: center;
}

.locked-service-page.hidden {
  display: none;
}

.locked-module-card-inline {
  margin-inline: auto;
  max-width: 620px;
  width: min(620px, 100%);
}

.locked-module-overlay {
  background: rgba(247, 247, 250, 0.58);
  backdrop-filter: blur(2px);
  border-radius: var(--radius-lg);
  display: grid;
  inset: 92px 18px 18px;
  place-items: center;
  position: absolute;
  z-index: 20;
}

.locked-module-overlay.hidden {
  display: none;
}

.locked-module-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 12px;
  max-width: 560px;
  padding: 28px;
  text-align: left;
  width: min(560px, calc(100% - 32px));
}

.lock-mark {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--navy);
  display: inline-flex;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.lock-mark::before {
  background: currentColor;
  content: "";
  height: 22px;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 9V7a5 5 0 0 0-10 0v2H5v12h14V9h-2Zm-8 0V7a3 3 0 0 1 6 0v2H9Z'/%3E%3C/svg%3E");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  width: 22px;
}

.locked-module-card h3 {
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.1;
}

.locked-module-card p {
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
}

.collapsed-form {
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 18px;
}

.form-grid,
.user-fields,
.grid-2,
.grid-3 {
  display: grid;
  gap: 12px;
}

.form-grid,
.grid-2,
.user-fields {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

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

.form {
  display: grid;
  gap: 14px;
}

label {
  color: var(--text-soft);
  display: grid;
  font-size: 12px;
  font-weight: 650;
  gap: 7px;
}

input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  min-height: 38px;
  padding: 0 11px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-light);
}

textarea {
  line-height: 1.45;
  padding: 10px 12px;
  resize: vertical;
}

input[type="file"] {
  align-items: center;
  display: flex;
  padding: 9px 12px;
}

input[type="color"] {
  cursor: pointer;
  min-height: 40px;
  padding: 4px;
}

input[readonly] {
  background: var(--surface-soft);
  color: var(--muted);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--lavender);
}

fieldset,
.calibration-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0;
  padding: 14px;
}

legend {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  padding: 0 6px;
}

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

.compact-grid label {
  min-width: 0;
}

.form-section-title {
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
  margin-top: 6px;
  text-transform: uppercase;
}

.option-grid,
.amount-editor {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
  padding: 12px;
}

.option-grid {
  align-items: center;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.amount-editor-row {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(105px, 0.65fr) repeat(3, minmax(140px, 1fr)) auto;
  padding: 12px;
}

.amount-editor-row label {
  gap: 6px;
}

.amount-editor-row input,
.amount-remove-button {
  min-height: 36px;
}

.website-panel {
  gap: 18px;
}

.website-builder {
  display: grid;
  gap: 14px;
}

.site-editor-toolbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(170px, 1fr) auto minmax(260px, 1fr);
  padding: 12px;
  position: sticky;
  top: 126px;
  z-index: 10;
}

.site-editor-toolbar > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-editor-toolbar > div:last-child {
  justify-content: flex-end;
}

.site-editor-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.device-switch {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.device-switch button {
  border-radius: 6px;
  min-height: 30px;
}

.device-switch button.active,
.site-editor-menu button.active,
.website-variant-card.active {
  background: var(--lavender-soft);
  border-color: var(--lavender-border);
  color: var(--lavender);
}

.site-editor-grid {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(230px, 260px) minmax(0, 1fr);
  min-width: 0;
}

.site-editor-left,
.site-editor-preview-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 14px;
  min-width: 0;
}

.site-editor-left {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 210px);
  overflow-y: auto;
}

.site-editor-menu,
.site-editor-sections,
.website-page-list,
.publication-summary {
  display: grid;
  gap: 8px;
}

.site-editor-menu button {
  justify-content: flex-start;
}

.site-editor-sections article,
.website-page-list article,
.publication-summary article {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
  padding: 10px;
}

.site-editor-sections article.active {
  border-color: var(--lavender);
  box-shadow: var(--focus);
}

.site-editor-sections article > div {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.section-handle {
  color: var(--muted);
  flex: 0 0 auto;
}

.site-editor-sections span,
.website-page-list span,
.publication-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.site-preview {
  background: #eef1f6;
  border-radius: var(--radius-md);
  margin: 0 auto;
  overflow: auto;
  padding: 14px;
  transition: width 160ms ease, max-width 160ms ease;
  width: 100%;
}

.site-preview.desktop {
  max-width: 1366px;
}

.site-preview.tablet {
  max-width: 100%;
  width: 768px;
}

.site-preview.mobile {
  max-width: 100%;
  width: 390px;
}

.preview-site {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  color: var(--preview-text);
  font-family: Montserrat, Inter, sans-serif;
  min-height: 620px;
  overflow: hidden;
}

.preview-site header {
  align-items: center;
  border-bottom: 1px solid #e6e9f2;
  display: grid;
  gap: 12px;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  min-height: var(--site-reference-header-height);
  padding: 10px clamp(24px, 6vw, 92px);
}

.preview-site header img {
  height: 70px;
  object-fit: contain;
  width: 70px;
}

.preview-site header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}

.preview-site header nav button {
  background: transparent;
  border: 0;
  color: #26334d;
  font-size: 15px;
  font-weight: 700;
  min-height: auto;
  padding: 0;
}

.preview-site header nav button.active {
  color: var(--preview-primary);
  text-decoration: underline;
  text-underline-offset: 8px;
}

.preview-site button {
  background: var(--preview-primary);
  border-color: var(--preview-primary);
  border-radius: var(--preview-radius);
  min-height: var(--site-reference-button-height);
}

.preview-site [data-preview-section].is-preview-selected {
  outline: 2px solid rgba(111, 95, 215, 0.34);
  outline-offset: -2px;
}

.preview-hero {
  background: var(--preview-secondary);
  color: #ffffff;
  display: grid;
  grid-template-columns: minmax(390px, 1fr) minmax(410px, 540px) minmax(150px, 0.7fr);
  min-height: var(--site-reference-hero-standard);
  overflow: hidden;
  position: relative;
}

.preview-hero.hero-height-compact {
  min-height: var(--site-reference-hero-compact);
}

.preview-hero.hero-height-large {
  min-height: var(--site-reference-hero-large);
}

.preview-copy {
  align-self: center;
  padding: 22px 18px 22px 52px;
}

.preview-copy h1 {
  font-size: clamp(40px, 3.7vw, 56px);
  line-height: 1.35;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.preview-hero.hero-title-size-small .preview-copy h1 {
  font-size: clamp(36px, 3.2vw, 46px);
}

.preview-hero.hero-title-size-large .preview-copy h1 {
  font-size: clamp(44px, 4.2vw, 64px);
}

.preview-copy h1 span {
  display: block;
}

.preview-copy small,
.preview-page-hero small {
  color: var(--preview-accent);
  display: inline-block;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.preview-copy h1 i {
  font-style: normal;
}

.preview-copy p {
  font-size: 15px;
  font-weight: 700;
}

.preview-copy .secondary {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--preview-secondary);
}

.preview-hero img {
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.preview-hero.hero-image-fit-contain img {
  background: var(--preview-secondary);
  object-fit: contain;
}

.preview-hero.hero-image-position-left img,
.preview-hero.hero-image-focal-left img {
  object-position: left center;
}

.preview-hero.hero-image-position-right img,
.preview-hero.hero-image-focal-right img {
  object-position: right center;
}

.preview-hero.hero-image-focal-top img {
  object-position: center top;
}

.preview-hero.hero-image-focal-bottom img {
  object-position: center bottom;
}

.preview-hero.hero-image-zoom-light img {
  transform: scale(1.04);
}

.preview-hero.hero-image-zoom-medium img {
  transform: scale(1.08);
}

.preview-logo-wrap,
.preview-image-wrap {
  display: block;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.website-identity-preview .preview-logo-wrap img {
  border-radius: 999px;
  height: 52px;
  object-fit: contain;
  width: 52px;
}

.preview-logo-wrap .preview-logo-fallback,
.preview-image-wrap .preview-image-fallback {
  display: none;
}

.preview-logo-wrap img.image-failed,
.preview-image-wrap img.image-failed {
  display: none;
}

.preview-logo-wrap img.image-failed + .preview-logo-fallback,
.preview-image-wrap img.image-failed + .preview-image-fallback {
  display: grid;
}

.preview-logo-fallback {
  align-items: center;
  background: #eef2ff;
  border: 1px solid #d9ddff;
  border-radius: 999px;
  color: var(--preview-primary);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  height: 52px;
  justify-items: center;
  width: 52px;
}

.preview-image-fallback {
  align-items: center;
  background: linear-gradient(135deg, #f5f7fb, #e8edf6);
  color: #64748b;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  min-height: 240px;
  text-align: center;
  width: 100%;
}

.preview-hero.background-image {
  display: block;
  position: relative;
}

.preview-hero.background-image img {
  filter: brightness(0.58);
  inset: 0;
  position: absolute;
}

.preview-hero.background-image .preview-image-wrap {
  inset: 0;
  position: absolute;
}

.preview-hero.background-image .preview-image-wrap img {
  height: 100%;
  width: 100%;
}

.preview-hero.background-image .preview-copy {
  position: relative;
  z-index: 1;
}

.preview-hero.floating-card {
  padding: 42px 24px;
}

.preview-hero.floating-card .preview-copy {
  background: #ffffff;
  border-radius: var(--site-reference-radius);
  color: var(--preview-text);
}

.preview-hero.image-left img {
  order: -1;
}

.preview-hero.architectural-cut {
  background: #061827;
  grid-template-columns: minmax(390px, 1fr) minmax(410px, 540px) minmax(150px, 0.7fr);
}

.preview-hero.architectural-cut .preview-copy {
  align-self: center;
  padding-left: 52px;
  z-index: 2;
}

.preview-hero.architectural-cut .preview-copy h1 {
  font-size: clamp(40px, 3.7vw, 56px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.35;
}

.preview-hero.architectural-cut.hero-title-size-small .preview-copy h1 {
  font-size: clamp(36px, 3.2vw, 46px);
}

.preview-hero.architectural-cut.hero-title-size-large .preview-copy h1 {
  font-size: clamp(44px, 4.2vw, 64px);
}

.preview-hero.architectural-cut .preview-image-wrap {
  clip-path: polygon(12% 0, 83% 0, 100% 100%, 28% 100%);
  height: 100%;
  min-height: var(--site-reference-hero-standard);
}

.preview-hero.hero-height-compact.architectural-cut .preview-image-wrap {
  min-height: var(--site-reference-hero-compact);
}

.preview-hero.hero-height-large.architectural-cut .preview-image-wrap {
  min-height: var(--site-reference-hero-large);
}

.preview-hero.architectural-cut .preview-image-wrap img {
  height: 100%;
}

.preview-hero.mosaic {
  grid-template-columns: 1fr 1fr;
  padding: 28px;
}

.preview-hero.panoramic {
  display: block;
}

.preview-hero.panoramic img {
  height: 220px;
}

.section-row-hint {
  color: #7b8498;
  display: block;
  font-size: 10px;
  font-weight: 700;
  margin-top: 3px;
}

.section-list-group-title {
  color: #667085;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 16px 0 8px;
  text-transform: uppercase;
}

.section-list-empty {
  color: #7b8498;
  font-size: 12px;
  margin: 6px 0 12px;
}

.preview-who {
  background: #f1ecfb;
  padding: 44px 28px;
  position: relative;
  text-align: center;
}

.preview-who h2 {
  font-size: 34px;
  margin: 0 0 12px;
}

.preview-who p {
  color: #667085;
  font-size: 13px;
  line-height: 1.6;
  margin: 0 auto;
  max-width: 760px;
}

.preview-text-columns {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0 auto;
  max-width: 860px;
}

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

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

.preview-text-columns p {
  margin: 0;
}

.preview-who > button {
  margin-top: 18px;
}

.preview-page-hero {
  background: #ffffff;
  padding: 54px 36px;
  position: relative;
}

.preview-page-hero h1 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.08;
  margin: 0 0 16px;
}

.preview-page-hero p {
  color: #667085;
  font-weight: 650;
  line-height: 1.7;
  max-width: 820px;
}

.preview-card-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.preview-card-grid article,
.preview-card-grid .empty-state {
  background: #ffffff;
  border: 1px solid #e6e9f2;
  border-radius: 8px;
  padding: 18px;
  text-align: left;
}

.preview-wide-image {
  margin-top: 24px;
}

.preview-membership-icon {
  align-items: center;
  background: #eef2ff;
  border-radius: 999px;
  color: var(--preview-primary);
  display: grid;
  font-weight: 900;
  height: 42px;
  justify-items: center;
  margin-bottom: 12px;
  width: 42px;
}

.preview-site footer {
  align-items: center;
  background: var(--preview-secondary);
  color: #ffffff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 22px 36px;
}

.site-editor-overlay {
  background: rgba(15, 23, 42, 0.18);
  inset: 0;
  position: fixed;
  z-index: 29;
}

.site-editor-drawer {
  background: var(--surface);
  border-left: 1px solid var(--border);
  bottom: 0;
  box-shadow: -18px 0 45px rgba(15, 23, 42, 0.18);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-width: 90vw;
  position: fixed;
  right: 0;
  top: 0;
  width: 420px;
  z-index: 30;
}

.site-editor-library {
  background: var(--surface);
  border-left: 1px solid var(--border);
  bottom: 0;
  box-shadow: -18px 0 45px rgba(15, 23, 42, 0.18);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-width: 92vw;
  position: fixed;
  right: 0;
  top: 0;
  width: 520px;
  z-index: 31;
}

.site-editor-drawer header,
.site-editor-drawer footer,
.site-editor-library header {
  align-items: center;
  background: var(--surface);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px;
}

.site-editor-drawer header,
.site-editor-library header {
  border-bottom: 1px solid var(--border);
}

.site-editor-drawer footer {
  border-top: 1px solid var(--border);
}

.site-editor-drawer-body {
  overflow-y: auto;
  padding: 16px;
}

.site-editor-drawer details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.section-editor-fields {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.rich-text-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.rich-text-field > span {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.rich-text-toolbar {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  padding: 6px;
}

.rich-text-toolbar label {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  font-size: 11px;
  font-weight: 750;
  gap: 6px;
  margin: 0;
}

.rich-text-toolbar input[type="color"] {
  min-height: 30px;
  padding: 2px;
  width: 36px;
}

.rich-text-toolbar input[type="number"] {
  min-height: 30px;
  padding: 0 8px;
  width: 70px;
}

.rich-text-toolbar select {
  min-height: 30px;
  padding: 0 8px;
}

.rich-text-editor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  line-height: 1.6;
  min-height: 98px;
  min-width: 0;
  outline: 0;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.rich-text-field-compact .rich-text-editor {
  min-height: 52px;
}

.rich-text-editor:focus {
  border-color: var(--lavender);
  box-shadow: 0 0 0 3px rgba(111, 95, 215, 0.14);
}

.rich-text-editor:empty::before {
  color: var(--muted);
  content: "Ecrivez le texte ici...";
}

.section-action-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: grid;
  min-width: 220px;
  padding: 6px;
  position: fixed;
  z-index: 60;
}

.section-action-menu button {
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text);
  justify-content: flex-start;
  min-height: 34px;
  padding: 8px 10px;
}

.section-action-menu button:hover {
  background: var(--surface-soft);
  box-shadow: none;
}

.section-action-menu button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.48;
}

.section-library-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.section-library-card {
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  display: grid;
  gap: 6px;
  height: auto;
  justify-items: start;
  padding: 12px;
  text-align: left;
  white-space: normal;
}

.section-library-card span {
  color: var(--lavender);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.section-library-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.section-library-card:disabled {
  opacity: 0.55;
}

.site-editor-drawer details + details {
  margin-top: 10px;
}

.site-editor-drawer summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.website-identity-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 14px;
  padding: 14px;
}

.website-identity-preview {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.website-identity-preview article {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 12px;
}

.website-identity-preview article.dark {
  background: #071827;
  color: #ffffff;
}

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

.section-variant-picker {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.section-variant-picker > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.website-variant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: grid;
  gap: 8px;
  height: auto;
  justify-items: start;
  padding: 10px;
  white-space: normal;
}

.website-preview-iframe {
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  display: block;
  min-height: 720px;
  width: 100%;
}

.site-preview.tablet .website-preview-iframe {
  min-height: 760px;
}

.site-preview.mobile .website-preview-iframe {
  min-height: 820px;
}

.form-section-title.with-action,
.site-editor-page-row {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.site-editor-page-row button:first-child {
  flex: 1;
  justify-content: space-between;
  min-width: 0;
}

.site-editor-page-row.active button:first-child {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}

.site-editor-page-row small {
  color: var(--muted);
  font-size: 11px;
}

.variant-thumb {
  background: linear-gradient(90deg, var(--navy) 0 46%, #dfe7f6 46% 100%);
  border-radius: 6px;
  height: 42px;
  width: 100%;
}

.variant-thumb.background-image {
  background: linear-gradient(rgba(7, 24, 39, 0.58), rgba(7, 24, 39, 0.58)), linear-gradient(120deg, #93c5fd, #fef3c7);
}

.variant-thumb.floating-card {
  background: linear-gradient(90deg, #dbeafe 0 100%);
  position: relative;
}

.variant-thumb.floating-card::after {
  background: #ffffff;
  border-radius: 5px;
  content: "";
  height: 26px;
  left: 10px;
  position: absolute;
  top: 8px;
  width: 50%;
}

.variant-thumb.image-left {
  background: linear-gradient(90deg, #dfe7f6 0 48%, var(--navy) 48% 100%);
}

.variant-thumb.architectural-cut {
  background: linear-gradient(105deg, var(--navy) 0 43%, #dfe7f6 43% 74%, var(--navy) 74% 100%);
}

.variant-thumb.mosaic {
  background: linear-gradient(90deg, var(--navy) 0 42%, #dfe7f6 42% 70%, #bfdbfe 70% 100%);
}

.variant-thumb.panoramic {
  background: linear-gradient(180deg, var(--navy) 0 44%, #dfe7f6 44% 100%);
}

.website-block {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.compact-section-header {
  align-items: end;
  margin-bottom: 4px;
}

.website-toggle {
  align-self: end;
  min-height: 38px;
}

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

.icon-small {
  min-height: 38px;
  padding: 0;
  width: 34px;
}

.section-handle {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: grab;
  font-weight: 900;
  min-height: 28px;
  padding: 0 4px;
  width: auto;
}

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

.section-handle:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.site-editor-sections article {
  position: relative;
}

.site-editor-sections article.is-hidden-section {
  opacity: 0.56;
}

.hidden-section-badge {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  margin-left: 8px;
  padding: 3px 6px;
}

.section-eye::before {
  background: currentColor;
  content: "";
  display: block;
  height: 16px;
  margin: auto;
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 5C6.5 5 2.2 9.1 1 12c1.2 2.9 5.5 7 11 7s9.8-4.1 11-7c-1.2-2.9-5.5-7-11-7Zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Z'/%3E%3C/svg%3E");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  width: 16px;
}

.section-eye.is-off::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m3 4.3 1.3-1.3 17 17-1.3 1.3-3.1-3.1A11.9 11.9 0 0 1 12 19C6.5 19 2.2 14.9 1 12a14.8 14.8 0 0 1 4-5.1L3 4.3Zm7.2 7.2a2 2 0 0 0 2.3 2.3l-2.3-2.3ZM12 5c5.5 0 9.8 4.1 11 7a14.6 14.6 0 0 1-3.2 4.4l-3-3A4.8 4.8 0 0 0 17 12a5 5 0 0 0-5-5 4.8 4.8 0 0 0-1.4.2L8.3 4.9A12 12 0 0 1 12 5Z'/%3E%3C/svg%3E");
}

.site-editor-sections article.is-dragging {
  box-shadow: var(--shadow-sm);
  cursor: grabbing;
  opacity: 0.72;
}

.site-editor-sections article.drop-before::before,
.site-editor-sections article.drop-after::after {
  background: var(--lavender);
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 10px;
  position: absolute;
  right: 10px;
}

.site-editor-sections article.drop-before::before {
  top: -7px;
}

.site-editor-sections article.drop-after::after {
  bottom: -7px;
}

.preview-spacer {
  min-height: 48px;
  position: relative;
}

.preview-spacer-small {
  min-height: 28px;
}

.preview-spacer-large {
  min-height: 86px;
}

.website-text-details {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.website-text-details summary {
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.website-text-editor {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.website-text-group {
  display: grid;
  gap: 10px;
}

.website-text-group h5 {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  margin: 0;
}

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

.website-catalog-row {
  align-items: end;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) minmax(110px, 0.45fr) minmax(180px, 1fr) auto auto;
  padding: 12px;
}

.membership-catalog-row {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.website-catalog-row label {
  min-width: 0;
}

.apps-list,
.device-list,
.users-list,
.recurring-list,
.category-list,
.settings-list,
.checkbox-list {
  display: grid;
  gap: 12px;
}

.receipt-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.payment-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.receipt-table-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.table-pagination {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 10px;
  justify-content: flex-end;
}

.receipt-table + .table-pagination,
.payment-table + .table-pagination {
  justify-content: space-between;
  margin-top: 12px;
}

.table-page-size,
.table-page-buttons {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.table-page-size select {
  min-height: 32px;
  padding: 0 28px 0 10px;
  width: auto;
}

.table-page-buttons button {
  min-height: 32px;
  padding: 0 12px;
}

.table-page-buttons span,
.table-page-status {
  color: var(--text-soft);
  font-weight: 650;
}

.receipt-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1080px;
  width: 100%;
}

.payment-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1180px;
  width: 100%;
}

[data-detail-section-panel="receipt"] input,
[data-detail-section-panel="receipt"] textarea,
[data-detail-section-panel="receipt"] select,
[data-detail-section-panel="receipt-list"] input,
[data-detail-section-panel="receipt-list"] textarea,
[data-detail-section-panel="receipt-list"] select,
[data-detail-section-panel="receipt-manual"] input,
[data-detail-section-panel="receipt-manual"] textarea,
[data-detail-section-panel="receipt-manual"] select,
[data-detail-section-panel="payments"] input,
[data-detail-section-panel="payments"] textarea,
[data-detail-section-panel="payments"] select {
  min-width: 0;
}

.receipt-table th,
.receipt-table td,
.payment-table th,
.payment-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.receipt-table th,
.payment-table th {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-filter-row th {
  background: var(--surface-muted);
}

.receipt-filter-row input {
  font-size: 12px;
  min-height: 34px;
  padding: 0 9px;
  width: 100%;
}

.payment-summary {
  margin: 18px 0 22px;
}

.payment-kind-badge {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  min-height: 26px;
  padding: 0 9px;
  white-space: nowrap;
}

.payment-stripe-id {
  background: var(--surface-muted);
  border-radius: 6px;
  color: var(--text-soft);
  display: inline-block;
  font-size: 11px;
  max-width: 190px;
  overflow: hidden;
  padding: 3px 6px;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.analytics-panel {
  gap: 18px;
}

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

.analytics-block {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
}

.analytics-block-header {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.analytics-block-header span {
  color: var(--text);
  font-weight: 800;
}

.analytics-block-header small {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.analytics-bars {
  display: grid;
  gap: 12px;
}

.analytics-bar-row {
  display: grid;
  gap: 8px;
}

.analytics-bar-row > div:first-child {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.analytics-bar-row strong {
  color: var(--text);
}

.analytics-bar-row span,
.analytics-bar-row small {
  color: var(--muted);
  font-size: 13px;
}

.analytics-bar-track {
  background: #e7edf7;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.analytics-bar-track span {
  background: linear-gradient(90deg, var(--text), var(--lavender));
  display: block;
  height: 100%;
}

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

.analytics-health-item {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  min-width: 0;
  padding: 12px;
}

.analytics-health-item strong {
  color: var(--text);
  font-size: 22px;
}

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

.analytics-recent-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  padding: 12px;
}

.analytics-recent-row > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.analytics-recent-row > div:last-child {
  justify-items: end;
}

.analytics-recent-row span,
.analytics-recent-row small {
  color: var(--muted);
  font-size: 12px;
}

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

.app-item,
.category-item,
.user-item,
.device-item,
.recurring-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 14px;
  padding: 16px;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.app-item:hover,
.category-item:hover,
.user-item:hover,
.device-item:hover,
.recurring-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.app-item {
  align-items: center;
  grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 1fr) auto;
}

.org-identity {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: 44px minmax(0, 1fr);
}

.org-avatar {
  align-items: center;
  background: var(--navy);
  border-radius: var(--radius-md);
  color: #ffffff;
  display: inline-flex;
  font-size: 15px;
  font-weight: 760;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.org-name,
.app-item h4,
.category-item h4,
.user-item h4,
.device-item h4,
.recurring-item h4 {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}

.org-meta,
.app-item p,
.category-item p,
.device-item p,
.recurring-item p {
  margin: 0;
}

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

.info-chip {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-soft);
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 9px 10px;
}

.info-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.info-chip strong {
  font-size: 14px;
  font-weight: 700;
}

.org-status-actions {
  align-items: end;
  display: grid;
  gap: 12px;
  justify-items: end;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.app-actions.align-start {
  justify-content: flex-start;
}

.app-actions button {
  min-height: 36px;
}

.superadmin-org-settings {
  border-top: 1px solid var(--border);
  grid-column: 1 / -1;
  margin-top: 8px;
  min-width: 0;
  padding-top: 12px;
}

.superadmin-org-settings summary {
  align-items: center;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
}

.superadmin-org-settings summary::after {
  color: var(--muted);
  content: "Afficher les reglages";
  font-size: 12px;
  font-weight: 600;
}

.superadmin-org-settings[open] summary::after {
  content: "Masquer";
}

.superadmin-org-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.superadmin-org-block {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
}

.superadmin-org-block-wide {
  grid-column: 1 / -1;
}

.superadmin-org-block h5 {
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
}

.superadmin-org-block label,
.superadmin-org-block input {
  min-width: 0;
}

.superadmin-org-block .grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.superadmin-org-block .compact-grid {
  gap: 10px;
}

.compact-toggle {
  background: var(--surface);
}

.pill-stack {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.status-badge,
.pill {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 650;
  gap: 6px;
  line-height: 1;
  min-height: 26px;
  padding: 0 9px;
  white-space: nowrap;
}

.status-dot {
  border-radius: 999px;
  height: 6px;
  width: 6px;
}

.status-ready,
.pill {
  background: var(--green-soft);
  border-color: #cbeed9;
  color: var(--green);
}

.status-ready .status-dot,
.pill .status-dot {
  background: var(--green);
}

.status-pending {
  background: var(--amber-soft);
  border-color: #f6dfad;
  color: var(--amber);
}

.status-pending .status-dot {
  background: var(--amber);
}

.status-error {
  background: var(--red-soft);
  border-color: #fac7c3;
  color: var(--red);
}

.status-error .status-dot {
  background: var(--red);
}

.status-neutral {
  background: var(--gray-soft);
  border-color: var(--border);
  color: var(--text-soft);
}

.status-neutral .status-dot {
  background: var(--muted);
}

.status-fiscal,
.pill.neutral {
  background: var(--lavender-soft);
  border-color: var(--lavender-border);
  color: var(--lavender);
}

.pill.warning {
  background: var(--amber-soft);
  border-color: #f6dfad;
  color: var(--amber);
}

.status-fiscal .status-dot {
  background: var(--lavender);
}

.empty-state {
  align-items: center;
  background: var(--surface-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 150px;
  padding: 24px;
  text-align: center;
}

.empty-state button {
  margin-top: 8px;
}

.empty-state strong {
  color: var(--text);
  font-size: 15px;
}

.skeleton-grid,
.skeleton-list {
  display: grid;
  gap: 14px;
}

.skeleton-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 20px;
}

.skeleton-card,
.skeleton-row {
  animation: shimmer 1.2s ease-in-out infinite;
  background: linear-gradient(90deg, #f3f4f6, #ffffff, #f3f4f6);
  background-size: 220% 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.skeleton-card {
  height: 132px;
}

.skeleton-row {
  height: 92px;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.recurring-meta,
.payment-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-history {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.payment-row {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 550;
  grid-template-columns: 110px 100px 180px minmax(0, 1fr);
}

.danger {
  border-color: #f4b3ac;
  color: var(--red);
}

.danger:hover {
  background: var(--red-soft);
  border-color: #f28b82;
}

.checkbox-list small {
  color: var(--muted);
  font-weight: 550;
  margin-left: 6px;
}

.calibration-panel {
  background: var(--surface);
}

.calibration-panel summary,
.category-editor summary,
.inline-editor summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
}

.calibration-grid {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.calibration-item,
.category-editor,
.inline-editor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.calibration-item h5 {
  color: var(--text);
  font-size: 13px;
  margin: 0;
}

.calibration-inputs {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
}

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

.calibration-inputs input {
  min-height: 34px;
  padding: 0 8px;
}

.detail-tabs {
  display: none;
}

.detail-section-card > h4:first-child {
  margin: 0 0 4px;
}

.creation-panel .section-header {
  margin-bottom: 0;
}

.category-main {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr);
}

.category-icon {
  align-items: center;
  background: var(--lavender-soft);
  border: 1px solid var(--lavender-border);
  border-radius: var(--radius-md);
  color: var(--lavender);
  display: flex;
  font-weight: 750;
  height: 48px;
  justify-content: center;
  overflow: hidden;
  width: 48px;
}

.category-icon img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.amount-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amount-chip {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  font-weight: 650;
  padding: 7px 10px;
}

.amount-chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 550;
}

.category-editor[open],
.inline-editor[open] {
  box-shadow: var(--shadow-sm);
}

.category-editor > * + *,
.inline-editor > * + * {
  margin-top: 12px;
}

.category-option-grid {
  align-self: stretch;
  grid-template-columns: 1fr;
}

.inline-check {
  align-items: center;
  display: flex;
  gap: 10px;
}

.inline-check input {
  min-height: auto;
  width: auto;
}

.tablet-category-preview {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66)),
    var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  display: grid;
  gap: 16px;
  padding: 18px;
}

.tablet-category-preview-head,
.category-settings-head,
.category-settings-summary,
.category-disabled-item {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.tablet-category-preview-head h4,
.category-disabled-section h4,
.category-settings-head h4 {
  margin: 0;
}

.tablet-category-stage {
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 18px;
  display: grid;
  gap: 14px;
  min-height: 360px;
  padding: 14px;
}

.tablet-category-count-1 {
  grid-template-columns: minmax(220px, 440px);
  justify-content: center;
}

.tablet-category-count-2,
.tablet-category-count-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tablet-category-count-3,
.tablet-category-count-6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tablet-category-count-5 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tablet-category-count-5 .tablet-category-tile:nth-child(-n + 2) {
  grid-column: span 3;
  min-height: 190px;
}

.tablet-category-count-5 .tablet-category-tile:nth-child(n + 3) {
  grid-column: span 2;
  min-height: 160px;
}

.tablet-category-count-7,
.tablet-category-count-8 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tablet-category-tile {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid rgba(15, 23, 42, 0.54);
  border-radius: 15px;
  color: var(--text);
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  min-height: 168px;
  padding: 20px;
  text-align: center;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
  width: 100%;
}

.tablet-category-tile:hover,
.tablet-category-tile.is-selected {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--lavender);
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.11);
  transform: translateY(-1px);
}

.tablet-category-tile:active {
  cursor: grabbing;
}

.tablet-category-tile.is-dragging {
  opacity: 0.45;
  transform: scale(0.985);
}

.tablet-category-tile.is-drop-target {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.tablet-category-icon {
  align-items: center;
  display: flex;
  height: 88px;
  justify-content: center;
  width: 88px;
}

.tablet-category-icon img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.tablet-category-icon span {
  align-items: center;
  background: var(--lavender-soft);
  border: 1px solid var(--lavender-border);
  border-radius: 20px;
  color: var(--lavender);
  display: flex;
  font-size: 32px;
  font-weight: 800;
  height: 88px;
  justify-content: center;
  width: 88px;
}

.tablet-category-label {
  color: var(--text);
  font-size: clamp(22px, 2.1vw, 34px);
  font-weight: 700;
  line-height: 1.05;
}

.tablet-category-empty {
  align-items: center;
  background: rgba(255, 255, 255, 0.58);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 260px;
  text-align: center;
}

.tablet-category-empty strong {
  color: var(--text);
}

.category-settings-panel,
.category-disabled-section {
  margin-top: 16px;
}

.category-settings-panel {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.category-settings-head {
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.category-settings-summary {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.category-settings-actions {
  align-items: center;
}

.category-disabled-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.category-disabled-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.category-disabled-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

@media (max-width: 1180px) {
  .tablet-category-count-7,
  .tablet-category-count-8 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tablet-category-count-3,
  .tablet-category-count-5,
  .tablet-category-count-6,
  .tablet-category-count-7,
  .tablet-category-count-8 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tablet-category-count-5 .tablet-category-tile:nth-child(n) {
    grid-column: auto;
  }

  .category-settings-head,
  .category-settings-summary,
  .category-disabled-item {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .tablet-category-stage,
  .tablet-category-count-1,
  .tablet-category-count-2,
  .tablet-category-count-3,
  .tablet-category-count-4,
  .tablet-category-count-5,
  .tablet-category-count-6,
  .tablet-category-count-7,
  .tablet-category-count-8 {
    grid-template-columns: 1fr;
  }

  .tablet-category-tile {
    min-height: 150px;
  }
}

.website-placeholder {
  align-content: start;
  background: linear-gradient(135deg, #f6f4ff, #ffffff);
  min-height: 220px;
}

.creation-modal {
  align-items: stretch;
  display: grid;
  inset: 0;
  justify-items: end;
  padding: 18px;
  position: fixed;
  z-index: 50;
}

.creation-backdrop {
  background: rgba(17, 24, 39, 0.34);
  border: 0;
  border-radius: 0;
  inset: 0;
  min-height: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}

.creation-backdrop:hover {
  background: rgba(17, 24, 39, 0.38);
  box-shadow: none;
}

.creation-dialog {
  align-self: stretch;
  max-width: min(760px, calc(100vw - 36px));
  overflow: auto;
  position: relative;
  width: 100%;
}

.creation-dialog .form {
  min-width: 0;
}

.creation-dialog .grid-2,
.creation-dialog .grid-3,
.creation-dialog .amount-editor-row {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.creation-dialog .amount-remove-button {
  width: 100%;
}

.general-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 16px 0;
}

.settings-action-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 18px 0 14px;
}

.settings-action-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
}

.settings-action-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.settings-action-card h5 {
  font-size: 18px;
  line-height: 1.18;
  margin: 0;
}

.settings-action-card > p:not(.eyebrow) {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.45;
  margin: 0;
}

.settings-action-buttons {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}

.settings-action-buttons button {
  min-height: 36px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .dashboard-summary,
  .compact-summary,
  .skeleton-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-overview-grid,
  .dashboard-live-grid,
  .dashboard-work-grid {
    grid-template-columns: 1fr;
  }

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

  .app-item {
    grid-template-columns: minmax(240px, 1fr);
  }

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

  .site-editor-toolbar,
  .site-editor-grid {
    grid-template-columns: 1fr;
  }

  .site-editor-left {
    max-height: none;
  }

  .site-editor-toolbar > div:last-child {
    justify-content: flex-start;
  }

  .org-status-actions,
  .app-actions,
  .pill-stack {
    justify-content: flex-start;
    justify-items: start;
  }
}

@media (max-width: 900px) {
  .analytics-layout,
  .analytics-health-grid,
  .dashboard-command-card,
  .dashboard-hero-card,
  .superadmin-org-grid {
    grid-template-columns: 1fr;
  }

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

  .dashboard-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .sidebar {
    grid-template-areas:
      "brand actions"
      "org org"
      "nav nav";
    grid-template-columns: 1fr auto;
  }

  .brand-block::after {
    display: none;
  }

  .org-picker {
    max-width: none;
  }

  .title-row,
  .section-header,
  .category-item header,
  .device-item header,
  .recurring-item header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .analytics-recent-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-recent-row > div:last-child {
    justify-items: start;
  }

  .settings-grid,
  .split-grid,
  .form-grid,
  .user-fields,
  .grid-2,
  .grid-3,
  .option-grid,
  .amount-editor-row,
  .website-text-grid,
  .website-catalog-row,
  .website-variant-grid,
  .website-palette-grid,
  .website-identity-preview,
  .preview-card-grid,
  .payment-row,
  .recurring-meta,
  .color-row,
  .calibration-inputs,
  .org-operational,
  .general-summary,
  .settings-action-grid,
    .dashboard-summary,
    .compact-summary,
    .dashboard-kpi-grid,
    .preview-text-layout-two .preview-text-columns,
    .preview-text-layout-three .preview-text-columns,
    .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-card,
  .dashboard-command-card,
  .dashboard-health-card,
  .dashboard-panel-card {
    padding: 18px;
  }

  .dashboard-command-card h3 {
    font-size: 28px;
  }

  .dashboard-command-metrics,
  .dashboard-module-grid,
  .dashboard-work-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-card h3,
  .dashboard-health-card h3 {
    font-size: 24px;
  }

  .dashboard-hero-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-health-card {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .dashboard-attention-row {
    align-items: start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .dashboard-attention-tags {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .preview-site header,
  .preview-hero {
    grid-template-columns: 1fr;
  }

  .preview-hero,
  .preview-hero.hero-height-compact,
  .preview-hero.hero-height-large {
    min-height: auto;
  }

  .preview-hero.architectural-cut .preview-copy {
    padding: 32px 24px;
  }

  .preview-hero.architectural-cut .preview-image-wrap {
    clip-path: none;
    min-height: 220px;
  }

  .site-preview.tablet,
  .site-preview.mobile {
    width: 100%;
  }

  .site-editor-drawer {
    max-width: none;
    width: 100%;
  }

  .preview-site header nav {
    justify-content: flex-start;
  }

  .sidebar {
    padding: 12px 14px 10px;
  }

  .user-chip strong,
  .user-chip small {
    max-width: 92px;
  }

  .topbar {
    padding: 22px 18px 0;
  }

  .view {
    padding: 20px 18px 24px;
  }

  .panel,
  .detail-section-card,
  .auth-panel {
    padding: 18px;
  }

  .locked-module-overlay {
    inset: 76px 10px 10px;
  }

  .locked-module-card {
    padding: 22px;
    width: calc(100% - 20px);
  }

  .subnav {
    gap: 18px;
  }
}
