/* =========================================================
   FixCRM Admin — Nuovo tema light/dark
   ========================================================= */

:root {
  color-scheme: light;
  --fx-bg: #f4f8f9;
  --fx-surface: #ffffff;
  --fx-surface-muted: #eaf6f8;
  --fx-sidebar-bg: linear-gradient(180deg, #e2f3f5 0%, #d7ecf2 100%);
  --fx-border: #c7d9dd;
  --fx-border-strong: #a8c3c9;
  --fx-text: #0f2a3a;
  --fx-text-muted: #3d5a66;
  --fx-text-soft: #6a8a95;
  --fx-brand: #003d6b;
  --fx-accent: #1aa7b9;
  --fx-accent-strong: #00527c;
  --fx-primary: var(--fx-accent);
  --fx-on-primary: #ffffff;
  --fx-success: #1f9d70;
  --fx-focus-ring: rgba(26, 167, 185, 0.35);
  --fx-shadow-soft: 0 20px 45px -20px rgba(11, 52, 68, 0.3);
  --fx-radius-sm: 10px;
  --fx-radius: 16px;
  --fx-radius-lg: 22px;
  --fx-sidebar-width: 280px;
  --fx-transition: 160ms ease;
  --fx-space-0-5: 0.5rem;
  --fx-space-0-75: 0.75rem;
  --fx-space-1: 1rem;
  --fx-space-1-5: 1.5rem;
  --fx-space-2: 2rem;
  --fx-card-bg: var(--fx-surface);
  --fx-card-radius: 1.125rem;
  --fx-card-border: 1px solid rgba(15, 23, 42, 0.08);
  --fx-card-shadow: 0 20px 45px -24px rgba(15, 23, 42, 0.28), 0 12px 28px -18px rgba(15, 23, 42, 0.18);
  --fx-sticky-offset: 24px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --fx-bg: #041821;
  --fx-surface: #0b2430;
  --fx-surface-muted: #0f2e3b;
  --fx-sidebar-bg: linear-gradient(180deg, #0a2a36 0%, #061b24 100%);
  --fx-border: #103644;
  --fx-border-strong: #184b5c;
  --fx-text: #e3f3f6;
  --fx-text-muted: #8cc4cf;
  --fx-text-soft: #5e8f9b;
  --fx-brand: #9fe0ec;
  --fx-accent: #46c8d3;
  --fx-accent-strong: #2aa4c0;
  --fx-primary: var(--fx-accent);
  --fx-on-primary: #041821;
  --fx-success: #3bd2a3;
  --fx-focus-ring: rgba(70, 200, 211, 0.45);
  --fx-shadow-soft: 0 30px 60px -25px rgba(0, 32, 43, 0.65);
  --fx-card-bg: var(--fx-surface);
  --fx-card-border: 1px solid rgba(159, 224, 236, 0.16);
  --fx-card-shadow: 0 30px 60px -28px rgba(0, 32, 43, 0.65), 0 16px 40px -24px rgba(0, 32, 43, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: var(--fx-bg);
  color: var(--fx-text);
  transition: background-color var(--fx-transition), color var(--fx-transition);
}

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

.fx-link {
  color: var(--fx-accent);
  text-decoration: none;
}

.fx-link:hover,
.fx-link:focus {
  text-decoration: underline;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  cursor: pointer;
}

button:disabled,
.fx-btn[disabled] {
  cursor: not-allowed;
  opacity: .65;
}

:focus-visible {
  outline: 3px solid transparent;
  box-shadow: 0 0 0 3px var(--fx-focus-ring);
  border-color: var(--fx-accent) !important;
}

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

/* Layout */
.fx-layout {
  display: grid;
  grid-template-columns: var(--fx-sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.fx-sidebar {
  background: var(--fx-sidebar-bg);
  border-right: 1px solid var(--fx-border);
  padding: 32px 20px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  transition: background var(--fx-transition), border-color var(--fx-transition);
  overflow: hidden;
}

.fx-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.fx-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 24px;
  background: linear-gradient(135deg, var(--fx-accent) 0%, var(--fx-accent-strong) 100%);
  color: #fff;
  box-shadow: 0 18px 30px -18px rgba(26, 167, 185, .7);
}

.fx-brand-txt strong {
  display: block;
  font-size: 15px;
  color: var(--fx-brand);
}

.fx-brand-txt span {
  display: block;
  font-size: 13px;
  color: var(--fx-text-soft);
}

.fx-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
  scroll-padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 23, 42, 0.28) transparent;
}

.fx-nav::-webkit-scrollbar {
  width: 6px;
}

.fx-nav::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.fx-nav:hover::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.28);
}

html[data-theme="dark"] .fx-nav::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .fx-nav:hover::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.32);
}

.fx-nav-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fx-text-soft);
  margin: 0 0 6px 14px;
}

.fx-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--fx-radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--fx-text);
  transition: background var(--fx-transition), border-color var(--fx-transition), color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-nav-item:hover:not(.is-disabled) {
  background: var(--fx-surface-muted);
  border-color: var(--fx-border);
}

.fx-nav-item.is-active {
  background: rgba(26, 167, 185, .12);
  border-color: rgba(26, 167, 185, .4);
  color: var(--fx-accent-strong);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.fx-nav-item.is-disabled {
  opacity: .55;
  cursor: not-allowed;
}

.fx-ic {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.fx-ic > i {
  font-size: 20px;
  line-height: 1;
}

.fx-btn i[class^="ri-"],
.fx-btn i[class*=" ri-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: 1.2em;
  line-height: 1;
}

.fx-btn.fx-btn-compact i[class^="ri-"],
.fx-btn.fx-btn-compact i[class*=" ri-"] {
  margin-right: 6px;
  font-size: 1.05em;
}

.fx-btn i[class^="ri-"]:last-child,
.fx-btn i[class*=" ri-"]:last-child {
  margin-right: 0;
}

.fx-btn.fx-btn-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fx-btn.fx-btn-with-badge .fx-badge {
  margin-left: 0;
  padding: 2px 10px;
  min-width: 28px;
}

.fx-nav-text {
  font-weight: 500;
}

.fx-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--fx-accent-strong);
  color: #fff;
  transition: background var(--fx-transition), color var(--fx-transition);
}

.fx-badge.muted {
  background: transparent;
  color: var(--fx-text-soft);
  border: 1px solid var(--fx-border);
}

.fx-note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  padding: 0 6px;
  min-width: 20px;
  height: 20px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(26, 167, 185, 0.14);
  color: var(--fx-accent-strong);
  vertical-align: middle;
}

.fx-sidebar-foot {
  margin-top: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

.fx-theme-toggle,
.fx-logout,
.fx-btn {
  border-radius: var(--fx-radius-sm);
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  color: var(--fx-text);
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  transition: background var(--fx-transition), border-color var(--fx-transition), color var(--fx-transition), box-shadow var(--fx-transition), transform var(--fx-transition);
}

.fx-theme-toggle:hover,
.fx-logout:hover,
.fx-btn:hover {
  background: var(--fx-surface-muted);
  border-color: var(--fx-border-strong);
}

.fx-btn.primary {
  background: linear-gradient(135deg, var(--fx-accent) 0%, var(--fx-accent-strong) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 20px -12px rgba(26, 167, 185, .75);
}

.fx-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 26px -14px rgba(26, 167, 185, .75);
}

.fx-theme-toggle:active,
.fx-logout:active,
.fx-btn:active {
  background: #fff;
  color: var(--fx-text);
  border-color: var(--fx-border-strong);
  box-shadow: none;
}

.fx-btn.secondary {
  background: var(--fx-surface-muted);
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--fx-text);
}

.fx-btn.secondary:hover,
.fx-btn.secondary:focus {
  border-color: var(--fx-border-strong);
  background: var(--fx-surface);
}

.fx-btn.primary:active,
.fx-btn.primary:active:focus {
  background: #fff;
  color: var(--fx-text);
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 1px rgba(26, 167, 185, .35);
}

.fx-btn.ghost:active,
.fx-btn.ghost:active:focus {
  background: rgba(26, 167, 185, .12);
}

.fx-btn.ghost {
  background: transparent;
}

.fx-btn.fx-btn-full {
  width: 100%;
  justify-content: center;
}

.fx-btn.ghost:hover {
  background: rgba(26, 167, 185, .08);
}

.fx-btn.danger,
.fx-btn.ghost.danger {
  background: var(--fx-danger, #dc2626);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 20px -12px rgba(220, 38, 38, .55);
}

.fx-btn.danger:hover,
.fx-btn.ghost.danger:hover,
.fx-btn.ghost.danger:focus {
  transform: translateY(-1px);
  box-shadow: 0 18px 26px -14px rgba(220, 38, 38, .55);
}

.fx-theme-toggle.sm,
.fx-logout.sm,
.fx-btn.sm {
  padding: 8px 10px;
}

.fx-btn.fx-btn-compact {
  padding: 8px 12px;
  font-size: 13px;
  gap: 6px;
}

.fx-theme-label {
  font-size: 14px;
}

.fx-theme-icon {
  width: 18px;
  height: 18px;
  position: relative;
}

.fx-theme-icon::before,
.fx-theme-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: opacity var(--fx-transition), transform var(--fx-transition);
}

.fx-theme-icon::before {
  background: radial-gradient(circle at 30% 30%, #fde68a, #facc15 65%, transparent 70%);
  box-shadow: inset -3px -2px 6px rgba(250, 204, 21, .45);
  opacity: 1;
}

.fx-theme-icon::after {
  background: radial-gradient(circle at 70% 70%, #38bdf8, #0ea5e9 65%, transparent 70%);
  box-shadow: inset 2px 2px 6px rgba(14, 165, 233, .45);
  opacity: 0;
  transform: scale(.6);
}

html[data-theme="dark"] .fx-theme-icon::before {
  opacity: 0;
  transform: scale(.6);
}

html[data-theme="dark"] .fx-theme-icon::after {
  opacity: 1;
  transform: scale(1);
}

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

.fx-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  background: var(--fx-surface);
  border-bottom: 1px solid var(--fx-border);
  box-shadow: 0 12px 30px -24px rgba(15, 23, 42, .35);
  transition: background var(--fx-transition), border-color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-top-title {
  font-size: 20px;
  font-weight: 600;
}

.fx-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fx-top-greeting {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  gap: 2px;
  text-align: right;
  white-space: normal;
}

.fx-top-greeting-name {
  font-weight: 600;
  color: var(--fx-text);
}

.fx-top-greeting-role {
  font-size: 12px;
  font-weight: 500;
  color: var(--fx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fx-notifications {
  position: relative;
}

.fx-notifications-toggle {
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  color: var(--fx-text);
  border-radius: var(--fx-radius-sm);
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--fx-transition), border-color var(--fx-transition), color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-notifications-toggle:hover {
  background: var(--fx-surface-muted);
  border-color: var(--fx-border-strong);
}

.fx-notifications-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(340px, 90vw);
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius);
  box-shadow: 0 16px 40px -20px rgba(15, 23, 42, .35);
  padding: 16px;
  z-index: 30;
}

.fx-notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.fx-notifications-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.fx-notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}

.fx-notifications-empty {
  margin: 0;
  font-size: 14px;
  color: var(--fx-text-muted);
}

.fx-notification-item {
  background: var(--fx-surface-muted);
  border-radius: var(--fx-radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid transparent;
}

.fx-notification-item.is-unread {
  border-color: var(--fx-accent);
}

.fx-notification-title {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}

.fx-notification-message {
  margin: 0;
  font-size: 13px;
  color: var(--fx-text-muted);
}

.fx-notification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fx-text-soft);
}

.fx-notification-link {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--fx-accent-strong);
  text-decoration: none;
}

.fx-notification-link:hover {
  text-decoration: underline;
}

.fx-bacheca-client .fx-card-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fx-quick-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fx-quick-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--fx-radius-sm);
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  color: var(--fx-accent);
  font-weight: 500;
  transition: background var(--fx-transition), border-color var(--fx-transition), color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-quick-links a::after {
  content: '\2192';
  font-size: 14px;
  line-height: 1;
}

.fx-quick-links a:hover,
.fx-quick-links a:focus-visible {
  background: var(--fx-surface-muted);
  border-color: var(--fx-accent);
  box-shadow: 0 8px 18px -14px rgba(26, 167, 185, .8);
}

.fx-card-note {
  margin: 0;
  font-size: 14px;
  color: var(--fx-text-muted);
}

.fx-bacheca-gifts {
  display: grid;
  gap: 16px;
}

.fx-bacheca-gift {
  padding: 18px 20px;
  border: 1px solid var(--fx-border-soft);
  border-radius: var(--fx-radius-md);
  background: var(--fx-surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.fx-bacheca-gift h4 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--fx-text-strong);
}

.fx-bacheca-gift-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--fx-text);
  white-space: pre-wrap;
}

.fx-bacheca-gift-date {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--fx-text-soft);
}

.fx-checkbox {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  color: var(--fx-text);
}

.fx-checkbox input[type="checkbox"] {
  margin: 2px 0 0;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  appearance: none;
  display: inline-block;
  position: relative;
  transition: border-color var(--fx-transition), background var(--fx-transition), box-shadow var(--fx-transition);
  flex-shrink: 0;
}

.fx-checkbox input[type="checkbox"]:checked {
  background: var(--fx-accent);
  border-color: var(--fx-accent);
}

.fx-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  background: #fff;
}

.fx-checkbox input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px var(--fx-focus-ring);
  border-color: var(--fx-accent);
}

.fx-quote-notify {
  margin-top: 32px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius);
  background: var(--fx-surface-muted);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fx-quote-notify-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.fx-quote-notify-grid .fx-field.full,
.fx-quote-notify-email .fx-field.full {
  grid-column: 1 / -1;
}

[data-role="notify-message"][hidden] {
  display: none !important;
}

.fx-quote-notify-email {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding: 14px;
  border-radius: var(--fx-radius-sm);
  border: 1px dashed var(--fx-border);
  background: rgba(26, 167, 185, .08);
}

.fx-quote-notify-email[hidden] {
  display: none !important;
}

.fx-quote-notify-email .fx-field-label {
  font-size: 13px;
}

.fx-quote-notify-email textarea {
  min-height: 120px;
}

.fx-quote-notify .fx-checkbox {
  font-weight: 500;
}

.fx-quote-notify .fx-checkbox span {
  line-height: 1.4;
}

html[data-theme="dark"] .fx-quick-links a {
  background: var(--fx-surface);
  color: var(--fx-accent);
}

html[data-theme="dark"] .fx-quick-links a:hover,
html[data-theme="dark"] .fx-quick-links a:focus-visible {
  background: rgba(70, 200, 211, .16);
  border-color: var(--fx-accent);
}

html[data-theme="dark"] .fx-card-note {
  color: rgba(227, 243, 246, .75);
}

html[data-theme="dark"] .fx-checkbox input[type="checkbox"] {
  background: var(--fx-surface);
  border-color: var(--fx-border-strong);
}

html[data-theme="dark"] .fx-quote-notify {
  background: rgba(15, 46, 59, .6);
}

html[data-theme="dark"] .fx-quote-notify-email {
  background: rgba(70, 200, 211, .12);
  border-color: rgba(70, 200, 211, .45);
}

.fx-content {
  padding: 32px 40px 48px;
  min-height: calc(100vh - 96px);
  transition: background var(--fx-transition);
}

.fx-footer {
  padding: 24px 40px;
  font-size: 14px;
  color: var(--fx-text-soft);
}

/* Page */
.fx-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: none;
}

.fx-page-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.fx-page-header h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.fx-page-subtitle {
  margin: 4px 0 0;
  color: var(--fx-text-muted);
  font-size: 15px;
}

.fx-page-actions {
  display: flex;
  gap: 12px;
}

/* Filters */
.fx-filter-toolbar {
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius);
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-end;
  box-shadow: var(--fx-shadow-soft);
  transition: background var(--fx-transition), border-color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-filter-grid {
  flex: 1 1 620px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

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

.fx-filter-actions--project-status {
  margin-left: auto;
  align-items: center;
}

.fx-filter-actions--project-status .fx-segment-group {
  margin-top: 0;
}

.fx-field { 
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--fx-text-muted);
}

.fx-multi-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface-muted);
  max-height: 260px;
  overflow-y: auto;
}

.fx-multi-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--fx-radius-sm);
  border: 1px solid transparent;
  transition: border-color var(--fx-transition), background var(--fx-transition);
}

.fx-multi-item:hover,
.fx-multi-item:focus-within {
  border-color: var(--fx-border-strong);
  background: var(--fx-surface);
}

.fx-multi-item-check {
  margin-top: 4px;
}

.fx-multi-item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.fx-multi-item-title {
  font-weight: 600;
  color: var(--fx-text);
}

.fx-multi-item-amount {
  font-size: 13px;
  color: var(--fx-text-soft);
}

.fx-multi-item-desc {
  font-size: 12px;
  color: var(--fx-text-muted);
}

.fx-multi-empty {
  margin: 4px 0;
  font-size: 14px;
  color: var(--fx-text-muted);
}

.fx-multi-empty .fx-link {
  color: var(--fx-accent);
  text-decoration: underline;
}

.fx-field-hint {
  margin: 0;
  font-size: 12px;
  color: var(--fx-text-muted);
  line-height: 1.4;
}

.fx-field-label {
  font-weight: 600;
  color: var(--fx-text-soft);
  font-size: 13px;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.fx-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface-muted);
  color: var(--fx-text);
  transition: border-color var(--fx-transition), background var(--fx-transition), box-shadow var(--fx-transition);
}

select.fx-input[multiple],
select.fx-input[size],
textarea.fx-input[data-role="auto-height"] {
  padding: var(--fx-space-0-5);
  background: var(--fx-surface);
  overflow-y: auto;
}

select.fx-input[multiple],
select.fx-input[size] {
  min-height: 9.5rem;
  max-height: clamp(12rem, 42vh, 22rem);
}

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

