/*
 * FlowForge · Layout L.An.D. (skin "glass")
 *
 * Attivo solo quando land-layout.js imposta data-skin="land-glass" sulla radice
 * (tenant L.An.D. Digital Security Consulting). Caricato dopo theme.css:
 * - fondale caldo e sfocato, superfici in vetro smerigliato con bordo luminoso;
 * - navigazione a pillole, accento antracite + giallo caldo;
 * - stili del pannello agenda con orologio impostabile e delle ripetizioni.
 * Tema chiaro e scuro restano selezionabili con il pulsante sole/luna.
 *
 * Palette "flowforge" (data-palette, impostazione tenant skinPalette): stesso
 * layout in vetro con i colori del marchio FlowForge, fondo chiaro e accento teal.
 * I colori fissi qui sotto passano da variabili --land-* il cui valore di
 * ripiego e quello originale L.An.D.: senza palette l'aspetto non cambia.
 */

:root[data-skin="land-glass"] {
  --land-yellow: #f2c94c;
  --land-yellow-ink: #3a2f0b;
  --land-charcoal: #1f1c18;
  --land-glass: rgba(238, 228, 212, 0.6);
  --land-glass-strong: rgba(240, 231, 216, 0.88);
  --land-glass-border: rgba(255, 255, 255, 0.5);
  --land-glass-blur: saturate(150%) blur(22px);
  --land-scene:
    radial-gradient(42% 38% at 80% 24%, rgba(255, 222, 160, 0.85), transparent 70%),
    radial-gradient(18% 22% at 63% 36%, rgba(236, 170, 96, 0.55), transparent 70%),
    radial-gradient(26% 40% at 9% 62%, rgba(118, 132, 80, 0.42), transparent 72%),
    radial-gradient(20% 22% at 56% 66%, rgba(96, 116, 66, 0.36), transparent 72%),
    radial-gradient(22% 30% at 93% 70%, rgba(150, 158, 92, 0.34), transparent 72%),
    radial-gradient(75% 40% at 45% 100%, rgba(190, 162, 126, 0.95), transparent 72%),
    radial-gradient(60% 30% at 20% 8%, rgba(255, 246, 228, 0.9), transparent 70%),
    linear-gradient(180deg, #ddd0bb 0%, #c8b394 52%, #b19977 100%);
}

:root[data-skin="land-glass"][data-theme="light"] {
  --bg: transparent;
  --surface: rgba(238, 228, 212, 0.6);
  --surface-strong: rgba(232, 220, 201, 0.72);
  --surface-raised: rgba(235, 224, 207, 0.66);
  --surface-selected: rgba(242, 201, 76, 0.34);
  --ink: #15120e;
  --muted: #4a4237;
  --muted-strong: #332c23;
  --line: rgba(60, 44, 24, 0.22);
  --accent: #2a251e;
  --accent-strong: #000000;
  --accent-ink-soft: #5c4a14;
  --accent-gradient: linear-gradient(135deg, #3a342b 0%, #1f1c18 100%);
  --sidebar-bg: var(--land-glass);
  --topbar-bg: rgba(238, 228, 212, 0.68);
  --pill-bg: rgba(255, 255, 255, 0.4);
  --pill-active-bg: #1f1c18;
  --pill-active-ink: #ffffff;
  --deep-0: rgba(232, 220, 201, 0.5);
  --deep-1: rgba(236, 226, 210, 0.6);
  --deep-2: rgba(234, 223, 206, 0.55);
  --glass-1: rgba(240, 231, 216, 0.9);
  --glass-2: rgba(236, 226, 210, 0.8);
  --glass-3: rgba(240, 231, 216, 0.9);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 18px 40px rgba(74, 52, 24, 0.12);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.65) inset, 0 24px 48px rgba(74, 52, 24, 0.18);
}

/* Sera: stesso ambiente, luci basse e vetro fumé. */
:root[data-skin="land-glass"][data-theme="dark"] {
  --land-glass: rgba(34, 29, 24, 0.46);
  --land-glass-strong: rgba(34, 29, 24, 0.74);
  --land-glass-border: rgba(255, 236, 200, 0.14);
  --land-scene:
    radial-gradient(40% 36% at 80% 24%, rgba(214, 150, 70, 0.55), transparent 70%),
    radial-gradient(18% 22% at 63% 36%, rgba(190, 112, 48, 0.45), transparent 70%),
    radial-gradient(26% 40% at 9% 62%, rgba(70, 82, 46, 0.5), transparent 72%),
    radial-gradient(20% 22% at 56% 66%, rgba(58, 72, 40, 0.45), transparent 72%),
    radial-gradient(75% 40% at 45% 100%, rgba(80, 62, 44, 0.9), transparent 72%),
    linear-gradient(180deg, #2b241d 0%, #1d1813 60%, #15110d 100%);
  --bg: transparent;
  --surface: rgba(34, 29, 24, 0.46);
  --surface-strong: rgba(48, 41, 34, 0.6);
  --surface-raised: rgba(56, 48, 40, 0.55);
  --surface-selected: rgba(242, 201, 76, 0.18);
  --ink: #f6efe4;
  --muted: #b9ad9b;
  --muted-strong: #d4c8b6;
  --line: rgba(255, 236, 200, 0.12);
  --accent: #f2c94c;
  --accent-strong: #ffd970;
  --accent-ink-soft: #f6d98a;
  --accent-gradient: linear-gradient(135deg, #f6d675 0%, #e0ad2c 100%);
  --sidebar-bg: var(--land-glass);
  --topbar-bg: rgba(34, 29, 24, 0.55);
  --pill-bg: rgba(255, 255, 255, 0.08);
  --pill-active-bg: #f2c94c;
  --pill-active-ink: #1f1c18;
  --deep-0: rgba(20, 16, 12, 0.4);
  --deep-1: rgba(28, 23, 18, 0.45);
  --deep-2: rgba(28, 23, 18, 0.4);
  --glass-1: rgba(34, 29, 24, 0.78);
  --glass-2: rgba(34, 29, 24, 0.66);
  --glass-3: rgba(20, 16, 12, 0.78);
  --shadow: 0 1px 0 rgba(255, 236, 200, 0.06) inset, 0 18px 44px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 1px 0 rgba(255, 236, 200, 0.08) inset, 0 24px 52px rgba(0, 0, 0, 0.5);
}

/* ---------- Fondale ---------- */
:root[data-skin="land-glass"] body {
  background: var(--land-scene);
  background-attachment: fixed;
  background-color: var(--land-body-bg, #d9c8b1);
}

:root[data-skin="land-glass"][data-theme="dark"] body {
  background-color: var(--land-body-bg, #1d1813);
}

:root[data-skin="land-glass"] .workspace {
  background: transparent;
}

/* ---------- Superfici in vetro ---------- */
:root[data-skin="land-glass"] :is(
  .sidebar,
  .topbar,
  .panel,
  .metric,
  .card,
  .dashboard-kpi,
  .custom-dashboard-card,
  .table-wrap,
  .client-hero,
  .fleet-card,
  .land-agenda
) {
  border: 1px solid var(--land-glass-border);
  background: var(--land-glass);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--land-glass-blur);
  backdrop-filter: var(--land-glass-blur);
}

:root[data-skin="land-glass"] .panel,
:root[data-skin="land-glass"] .land-agenda {
  border-radius: 22px;
}

/* Il vetro dentro il vetro resta leggero: niente doppia sfocatura. */
:root[data-skin="land-glass"] :is(.panel, .land-agenda) :is(.panel, .table-wrap, .card) {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

:root[data-skin="land-glass"][data-theme="dark"] :is(.panel, .land-agenda) :is(.panel, .table-wrap, .card) {
  background: rgba(255, 255, 255, 0.04);
}

:root[data-skin="land-glass"] .modal {
  border: 1px solid var(--land-glass-border);
  background: var(--land-glass-strong);
  -webkit-backdrop-filter: saturate(160%) blur(30px);
  backdrop-filter: saturate(160%) blur(30px);
}

:root[data-skin="land-glass"] #entry-form .modal-actions {
  background: var(--land-glass-strong);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

:root[data-skin="land-glass"] .modal::backdrop {
  background: rgba(var(--land-tint-rgb, 40, 30, 18), 0.22);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

:root[data-skin="land-glass"] :is(input, select, textarea) {
  border-color: var(--line);
  background-color: rgba(var(--land-cream-rgb, 255, 252, 246), 0.78);
  color: var(--ink);
}

:root[data-skin="land-glass"] :is(.modal label, .settings-form label, .filter-grid label) {
  color: var(--muted-strong);
}

/* Elementi che in styles.css hanno uno sfondo scuro fisso: sul vetro chiaro
   il testo scuro non si leggerebbe. */
:root[data-skin="land-glass"][data-theme="light"] :is(.client-portfolio-bubble span, .client-matrix-dot) {
  border-color: var(--line);
  background: rgba(var(--land-cream-rgb, 250, 244, 233), 0.94);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(var(--land-tint-rgb, 60, 44, 24), 0.14);
}

:root[data-skin="land-glass"][data-theme="light"] .client-matrix-dot {
  color: var(--tone-green-ink);
}

:root[data-skin="land-glass"][data-theme="light"] .contract-360-tabs {
  background: var(--land-glass-strong);
}

:root[data-skin="land-glass"][data-theme="dark"] :is(input, select, textarea) {
  background-color: rgba(0, 0, 0, 0.22);
}

/* ---------- Navigazione a pillole ---------- */
:root[data-skin="land-glass"] .nav-item {
  border-radius: 999px;
}

:root[data-skin="land-glass"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.38);
}

:root[data-skin="land-glass"][data-theme="dark"] .nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
}

:root[data-skin="land-glass"] .nav-item.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-ink);
  box-shadow: 0 8px 18px rgba(var(--land-shadow-rgb, 31, 28, 24), 0.22);
}

:root[data-skin="land-glass"] .nav-item.active .nav-icon {
  color: var(--land-yellow);
}

:root[data-skin="land-glass"][data-theme="dark"] .nav-item.active .nav-icon {
  color: var(--land-charcoal);
}

:root[data-skin="land-glass"] .brand .brand-mark {
  display: grid;
  background: var(--land-charcoal);
  color: var(--land-yellow);
  box-shadow: 0 6px 16px rgba(var(--land-shadow-rgb, 31, 28, 24), 0.28);
}

/* ---------- Pulsanti ---------- */
:root[data-skin="land-glass"] .primary-button {
  background: var(--land-charcoal);
  color: #fff;
  box-shadow: 0 8px 18px rgba(var(--land-shadow-rgb, 31, 28, 24), 0.24);
}

:root[data-skin="land-glass"] .primary-button:hover {
  background: var(--land-charcoal-hover, #000);
}

:root[data-skin="land-glass"][data-theme="dark"] .primary-button {
  background: var(--land-yellow);
  color: var(--land-charcoal);
  box-shadow: 0 8px 18px rgba(var(--land-accent-rgb, 242, 201, 76), 0.22);
}

:root[data-skin="land-glass"][data-theme="dark"] .primary-button:hover {
  background: var(--land-yellow-hover, #ffd970);
}

:root[data-skin="land-glass"] :is(.ghost-button, .mini-button) {
  border-color: var(--land-glass-border);
  background: rgba(255, 255, 255, 0.4);
}

:root[data-skin="land-glass"][data-theme="dark"] :is(.ghost-button, .mini-button) {
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Agenda: la vista standard resta sotto il pannello ---------- */
#agenda.is-land-layout .agenda-layout {
  margin-top: 18px;
}

.land-agenda {
  --land-radius: 18px;
  display: grid;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 22px;
}

.land-eyebrow {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.land-agenda-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.land-agenda-head h2 {
  margin: 6px 0 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

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

.land-ghost,
.land-cta,
.land-presets button,
.land-segmented button,
.land-minical button,
.land-minical-head button,
.land-upcoming-row,
.land-day-chip {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.land-ghost {
  white-space: nowrap;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--land-glass-border, var(--line));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  font-weight: 600;
}

.land-cta {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 20px 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--land-charcoal, #1f1c18);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(var(--land-shadow-rgb, 31, 28, 24), 0.25);
  transition: transform 180ms ease;
}

.land-cta::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--land-yellow, #f2c94c);
  color: var(--land-charcoal, #1f1c18);
  font-weight: 800;
}

.land-cta:hover {
  transform: translateY(-1px);
}

.land-agenda-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.3fr);
  gap: 28px;
}

.land-agenda-left,
.land-agenda-right {
  display: grid;
  align-content: start;
  gap: 14px;
}

/* Controllo segmentato: Giorno / Settimana / Mese / Anno */
.land-segmented {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(var(--land-tint-rgb, 120, 100, 70), 0.1);
}

.land-segmented button {
  flex: 1;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong, var(--muted));
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.land-segmented button.active {
  background: var(--pill-active-bg, #1f1c18);
  color: var(--pill-active-ink, #fff);
  box-shadow: 0 6px 14px rgba(var(--land-shadow-rgb, 31, 28, 24), 0.22);
}

.land-segmented.land-dark {
  background: var(--land-charcoal, #1f1c18);
}

.land-segmented.land-dark button {
  color: rgba(255, 255, 255, 0.7);
}

.land-segmented.land-dark button.active {
  background: var(--land-yellow, #f2c94c);
  color: var(--land-charcoal, #1f1c18);
}

.land-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.land-day-chip {
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 54px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
  transition: transform 160ms ease, background-color 160ms ease;
}

.land-day-chip strong {
  font-size: 0.95rem;
}

.land-day-chip span {
  color: var(--muted);
  font-size: 0.75rem;
}

.land-day-chip:hover {
  transform: translateY(-2px);
}

.land-day-chip.has-events {
  background: rgba(var(--land-accent-rgb, 242, 201, 76), 0.35);
}

.land-day-chip.is-today {
  border-color: var(--land-yellow, #f2c94c);
}

.land-day-chip.active {
  background: var(--land-charcoal, #1f1c18);
  color: #fff;
  box-shadow: 0 8px 18px rgba(var(--land-shadow-rgb, 31, 28, 24), 0.25);
}

.land-day-chip.active span {
  color: rgba(255, 255, 255, 0.72);
}

.land-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.land-presets button {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong, var(--muted));
  font-size: 0.82rem;
}

.land-presets button:hover {
  background: rgba(255, 255, 255, 0.45);
}

/* ---------- Orologio ---------- */
.land-clock-card {
  padding: 16px;
  border-radius: var(--land-radius, 18px);
  background: rgba(var(--land-tint-rgb, 120, 100, 70), 0.1);
}

.land-clock {
  display: flex;
  align-items: center;
  gap: 18px;
}

.land-clock-face {
  flex: 0 0 auto;
  width: 168px;
  height: 168px;
  touch-action: none;
  cursor: grab;
  border-radius: 50%;
  filter: drop-shadow(0 12px 22px rgba(var(--land-tint-rgb, 74, 52, 24), 0.18));
}

.land-clock.is-dragging .land-clock-face {
  cursor: grabbing;
}

.land-clock-face:focus-visible {
  outline: 3px solid var(--land-yellow, #f2c94c);
  outline-offset: 4px;
}

.land-clock-dial {
  fill: var(--land-dial, #fdfaf4);
  stroke: rgba(var(--land-tint-rgb, 74, 56, 32), 0.1);
  stroke-width: 1;
}

.land-clock-ticks line {
  stroke: rgba(var(--land-shadow-rgb, 31, 28, 24), 0.28);
  stroke-width: 1;
  stroke-linecap: round;
}

.land-clock-ticks line.is-major {
  stroke: var(--land-charcoal, #1f1c18);
  stroke-width: 2.4;
}

.land-clock-numbers text {
  fill: var(--land-dial-ink, #6b6255);
  font-size: 13px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
}

.land-clock-hour,
.land-clock-minute {
  stroke: var(--land-charcoal, #1f1c18);
  stroke-linecap: round;
  transition: x2 120ms ease, y2 120ms ease;
}

.land-clock-hour {
  stroke-width: 5;
}

.land-clock-minute {
  stroke-width: 3;
}

.land-clock-hour-knob {
  fill: #fff;
  stroke: var(--land-charcoal, #1f1c18);
  stroke-width: 3;
}

.land-clock-minute-knob {
  fill: var(--land-yellow, #f2c94c);
  stroke: var(--land-charcoal, #1f1c18);
  stroke-width: 2.5;
}

.land-clock-pin {
  fill: var(--land-charcoal, #1f1c18);
}

.land-clock-readout {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.land-clock-digital {
  width: 100%;
  max-width: 240px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.land-clock-digital::-webkit-calendar-picker-indicator {
  display: none;
}

.land-clock-meridiem {
  max-width: 230px;
}

.land-clock-meridiem button {
  min-height: 30px;
  font-size: 0.8rem;
}

.land-clock-hint {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Colonna destra ---------- */
.land-sentence {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
}

.land-sentence span,
.land-sentence em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: var(--land-yellow, #f2c94c);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.land-sentence span {
  color: var(--accent-ink-soft, var(--accent));
}

.land-agenda-split {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(220px, 1fr);
  gap: 20px;
}

.land-minical-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.land-minical-head strong {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.05rem;
}

.land-minical-head button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 1.2rem;
}

.land-minical-head button:hover {
  background: rgba(255, 255, 255, 0.45);
}

.land-minical-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  text-align: center;
}

.land-minical-dow {
  padding: 4px 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.land-minical-grid button {
  aspect-ratio: 1;
  min-height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background-color 160ms ease, transform 160ms ease;
}

.land-minical-grid button:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.5);
}

.land-minical-grid button.is-muted {
  color: var(--muted);
  opacity: 0.5;
}

.land-minical-grid button.has-events {
  background: rgba(var(--land-accent-rgb, 242, 201, 76), 0.5);
}

.land-minical-grid button.is-today {
  box-shadow: inset 0 0 0 2px var(--land-yellow, #f2c94c);
}

.land-minical-grid button.active {
  background: var(--land-charcoal, #1f1c18);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--land-accent-rgb, 242, 201, 76), 0.45);
}

.land-upcoming {
  display: grid;
  align-content: start;
  gap: 8px;
}

.land-upcoming-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.32);
  text-align: left;
  transition: transform 160ms ease, background-color 160ms ease;
}

button.land-upcoming-row:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.55);
}

.land-upcoming-row.is-next {
  border-color: rgba(var(--land-shadow-rgb, 31, 28, 24), 0.35);
  background: rgba(var(--land-accent-rgb, 242, 201, 76), 0.32);
}

.land-upcoming-day {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  font-weight: 800;
}

.land-upcoming-row.is-next .land-upcoming-day {
  background: var(--land-charcoal, #1f1c18);
  color: var(--land-yellow, #f2c94c);
}

.land-upcoming-body {
  display: grid;
  min-width: 0;
}

.land-upcoming-body strong,
.land-upcoming-body em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.land-upcoming-body em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.land-upcoming-time {
  color: var(--muted-strong, var(--muted));
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.land-empty {
  margin: 0;
  color: var(--muted);
}

.land-agenda-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.land-agenda-foot .land-segmented {
  min-width: 260px;
}

.land-foot-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
}

.land-foot-note strong {
  color: var(--ink);
}

/* ---------- Form evento ---------- */
.land-form-block {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.28);
}

.land-form-clock {
  display: grid;
  gap: 12px;
}

.land-form-clock > .land-segmented {
  max-width: 320px;
}

.land-form-clock > .land-segmented strong {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.land-recurrence {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.land-freq {
  flex-wrap: wrap;
  border-radius: 18px;
}

.land-recurrence-options {
  display: none;
  flex-wrap: wrap;
  gap: 16px;
}

.modal .land-inline,
.land-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.land-inline input {
  width: 72px;
}

.land-recurrence-weekly {
  display: none;
  gap: 10px;
}

.land-recurrence.is-repeating .land-recurrence-options {
  display: flex;
}

.land-recurrence.is-weekly .land-recurrence-weekly {
  display: grid;
}

.land-recurrence .land-day-chip {
  min-height: 42px;
}

.land-recurrence-dates {
  display: grid;
  gap: 6px;
}

.land-recurrence-dates .land-foot-note {
  margin-left: 0;
}

/* ---------- Serie di eventi ---------- */
.land-scope {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.land-scope .land-segmented {
  flex-wrap: wrap;
  border-radius: 18px;
}

.land-recurrence.is-locked :is(.land-freq, .land-recurrence-options, .land-recurrence-weekly) {
  opacity: 0.45;
  pointer-events: none;
}

.land-series-mark {
  color: var(--accent-ink-soft, var(--accent));
  font-weight: 800;
}

.land-scope-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 24px;
}

.land-scope-dialog h2 {
  margin: 6px 0 4px;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.4rem;
}

.land-scope-dialog p {
  margin: 0 0 16px;
}

.land-scope-options {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.land-scope-options button {
  justify-content: flex-start;
  min-height: 44px;
  border-radius: 14px;
  text-align: left;
}

.land-scope-options button.danger {
  color: var(--red);
}

/* ---------- Tema scuro ---------- */
:root[data-theme="dark"] .land-segmented,
:root[data-theme="dark"] .land-clock-card {
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] :is(.land-day-chip, .land-upcoming-row, .land-ghost, .land-form-block) {
  background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="dark"] .land-day-chip.has-events,
:root[data-theme="dark"] .land-minical-grid button.has-events {
  background: rgba(var(--land-accent-rgb, 242, 201, 76), 0.2);
}

:root[data-theme="dark"] .land-day-chip.active,
:root[data-theme="dark"] .land-minical-grid button.active {
  background: var(--land-yellow, #f2c94c);
  color: var(--land-charcoal, #1f1c18);
}

:root[data-theme="dark"] .land-day-chip.active span {
  color: rgba(var(--land-shadow-rgb, 31, 28, 24), 0.7);
}

:root[data-theme="dark"] .land-upcoming-row.is-next {
  border-color: rgba(var(--land-accent-rgb, 242, 201, 76), 0.5);
  background: rgba(var(--land-accent-rgb, 242, 201, 76), 0.14);
}

:root[data-theme="dark"] .land-upcoming-day {
  background: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .land-segmented.land-dark {
  background: rgba(0, 0, 0, 0.4);
}

:root[data-theme="dark"] .land-cta {
  background: var(--land-yellow, #f2c94c);
  color: var(--land-charcoal, #1f1c18);
}

:root[data-theme="dark"] .land-cta::before {
  background: var(--land-charcoal, #1f1c18);
  color: var(--land-yellow, #f2c94c);
}

:root[data-theme="dark"] .land-clock-dial {
  fill: var(--land-dial-dark, #2a241e);
  stroke: rgba(var(--land-glow-rgb, 255, 236, 200), 0.1);
}

:root[data-theme="dark"] .land-clock-ticks line {
  stroke: rgba(var(--land-glow-rgb, 255, 236, 200), 0.3);
}

:root[data-theme="dark"] :is(.land-clock-ticks line.is-major, .land-clock-hour, .land-clock-minute, .land-clock-hour-knob, .land-clock-minute-knob) {
  stroke: var(--land-hand-dark, #f6efe4);
}

:root[data-theme="dark"] .land-clock-hour-knob {
  fill: var(--land-dial-dark, #2a241e);
}

:root[data-theme="dark"] .land-clock-pin {
  fill: var(--land-hand-dark, #f6efe4);
}

:root[data-theme="dark"] .land-clock-numbers text {
  fill: var(--land-dial-ink-dark, #b9ad9b);
}

/* ---------- Palette FlowForge ---------- */
:root[data-skin="land-glass"][data-palette="flowforge"] {
  --land-yellow: #2fbfa8;
  --land-yellow-ink: #06352e;
  --land-yellow-hover: #5fd6c3;
  --land-charcoal: #131a16;
  --land-charcoal-hover: #0f6b5e;
  --land-accent-rgb: 47, 191, 168;
  --land-shadow-rgb: 19, 26, 22;
  --land-tint-rgb: 19, 60, 52;
  --land-cream-rgb: 255, 255, 255;
  --land-glow-rgb: 200, 240, 230;
  --land-dial: #ffffff;
  --land-dial-ink: #62706a;
  --land-dial-dark: #18211d;
  --land-hand-dark: #eef5ef;
  --land-dial-ink-dark: #9fb0a8;
}

:root[data-skin="land-glass"][data-palette="flowforge"][data-theme="light"] {
  --land-glass: rgba(255, 255, 255, 0.62);
  --land-glass-strong: rgba(255, 255, 255, 0.88);
  --land-glass-border: rgba(255, 255, 255, 0.78);
  --land-body-bg: #e9eeec;
  --land-scene:
    radial-gradient(42% 38% at 80% 22%, rgba(47, 191, 168, 0.3), transparent 70%),
    radial-gradient(20% 24% at 62% 38%, rgba(124, 214, 196, 0.32), transparent 70%),
    radial-gradient(28% 40% at 8% 64%, rgba(23, 138, 120, 0.16), transparent 72%),
    radial-gradient(22% 24% at 56% 68%, rgba(143, 196, 184, 0.24), transparent 72%),
    radial-gradient(75% 40% at 45% 100%, rgba(196, 214, 208, 0.9), transparent 72%),
    radial-gradient(60% 30% at 20% 8%, rgba(255, 255, 255, 0.95), transparent 70%),
    linear-gradient(180deg, #f4f7f6 0%, #e7eeeb 52%, #d8e3df 100%);
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(245, 248, 247, 0.76);
  --surface-raised: rgba(240, 245, 243, 0.7);
  --surface-selected: rgba(47, 191, 168, 0.18);
  --ink: #131a16;
  --muted: #55625c;
  --muted-strong: #3f4b45;
  --line: rgba(19, 26, 22, 0.12);
  --accent: #178a78;
  --accent-strong: #0f6b5e;
  --accent-ink-soft: #0f6b5e;
  --accent-gradient: linear-gradient(135deg, #2fbfa8 0%, #1f9d8a 48%, #157a6c 100%);
  --sidebar-bg: var(--land-glass);
  --topbar-bg: rgba(255, 255, 255, 0.7);
  --pill-bg: rgba(255, 255, 255, 0.5);
  --pill-active-bg: #131a16;
  --pill-active-ink: #ffffff;
  --deep-0: rgba(240, 245, 243, 0.55);
  --deep-1: rgba(246, 249, 248, 0.62);
  --deep-2: rgba(243, 247, 245, 0.58);
  --glass-1: rgba(255, 255, 255, 0.92);
  --glass-2: rgba(246, 249, 248, 0.84);
  --glass-3: rgba(255, 255, 255, 0.92);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 40px rgba(19, 60, 52, 0.1);
  --shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 24px 48px rgba(19, 60, 52, 0.16);
}

:root[data-skin="land-glass"][data-palette="flowforge"][data-theme="dark"] {
  --land-glass: rgba(20, 28, 24, 0.5);
  --land-glass-strong: rgba(20, 28, 24, 0.78);
  --land-glass-border: rgba(200, 240, 230, 0.12);
  --land-body-bg: #0c110f;
  --land-scene:
    radial-gradient(40% 36% at 80% 24%, rgba(47, 191, 168, 0.3), transparent 70%),
    radial-gradient(18% 22% at 63% 36%, rgba(31, 157, 138, 0.28), transparent 70%),
    radial-gradient(26% 40% at 9% 62%, rgba(21, 122, 108, 0.3), transparent 72%),
    radial-gradient(75% 40% at 45% 100%, rgba(26, 48, 41, 0.9), transparent 72%),
    linear-gradient(180deg, #131c18 0%, #0e1512 60%, #0a0f0d 100%);
  --surface: rgba(20, 28, 24, 0.5);
  --surface-strong: rgba(30, 41, 36, 0.62);
  --surface-raised: rgba(36, 48, 42, 0.56);
  --surface-selected: rgba(47, 191, 168, 0.18);
  --ink: #eef5ef;
  --muted: #9fb0a8;
  --muted-strong: #c3d1ca;
  --line: rgba(200, 240, 230, 0.1);
  --accent: #2fbfa8;
  --accent-strong: #5fd6c3;
  --accent-ink-soft: #8fe3d4;
  --accent-gradient: linear-gradient(135deg, #2fbfa8 0%, #1f9d8a 48%, #157a6c 100%);
  --sidebar-bg: var(--land-glass);
  --topbar-bg: rgba(20, 28, 24, 0.58);
  --pill-bg: rgba(255, 255, 255, 0.08);
  --pill-active-bg: #2fbfa8;
  --pill-active-ink: #06352e;
  --deep-0: rgba(10, 15, 13, 0.4);
  --deep-1: rgba(16, 23, 20, 0.45);
  --deep-2: rgba(16, 23, 20, 0.4);
  --glass-1: rgba(20, 28, 24, 0.8);
  --glass-2: rgba(20, 28, 24, 0.68);
  --glass-3: rgba(10, 15, 13, 0.8);
  --shadow: 0 1px 0 rgba(200, 240, 230, 0.06) inset, 0 18px 44px rgba(0, 0, 0, 0.42);
  --shadow-hover: 0 1px 0 rgba(200, 240, 230, 0.08) inset, 0 24px 52px rgba(0, 0, 0, 0.52);
}

/* Marchio e pulsanti principali nel teal FlowForge. */
:root[data-skin="land-glass"][data-palette="flowforge"] .brand .brand-mark {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 6px 16px rgba(23, 138, 120, 0.3);
}

:root[data-skin="land-glass"][data-palette="flowforge"] .primary-button {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 138, 120, 0.26);
}

:root[data-skin="land-glass"][data-palette="flowforge"] .primary-button:hover {
  background: var(--land-charcoal-hover);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .land-agenda-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .land-agenda {
    padding: 16px;
  }

  .land-agenda-split {
    grid-template-columns: 1fr;
  }

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

  .land-segmented button {
    padding: 0 8px;
    font-size: 0.82rem;
  }

  .land-foot-note {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .land-agenda *,
  .land-form-block * {
    transition: none !important;
  }
}