.fx-field-inline .fx-input {
  flex: 1 1 auto;
}

.fx-button-list {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
}

.fx-button-manager {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
}

.fx-button-manager > .fx-btn {
  align-self: stretch;
}

.fx-button-item {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--fx-radius-md, 18px);
  background: var(--fx-surface);
  padding: var(--fx-space-1);
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
  transition: box-shadow var(--fx-transition), border-color var(--fx-transition), transform var(--fx-transition);
}

.fx-button-item:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 12px 32px -20px rgba(15, 23, 42, 0.26);
}

.fx-button-item.is-dragging {
  opacity: .85;
  transform: scale(.995);
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.45);
}

.fx-button-item.is-invalid {
  border-color: var(--fx-danger, #dc2626);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.fx-button-item-head {
  display: flex;
  align-items: center;
  gap: var(--fx-space-0-75);
  justify-content: space-between;
}

.fx-button-handle {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: var(--fx-surface-muted);
  color: var(--fx-text-muted);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.fx-button-handle:focus,
.fx-button-handle:hover {
  border-color: var(--fx-border-strong);
  color: var(--fx-text);
}

.fx-button-handle:active {
  cursor: grabbing;
}

.fx-button-item-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fx-button-item-title {
  font-weight: 600;
  color: var(--fx-text);
  font-size: .95rem;
  word-break: break-word;
}

.fx-button-row-actions {
  display: flex;
  gap: var(--fx-space-0-5);
  justify-content: flex-end;
}

.fx-button-row-fields {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
}

.fx-button-row-grid {
  display: grid;
  gap: var(--fx-space-0-75);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fx-button-advanced {
  display: grid;
  gap: var(--fx-space-0-75);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fx-button-utm-fieldset {
  border: 1px dashed rgba(15, 23, 42, 0.15);
  border-radius: var(--fx-radius-md, 18px);
  padding: var(--fx-space-0-75);
}

.fx-button-utm-fieldset legend {
  font-size: .85rem;
  font-weight: 600;
  color: var(--fx-text-muted);
  padding: 0 var(--fx-space-0-25);
}

.fx-button-utm-grid {
  display: grid;
  gap: var(--fx-space-0-5);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.fx-field.fx-field-checkbox {
  flex-direction: row;
  align-items: center;
  gap: var(--fx-space-0-5);
}

[data-role="button-summary-tags"] {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

[data-role="button-summary-tags"] .fx-badge {
  background: rgba(37, 99, 235, 0.12);
  color: var(--fx-accent-strong, #2563eb);
  padding: 2px 8px;
  font-size: .7rem;
}

.fx-field--select-actions {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-5);
}

.fx-select-actions {
  display: flex;
  align-items: center;
  gap: var(--fx-space-0-5);
  flex-wrap: wrap;
}

.fx-select-actions .fx-input {
  flex: 1 1 auto;
}

.fx-select-action-buttons {
  display: flex;
  gap: var(--fx-space-0-5);
}

.fx-field-error {
  margin: -2px 0 0;
  font-size: .8rem;
  color: var(--fx-danger, #dc2626);
}

.fx-field.is-invalid .fx-input,
.fx-field .fx-input[aria-invalid="true"] {
  border-color: var(--fx-danger, #dc2626);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2);
  background: #fff5f5;
}

.fx-field.is-invalid .fx-field-label {
  color: var(--fx-danger, #dc2626);
}

@media (max-width: 720px) {
  .fx-button-item-head {
    flex-wrap: wrap;
  }

  .fx-button-row-actions {
    width: 100%;
    justify-content: flex-end;
  }
}


.fx-editor {
  border: var(--fx-card-border);
  border-radius: var(--fx-card-radius);
  overflow: hidden;
  background: var(--fx-card-bg);
  box-shadow: 0 12px 32px -20px rgba(15, 23, 42, 0.22);
}

.fx-editor.fx-editor-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
}

.fx-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fx-space-0-5);
  padding: var(--fx-space-0-75);
  background: var(--fx-surface-muted);
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
}

.fx-editor-toolbar .fx-btn {
  min-width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fx-radius-sm);
}

.fx-editor-toolbar .fx-btn-compact {
  padding: 0 var(--fx-space-0-5);
}

.fx-editor-toolbar input[type="color"] {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  padding: 0;
  background: var(--fx-surface);
  cursor: pointer;
}

.fx-editor-area {
  min-height: 240px;
  padding: var(--fx-space-1);
  font-size: 1rem;
  line-height: 1.6;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}

.fx-editor-area:focus {
  box-shadow: inset 0 0 0 2px rgba(26, 167, 185, .25);
}

.fx-editor-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--fx-space-0-5);
  padding: var(--fx-space-0-25);
  background: var(--fx-surface-muted);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--fx-radius-sm);
}

.fx-editor-mode {
  border: none;
  background: transparent;
  color: var(--fx-text-muted);
  font-size: .95rem;
  font-weight: 600;
  padding: var(--fx-space-0-25) var(--fx-space-0-75);
  border-radius: var(--fx-radius-sm);
  cursor: pointer;
  transition: background var(--fx-transition), color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-editor-mode:hover,
.fx-editor-mode:focus-visible {
  color: var(--fx-text);
  background: rgba(37, 99, 235, 0.12);
}

.fx-editor-mode.is-active {
  background: var(--fx-primary, #2563eb);
  color: var(--fx-on-primary, #fff);
  box-shadow: 0 12px 28px -18px rgba(37, 99, 235, 0.55);
}

.fx-editor-panel {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
}

.fx-editor-panel[hidden] {
  display: none !important;
}

.fx-code-editor {
  position: relative;
  min-height: 420px;
  border-radius: var(--fx-radius);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: var(--fx-surface-muted);
  font-family: var(--fx-font-mono, 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace);
  font-size: .95rem;
  line-height: 1.6;
  color: var(--fx-text);
  overflow: visible;
}

.fx-code-editor textarea,
.fx-code-editor pre,
.fx-code-editor code {
  font: inherit;
}

.fx-code-input {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 420px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  color: transparent;
  caret-color: var(--fx-text);
  padding: var(--fx-space-1);
  line-height: inherit;
  white-space: pre;
  overflow: auto;
  tab-size: 2;
}

.fx-code-input:focus {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.fx-code-input::selection {
  background: rgba(37, 99, 235, 0.25);
}

.fx-code-highlight {
  position: absolute;
  inset: 0;
  padding: var(--fx-space-1);
  white-space: pre-wrap;
  word-break: break-word;
  pointer-events: none;
  color: var(--fx-text);
  overflow: visible;
}

.fx-code-highlight code {
  display: block;
}

.fx-code-suggestions {
  position: absolute;
  top: calc(var(--fx-space-1) + 4px);
  left: calc(var(--fx-space-1) + 4px);
  z-index: 4;
  list-style: none;
  margin: 0;
  padding: var(--fx-space-0-25) 0;
  min-width: 220px;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius);
  background: var(--fx-surface);
  box-shadow: 0 22px 44px -24px rgba(15, 23, 42, 0.35);
}

.fx-code-suggestions li {
  margin: 0;
  padding: var(--fx-space-0-5) var(--fx-space-0-75);
  cursor: pointer;
  font-size: .9rem;
  color: var(--fx-text);
  display: flex;
  align-items: center;
  gap: var(--fx-space-0-5);
}

.fx-code-suggestions li.is-active,
.fx-code-suggestions li:hover {
  background: var(--fx-primary, #2563eb);
  color: var(--fx-on-primary, #fff);
}

.fx-token-tag {
  color: var(--fx-primary, #2563eb);
}

.fx-token-placeholder {
  color: #0f766e;
  font-weight: 600;
}

.fx-token-comment {
  color: var(--fx-text-muted);
  font-style: italic;
}

html[data-theme="dark"] .fx-code-editor {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .fx-code-suggestions {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: 0 18px 48px -26px rgba(15, 23, 42, 0.75);
}

html[data-theme="dark"] .fx-code-suggestions li {
  color: var(--fx-text);
}

html[data-theme="dark"] .fx-token-placeholder {
  color: #34d399;
}

html[data-theme="dark"] .fx-token-comment {
  color: rgba(148, 163, 184, 0.85);
}

.fx-preview-wrapper {
  margin-top: var(--fx-space-1);
}

.fx-camp-workspace {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-5);
}

.fx-camp-form {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-5);
  padding-bottom: calc(var(--fx-space-2) + 3.5rem);
}

.fx-camp-intro {
  margin: 0;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--fx-text-muted);
  max-width: 680px;
}

.fx-camp-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: var(--fx-space-0-75);
  flex-wrap: wrap;
  padding: var(--fx-space-0-75) var(--fx-space-1);
  margin-top: var(--fx-space-1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--fx-card-bg) 32%);
  border-top: 1px solid var(--fx-border);
  box-shadow: 0 -18px 34px -28px rgba(15, 23, 42, 0.45);
  z-index: 40;
  backdrop-filter: blur(6px);
}

@media (max-width: 768px) {
  .fx-camp-form {
    padding-bottom: calc(var(--fx-space-2) + 4.5rem);
  }

  .fx-camp-actions {
    justify-content: flex-start;
    padding: var(--fx-space-1);
  }

  .fx-camp-actions .fx-btn {
    flex: 1 1 240px;
  }
}

.fx-camp-composer {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-5);
}

.fx-camp-composer-main {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-5);
}

@media (max-width: 768px) {
  #fx-camp-modal.fx-modal {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}
.fx-camp-editor-hint {
  margin: 0;
  font-size: .9rem;
  color: var(--fx-text-muted);
  line-height: 1.6;
  background: var(--fx-surface-muted);
  border-radius: var(--fx-radius);
  padding: var(--fx-space-0-75) var(--fx-space-1);
}

.fx-camp-editor-panel {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-25);
  background: var(--fx-surface);
  border-radius: var(--fx-radius-lg);
  border: 1px solid var(--fx-border);
  padding: var(--fx-space-1-5);
  box-shadow: var(--fx-shadow-sm, 0 12px 28px -18px rgba(15, 23, 42, 0.22));
}

.fx-camp-editor-preview-layout {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-5);
}

.fx-camp-editor-preview-layout .fx-camp-editor-block {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
}

.fx-camp-editor-preview-layout .fx-camp-preview {
  position: relative;
  top: auto;
  max-height: none;
  min-height: auto;
}

.fx-camp-stepper {
  margin: var(--fx-space-1-5) 0;
  padding: var(--fx-space-0-5) var(--fx-space-0-25);
  border-radius: 999px;
  background: var(--fx-surface-muted);
  overflow: hidden;
}

.fx-camp-stepper-list {
  display: flex;
  gap: var(--fx-space-0-75);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: fx-camp-step;
  overflow-x: auto;
}

.fx-camp-stepper-item {
  counter-increment: fx-camp-step;
  flex: 1 1 auto;
  min-width: 0;
}

.fx-camp-stepper-item a {
  display: flex;
  align-items: center;
  gap: var(--fx-space-0-5);
  padding: var(--fx-space-0-5) var(--fx-space-1);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  color: var(--fx-text-muted);
  transition: color var(--fx-transition), background var(--fx-transition), box-shadow var(--fx-transition);
  white-space: nowrap;
}

.fx-camp-stepper-item a::before {
  content: counter(fx-camp-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  color: var(--fx-on-primary, #fff);
  background: var(--fx-primary);
  box-shadow: 0 6px 14px -8px rgba(37, 99, 235, 0.45);
}

.fx-camp-stepper-item a:hover,
.fx-camp-stepper-item a:focus-visible {
  color: var(--fx-text);
  background: var(--fx-surface);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.fx-camp-editor-preview-layout {
  display: grid;
  gap: var(--fx-space-1-25);
}

@media (min-width: 1100px) {
  .fx-camp-editor-preview-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr);
    align-items: start;
  }
}

.fx-camp-editor-preview-layout .fx-camp-editor-block {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
}

.fx-camp-editor-preview-layout .fx-camp-preview {
  position: relative;
  top: auto;
  max-height: none;
  min-height: auto;
}

@media (min-width: 1100px) {
  .fx-camp-editor-preview-layout .fx-camp-preview {
    position: sticky;
    top: calc(var(--fx-space-1) + var(--fx-space-0-5));
    max-height: calc(100vh - (var(--fx-sticky-offset) + 120px));
  }
}


.fx-camp-compact-grid.fx-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--fx-space-1);
}

.fx-camp-target-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--fx-space-0-75);
  margin-top: var(--fx-space-0-5);
}

.fx-camp-chip-group .fx-radio-option {
  position: relative;
  padding: 0;
  border: none;
  background: transparent;
}

.fx-camp-chip-group .fx-radio-option input {
  position: absolute;
  inset: 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
}

.fx-camp-chip-group .fx-radio-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 var(--fx-space-1);
  border: 1px solid var(--fx-border);
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  color: var(--fx-text);
  background: var(--fx-surface-muted);
  transition: background var(--fx-transition), color var(--fx-transition), box-shadow var(--fx-transition), border-color var(--fx-transition);
  cursor: pointer;
  text-align: center;
}

.fx-camp-chip-group .fx-radio-option span:hover {
  border-color: var(--fx-border-strong);
  background: var(--fx-surface);
}

.fx-camp-chip-group .fx-radio-option input:checked + span {
  background: var(--fx-primary);
  color: var(--fx-on-primary, #fff);
  border-color: var(--fx-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.32), 0 12px 28px -12px rgba(37, 99, 235, 0.35);
}

.fx-camp-chip-group .fx-radio-option input:checked + span:hover {
  background: var(--fx-primary);
}

.fx-camp-chip-group .fx-radio-option input:focus-visible + span {
  box-shadow: 0 0 0 3px var(--fx-focus-ring), 0 0 0 1px var(--fx-primary);
}

.fx-camp-target-summary {
  margin: var(--fx-space-0-5) 0 0;
  font-size: .85rem;
  color: var(--fx-text-muted);
  line-height: 1.5;
}

.fx-camp-target-summary strong {
  color: var(--fx-text);
}

.fx-camp-tag-recipient-panel {
  margin: .75rem 0 0;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.fx-camp-tag-recipient-tools {
  display: flex;
  gap: var(--fx-space-0-5);
  align-items: center;
  padding: .75rem .85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  flex-wrap: wrap;
}

.fx-camp-tag-recipient-tools .fx-btn {
  flex-shrink: 0;
}

.fx-camp-tag-recipient-filter {
  flex: 1 1 220px;
  min-width: 0;
}

.fx-camp-tag-recipient-filter .fx-input {
  width: 100%;
}

.fx-camp-tag-recipient-source {
  flex: 1 1 180px;
}

.fx-camp-tag-preview {
  padding: .75rem .85rem;
  max-height: 18rem;
  overflow-y: auto;
}

.fx-camp-tag-preview-group + .fx-camp-tag-preview-group {
  margin-top: .85rem;
  padding-top: .75rem;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
}

.fx-camp-tag-preview-heading {
  margin: 0 0 .45rem;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--fx-text-muted);
  font-weight: 700;
}

.fx-camp-tag-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}

.fx-camp-tag-preview-item {
  padding: .65rem .85rem;
  border-radius: .9rem;
  background: #fff;
  color: var(--fx-text);
  font-size: .88rem;
  line-height: 1.4;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), inset 0 0 0 1px rgba(37, 99, 235, 0.14);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.fx-camp-tag-preview-item--invalid {
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.12), inset 0 0 0 1px rgba(239, 68, 68, 0.28);
}

.fx-camp-tag-preview-name {
  font-weight: 600;
}

.fx-camp-tag-preview-email {
  font-size: .8rem;
  color: var(--fx-text-muted);
  word-break: break-word;
}

.fx-camp-tag-preview-note {
  font-size: .78rem;
  color: var(--fx-text-muted);
}

.fx-camp-tag-preview-empty {
  margin: .35rem 0 0;
  font-size: .84rem;
  color: var(--fx-text-muted);
}

.fx-availability-tools {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.fx-availability-tools .fx-action-group {
  justify-content: flex-start;
}

.fx-camp-composer-main {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-5);
}

.fx-camp-step {
  position: relative;
  z-index: 0;
  border: var(--fx-card-border);
  border-radius: var(--fx-card-radius);
  padding: var(--fx-space-1-5);
  background: var(--fx-card-bg);
  box-shadow: var(--fx-card-shadow);
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
  overflow: visible;
  transition: border-color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-camp-step:focus-within {
  border-color: var(--fx-border-strong);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2), var(--fx-card-shadow);
  z-index: 2;
}

@media (max-width: 720px) {
  .fx-camp-step {
    padding: var(--fx-space-1);
    border-radius: calc(var(--fx-card-radius) - 0.25rem);
    gap: var(--fx-space-0-75);
  }
}

.fx-camp-step-head {
  display: flex;
  align-items: flex-start;
  gap: var(--fx-space-0-75);
  margin: 0;
  flex-wrap: wrap;
  row-gap: var(--fx-space-0-5);
}

.fx-camp-step-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--fx-primary), var(--fx-accent-strong));
  box-shadow: 0 12px 28px -14px rgba(37, 99, 235, 0.45);
  flex-shrink: 0;
}

.fx-camp-step-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fx-text);
}

.fx-camp-step-subtitle {
  margin: var(--fx-space-0-5) 0 0;
  font-size: .95rem;
  color: var(--fx-text-muted);
  line-height: 1.6;
  max-width: 64ch;
}

.fx-camp-step-body {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
}

.fx-camp-composer-preview {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
  min-height: 0;
}

.fx-camp-preview {
  position: sticky;
  top: var(--fx-sticky-offset);
  border-radius: var(--fx-card-radius);
  padding: var(--fx-space-1-5);
  background: var(--fx-card-bg);
  border: var(--fx-card-border);
  box-shadow: var(--fx-card-shadow);
  flex: 1 1 auto;
  min-height: 56vh;
  max-height: calc(100vh - (var(--fx-sticky-offset) + 96px));
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
  overflow: hidden;
  width: 100%;
  z-index: 1;
}

@media (max-width: 1099px) {
  .fx-camp-preview {
    position: relative;
    top: auto;
    max-height: none;
    min-height: auto;
  }
}

.fx-camp-preview-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.fx-camp-preview-head p {
  margin: var(--fx-space-0-5) 0 0;
  font-size: .9rem;
  color: var(--fx-text-muted);
  line-height: 1.55;
}

.fx-camp-preview-body {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: calc(var(--fx-card-radius) - 0.4rem);
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: var(--fx-surface);
  padding: var(--fx-space-1);
  display: flex;
  flex-direction: column;
}

.fx-camp-preview-body::-webkit-scrollbar {
  width: 8px;
}

.fx-camp-preview-body::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
}

html[data-theme="dark"] .fx-camp-preview-body::-webkit-scrollbar-thumb {
  background: rgba(159, 224, 236, 0.35);
}

.fx-preview-frame {
  width: 100%;
  min-height: 320px;
  border: none;
  overflow-wrap: anywhere;
  flex: 1 1 auto;
  display: block;
}

.fx-camp-footer {
  margin-top: var(--fx-space-2);
  border-radius: var(--fx-card-radius);
  border: var(--fx-card-border);
  background: var(--fx-card-bg);
  box-shadow: var(--fx-card-shadow);
  padding: var(--fx-space-1-5);
}

.fx-camp-footer-content {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-25);
  align-items: stretch;
}

@media (min-width: 1024px) {
  .fx-camp-footer-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.fx-camp-footer-schedule {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
  min-width: 0;
}

.fx-camp-footer-schedule > legend {
  font-weight: 600;
  font-size: 1rem;
  margin: 0;
  color: var(--fx-text);
}

.fx-camp-footer-hint {
  margin: 0;
  font-size: .9rem;
  color: var(--fx-text-muted);
}

.fx-camp-footer-actions {
  display: flex;
  gap: var(--fx-space-1);
  justify-content: flex-end;
  flex-wrap: wrap;
}

.fx-camp-footer-actions .fx-btn {
  flex: 0 1 auto;
  min-width: 180px;
}

.fx-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
  font-size: .875rem;
  color: var(--fx-text-muted);
}

.fx-preview-meta span strong {
  color: var(--fx-text);
}

.fx-preview-meta-sep {
  color: rgba(15, 23, 42, 0.28);
}

.fx-preview-subject {
  margin: 0 0 1.5rem;
}

.fx-preview-subject-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--fx-text-muted);
  margin-bottom: .25rem;
}

.fx-preview-subject-text {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fx-text);
}

.fx-preview-placeholder {
  margin: 0;
  padding: var(--fx-space-1);
  text-align: center;
  color: var(--fx-text-muted);
  line-height: 1.6;
  min-height: 260px;
  display: grid;
  place-items: center;
  max-width: 36ch;
  margin-inline: auto;
}

.fx-camp-preview iframe,
.fx-camp-preview .fx-preview-frame {
  width: 100%;
  border: none;
}

.fx-schedule-inputs {
  margin-top: var(--fx-space-0-75);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--fx-space-0-5);
  position: relative;
}

.fx-schedule-inputs .fx-input {
  flex: 1 1 160px;
  min-width: 140px;
}

.fx-input:hover {
  border-color: var(--fx-border-strong);
}

.fx-input:focus {
  outline: none;
  background: var(--fx-surface);
}

.fx-field-actions {
  margin-top: var(--fx-space-0-5);
  display: flex;
  gap: var(--fx-space-0-5);
  flex-wrap: wrap;
}

.fx-camp-editor-block {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1-5);
}

.fx-camp-style-layout {
  display: grid;
  gap: var(--fx-space-1-5);
}

.fx-camp-style-column {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
}

.fx-camp-card {
  border: var(--fx-card-border);
  background: var(--fx-card-bg);
  border-radius: var(--fx-card-radius);
  box-shadow: var(--fx-card-shadow);
  display: flex;
  flex-direction: column;
}

.fx-camp-card-head {
  padding: var(--fx-space-1) var(--fx-space-1-5) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--fx-space-0-75);
  justify-content: space-between;
  align-items: flex-start;
}

.fx-camp-card-body {
  padding: 0 var(--fx-space-1-5) var(--fx-space-1-5);
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
}

.fx-camp-card-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fx-text);
}

.fx-camp-card-subtitle {
  margin: var(--fx-space-0-25) 0 0;
  font-size: .9rem;
  color: var(--fx-text-muted);
  line-height: 1.5;
  max-width: 36ch;
}

.fx-camp-card-badge {
  align-self: center;
  background: rgba(37, 99, 235, 0.12);
  color: var(--fx-accent-strong, #2563eb);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .8rem;
  font-weight: 600;
}

.fx-design-preset-toolbar {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-5);
  align-items: flex-end;
}

.fx-design-preset-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--fx-text-muted);
  letter-spacing: .02em;
  text-transform: uppercase;
}

.fx-design-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fx-space-0-5);
  justify-content: flex-end;
}

.fx-design-preset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  font-size: .85rem;
  color: var(--fx-text-muted);
  transition: border-color var(--fx-transition), box-shadow var(--fx-transition), color var(--fx-transition);
}

.fx-design-preset:hover,
.fx-design-preset:focus {
  border-color: var(--fx-border-strong);
  color: var(--fx-text);
}

.fx-design-preset.is-active {
  border-color: var(--fx-accent-strong, #2563eb);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  color: var(--fx-text);
}

.fx-design-preset-preview {
  width: 26px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--preset-primary, #2563eb), var(--preset-secondary, #0f172a));
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.fx-design-section {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
}

.fx-design-section-title {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--fx-text);
}

.fx-design-brand-grid {
  display: grid;
  gap: var(--fx-space-0-75);
}

@media (min-width: 720px) {
  .fx-design-brand-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.fx-design-brand-grid .fx-field-label {
  text-transform: none;
  letter-spacing: 0;
}

.fx-design-color-grid {
  display: grid;
  gap: var(--fx-space-0-75);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.fx-design-color-grid input[type="color"] {
  width: 100%;
  height: 42px;
  border-radius: var(--fx-radius-sm);
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
}

.fx-design-contrast {
  display: grid;
  gap: 8px;
  margin-top: var(--fx-space-0-5);
}

.fx-design-logo-preview {
  margin-top: var(--fx-space-0-5);
  display: inline-flex;
  align-items: center;
  gap: var(--fx-space-0-75);
}

.fx-design-logo-preview img {
  max-width: 160px;
  height: auto;
  border-radius: var(--fx-radius-sm);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  background: #fff;
}

.fx-density-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--fx-space-0-5);
  background: var(--fx-surface-muted);
  padding: 4px;
  border-radius: 999px;
}

.fx-density-option {
  border: 1px solid transparent;
  background: transparent;
  color: var(--fx-text-muted);
  font-size: .85rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.fx-density-option:hover,
.fx-density-option:focus-visible {
  background: rgba(37, 99, 235, 0.08);
  color: var(--fx-text);
}

.fx-density-option[aria-pressed="true"],
.fx-density-option.is-active {
  background: rgba(37, 99, 235, 0.15);
  color: var(--fx-accent-strong, #2563eb);
  border-color: rgba(37, 99, 235, 0.3);
  font-weight: 600;
}

.fx-density-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}

.fx-contrast-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  color: var(--fx-text-muted);
}

.fx-contrast-item i {
  color: var(--fx-accent-strong, #2563eb);
  font-size: 1rem;
}

.fx-contrast-item.warning {
  color: var(--fx-danger, #dc2626);
}

.fx-contrast-item.warning i {
  color: var(--fx-danger, #dc2626);
}


@media (max-width: 720px) {
  .fx-design-preset-toolbar {
    align-items: flex-start;
  }

  .fx-design-preset-list {
    justify-content: flex-start;
  }
}

.fx-automation-mode {
  display: inline-flex;
  gap: var(--fx-space-0-5);
  background: var(--fx-surface-muted);
  padding: 4px;
  border-radius: 999px;
}

.fx-automation-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.fx-automation-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fx-automation-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--fx-text-muted);
  transition: background var(--fx-transition), color var(--fx-transition);
}

.fx-automation-pill input:checked + span {
  background: var(--fx-accent-strong, #2563eb);
  color: #fff;
}

.fx-automation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fx-space-0-5);
  margin-top: var(--fx-space-0-5);
}

.fx-automation-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--fx-text);
  font-size: .8rem;
  font-weight: 600;
}

.fx-automation-chip.muted {
  background: rgba(148, 163, 184, 0.18);
  color: var(--fx-text-muted);
}
}


.fx-template-hub {
  border: var(--fx-card-border);
  background: var(--fx-card-bg);
  border-radius: var(--fx-card-radius);
  padding: var(--fx-space-1-5);
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-1);
  box-shadow: var(--fx-card-shadow);
}

.fx-template-hub-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fx-space-0-75);
  align-items: flex-start;
  justify-content: space-between;
}

.fx-template-hub-subtitle {
  margin: var(--fx-space-0-5) 0 0;
  font-size: .9rem;
  color: var(--fx-text-muted);
  max-width: 520px;
  line-height: 1.5;
}

.fx-template-hub-head h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.fx-template-hub-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fx-space-0-5);
  justify-content: flex-end;
}

.fx-template-hub-body {
  display: grid;
  gap: var(--fx-space-1);
  align-items: start;
}

@media (min-width: 720px) {
  .fx-template-hub-body {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.fx-template-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fx-space-0-5);
  justify-content: flex-start;
}

.fx-template-hub-actions .fx-btn,
.fx-template-hub-head-actions .fx-btn {
  white-space: nowrap;
}

.fx-template-hub-board {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
  border-top: 1px solid rgba(37, 99, 235, 0.16);
  padding-top: var(--fx-space-0-75);
}

.fx-template-hub-board-head {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-5);
}

.fx-template-hub-board-head h5 {
  margin: 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--fx-text);
}

.fx-template-hub-board-head p {
  margin: 0;
  font-size: .85rem;
  color: var(--fx-text-muted);
  line-height: 1.5;
}

.fx-template-hub-board .fx-template-empty {
  margin: 0;
}

.fx-template-hub-board .fx-template-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--fx-space-0-75);
  max-height: clamp(12rem, 40vh, 22rem);
  overflow-y: auto;
  padding-right: var(--fx-space-0-5);
}

.fx-template-hub-board .fx-template-list::-webkit-scrollbar {
  width: 6px;
}

.fx-template-hub-board .fx-template-list::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.16);
  border-radius: 999px;
}

.fx-template-hub-board .fx-template-list .fx-template-item {
  height: 100%;
}

.fx-template-empty {
  border: 1px dashed var(--fx-border);
  border-radius: var(--fx-radius-sm);
  padding: var(--fx-space-1);
  text-align: center;
  color: var(--fx-text-muted);
  margin-bottom: var(--fx-space-0-75);
  line-height: 1.5;
}

.fx-template-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
}

.fx-template-item {
  display: flex;
  justify-content: space-between;
  gap: var(--fx-space-0-75);
  padding: var(--fx-space-0-75);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  align-items: center;
  flex-wrap: wrap;
  transition: border-color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-template-item:hover {
  border-color: var(--fx-border-strong);
  box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.25);
}

.fx-template-item.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(26, 167, 185, 0.18);
}

html[data-theme="dark"] .fx-editor-toolbar {
  border-bottom-color: rgba(159, 224, 236, 0.16);
}

html[data-theme="dark"] .fx-camp-preview-body {
  border-color: rgba(159, 224, 236, 0.18);
  background: var(--fx-surface-muted);
}

html[data-theme="dark"] .fx-template-hub-board {
  border-top-color: rgba(159, 224, 236, 0.22);
}

html[data-theme="dark"] .fx-template-hub-board .fx-template-list::-webkit-scrollbar-thumb {
  background: rgba(159, 224, 236, 0.35);
}

html[data-theme="dark"] .fx-template-item:hover {
  box-shadow: 0 12px 24px -18px rgba(0, 32, 43, 0.6);
}

.fx-template-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fx-template-info strong {
  font-weight: 600;
}

.fx-template-info small {
  color: var(--fx-text-muted);
  font-size: 13px;
}

.fx-template-automation-card {
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-lg, 24px);
  background: var(--fx-surface);
  padding: var(--fx-space-1);
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
  box-shadow: var(--fx-shadow-soft);
  margin-top: var(--fx-space-1);
}

.fx-template-automation-card legend {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 2px;
}

.fx-template-automation-modes {
  display: flex;
  gap: var(--fx-space-0-5);
  flex-wrap: wrap;
}

.fx-template-automation-settings {
  display: grid;
  gap: var(--fx-space-0-75);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.fx-template-automation-summary {
  font-size: 13px;
  color: var(--fx-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fx-template-automation {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--fx-text-muted);
}

.fx-template-automation .fx-badge {
  margin-left: 0;
}

.fx-template-automation-note {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fx-text-muted);
}

.fx-template-automation-note .fx-badge {
  margin-left: 0;
  font-size: 11px;
  padding: 2px 8px;
}

.fx-template-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-camp-extra {
  margin: var(--fx-space-2) 0;
}

.fx-camp-card--stack {
  display: flex;
  flex-direction: column;
}

.fx-camp-card--stack .fx-camp-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--fx-space-0-75);
}

/* Card & table */
.fx-card {
  background: var(--fx-surface);
  border-radius: var(--fx-radius);
  border: 1px solid var(--fx-border);
  box-shadow: var(--fx-shadow-soft);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: background var(--fx-transition), border-color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-alert {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: var(--fx-radius-sm);
  border: 1px solid var(--fx-border);
  background: var(--fx-surface-muted);
  color: var(--fx-text);
  font-size: 14px;
  display: none;
}

.fx-alert.is-visible {
  display: block;
}

.fx-alert[hidden] {
  display: none !important;
}

.fx-alert.is-success {
  border-color: rgba(22, 163, 74, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: var(--fx-success);
}

.fx-alert.is-warning {
  border-color: rgba(202, 138, 4, 0.35);
  background: rgba(250, 204, 21, 0.14);
  color: #92400e;
}

.fx-alert.is-error {
  border-color: rgba(220, 38, 38, 0.4);
  background: rgba(248, 113, 113, 0.12);
  color: #b91c1c;
}

.fx-card-head {
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.fx-card-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.fx-card-subtitle {
  margin: 6px 0 0;
  color: var(--fx-text-muted);
  font-size: 14px;
}

.fx-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.fx-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-card-body--table {
  padding: 16px 24px 24px;
  gap: 16px;
}

.fx-card-body--generator {
  gap: 28px;
}

.fx-form-grid--generator {
  gap: 20px;
}

.fx-generator-output {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fx-generator-tabs {
  display: inline-flex;
  border: 1px solid var(--fx-border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  background: var(--fx-surface-muted);
}

.fx-generator-tab {
  border: none;
  background: transparent;
  color: var(--fx-text-soft);
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--fx-transition), color var(--fx-transition);
}

.fx-generator-tab.is-active {
  background: var(--fx-accent);
  color: #fff;
}

.fx-generator-panels {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fx-generator-panels [data-output-panel] {
  margin: 0;
}

.fx-generator-panels [data-output-panel][hidden] {
  display: none;
}

.fx-code-block {
  font-family: 'JetBrains Mono', 'Fira Code', 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  min-height: 200px;
}

.fx-table-wrap {
  overflow-x: auto;
}

.fx-table-wrap--projects {
  position: relative;
  padding: 12px;
  border: 1px solid var(--fx-border);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.08) 0%, rgba(226, 232, 240, 0.18) 100%);
  box-shadow: 0 28px 48px -36px rgba(15, 23, 42, 0.55);
}

.fx-table-wrap--projects .fx-table--projects {
  background: var(--fx-surface);
  border-radius: 14px;
  box-shadow: 0 16px 42px -32px rgba(15, 23, 42, 0.35);
}

.fx-bulk-tools {
  margin: 18px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  position: relative;
  flex-wrap: wrap;
}

.fx-table-tools {
  margin-bottom: 18px;
  display: flex;
  justify-content: flex-end;
  position: relative;
}

.fx-bulk-count {
  font-size: 14px;
  color: var(--fx-text-soft);
}

.fx-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 8px 0;
  border-radius: 12px;
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.fx-menu[hidden] {
  display: none;
}

.fx-menu-item {
  padding: 10px 16px;
  text-align: left;
  background: none;
  border: 0;
  font-size: 14px;
  color: var(--fx-text);
  cursor: pointer;
  transition: background var(--fx-transition), color var(--fx-transition);
}

.fx-menu-item:hover {
  background: var(--fx-surface-muted);
}

.fx-menu-item.danger {
  background: var(--fx-danger, #dc2626);
  color: #fff;
}

.fx-menu-item.danger:hover {
  background: #b91c1c;
}

.fx-col-select {
  width: 48px;
}

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

.fx-table--projects {
  min-width: 960px;
}

.fx-table--projects thead th,
.fx-table--projects tbody td {
  min-width: 150px;
  word-break: break-word;
  padding: 20px 22px;
  vertical-align: middle;
}

.fx-table--projects thead th[data-col="amount"],
.fx-table--projects tbody td[data-col="amount"] {
  min-width: 140px;
}

.fx-table--projects thead th[data-col="next_renewal"],
.fx-table--projects tbody td[data-col="next_renewal"],
.fx-table--projects thead th[data-col="days_to_renewal"],
.fx-table--projects tbody td[data-col="days_to_renewal"],
.fx-table--projects thead th[data-col="last_payment"],
.fx-table--projects tbody td[data-col="last_payment"] {
  min-width: 180px;
}


.fx-table--projects thead th.fx-col-select,
.fx-table--projects tbody td.fx-col-select {
  position: sticky;
  left: 0;
  width: 56px;
  min-width: 56px;
  padding-left: 18px;
  padding-right: 18px;
}

.fx-table--projects thead th.fx-col-select {
  z-index: 4;
  background: var(--fx-surface);
}

.fx-table--projects tbody td.fx-col-select {
  z-index: 3;
  text-align: center;
  background: var(--fx-row-bg, var(--fx-surface-muted));
}

.fx-table--projects tbody tr.is-expanded td.fx-col-select,
.fx-table--projects tbody tr.is-expanded td[data-col="service"] {
  background: rgba(26, 167, 185, .12);
}

.fx-table--projects tbody tr.is-expanded td[data-col="service"] {
  box-shadow: inset 0 0 0 1px rgba(26, 167, 185, .35);
}

.fx-table--projects tbody td.fx-col-select input[type="checkbox"] {
  width: 18px;
  height: 18px;
}


.fx-table--projects thead th[data-col="service"],
.fx-table--projects tbody td[data-col="service"] {
  position: static;
  left: auto;
  z-index: 2;
  min-width: 260px;
  box-shadow: none;
}

.fx-table--projects thead th[data-col="service"] {
  background: var(--fx-surface);
}

.fx-table--projects tbody td[data-col="service"] {
  background: var(--fx-row-bg, var(--fx-surface));
  padding: 20px 22px;
  border-radius: 0;
  transition: none;
}

th.ta-right {
  text-align: center !important;
}

td.p-days.ta-right,
td.p-amount.ta-right {
  text-align: center;
}

td.p-cycle {
  text-align: center;
}

.fx-table--projects [data-col].is-hidden {
  display: none;
}

.fx-clip {
  display: inline;
  max-width: none;
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
  vertical-align: baseline;
}

.fx-table--projects .p-service {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
}

.fx-table--projects .p-summary {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  min-height: auto;
}

.fx-table--projects .p-status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--fx-success, #16a34a);
  box-shadow: 0 0 0 2px var(--fx-surface);
  flex-shrink: 0;
}

.fx-table--projects .p-status-indicator.is-active {
  background: var(--fx-success, #16a34a);
}

.fx-table--projects .p-status-indicator.is-archived {
  background: var(--fx-danger, #dc2626);
}

.fx-table--projects .p-status-badge {
  font-size: 12px;
  padding: 2px 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fx-table--projects .p-service-label {
  flex: 1;
  font-weight: 600;
  line-height: 1.45;
  color: var(--fx-text);
  font-size: 15px;
}

.fx-table--projects tbody tr.is-archived .p-service-label {
  color: var(--fx-text-muted);
  text-decoration: line-through;
}

.fx-table--projects tbody tr.is-archived .p-status-badge {
  display: inline-flex !important;
}

.fx-table--projects .p-actions .p-manage {
  position: relative;
  display: inline-block;
}

.fx-table--projects .p-actions .p-manage-menu {
  min-width: 160px;
}

.fx-table--projects .p-actions .p-manage-menu .fx-menu-item {
  font-size: 13px;
}

.fx-table--projects .p-service .fx-expand-btn {
  margin-top: 0;
  flex-shrink: 0;
  background: var(--fx-row-bg, var(--fx-surface));
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.fx-table--projects tbody td[data-col="actions"] {
  white-space: nowrap;
}

.fx-expand-btn {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--fx-transition), border-color var(--fx-transition), transform var(--fx-transition);
}

.fx-expand-btn:hover {
  border-color: var(--fx-border-strong);
  background: var(--fx-surface-muted);
}

.fx-expand-btn::before {
  content: '\25B6';
  font-size: 12px;
  transform: translateX(1px);
}

.fx-expand-btn[aria-expanded="true"]::before {
  content: '\25BC';
  transform: none;
}

.fx-expand-btn[aria-expanded="true"] {
  background: var(--fx-accent);
  border-color: var(--fx-accent);
  color: #fff;
}

.fx-table--projects tbody tr.is-expanded {
  background: rgba(26, 167, 185, .12);
  --fx-row-bg: rgba(26, 167, 185, .12);
}

.fx-detail-row td {
  background: var(--fx-surface-muted);
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--fx-border);
}

.fx-table-total td {
  background: var(--fx-surface-muted);
  font-weight: 600;
  border-top: 1px solid var(--fx-border);
}

.fx-total-label {
  margin-right: 12px;
}

.fx-total-meta {
  margin-left: 12px;
  color: var(--fx-text-soft);
  font-size: 12px;
}

.fx-detail-content {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  width: 100%;
}

.fx-detail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  justify-content: center;
  width: 100%;
}

.fx-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-items: center;
  text-align: center;
  flex: 1 1 220px;
}

.fx-detail-collaborators {
  background: rgba(26, 167, 185, .08);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.fx-detail-collaborators .fx-detail-label {
  margin-bottom: 0;
}

.fx-detail-collaborators-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fx-detail-collaborators-empty {
  color: var(--fx-text-soft);
}

.fx-detail-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--fx-text-soft);
}

.fx-detail-value {
  font-size: 14px;
  color: var(--fx-text);
  word-break: break-word;
}

.fx-detail-value a {
  color: var(--fx-accent-strong);
  text-decoration: underline;
  word-break: break-all;
}

.fx-detail-notes {
  background: rgba(26, 167, 185, .08);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
}

.fx-detail-notes .fx-detail-label {
  margin-bottom: 8px;
}

.fx-detail-notes p {
  margin: 0;
  font-size: 14px;
}

.fx-table thead th {
  text-align: left;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fx-text-soft);
  padding: 16px;
  border-bottom: 1px solid var(--fx-border);
  background: var(--fx-surface-muted);
  position: sticky;
  top: 0;
  z-index: 1;
  cursor: pointer;
}

.fx-table tbody td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--fx-border);
  color: var(--fx-text);
  font-size: 15px;
  vertical-align: top;
  line-height: 1.45;
}

.fx-table tbody tr {
  --fx-row-bg: var(--fx-surface);
}

.fx-table tbody tr:nth-child(odd) {
  background: rgba(26, 167, 185, .02);
  --fx-row-bg: rgba(26, 167, 185, .02);
}

.fx-table tbody tr:hover {
  background: rgba(26, 167, 185, .08);
  --fx-row-bg: rgba(26, 167, 185, .08);
}

.fx-table tbody tr.is-selected {
  background: rgba(26, 167, 185, .15);
  --fx-row-bg: rgba(26, 167, 185, .15);
}

.fx-table tbody tr.is-selected:hover {
  background: rgba(26, 167, 185, .22);
  --fx-row-bg: rgba(26, 167, 185, .22);
}

.fx-table .actions {
  display: inline-flex;
  gap: 8px;
}

.fx-table .fx-btn {
  padding: 6px 12px;
  font-size: 13px;
}

.fx-lead-indicator {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--fx-danger, #dc2626);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.fx-opportunity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.fx-opp-item {
  border: 1px solid var(--fx-border);
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--fx-surface-muted);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.fx-opp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.fx-opp-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: var(--fx-text);
}

.fx-opp-status {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.08);
  color: var(--fx-text-soft);
}

.fx-opp-status.is-open {
  background: rgba(26, 167, 185, 0.12);
  color: #0f6f7a;
}

.fx-opp-status.is-converted,
.fx-opp-status.is-won {
  background: rgba(34, 197, 94, 0.12);
  color: #047857;
}

.fx-opp-status.is-closed,
.fx-opp-status.is-lost {
  background: rgba(148, 163, 184, 0.18);
  color: #475569;
}

.fx-opp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--fx-text-soft);
  margin-bottom: 6px;
}

.fx-opp-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fx-opp-meta > span[aria-hidden="true"] {
  color: var(--fx-border-strong, rgba(15, 23, 42, 0.18));
}

.fx-opp-body p {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--fx-text);
  line-height: 1.5;
}

.fx-opp-body p:last-child {
  margin-bottom: 0;
}

.fx-opp-empty {
  margin: 0;
  font-size: 14px;
  color: var(--fx-text-soft);
}

.fx-lead-indicator.is-present {
  background: var(--fx-success, #16a34a);
}

.fx-lead-indicator.is-missing {
  background: var(--fx-danger, #dc2626);
}

.c-lead .fx-lead-indicator {
  margin: 0 auto;
}

html[data-theme="dark"] .fx-lead-indicator {
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.35);
}

html[data-theme="dark"] .fx-lead-indicator.is-present {
  background: #34d399;
}

html[data-theme="dark"] .fx-lead-indicator.is-missing {
  background: #f87171;
}

.fx-table-sm {
  font-size: 14px;
}

.fx-table-sm th,
.fx-table-sm td {
  padding: 8px 10px;
}

.fx-list-inline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.fx-pager {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 18px 20px;
  background: var(--fx-surface);
}

.fx-pager .pg {
  border-radius: 999px;
  border: 1px solid var(--fx-border);
  background: transparent;
  color: var(--fx-text);
  padding: 8px 14px;
  transition: background var(--fx-transition), border-color var(--fx-transition), color var(--fx-transition);
}

.fx-pager .pg:hover {
  background: var(--fx-surface-muted);
  border-color: var(--fx-border-strong);
}

.fx-pager .pg.is-active {
  background: var(--fx-accent-strong);
  border-color: var(--fx-accent-strong);
  color: #fff;
}

/* Status pills */
.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-transform: capitalize;
  background: rgba(26, 167, 185, .15);
  color: var(--fx-accent-strong);
}

.st-attivo {
  background: rgba(22, 163, 74, .15);
  color: var(--fx-success);
}

.st-sospeso {
  background: rgba(234, 179, 8, .18);
  color: #d97706;
}

.st-non_attivo,
.st-non-attivo {
  background: rgba(99, 102, 241, .14);
  color: #6366f1;
}

.st-prospect {
  background: rgba(26, 167, 185, .18);
  color: var(--fx-accent-strong);
}

.st-archiviato {
  background: rgba(100, 116, 139, .16);
  color: #475569;
}

.fx-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(26, 167, 185, .12);
  color: var(--fx-accent-strong);
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 4px;
}

.fx-tag-overflow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--fx-surface-muted);
  color: var(--fx-text-soft);
  font-size: 12px;
  font-weight: 600;
  margin-right: 6px;
  margin-bottom: 4px;
  cursor: pointer;
  position: relative;
  transition: color .15s ease, background .15s ease;
}

.fx-tag-overflow i {
  font-size: 14px;
  line-height: 1;
}

.fx-tag-overflow:hover,
.fx-tag-overflow:focus-visible {
  background: rgba(26, 167, 185, .12);
  color: var(--fx-accent-strong);
  outline: none;
}

.fx-tag-overflow::after,
.fx-tag-overflow::before {
  content: '';
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 30;
}

.fx-tag-overflow::after {
  content: attr(data-tooltip);
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, -4px);
  background: var(--fx-surface);
  color: var(--fx-text);
  box-shadow: var(--fx-shadow-soft);
  border-radius: var(--fx-radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
  min-width: 160px;
  max-width: min(280px, 80vw);
  text-align: left;
}

.fx-tag-overflow::before {
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translate(-50%, -4px);
  width: 10px;
  height: 10px;
  background: var(--fx-surface);
  border-radius: 2px;
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
}

.fx-tag-overflow:hover::after,
.fx-tag-overflow:hover::before,
.fx-tag-overflow:focus-visible::after,
.fx-tag-overflow:focus-visible::before,
.fx-tag-overflow:focus::after,
.fx-tag-overflow:focus::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.fx-table .fx-col-archive {
  width: 120px;
  white-space: nowrap;
}

.fx-tag.muted {
  background: var(--fx-surface-muted);
  color: var(--fx-text-soft);
}

/* Modal */
.fx-modal[hidden] {
  display: none !important;
}

.fx-modal {
  border: none;
  border-radius: var(--fx-radius-lg);
  padding: 0;
  background: var(--fx-surface);
  color: var(--fx-text);
  min-width: min(720px, 96vw);
  box-shadow: var(--fx-shadow-soft);
  overflow: hidden;
}

dialog.fx-modal::backdrop {
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
}

.fx-modal-head {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--fx-border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.fx-modal-head h3 {
  margin: 0;
  font-size: 22px;
}

.fx-modal-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--fx-text-muted);
}

.fx-modal-close {
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fx-text-soft);
  cursor: pointer;
  transition: color var(--fx-transition);
}

.fx-modal-close i {
  font-size: 24px;
  line-height: 1;
}

.fx-modal-close:hover {
  color: var(--fx-text);
}

.fx-modal-body {
  max-height: min(70vh, 600px);
  overflow-y: auto;
  padding: 28px;
}

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

.fx-form-grid .full {
  grid-column: 1 / -1;
}

.fx-settings-form {
  max-width: 780px;
  margin-top: 16px;
}

.fx-settings-form .fx-card-foot {
  padding: 24px 28px 28px;
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.fx-settings-form .fx-card-foot .fx-btn {
  margin-left: auto;
  margin-top: 8px;
}

.fx-field--toggle {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.fx-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  color: var(--fx-text);
}

.fx-switch input {
  appearance: none;
  width: 48px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--fx-border-strong);
  background: var(--fx-border);
  position: relative;
  transition: background var(--fx-transition), border-color var(--fx-transition);
}

.fx-switch input::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
  transition: transform var(--fx-transition), background var(--fx-transition);
}

.fx-switch input:checked {
  background: var(--fx-accent);
  border-color: var(--fx-accent);
}

.fx-switch input:checked::after {
  transform: translateX(22px);
  background: #fff;
}

.fx-switch-label {
  font-size: 14px;
  color: var(--fx-text-muted);
}

html[data-theme="dark"] .fx-switch input {
  background: var(--fx-border);
  border-color: var(--fx-border-strong);
}

html[data-theme="dark"] .fx-switch input::after {
  background: var(--fx-surface);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.fx-fieldset {
  margin-top: 30px;
  padding: 20px;
  border-radius: var(--fx-radius-sm);
  border: 1px dashed var(--fx-border);
  background: var(--fx-surface-muted);
}

.fx-fieldset-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.fx-fieldset-subtitle {
  margin: 0 0 18px;
  color: var(--fx-text-muted);
  font-size: 14px;
}

.fx-report-filters {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 12px 24px -16px rgba(15, 23, 42, 0.25);
}

.fx-segment-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 12px 24px -16px rgba(15, 23, 42, 0.2);
}

.fx-segment {
  border: none;
  background: transparent;
  color: var(--fx-text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  transition: background var(--fx-transition), color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-segment:hover,
.fx-segment:focus-visible {
  background: rgba(26, 167, 185, 0.12);
  color: var(--fx-accent);
}

.fx-segment[aria-pressed="true"] {
  background: var(--fx-accent);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(26, 167, 185, 0.8);
}

html[data-theme="dark"] .fx-report-filters {
  background: var(--fx-surface-muted);
  border-color: var(--fx-border-strong);
  box-shadow: 0 12px 28px -18px rgba(8, 13, 22, 0.7);
}

html[data-theme="dark"] .fx-segment-group {
  background: var(--fx-surface-muted);
  border-color: var(--fx-border-strong);
  box-shadow: 0 12px 28px -18px rgba(8, 13, 22, 0.6);
}

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

.fx-report-card .fx-card-body {
  gap: 8px;
}

.fx-report-card-label {
  margin: 0;
  font-size: 14px;
  color: var(--fx-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.fx-report-card-value {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.fx-report-card-meta {
  margin: 0;
  color: var(--fx-text-muted);
  font-size: 14px;
}

.fx-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
}

.fx-report-chart-body {
  flex-direction: row;
  gap: 24px;
  align-items: center;
}

.fx-report-chart {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--fx-surface-muted);
  display: grid;
  place-items: center;
  transition: background var(--fx-transition);
}

.fx-report-chart[data-empty="true"] .fx-report-chart-pie::before {
  background: repeating-conic-gradient(var(--fx-border) 0deg, var(--fx-border) 6deg, transparent 6deg, transparent 12deg);
}

.fx-report-chart-pie {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
}

.fx-report-chart-pie::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--fx-accent);
  transition: background var(--fx-transition);
}

.fx-report-chart-center {
  position: relative;
  z-index: 1;
  background: var(--fx-surface);
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
  box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.35);
}

.fx-report-chart-total {
  font-size: 18px;
  font-weight: 600;
}

.fx-report-chart-center small {
  color: var(--fx-text-muted);
  font-size: 12px;
}

.fx-report-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  min-width: 220px;
}

.fx-report-legend li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--fx-text);
}

.fx-report-legend-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-report-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fx-border);
}

.fx-report-legend-amount {
  font-weight: 600;
}

.fx-report-table .fx-card-body {
  gap: 16px;
}

@media (max-width: 1024px) {
  .fx-report-layout {
    grid-template-columns: 1fr;
  }

  .fx-report-chart-body {
    flex-direction: column;
    align-items: stretch;
  }

  .fx-report-chart {
    margin: 0 auto;
  }

  .fx-report-legend {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.fx-field-radio {
  align-items: flex-start;
}

.fx-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.fx-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fx-text);
}

.fx-radio-option input {
  accent-color: var(--fx-primary);
}

.fx-email-targets {
  display: grid;
  gap: 16px;
}

.fx-email-targets [data-target-panel] {
  display: none;
}

.fx-email-targets [data-target-panel].is-active {
  display: block;
}

.fx-email-target-panel {
  padding: 16px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface-muted);
}

.fx-email-target-panel .fx-field {
  margin: 0;
}

.fx-email-contact-list {
  min-height: 200px;
}

.fx-modal-foot {
  padding: 22px 28px;
  border-top: 1px solid var(--fx-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.fx-digital-service {
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  padding: 12px;
  background: var(--fx-surface-muted);
}

.fx-digital-meta {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.fx-digital-meta a[aria-hidden="true"] {
  pointer-events: none;
  color: var(--fx-text-muted);
}

.fx-digital-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.fx-digital-select {
  max-width: 320px;
}

.fx-digital-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 36px;
}

.fx-digital-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

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

.fx-digital-form-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.fx-digital-sections-card {
  margin-top: 36px;
}

.fx-digital-sections {
  display: grid;
  gap: 16px;
}

.fx-digital-section {
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-md);
  padding: 24px 28px;
  background: var(--fx-surface);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fx-digital-section.is-muted {
  opacity: 0.6;
}

.fx-digital-section.is-dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.fx-digital-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.fx-digital-section-actions {
  display: flex;
  gap: 8px;
}

.fx-digital-section-desc {
  margin-top: 10px;
  color: var(--fx-text-muted);
}

.fx-digital-items {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 18px;
}

.fx-digital-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface-muted);
}

.fx-digital-item.is-dragging {
  opacity: 0.5;
}

.fx-digital-item-info {
  min-width: 0;
}

.fx-digital-item-desc {
  margin: 8px 0 0;
  color: var(--fx-text-muted);
}

.fx-digital-item-price {
  font-weight: 600;
  white-space: nowrap;
}

.fx-digital-item-actions {
  display: flex;
  gap: 10px;
}

.fx-digital-empty,
.fx-digital-empty-items {
  color: var(--fx-text-muted);
  font-style: italic;
}

.fx-digital-section-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.fx-digital-item-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--fx-surface-muted);
  border: 1px solid var(--fx-border);
  color: var(--fx-text-muted);
}

html[data-theme="dark"] .fx-chip {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.32);
  color: var(--fx-accent);
}

.fx-extra-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--fx-text-muted);
}

.fx-extra-item strong {
  color: var(--fx-text);
}

.fx-tag-manager {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-tag-manager-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-tag-manager-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border: 1px solid var(--fx-border);
  border-radius: 10px;
  background: var(--fx-surface-muted);
}

.fx-tag-manager-item.is-active {
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 1px var(--fx-accent-alpha, rgba(96, 165, 250, 0.4));
}

.fx-tag-manager-label {
  font-weight: 600;
  color: var(--fx-text);
}

.fx-tag-manager-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fx-tag-manager-actions .fx-btn {
  font-size: 13px;
}

.fx-tag-manager-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--fx-surface);
  border: 1px solid var(--fx-border);
  font-size: 12px;
  color: var(--fx-text-muted);
}

.fx-tag-manager-empty {
  font-size: 14px;
  color: var(--fx-text-muted);
}

.fx-field-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fx-field-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fx-form-custom-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.fx-custom-field {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface-muted);
}

.fx-custom-field label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-custom-field button {
  align-self: flex-end;
}

#fx-form-code {
  font-family: "Fira Code", Menlo, Consolas, monospace;
  white-space: pre;
}

.fx-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.fx-quote-items {
  margin-top: 24px;
  border-top: 1px solid var(--fx-border);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fx-quote-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fx-quote-items-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fx-quote-item {
  background: var(--fx-surface-muted);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  padding: 18px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.08);
}

html[data-theme="dark"] .fx-quote-item {
  background: rgba(30, 41, 59, .55);
  border-color: rgba(148, 163, 184, .25);
}

.fx-quote-item-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: start;
}

.fx-quote-item-grid .full {
  grid-column: 1 / -1;
}

.fx-quote-item-nums {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}

.fx-quote-item-total {
  margin: 0;
  font-weight: 600;
  text-align: right;
  color: var(--fx-text);
}

.fx-quote-item-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.fx-quote-total {
  margin: 0;
  font-weight: 600;
  text-align: right;
  color: var(--fx-text);
}

.fx-quote-costs {
  border-top: 1px solid var(--fx-border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-quote-costs-manual {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-quote-costs-manual-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.fx-quote-costs-manual-controls .fx-input {
  flex: 1 1 220px;
  min-width: 180px;
}

.fx-quote-costs-manual-controls .fx-btn {
  flex: 0 0 auto;
}

.fx-quote-costs-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.fx-quote-costs-subtitle {
  margin: 0;
  font-size: 0.875rem;
  color: var(--fx-muted);
}

.fx-quote-costs-list {
  background: var(--fx-surface-muted);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  padding: 12px;
  min-height: 48px;
}

.fx-quote-costs-table {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-quote-costs-table li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.fx-quote-costs-label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 500;
}

.fx-quote-costs-value {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.fx-quote-costs-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(26, 167, 185, 0.15);
  color: var(--fx-accent-strong);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

html[data-theme="dark"] .fx-quote-costs-badge {
  background: rgba(96, 165, 250, 0.2);
  color: rgb(191, 219, 254);
}

.fx-quote-costs-note {
  font-size: 0.75rem;
  color: var(--fx-muted);
  padding: 2px 6px;
  border-radius: var(--fx-radius-sm);
  background: rgba(148, 163, 184, 0.15);
}

html[data-theme="dark"] .fx-quote-costs-note {
  color: var(--fx-muted-light, #cbd5f5);
  background: rgba(148, 163, 184, 0.25);
}

.fx-quote-costs-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 0;
}

.fx-quote-costs-summary div {
  background: var(--fx-surface-muted);
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fx-quote-costs-summary dt {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fx-muted);
}

.fx-quote-costs-summary dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fx-cash-summary {
  margin-bottom: 28px;
}

.fx-cash-summary-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
}

.fx-cash-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
}

.fx-cash-card-label {
  margin: 0;
  font-size: 0.95rem;
  color: var(--fx-muted);
  font-weight: 500;
}

.fx-cash-card-value {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--fx-text);
}

.fx-cash-card-meta {
  margin: 0;
  color: var(--fx-muted);
  font-size: 0.875rem;
}

.fx-cash-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  align-items: start;
}

.fx-cash-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-cash-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-cash-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
}

.fx-cash-category:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.fx-cash-category.fx-cash-category-empty {
  grid-template-columns: 1fr;
  border-bottom: none;
  padding-bottom: 0;
  color: var(--fx-muted);
  font-style: italic;
}

.fx-cash-category.fx-cash-category-empty .fx-cash-category-label {
  font-weight: 400;
}

.fx-cash-category-label {
  font-weight: 500;
  color: var(--fx-text);
}

.fx-cash-category-value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fx-cash-category-percent {
  font-size: 0.875rem;
  color: var(--fx-muted);
}

@media (max-width: 960px) {
  .fx-cash-layout {
    grid-template-columns: 1fr;
  }

  .fx-cash-card {
    min-height: 120px;
  }
}

@media (max-width: 720px) {
  .fx-cash-summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .fx-cash-card-value {
    font-size: 1.6rem;
  }
}

@media (max-width: 720px) {
  .fx-quote-item-grid {
    grid-template-columns: 1fr;
  }

  .fx-quote-item-nums {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

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

.ta-right {
  text-align: right;
}

/* Responsive */
@media (max-width: 1180px) {
  .fx-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .fx-content {
    padding: 28px;
  }
}

@media (max-width: 960px) {
  .fx-layout {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .fx-sidebar {
    padding: 24px 14px;
    align-items: center;
  }

  .fx-brand-txt,
  .fx-nav-text,
  .fx-theme-label {
    display: none;
  }

  .fx-nav-label {
    margin-left: 0;
    text-align: center;
  }

  .fx-nav ul {
    align-items: center;
  }

  .fx-nav-item {
    width: 56px;
    justify-content: center;
    padding: 12px;
  }

  .fx-badge {
    display: none;
  }

  .fx-filter-toolbar {
    padding: 18px;
  }
}

@media (max-width: 720px) {
  .fx-layout {
    grid-template-columns: 1fr;
  }

  .fx-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--fx-border);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
  }

  .fx-nav {
    width: 100%;
  }

  .fx-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
  }

  .fx-nav-item {
    width: auto;
    padding: 10px 14px;
  }

  .fx-content {
    padding: 24px;
  }

  .fx-topbar {
    position: static;
  }

  .fx-top-greeting {
    display: none;
  }
}

@media (max-width: 640px) {
  .fx-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

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

  .fx-modal {
    min-width: min(560px, 96vw);
  }
}

@media (max-width: 520px) {
  .fx-content {
    padding: 18px;
  }

  .fx-filter-toolbar {
    padding: 16px;
  }

  .fx-pager {
    justify-content: center;
  }

  .fx-modal {
    min-width: 94vw;
  }
}

/* Dark theme tweaks */
html[data-theme="dark"] .fx-nav-item:hover:not(.is-disabled),
html[data-theme="dark"] .fx-theme-toggle:hover,
html[data-theme="dark"] .fx-logout:hover,
html[data-theme="dark"] .fx-btn:hover {
  background: rgba(148, 163, 184, .12);
}

html[data-theme="dark"] .fx-btn.ghost:hover,
html[data-theme="dark"] .fx-table tbody tr:hover {
  background: rgba(96, 165, 250, .14);
  --fx-row-bg: rgba(96, 165, 250, .14);
}

html[data-theme="dark"] .fx-table tbody tr:nth-child(odd) {
  background: rgba(96, 165, 250, .08);
  --fx-row-bg: rgba(96, 165, 250, .08);
}

html[data-theme="dark"] .fx-note {
  background: rgba(96, 165, 250, .25);
  color: var(--fx-accent);
}

html[data-theme="dark"] .fx-filter-toolbar,
html[data-theme="dark"] .fx-card,
html[data-theme="dark"] .fx-topbar {
  box-shadow: 0 24px 48px -28px rgba(15, 23, 42, .85);
}

html[data-theme="dark"] .fx-input {
  background: rgba(30, 41, 59, .75);
}

html[data-theme="dark"] .fx-input:hover {
  background: rgba(51, 65, 85, .75);
}

html[data-theme="dark"] .fx-modal-foot,
html[data-theme="dark"] .fx-modal-head,
html[data-theme="dark"] .fx-table thead th {
  background: rgba(15, 23, 42, .85);
}

.fx-col-status {
  width: 48px;
  text-align: center;
}

.fx-status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d0d5dd;
  box-shadow: 0 0 0 4px rgba(208, 213, 221, 0.3);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.fx-status-indicator.is-online {
  background: #12b76a;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.25);
}

html[data-theme="dark"] .fx-table--projects thead th[data-col="service"] {
  background: rgba(15, 23, 42, .92);
  box-shadow: none;
}

html[data-theme="dark"] .fx-table--projects tbody td[data-col="service"] {
  background: var(--fx-row-bg, rgba(15, 23, 42, .92));
  box-shadow: none;
}

html[data-theme="dark"] .fx-detail-row td {
  background: rgba(15, 23, 42, .65);
}

html[data-theme="dark"] .fx-detail-notes {
  background: rgba(96, 165, 250, .2);
}

/* Login layout */
.fx-login-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(26, 167, 185, .25) 0%, rgba(26, 167, 185, 0) 42%),
    radial-gradient(circle at 82% 12%, rgba(0, 82, 124, .35) 0%, rgba(0, 82, 124, 0) 48%),
    linear-gradient(135deg, rgba(26, 167, 185, .92) 0%, rgba(0, 82, 124, .95) 52%, rgba(4, 19, 45, .98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  color: #fff;
}

.fx-login-layout {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.fx-login-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 440px;
  color: rgba(246, 251, 255, .92);
}

.fx-login-logo {
  width: 220px;
  height: auto;
  filter: drop-shadow(0 20px 34px rgba(4, 19, 45, .55));
}

.fx-login-title {
  font-size: clamp(2rem, 2.4vw, 2.5rem);
  font-weight: 700;
  margin: 0;
}

.fx-login-description {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
  color: rgba(246, 251, 255, .82);
}

.fx-login-panel {
  width: 100%;
}

.fx-login-card {
  padding: 38px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  box-shadow: 0 32px 60px -34px rgba(4, 24, 63, .5);
  border-radius: 24px;
  color: #0d1b2a;
}

.fx-login-card-head {
  margin-bottom: 24px;
}

.fx-login-card-title {
  margin: 0 0 8px;
  font-size: 1.65rem;
  font-weight: 700;
}

.fx-login-card-subtitle {
  margin: 0;
  color: #3a4962;
  font-size: 1rem;
}

.fx-login-alert {
  margin-bottom: 16px;
}

.fx-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fx-login-form + .fx-login-form {
  margin-top: 24px;
}

.fx-login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: #112240;
}

.fx-login-input {
  border-radius: var(--fx-radius-md, 12px);
  border: 1px solid rgba(8, 36, 71, .18);
  padding: 12px 14px;
  font-size: 1rem;
  transition: border-color var(--fx-transition), box-shadow var(--fx-transition);
  background: #fff;
  color: #0c1729;
}

.fx-login-input:focus {
  outline: none;
  border-color: rgba(10, 46, 99, .55);
  box-shadow: 0 0 0 4px rgba(23, 92, 255, .15);
}

.fx-login-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fx-login-help {
  margin: 0;
  color: #41516a;
  font-size: .95rem;
}

.fx-login-feedback {
  margin-top: 12px;
  font-size: .95rem;
  color: #0a2e63;
}

.fx-login-foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(13, 27, 42, .08);
}

.fx-login-footnote {
  margin: 0;
  font-size: .95rem;
  color: #41516a;
}

.fx-login-footnote a {
  color: var(--fx-accent-strong);
  font-weight: 600;
}

@media (max-width: 960px) {
  .fx-login-body {
    padding: 20px;
  }
  .fx-login-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .fx-login-hero-inner {
    align-items: center;
    text-align: center;
    margin: 0 auto;
  }
  .fx-login-card {
    padding: 30px 24px;
  }
}

@media (max-width: 600px) {
  .fx-login-body {
    padding: 16px;
  }
  .fx-login-logo {
    width: 190px;
  }
  .fx-login-actions {
    flex-direction: column;
  }
  .fx-login-actions .fx-btn {
    width: 100%;
    justify-content: center;
  }
}


/* Assistenza */
.fx-support-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-support-columns {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1101px) {
  .fx-support-columns {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

.fx-support-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-support-board-wrapper {
  width: 100%;
}

.fx-support-card .fx-card-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fx-support-card .fx-form-grid {
  display: grid;
  gap: 16px;
}

.fx-support-card .fx-form-grid .full {
  grid-column: 1 / -1;
}

.fx-support-board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}

.fx-support-summary {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}

.fx-support-summary-card {
  background: var(--fx-surface-muted);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fx-support-summary-label {
  font-size: 0.75rem;
  color: var(--fx-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.fx-support-summary-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--fx-text-strong);
}

.fx-support-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.fx-support-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.fx-support-ticket-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-support-ticket {
  border: 1px solid var(--fx-border);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--fx-surface-muted);
  display: grid;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.fx-support-ticket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fx-support-ticket:hover {
  border-color: rgba(26, 167, 185, 0.4);
  box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.5);
}

.fx-support-ticket.is-active {
  border-color: var(--fx-accent-strong);
  background: rgba(26, 167, 185, 0.08);
  box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.45);
}

.fx-support-ticket-title {
  font-weight: 600;
  color: var(--fx-text-strong, #0f172a);
}

.fx-support-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.8125rem;
  color: var(--fx-text-muted);
}

.fx-support-ticket-excerpt {
  margin: 0;
  font-size: 0.875rem;
  color: var(--fx-text-muted);
}

.fx-support-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(26, 167, 185, 0.12);
  color: var(--fx-accent-strong);
}

.fx-support-status-badge[data-status="waiting_client"] {
  background: rgba(250, 204, 21, 0.18);
  color: #b45309;
}

.fx-support-status-badge[data-status="in_progress"] {
  background: rgba(14, 165, 233, 0.18);
  color: #0369a1;
}

.fx-support-status-badge[data-status="resolved"],
.fx-support-status-badge[data-status="closed"] {
  background: rgba(34, 197, 94, 0.16);
  color: #047857;
}

.fx-support-status-badge[data-status="archived"] {
  background: rgba(148, 163, 184, 0.24);
  color: #475569;
}

.fx-support-empty {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--fx-text-muted);
  text-align: center;
}

.fx-support-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fx-support-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fx-support-detail-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
}

.fx-support-detail-meta {
  margin: 4px 0 0;
  color: var(--fx-text-muted);
  font-size: 0.875rem;
}

.fx-support-ticket-select {
  margin-top: 12px;
  max-width: 320px;
}

.fx-support-ticket-select .fx-input {
  background: var(--fx-surface);
}

.fx-support-detail-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-support-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.fx-support-detail-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fx-support-detail-actions .fx-form-message {
  min-height: 20px;
}

.fx-support-detail-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fx-support-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--fx-surface-muted);
}

.fx-support-info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fx-text-muted);
}

.fx-support-info-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fx-text-strong);
  word-break: break-word;
}

.fx-support-notify {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: rgba(26, 167, 185, 0.05);
}

.fx-support-notify-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.fx-support-notify-head h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.fx-support-notify-text {
  margin: 4px 0 0;
  font-size: 0.875rem;
  color: var(--fx-text-muted);
}

.fx-support-notify-field .fx-field-hint {
  margin-top: 6px;
}

.fx-support-messages {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fx-support-message-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-support-message {
  border: 1px solid var(--fx-border);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--fx-surface-muted);
}

.fx-support-message[data-role="client"] {
  border-color: rgba(26, 167, 185, 0.32);
  background: rgba(26, 167, 185, 0.08);
}

.fx-support-message-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.fx-support-message-author {
  font-weight: 600;
}

.fx-support-message-date {
  font-size: 0.8125rem;
  color: var(--fx-text-muted);
}

.fx-support-message-body {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-line;
}

.fx-support-message-empty {
  color: var(--fx-text-muted);
  font-style: italic;
  padding: 12px 0;
}

.fx-support-reply-form .fx-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}

.fx-support-reply-form .fx-form-message {
  margin-right: auto;
}

.fx-support-reply-form .fx-form-message.is-error {
  color: var(--fx-danger, #dc2626);
}

.fx-support-reply-form .fx-form-message.is-success {
  color: var(--fx-accent-strong);
}

.fx-support-status-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.fx-support-status-controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.fx-support-detail textarea {
  resize: vertical;
}

.fx-support-tips-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--fx-text-muted);
}

.fx-support-tips-list strong {
  color: var(--fx-text-strong);
}

/* --- Flusso --- */
/* --- Flusso --- */
.fx-card--notes {
  padding: 0;
  overflow: hidden;
}

.fx-notes-layout {
  display: flex;
  flex-wrap: wrap;
  min-height: 520px;
}

.fx-notes-sidebar {
  flex: 0 0 280px;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  max-height: 100%;
}

.fx-notes-sidebar-head {
  padding: 20px 20px 12px;
}

.fx-notes-empty {
  color: rgba(15, 23, 42, 0.6);
  font-size: 14px;
  margin: 8px 0 0;
}

.fx-notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.fx-notes-item {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.fx-notes-item:last-child {
  border-bottom: none;
}

.fx-notes-item-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 14px 18px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font: inherit;
}

.fx-notes-item-btn:hover,
.fx-notes-item-btn:focus {
  background: rgba(59, 130, 246, 0.08);
}

.fx-notes-item.is-active .fx-notes-item-btn {
  background: rgba(59, 130, 246, 0.12);
}

.fx-notes-item-title {
  font-weight: 600;
  color: #0f172a;
}

.fx-notes-item-meta {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.6);
}

.fx-notes-editor {
  flex: 1;
  min-width: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-notes-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fx-note-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.fx-note-status {
  font-size: 13px;
  color: rgba(15, 23, 42, 0.65);
}

.fx-note-status.is-success {
  color: #047857;
}

.fx-note-status.is-error {
  color: #b91c1c;
}

.fx-note-status.is-warning {
  color: #b45309;
}

.fx-notes-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.fx-notes-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.fx-whiteboard {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 1 auto;
  align-self: stretch;
  max-width: 100%;
}

.fx-whiteboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.04);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.fx-whiteboard-toolbar .fx-btn.is-active {
  background: #2563eb;
  color: #fff;
}

.fx-whiteboard-canvas {
  position: relative;
  width: 100%;
  min-height: 420px;
  flex: 1 1 auto;
  background: #fff;
}

.fx-whiteboard-canvas canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

@media (max-width: 768px) {
  .fx-whiteboard-canvas {
    min-height: 320px;
  }
}

@media (max-width: 960px) {
  .fx-notes-layout {
    flex-direction: column;
  }
  .fx-notes-sidebar {
    flex: 1 1 auto;
    max-height: 240px;
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }
  .fx-notes-editor {
    padding: 20px;
  }
}

.fx-board-card {
  margin-top: var(--fx-space-lg, 2rem);
}

.fx-board-head {
  align-items: flex-start;
}

.fx-board-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--fx-text-muted, #64748b);
}

.fx-board-updated {
  font-weight: 500;
}

.fx-board-empty {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background-color: var(--fx-surface-subtle, #f1f5f9);
  color: var(--fx-text-muted, #64748b);
}

.fx-board {
  display: grid;
  gap: var(--fx-space-md, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch;
}

.fx-board.is-pointer-dragging {
  cursor: grabbing;
  user-select: none;
}

.fx-board.is-pointer-dragging .fx-board-column-head,
.fx-board.is-pointer-dragging [data-role="column-handle"] {
  cursor: grabbing;
}

.fx-board-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background-color: var(--fx-surface-elevated, #ffffff);
  box-shadow: var(--fx-shadow-xs, 0 4px 12px rgba(15, 23, 42, 0.08));
  min-height: 320px;
}

.fx-board-column.is-dragging {
  opacity: 0.65;
}

.fx-board-column-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 2px dashed rgba(15, 23, 42, 0.24);
  background-color: transparent;
  color: var(--fx-text-muted, #64748b);
  min-height: 320px;
}

.fx-board-column-placeholder::before {
  content: 'Rilascia qui';
  font-size: 0.875rem;
  font-weight: 500;
}

html[data-theme="dark"] .fx-board-column {
  background-color: rgba(15, 23, 42, 0.35);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.45);
}

html[data-theme="dark"] .fx-board-column-placeholder {
  border-color: rgba(226, 232, 240, 0.35);
  color: rgba(226, 232, 240, 0.6);
}

.fx-board-column-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  cursor: grab;
}

.fx-board-column-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fx-board-column-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0.25rem;
  border-radius: 8px;
  cursor: grab;
}

.fx-board-column-handle:active {
  cursor: grabbing;
}

.fx-board-column-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.fx-board-column-move:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.fx-board-column-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.fx-board-column-actions .fx-btn {
  min-width: 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--fx-text-muted, #475569);
  box-shadow: none;
}

.fx-board-column-actions .fx-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--fx-text);
}

html[data-theme="dark"] .fx-board-column-actions .fx-btn:hover {
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.fx-board-column-actions .fx-btn:focus-visible {
  outline: 2px solid var(--fx-accent, #1aa7b9);
  outline-offset: 1px;
}

.fx-board-column-actions .fx-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.fx-board-column-actions .fx-btn i {
  font-size: 1.05rem;
}

.fx-board-column-actions .fx-board-count {
  margin: 0 0.35rem;
}

.fx-board-column-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 8px;
}

.fx-board-column-remove i {
  font-size: 1rem;
}

.fx-board-column-title h3 {
  margin: 0;
  font-size: 1rem;
}

.fx-board-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: rgba(15, 23, 42, 0.08);
  color: var(--fx-text-muted, #475569);
}

html[data-theme="dark"] .fx-board-count {
  background-color: rgba(148, 163, 184, 0.16);
  color: rgba(226, 232, 240, 0.85);
}

.fx-board-column-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 180px;
}

.fx-board-column-body.is-drag-over {
  border: 2px dashed rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  padding: 0.5rem;
}

.fx-board-item {
  background-color: var(--fx-surface, #ffffff);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  box-shadow: var(--fx-shadow-sm, 0 6px 12px rgba(15, 23, 42, 0.1));
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
  position: relative;
}

.fx-board-item:active {
  cursor: grabbing;
}

.fx-board-item.is-dragging {
  opacity: 0.92;
  transform: scale(1.02);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.18);
}

html[data-theme="dark"] .fx-board-item {
  background-color: rgba(15, 23, 42, 0.55);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.6);
}

.fx-board-item-flag {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
}

.fx-board-item-flag[hidden] {
  display: none;
}

.fx-board-flag-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 0 rgba(59, 130, 246, 0);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

html[data-theme="dark"] .fx-board-flag-dot {
  box-shadow: 0 0 0 2px #0f172a, 0 0 0 0 rgba(59, 130, 246, 0);
}

.fx-board-item--flag-attention .fx-board-flag-dot {
  background: #fb923c;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 6px rgba(251, 146, 60, 0.24);
}

html[data-theme="dark"] .fx-board-item--flag-attention .fx-board-flag-dot {
  box-shadow: 0 0 0 2px #0f172a, 0 0 0 6px rgba(251, 146, 60, 0.35);
}

.fx-board-item--flag-success .fx-board-flag-dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 6px rgba(34, 197, 94, 0.24);
}

html[data-theme="dark"] .fx-board-item--flag-success .fx-board-flag-dot {
  box-shadow: 0 0 0 2px #0f172a, 0 0 0 6px rgba(34, 197, 94, 0.35);
}

.fx-board-item--flag-attention {
  box-shadow: 0 10px 20px rgba(251, 146, 60, 0.18);
}

.fx-board-item--flag-success {
  box-shadow: 0 10px 20px rgba(34, 197, 94, 0.18);
}

.fx-board-item--flag-attention .fx-board-item-title {
  color: #c2410c;
}

.fx-board-item--flag-success .fx-board-item-title {
  color: #15803d;
}

html[data-theme="dark"] .fx-board-item--flag-attention {
  box-shadow: 0 12px 24px rgba(251, 146, 60, 0.3);
}

html[data-theme="dark"] .fx-board-item--flag-success {
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.32);
}

html[data-theme="dark"] .fx-board-item--flag-attention .fx-board-item-title {
  color: #fed7aa;
}

html[data-theme="dark"] .fx-board-item--flag-success .fx-board-item-title {
  color: #bbf7d0;
}

.fx-board-flag-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fx-board-flag-toggle-indicator {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  border: 2px solid rgba(148, 163, 184, 0.7);
  background: transparent;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.fx-board-flag-toggle:hover .fx-board-flag-toggle-indicator {
  transform: scale(1.1);
}

.fx-board-flag-toggle[data-flag="attention"] .fx-board-flag-toggle-indicator {
  border-color: #fb923c;
  background: rgba(251, 146, 60, 0.2);
}

.fx-board-flag-toggle[data-flag="success"] .fx-board-flag-toggle-indicator {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
}

.fx-board-flag-toggle[data-flag="none"] .fx-board-flag-toggle-indicator {
  border-color: rgba(148, 163, 184, 0.7);
  background: transparent;
}

.fx-board-item-title {
  font-weight: 600;
  color: var(--fx-text-strong, #0f172a);
}

html[data-theme="dark"] .fx-board-item-title {
  color: #e2e8f0;
}

.fx-board-item-description {
  font-size: 0.875rem;
  color: var(--fx-text-muted, #64748b);
  line-height: 1.4;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: calc(1.4em * 3);
  word-break: break-word;
}

html[data-theme="dark"] .fx-board-item-description {
  color: rgba(226, 232, 240, 0.7);
}

.fx-board-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--fx-text-muted, #94a3b8);
}

.fx-board-item-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.fx-board-item-time {
  color: inherit;
}

.fx-board-item-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: #15803d;
  background-color: rgba(34, 197, 94, 0.12);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
}

.fx-board-item-status-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.fx-board-item-status-label {
  line-height: 1;
}

.fx-board-item.is-complete {
  box-shadow: 0 10px 22px rgba(21, 128, 61, 0.22);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.fx-board-item.is-complete .fx-board-item-title {
  color: #14532d;
}

html[data-theme="dark"] .fx-board-item-status {
  color: #bbf7d0;
  background-color: rgba(22, 163, 74, 0.28);
}

html[data-theme="dark"] .fx-board-item-status-dot {
  box-shadow: 0 0 0 2px rgba(134, 239, 172, 0.35);
}

html[data-theme="dark"] .fx-board-item.is-complete {
  border-color: rgba(134, 239, 172, 0.45);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.35);
}

html[data-theme="dark"] .fx-board-item.is-complete .fx-board-item-title {
  color: #bbf7d0;
}

.fx-board-item-actions {
  display: flex;
  gap: 0.5rem;
}

.fx-board-item-actions .fx-btn {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.fx-board-column button[data-action="add-card"] {
  align-self: stretch;
}

@media (max-width: 768px) {
  .fx-board {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* Calendar */
.fx-calendar {
  position: relative;
}

.fx-calendar-head {
  border-bottom: 1px solid var(--fx-border);
  padding-bottom: 20px;
  margin-bottom: 4px;
}

.fx-calendar-headings {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fx-calendar-caption {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fx-text-soft);
}

.fx-calendar-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  text-transform: capitalize;
}

.fx-calendar-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-calendar-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.fx-calendar-month {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

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

.fx-calendar-grid--labels {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--fx-text-soft);
}

.fx-calendar-dayname {
  display: grid;
  place-items: center;
  padding: 4px 0;
}

.fx-calendar-grid[role="grid"] {
  min-height: 380px;
}

.fx-calendar-cell {
  border: 1px solid rgba(26, 167, 185, 0.18);
  background: linear-gradient(135deg, rgba(26, 167, 185, 0.12) 0%, rgba(26, 167, 185, 0.04) 100%);
  color: var(--fx-text);
  border-radius: var(--fx-radius-sm);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 14px;
  aspect-ratio: 1 / 1;
  position: relative;
  cursor: default;
  transition: transform 0.18s ease, background var(--fx-transition), border-color var(--fx-transition), box-shadow var(--fx-transition);
}

.fx-calendar-cell-number {
  font-size: 16px;
  font-weight: 700;
  color: var(--fx-text);
}

.fx-calendar-cell-bookings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.fx-calendar-cell-booking {
  font-size: 11px;
  font-weight: 600;
  color: var(--fx-text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-calendar-cell-booking--more {
  color: var(--fx-accent-strong);
}

.fx-calendar-cell.is-closed {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.16) 0%, rgba(231, 76, 60, 0.06) 100%);
  border-color: rgba(231, 76, 60, 0.28);
}

.fx-calendar-cell.has-availability,
.fx-calendar-cell.has-bookings {
  cursor: pointer;
}

.fx-calendar-cell:hover,
.fx-calendar-cell:focus-visible {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(26, 167, 185, 0.22) 0%, rgba(26, 167, 185, 0.12) 100%);
  border-color: rgba(26, 167, 185, 0.35);
  box-shadow: 0 18px 30px -22px rgba(15, 35, 52, 0.55);
}

.fx-calendar-cell.is-outside {
  background: var(--fx-surface);
  border-color: var(--fx-border);
  color: var(--fx-text-soft);
  opacity: 0.65;
}

.fx-calendar-cell.is-outside:hover,
.fx-calendar-cell.is-outside:focus-visible {
  transform: none;
  box-shadow: none;
  border-color: var(--fx-border);
  background: var(--fx-surface);
}

.fx-calendar-cell.is-weekend:not(.is-outside) {
  background: linear-gradient(135deg, rgba(26, 167, 185, 0.18) 0%, rgba(26, 167, 185, 0.08) 100%);
}

.fx-calendar-cell.is-today {
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 2px rgba(26, 167, 185, 0.28);
}

.fx-calendar-cell.is-selected {
  border-color: var(--fx-accent-strong);
  box-shadow: 0 0 0 2px rgba(26, 167, 185, 0.35);
}

.fx-calendar-indicator {
  position: absolute;
  bottom: 10px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6);
}

.fx-calendar-indicator.is-available {
  background: #2ecc71;
}

.fx-calendar-indicator.is-booked {
  background: #3498db;
}

.fx-calendar-meta {
  border-radius: var(--fx-radius);
  border: 1px solid var(--fx-border);
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.12) 0%, rgba(226, 232, 240, 0.18) 100%);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.fx-calendar-meta-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fx-calendar-meta-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.fx-calendar-events {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fx-calendar-event {
  border-radius: var(--fx-radius-sm);
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--fx-transition), box-shadow var(--fx-transition), transform var(--fx-transition);
}

.fx-calendar-event:hover,
.fx-calendar-event:focus-within {
  transform: translateY(-2px);
  border-color: rgba(26, 167, 185, 0.35);
  box-shadow: 0 18px 30px -22px rgba(15, 35, 52, 0.45);
}

.fx-calendar-event-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fx-calendar-event-day {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--fx-accent) 0%, var(--fx-accent-strong) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
}

.fx-calendar-event-title {
  font-weight: 600;
  font-size: 15px;
}

.fx-calendar-event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--fx-text-muted);
  font-size: 14px;
}

.fx-calendar-event-service,
.fx-calendar-booking-service {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(26, 167, 185, 0.12);
  color: var(--fx-accent-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fx-calendar-booking-service {
  font-size: 11px;
}

.fx-calendar-event-time {
  font-weight: 600;
  color: var(--fx-accent-strong);
}

.fx-calendar-event-location,
.fx-calendar-booking-location {
  font-size: 13px;
  color: var(--fx-text-soft);
}

.fx-calendar-booking-location {
  font-size: 12px;
}

.fx-calendar-event-description {
  margin: 0;
  line-height: 1.45;
}

.fx-calendar-empty {
  margin: 0;
  font-size: 14px;
  color: var(--fx-text-soft);
}

.fx-calendar-placeholder {
  margin: 0;
  font-size: 14px;
  color: var(--fx-text-soft);
}

.fx-calendar-day {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fx-calendar-day-label {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  color: var(--fx-text);
}

.fx-calendar-day-section {
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-calendar-day-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.fx-calendar-day-status {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fx-text-soft);
}

.fx-calendar-day-buttons {
  display: inline-flex;
  gap: 8px;
}

.fx-calendar-day-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fx-text-soft);
}


.fx-calendar-slots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fx-calendar-bookings-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-calendar-slot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1 1 220px;
  border-radius: var(--fx-radius-sm);
  border: 1px solid rgba(26, 167, 185, 0.18);
  background: var(--fx-surface);
  padding: 10px 14px;
}

.fx-calendar-slot--static {
  font-size: 14px;
  color: var(--fx-text);
  background: linear-gradient(135deg, rgba(26, 167, 185, 0.12) 0%, rgba(26, 167, 185, 0.04) 100%);
}

.fx-calendar-slot--actionable {
  border: none;
  background: transparent;
  padding: 0;
}

.fx-calendar-slot--actionable .fx-btn {
  flex: 1 1 auto;
  width: 100%;
}

.fx-calendar-slot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(26, 167, 185, 0.16);
  color: var(--fx-accent-strong);
  font-size: 12px;
  font-weight: 600;
}

.fx-calendar-slot-time {
  font-weight: 600;
}

.fx-calendar-slot-location {
  font-size: 13px;
  color: var(--fx-text-soft);
}

.fx-calendar-slot-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fx-calendar-day-empty {
  margin: 0;
  font-size: 13px;
  color: var(--fx-text-soft);
}

.fx-calendar-booking {
  border: 1px solid rgba(26, 167, 185, 0.18);
  border-radius: var(--fx-radius-sm);
  background: linear-gradient(135deg, rgba(26, 167, 185, 0.08) 0%, rgba(26, 167, 185, 0.02) 100%);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fx-calendar-booking-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fx-calendar-booking-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fx-text);
}

.fx-calendar-booking-time {
  color: var(--fx-accent-strong);
}

.fx-calendar-booking-client {
  color: var(--fx-text);
}

.fx-calendar-booking-note {
  margin: 0;
  font-size: 13px;
  color: var(--fx-text);
  line-height: 1.5;
}

.fx-availability-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fx-availability-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 960px) {
  .fx-availability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.fx-availability-day {
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius);
  background: var(--fx-surface-soft);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fx-availability-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fx-availability-day-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.fx-availability-slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-availability-slot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
}

.fx-availability-field {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 600;
  color: var(--fx-text-soft);
  gap: 6px;
}

.fx-availability-field input[type="time"],
.fx-availability-field input[type="number"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--fx-radius-sm);
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  color: var(--fx-text);
  font-size: 14px;
}

.fx-availability-empty {
  margin: 0;
  font-size: 13px;
  color: var(--fx-text-soft);
}

.fx-availability-status {
  margin: 0;
  font-size: 13px;
  color: var(--fx-text);
}

.fx-booking-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fx-booking-summary {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--fx-radius);
  background: linear-gradient(135deg, rgba(26, 167, 185, 0.12) 0%, rgba(26, 167, 185, 0.04) 100%);
}

.fx-booking-summary-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fx-text-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fx-booking-summary-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--fx-text);
}

html[data-theme="dark"] .fx-calendar-head {
  border-color: var(--fx-border);
}

html[data-theme="dark"] .fx-calendar-grid--labels {
  color: var(--fx-text-muted);
}

html[data-theme="dark"] .fx-calendar-cell {
  border-color: rgba(70, 200, 211, 0.32);
  background: linear-gradient(135deg, rgba(70, 200, 211, 0.25) 0%, rgba(70, 200, 211, 0.14) 100%);
}

html[data-theme="dark"] .fx-calendar-cell.is-outside {
  background: var(--fx-surface);
  border-color: var(--fx-border);
  color: var(--fx-text-soft);
}

html[data-theme="dark"] .fx-calendar-cell.is-weekend:not(.is-outside) {
  background: linear-gradient(135deg, rgba(70, 200, 211, 0.32) 0%, rgba(70, 200, 211, 0.18) 100%);
}

html[data-theme="dark"] .fx-calendar-cell.is-today {
  box-shadow: 0 0 0 2px rgba(70, 200, 211, 0.45);
}

html[data-theme="dark"] .fx-calendar-cell.is-closed {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.32) 0%, rgba(239, 68, 68, 0.18) 100%);
  border-color: rgba(239, 68, 68, 0.5);
}

html[data-theme="dark"] .fx-calendar-meta {
  background: linear-gradient(180deg, rgba(15, 52, 68, 0.55) 0%, rgba(9, 31, 42, 0.65) 100%);
}

html[data-theme="dark"] .fx-calendar-day-section {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .fx-calendar-slot {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .fx-calendar-slot--static {
  background: linear-gradient(135deg, rgba(70, 200, 211, 0.28) 0%, rgba(70, 200, 211, 0.14) 100%);
}

html[data-theme="dark"] .fx-calendar-booking {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22) 0%, rgba(37, 99, 235, 0.08) 100%);
  border-color: rgba(37, 99, 235, 0.35);
}

html[data-theme="dark"] .fx-calendar-event-service,
html[data-theme="dark"] .fx-calendar-booking-service {
  background: rgba(70, 200, 211, 0.2);
  color: var(--fx-accent);
}

html[data-theme="dark"] .fx-availability-day {
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(148, 163, 184, 0.25);
}

html[data-theme="dark"] .fx-booking-summary {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22) 0%, rgba(37, 99, 235, 0.08) 100%);
}

html[data-theme="dark"] .fx-calendar-event {
  background: var(--fx-surface);
}

/* Dynamic contents section */
.fx-settings-dynamic {
  margin-top: 32px;
}

.fx-settings-dynamic-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fx-dynamic-list[data-loading]::before {
  content: 'Caricamento contenuti dinamici…';
  color: var(--fx-text-soft);
  font-size: 14px;
}

.fx-dynamic-empty {
  margin: 0;
  font-size: 15px;
  color: var(--fx-text-soft);
}

.fx-dynamic-item {
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface-muted);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-dynamic-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fx-dynamic-item-title h4 {
  margin: 0;
  font-size: 17px;
}

.fx-dynamic-item-meta {
  margin: 4px 0 0;
  color: var(--fx-text-soft);
  font-size: 13px;
}

.fx-dynamic-status.is-published {
  background: var(--fx-success);
  color: #fff;
  border: none;
}

.fx-dynamic-status.is-draft {
  background: rgba(26, 167, 185, 0.12);
  color: var(--fx-text-soft);
  border: 1px dashed var(--fx-border);
}

.fx-dynamic-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fx-dynamic-item-snippet {
  display: flex;
}

.fx-dynamic-item-snippet-code {
  width: 100%;
  min-height: 60px;
  border-radius: var(--fx-radius-sm);
  border: 1px dashed var(--fx-border);
  background: var(--fx-surface);
  padding: 12px;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 14px;
  resize: vertical;
}

.fx-dynamic-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-top: 1px solid var(--fx-border);
  padding-top: 16px;
}

.fx-dynamic-form-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fx-dynamic-form-head h4 {
  margin: 0;
  font-size: 18px;
}

.fx-form-grid--dynamic {
  gap: 18px;
}

.fx-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.fx-editor-toolbar button {
  border: 1px solid var(--fx-border);
  background: var(--fx-surface);
  border-radius: var(--fx-radius-sm);
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fx-text);
}

.fx-editor-toolbar button.is-active {
  background: rgba(26, 167, 185, 0.15);
  border-color: var(--fx-accent);
  color: var(--fx-accent-strong);
}

.fx-editor-toolbar button:hover {
  background: var(--fx-surface-muted);
  border-color: var(--fx-border-strong);
}

.fx-editor-toolbar .fx-toolbar-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.fx-editor-toolbar .fx-toolbar-color input[type="color"] {
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.fx-editor-toolbar .fx-toolbar-select {
  min-width: 120px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  padding: 6px 32px 6px 10px;
  font-size: 14px;
  color: var(--fx-text);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--fx-border) 50%),
    linear-gradient(135deg, var(--fx-border) 50%, transparent 50%);
  background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 11px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.fx-editor-toolbar .fx-toolbar-select:focus {
  outline: none;
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 2px rgba(26, 167, 185, 0.2);
}

.fx-toolbar-separator {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: var(--fx-border);
  align-self: center;
}

.fx-editor-toolbar.is-html-mode button:not(.is-active),
.fx-editor-toolbar.is-html-mode .fx-toolbar-select,
.fx-editor-toolbar.is-html-mode .fx-toolbar-color {
  opacity: .6;
  cursor: not-allowed;
}

.fx-editor-toolbar.is-html-mode button.is-active {
  cursor: pointer;
}

.fx-editor {
  min-height: 220px;
  border: 1px solid var(--fx-border);
  border-radius: var(--fx-radius-sm);
  background: var(--fx-surface);
  padding: 12px;
  line-height: 1.6;
  font-size: 15px;
  color: var(--fx-text);
  overflow-y: auto;
  white-space: pre-wrap;
}

.fx-editor.fx-editor-html {
  display: block;
  width: 100%;
  font-family: "Fira Code", "SFMono-Regular", Menlo, Consolas, monospace;
  white-space: pre;
  resize: vertical;
}

.fx-editor.fx-editor-html:focus {
  outline: none;
  border-color: var(--fx-accent);
  box-shadow: 0 0 0 2px rgba(26, 167, 185, 0.2);
}

.fx-editor:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--fx-focus-ring);
  border-color: var(--fx-accent);
}

.fx-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--fx-text-soft);
}

.fx-dynamic-snippet-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.fx-dynamic-snippet-code {
  flex: 1;
  min-height: 64px;
  border-radius: var(--fx-radius-sm);
  border: 1px dashed var(--fx-border);
  background: var(--fx-surface);
  padding: 12px;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 14px;
  resize: vertical;
}

.fx-dynamic-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

html[data-theme="dark"] .fx-dynamic-item {
  background: var(--fx-surface);
}

html[data-theme="dark"] .fx-dynamic-status.is-draft {
  background: rgba(70, 200, 211, 0.12);
  border-color: var(--fx-border-strong);
  color: var(--fx-text-muted);
}

/* Cookie & Privacy Banner */
.fx-cookie-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(520px, 1fr) minmax(340px, 1fr);
  grid-template-areas: 'overview editor preview';
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.fx-cookie-overview { grid-area: overview; }
.fx-cookie-editor { grid-area: editor; }
.fx-cookie-preview { grid-area: preview; }

@media (max-width: 1600px) {
  .fx-cookie-layout {
    grid-template-columns: minmax(280px, 340px) minmax(520px, 1fr);
    grid-template-areas: 'overview editor' 'preview preview';
  }
}

@media (max-width: 1024px) {
  .fx-cookie-layout {
    grid-template-columns: 1fr;
    grid-template-areas: 'overview' 'editor' 'preview';
  }
}

.fx-cookie-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.fx-cookie-guide-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 16px;
  background: rgba(47, 84, 235, 0.08);
  box-shadow: 0 18px 40px -30px rgba(12, 34, 48, 0.3);
}

html[data-theme="dark"] .fx-cookie-guide-step {
  background: rgba(47, 84, 235, 0.2);
  box-shadow: 0 20px 44px -32px rgba(0, 0, 0, 0.45);
}

.fx-cookie-guide-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fx-accent, #2f54eb);
  color: var(--fx-on-primary, #ffffff);
  font-weight: 600;
  box-shadow: 0 10px 24px -18px rgba(12, 34, 48, 0.55);
}

.fx-cookie-guide-step h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.fx-cookie-guide-step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--fx-text-muted);
}

@media (max-width: 768px) {
  .fx-cookie-guide {
    grid-template-columns: 1fr;
  }
}


.fx-cookie-overview .fx-card-head {
  align-items: flex-start;
  gap: 16px;
}

.fx-cookie-overview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-cookie-overview-table {
  max-height: 520px;
  overflow: auto;
}

.fx-cookie-overview-empty {
  font-size: 0.9rem;
  color: var(--fx-text-muted);
  padding: 12px 0;
}

.fx-cookie-overview-row {
  cursor: pointer;
  transition: background-color var(--fx-transition), color var(--fx-transition);
}

.fx-cookie-overview-row > * {
  transition: background-color var(--fx-transition), color var(--fx-transition);
}

.fx-cookie-overview-row.is-placeholder > * {
  font-style: italic;
  color: var(--fx-text-muted);
}

.fx-cookie-overview-row.is-placeholder .fx-badge {
  margin-left: 6px;
  font-size: 0.7rem;
}

.fx-cookie-overview-row:hover > *,
.fx-cookie-overview-row:focus-within > * {
  background: rgba(26, 167, 185, 0.08);
}

.fx-cookie-overview-row.is-active > * {
  background: var(--fx-accent);
  color: var(--fx-on-primary);
}

.fx-cookie-overview-row.is-active > th {
  color: var(--fx-on-primary);
}

.fx-cookie-overview-row th {
  font-weight: 600;
}

html[data-theme="dark"] .fx-cookie-overview-row:hover > *,
html[data-theme="dark"] .fx-cookie-overview-row:focus-within > * {
  background: rgba(26, 167, 185, 0.16);
}

.fx-cookie-editor .fx-card-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-cookie-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  font-size: 0.85rem;
  color: var(--fx-text-muted);
}

.fx-cookie-categories {
  display: grid;
  gap: 16px;
}

.fx-cookie-category {
  border: 1px solid rgba(15, 42, 58, 0.1);
  border-radius: 14px;
  padding: 16px;
  background: rgba(26, 167, 185, 0.04);
}

html[data-theme="dark"] .fx-cookie-category {
  border-color: rgba(227, 243, 246, 0.12);
  background: rgba(26, 167, 185, 0.12);
}

.fx-cookie-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.fx-cookie-category-head h4 {
  margin: 0;
  font-size: 1rem;
}

.fx-cookie-category-toggle {
  margin-left: auto;
}

.fx-cookie-category-body {
  display: grid;
  gap: 12px;
}

.fx-cookie-category .fx-field textarea {
  min-height: 72px;
}

.fx-cookie-preview {
  position: relative;
}

.fx-cookie-preview-frame {
  position: relative;
  min-height: 420px;
  background: linear-gradient(135deg, rgba(0, 82, 124, 0.08), rgba(26, 167, 185, 0.12));
  border-radius: var(--fx-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.fx-consent-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(236, 245, 255, 0.85), rgba(255, 255, 255, 0.95));
  box-shadow: 0 28px 72px -36px rgba(12, 34, 48, 0.45);
  min-height: 360px;
  color: var(--fx-consent-text, #1f1f1f);
}

.fx-consent-preview--dark {
  background: linear-gradient(135deg, rgba(18, 34, 48, 0.92), rgba(10, 22, 34, 0.88));
  color: var(--fx-consent-text, #f1f7ff);
}

.fx-consent-preview--top,
.fx-consent-preview--top-left,
.fx-consent-preview--top-right {
  align-items: flex-start;
}

.fx-consent-preview--bottom,
.fx-consent-preview--bottom-left,
.fx-consent-preview--bottom-right {
  align-items: flex-end;
}

.fx-consent-preview--bottom-left,
.fx-consent-preview--top-left {
  justify-content: flex-start;
}

.fx-consent-preview--bottom-right,
.fx-consent-preview--top-right {
  justify-content: flex-end;
}



.fx-consent-preview-overlay {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(6, 18, 28, 0.45);
  pointer-events: none;
}

.fx-consent-preview-panel {
  position: relative;
  max-width: 560px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--fx-consent-background, #ffffff);
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 24px 64px -28px rgba(12, 34, 48, 0.38);
}

.fx-consent-preview--dark .fx-consent-preview-panel {
  background: rgba(16, 28, 40, 0.96);
  box-shadow: 0 32px 72px -28px rgba(0, 0, 0, 0.65);
}

.fx-consent-preview-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.fx-consent-preview-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--fx-consent-primary, #2F54EB);
  color: var(--fx-consent-button-text, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 12px 28px -18px rgba(6, 18, 28, 0.45);
}

.fx-consent-preview-hero-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-consent-preview-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.fx-consent-preview-description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.9;
}

.fx-consent-preview-summary {
  background: rgba(47, 84, 235, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
}

.fx-consent-preview-summary p {
  margin: 0;
}

.fx-consent-preview--dark .fx-consent-preview-summary {
  background: rgba(47, 84, 235, 0.2);
}

.fx-consent-preview-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 0.84rem;
}

.fx-consent-preview-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.fx-consent-preview-step-bullet {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(47, 84, 235, 0.18);
  color: var(--fx-consent-primary, #2F54EB);
  font-weight: 600;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fx-consent-preview--dark .fx-consent-preview-step-bullet {
  background: rgba(47, 84, 235, 0.32);
  color: #e5f1ff;
}

.fx-consent-preview-step-text {
  flex: 1;
  line-height: 1.4;
}

.fx-consent-preview-links {
  margin: 0;
  display: flex;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--fx-consent-primary, #2F54EB);
}

.fx-consent-preview--dark .fx-consent-preview-links {
  color: #9bbcff;
}

.fx-consent-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fx-consent-preview-button {
  border-radius: 999px;
  border: 2px solid transparent;
  padding: 10px 22px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: default;
}

.fx-consent-preview-button--primary {
  background: var(--fx-consent-primary, #2F54EB);
  color: var(--fx-consent-button-text, #ffffff);
}

.fx-consent-preview-button--ghost {
  background: transparent;
  border-color: rgba(47, 84, 235, 0.32);
  color: var(--fx-consent-primary, #2F54EB);
}

.fx-consent-preview-button--outline {
  background: rgba(47, 84, 235, 0.1);
  color: var(--fx-consent-primary, #2F54EB);
}

.fx-consent-preview--dark .fx-consent-preview-button--ghost {
  border-color: rgba(236, 245, 255, 0.32);
  color: #f0f6ff;
}

.fx-consent-preview--dark .fx-consent-preview-button--outline {
  background: rgba(47, 84, 235, 0.3);
  color: #f0f6ff;
}

.fx-consent-preview-preferences {
  background: rgba(47, 84, 235, 0.06);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fx-consent-preview--dark .fx-consent-preview-preferences {
  background: rgba(47, 84, 235, 0.22);
}

.fx-consent-preview-preferences h5 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.fx-consent-preview-pref-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.fx-consent-preview-pref-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  padding: 8px 12px;
}

.fx-consent-preview--dark .fx-consent-preview-pref-item {
  background: rgba(18, 32, 44, 0.72);
  color: #f5f9ff;
}

.fx-consent-preview-pref-label {
  font-weight: 600;
}

.fx-consent-preview-pref-state {
  color: var(--fx-consent-primary, #2F54EB);
  font-weight: 600;
}

.fx-consent-preview--dark .fx-consent-preview-pref-state {
  color: #c7d9ff;
}

.fx-consent-preview-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--fx-text-muted);
}

html[data-theme="dark"] .fx-consent-preview-note {
  color: rgba(228, 240, 255, 0.7);
}

@media (max-width: 900px) {
  .fx-consent-preview {
    padding: 24px;
  }
  .fx-consent-preview-panel {
    padding: 22px;
  }
}
.fx-cookie-snippet {
  margin-top: 24px;
}

.fx-cookie-snippet h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.fx-cookie-snippet p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--fx-text-muted);
}

.fx-snippet {
  display: grid;
  gap: 12px;
}

.fx-snippet textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 12px;
  border: 1px solid rgba(15, 42, 58, 0.15);
  padding: 12px;
  font-family: 'Fira Code', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background: rgba(255, 255, 255, 0.85);
}

html[data-theme="dark"] .fx-snippet textarea {
  background: rgba(4, 24, 33, 0.6);
  border-color: rgba(227, 243, 246, 0.18);
  color: var(--fx-text);
}

.fx-cookie-logs {
  margin-top: 32px;
}

.fx-cookie-log-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

@media (max-width: 768px) {
  .fx-cookie-log-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .fx-cookie-layout {
    gap: 16px;
  }
  .fx-cookie-overview-table {
    max-height: none;
  }
}

.fx-cookie-log-empty {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--fx-text-muted);
}


/* Cookie & Privacy Banner - redesigned */
.fx-cookie-admin {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fx-cookie-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(47, 84, 235, 0.08), rgba(26, 167, 185, 0.06));
  border: 1px solid rgba(47, 84, 235, 0.12);
  box-shadow: 0 24px 60px -40px rgba(15, 23, 42, 0.45);
}

.fx-cookie-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: 640px;
}

.fx-cookie-emoji {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 10px 18px rgba(47, 84, 235, 0.25));
}

.fx-cookie-subtitle {
  margin: 8px 0 0;
  color: var(--fx-text-muted);
  font-size: 0.95rem;
}

.fx-cookie-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fx-cookie-alert {
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.fx-cookie-fallback {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 14px;
}

.fx-cookie-preview-wrapper {
  width: 100%;
  max-width: 1280px;
  margin: 32px auto 0;
}

.fx-cookie-fallback-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fx-cookie-preview-subtitle {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fx-text-muted);
  font-size: 0.78rem;
}

.fx-cookie-fallback-header h3 {
  margin: 0;
}

.fx-cookie-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.fx-cookie-preview-body {
  display: grid;
  gap: 12px;
}

.fx-cookie-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.fx-cookie-preview-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.fx-cookie-preview-label {
  color: var(--fx-text-muted);
  font-size: 0.9rem;
  min-width: 160px;
}

.fx-cookie-preview-categories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fx-cookie-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 600;
  font-size: 0.88rem;
}

.fx-cookie-preview-snippet {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  background: #0f172a;
  color: #f8fafc;
  padding: 12px 14px;
  border-radius: 12px;
}

.fx-cookie-preview-snippet code {
  flex: 1 1 260px;
  word-break: break-all;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9rem;
}

.fx-cookie-fallback-list {
  margin: 0;
  display: grid;
  gap: 14px;
}

.fx-cookie-fallback-list > div {
  display: grid;
  gap: 6px;
}

.fx-cookie-fallback-list dt {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--fx-text-muted);
}

.fx-cookie-fallback-list dd {
  margin: 0;
  font-size: 0.95rem;
}

.fx-cookie-fallback-domain {
  font-weight: 600;
}

.fx-cookie-fallback-note {
  margin-left: 8px;
  color: var(--fx-text-muted);
}

.fx-cookie-fallback-badges,
.fx-cookie-fallback-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fx-cookie-fallback-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.06);
}

.fx-cookie-fallback-links {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 4px;
}

.fx-cookie-fallback-links a {
  color: inherit;
  text-decoration: underline;
}

.fx-cookie-fallback-categories {
  display: grid;
  gap: 10px;
}

.fx-cookie-fallback-categories ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.fx-cookie-fallback-categories h4 {
  margin: 0;
  font-size: 0.95rem;
}

.fx-cookie-fallback-category {
  list-style: none;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(47, 84, 235, 0.16);
  background: rgba(255, 255, 255, 0.8);
  display: grid;
  gap: 6px;
}

.fx-cookie-fallback-category-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-cookie-fallback-category p {
  margin: 0;
  color: var(--fx-text-muted);
  font-size: 0.9rem;
}

.fx-cookie-fallback-snippet {
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--fx-font-mono, 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace);
  font-size: 0.85rem;
  overflow-x: auto;
}

.fx-cookie-fallback-snippet code {
  color: inherit;
}

.fx-cookie-alert-info {
  background: rgba(47, 84, 235, 0.1);
  border-color: rgba(47, 84, 235, 0.2);
}

.fx-cookie-alert-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}

.fx-cookie-alert-error {
  background: rgba(211, 32, 41, 0.12);
  border-color: rgba(211, 32, 41, 0.24);
}

.fx-cookie-shell {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto 24px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "sidebar"
    "editor"
    "preview";
}

.fx-cookie-shell > * {
  width: 100%;
}

.fx-cookie-sidebar {
  grid-area: sidebar;
}

.fx-cookie-editor {
  grid-area: editor;
}

.fx-cookie-preview-wrapper {
  grid-area: preview;
  width: 100%;
}

@media (min-width: 1024px) {
  .fx-cookie-shell {
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    grid-template-areas:
      "sidebar editor"
      "preview preview";
    gap: 32px;
  }

  .fx-cookie-preview-wrapper {
    max-width: none;
    margin-top: 0;
  }
}

.fx-cookie-sidebar,
.fx-cookie-editor {
  width: 100%;
}

.fx-cookie-sidebar {
  background: var(--fx-surface, rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 48px -36px rgba(15, 23, 42, 0.55);
}

.fx-cookie-sidebar-header h3 {
  margin: 0 0 6px;
}

.fx-cookie-sidebar-header p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--fx-text-muted);
}

.fx-cookie-sidebar-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

@media (min-width: 720px) {
  .fx-cookie-sidebar-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
}

.fx-cookie-search input {
  width: 100%;
}

.fx-cookie-domain-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-cookie-domain-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.fx-cookie-domain-item:hover,
.fx-cookie-domain-item:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(47, 84, 235, 0.35);
  box-shadow: 0 10px 28px -24px rgba(15, 23, 42, 0.65);
}

.fx-cookie-domain-item.is-active {
  border-color: rgba(47, 84, 235, 0.7);
  box-shadow: 0 14px 34px -26px rgba(47, 84, 235, 0.45);
  background: linear-gradient(135deg, rgba(47, 84, 235, 0.1), rgba(26, 167, 185, 0.08));
}

.fx-cookie-domain-item.is-placeholder {
  opacity: 0.85;
}

.fx-cookie-domain-item.is-archived {
  border-style: dashed;
  opacity: 0.6;
}

.fx-cookie-domain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fx-cookie-domain-title-wrap {
  display: grid;
  gap: 4px;
}

.fx-cookie-domain-title {
  font-weight: 600;
  margin: 0;
}

.fx-cookie-domain-subtitle {
  color: var(--fx-text-muted);
  font-size: 0.9rem;
}

.fx-cookie-domain-badges {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.fx-cookie-domain-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--fx-text-muted);
  font-size: 0.88rem;
}

.fx-cookie-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fx-cookie-domain-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fx-cookie-domain-actions .fx-btn {
  flex: 1 1 140px;
  min-width: 0;
  font-size: 0.78rem;
  padding: 8px 14px;
  white-space: nowrap;
}

.fx-cookie-domain-actions .fx-btn[disabled] {
  cursor: not-allowed;
  opacity: 0.6;
}

.fx-cookie-domain-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.fx-cookie-badge-status {
  background: rgba(47, 84, 235, 0.12);
  color: #2f54eb;
}

.fx-cookie-badge-environment {
  background: rgba(26, 167, 185, 0.12);
  color: #1aa7b9;
}

.fx-cookie-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(47, 84, 235, 0.16);
  color: rgba(47, 84, 235, 0.9);
}

.fx-cookie-editor {
  background: var(--fx-surface, rgba(255, 255, 255, 0.82));
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 26px;
  padding: 30px;
  box-shadow: 0 24px 70px -50px rgba(15, 23, 42, 0.55);
  display: flex;
  flex-direction: column;
  gap: 26px;
  max-width: 940px;
  margin: 0 auto;
}

.fx-cookie-empty {
  text-align: center;
  padding: 48px 32px;
  border: 2px dashed rgba(47, 84, 235, 0.16);
  border-radius: 18px;
  color: var(--fx-text-muted);
  display: grid;
  gap: 12px;
  justify-items: center;
}

.fx-cookie-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  max-width: 860px;
  margin: 0;
}

.fx-cookie-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 50px -45px rgba(15, 23, 42, 0.55);
}

.fx-cookie-card-header {
  padding: 20px 24px 0;
}

.fx-cookie-card-header h3 {
  margin: 0 0 6px;
}

.fx-cookie-card-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--fx-text-muted);
}

.fx-cookie-collapse {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.fx-cookie-collapse-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

.fx-cookie-collapsible.is-collapsed .fx-cookie-collapse-icon {
  transform: rotate(-90deg);
}

.fx-cookie-collapsible.is-collapsed .fx-cookie-card-body {
  display: none;
}

.fx-cookie-card-body {
  padding: 18px 24px 24px;
  display: grid;
  gap: 18px;
}

.fx-cookie-card-embed .fx-cookie-card-body {
  gap: 12px;
}

.fx-cookie-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.fx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-field-wide {
  grid-column: 1 / -1;
}

.fx-field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.fx-field .fx-input,
.fx-field textarea,
.fx-field select {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
}

.fx-field textarea {
  min-height: 90px;
  resize: vertical;
}

.fx-field-toggle {
  align-items: center;
}

.fx-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
}

.fx-cookie-snippet {
  width: 100%;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(9, 17, 34, 0.35);
  background: #0f172a;
  color: #f8fafc;
  padding: 16px;
}

.fx-cookie-snippet-actions {
  margin: 8px 0 0;
  display: flex;
  justify-content: flex-start;
}

.fx-cookie-copy-cta {
  min-width: 280px;
  padding: 12px 18px;
}

.fx-cookie-hint {
  margin: 6px 0 0;
  font-size: 0.85rem;
  color: var(--fx-text-muted);
}

.fx-cookie-form-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.04);
  border-radius: 0 0 16px 16px;
}

.fx-cookie-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fx-cookie-form-actions-spacer {
  flex: 1;
}

.fx-btn-link {
  background: transparent;
  color: #1f2937;
  text-decoration: underline;
  padding-left: 0;
  padding-right: 0;
}

.fx-cookie-save {
  padding: 12px 22px;
  box-shadow: 0 10px 18px -10px rgba(47, 84, 235, 0.55);
}

.fx-cookie-category-card {
  border: 1px solid rgba(47, 84, 235, 0.14);
  border-radius: 16px;
  padding: 16px;
  background: rgba(47, 84, 235, 0.05);
  display: grid;
  gap: 14px;
}

.fx-cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fx-cookie-category-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.fx-cookie-category-actions .fx-toggle {
  font-weight: 500;
}

.fx-cookie-category-description textarea {
  min-height: 72px;
}

.fx-cookie-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 20px 40px -30px rgba(0, 0, 0, 0.4);
  z-index: 9999;
}

.fx-cookie-toast-info {
  background: #0f172a;
}

.fx-cookie-toast-error {
  background: #991b1b;
}

.fx-cookie-toast-warning {
  background: #92400e;
}

.fx-cookie-domain-item small {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--fx-text-muted);
}

.fx-cookie-empty-list {
  padding: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.16);
  border-radius: 12px;
  background: rgba(248, 250, 252, 0.8);
  display: grid;
  gap: 10px;
  justify-items: start;
}

.fx-cookie-alert + .fx-cookie-alert {
  margin-top: -8px;
}

.fx-cookie-editor .fx-btn-danger {
  background: rgba(211, 32, 41, 0.08);
  color: rgba(211, 32, 41, 0.95);
  border-color: rgba(211, 32, 41, 0.18);
}

/* Gifts manager */
.fx-gift-manager { margin-top:16px; }
.fx-gift-body { display:flex; flex-direction:column; gap:24px; }
.fx-gift-columns { display:flex; flex-wrap:wrap; gap:24px; align-items:flex-start; }
.fx-gift-list { flex:1 1 280px; max-width:320px; display:flex; flex-direction:column; gap:8px; max-height:520px; overflow:auto; padding-right:4px; }
.fx-gift-item { display:flex; flex-direction:column; align-items:flex-start; gap:4px; padding:12px 14px; border:1px solid rgba(15,23,42,0.12); border-radius:10px; background:#fff; text-align:left; cursor:pointer; transition:box-shadow .2s ease, border-color .2s ease; }
.fx-gift-item:hover { box-shadow:0 4px 12px rgba(15,23,42,0.08); border-color:rgba(23,92,255,0.4); }
.fx-gift-item.is-active { border-color:#175cff; box-shadow:0 4px 16px rgba(23,92,255,0.18); }
.fx-gift-item-title { font-weight:600; color:#0f172a; }
.fx-gift-item-meta { font-size:13px; color:#64748b; }
.fx-gift-empty { margin:0; font-size:14px; color:#64748b; }
.fx-gift-form { flex:2 1 360px; display:flex; flex-direction:column; gap:16px; }
.fx-gift-form-head h3 { margin:0 0 4px; }
.fx-gift-selected { display:flex; flex-wrap:wrap; gap:8px; align-items:center; min-height:38px; padding:8px; border:1px dashed rgba(15,23,42,0.16); border-radius:10px; background:#f8fafc; }
.fx-gift-selected-empty { margin:0; font-size:14px; color:#64748b; }
.fx-gift-selected-all { margin:0; font-size:14px; color:#1e3a8a; font-weight:600; }
.fx-gift-chip { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; background:#e0e7ff; color:#1e3a8a; font-size:13px; }
.fx-gift-chip-remove { background:none; border:0; color:inherit; font-size:14px; cursor:pointer; line-height:1; padding:0; }
.fx-gift-chip-remove:hover { opacity:0.7; }
.fx-gift-search { position:relative; margin-top:8px; }
.fx-gift-results { position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:20; display:flex; flex-direction:column; gap:4px; max-height:220px; overflow:auto; padding:8px; background:#fff; border:1px solid rgba(15,23,42,0.12); border-radius:10px; box-shadow:0 12px 24px rgba(15,23,42,0.12); }
.fx-gift-result { display:block; width:100%; text-align:left; border:0; background:#f8fafc; color:#0f172a; padding:8px 10px; border-radius:8px; cursor:pointer; font-size:14px; }
.fx-gift-result:hover { background:#e0e7ff; }
.fx-gift-result-label { display:block; font-weight:600; line-height:1.3; }
.fx-gift-result-meta { display:block; margin-top:2px; font-size:12px; color:#475569; line-height:1.3; }
.fx-gift-results.is-error { background:#fef2f2; border-color:rgba(220,38,38,0.4); box-shadow:0 12px 24px rgba(220,38,38,0.18); }
.fx-gift-result-message { margin:0; padding:8px 10px; border-radius:8px; background:#fee2e2; color:#b91c1c; font-size:13px; line-height:1.4; }
.fx-gift-actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }

/* Importazione contatti */
.fx-modal-wide { width:min(960px, 100%); }
.fx-import-steps { display:flex; flex-direction:column; gap:32px; }
.fx-import-step { display:flex; flex-direction:column; gap:20px; }
.fx-import-step-title { margin:0; font-size:20px; font-weight:600; color:#0f172a; }
.fx-import-step-text { margin:0; font-size:14px; color:#475569; }
.fx-import-step-head { display:flex; flex-wrap:wrap; gap:16px; align-items:flex-start; justify-content:space-between; }
.fx-import-summary-actions { display:flex; align-items:center; gap:8px; }
.fx-import-mode { display:flex; flex-direction:column; gap:8px; }
.fx-import-mode-option { display:flex; align-items:center; gap:8px; font-weight:600; color:#0f172a; }
.fx-import-mode-panel { padding:14px 16px; border:1px solid rgba(15,23,42,0.12); border-radius:12px; background:#f8fafc; }
.fx-import-mapping-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; }
.fx-import-field .fx-field-label { font-size:14px; font-weight:600; color:#0f172a; }
.fx-badge-required { display:inline-flex; align-items:center; justify-content:center; margin-left:6px; padding:2px 8px; font-size:11px; letter-spacing:0.04em; text-transform:uppercase; border-radius:999px; background:#fee2e2; color:#b91c1c; }
.fx-import-extra { display:flex; flex-direction:column; gap:12px; padding:16px; border:1px solid rgba(15,23,42,0.08); border-radius:12px; background:#f8fafc; }
.fx-import-extra-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.fx-import-extra-list { display:flex; flex-direction:column; gap:12px; }
.fx-import-extra-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; align-items:end; }
.fx-import-extra-row .fx-btn { align-self:center; }
.fx-import-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:16px; }
.fx-import-summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; }
.fx-import-summary-card { padding:14px 16px; border-radius:12px; background:#f8fafc; border:1px solid rgba(15,23,42,0.08); display:flex; flex-direction:column; gap:4px; align-items:flex-start; }
.fx-import-summary-card--success { background:#ecfdf5; border-color:rgba(16,185,129,0.3); }
.fx-import-summary-card--info { background:#eff6ff; border-color:rgba(37,99,235,0.28); }
.fx-import-summary-card--warning { background:#fef9c3; border-color:rgba(202,138,4,0.3); }
.fx-import-summary-card--danger { background:#fee2e2; border-color:rgba(220,38,38,0.28); }
.fx-import-summary-card--muted { background:#f8fafc; border-color:rgba(148,163,184,0.28); }
.fx-import-summary-value { font-size:20px; font-weight:700; color:#0f172a; }
.fx-import-summary-label { font-size:13px; color:#475569; }
.fx-import-placeholder { margin:0; font-size:14px; color:#64748b; }
.fx-import-table { width:100%; border-collapse:collapse; background:#fff; border-radius:12px; overflow:hidden; }
.fx-import-table th { text-align:left; font-size:13px; font-weight:600; color:#475569; background:#f8fafc; padding:10px 12px; }
.fx-import-table td { font-size:14px; color:#0f172a; padding:10px 12px; border-top:1px solid rgba(15,23,42,0.08); vertical-align:top; }
.fx-import-table--preview tbody tr:nth-child(even) { background:#f8fafc; }
.fx-import-status { font-size:14px; color:#475569; margin-right:auto; }
.fx-import-status-badge { display:inline-flex; align-items:center; justify-content:center; padding:4px 10px; border-radius:999px; font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:0.04em; }
.fx-import-status-badge--success { background:#d1fae5; color:#047857; }
.fx-import-status-badge--info { background:#dbeafe; color:#1d4ed8; }
.fx-import-status-badge--warning { background:#fef3c7; color:#b45309; }
.fx-import-status-badge--danger { background:#fee2e2; color:#b91c1c; }
.fx-import-status-badge--muted { background:#e2e8f0; color:#334155; }
.fx-import-badge { display:inline-flex; align-items:center; gap:4px; padding:2px 8px; font-size:11px; border-radius:999px; background:#e0e7ff; color:#1e3a8a; text-transform:uppercase; letter-spacing:0.04em; }
.fx-import-foot .fx-modal-actions { justify-content:flex-end; gap:12px; align-items:center; }
