/* Solstitium stable runtime visual layer */
:root {
  color-scheme: dark;
  --sol-bg: #0f1316;
  --sol-bg-alt: #14191d;
  --sol-panel: #171d21;
  --sol-panel-2: #1f262b;
  --sol-text: #f4f7f5;
  --sol-muted: rgba(244, 247, 245, .64);
  --sol-border: rgba(214, 224, 220, .13);
  --sol-accent: #2f7d7b;
  --sol-warm: #b99342;
}

html[data-theme="light"] {
  color-scheme: light;
  --sol-bg: #f6f7f4;
  --sol-bg-alt: #ecefe8;
  --sol-panel: #ffffff;
  --sol-panel-2: #f0f3ed;
  --sol-text: #17201c;
  --sol-muted: rgba(23, 32, 28, .68);
  --sol-border: rgba(35, 55, 48, .18);
  --sol-accent: #2f7d7b;
  --sol-warm: #8a6418;
}

html[data-theme] body,
html[data-theme] #app {
  background: var(--sol-bg) !important;
  color: var(--sol-text) !important;
}

html[data-theme] .site-header,
html[data-theme] .command-bar {
  background: color-mix(in srgb, var(--sol-panel) 92%, transparent) !important;
  border-color: var(--sol-border) !important;
  box-shadow: none !important;
}

html[data-theme] .brand-main,
html[data-theme] .brand-sub,
html[data-theme] .brand-datetime {
  color: var(--sol-text) !important;
  text-shadow: none !important;
  letter-spacing: 0 !important;
}

html[data-theme] .app-header,
html[data-theme] .command-bar,
html[data-theme] .view,
html[data-theme] .panel,
html[data-theme] .status-card,
html[data-theme] .kpi-card,
html[data-theme] .dashboard-card,
html[data-theme] .form-grid,
html[data-theme] .eventi-list article,
html[data-theme] .sol-events-calendar,
html[data-theme] .sol-booking-calendar-shell,
html[data-theme] .checkin-table-wrapper,
html[data-theme] .plantina-shell,
html[data-theme] .modal-content,
html[data-theme] .lux-modal,
html[data-theme] .sol-stable-checkin-cards article {
  background: var(--sol-panel) !important;
  color: var(--sol-text) !important;
  border-color: var(--sol-border) !important;
}

html[data-theme] input,
html[data-theme] select,
html[data-theme] textarea {
  background: var(--sol-panel-2) !important;
  color: var(--sol-text) !important;
  border-color: var(--sol-border) !important;
}

html[data-theme] .cmd-btn.active,
html[data-theme] .btn.primary,
html[data-theme] button.primary {
  background: var(--sol-accent) !important;
  border-color: transparent !important;
  color: #fff !important;
}

html[data-theme] .cmd-btn,
html[data-theme] .btn,
html[data-theme] .sol-action-card,
html[data-theme] .bottom-nav button {
  border-color: var(--sol-border) !important;
  box-shadow: none !important;
}

html[data-theme] p,
html[data-theme] small,
html[data-theme] .muted,
html[data-theme] .sol-muted,
html[data-theme] .panel-subtitle {
  color: var(--sol-muted) !important;
}

html[data-theme="light"] *,
html[data-theme="light"] .view,
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .status-card,
html[data-theme="light"] .checkin-table,
html[data-theme="light"] .checkin-table td,
html[data-theme="light"] .checkin-table th,
html[data-theme="light"] .sol-calendar-day,
html[data-theme="light"] .sol-events-day,
html[data-theme="light"] .sol-events-calendar-item,
html[data-theme="light"] .sol-checkin-event-card,
html[data-theme="light"] .sol-stable-checkin-cards article {
  color: var(--sol-text) !important;
  text-shadow: none !important;
}

html[data-theme="light"] .sol-events-day,
html[data-theme="light"] .sol-calendar-day,
html[data-theme="light"] .sol-calendar-cell,
html[data-theme="light"] .sol-booking-calendar-root button,
html[data-theme="light"] .sol-events-calendar button,
html[data-theme="light"] .checkin-table-wrapper,
html[data-theme="light"] .sol-stable-checkin-cards article {
  background: #fffef9 !important;
  border-color: rgba(47, 125, 123, .22) !important;
}

html[data-theme="light"] .sol-events-day small,
html[data-theme="light"] .sol-events-day strong,
html[data-theme="light"] .sol-calendar-day small,
html[data-theme="light"] .sol-calendar-day strong,
html[data-theme="light"] .sol-checkin-event-card small,
html[data-theme="light"] .sol-checkin-event-card span,
html[data-theme="light"] .sol-stable-checkin-main small,
html[data-theme="light"] .sol-stable-checkin-main span {
  color: #31423b !important;
}

html[data-theme="light"] .cmd-btn,
html[data-theme="light"] .command-bar,
html[data-theme="light"] .sol-more-nav-button {
  background: #ffffff !important;
  color: #17201c !important;
}

html[data-theme="light"] .cmd-btn.active,
html[data-theme="light"] .bottom-nav .active,
html[data-theme="light"] [aria-current="page"] {
  background: #2f7d7b !important;
  color: #ffffff !important;
}

html[data-theme="light"] .badge,
html[data-theme="light"] .sol-v35-status,
html[data-theme="light"] .sol-checkin-event-status,
html[data-theme="light"] .sol-events-status {
  color: #17201c !important;
  background: rgba(47, 125, 123, .12) !important;
  border-color: rgba(47, 125, 123, .22) !important;
}

.sol-more-nav-menu {
  pointer-events: none !important;
}

.sol37-floating-tools,
.sol37-clean-visible,
.sol-import-clean-panel,
#sol-theme-toggle,
#sol-discarded-imports {
  display: none !important;
}

#sol-stable-theme-flag {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid var(--sol-border);
  border-radius: 999px;
  background: var(--sol-panel-2);
  color: var(--sol-text);
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

#sol-stable-theme-flag [data-sol-theme-dot] {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--sol-warm);
  box-shadow: inset 0 0 0 3px var(--sol-panel-2);
}

html[data-theme="light"] #sol-stable-theme-flag [data-sol-theme-dot] {
  background: var(--sol-accent);
}

/* Light mode readability pass: final overrides against legacy gold/dark layers. */
html[data-theme="light"] {
  --sol-bg: #f4f6f2;
  --sol-bg-alt: #e7ece5;
  --sol-panel: #ffffff;
  --sol-panel-2: #f7f8f4;
  --sol-panel-3: #eef3ee;
  --sol-text: #121817;
  --sol-heading: #0c1412;
  --sol-muted: #52635c;
  --sol-soft: #6b7973;
  --sol-border: rgba(19, 42, 36, .18);
  --sol-border-strong: rgba(19, 42, 36, .32);
  --sol-accent: #176f6c;
  --sol-accent-soft: rgba(23, 111, 108, .12);
  --sol-warm: #8d6718;
  --sol-danger: #9f2f24;
  --sol-success: #206f3f;
}

html[data-theme="light"] body,
html[data-theme="light"] #app,
html[data-theme="light"] main,
html[data-theme="light"] .view,
html[data-theme="light"] .view-section {
  background: var(--sol-bg) !important;
  color: var(--sol-text) !important;
}

html[data-theme="light"] body::before,
html[data-theme="light"] body::after,
html[data-theme="light"] #app::before,
html[data-theme="light"] #app::after {
  opacity: 0 !important;
  display: none !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] h5,
html[data-theme="light"] h6,
html[data-theme="light"] strong,
html[data-theme="light"] b,
html[data-theme="light"] label,
html[data-theme="light"] th,
html[data-theme="light"] .section-title,
html[data-theme="light"] .page-title,
html[data-theme="light"] .eventi-title,
html[data-theme="light"] .lux-section-title,
html[data-theme="light"] .status-title,
html[data-theme="light"] .kpi-value,
html[data-theme="light"] .status-value {
  color: var(--sol-heading) !important;
  text-shadow: none !important;
  letter-spacing: 0 !important;
}

html[data-theme="light"] p,
html[data-theme="light"] span,
html[data-theme="light"] small,
html[data-theme="light"] td,
html[data-theme="light"] li,
html[data-theme="light"] .muted,
html[data-theme="light"] .sol-muted,
html[data-theme="light"] .status-sub,
html[data-theme="light"] .panel-subtitle,
html[data-theme="light"] .card-subtitle,
html[data-theme="light"] .eventi-card-meta,
html[data-theme="light"] .eventi-card-note {
  color: var(--sol-muted) !important;
  text-shadow: none !important;
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .header-inner,
html[data-theme="light"] .command-bar,
html[data-theme="light"] .bottom-nav,
html[data-theme="light"] .mobile-bottom-nav,
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .dashboard-card,
html[data-theme="light"] .status-card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .form-card,
html[data-theme="light"] .form-grid,
html[data-theme="light"] .sol-action-card,
html[data-theme="light"] .eventi-list article,
html[data-theme="light"] .eventi-toolbar,
html[data-theme="light"] .sol-events-calendar-panel,
html[data-theme="light"] .sol-booking-calendar-shell,
html[data-theme="light"] .sol-stable-management,
html[data-theme="light"] .sol-stable-management-head,
html[data-theme="light"] .sol-stable-management-summary article,
html[data-theme="light"] .sol-management-card,
html[data-theme="light"] .sol-plantina-operations,
html[data-theme="light"] .sol-plantina-operations-head,
html[data-theme="light"] .sol-plantina-operations-summary article,
html[data-theme="light"] .sol-plantina-op-card,
html[data-theme="light"] .sol-settings-panel,
html[data-theme="light"] .sol-settings-panel article,
html[data-theme="light"] .sol-settings-grid label,
html[data-theme="light"] .checkin-kpi-card,
html[data-theme="light"] .sol-stable-checkin-cards article,
html[data-theme="light"] #tavolo-interactive-detail,
html[data-theme="light"] #lista-attesa-panel,
html[data-theme="light"] #plantina-interactive-container {
  background: var(--sol-panel) !important;
  color: var(--sol-text) !important;
  border-color: var(--sol-border) !important;
  box-shadow: 0 1px 2px rgba(19, 42, 36, .06) !important;
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .bottom-nav,
html[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, .96) !important;
  border-color: var(--sol-border) !important;
  backdrop-filter: blur(14px);
}

html[data-theme="light"] .sol-settings-panel input,
html[data-theme="light"] .sol-settings-panel select {
  background: #ffffff !important;
  color: #141411 !important;
  border-color: #c9bd9e !important;
}

html[data-theme="light"] .sol-plantina-layout-status {
  background: #fff9e8 !important;
  color: #2d2617 !important;
  border-color: #d6c28f !important;
}

html[data-theme="light"] .brand-main,
html[data-theme="light"] .brand-sub,
html[data-theme="light"] .brand-datetime,
html[data-theme="light"] .brand-datetime span {
  color: var(--sol-heading) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .eventi-search-input,
html[data-theme="light"] .eventi-filter-select,
html[data-theme="light"] .checkin-search {
  background: #ffffff !important;
  color: var(--sol-text) !important;
  border: 1px solid var(--sol-border-strong) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #7b8982 !important;
  opacity: 1 !important;
}

html[data-theme="light"] button,
html[data-theme="light"] .btn,
html[data-theme="light"] .cmd-btn,
html[data-theme="light"] .plantina-btn,
html[data-theme="light"] .checkin-scan-btn,
html[data-theme="light"] .quick-filter-btn,
html[data-theme="light"] .timeline-nav-btn,
html[data-theme="light"] .bottom-nav button,
html[data-theme="light"] .mobile-bottom-nav button {
  background: #ffffff !important;
  color: var(--sol-text) !important;
  border-color: var(--sol-border-strong) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html[data-theme="light"] button:hover,
html[data-theme="light"] .btn:hover,
html[data-theme="light"] .cmd-btn:hover,
html[data-theme="light"] .plantina-btn:hover {
  background: var(--sol-panel-3) !important;
  color: var(--sol-heading) !important;
}

html[data-theme="light"] .active,
html[data-theme="light"] .cmd-btn.active,
html[data-theme="light"] .quick-filter-btn.active,
html[data-theme="light"] .bottom-nav .active,
html[data-theme="light"] .mobile-bottom-nav .active,
html[data-theme="light"] [aria-current="page"],
html[data-theme="light"] .btn.primary,
html[data-theme="light"] button.primary,
html[data-theme="light"] #btn-salva-layout,
html[data-theme="light"] #btn-add-tavolo,
html[data-theme="light"] #btn-filters,
html[data-theme="light"] .eventi-header .btn-eventi-primary {
  background: var(--sol-accent) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

html[data-theme="light"] .active *,
html[data-theme="light"] .cmd-btn.active *,
html[data-theme="light"] .bottom-nav .active *,
html[data-theme="light"] .mobile-bottom-nav .active *,
html[data-theme="light"] [aria-current="page"] * {
  color: #ffffff !important;
}

html[data-theme="light"] .badge,
html[data-theme="light"] .chip,
html[data-theme="light"] .sol-status-pill,
html[data-theme="light"] .prenotazione-stato,
html[data-theme="light"] .sol-events-status,
html[data-theme="light"] .sol-checkin-event-status {
  background: var(--sol-accent-soft) !important;
  color: var(--sol-accent) !important;
  border-color: rgba(23, 111, 108, .24) !important;
}

html[data-theme="light"] .ok,
html[data-theme="light"] .badge-ok,
html[data-theme="light"] .sol-management-state .ok,
html[data-theme="light"] .sol-stable-checkin-actions span.ok {
  background: rgba(32, 111, 63, .14) !important;
  color: var(--sol-success) !important;
  border-color: rgba(32, 111, 63, .28) !important;
}

html[data-theme="light"] .wait,
html[data-theme="light"] .sol-management-state .wait,
html[data-theme="light"] .sol-stable-checkin-actions span.wait {
  background: rgba(141, 103, 24, .14) !important;
  color: var(--sol-warm) !important;
  border-color: rgba(141, 103, 24, .28) !important;
}

html[data-theme="light"] .sol-stable-checkin-cards article.is-arrived {
  background: #eaf8ef !important;
  border-color: rgba(31, 122, 68, .38) !important;
  box-shadow: inset 4px 0 0 #1f7a44, 0 10px 24px rgba(20, 32, 28, .06) !important;
}

html[data-theme="light"] .sol-stable-checkin-cards article.is-late {
  background: #fff0ef !important;
  border-color: rgba(188, 54, 48, .38) !important;
  box-shadow: inset 4px 0 0 #bc3630, 0 10px 24px rgba(20, 32, 28, .06) !important;
}

html[data-theme="light"] .sol-stable-checkin-cards article.is-next {
  background: #fff8e5 !important;
  border-color: rgba(172, 126, 23, .34) !important;
  box-shadow: inset 4px 0 0 #b99342, 0 10px 24px rgba(20, 32, 28, .06) !important;
}

html[data-theme="light"] .sol-stable-checkin-time small,
html[data-theme="light"] .sol-stable-checkin-meta span {
  color: #40514c !important;
}

html[data-theme="light"] .sol-stable-checkin-main strong {
  color: #101716 !important;
}

html[data-theme="light"] .sol-stable-checkin-meta .sol-checkin-table-badge {
  border-color: rgba(138, 101, 13, .30) !important;
  background: rgba(185, 147, 66, .15) !important;
  color: #5f4306 !important;
}

html[data-theme="light"] .sol-stable-checkin-main strong b {
  background: rgba(31, 122, 68, .10) !important;
  color: #1f5f39 !important;
}

html[data-theme="light"] .sol-stable-checkin-actions span.late {
  background: rgba(188, 54, 48, .12) !important;
  color: #9f2f2a !important;
  border-color: rgba(188, 54, 48, .24) !important;
}

html[data-theme="light"] .sol-stable-checkin-actions span.next {
  background: rgba(185, 147, 66, .14) !important;
  color: #8a650d !important;
  border-color: rgba(185, 147, 66, .24) !important;
}

html[data-theme="light"] table,
html[data-theme="light"] .checkin-table,
html[data-theme="light"] .sol-v35-table {
  background: #ffffff !important;
  color: var(--sol-text) !important;
  border-color: var(--sol-border) !important;
}

html[data-theme="light"] tr,
html[data-theme="light"] td,
html[data-theme="light"] th {
  background: transparent !important;
  color: var(--sol-text) !important;
  border-color: rgba(19, 42, 36, .12) !important;
}

html[data-theme="light"] .sol-calendar-day,
html[data-theme="light"] .sol-calendar-cell,
html[data-theme="light"] .sol-events-day,
html[data-theme="light"] .sol-events-calendar-item,
html[data-theme="light"] .sol-booking-day,
html[data-theme="light"] .calendar-day {
  background: #ffffff !important;
  color: var(--sol-text) !important;
  border-color: var(--sol-border) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .sol-calendar-day.is-selected,
html[data-theme="light"] .sol-calendar-cell.active,
html[data-theme="light"] .sol-events-day.active,
html[data-theme="light"] .calendar-day.active {
  background: var(--sol-accent-soft) !important;
  color: var(--sol-heading) !important;
  border-color: var(--sol-accent) !important;
}

html[data-theme="light"] .modal-overlay-luxe,
html[data-theme="light"] .modal-overlay,
html[data-theme="light"] .sol-stable-mobile-menu {
  background: rgba(13, 20, 18, .42) !important;
}

html[data-theme="light"] .lux-modal,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .sol-plantina-assign-dialog,
html[data-theme="light"] .sol-stable-menu-sheet,
html[data-theme="light"] [id^="modal-"] > div {
  background: #ffffff !important;
  color: var(--sol-text) !important;
  border-color: var(--sol-border-strong) !important;
  box-shadow: 0 18px 50px rgba(19, 42, 36, .16) !important;
}

html[data-theme="light"] .context-menu-plantina {
  background: #ffffff !important;
  border-color: var(--sol-border-strong) !important;
  box-shadow: 0 16px 42px rgba(19, 42, 36, .18) !important;
}

html[data-theme="light"] .context-menu-plantina div {
  color: var(--sol-text) !important;
}

html[data-theme="light"] .sol-table-token {
  color: #ffffff !important;
  text-shadow: none !important;
}

html[data-theme="light"] .tavolo-elem[data-stato="arrivato"],
html[data-theme="light"] .tavolo-elem[style*="FFD700"] {
  color: #111817 !important;
}

/* v24 light mode hardening: legacy layers still inject pale gold text and low opacity. */
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] #app,
html[data-theme="light"] main,
html[data-theme="light"] section,
html[data-theme="light"] article,
html[data-theme="light"] div {
  color: #111817 !important;
  text-shadow: none !important;
}

html[data-theme="light"] .view *,
html[data-theme="light"] .site-header *,
html[data-theme="light"] .command-bar *,
html[data-theme="light"] .bottom-nav *,
html[data-theme="light"] .mobile-bottom-nav * {
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="light"] .view p,
html[data-theme="light"] .view span,
html[data-theme="light"] .view small,
html[data-theme="light"] .view td,
html[data-theme="light"] .view li,
html[data-theme="light"] .view label {
  color: #34443e !important;
}

html[data-theme="light"] .view strong,
html[data-theme="light"] .view b,
html[data-theme="light"] .view h1,
html[data-theme="light"] .view h2,
html[data-theme="light"] .view h3,
html[data-theme="light"] .view h4,
html[data-theme="light"] .view th,
html[data-theme="light"] .brand-main,
html[data-theme="light"] .brand-title strong {
  color: #0e1613 !important;
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .command-bar,
html[data-theme="light"] .container,
html[data-theme="light"] .eventi-header,
html[data-theme="light"] .eventi-toolbar,
html[data-theme="light"] .eventi-list,
html[data-theme="light"] .sol-events-calendar,
html[data-theme="light"] .sol-events-calendar-panel,
html[data-theme="light"] .sol-events-calendar-side,
html[data-theme="light"] .sol-checkin-events-card,
html[data-theme="light"] .sol-checkin-events-list,
html[data-theme="light"] .sol-booking-calendar-shell,
html[data-theme="light"] .sol-service-hero,
html[data-theme="light"] .sol-command-center,
html[data-theme="light"] .sol-stable-checkin-cards,
html[data-theme="light"] .sol-stable-management,
html[data-theme="light"] .sol-plantina-operations,
html[data-theme="light"] .sol-settings-panel {
  background: #f7f8f4 !important;
  color: #111817 !important;
}

html[data-theme="light"] .eventi-list article,
html[data-theme="light"] .lux-event-card,
html[data-theme="light"] .sol-events-calendar-item,
html[data-theme="light"] .sol-events-day,
html[data-theme="light"] .sol-calendar-day,
html[data-theme="light"] .calendar-day,
html[data-theme="light"] .sol-checkin-event-card,
html[data-theme="light"] .sol-stable-checkin-cards article,
html[data-theme="light"] .sol-management-card,
html[data-theme="light"] .sol-action-card,
html[data-theme="light"] .sol-command-next button,
html[data-theme="light"] .sol-settings-panel article {
  background: #ffffff !important;
  color: #111817 !important;
  border-color: rgba(17, 24, 23, .18) !important;
  box-shadow: 0 1px 2px rgba(17, 24, 23, .06) !important;
}

html[data-theme="light"] .eventi-card-meta,
html[data-theme="light"] .evento-agenda-meta,
html[data-theme="light"] .evento-agenda-menu,
html[data-theme="light"] .sol-events-calendar-item span,
html[data-theme="light"] .sol-events-calendar-item small,
html[data-theme="light"] .sol-checkin-event-card span,
html[data-theme="light"] .sol-checkin-event-card small {
  color: #34443e !important;
}

html[data-theme="light"] .cmd-btn.active,
html[data-theme="light"] .cmd-btn[aria-current="page"],
html[data-theme="light"] .bottom-nav .active,
html[data-theme="light"] .mobile-bottom-nav .active,
html[data-theme="light"] .btn.primary,
html[data-theme="light"] button[data-sol-print-events-selected],
html[data-theme="light"] button[data-sol-print-events-day] {
  background: #176f6c !important;
  color: #ffffff !important;
  border-color: #176f6c !important;
}

.sol-print-events-selected {
  width: 100%;
  min-height: 38px;
  margin: 8px 0 10px;
  border-radius: 8px;
  font-weight: 800;
}

.sol-events-day-operations {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
  color: var(--sol-text);
}

.sol-events-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sol-events-day-head span,
.sol-events-staff-field span {
  display: block;
  color: var(--sol-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sol-events-day-head h3 {
  margin: 2px 0 0;
  color: var(--sol-text);
  font-size: 18px;
}

.sol-events-day-head button,
.sol-events-day-actions button {
  min-height: 34px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-accent);
  color: #fff;
  font-weight: 800;
}

.sol-events-day-tools {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.sol-events-day-tools small {
  color: var(--sol-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sol-events-day-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sol-events-day-kpis article,
.sol-events-area-strip span {
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  padding: 8px;
}

.sol-events-day-kpis small {
  display: block;
  color: var(--sol-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.sol-events-day-kpis strong {
  display: block;
  color: var(--sol-text);
  font-size: 20px;
  line-height: 1.1;
}

.sol-events-area-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sol-events-area-strip span {
  color: var(--sol-muted);
  font-size: 12px;
}

.sol-events-area-strip strong {
  color: var(--sol-text);
}

.sol-events-day-list {
  display: grid;
  gap: 8px;
}

.sol-events-day-list article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) minmax(150px, .7fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  padding: 8px;
}

.sol-events-day-time {
  color: var(--sol-text);
  font-size: 16px;
  font-weight: 900;
}

.sol-events-day-main strong,
.sol-events-day-main span,
.sol-events-day-main small {
  display: block;
}

.sol-events-day-main strong {
  color: var(--sol-text);
  font-size: 14px;
}

.sol-events-day-main span,
.sol-events-day-main small {
  color: var(--sol-muted);
  font-size: 12px;
}

.sol-events-staff-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
  color: var(--sol-text);
  padding: 6px 8px;
}

.sol-events-day-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

html[data-theme="light"] .cmd-btn.active *,
html[data-theme="light"] .cmd-btn[aria-current="page"] *,
html[data-theme="light"] .bottom-nav .active *,
html[data-theme="light"] .mobile-bottom-nav .active * {
  color: #ffffff !important;
}

/* v34 operational finish: one mobile more entry, compact dashboard actions. */
#sol-stable-more-fab {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

@media (max-width: 760px) {
  #dashboard .sol-service-hero {
    min-height: auto !important;
  }

  #dashboard .sol-service-actions,
  #dashboard .sol-command-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  #dashboard .sol-service-actions > *,
  #dashboard .sol-command-actions > * {
    grid-column: auto !important;
    width: 100% !important;
    min-height: 42px !important;
  }

  #dashboard .sol-action-card {
    min-height: 62px !important;
    padding: 8px !important;
  }

  #dashboard .sol-command-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #dashboard .sol-command-kpis article:last-child {
    grid-column: 1 / -1 !important;
  }

  #dashboard .sol-command-next,
  #dashboard .sol-command-audit,
  #dashboard .sol-dashboard-lower-grid,
  #dashboard .sol-dashboard-area-panel {
    display: none !important;
  }

  .bottom-nav,
  .mobile-bottom-nav {
    min-height: 58px !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
  }

  .bottom-nav button,
  .mobile-bottom-nav button {
    min-height: 44px !important;
    padding: 5px 4px !important;
    border-radius: 8px !important;
    font-size: .62rem !important;
    line-height: 1.05 !important;
  }
}

#sol-stable-more-fab {
  display: none !important;
}

.sol-stable-menu-open {
  overflow: hidden !important;
}

.sol-stable-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, .58);
  pointer-events: auto;
}

#sol-stable-more-fab {
  position: fixed;
  right: max(10px, env(safe-area-inset-right));
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 2147483645;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--sol-border);
  background: color-mix(in srgb, var(--sol-panel) 94%, transparent);
  color: var(--sol-text);
  display: grid;
  place-items: center;
  gap: 0;
  padding: 4px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
  cursor: pointer;
}

#sol-stable-more-fab span {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

#sol-stable-more-fab small {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: var(--sol-muted);
}

@media (min-width: 760px) {
  #sol-stable-more-fab {
    display: none;
  }
}

.sol-stable-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(0, 0, 0, .72);
}

.sol-stable-qr-sheet {
  width: min(440px, 100%);
  max-height: min(92vh, 780px);
  overflow: auto;
  background: var(--sol-panel);
  color: var(--sol-text);
  border: 1px solid var(--sol-border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .46);
}

.sol-stable-qr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sol-stable-qr-head span {
  display: block;
  color: var(--sol-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.sol-stable-qr-head h2 {
  margin: 2px 0 0;
  color: var(--sol-text);
  font-size: 20px;
}

.sol-stable-qr-head button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--sol-border);
  border-radius: 10px;
  background: var(--sol-panel-2);
  color: var(--sol-text);
}

.sol-stable-qr-sheet video {
  width: 100%;
  aspect-ratio: 1;
  max-height: 360px;
  object-fit: cover;
  background: #050606;
  border: 1px solid var(--sol-border);
  border-radius: 14px;
}

.sol-qr-manual {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 12px 0;
}

.sol-qr-manual input,
.sol-qr-manual button,
.sol-qr-actions button {
  min-height: 42px;
  border-radius: 10px;
}

.sol-qr-state,
.sol-qr-booking-card {
  border: 1px solid var(--sol-border);
  border-radius: 14px;
  background: var(--sol-panel-2);
  padding: 12px;
}

.sol-qr-state {
  display: grid;
  gap: 4px;
}

.sol-qr-state.danger {
  border-color: rgba(185, 61, 46, .44);
}

.sol-qr-booking-card {
  display: grid;
  gap: 12px;
}

.sol-qr-booking-card h3 {
  margin: 6px 0 4px;
  color: var(--sol-text);
  font-size: 20px;
}

.sol-qr-booking-card p,
.sol-qr-booking-card small {
  display: block;
  margin: 3px 0;
  color: var(--sol-muted);
}

.sol-qr-booking-card span.ok,
.sol-qr-booking-card span.wait {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.sol-qr-booking-card span.ok {
  background: rgba(47, 125, 85, .18);
  color: #4fd088;
}

.sol-qr-booking-card span.wait {
  background: rgba(185, 147, 66, .18);
  color: var(--sol-warm);
}

.sol-qr-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

html[data-theme="light"] #sol-stable-more-fab,
html[data-theme="light"] .sol-stable-qr-sheet,
html[data-theme="light"] .sol-qr-state,
html[data-theme="light"] .sol-qr-booking-card {
  background: #ffffff !important;
  color: var(--sol-text) !important;
  border-color: var(--sol-border-strong) !important;
}

html[data-theme="light"] .sol-qr-booking-card span.ok {
  color: #14643b;
}

.sol-stable-mobile-menu.is-open {
  display: flex;
}

.sol-stable-menu-sheet {
  width: min(720px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--sol-panel);
  color: var(--sol-text);
  border: 1px solid var(--sol-border);
  border-radius: 18px 18px 0 0;
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  box-shadow: 0 -22px 70px rgba(0, 0, 0, .42);
  pointer-events: auto;
}

.sol-stable-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.sol-stable-menu-head strong {
  font-size: 1.05rem;
}

.sol-stable-menu-head button,
.sol-stable-menu-grid button,
.sol-stable-checkin-actions button {
  min-height: 42px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-text);
  font-weight: 800;
  cursor: pointer;
}

.sol-stable-menu-head button {
  width: 42px;
}

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

.sol-stable-menu-grid button {
  text-align: left;
  padding: 10px 12px;
}

.sol-stable-checkin-cards {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.sol-booking-slot-hint,
#edit-slot-hint {
  margin-top: 6px;
  color: var(--sol-muted);
  font-size: .86rem;
  line-height: 1.35;
}

.sol-native-slot-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.sol-booking-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(116px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.sol-booking-slot-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: #1d2528;
  color: #f7f2df;
  text-align: left;
  box-shadow: none;
}

.sol-booking-slot-chip strong {
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}

.sol-booking-slot-chip small {
  justify-self: end;
  color: rgba(247, 242, 223, .68);
  font-size: .74rem;
  font-weight: 800;
}

.sol-slot-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #7ac144;
  box-shadow: 0 0 0 4px rgba(122, 193, 68, .12);
}

.sol-booking-slot-chip.is-warn .sol-slot-dot {
  background: #f39a18;
  box-shadow: 0 0 0 4px rgba(243, 154, 24, .14);
}

.sol-booking-slot-chip.is-full {
  opacity: .74;
}

.sol-booking-slot-chip.is-full .sol-slot-dot {
  background: #d24842;
  box-shadow: 0 0 0 4px rgba(210, 72, 66, .14);
}

.sol-booking-slot-chip.is-selected {
  border-color: #2ea599;
  background: linear-gradient(135deg, rgba(46, 165, 153, .28), rgba(29, 37, 40, .98));
  box-shadow: 0 0 0 2px rgba(46, 165, 153, .18) inset;
}

.sol-settings-panel {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
  color: var(--sol-text);
}

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

.sol-settings-head span {
  color: var(--sol-muted);
  font-size: .82rem;
}

.sol-settings-head h2 {
  margin: 2px 0 0;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.sol-settings-sync {
  padding: 9px 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-muted);
  font-size: .82rem;
  font-weight: 800;
}

.sol-settings-sync[data-tone="ok"] {
  color: #33b679;
  border-color: rgba(51, 182, 121, .34);
}

.sol-settings-sync[data-tone="warn"] {
  color: var(--sol-warm);
  border-color: rgba(185, 147, 66, .36);
}

.sol-settings-head button,
.sol-settings-add-area button,
.sol-settings-danger {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--sol-accent);
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
}

.sol-settings-section,
.sol-settings-grid,
.sol-settings-add-area,
.sol-settings-areas article {
  display: grid;
  gap: 10px;
}

.sol-settings-section {
  padding: 12px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--sol-panel-2) 72%, transparent);
}

.sol-settings-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  align-items: end;
}

.sol-settings-add-area {
  grid-template-columns: 1fr minmax(90px, 140px) auto;
  grid-column: 1 / -1;
}

.sol-settings-add-block {
  grid-template-columns: minmax(150px, 180px) minmax(190px, 1fr) minmax(220px, 1.4fr) auto;
}

.sol-settings-panel label {
  display: grid;
  gap: 6px;
  color: var(--sol-muted);
  font-size: .84rem;
  font-weight: 700;
}

.sol-settings-panel input,
.sol-settings-panel select {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--sol-border);
  background: var(--sol-panel);
  color: var(--sol-text);
  padding-inline: 10px;
  font: inherit;
}

.sol-settings-areas {
  display: grid;
  gap: 8px;
}

.sol-settings-areas article {
  grid-template-columns: minmax(150px, 1fr) repeat(4, minmax(84px, 120px)) minmax(74px, auto);
  align-items: end;
  padding: 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
}

.sol-settings-area-blocks article {
  grid-template-columns: minmax(135px, 170px) minmax(180px, 1fr) minmax(220px, 1.35fr) minmax(78px, auto) auto;
}

.sol-settings-danger {
  background: rgba(207, 64, 64, .92);
}

.sol-settings-empty {
  padding: 12px;
  border: 1px dashed var(--sol-border);
  border-radius: 8px;
  color: var(--sol-muted);
  font-weight: 800;
}

.sol-settings-slots,
.sol-settings-slot-editor {
  grid-column: 1 / -1;
}

.sol-settings-slot-editor {
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--sol-panel) 64%, transparent);
  padding: 8px;
}

.sol-settings-slot-editor summary {
  cursor: pointer;
  color: var(--sol-text);
  font-size: .88rem;
  font-weight: 900;
}

.sol-settings-slot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(76px, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.sol-settings-slot-grid label {
  gap: 4px;
}

.sol-settings-slot-grid span {
  color: var(--sol-muted);
  font: 800 .74rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.sol-settings-slot-grid input {
  min-height: 34px;
  padding: 6px 8px;
}

.sol-settings-switch {
  grid-auto-flow: column;
  align-items: center;
  justify-content: start;
}

.sol-settings-switch input {
  min-height: auto;
}

.sol-stable-checkin-cards article {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
}

.sol-stable-checkin-time {
  min-width: 58px;
  font-weight: 900;
  color: var(--sol-warm);
}

.sol-stable-checkin-main,
.sol-stable-checkin-actions {
  display: grid;
  gap: 5px;
}

.sol-stable-checkin-main span,
.sol-stable-checkin-main small {
  color: var(--sol-muted);
}

.sol-stable-checkin-actions {
  justify-items: end;
}

.sol-stable-checkin-actions span {
  font-size: .82rem;
  font-weight: 900;
}

.sol-stable-checkin-actions span.ok {
  color: #33b679;
}

.sol-stable-checkin-actions span.wait {
  color: var(--sol-warm);
}

.sol-stable-checkin-cards article.is-arrived {
  background: linear-gradient(135deg, rgba(29, 132, 76, .34), rgba(18, 48, 34, .92)) !important;
  border-color: rgba(67, 190, 116, .68) !important;
  box-shadow: inset 4px 0 0 #33b679, 0 12px 28px rgba(0, 0, 0, .18) !important;
}

.sol-stable-checkin-cards article.is-late {
  background: linear-gradient(135deg, rgba(154, 34, 34, .34), rgba(44, 18, 18, .94)) !important;
  border-color: rgba(239, 82, 73, .75) !important;
  box-shadow: inset 4px 0 0 #ef5249, 0 12px 28px rgba(0, 0, 0, .20) !important;
}

.sol-stable-checkin-cards article.is-next {
  background: linear-gradient(135deg, rgba(185, 147, 66, .22), rgba(32, 30, 22, .92)) !important;
  border-color: rgba(244, 196, 91, .56) !important;
  box-shadow: inset 4px 0 0 #f4c45b !important;
}

.sol-stable-checkin-time {
  display: grid;
  gap: 4px;
}

.sol-stable-checkin-time strong {
  color: inherit;
  font-size: 1rem;
  line-height: 1;
}

.sol-stable-checkin-time small {
  color: rgba(239, 234, 226, .72);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.sol-stable-checkin-main strong {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #f7efd7;
  font-size: 1.14rem;
  line-height: 1.18;
}

.sol-stable-checkin-main strong b {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  color: #ffffff;
  font-size: .76rem;
  line-height: 1;
}

.sol-stable-checkin-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sol-stable-checkin-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: rgba(239, 234, 226, .86) !important;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.1;
}

.sol-stable-checkin-meta .sol-checkin-table-badge {
  min-height: 30px;
  padding: 5px 12px;
  border-color: rgba(244, 196, 91, .48);
  background: rgba(244, 196, 91, .14);
  color: #f7e6ad !important;
  font-size: .98rem;
  font-weight: 950;
}

.sol-stable-checkin-meta.secondary span {
  color: rgba(239, 234, 226, .66) !important;
}

.sol-stable-checkin-actions span.late {
  color: #ff8e86;
}

.sol-stable-checkin-actions span.next {
  color: #f4c45b;
}

.sol-stable-empty {
  padding: 12px;
  border: 1px dashed var(--sol-border);
  border-radius: 8px;
  color: var(--sol-muted);
}

.sol-command-center {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
  color: var(--sol-text);
  box-shadow: none;
}

.sol-command-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.sol-command-head span,
.sol-command-kpis small,
.sol-command-next-title {
  color: var(--sol-muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sol-command-head h2 {
  margin: 2px 0 0;
  color: var(--sol-text);
  font-size: 1.1rem;
  letter-spacing: 0;
}

.sol-command-head button,
.sol-command-actions button,
.sol-command-next button {
  min-height: 36px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-text);
  font-weight: 900;
  box-shadow: none;
}

.sol-command-kpis,
.sol-command-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.sol-command-kpis article {
  padding: 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
}

.sol-command-kpis strong {
  display: block;
  margin-top: 3px;
  color: var(--sol-text);
  font-size: 1.16rem;
  line-height: 1.1;
}

.sol-command-kpis article.warn {
  border-color: rgba(185, 147, 66, .4);
}

.sol-command-kpis article.busy {
  border-color: rgba(47, 125, 123, .42);
}

.sol-command-kpis article:last-child {
  grid-column: span 1;
}

.sol-command-actions button:first-child,
.sol-command-head button {
  background: var(--sol-accent);
  color: #fff;
  border-color: transparent;
}

.sol-capacity-progress {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 175, 55, .24);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
}

.sol-capacity-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sol-capacity-progress-head strong {
  color: #f5e9bd;
  font-size: .9rem;
}

.sol-capacity-progress-head span {
  color: rgba(245, 236, 216, .76);
  font-size: .84rem;
  font-weight: 800;
}

.sol-capacity-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.sol-capacity-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2fbf71;
}

.sol-capacity-progress p {
  margin: 7px 0 0;
  color: rgba(245, 236, 216, .72);
  font-size: .78rem;
}

.sol-capacity-warning {
  border-color: rgba(240, 165, 43, .44);
}

.sol-capacity-warning .sol-capacity-track span {
  background: #f0a52b;
}

.sol-capacity-critical {
  border-color: rgba(223, 59, 53, .56);
  box-shadow: 0 0 0 1px rgba(223, 59, 53, .16) inset;
}

.sol-capacity-critical .sol-capacity-track span {
  background: #df3b35;
}

.sol-capacity-notice {
  position: fixed;
  right: 18px;
  bottom: calc(var(--sol-mobile-nav-h, 76px) + 18px);
  z-index: 99995;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(460px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid rgba(240, 165, 43, .48);
  border-radius: 12px;
  background: #18160f;
  color: #f7edd0;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .34);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
}

.sol-capacity-notice.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sol-capacity-notice div {
  display: grid;
  gap: 4px;
}

.sol-capacity-notice strong {
  font-size: .92rem;
  color: #fff4c7;
}

.sol-capacity-notice span {
  color: rgba(247, 237, 208, .82);
  font-size: .84rem;
  line-height: 1.25;
}

.sol-capacity-notice button {
  min-width: 54px;
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: #2f8c87;
  color: #fff;
  font-weight: 900;
}

.sol-capacity-notice-critical {
  border-color: rgba(223, 59, 53, .64);
  background: #211110;
}

.sol-capacity-notice-critical button {
  background: #c53d38;
}

.sol-command-next {
  display: grid;
  gap: 8px;
}

.sol-command-next button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 8px 10px;
  text-align: left;
}

.sol-command-next button strong,
.sol-command-next button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sol-command-next button span {
  color: var(--sol-muted);
  font-size: .76rem;
}

.sol-command-audit {
  display: grid;
  gap: 8px;
}

.sol-command-audit button {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-text);
  text-align: left;
  font-weight: 900;
}

.sol-command-audit button span {
  color: var(--sol-muted);
  font-size: .74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sol-audit-log-panel {
  display: grid;
  gap: 10px;
}

.sol-audit-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-audit-head span {
  color: var(--sol-muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sol-audit-head h2 {
  margin: 2px 0 0;
  color: var(--sol-text);
  font-size: 1.08rem;
  letter-spacing: 0;
}

.sol-audit-head button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--sol-accent);
  color: #fff;
  padding: 7px 10px;
  font-weight: 900;
}

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

.sol-audit-list article {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-audit-list time {
  color: var(--sol-warm);
  font-size: .78rem;
  font-weight: 900;
}

.sol-audit-list div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sol-audit-list strong {
  color: var(--sol-text);
}

.sol-audit-list span {
  color: var(--sol-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sol-settings-event-zones {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.sol-settings-subhead {
  padding: 12px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-settings-subhead span {
  color: var(--sol-muted);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sol-settings-subhead h3 {
  margin: 2px 0 0;
  color: var(--sol-text);
  font-size: 1.06rem;
  letter-spacing: 0;
}

.sol-settings-zones article {
  grid-template-columns: minmax(180px, 1.1fr) minmax(90px, .45fr) minmax(90px, .45fr) minmax(90px, .35fr);
}

#plantina-interactive-container,
#plantina-canvas,
.tavolo,
.table-node,
.plantina-table,
[id^="tavolo-"] {
  touch-action: none;
}

/* Enterprise operation pass: keep primary workflows visible, demote legacy noise. */
#gestione,
#check-in,
#plantina-interattiva {
  color: var(--sol-text);
}

#gestione .section-header,
#check-in .sol-checkin-hero,
#plantina-interattiva .sol-plantina-hero {
  border: 1px solid var(--sol-border) !important;
  border-radius: 8px !important;
  background: var(--sol-panel) !important;
  box-shadow: none !important;
}

#gestione .section-header {
  padding: 14px 16px !important;
  margin: 10px 0 12px !important;
}

#gestione .section-header h1,
#check-in .page-title,
#plantina-interattiva .sol-plantina-hero h2 {
  color: var(--sol-text) !important;
  font-size: clamp(1.16rem, 2vw, 1.55rem) !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

#gestione .gestione-toolbar {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(150px, 190px) !important;
  gap: 8px !important;
  padding: 10px !important;
  margin-bottom: 10px !important;
  border: 1px solid var(--sol-border) !important;
  border-radius: 8px !important;
  background: var(--sol-panel) !important;
}

#gestione .gestione-toolbar input,
#gestione .gestione-toolbar select,
#check-in .checkin-search {
  min-height: 40px !important;
  border-radius: 8px !important;
}

#gestione .quick-filters,
#gestione .timeline-nav,
#gestione .sol-v12-actions,
#gestione .sol-v29-hero-actions {
  gap: 6px !important;
}

#gestione .quick-filter-btn,
#gestione .timeline-nav-btn,
#gestione .sol-v35-small-btn,
#gestione .sol-v35-row-btn {
  min-height: 34px !important;
  border-radius: 8px !important;
  border: 1px solid var(--sol-border) !important;
  background: var(--sol-panel-2) !important;
  color: var(--sol-text) !important;
  box-shadow: none !important;
}

#gestione .quick-filter-btn.active {
  background: var(--sol-accent) !important;
  color: #fff !important;
}

#gestione .timeline-container,
#gestione .sol-v35-week-schema,
#gestione .sol-v35-table-scroll {
  border-radius: 8px !important;
  box-shadow: none !important;
}

#gestione .sol-v35-table th,
#gestione .sol-v35-table td {
  font-size: .82rem !important;
  padding: 8px 9px !important;
}

#check-in .sol-checkin-hero {
  padding: 14px !important;
  margin-bottom: 10px !important;
}

#check-in .sol-checkin-actions {
  display: grid !important;
  grid-template-columns: minmax(150px, 190px) minmax(180px, 1fr) auto !important;
  gap: 8px !important;
  align-items: end !important;
}

#check-in .sol-checkin-date-field {
  display: grid !important;
  gap: 4px !important;
  min-width: 0 !important;
}

#check-in .sol-checkin-date-field span {
  color: var(--sol-muted) !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

#check-in .sol-checkin-date-field input {
  width: 100% !important;
  min-height: 40px !important;
  border-radius: 8px !important;
  border: 1px solid var(--sol-border) !important;
  background: rgba(0, 0, 0, .25) !important;
  color: var(--sol-text) !important;
  padding: 0 10px !important;
}

#check-in .checkin-scan-btn,
#check-in .sol-stable-checkin-actions button,
#plantina-interattiva .plantina-btn {
  border-radius: 8px !important;
  box-shadow: none !important;
}

#check-in .checkin-kpi-card {
  border-radius: 8px !important;
  background: var(--sol-panel) !important;
  border: 1px solid var(--sol-border) !important;
  box-shadow: none !important;
}

#check-in .sol-checkin-list-head {
  margin: 12px 0 8px !important;
}

#plantina-interattiva .sol-plantina-hero {
  padding: 14px !important;
  margin-bottom: 10px !important;
}

#plantina-interattiva .sol-plantina-hero p {
  margin-top: 4px !important;
}

#plantina-interattiva .sol-plantina-layout {
  gap: 10px !important;
}

#plantina-interactive-container {
  border: 1px solid var(--sol-border) !important;
  border-radius: 8px !important;
  background: var(--sol-panel) !important;
  box-shadow: none !important;
}

#plantina-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px !important;
  padding: 7px !important;
  background: color-mix(in srgb, var(--sol-panel) 94%, transparent) !important;
  border-bottom: 1px solid var(--sol-border) !important;
}

#plantina-toolbar .plantina-btn {
  min-height: 34px !important;
  padding: 6px 9px !important;
  border: 1px solid var(--sol-border) !important;
  background: var(--sol-panel-2) !important;
  color: var(--sol-text) !important;
  font-size: .78rem !important;
}

#btn-salva-layout,
#btn-add-tavolo,
#btn-filters {
  background: var(--sol-accent) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.sol-stable-management {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.sol-stable-management-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-stable-management-head span,
.sol-stable-management-head label,
.sol-stable-management-summary small,
.sol-management-main span,
.sol-management-main small {
  color: var(--sol-muted);
}

.sol-stable-management-head h2 {
  margin: 2px 0 0;
  color: var(--sol-text);
  font-size: 1.08rem;
  letter-spacing: 0;
}

.sol-stable-management-head label {
  display: grid;
  gap: 5px;
  font-size: .78rem;
  font-weight: 800;
}

.sol-stable-management-head input {
  min-height: 38px;
  border-radius: 8px;
}

.sol-stable-management-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sol-stable-management-summary article {
  padding: 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-stable-management-summary small {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sol-stable-management-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--sol-text);
  font-size: 1.2rem;
  line-height: 1;
}

.sol-stable-management-list {
  display: grid;
  gap: 8px;
}

.sol-management-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-management-card.is-arrived {
  border-color: rgba(51, 182, 121, .34);
}

.sol-management-time {
  color: var(--sol-warm);
  font-size: 1.05rem;
  font-weight: 900;
}

.sol-management-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sol-management-main strong {
  color: var(--sol-text);
}

.sol-management-main span,
.sol-management-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sol-management-state span {
  display: inline-flex;
  min-width: 84px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
}

.sol-management-state .ok {
  color: #102018;
  background: #33b679;
}

.sol-management-state .wait {
  color: var(--sol-text);
  background: rgba(185, 147, 66, .18);
  border: 1px solid rgba(185, 147, 66, .28);
}

.sol-management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.sol-management-actions button {
  min-height: 34px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-text);
  padding: 6px 9px;
  font-weight: 900;
}

.sol-management-actions button:first-child {
  background: var(--sol-accent);
  border-color: transparent;
  color: #fff;
}

.sol-management-actions button:disabled {
  opacity: .45;
}

.sol-plantina-operations {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
}

.sol-plantina-operations-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-plantina-head-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.sol-plantina-operations-head span,
.sol-plantina-operations-head label,
.sol-plantina-operations-summary small,
.sol-plantina-op-main span,
.sol-plantina-op-main small {
  color: var(--sol-muted);
}

.sol-plantina-operations-head h3 {
  margin: 2px 0 0;
  color: var(--sol-text);
  font-size: 1.08rem;
  letter-spacing: 0;
}

.sol-plantina-operations-head label {
  display: grid;
  gap: 5px;
  font-size: .78rem;
  font-weight: 800;
}

.sol-plantina-head-controls button {
  min-height: 38px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-text);
  padding: 7px 10px;
  font-weight: 900;
  box-shadow: none;
}

.sol-plantina-head-controls button[data-sol-plantina-save-now],
.sol-plantina-head-controls button[data-sol-plantina-create-day],
.sol-plantina-head-controls button[data-sol-toggle-layout-mode] {
  background: var(--sol-accent);
  color: #fff;
  border-color: transparent;
}

.sol-plantina-head-controls button[data-sol-plantina-create-day] {
  background: color-mix(in srgb, var(--sol-accent) 86%, #ffffff 14%);
}

#plantina-board .tavolo-elem[data-auto-preview="1"] {
  outline: 3px dashed rgba(255, 255, 255, .78) !important;
  outline-offset: 2px !important;
}

#plantina-board .tavolo-elem[data-item-type="event"] {
  outline: 3px solid rgba(125, 211, 252, .82) !important;
  outline-offset: 2px !important;
  box-shadow: 0 12px 28px rgba(14, 116, 144, .36), inset 0 1px 0 rgba(255,255,255,.4) !important;
}

.sol-plantina-head-controls button[aria-pressed="true"] {
  background: var(--sol-warm);
  color: #111;
}

.sol-plantina-layout-status {
  padding: 9px 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-muted);
  font-size: .82rem;
  font-weight: 800;
}

.sol-plantina-layout-status[data-state="editing"],
.sol-plantina-layout-status[data-state="syncing"] {
  border-color: rgba(185, 147, 66, .42);
  color: var(--sol-warm);
}

.sol-plantina-layout-status[data-state="saved"] {
  border-color: rgba(51, 182, 121, .34);
  color: #33b679;
}

.sol-plantina-layout-status[data-state="local-only"] {
  border-color: rgba(185, 147, 66, .42);
}

.sol-plantina-operations-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.sol-plantina-operations-summary article {
  padding: 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-plantina-operations-summary article.warn {
  border-color: rgba(185, 147, 66, .42);
}

.sol-plantina-operations-summary small {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sol-plantina-operations-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--sol-text);
  font-size: 1.2rem;
  line-height: 1;
}

.sol-plantina-operations-list {
  display: grid;
  gap: 8px;
}

.sol-plantina-op-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel);
}

.sol-plantina-op-card.unassigned {
  border-color: rgba(185, 147, 66, .42);
}

.sol-plantina-op-table {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-warm);
  font-weight: 900;
}

.sol-plantina-op-card.assigned .sol-plantina-op-table {
  color: #fff;
  background: var(--sol-accent);
}

.sol-plantina-op-card.event {
  border-color: rgba(56, 189, 248, .46);
  background: color-mix(in srgb, var(--sol-panel) 84%, #0ea5e9 16%);
}

.sol-plantina-op-card.event .sol-plantina-op-table {
  color: #fff;
  background: #0ea5e9;
}

.sol-plantina-op-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sol-plantina-op-main strong {
  color: var(--sol-text);
}

.sol-plantina-op-main span,
.sol-plantina-op-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sol-plantina-op-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.sol-plantina-op-actions button {
  min-height: 34px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: var(--sol-panel-2);
  color: var(--sol-text);
  padding: 6px 9px;
  font-weight: 900;
}

.sol-plantina-op-actions button:nth-child(2) {
  background: var(--sol-accent);
  border-color: transparent;
  color: #fff;
}

.sol-plantina-op-actions button:disabled {
  opacity: .45;
}

@media (max-width: 760px) {
  #dashboard .container {
    padding-inline: 10px !important;
  }

  #dashboard .sol-service-hero {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }

  #dashboard .sol-service-copy h2,
  #dashboard .section-title,
  #dashboard .page-title {
    font-size: 1.15rem !important;
    line-height: 1.15 !important;
    margin-bottom: 4px !important;
  }

  #dashboard .sol-service-copy p {
    font-size: .72rem !important;
  }

  #dashboard .sol-service-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .sol-command-center {
    padding: 8px;
    margin: 8px 0;
    gap: 8px;
  }

  .sol-command-head,
  .sol-command-kpis,
  .sol-command-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sol-command-head > div {
    grid-column: 1 / -1;
  }

  .sol-command-head button,
  .sol-command-actions button {
    min-height: 36px;
    padding-inline: 6px;
    font-size: .72rem;
    line-height: 1.12;
  }

  .sol-command-next button {
    min-height: 40px;
    padding: 7px 8px;
  }

  .sol-command-kpis article {
    min-height: 58px;
    padding: 8px;
  }

  .sol-command-kpis strong {
    font-size: 1rem;
  }

  .sol-command-kpis article:last-child {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .sol-command-actions button:last-child {
    grid-column: 1 / -1;
  }

  .sol-audit-head {
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sol-audit-list article {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #dashboard .sol-action-card {
    min-height: 74px !important;
    padding: 9px !important;
    border-radius: 8px !important;
    align-content: start !important;
  }

  #dashboard .sol-action-card span {
    width: 24px !important;
    height: 24px !important;
    font-size: .92rem !important;
  }

  #dashboard .sol-action-card strong {
    font-size: .74rem !important;
    line-height: 1.15 !important;
  }

  #dashboard .sol-action-card small {
    font-size: .62rem !important;
    line-height: 1.2 !important;
  }

  #dashboard .sol-service-strip,
  #dashboard .status-grid,
  #dashboard .kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #dashboard .sol-strip-card,
  #dashboard .status-card,
  #dashboard .kpi-card {
    min-height: 72px !important;
    padding: 9px !important;
    border-radius: 8px !important;
  }

  #dashboard .status-wide,
  #dashboard .sol-v22-dashboard-grid,
  #dashboard .panel-grid {
    grid-column: 1 / -1 !important;
  }

  #dashboard .status-value,
  #dashboard .kpi-value,
  #dashboard .sol-strip-card strong {
    font-size: 1.45rem !important;
    line-height: 1 !important;
  }

  #dashboard .sol-v22-dashboard-grid {
    display: none !important;
  }

  #gestione {
    padding: 0 10px 92px !important;
  }

  #gestione .section-header {
    padding: 10px 12px !important;
  }

  #gestione .section-header h1 {
    font-size: 1.05rem !important;
  }

  #gestione .gestione-toolbar {
    grid-template-columns: 1fr !important;
    padding: 8px !important;
  }

  #gestione .quick-filters {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #gestione .quick-filter-btn,
  #gestione .timeline-nav-btn {
    padding: 7px 6px !important;
    font-size: .72rem !important;
  }

  #gestione .timeline-container {
    display: none !important;
  }

  #gestione .sol-v35-week-schema {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #gestione .sol-v35-table {
    min-width: 680px !important;
  }

  #gestione-list {
    display: none !important;
  }

  .sol-stable-management-head {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sol-stable-management-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sol-management-card {
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: start;
  }

  .sol-management-state,
  .sol-management-actions {
    grid-column: 1 / -1;
  }

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

  .sol-management-actions button {
    width: 100%;
    padding-inline: 4px;
    font-size: .72rem;
  }

  #check-in .sol-checkin-hero {
    padding: 10px !important;
  }

  #check-in .sol-checkin-actions {
    grid-template-columns: 1fr !important;
  }

  #check-in .sol-checkin-date-field input {
    min-height: 38px !important;
  }

  #check-in .sol-checkin-kpi-row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #check-in .checkin-kpi-card {
    min-height: 68px !important;
    padding: 9px !important;
  }

  #check-in .kpi-number {
    font-size: 1.55rem !important;
  }

  #check-in .sol-checkin-list-head span {
    display: none !important;
  }

  #check-in #list-today-bookings {
    display: none !important;
  }

  #check-in .sol-checkin-events-panel {
    margin-top: 10px !important;
  }

  #plantina-interattiva {
    padding-bottom: 92px !important;
  }

  #plantina-interattiva .sol-plantina-hero {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
  }

  #plantina-interattiva .sol-plantina-hero p,
  #plantina-interattiva .sol-plantina-quick-note span {
    display: none !important;
  }

  .sol-plantina-operations-head {
    display: grid;
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .sol-plantina-head-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .sol-plantina-head-controls label {
    grid-column: 1 / -1;
  }

  .sol-plantina-head-controls button {
    min-height: 36px;
    padding-inline: 6px;
    font-size: .72rem;
  }

  .sol-plantina-operations-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sol-plantina-op-card {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
  }

  .sol-plantina-op-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sol-plantina-op-actions button {
    width: 100%;
    padding-inline: 4px;
    font-size: .72rem;
  }

  #plantina-toolbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #plantina-toolbar .plantina-btn {
    min-height: 36px !important;
    font-size: .68rem !important;
    padding: 6px 4px !important;
  }

  #btn-print-plantina,
  #btn-history,
  #btn-reset-plantina,
  #btn-carica-layout,
  #btn-esporta-csv,
  #btn-esporta-json,
  #btn-legend {
    display: none !important;
  }

  #plantina-interactive-container {
    height: min(560px, calc(100dvh - 190px)) !important;
  }

  body.sol-plantina-layout-mode #plantina-interactive-container {
    display: block !important;
    width: 100% !important;
    min-height: min(560px, calc(100dvh - 190px)) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  body.sol-plantina-layout-mode #plantina-interattiva .sol-plantina-layout {
    display: block !important;
  }

  body.sol-plantina-layout-mode #plantina-interattiva .sol-plantina-layout > div:last-child {
    display: block !important;
  }

  body.sol-plantina-layout-mode .sol-mobile-plantina,
  body.sol-plantina-layout-mode .sol-plantina-operations-list {
    display: none !important;
  }

  body.sol-plantina-layout-mode #plantina-board {
    min-width: 920px !important;
    touch-action: none !important;
  }

  body.sol-plantina-layout-mode .tavolo-elem {
    touch-action: none !important;
    cursor: grab !important;
  }

  .sol-stable-checkin-cards article {
    grid-template-columns: 1fr;
  }

  .sol-stable-checkin-actions {
    justify-items: stretch;
  }

  .sol-settings-grid,
  .sol-settings-add-area,
  .sol-settings-areas article,
  .sol-settings-zones article {
    grid-template-columns: 1fr;
  }

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

  .sol-events-day-operations {
    padding: 10px;
  }

  .sol-events-day-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sol-events-day-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sol-events-day-list article {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .sol-events-staff-field,
  .sol-events-day-actions {
    grid-column: 1 / -1;
  }

  .sol-events-day-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* v30 final light-mode readability guard. Keep this at the end of the file. */
html[data-theme="light"],
html[data-theme="light"] body,
html[data-theme="light"] #app {
  background: #f5f7f3 !important;
  color: #111817 !important;
}

html[data-theme="light"] .site-header,
html[data-theme="light"] .command-bar,
html[data-theme="light"] .bottom-nav,
html[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255, 255, 255, .98) !important;
  border-color: rgba(17, 24, 23, .16) !important;
  box-shadow: 0 1px 8px rgba(17, 24, 23, .08) !important;
}

html[data-theme="light"] .view,
html[data-theme="light"] .view-section,
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .dashboard-card,
html[data-theme="light"] .status-card,
html[data-theme="light"] .kpi-card,
html[data-theme="light"] .form-card,
html[data-theme="light"] .form-grid,
html[data-theme="light"] .eventi-list,
html[data-theme="light"] .eventi-list article,
html[data-theme="light"] .sol-events-calendar,
html[data-theme="light"] .sol-events-calendar-panel,
html[data-theme="light"] .sol-events-calendar-side,
html[data-theme="light"] .sol-events-calendar-item,
html[data-theme="light"] .sol-events-day,
html[data-theme="light"] .sol-booking-calendar-shell,
html[data-theme="light"] .sol-calendar-day,
html[data-theme="light"] .sol-calendar-cell,
html[data-theme="light"] .calendar-day,
html[data-theme="light"] .checkin-table-wrapper,
html[data-theme="light"] .checkin-table,
html[data-theme="light"] .sol-stable-management,
html[data-theme="light"] .sol-management-card,
html[data-theme="light"] .sol-plantina-operations,
html[data-theme="light"] .sol-plantina-op-card,
html[data-theme="light"] .sol-settings-panel,
html[data-theme="light"] .sol-settings-section,
html[data-theme="light"] .sol-settings-areas article,
html[data-theme="light"] .sol-settings-zones article,
html[data-theme="light"] .sol-stable-checkin-cards article,
html[data-theme="light"] .modal-content,
html[data-theme="light"] .lux-modal,
html[data-theme="light"] .sol-stable-qr-sheet,
html[data-theme="light"] .sol-qr-booking-card {
  background: #ffffff !important;
  color: #111817 !important;
  border-color: rgba(17, 24, 23, .16) !important;
  box-shadow: 0 1px 3px rgba(17, 24, 23, .07) !important;
  text-shadow: none !important;
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] h4,
html[data-theme="light"] strong,
html[data-theme="light"] b,
html[data-theme="light"] label,
html[data-theme="light"] th,
html[data-theme="light"] .brand-main,
html[data-theme="light"] .page-title,
html[data-theme="light"] .section-title,
html[data-theme="light"] .panel-title,
html[data-theme="light"] .kpi-value,
html[data-theme="light"] .status-value {
  color: #0d1412 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="light"] p,
html[data-theme="light"] span,
html[data-theme="light"] small,
html[data-theme="light"] td,
html[data-theme="light"] li,
html[data-theme="light"] .muted,
html[data-theme="light"] .sol-muted,
html[data-theme="light"] .panel-subtitle,
html[data-theme="light"] .card-subtitle,
html[data-theme="light"] .eventi-card-meta,
html[data-theme="light"] .eventi-card-note {
  color: #35453f !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff !important;
  color: #111817 !important;
  border-color: rgba(17, 24, 23, .24) !important;
  box-shadow: none !important;
}

html[data-theme="light"] button,
html[data-theme="light"] .btn,
html[data-theme="light"] .cmd-btn,
html[data-theme="light"] .plantina-btn,
html[data-theme="light"] .bottom-nav button,
html[data-theme="light"] .mobile-bottom-nav button {
  background: #ffffff !important;
  color: #111817 !important;
  border-color: rgba(17, 24, 23, .2) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .cmd-btn.active,
html[data-theme="light"] .cmd-btn[aria-current="page"],
html[data-theme="light"] .bottom-nav .active,
html[data-theme="light"] .mobile-bottom-nav .active,
html[data-theme="light"] .btn.primary,
html[data-theme="light"] button.primary,
html[data-theme="light"] button[data-sol-print-events-selected],
html[data-theme="light"] button[data-sol-print-events-day],
html[data-theme="light"] #btn-salva-layout,
html[data-theme="light"] #btn-add-tavolo {
  background: #176f6c !important;
  color: #ffffff !important;
  border-color: #176f6c !important;
}

html[data-theme="light"] .cmd-btn.active *,
html[data-theme="light"] .bottom-nav .active *,
html[data-theme="light"] .mobile-bottom-nav .active * {
  color: #ffffff !important;
}

/* v35 light-mode dashboard polish: neutral, readable, no teal side bands. */
html[data-theme="light"] {
  --sol-bg: #f3f5f1;
  --sol-panel: #ffffff;
  --sol-panel-2: #f7f8f5;
  --sol-text: #101716;
  --sol-muted: #53645d;
  --sol-border: rgba(18, 30, 27, .18);
  --sol-accent: #176f6c;
}

html[data-theme="light"] main,
html[data-theme="light"] #dashboard,
html[data-theme="light"] #dashboard .container {
  background: #f3f5f1 !important;
  color: #101716 !important;
  border-left: 0 !important;
  border-right: 0 !important;
  box-shadow: none !important;
}

html[data-theme="light"] #dashboard .container::before,
html[data-theme="light"] #dashboard .container::after,
html[data-theme="light"] #dashboard::before,
html[data-theme="light"] #dashboard::after {
  display: none !important;
  content: none !important;
}

html[data-theme="light"] #dashboard .sol-service-hero {
  background:
    linear-gradient(135deg, rgba(52, 46, 29, .88), rgba(17, 18, 16, .96) 62%),
    radial-gradient(circle at 84% 10%, rgba(176, 140, 55, .16), transparent 34%) !important;
  border-color: rgba(72, 56, 24, .32) !important;
  box-shadow: 0 10px 28px rgba(31, 34, 29, .18) !important;
}

html[data-theme="light"] #dashboard .sol-service-hero h2,
html[data-theme="light"] #dashboard .sol-service-hero strong,
html[data-theme="light"] #dashboard .sol-service-hero .sol-action-card strong {
  color: #fff1bd !important;
}

html[data-theme="light"] #dashboard .sol-service-hero p,
html[data-theme="light"] #dashboard .sol-service-hero small,
html[data-theme="light"] #dashboard .sol-service-hero span,
html[data-theme="light"] #dashboard .sol-service-hero .sol-action-card small {
  color: rgba(255, 241, 189, .74) !important;
}

html[data-theme="light"] #dashboard .sol-action-card {
  background: rgba(13, 14, 12, .9) !important;
  border-color: rgba(212, 175, 55, .28) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .sol-command-center {
  background: #ffffff !important;
  border: 1px solid rgba(18, 30, 27, .16) !important;
  box-shadow: 0 2px 10px rgba(20, 28, 24, .06) !important;
}

html[data-theme="light"] .sol-command-head h2,
html[data-theme="light"] .sol-command-kpis strong,
html[data-theme="light"] .sol-command-next button strong,
html[data-theme="light"] .sol-command-audit button strong {
  color: #101716 !important;
}

html[data-theme="light"] .sol-command-head span,
html[data-theme="light"] .sol-command-kpis small,
html[data-theme="light"] .sol-command-next-title,
html[data-theme="light"] .sol-command-next button span,
html[data-theme="light"] .sol-command-audit button span {
  color: #53645d !important;
}

html[data-theme="light"] .sol-command-kpis article,
html[data-theme="light"] .sol-command-next button,
html[data-theme="light"] .sol-command-audit button {
  background: #f9faf7 !important;
  color: #101716 !important;
  border-color: rgba(18, 30, 27, .18) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .sol-command-kpis article.warn,
html[data-theme="light"] .sol-command-kpis article.busy {
  background: #fffaf0 !important;
  border-color: rgba(174, 128, 32, .34) !important;
}

html[data-theme="light"] .sol-command-head button,
html[data-theme="light"] .sol-command-actions button,
html[data-theme="light"] #dashboard .sol-command-actions button {
  background: #ffffff !important;
  color: #101716 !important;
  border: 1px solid rgba(18, 30, 27, .2) !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

html[data-theme="light"] .sol-command-head button,
html[data-theme="light"] .sol-command-actions button:first-child {
  background: #176f6c !important;
  color: #ffffff !important;
  border-color: #176f6c !important;
}

html[data-theme="light"] .sol-command-head button *,
html[data-theme="light"] .sol-command-actions button:first-child * {
  color: #ffffff !important;
}

html[data-theme="light"] .sol-command-actions button:not(:first-child) *,
html[data-theme="light"] .sol-command-actions button:not(:first-child) {
  color: #101716 !important;
}

html[data-theme="light"] .sol-capacity-progress {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
  box-shadow: none !important;
}

html[data-theme="light"] .sol-capacity-progress-head strong {
  color: #101716 !important;
}

html[data-theme="light"] .sol-capacity-progress-head span,
html[data-theme="light"] .sol-capacity-progress p {
  color: #4d5d58 !important;
}

html[data-theme="light"] .sol-capacity-track {
  background: #e8eeeb !important;
}

html[data-theme="light"] .sol-capacity-warning {
  background: #fff8e8 !important;
  border-color: rgba(184, 132, 19, .34) !important;
}

html[data-theme="light"] .sol-capacity-critical {
  background: #fff1f0 !important;
  border-color: rgba(190, 46, 42, .38) !important;
}

html[data-theme="light"] .sol-capacity-notice {
  background: #fffaf0 !important;
  color: #17130b !important;
  border-color: rgba(184, 132, 19, .38) !important;
  box-shadow: 0 18px 46px rgba(25, 30, 28, .18) !important;
}

html[data-theme="light"] .sol-capacity-notice strong {
  color: #17130b !important;
}

html[data-theme="light"] .sol-capacity-notice span {
  color: #5f4b12 !important;
}

html[data-theme="light"] .sol-capacity-notice-critical {
  background: #fff1f0 !important;
  border-color: rgba(190, 46, 42, .38) !important;
}

html[data-theme="light"] .sol-capacity-notice-critical span {
  color: #752421 !important;
}

/* v36 legacy visual cleanup: keep one operational surface per page. */
#dashboard .sol-service-strip,
#dashboard .sol-v22-dashboard-grid,
#dashboard .status-grid,
#dashboard .kpi-grid,
#dashboard .panel-grid,
#dashboard .sol-dashboard-lower-grid,
#dashboard .sol-command-audit,
#dashboard .sol-v34-datebar,
#dashboard .sol-v34-data-note,
#dashboard .sol-v35-datebar,
#dashboard .sol-v35-data-note {
  display: none !important;
}

#dashboard .sol-command-center {
  margin-top: 12px !important;
}

#dashboard .sol-command-next {
  margin-top: 2px !important;
}

#eventi #lista-eventi,
#eventi .eventi-mesi-title,
#eventi #eventi-per-mese {
  display: none !important;
}

#eventi .sol-events-calendar-panel {
  margin-bottom: 12px !important;
}

/* v37 enterprise cleanup: dashboard compatta, niente doppioni legacy visibili. */
#dashboard .sol-service-actions {
  display: none !important;
}

#dashboard .sol-service-hero {
  min-height: 0 !important;
  padding: 18px 22px !important;
  margin-bottom: 12px !important;
}

#dashboard .sol-service-copy h2 {
  font-size: clamp(1.35rem, 2.4vw, 2rem) !important;
  line-height: 1.05 !important;
  margin-bottom: 4px !important;
}

#dashboard .sol-service-copy p {
  margin: 0 !important;
}

#dashboard #sol-command-center {
  display: block !important;
}

#dashboard #sol-command-center .sol-command-actions {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

#dashboard .sol-command-head,
#dashboard .sol-command-kpis,
#dashboard .sol-command-actions,
#dashboard .sol-command-next,
#dashboard .sol-command-events,
#dashboard .sol-command-areas {
  max-width: 100% !important;
}

#dashboard .sol-command-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

#dashboard .sol-command-sections {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

#dashboard .sol-command-events,
#dashboard .sol-command-areas {
  display: grid !important;
  gap: 8px !important;
}

#dashboard .sol-command-events button {
  width: 100% !important;
  min-height: 52px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(212, 175, 55, .24) !important;
  background: rgba(255, 255, 255, .05) !important;
  color: inherit !important;
  text-align: left !important;
  padding: 9px 10px !important;
}

#dashboard .sol-command-events button strong,
#dashboard .sol-command-events button span {
  display: block !important;
}

#dashboard .sol-command-events button span {
  margin-top: 3px !important;
  font-size: .78rem !important;
  color: rgba(246, 238, 212, .72) !important;
}

#dashboard .sol-command-areas {
  margin-top: 12px !important;
}

#dashboard .sol-command-area-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 8px !important;
}

#dashboard .sol-command-area-grid article {
  min-height: 76px !important;
  padding: 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(212, 175, 55, .22) !important;
  background: rgba(255, 255, 255, .045) !important;
}

#dashboard .sol-command-area-grid strong,
#dashboard .sol-command-area-grid span,
#dashboard .sol-command-area-grid b {
  display: block !important;
}

#dashboard .sol-command-area-grid strong {
  font-size: .78rem !important;
  text-transform: uppercase !important;
  color: #f3d889 !important;
}

#dashboard .sol-command-area-grid span {
  margin-top: 6px !important;
  font-size: .72rem !important;
  color: rgba(246, 238, 212, .68) !important;
}

#dashboard .sol-command-area-grid b {
  margin-top: 2px !important;
  font-size: 1.15rem !important;
  color: #f3d889 !important;
}

#eventi .eventi-header,
#eventi .eventi-toolbar,
#eventi .sol-events-calendar-panel {
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

html[data-theme="light"] body,
body.sol-light-mode {
  background: #f5f7f4 !important;
  color: #101716 !important;
}

html[data-theme="light"] .main-content,
html[data-theme="light"] .container,
html[data-theme="light"] #dashboard .container,
html[data-theme="light"] #eventi,
html[data-theme="light"] #check-in .container {
  color: #101716 !important;
}

html[data-theme="light"] #dashboard .sol-service-hero,
html[data-theme="light"] #dashboard .sol-command-center,
html[data-theme="light"] #eventi .eventi-header,
html[data-theme="light"] #eventi .eventi-toolbar,
html[data-theme="light"] #eventi .sol-events-calendar-panel,
html[data-theme="light"] #check-in .sol-checkin-hero,
html[data-theme="light"] #check-in .checkin-kpi-card,
html[data-theme="light"] #check-in .sol-checkin-table-wrapper,
html[data-theme="light"] #check-in .sol-checkin-events-panel {
  background: #ffffff !important;
  border-color: rgba(18, 30, 27, .16) !important;
  color: #101716 !important;
  box-shadow: 0 14px 36px rgba(20, 32, 28, .08) !important;
}

html[data-theme="light"] #dashboard .sol-service-hero *,
html[data-theme="light"] #dashboard .sol-command-center *,
html[data-theme="light"] #eventi .eventi-header *,
html[data-theme="light"] #eventi .eventi-toolbar *,
html[data-theme="light"] #eventi .sol-events-calendar-panel *,
html[data-theme="light"] #check-in .sol-checkin-hero *,
html[data-theme="light"] #check-in .checkin-kpi-card *,
html[data-theme="light"] #check-in .sol-checkin-table-wrapper *,
html[data-theme="light"] #check-in .sol-checkin-events-panel * {
  color: inherit;
  text-shadow: none !important;
}

html[data-theme="light"] #dashboard .sol-command-events button,
html[data-theme="light"] #dashboard .sol-command-area-grid article {
  background: #f9faf7 !important;
  border-color: rgba(18, 30, 27, .16) !important;
  color: #101716 !important;
  box-shadow: none !important;
}

html[data-theme="light"] #dashboard .sol-command-events button span,
html[data-theme="light"] #dashboard .sol-command-area-grid span {
  color: #53645d !important;
}

html[data-theme="light"] #dashboard .sol-command-area-grid strong,
html[data-theme="light"] #dashboard .sol-command-area-grid b {
  color: #176f6c !important;
}

html[data-theme="light"] #dashboard .sol-eyebrow,
html[data-theme="light"] #eventi .sol-events-calendar-panel small,
html[data-theme="light"] #check-in .kpi-label,
html[data-theme="light"] #check-in .sol-checkin-list-head span {
  color: #53645d !important;
}

@media (max-width: 760px) {
  #dashboard .sol-service-hero {
    padding: 14px !important;
  }

  #dashboard #sol-command-center .sol-command-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #dashboard .sol-command-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #dashboard .sol-command-sections {
    grid-template-columns: 1fr !important;
  }

  #dashboard .sol-command-next {
    display: grid !important;
  }

  #dashboard .sol-command-area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* v50 mobile enterprise polish: dashboard clarity, no manual sync, tighter events header. */
#dashboard .sol-command-head {
  grid-template-columns: 1fr !important;
}

#dashboard [data-sol-refresh] {
  display: none !important;
}

@media (max-width: 760px) {
  #dashboard .sol-service-hero,
  #dashboard .sol-command-center {
    border-radius: 10px !important;
  }

  #dashboard .sol-service-hero {
    margin-bottom: 10px !important;
    min-height: 0 !important;
    padding: 13px 14px !important;
  }

  #dashboard .sol-service-copy h2 {
    font-size: 1.05rem !important;
    line-height: 1.12 !important;
  }

  #dashboard .sol-service-copy p {
    font-size: .72rem !important;
  }

  #dashboard .sol-command-center {
    padding: 12px !important;
  }

  #dashboard .sol-command-head {
    margin-bottom: 8px !important;
  }

  #dashboard .sol-command-head span,
  #dashboard .sol-command-next h3,
  #dashboard .sol-command-events h3,
  #dashboard .sol-command-areas h3 {
    font-size: .68rem !important;
    letter-spacing: 0 !important;
  }

  #dashboard .sol-command-head h2 {
    font-size: 1.42rem !important;
    line-height: 1.05 !important;
  }

  #dashboard .sol-command-kpis {
    gap: 6px !important;
  }

  #dashboard .sol-command-kpis article {
    min-height: 58px !important;
    padding: 9px !important;
    border-radius: 7px !important;
  }

  #dashboard .sol-command-kpis span {
    font-size: .58rem !important;
  }

  #dashboard .sol-command-kpis strong {
    font-size: 1rem !important;
  }

  #dashboard #sol-command-center .sol-command-actions {
    gap: 6px !important;
  }

  #dashboard .sol-command-actions button {
    min-height: 40px !important;
    border-radius: 7px !important;
    padding: 7px 8px !important;
    font-size: .86rem !important;
    line-height: 1.05 !important;
  }

  #dashboard .sol-command-next,
  #dashboard .sol-command-events,
  #dashboard .sol-command-areas {
    margin-top: 10px !important;
  }

  #dashboard .sol-command-area-grid article {
    min-height: 62px !important;
    padding: 8px !important;
  }

  #eventi .eventi-header {
    display: grid !important;
    grid-template-columns: 1fr 112px !important;
    align-items: start !important;
    gap: 8px !important;
    padding: 12px !important;
  }

  #eventi .eventi-title {
    font-size: 1.55rem !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }

  #eventi .btn-eventi-primary {
    width: 112px !important;
    min-height: 52px !important;
    border-radius: 8px !important;
    padding: 8px 7px !important;
    font-size: .72rem !important;
    line-height: 1.05 !important;
  }

  #eventi .eventi-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 0 12px 10px !important;
  }

  #eventi .sol-events-calendar-panel {
    padding: 12px !important;
    border-radius: 10px !important;
  }

  #eventi .sol-events-calendar-panel > header {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 8px !important;
    align-items: center !important;
  }

  #eventi [data-sol-print-events-selected] {
    width: auto !important;
    min-height: 38px !important;
    padding: 7px 10px !important;
    border-radius: 7px !important;
    font-size: .78rem !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }
}

html[data-theme="light"] #dashboard .sol-service-hero {
  background: #fffdf8 !important;
  color: #101716 !important;
  border-color: rgba(28, 43, 39, .16) !important;
}

html[data-theme="light"] #dashboard .sol-service-hero h2,
html[data-theme="light"] #dashboard .sol-service-hero p,
html[data-theme="light"] #dashboard .sol-command-center h2,
html[data-theme="light"] #dashboard .sol-command-center h3,
html[data-theme="light"] #dashboard .sol-command-center strong,
html[data-theme="light"] #dashboard .sol-command-center b,
html[data-theme="light"] #eventi .eventi-title,
html[data-theme="light"] #eventi .sol-events-calendar-panel h2,
html[data-theme="light"] #eventi .sol-events-calendar-panel h3,
html[data-theme="light"] #eventi .sol-events-calendar-panel strong {
  color: #101716 !important;
}

html[data-theme="light"] #dashboard .sol-command-center,
html[data-theme="light"] #dashboard .sol-command-kpis article,
html[data-theme="light"] #dashboard .sol-command-next article,
html[data-theme="light"] #eventi .eventi-header,
html[data-theme="light"] #eventi .eventi-toolbar,
html[data-theme="light"] #eventi .sol-events-calendar-panel {
  background: #ffffff !important;
  color: #101716 !important;
  border-color: rgba(28, 43, 39, .16) !important;
}

html[data-theme="light"] #dashboard .sol-command-actions button,
html[data-theme="light"] #eventi .btn-eventi-primary,
html[data-theme="light"] #eventi [data-sol-print-events-selected] {
  background: #147d78 !important;
  border-color: #147d78 !important;
  color: #ffffff !important;
}

html[data-theme="light"] #dashboard .sol-command-actions button:not(:first-child) {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .22) !important;
  color: #101716 !important;
}

html[data-theme="light"] #dashboard .sol-command-center span,
html[data-theme="light"] #dashboard .sol-command-center p,
html[data-theme="light"] #eventi .eventi-toolbar label,
html[data-theme="light"] #eventi .sol-events-calendar-panel small,
html[data-theme="light"] #eventi .sol-events-calendar-panel span {
  color: #4d5d58 !important;
}

html[data-theme="light"] #eventi input,
html[data-theme="light"] #eventi select {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .22) !important;
  color: #101716 !important;
}

/* v51 check-in operational print controls */
.sol-checkin-print-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-left: auto !important;
  flex-wrap: wrap !important;
}

.sol-checkin-print-panel {
  width: 100% !important;
  justify-content: flex-start !important;
  margin: 0 0 14px !important;
  padding: 10px !important;
  border: 1px solid rgba(212, 175, 55, .22) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .04) !important;
}

.sol-checkin-print-date {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 34px !important;
  padding: 5px 7px !important;
  border: 1px solid rgba(212, 175, 55, .32) !important;
  border-radius: 7px !important;
  background: rgba(255, 255, 255, .04) !important;
  color: inherit !important;
  font-size: .74rem !important;
  font-weight: 800 !important;
}

.sol-checkin-print-date input {
  width: 126px !important;
  min-height: 28px !important;
  padding: 4px 6px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(212, 175, 55, .32) !important;
  background: rgba(0, 0, 0, .2) !important;
  color: inherit !important;
  font: inherit !important;
}

.sol-checkin-print-actions button,
.sol-checkin-events-head [data-sol-print-events-day] {
  min-height: 34px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(212, 175, 55, .42) !important;
  background: rgba(212, 175, 55, .12) !important;
  color: inherit !important;
  padding: 7px 10px !important;
  font-size: .78rem !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
}

.sol-checkin-print-actions [data-sol-print-operational-day],
.sol-checkin-print-actions [data-sol-send-galy-day] {
  background: #147d78 !important;
  border-color: #147d78 !important;
  color: #fff !important;
}

.sol-checkin-print-actions [data-sol-send-galy-day] {
  background: #1f7a44 !important;
  border-color: #1f7a44 !important;
}

html[data-theme="light"] .sol-checkin-print-actions button,
html[data-theme="light"] .sol-checkin-events-head [data-sol-print-events-day] {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .22) !important;
  color: #101716 !important;
}

html[data-theme="light"] .sol-checkin-print-date {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .22) !important;
  color: #101716 !important;
}

html[data-theme="light"] .sol-checkin-print-panel {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
  box-shadow: 0 10px 24px rgba(20, 32, 28, .08) !important;
}

html[data-theme="light"] .sol-checkin-print-date input {
  background: #f8faf7 !important;
  border-color: rgba(28, 43, 39, .24) !important;
  color: #101716 !important;
}

html[data-theme="light"] .sol-checkin-print-actions [data-sol-print-operational-day],
html[data-theme="light"] .sol-checkin-print-actions [data-sol-send-galy-day] {
  background: #147d78 !important;
  border-color: #147d78 !important;
  color: #ffffff !important;
}

html[data-theme="light"] .sol-checkin-print-actions [data-sol-send-galy-day] {
  background: #1f7a44 !important;
  border-color: #1f7a44 !important;
}

.sol-service-sheet-panel {
  margin: 12px 0 16px !important;
  padding: 12px !important;
  border: 1px solid rgba(212, 175, 55, .22) !important;
  border-radius: 8px !important;
  background: rgba(10, 14, 16, .82) !important;
}

.sol-service-sheet-head {
  display: flex !important;
  align-items: end !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

.sol-service-sheet-head span {
  display: block !important;
  color: rgba(239, 234, 226, .62) !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

.sol-service-sheet-head h3 {
  margin: 2px 0 0 !important;
  color: #f4e6c0 !important;
  font-size: 1.05rem !important;
}

.sol-service-sheet-tools {
  display: flex !important;
  align-items: end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.sol-service-sheet-tools label {
  display: grid !important;
  gap: 4px !important;
  min-width: 145px !important;
  color: rgba(239, 234, 226, .72) !important;
  font-size: .72rem !important;
  font-weight: 800 !important;
}

.sol-service-sheet-tools input {
  min-height: 34px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(212, 175, 55, .32) !important;
  background: rgba(0, 0, 0, .26) !important;
  color: #efeae2 !important;
  padding: 7px 9px !important;
}

.sol-service-sheet-tools [type="search"] {
  min-width: 240px !important;
}

.sol-service-sheet-tools button {
  min-height: 34px !important;
  border-radius: 7px !important;
  border: 1px solid #147d78 !important;
  background: #147d78 !important;
  color: #fff !important;
  padding: 7px 10px !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
}

.sol-service-sheet-summary {
  display: grid !important;
  grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.sol-service-sheet-summary article {
  border: 1px solid rgba(212, 175, 55, .18) !important;
  border-radius: 7px !important;
  padding: 8px !important;
  background: rgba(255, 255, 255, .04) !important;
}

.sol-service-sheet-summary small {
  display: block !important;
  color: rgba(239, 234, 226, .58) !important;
  font-size: .68rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

.sol-service-sheet-summary strong {
  display: block !important;
  margin-top: 3px !important;
  color: #f7efd7 !important;
  font-size: 1.08rem !important;
}

.sol-service-sheet-table-wrap {
  overflow-x: auto !important;
  border: 1px solid rgba(212, 175, 55, .18) !important;
  border-radius: 7px !important;
}

.sol-service-sheet-table {
  width: 100% !important;
  min-width: 960px !important;
  border-collapse: collapse !important;
}

.sol-service-sheet-table th,
.sol-service-sheet-table td {
  border-bottom: 1px solid rgba(212, 175, 55, .12) !important;
  padding: 8px 7px !important;
  color: #efeae2 !important;
  font-size: .78rem !important;
  line-height: 1.22 !important;
  vertical-align: top !important;
  text-align: left !important;
}

.sol-service-sheet-table th {
  background: rgba(212, 175, 55, .12) !important;
  color: #f7e6ad !important;
  font-size: .7rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

.sol-service-sheet-table td:nth-child(1),
.sol-service-sheet-table td:nth-child(2),
.sol-service-sheet-table td:nth-child(5),
.sol-service-sheet-table td:nth-child(6) {
  white-space: nowrap !important;
}

.sol-service-sheet-table small {
  display: block !important;
  margin-top: 2px !important;
  color: rgba(239, 234, 226, .58) !important;
}

.sol-service-sheet-table .is-event-row td {
  background: rgba(31, 167, 216, .12) !important;
}

.sol-service-sheet-table .is-cancelled td {
  color: rgba(239, 234, 226, .45) !important;
  text-decoration: line-through !important;
}

.sol-service-sheet-manual {
  margin-top: 12px !important;
}

.sol-service-sheet-manual-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
}

.sol-service-sheet-manual-head h4 {
  margin: 0 !important;
  color: #f4e6c0 !important;
  font-size: .94rem !important;
  font-weight: 900 !important;
}

.sol-service-sheet-manual-head span {
  color: rgba(239, 234, 226, .58) !important;
  font-size: .72rem !important;
  font-weight: 800 !important;
}

.sol-service-sheet-manual-table {
  min-width: 820px !important;
}

.sol-service-sheet-manual-table th:nth-child(1),
.sol-service-sheet-manual-table td:nth-child(1) { width: 9% !important; }
.sol-service-sheet-manual-table th:nth-child(2),
.sol-service-sheet-manual-table td:nth-child(2) { width: 20% !important; }
.sol-service-sheet-manual-table th:nth-child(3),
.sol-service-sheet-manual-table td:nth-child(3) { width: 17% !important; }
.sol-service-sheet-manual-table th:nth-child(4),
.sol-service-sheet-manual-table td:nth-child(4) { width: 8% !important; }
.sol-service-sheet-manual-table th:nth-child(5),
.sol-service-sheet-manual-table td:nth-child(5) { width: 13% !important; }
.sol-service-sheet-manual-table th:nth-child(6),
.sol-service-sheet-manual-table td:nth-child(6) { width: 33% !important; }

.sol-service-sheet-empty-row td {
  height: 34px !important;
  background: rgba(255, 255, 255, .025) !important;
}

html[data-theme="light"] .sol-service-sheet-panel,
html[data-theme="light"] .sol-service-sheet-summary article,
html[data-theme="light"] .sol-service-sheet-table-wrap {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
}

html[data-theme="light"] .sol-service-sheet-head h3,
html[data-theme="light"] .sol-service-sheet-summary strong,
html[data-theme="light"] .sol-service-sheet-table td {
  color: #101716 !important;
}

html[data-theme="light"] .sol-service-sheet-head span,
html[data-theme="light"] .sol-service-sheet-summary small,
html[data-theme="light"] .sol-service-sheet-tools label,
html[data-theme="light"] .sol-service-sheet-table small {
  color: #40514c !important;
}

html[data-theme="light"] .sol-service-sheet-tools input {
  background: #f8faf7 !important;
  border-color: rgba(28, 43, 39, .24) !important;
  color: #101716 !important;
}

html[data-theme="light"] .sol-service-sheet-table th {
  background: #edf5f2 !important;
  color: #101716 !important;
}

html[data-theme="light"] .sol-service-sheet-table .is-event-row td {
  background: #e7f8fc !important;
}

html[data-theme="light"] .sol-service-sheet-manual-head h4 {
  color: #101716 !important;
}

html[data-theme="light"] .sol-service-sheet-manual-head span {
  color: #40514c !important;
}

html[data-theme="light"] .sol-service-sheet-empty-row td {
  background: #ffffff !important;
}

@media (max-width: 760px) {
  .sol-service-sheet-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .sol-service-sheet-tools {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .sol-service-sheet-tools label,
  .sol-service-sheet-tools [type="search"],
  .sol-service-sheet-tools button {
    min-width: 0 !important;
    width: 100% !important;
  }

  .sol-service-sheet-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .sol-service-sheet-manual-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

html[data-theme="light"] .sol-booking-slot-chip {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
  color: #101716 !important;
  box-shadow: 0 8px 18px rgba(20, 32, 28, .06) !important;
}

html[data-theme="light"] .sol-booking-slot-chip small {
  color: #40514c !important;
}

html[data-theme="light"] .sol-booking-slot-chip.is-selected {
  background: #e9f8f5 !important;
  border-color: #147d78 !important;
}

@media (max-width: 760px) {
  .sol-checkin-list-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .sol-checkin-print-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  .sol-checkin-print-date {
    grid-column: 1 / -1 !important;
    justify-content: space-between !important;
    width: 100% !important;
  }

  .sol-checkin-print-date input {
    width: 150px !important;
  }

  .sol-checkin-print-actions button {
    width: 100% !important;
    min-height: 38px !important;
  }
}

/* v52 check-in event list: never leave the static loading placeholder visible. */
.sol-checkin-event-card {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: center !important;
  padding: 10px !important;
  border: 1px solid rgba(212, 175, 55, .24) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .045) !important;
}

.sol-checkin-event-time {
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  color: #f3d889 !important;
}

.sol-checkin-event-main strong,
.sol-checkin-event-main span,
.sol-checkin-event-main small {
  display: block !important;
}

.sol-checkin-event-main span,
.sol-checkin-event-main small {
  margin-top: 3px !important;
  color: rgba(246, 238, 212, .72) !important;
}

.sol-checkin-event-actions {
  display: grid !important;
  gap: 6px !important;
  justify-items: end !important;
}

.sol-checkin-event-actions span {
  font-size: .72rem !important;
  font-weight: 800 !important;
  color: #f3d889 !important;
}

.sol-checkin-event-actions button {
  min-height: 34px !important;
  border-radius: 7px !important;
  border: 1px solid #147d78 !important;
  background: #147d78 !important;
  color: #fff !important;
  padding: 7px 10px !important;
  font-weight: 800 !important;
}

html[data-theme="light"] .sol-checkin-event-card {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .16) !important;
  color: #101716 !important;
}

html[data-theme="light"] .sol-checkin-event-time,
html[data-theme="light"] .sol-checkin-event-actions span {
  color: #176f6c !important;
}

html[data-theme="light"] .sol-checkin-event-main span,
html[data-theme="light"] .sol-checkin-event-main small {
  color: #4d5d58 !important;
}

@media (max-width: 760px) {
  .sol-checkin-event-card {
    grid-template-columns: 54px minmax(0, 1fr) !important;
  }

  .sol-checkin-event-actions {
    grid-column: 1 / -1 !important;
    grid-template-columns: 1fr auto !important;
    justify-items: stretch !important;
  }
}

/* v53 light-mode polish: readable booking calendar and visual separation between bookings/events. */
html[data-theme="light"] #dashboard button[data-sol-refresh],
html[data-theme="light"] #sol-command-center button[data-sol-refresh] {
  display: none !important;
}

html[data-theme="light"] #calendario-prenotazioni,
html[data-theme="light"] #calendario-prenotazioni .sol-booking-calendar-page {
  background: #f4f6f2 !important;
  color: #101716 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-booking-calendar-head,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-card,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-side,
html[data-theme="light"] #calendario-prenotazioni .sol-booking-calendar-shell {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .16) !important;
  color: #101716 !important;
  box-shadow: 0 14px 34px rgba(20, 32, 28, .08) !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-booking-calendar-head h1,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-title,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-side-title,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day-num,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-res-main strong,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-stat strong {
  color: #101716 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-booking-calendar-head p,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-weekday,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day-summary,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-res-meta,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-stat small {
  color: #4d5d58 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day {
  background: #fbfcfa !important;
  border-color: rgba(28, 43, 39, .18) !important;
  color: #101716 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day.selected,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day:hover {
  background: #f0f7f6 !important;
  border-color: #147d78 !important;
  box-shadow: inset 0 0 0 1px rgba(20, 125, 120, .28) !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day.muted {
  opacity: .62 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-chip {
  background: #147d78 !important;
  color: #ffffff !important;
  border: 1px solid #147d78 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-stat,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-capacity {
  background: #eef5f4 !important;
  border-color: rgba(20, 125, 120, .22) !important;
  color: #101716 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-area-row,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-res-row {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .16) !important;
  color: #101716 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-edit {
  background: #147d78 !important;
  border-color: #147d78 !important;
  color: #ffffff !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-delete {
  background: #fff4f2 !important;
  border-color: rgba(176, 58, 46, .28) !important;
  color: #9f2f25 !important;
}

html[data-theme="light"] #prenotazioni {
  --booking-panel: #ffffff;
  --booking-panel-2: #f8faf7;
  --booking-text: #101716;
  --booking-muted: #4d5d58;
  --booking-border: rgba(28, 43, 39, .18);
  --booking-border-soft: rgba(28, 43, 39, .12);
  background: #f4f6f2 !important;
  color: #101716 !important;
}

html[data-theme="light"] #prenotazioni .sol-booking-hero,
html[data-theme="light"] #prenotazioni .sol-booking-hero-clean,
html[data-theme="light"] #prenotazioni .form-grid.sol-booking-form,
html[data-theme="light"] #prenotazioni .sol-booking-form-clean,
html[data-theme="light"] #prenotazioni .sol-booking-recap,
html[data-theme="light"] #prenotazioni .sol-booking-mini-card,
html[data-theme="light"] #prenotazioni .sol-booking-mini-card-clean {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .16) !important;
  color: #101716 !important;
  box-shadow: 0 14px 34px rgba(20, 32, 28, .08) !important;
}

html[data-theme="light"] #prenotazioni .section-title,
html[data-theme="light"] #prenotazioni .sol-booking-hero-clean .section-title,
html[data-theme="light"] #prenotazioni .sol-booking-mini-card strong,
html[data-theme="light"] #prenotazioni .sol-booking-mini-card-clean strong,
html[data-theme="light"] #prenotazioni .sol-booking-recap strong,
html[data-theme="light"] #prenotazioni .sol-booking-recap-pax strong {
  color: #101716 !important;
}

html[data-theme="light"] #prenotazioni .sol-eyebrow,
html[data-theme="light"] #prenotazioni .sol-clean-divider,
html[data-theme="light"] #prenotazioni .sol-booking-mini-card span,
html[data-theme="light"] #prenotazioni .sol-booking-mini-card-clean span,
html[data-theme="light"] #prenotazioni .sol-booking-recap span,
html[data-theme="light"] #prenotazioni .sol-booking-recap small,
html[data-theme="light"] #prenotazioni .sol-booking-recap-pax small,
html[data-theme="light"] #prenotazioni .form-grid.sol-booking-form label,
html[data-theme="light"] #prenotazioni .sol-booking-form-clean label {
  color: #4d5d58 !important;
}

html[data-theme="light"] #prenotazioni .form-grid.sol-booking-form input,
html[data-theme="light"] #prenotazioni .form-grid.sol-booking-form select,
html[data-theme="light"] #prenotazioni .sol-booking-form-clean input,
html[data-theme="light"] #prenotazioni .sol-booking-form-clean select,
html[data-theme="light"] #prenotazioni textarea {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .22) !important;
  color: #101716 !important;
}

html[data-theme="light"] #prenotazioni input::placeholder,
html[data-theme="light"] #prenotazioni textarea::placeholder {
  color: #7a8983 !important;
}

html[data-theme="light"] #prenotazioni #sol-booking-status-pill {
  background: #fff8e8 !important;
  border-color: rgba(184, 132, 19, .34) !important;
  color: #5b430c !important;
}

#dashboard .sol-command-next button {
  border-left: 4px solid #147d78 !important;
}

#dashboard .sol-command-events button {
  border-left: 4px solid #d6a82f !important;
}

#dashboard .sol-command-kpis article:nth-child(1),
#dashboard .sol-command-kpis article:nth-child(2) {
  border-top: 3px solid #147d78 !important;
}

#dashboard .sol-command-kpis article:nth-child(4),
#dashboard .sol-command-kpis article:nth-child(5) {
  border-top: 3px solid #d6a82f !important;
}

html[data-theme="light"] #dashboard .sol-command-next button {
  background: #f0f7f6 !important;
  border-color: rgba(20, 125, 120, .28) !important;
  border-left-color: #147d78 !important;
}

html[data-theme="light"] #dashboard .sol-command-events button {
  background: #fff8e8 !important;
  border-color: rgba(184, 132, 19, .28) !important;
  border-left-color: #d6a82f !important;
}

html[data-theme="light"] #dashboard .sol-command-events button span {
  color: #6d560f !important;
}

html[data-theme="light"] .sol-checkin-event-card {
  border-left: 4px solid #d6a82f !important;
}

html[data-theme="light"] .sol-stable-checkin-cards article {
  border-left: 4px solid #147d78 !important;
}

.sol-pwa-install-card,
.sol-pwa-update-card {
  bottom: calc(var(--sol-mobile-nav-h, 76px) + 12px) !important;
  border-radius: 12px !important;
  z-index: 100020 !important;
  max-width: min(460px, calc(100vw - 24px)) !important;
  color: #f7edd0 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .42) !important;
}

.sol-pwa-update-card {
  border-color: rgba(46, 165, 153, .52) !important;
}

.sol-pwa-install-actions {
  display: flex !important;
  gap: 8px !important;
  align-items: stretch !important;
}

.sol-pwa-install-actions button {
  min-height: 42px !important;
  border-radius: 10px !important;
  font-weight: 900 !important;
  white-space: normal !important;
  line-height: 1.1 !important;
}

.lux-alert-backdrop {
  pointer-events: none !important;
}

.lux-alert-modal {
  pointer-events: auto !important;
}

@media (max-width: 760px) {
  .sol-capacity-notice {
    right: 10px !important;
    bottom: calc(var(--sol-mobile-nav-h, 76px) + 12px) !important;
    width: calc(100vw - 20px) !important;
    padding: 12px !important;
  }

  .sol-pwa-install-card,
  .sol-pwa-update-card {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(var(--sol-mobile-nav-h, 76px) + 10px) !important;
    max-width: none !important;
    padding: 10px 12px !important;
  }
}

.sol-enterprise-analytics,
.sol-history-enterprise {
  width: min(1480px, calc(100% - 36px));
  margin: 28px auto 110px;
  color: #f7f2df;
}

.sol-enterprise-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid rgba(214, 168, 47, .28);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 36, 37, .98), rgba(19, 23, 24, .98));
  box-shadow: 0 20px 55px rgba(0, 0, 0, .22);
}

.sol-enterprise-head span,
.sol-panel-title span {
  display: block;
  color: #d6a82f;
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.sol-enterprise-head h1 {
  margin: 4px 0 8px;
  color: #fff7d7;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.sol-enterprise-head p {
  margin: 0;
  max-width: 760px;
  color: rgba(247, 242, 223, .72);
}

.sol-enterprise-freshness {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(46, 165, 153, .34);
  border-radius: 999px;
  background: rgba(46, 165, 153, .12);
  color: #bff3ea;
  font-weight: 800;
  white-space: nowrap;
}

.sol-analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.sol-enterprise-kpi,
.sol-analytics-panel,
.sol-history-panel {
  border: 1px solid rgba(214, 168, 47, .22);
  border-radius: 12px;
  background: #151b1d;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}

.sol-enterprise-kpi {
  min-height: 98px;
  padding: 14px;
}

.sol-enterprise-kpi span {
  display: block;
  color: rgba(247, 242, 223, .66);
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sol-enterprise-kpi strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 1.65rem;
  line-height: 1;
}

.sol-enterprise-kpi small {
  display: block;
  margin-top: 8px;
  color: rgba(247, 242, 223, .64);
  font-weight: 700;
}

.sol-enterprise-kpi.capacity-warning {
  border-color: rgba(224, 145, 36, .72);
}

.sol-enterprise-kpi.capacity-critical {
  border-color: rgba(210, 72, 66, .8);
}

.sol-analytics-grid-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.sol-analytics-panel,
.sol-history-panel {
  padding: 16px;
}

.sol-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.sol-panel-title strong {
  color: #fff7d7;
  font-size: 1.1rem;
}

.sol-capacity-meter.enterprise {
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.sol-capacity-meter.enterprise div {
  height: 100%;
  border-radius: inherit;
  background: #2ea599;
}

.sol-capacity-meter.enterprise.warning div {
  background: #e09124;
}

.sol-capacity-meter.enterprise.critical div {
  background: #d24842;
}

.sol-capacity-numbers {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #fff7d7;
}

.sol-capacity-numbers span,
.sol-analytics-capacity p {
  color: rgba(247, 242, 223, .68);
}

.sol-enterprise-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 10px;
}

.sol-enterprise-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.sol-enterprise-table th,
.sol-enterprise-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  text-align: left;
  vertical-align: top;
}

.sol-enterprise-table th {
  background: rgba(214, 168, 47, .12);
  color: #fff0b8;
  font-size: .74rem;
  text-transform: uppercase;
}

.sol-enterprise-table td {
  color: rgba(255, 255, 255, .86);
  font-weight: 700;
}

.sol-history-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.sol-history-two-col > section {
  min-width: 0;
  max-width: 100%;
}

.sol-history-two-col h3 {
  margin: 0 0 10px;
  color: #fff7d7;
}

html[data-theme="light"] .sol-enterprise-analytics,
html[data-theme="light"] .sol-history-enterprise {
  color: #101716;
}

html[data-theme="light"] .sol-enterprise-head,
html[data-theme="light"] .sol-analytics-panel,
html[data-theme="light"] .sol-history-panel,
html[data-theme="light"] .sol-enterprise-kpi {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .16) !important;
  box-shadow: 0 16px 38px rgba(20, 32, 28, .08) !important;
  color: #101716 !important;
}

html[data-theme="light"] .sol-enterprise-head h1,
html[data-theme="light"] .sol-enterprise-kpi strong,
html[data-theme="light"] .sol-panel-title strong,
html[data-theme="light"] .sol-history-two-col h3,
html[data-theme="light"] .sol-capacity-numbers {
  color: #101716 !important;
}

html[data-theme="light"] .sol-enterprise-head p,
html[data-theme="light"] .sol-enterprise-kpi span,
html[data-theme="light"] .sol-enterprise-kpi small,
html[data-theme="light"] .sol-analytics-capacity p,
html[data-theme="light"] .sol-capacity-numbers span {
  color: #4d5d58 !important;
}

html[data-theme="light"] .sol-enterprise-freshness {
  background: #e9f8f5 !important;
  border-color: rgba(20, 125, 120, .28) !important;
  color: #11645f !important;
}

html[data-theme="light"] .sol-enterprise-table-wrap {
  border-color: rgba(28, 43, 39, .14) !important;
}

html[data-theme="light"] .sol-enterprise-table th {
  background: #142033 !important;
  color: #ffffff !important;
}

html[data-theme="light"] .sol-enterprise-table td {
  border-color: rgba(28, 43, 39, .12) !important;
  color: #101716 !important;
}

html[data-theme="light"] .sol-enterprise-table tbody tr:nth-child(even) td {
  background: #f2f5f2 !important;
}

@media (max-width: 980px) {
  .sol-enterprise-analytics,
  .sol-history-enterprise {
    width: min(100% - 20px, 720px);
    margin-top: 14px;
  }

  .sol-enterprise-head {
    display: block;
    padding: 16px;
  }

  .sol-enterprise-freshness {
    display: inline-flex;
    margin-top: 12px;
    white-space: normal;
  }

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

  .sol-analytics-grid-main,
  .sol-history-two-col {
    grid-template-columns: 1fr;
  }

  .sol-enterprise-table {
    min-width: 620px;
  }
}

@media (max-width: 760px) {
  .sol-enterprise-analytics,
  .sol-history-enterprise {
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 calc(var(--sol-mobile-nav-h, 76px) + 22px) !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .sol-enterprise-head {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 14px !important;
    border-radius: 12px !important;
  }

  .sol-enterprise-head h1 {
    font-size: 1.42rem !important;
    line-height: 1.08 !important;
    overflow-wrap: anywhere !important;
  }

  .sol-enterprise-head p {
    font-size: .88rem !important;
  }

  .sol-enterprise-freshness {
    align-self: flex-start !important;
    max-width: 100% !important;
    white-space: normal !important;
    font-size: .78rem !important;
  }

  .sol-analytics-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .sol-enterprise-kpi {
    min-height: 78px !important;
    padding: 11px !important;
  }

  .sol-enterprise-kpi strong {
    font-size: 1.28rem !important;
  }

  .sol-analytics-grid-main,
  .sol-history-two-col {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .sol-analytics-panel,
  .sol-history-panel {
    min-width: 0 !important;
    padding: 12px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
  }

  .sol-panel-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
  }

  .sol-enterprise-table-wrap {
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .sol-enterprise-table {
    min-width: 560px !important;
    font-size: .78rem !important;
  }

  .sol-enterprise-table th,
  .sol-enterprise-table td {
    padding: 8px 9px !important;
  }

  .sol-v29-history-shell {
    display: block !important;
    width: 100% !important;
    overflow: visible !important;
  }

  .sol-v29-history-sidebar {
    position: static !important;
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px !important;
    overflow-x: auto !important;
  }

  .sol-v29-tab {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  .sol-v29-history-main {
    width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .sol-v29-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #sol-history-search,
  #sol-history-range {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 430px) {
  .sol-analytics-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .sol-enterprise-table {
    min-width: 520px !important;
  }
}

/* Enterprise light-mode readability pass */
html[data-theme="light"] {
  --sol-light-page: #f4f6f2;
  --sol-light-surface: #ffffff;
  --sol-light-surface-soft: #f8faf7;
  --sol-light-text: #101716;
  --sol-light-muted: #40514c;
  --sol-light-border: rgba(28, 43, 39, .18);
  --sol-light-teal: #147d78;
  --sol-light-gold: #a77b16;
}

html[data-theme="light"] body,
html[data-theme="light"] main,
html[data-theme="light"] .view,
html[data-theme="light"] .view-section {
  background: var(--sol-light-page) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(
  #dashboard,
  #calendario-prenotazioni,
  #prenotazioni,
  #eventi,
  #check-in,
  #plantina-interattiva,
  #gestione,
  #impostazioni,
  #analytics,
  #storico
) :is(h1, h2, h3, h4, strong, b, .section-title, .sol-calendar-title, .sol-calendar-side-title) {
  color: var(--sol-light-text) !important;
  text-shadow: none !important;
}

html[data-theme="light"] :is(
  #dashboard,
  #calendario-prenotazioni,
  #prenotazioni,
  #eventi,
  #check-in,
  #plantina-interattiva,
  #gestione,
  #impostazioni,
  #analytics,
  #storico
) :is(p, span, small, label, li, td, .meta, .subtitle, .card-subtitle, .sol-calendar-day-summary, .sol-calendar-res-meta) {
  color: var(--sol-light-muted) !important;
  text-shadow: none !important;
}

html[data-theme="light"] :is(
  #dashboard,
  #calendario-prenotazioni,
  #prenotazioni,
  #eventi,
  #check-in,
  #plantina-interattiva,
  #gestione,
  #impostazioni,
  #analytics,
  #storico
) :is(.card, .panel, .section-header, .sol-card, .sol-v29-card, .sol-v29-history-main, .sol-v29-history-sidebar, .sol-command-center, .sol-service-hero, .sol-events-day-operations, .sol-stable-checkin-cards article, .sol-checkin-event-card, .sol-stable-management, .sol-plantina-operations, .sol-settings-card, .sol-booking-calendar-head, .sol-booking-calendar-root, .sol-calendar-card, .sol-calendar-side) {
  background: var(--sol-light-surface) !important;
  border-color: var(--sol-light-border) !important;
  color: var(--sol-light-text) !important;
  box-shadow: 0 14px 34px rgba(20, 32, 28, .08) !important;
}

html[data-theme="light"] #dashboard .sol-service-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,247,.96)),
    radial-gradient(circle at 90% 15%, rgba(214,168,47,.14), transparent 32%) !important;
}

html[data-theme="light"] :is(.sol-eyebrow, .sol-command-next-title, .sol-events-day-head span, .sol-stable-management-head span, .sol-settings-card > span, .sol-booking-calendar-head .sol-eyebrow) {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  background: #fff7df !important;
  border: 1px solid rgba(167, 123, 22, .24) !important;
  color: #5f4710 !important;
  border-radius: 999px;
  padding: 4px 9px;
  font-weight: 900;
}

html[data-theme="light"] :is(input, select, textarea) {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .24) !important;
  color: var(--sol-light-text) !important;
  caret-color: var(--sol-light-teal);
}

html[data-theme="light"] :is(input, select, textarea)::placeholder {
  color: #6c7c76 !important;
  opacity: 1 !important;
}

html[data-theme="light"] :is(button, .btn, .sol-v29-btn, .sol-calendar-mode) {
  text-shadow: none !important;
}

html[data-theme="light"] :is(button:not(.active):not(.primary), .btn:not(.primary), .sol-v29-btn:not(.primary), .sol-calendar-mode:not(.active)) {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .22) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(button.active, button.primary, .btn.primary, .sol-calendar-mode.active, .sol-v29-btn.primary, [aria-current="page"]) {
  background: var(--sol-light-teal) !important;
  border-color: var(--sol-light-teal) !important;
  color: #ffffff !important;
}

html[data-theme="light"] :is(button.active, button.primary, .btn.primary, .sol-calendar-mode.active, .sol-v29-btn.primary, [aria-current="page"]) :is(span, small, strong, b) {
  color: #ffffff !important;
}

html[data-theme="light"] :is(.sol-command-kpis article, .sol-events-day-kpis article, .sol-stable-management-summary article, .sol-plantina-summary article, .stat-item, .kpi-card, .sol-calendar-stat) {
  background: var(--sol-light-surface-soft) !important;
  border-color: var(--sol-light-border) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(.sol-command-kpis article, .sol-events-day-kpis article, .sol-stable-management-summary article, .sol-plantina-summary article, .stat-item, .kpi-card, .sol-calendar-stat) :is(small, span) {
  color: var(--sol-light-muted) !important;
}

html[data-theme="light"] :is(.sol-command-next button, .sol-command-events button, .sol-stable-management-list article, .sol-events-day-list article, .sol-plantina-op-card, .sol-calendar-res-row, .sol-calendar-area-row) {
  background: #ffffff !important;
  border-color: var(--sol-light-border) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(.sol-command-next button, .sol-command-events button, .sol-stable-management-list article, .sol-events-day-list article, .sol-plantina-op-card, .sol-calendar-res-row, .sol-calendar-area-row) :is(strong, b) {
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(table, .sol-v29-table, .sol-stable-table) {
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(th, .sol-enterprise-table th) {
  background: #142033 !important;
  color: #ffffff !important;
}

html[data-theme="light"] :is(td, .sol-enterprise-table td) {
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] .bottom-nav,
html[data-theme="light"] .mobile-bottom-nav,
html[data-theme="light"] .sol-mobile-nav {
  background: rgba(255, 255, 255, .96) !important;
  border-color: rgba(28, 43, 39, .16) !important;
  box-shadow: 0 -10px 26px rgba(20, 32, 28, .12) !important;
}

html[data-theme="light"] :is(.bottom-nav, .mobile-bottom-nav, .sol-mobile-nav) :is(button, a) {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(.bottom-nav, .mobile-bottom-nav, .sol-mobile-nav) :is(button.active, a.active, [aria-current="page"]) {
  background: var(--sol-light-teal) !important;
  color: #ffffff !important;
}

html[data-theme="light"] :is(.bottom-nav, .mobile-bottom-nav, .sol-mobile-nav) :is(button.active, a.active, [aria-current="page"]) * {
  color: #ffffff !important;
}

html[data-theme="light"] .sol-pwa-install-card,
html[data-theme="light"] .sol-pwa-update-card,
html[data-theme="light"] .sol-v32-dialog,
html[data-theme="light"] .sol-v32-head,
html[data-theme="light"] .sol-v32-block {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
  color: var(--sol-light-text) !important;
  box-shadow: 0 18px 46px rgba(20, 32, 28, .16) !important;
}

html[data-theme="light"] .sol-v32-head h2,
html[data-theme="light"] .sol-v32-choice strong,
html[data-theme="light"] .sol-v32-current,
html[data-theme="light"] .sol-v32-detail-actions button {
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] .sol-v32-head p,
html[data-theme="light"] .sol-v32-help,
html[data-theme="light"] .sol-v32-choice span,
html[data-theme="light"] .sol-v32-choice small,
html[data-theme="light"] .sol-v32-move small,
html[data-theme="light"] .sol-v32-empty,
html[data-theme="light"] .sol-pwa-install-card p,
html[data-theme="light"] .sol-pwa-update-card p {
  color: var(--sol-light-muted) !important;
}

html[data-theme="light"] .sol-v32-kicker {
  color: #6f5213 !important;
}

html[data-theme="light"] .sol-v32-choice,
html[data-theme="light"] .sol-v32-move,
html[data-theme="light"] .sol-v32-btn,
html[data-theme="light"] .sol-v32-detail-actions button {
  background: #f8faf7 !important;
  border-color: rgba(28, 43, 39, .2) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] .sol-v32-close {
  background: #f4f6f2 !important;
  border-color: rgba(28, 43, 39, .2) !important;
  color: var(--sol-light-text) !important;
}

@media (max-width: 768px) {
  .command-bar {
    height: calc(82px + env(safe-area-inset-bottom)) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .sol-command-row-main {
    gap: 5px !important;
  }

  .sol-command-row-main .cmd-btn {
    min-height: 62px !important;
    border-radius: 10px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
  }

  .sol-command-row-main .cmd-btn::before {
    font-size: .98rem !important;
  }

  .sol-command-row-main .cmd-btn::after {
    max-width: 54px !important;
    min-height: 24px !important;
    font-size: .56rem !important;
    line-height: 1.05 !important;
  }

  .main-content {
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }

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

html[data-theme="light"] :is(input, select, textarea, .checkin-search, #sol-history-search, #sol-history-range) {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .28) !important;
  color: var(--sol-light-text) !important;
  -webkit-text-fill-color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(input, textarea, .checkin-search, #sol-history-search)::placeholder {
  color: #64746f !important;
  -webkit-text-fill-color: #64746f !important;
  opacity: 1 !important;
}

html[data-theme="light"] #prenotazioni :is(.sol-booking-recap-pax, .sol-booking-mini-card, .sol-booking-mini-card-clean) {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] #prenotazioni :is(.sol-booking-recap-pax, .sol-booking-mini-card, .sol-booking-mini-card-clean) :is(strong, small, span) {
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] #prenotazioni :is(.sol-booking-recap-pax small, .sol-booking-mini-card span, .sol-booking-mini-card-clean span) {
  color: var(--sol-light-muted) !important;
}

html[data-theme="light"] :is(.wait, .status-wait, .badge-wait, .sol-status-wait) {
  background: #fff3cf !important;
  border: 1px solid rgba(167, 123, 22, .34) !important;
  color: #5b430c !important;
  -webkit-text-fill-color: #5b430c !important;
}

html[data-theme="light"] :is(.ok, .status-ok, .badge-ok, .sol-events-status.ok) {
  background: #e7f7ef !important;
  border: 1px solid rgba(32, 111, 63, .28) !important;
  color: #145232 !important;
  -webkit-text-fill-color: #145232 !important;
}

html[data-theme="light"] :is(.danger, .status-danger, .badge-danger) {
  background: #fff0ee !important;
  border: 1px solid rgba(176, 58, 46, .28) !important;
  color: #8e2f27 !important;
  -webkit-text-fill-color: #8e2f27 !important;
}

html[data-theme="light"] #eventi .sol-events-status.ok,
html[data-theme="light"] #check-in .wait,
html[data-theme="light"] #check-in .ok {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 900;
}

html[data-theme="light"] #storico .sol-v29-search-wrap,
html[data-theme="light"] #storico .sol-v29-toolbar {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] #storico .sol-v29-search-wrap span {
  color: var(--sol-light-muted) !important;
  -webkit-text-fill-color: var(--sol-light-muted) !important;
}

/* v86 operational clarity: cancelled rows remain visible but crossed out. */
.sol-stable-checkin-cards article.is-cancelled,
.sol-management-card.is-cancelled,
.sol-plantina-op-card.is-cancelled,
.sol-calendar-res-row.is-cancelled,
.sol-enterprise-table tr.is-cancelled td {
  opacity: .68 !important;
  filter: grayscale(.18);
}

.sol-stable-checkin-cards article.is-cancelled :is(strong, span, small, div),
.sol-management-card.is-cancelled :is(strong, span, small, div),
.sol-plantina-op-card.is-cancelled :is(strong, span, small, div),
.sol-calendar-res-row.is-cancelled :is(strong, span, small, div),
.sol-enterprise-table tr.is-cancelled td {
  text-decoration: line-through !important;
  text-decoration-thickness: 1.5px !important;
  text-decoration-color: rgba(220, 80, 72, .78) !important;
}

.sol-stable-checkin-cards article.is-cancelled,
.sol-management-card.is-cancelled,
.sol-plantina-op-card.is-cancelled,
.sol-calendar-res-row.is-cancelled {
  border-color: rgba(220, 80, 72, .34) !important;
  background: rgba(220, 80, 72, .07) !important;
}

.sol-stable-checkin-cards article.is-cancelled button,
.sol-management-card.is-cancelled button,
.sol-plantina-op-card.is-cancelled button,
.sol-calendar-res-row.is-cancelled button {
  text-decoration: none !important;
  opacity: 1 !important;
}

html[data-theme="light"] :is(.sol-stable-checkin-cards article.is-cancelled, .sol-management-card.is-cancelled, .sol-plantina-op-card.is-cancelled, .sol-calendar-res-row.is-cancelled) {
  background: #fff1f0 !important;
  border-color: rgba(180, 54, 45, .28) !important;
}

html[data-theme="light"] .sol-enterprise-table tr.is-cancelled td {
  background: #fff1f0 !important;
  color: #6b7280 !important;
}

.sol-remaining-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.sol-remaining-card {
  border: 1px solid rgba(46, 165, 153, .28);
  border-radius: 10px;
  background: rgba(46, 165, 153, .09);
  padding: 12px;
}

.sol-remaining-card span {
  display: block;
  color: var(--sol-muted);
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sol-remaining-card strong {
  display: block;
  margin-top: 4px;
  color: var(--sol-text);
  font-size: 1.45rem;
}

.sol-remaining-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.sol-remaining-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--sol-border);
  border-radius: 9px;
  background: var(--sol-panel-2);
  padding: 9px 10px;
}

.sol-remaining-list strong {
  color: var(--sol-text);
}

.sol-remaining-list small {
  color: var(--sol-muted);
  font-weight: 800;
}

.sol-remaining-list .warn {
  color: #e09124;
}

.sol-remaining-list .ok {
  color: #33b679;
}

@media (max-width: 760px) {
  .sol-remaining-overview {
    grid-template-columns: 1fr;
  }
}

html[data-theme="light"] .sol-remaining-card,
html[data-theme="light"] .sol-remaining-list article {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .16) !important;
  color: var(--sol-light-text) !important;
}

/* v87 mobile polish: compact nav and clearer availability slots. */
@media (max-width: 768px) {
  .command-bar,
  .bottom-nav,
  .mobile-bottom-nav {
    min-height: calc(72px + env(safe-area-inset-bottom)) !important;
    height: calc(72px + env(safe-area-inset-bottom)) !important;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom)) !important;
    overflow-y: hidden !important;
  }

  .sol-command-row-main {
    align-items: stretch !important;
    gap: 5px !important;
  }

  .sol-command-row-main .cmd-btn,
  .bottom-nav button,
  .mobile-bottom-nav button {
    min-width: 52px !important;
    min-height: 54px !important;
    max-height: 58px !important;
    padding: 5px 4px !important;
    border-radius: 11px !important;
    line-height: 1.05 !important;
  }

  .sol-command-row-main .cmd-btn::before {
    font-size: .95rem !important;
    line-height: 1 !important;
    margin-bottom: 2px !important;
  }

  .sol-command-row-main .cmd-btn::after {
    max-width: 58px !important;
    min-height: auto !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    font-size: .54rem !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
  }

  .main-content {
    padding-bottom: calc(88px + env(safe-area-inset-bottom)) !important;
  }

  .sol-booking-slot-grid {
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    margin-top: 8px !important;
  }

  .sol-booking-slot-chip {
    min-height: 50px !important;
    grid-template-columns: 18px 1fr auto !important;
    border-radius: 14px !important;
    padding: 9px 10px !important;
    background: linear-gradient(180deg, rgba(31, 40, 43, .98), rgba(22, 29, 31, .98)) !important;
    border-color: rgba(255, 255, 255, .12) !important;
  }

  .sol-booking-slot-chip strong {
    font-size: 1.06rem !important;
    font-weight: 900 !important;
  }

  .sol-booking-slot-chip small {
    min-width: 74px !important;
    border-radius: 999px !important;
    padding: 5px 8px !important;
    background: rgba(255, 255, 255, .06) !important;
    text-align: center !important;
    color: rgba(247, 242, 223, .78) !important;
  }

  .sol-slot-dot {
    width: 14px !important;
    height: 14px !important;
  }
}

html[data-theme="light"] .sol-booking-slot-chip {
  background: #ffffff !important;
  border-color: rgba(27, 43, 39, .18) !important;
  color: #111817 !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .04) !important;
}

html[data-theme="light"] .sol-booking-slot-chip small {
  background: #f4f7f5 !important;
  color: #34443f !important;
}

html[data-theme="light"] .sol-booking-slot-chip.is-selected {
  border-color: #147d75 !important;
  background: #e9fbf7 !important;
  box-shadow: 0 0 0 2px rgba(20, 125, 117, .18) inset !important;
}

html[data-theme="light"] .sol-booking-slot-chip.is-full {
  background: #fff2f1 !important;
  border-color: rgba(178, 62, 52, .24) !important;
}

/* v88: remove noisy dashboard slots, keep booking slots compact, and harden mobile nav labels. */
#dashboard .sol-remaining-overview {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 768px) {
  .command-bar.sol-command-bar-v36-18,
  .command-bar,
  .bottom-nav,
  .mobile-bottom-nav {
    height: calc(68px + env(safe-area-inset-bottom)) !important;
    min-height: calc(68px + env(safe-area-inset-bottom)) !important;
    padding: 5px 7px calc(5px + env(safe-area-inset-bottom)) !important;
  }

  .sol-command-row-main {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
  }

  .sol-command-row-main > .cmd-btn,
  .sol-command-row-main > .sol-more-nav > .cmd-btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 50px !important;
    max-height: 54px !important;
    padding: 4px 2px !important;
    border-radius: 10px !important;
    font-size: 0 !important;
    line-height: 1 !important;
    overflow: hidden !important;
  }

  .sol-command-row-main > .sol-more-nav {
    min-width: 0 !important;
    width: 100% !important;
  }

  .sol-command-row-main > .cmd-btn::before,
  .sol-command-row-main > .sol-more-nav > .cmd-btn::before {
    display: block !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    margin: 0 0 3px !important;
  }

  .sol-command-row-main > .cmd-btn::after,
  .sol-command-row-main > .sol-more-nav > .cmd-btn::after {
    display: block !important;
    max-width: none !important;
    min-height: 0 !important;
    color: currentColor !important;
    font-size: .56rem !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    overflow: hidden !important;
  }

  .sol-command-row-main > .cmd-btn[data-target="dashboard"]::after { content: "Home" !important; }
  .sol-command-row-main > .cmd-btn[data-target="prenotazioni"]::after { content: "Nuova" !important; }
  .sol-command-row-main > .cmd-btn[data-target="eventi"]::after { content: "Eventi" !important; }
  .sol-command-row-main > .cmd-btn[data-target="check-in"]::after { content: "Check-in" !important; }
  .sol-command-row-main > .cmd-btn[data-target="plantina-interattiva"]::after { content: "Tavoli" !important; }
  .sol-command-row-main > .sol-more-nav > .sol-more-nav-button::after { content: "Altro" !important; }

  .sol-command-row-main > .cmd-btn[data-target="dashboard"]::before { content: "📊" !important; }
  .sol-command-row-main > .cmd-btn[data-target="prenotazioni"]::before { content: "＋" !important; }
  .sol-command-row-main > .cmd-btn[data-target="eventi"]::before { content: "🎉" !important; }
  .sol-command-row-main > .cmd-btn[data-target="check-in"]::before { content: "☑" !important; }
  .sol-command-row-main > .cmd-btn[data-target="plantina-interattiva"]::before { content: "▣" !important; }
  .sol-command-row-main > .sol-more-nav > .sol-more-nav-button::before { content: "…" !important; }

  #prenotazioni .sol-booking-slot-grid {
    max-height: 188px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding: 6px !important;
    border: 1px solid var(--sol-border) !important;
    border-radius: 14px !important;
    background: rgba(0, 0, 0, .16) !important;
  }

  #prenotazioni .sol-booking-slot-chip {
    min-height: 42px !important;
    padding: 8px 9px !important;
  }
}

html[data-theme="light"] #prenotazioni .sol-booking-slot-grid {
  background: #f7f9f6 !important;
  border-color: rgba(28, 43, 39, .16) !important;
}

/* v89: hard block any old dashboard slot residue and improve event modal sizing. */
#dashboard .sol-remaining-card:has(span:first-child:nth-last-child(n)) {
  min-width: 0 !important;
}

#dashboard .sol-remaining-card:has(span:first-child):has(strong):has(small) {
  overflow: hidden !important;
}

#dashboard .sol-remaining-card:has(span:first-child),
#dashboard .sol-remaining-list article {
  word-break: normal !important;
}

#dashboard .sol-remaining-card:has(span:first-child) span {
  white-space: normal !important;
}

#dashboard .sol-remaining-card:has(span:first-child) span:not(:empty) {
  max-width: 100% !important;
}

#dashboard .sol-remaining-card:has(span:first-child) span,
#dashboard .sol-remaining-card:has(span:first-child) small {
  overflow-wrap: anywhere !important;
}

#dashboard .sol-remaining-card:has(span:first-child) span:where(:not(:empty)) {
  display: block !important;
}

#dashboard .sol-remaining-card:has(span:first-child) span {
  pointer-events: none;
}

#dashboard .sol-remaining-card:has(span:first-child) span {
  text-transform: uppercase;
}

#dashboard .sol-remaining-card:has(span:first-child) span:where(:not(:empty)) {
  color: var(--sol-muted);
}

#dashboard .sol-remaining-card:has(span:first-child:nth-child(1)) {
  contain: layout paint;
}

#dashboard .sol-remaining-card:has(span:first-child:nth-child(1):not(:empty)) {
  isolation: isolate;
}

#dashboard .sol-remaining-card:has(span:first-child:nth-child(1)) {
  position: relative;
}

#dashboard .sol-remaining-card:has(span:first-child:nth-child(1)) span {
  position: relative;
  z-index: 1;
}

#dashboard .sol-remaining-card:has(span:first-child:nth-child(1)) strong,
#dashboard .sol-remaining-card:has(span:first-child:nth-child(1)) small {
  position: relative;
  z-index: 1;
}

#dashboard .sol-remaining-card:has(span:first-child:nth-child(1)) span {
  text-decoration: none !important;
}

#dashboard .sol-remaining-card:has(span:first-child:nth-child(1)) small {
  text-decoration: none !important;
}

#dashboard .sol-remaining-card:has(span:first-child:nth-child(1)) strong {
  text-decoration: none !important;
}

@media (max-width: 768px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 10px !important;
    overflow: hidden !important;
  }

  #modal-evento .lux-modal {
    width: min(100%, 520px) !important;
    max-width: none !important;
    max-height: calc(92dvh - env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    border-radius: 18px 18px 12px 12px !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  #modal-evento .lux-modal-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 56px !important;
    padding: 12px 14px !important;
    background: rgba(8, 8, 6, .98) !important;
    border-bottom: 1px solid rgba(212, 175, 55, .22) !important;
  }

  html[data-theme="light"] #modal-evento .lux-modal-header {
    background: #ffffff !important;
    border-bottom-color: rgba(28, 43, 39, .14) !important;
  }

  #modal-evento .lux-modal-header h2 {
    margin: 0 !important;
    min-width: 0 !important;
    font-size: 1rem !important;
    line-height: 1.15 !important;
  }

  #modal-evento [data-action="close-event-form"] {
    position: sticky !important;
    top: 8px !important;
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    border-radius: 999px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    font-size: 0 !important;
    background: rgba(164, 39, 49, .18) !important;
    border: 1px solid rgba(255, 96, 111, .38) !important;
    color: #ffb6bd !important;
  }

  #modal-evento [data-action="close-event-form"]::before {
    content: "×" !important;
    font-size: 1.55rem !important;
    line-height: 1 !important;
    font-weight: 900 !important;
  }

  #modal-evento .lux-form-eventi {
    padding: 12px 12px calc(20px + env(safe-area-inset-bottom)) !important;
  }
}

/* v90 enterprise bonifica: centered pages, predictable modal opening, mobile-safe analytics/history. */
#analytics,
#storico,
#impostazioni,
#report,
#ricerca,
#backup,
#notifiche,
#guida {
  box-sizing: border-box !important;
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

#analytics .sol-enterprise-analytics,
#storico.sol-history-enterprise,
#storico .sol-history-enterprise,
#storico .sol-v29-history-shell,
#storico .sol-v29-hero,
#storico .sol-v29-history-main {
  box-sizing: border-box !important;
}

#modal-evento.lux-modal-backdrop:not(.closed),
#modal-modifica:not(.hidden),
#modal-modifica-pren:not(:empty) #modal-overlay-modifica {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

#modal-evento .lux-modal,
#modal-modifica .modal-content,
#modal-modifica-pren #modal-overlay-modifica > div {
  max-height: calc(100dvh - 32px) !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-behavior: auto !important;
}

#modal-evento .lux-modal-header,
#modal-modifica .modal-close {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}

html[data-theme="light"] #analytics,
html[data-theme="light"] #storico,
html[data-theme="light"] #report,
html[data-theme="light"] #ricerca,
html[data-theme="light"] #backup,
html[data-theme="light"] #notifiche,
html[data-theme="light"] #guida {
  color: #101716 !important;
}

html[data-theme="light"] .sol-enterprise-head,
html[data-theme="light"] .sol-analytics-panel,
html[data-theme="light"] .sol-history-panel,
html[data-theme="light"] .sol-v29-history-shell,
html[data-theme="light"] .sol-v29-history-main,
html[data-theme="light"] .sol-v29-content,
html[data-theme="light"] .sol-v29-card {
  color: #101716 !important;
}

@media (max-width: 768px) {
  #analytics,
  #storico,
  #impostazioni,
  #report,
  #ricerca,
  #backup,
  #notifiche,
  #guida {
    padding-inline: 8px !important;
  }

  #analytics .sol-enterprise-analytics,
  #storico.sol-history-enterprise,
  #storico .sol-history-enterprise,
  #storico .sol-v29-history-shell,
  #storico .sol-v29-hero {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #storico .sol-v29-history-shell {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #storico .sol-v29-history-sidebar,
  #storico .sol-v29-toolbar,
  #storico .sol-v29-kpi-row,
  #analytics .sol-enterprise-grid,
  #analytics .sol-enterprise-kpis {
    display: grid !important;
    grid-template-columns: 1fr !important;
    min-width: 0 !important;
  }

  #storico .sol-v29-history-main,
  #storico .sol-v29-content,
  #analytics .sol-analytics-panel,
  #analytics .sol-enterprise-table-wrap {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: auto !important;
  }

  #modal-evento.lux-modal-backdrop:not(.closed),
  #modal-modifica:not(.hidden),
  #modal-modifica-pren:not(:empty) #modal-overlay-modifica {
    align-items: flex-start !important;
    padding: 10px !important;
    padding-top: max(10px, env(safe-area-inset-top)) !important;
  }

  #modal-evento .lux-modal,
  #modal-modifica .modal-content,
  #modal-modifica-pren #modal-overlay-modifica > div {
    width: min(100%, 560px) !important;
    max-height: calc(100dvh - 20px - env(safe-area-inset-bottom)) !important;
  }
}

/* v91 enterprise polish: analytics/history readability and mobile centering. */
.sol-enterprise-analytics,
.sol-history-enterprise,
#storico .sol-v29-history-shell,
#storico .sol-v29-hero {
  max-width: 1480px !important;
}

.sol-enterprise-table-wrap {
  scrollbar-width: thin;
}

.sol-enterprise-table th,
.sol-enterprise-table td {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.sol-enterprise-kpi,
.sol-analytics-panel,
.sol-history-panel,
.sol-v29-kpi {
  min-width: 0 !important;
}

html[data-theme="light"] .sol-enterprise-head {
  background: linear-gradient(135deg, #ffffff 0%, #f7faf8 62%, #fff6df 100%) !important;
  border-color: rgba(30, 48, 44, .16) !important;
  box-shadow: 0 18px 40px rgba(16, 23, 22, .08) !important;
}

html[data-theme="light"] .sol-enterprise-head h1,
html[data-theme="light"] .sol-panel-title strong,
html[data-theme="light"] .sol-enterprise-kpi strong,
html[data-theme="light"] .sol-capacity-numbers,
html[data-theme="light"] .sol-history-panel h3 {
  color: #101716 !important;
}

html[data-theme="light"] .sol-enterprise-head p,
html[data-theme="light"] .sol-enterprise-kpi small,
html[data-theme="light"] .sol-capacity-numbers span,
html[data-theme="light"] .sol-analytics-capacity p,
html[data-theme="light"] .sol-enterprise-table td {
  color: #2b3a37 !important;
}

html[data-theme="light"] .sol-enterprise-freshness {
  background: #e8f7f4 !important;
  border-color: rgba(24, 128, 119, .24) !important;
  color: #075b54 !important;
}

html[data-theme="light"] .sol-enterprise-kpi,
html[data-theme="light"] .sol-analytics-panel,
html[data-theme="light"] .sol-history-panel,
html[data-theme="light"] .sol-v29-kpi {
  background: #ffffff !important;
  border-color: rgba(30, 48, 44, .16) !important;
  box-shadow: 0 12px 26px rgba(16, 23, 22, .07) !important;
}

html[data-theme="light"] .sol-enterprise-table-wrap {
  border-color: rgba(30, 48, 44, .14) !important;
  background: #ffffff !important;
}

html[data-theme="light"] .sol-enterprise-table th {
  background: #142238 !important;
  color: #ffffff !important;
}

html[data-theme="light"] .sol-enterprise-table td {
  background: #f7faf8 !important;
  border-color: rgba(30, 48, 44, .13) !important;
}

html[data-theme="light"] .sol-enterprise-table tr:nth-child(even) td {
  background: #eef4f1 !important;
}

@media (max-width: 768px) {
  .sol-enterprise-head {
    padding: 14px !important;
    border-radius: 12px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .sol-enterprise-head h1 {
    font-size: 1.55rem !important;
    line-height: 1.05 !important;
  }

  .sol-enterprise-freshness {
    width: fit-content !important;
    max-width: 100% !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  .sol-analytics-kpi-grid,
  .sol-v29-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .sol-enterprise-kpi,
  .sol-v29-kpi {
    min-height: 82px !important;
    padding: 10px !important;
  }

  .sol-enterprise-kpi strong,
  .sol-v29-kpi strong {
    font-size: 1.22rem !important;
  }

  .sol-analytics-grid-main,
  .sol-history-two-col {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .sol-analytics-panel,
  .sol-history-panel {
    padding: 12px !important;
    border-radius: 12px !important;
  }

  .sol-enterprise-table {
    min-width: 560px !important;
  }

  #storico .sol-v29-toolbar {
    gap: 8px !important;
  }

  #storico .sol-v29-toolbar input,
  #storico .sol-v29-toolbar select {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 420px) {
  .sol-analytics-kpi-grid,
  .sol-v29-kpi-row {
    grid-template-columns: 1fr !important;
  }

  .sol-enterprise-table {
    min-width: 500px !important;
  }

/* v111 enterprise layout guardrails: prevent desktop/tablet overflow from legacy layers. */
html,
body,
#app,
main,
.main-content,
.view,
.view-section {
  max-width: 100%;
  overflow-x: clip;
}

#plantina-interattiva .container,
#plantina-interattiva .sol-plantina-hero,
#plantina-interattiva .sol-plantina-layout,
#plantina-interattiva .sol-plantina-map,
#plantina-interattiva .sol-plantina-shell,
#storico .sol-v29-history-shell,
#storico .sol-v29-content,
#storico #sol-history-content,
#storico #sol-history-panel,
#storico .sol-history-two-col,
#analytics .sol-enterprise-analytics,
#analytics .sol-analytics-grid-main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#plantina-interattiva .sol-plantina-hero {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#storico .sol-history-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#storico .sol-history-two-col > section,
#storico .sol-enterprise-table-wrap,
#analytics .sol-enterprise-table-wrap {
  min-width: 0 !important;
  max-width: 100% !important;
}

@media (max-width: 1100px) {
  #storico .sol-history-two-col {
    grid-template-columns: 1fr !important;
  }
}

/* v112 final hard override: this must stay after all legacy layers. */
html[data-theme] body .site-header {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 8px clamp(12px, 2.2vw, 28px) !important;
  overflow: visible !important;
}

html[data-theme] body .site-header .header-inner {
  display: grid !important;
  grid-template-columns: minmax(170px, 320px) minmax(0, 1fr) auto minmax(150px, 220px) !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  gap: clamp(10px, 1.6vw, 20px) !important;
  width: min(100%, 1540px) !important;
  max-width: 1540px !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  overflow: visible !important;
}

html[data-theme] body .site-header .brand,
html[data-theme] body .site-header .brand-title,
html[data-theme] body .site-header .lux-badge-supabase,
html[data-theme] body .site-header .sol-weather-widget,
html[data-theme] body .site-header .brand-main {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  transform: none !important;
}

html[data-theme] body .site-header .brand-logo {
  width: auto !important;
  max-width: min(100%, 310px) !important;
  max-height: 70px !important;
  object-fit: contain !important;
}

html[data-theme] body .site-header .brand-title {
  width: 100% !important;
  min-width: 0 !important;
  justify-self: stretch !important;
  text-align: center !important;
  overflow: visible !important;
}

html[data-theme] body .site-header .brand-main {
  display: block !important;
  margin: 0 0 4px !important;
  padding: 2px 0 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  white-space: normal !important;
  font-size: clamp(1.42rem, 2.65vw, 2.5rem) !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

html[data-theme] body .site-header .brand-sub {
  display: inline-flex !important;
  min-height: 24px !important;
  padding: 3px 13px !important;
  font-size: clamp(.78rem, 1vw, .92rem) !important;
  line-height: 1.1 !important;
}

html[data-theme] body .site-header .brand-datetime {
  margin-top: 5px !important;
  font-size: clamp(.74rem, .95vw, .9rem) !important;
  line-height: 1.2 !important;
}

html[data-theme] body .site-header .lux-badge-supabase {
  justify-self: end !important;
  min-height: 36px !important;
}

html[data-theme] body .site-header .sol-weather-widget {
  justify-self: end !important;
  width: 100% !important;
  max-width: 220px !important;
  min-height: 70px !important;
  padding: 10px 12px !important;
}

html[data-theme] body #dashboard .sol-service-hero {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  aspect-ratio: auto !important;
  block-size: auto !important;
  height: auto !important;
  min-height: 0 !important;
  min-block-size: 0 !important;
  max-height: none !important;
  padding: 12px 16px !important;
  margin: 0 0 10px !important;
  gap: 12px !important;
  overflow: hidden !important;
}

html[data-theme] body #dashboard .sol-service-copy h2 {
  margin: 0 !important;
  font-size: clamp(1.15rem, 1.75vw, 1.5rem) !important;
  line-height: 1.08 !important;
}

html[data-theme] body #dashboard .sol-service-copy p {
  margin: 0 !important;
  font-size: .82rem !important;
  line-height: 1.25 !important;
}

@media (max-width: 1100px) {
  html[data-theme] body .site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html[data-theme] body .site-header .brand,
  html[data-theme] body .site-header .sol-weather-widget {
    display: none !important;
  }
}

@media (max-width: 760px) {
  html[data-theme] body .site-header {
    padding: 8px 10px !important;
  }

  html[data-theme] body .site-header .brand-title {
    text-align: left !important;
  }

  html[data-theme] body .site-header .brand-main {
    font-size: clamp(1.18rem, 7vw, 1.72rem) !important;
    line-height: 1.02 !important;
  }

  html[data-theme] body .site-header .brand-sub,
  html[data-theme] body .site-header .brand-datetime {
    justify-content: flex-start !important;
    font-size: .72rem !important;
  }

  html[data-theme] body #dashboard .sol-service-hero {
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }
}

/* v112 enterprise polish: compact first viewport and keep critical headers unbroken. */
.site-header {
  padding: 8px clamp(12px, 2.2vw, 28px) !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.site-header .header-inner {
  display: grid !important;
  grid-template-columns: minmax(170px, 320px) minmax(0, 1fr) auto minmax(150px, 220px) !important;
  align-items: center !important;
  gap: clamp(10px, 1.6vw, 20px) !important;
  min-height: 88px !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.site-header .brand,
.site-header .brand-title,
.site-header .lux-badge-supabase,
.site-header .sol-weather-widget {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 !important;
}

.site-header .brand-logo {
  width: auto !important;
  max-width: min(100%, 310px) !important;
  max-height: 70px !important;
  object-fit: contain !important;
}

.site-header .brand-title {
  min-width: 0 !important;
  width: 100% !important;
  align-self: center !important;
  justify-self: stretch !important;
  text-align: center !important;
  overflow: visible !important;
}

.site-header .brand-main {
  display: block !important;
  position: static !important;
  inset: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 0 4px !important;
  padding: 3px 0 0 !important;
  max-width: 100% !important;
  overflow: visible !important;
  white-space: normal !important;
  font-size: clamp(1.45rem, 2.75vw, 2.55rem) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

.site-header .brand-sub {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 26px !important;
  padding: 3px 14px !important;
  font-size: clamp(.78rem, 1.1vw, .95rem) !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

.site-header .brand-datetime {
  margin-top: 5px !important;
  font-size: clamp(.76rem, 1vw, .92rem) !important;
  line-height: 1.2 !important;
  white-space: normal !important;
}

.site-header .lux-badge-supabase {
  justify-self: end !important;
  min-height: 38px !important;
}

.site-header .sol-weather-widget {
  justify-self: end !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 220px !important;
  min-height: 72px !important;
  padding: 10px 12px !important;
}

#dashboard .container {
  padding-top: clamp(12px, 1.8vw, 18px) !important;
}

#dashboard .sol-service-hero {
  aspect-ratio: auto !important;
  block-size: auto !important;
  height: auto !important;
  min-height: 0 !important;
  min-block-size: 0 !important;
  max-height: none !important;
  padding: 12px 16px !important;
  margin: 0 0 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  overflow: hidden !important;
}

#dashboard .sol-service-hero::before,
#dashboard .sol-service-hero::after {
  opacity: .22 !important;
  transform: scale(.72) !important;
}

#dashboard .sol-service-copy {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

#dashboard .sol-service-copy h2 {
  margin: 0 !important;
  font-size: clamp(1.15rem, 1.75vw, 1.5rem) !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

#dashboard .sol-service-copy p {
  margin: 0 !important;
  font-size: .82rem !important;
  line-height: 1.25 !important;
}

#dashboard .sol-eyebrow {
  width: fit-content !important;
  min-height: 22px !important;
  padding: 3px 10px !important;
  font-size: .68rem !important;
  line-height: 1.1 !important;
}

#modal-evento.lux-modal-backdrop:not(.closed) {
  align-items: flex-start !important;
  padding: max(6px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom)) !important;
}

#modal-evento .lux-modal {
  display: flex !important;
  flex-direction: column !important;
  width: min(820px, calc(100vw - 20px)) !important;
  max-height: calc(100dvh - 14px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

#modal-evento .lux-modal-header {
  flex: 0 0 auto !important;
  min-height: 46px !important;
  padding: 8px 12px !important;
  gap: 10px !important;
}

#modal-evento .lux-modal-header h2 {
  margin: 0 !important;
  font-size: clamp(1rem, 1.8vw, 1.18rem) !important;
  line-height: 1.1 !important;
  white-space: normal !important;
}

#modal-evento [data-action="close-event-form"] {
  min-width: 38px !important;
  min-height: 38px !important;
  padding: 6px 9px !important;
}

#modal-evento #form-evento,
#modal-evento .lux-form-eventi {
  flex: 1 1 auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom)) !important;
  scroll-padding-top: 12px !important;
}

#modal-evento .lux-section-title {
  margin: 10px 0 8px !important;
  font-size: .86rem !important;
  line-height: 1.2 !important;
}

#modal-evento .lux-grid {
  gap: 8px !important;
}

.sol-v32-availability.is-unavailable .sol-v32-current {
  background: rgba(20, 20, 20, .58) !important;
  border-color: rgba(255, 255, 255, .18) !important;
  color: #f4f4f4 !important;
}

@media (max-width: 1100px) {
  .site-header .header-inner {
    grid-template-columns: minmax(130px, 240px) minmax(220px, 1fr) auto !important;
    min-height: 78px !important;
  }

  .site-header .sol-weather-widget {
    display: none !important;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 8px 10px !important;
  }

  .site-header .header-inner {
    grid-template-columns: 1fr auto !important;
    min-height: 0 !important;
    gap: 8px !important;
  }

  .site-header .brand {
    display: none !important;
  }

  .site-header .brand-title {
    text-align: left !important;
  }

  .site-header .brand-main {
    font-size: clamp(1.18rem, 7vw, 1.72rem) !important;
    line-height: 1.02 !important;
  }

  .site-header .brand-sub,
  .site-header .brand-datetime {
    justify-content: flex-start !important;
    font-size: .72rem !important;
  }

  .site-header .lux-badge-supabase {
    min-height: 32px !important;
    padding: 6px 9px !important;
    font-size: .72rem !important;
  }

  #dashboard .sol-service-hero {
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }

  #dashboard .sol-service-copy h2 {
    font-size: 1.1rem !important;
  }

  #modal-evento.lux-modal-backdrop:not(.closed) {
    padding: max(4px, env(safe-area-inset-top)) 6px max(6px, env(safe-area-inset-bottom)) !important;
  }

  #modal-evento .lux-modal {
    width: calc(100vw - 12px) !important;
    max-height: calc(100dvh - 10px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }

  #modal-evento .lux-modal-header {
    min-height: 42px !important;
    padding: 7px 10px !important;
  }
}
}

/* v93 modal safety: event/edit modals must always sit above bottom navigation. */
#modal-evento.lux-modal-backdrop:not(.closed) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow: hidden !important;
}

#modal-evento .lux-modal {
  position: relative !important;
  z-index: 2147483647 !important;
}

body.modal-open .command-bar,
body.modal-open .bottom-nav,
body.modal-open .mobile-bottom-nav {
  pointer-events: none !important;
}

body.modal-open #modal-evento,
body.modal-open #modal-evento * {
  pointer-events: auto !important;
}

@media (max-width: 768px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    align-items: flex-start !important;
    padding: 10px !important;
    padding-top: max(10px, env(safe-area-inset-top)) !important;
  }
}

/* v94 modal safety: header must not intercept event modal controls on mobile. */
body.modal-open .site-header,
body.modal-open header.site-header,
body.modal-open .header-inner,
body.modal-open .command-bar,
body.modal-open .bottom-nav,
body.modal-open .mobile-bottom-nav {
  pointer-events: none !important;
}

body.modal-open #modal-evento,
body.modal-open #modal-evento *,
body.modal-open #modal-modifica,
body.modal-open #modal-modifica *,
body.modal-open #modal-modifica-pren,
body.modal-open #modal-modifica-pren * {
  pointer-events: auto !important;
}

#modal-evento.lux-modal-backdrop:not(.closed) {
  z-index: 2147483647 !important;
}

#modal-evento [data-action="close-event-form"] {
  z-index: 2147483647 !important;
}

/* v99 plantina mobile table availability map */
.sol-plantina-table-map {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.sol-plantina-table-map-head,
.sol-plantina-area-block {
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--sol-panel) 92%, transparent);
}

.sol-plantina-table-map-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.sol-plantina-table-map-head span,
.sol-plantina-table-map-head small,
.sol-plantina-area-block small {
  display: block;
  color: var(--sol-muted);
  font-size: .72rem;
}

.sol-plantina-table-map-head strong,
.sol-plantina-table-map-head b,
.sol-plantina-area-block strong,
.sol-plantina-area-block b {
  color: var(--sol-text);
}

.sol-plantina-table-map-head > div:not(:first-child) {
  min-width: 70px;
  padding: 8px;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  text-align: center;
  background: rgba(255,255,255,.03);
}

.sol-plantina-area-block {
  padding: 10px;
}

.sol-plantina-area-block > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sol-plantina-area-block > header b {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(35, 151, 142, .18);
  color: var(--sol-accent);
  white-space: nowrap;
}

.sol-plantina-table-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(94px, 1fr));
  gap: 7px;
}

.sol-plantina-table-chips button {
  min-height: 54px;
  display: grid;
  gap: 3px;
  justify-items: start;
  border: 1px solid var(--sol-border);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255,255,255,.035);
  color: var(--sol-text);
  text-align: left;
}

.sol-plantina-table-chips button span {
  font-weight: 900;
  line-height: 1;
}

.sol-plantina-table-chips button small {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .66rem;
}

.sol-plantina-table-chips button.free {
  border-color: rgba(51, 182, 121, .38);
}

.sol-plantina-table-chips button.free span {
  color: #33b679;
}

.sol-plantina-table-chips button.occupied {
  border-color: rgba(185, 147, 66, .5);
  background: rgba(185, 147, 66, .1);
}

.sol-plantina-table-chips button.occupied span {
  color: var(--sol-warm);
}

.sol-plantina-reservation-list {
  display: grid;
  gap: 8px;
}

.sol-plantina-reservation-list > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--sol-muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

html[data-theme="light"] .sol-plantina-table-map-head,
html[data-theme="light"] .sol-plantina-area-block {
  background: #ffffff !important;
  border-color: var(--sol-light-border) !important;
  box-shadow: 0 8px 20px rgba(16, 23, 22, .06) !important;
}

html[data-theme="light"] .sol-plantina-table-chips button {
  background: #f7faf8 !important;
  border-color: var(--sol-light-border) !important;
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] .sol-plantina-table-map-head span,
html[data-theme="light"] .sol-plantina-table-map-head small,
html[data-theme="light"] .sol-plantina-area-block small,
html[data-theme="light"] .sol-plantina-reservation-list > header {
  color: var(--sol-light-muted) !important;
}

html[data-theme="light"] .sol-plantina-table-map-head strong,
html[data-theme="light"] .sol-plantina-table-map-head b,
html[data-theme="light"] .sol-plantina-area-block strong,
html[data-theme="light"] .sol-plantina-area-block b {
  color: var(--sol-light-text) !important;
}

@media (max-width: 768px) {
  .sol-plantina-table-map-head {
    grid-template-columns: 1fr 72px 72px;
  }

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

  .sol-plantina-table-chips button {
    min-height: 50px;
    padding: 7px;
  }
}

@media (max-width: 380px) {
  .sol-plantina-table-chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Enterprise booking calendar: distinguish events from reservations */
#calendario-prenotazioni .sol-calendar-event-row {
  border-left: 4px solid rgba(212, 167, 62, .82) !important;
  background: linear-gradient(90deg, rgba(212, 167, 62, .14), rgba(212, 167, 62, .04)) !important;
}

#calendario-prenotazioni .sol-calendar-event-row .sol-calendar-res-meta {
  color: #f0d58a !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-event-row {
  background: #fff8e8 !important;
  border-color: rgba(173, 125, 31, .34) !important;
  border-left-color: #b57a16 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-event-row .sol-calendar-res-meta {
  color: #72500d !important;
}

/* Solstitium v104 release hardening: persistent PWA update and final light readability pass */
.sol-pwa-update-card.is-visible {
  position: fixed !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
  z-index: 2147483000 !important;
}

.sol-pwa-update-card.is-visible strong,
.sol-pwa-update-card.is-visible p,
.sol-pwa-update-card.is-visible button {
  opacity: 1 !important;
}

.sol-pwa-update-card.is-visible button:disabled {
  opacity: .76 !important;
  cursor: wait !important;
}

@media (max-width: 720px) {
  .sol-pwa-update-card.is-visible {
    left: 10px !important;
    right: 10px !important;
    bottom: calc(var(--sol-mobile-nav-h, 76px) + 14px) !important;
    max-width: none !important;
  }
}

html[data-theme="light"] :is(
  #dashboard,
  #prenotazioni,
  #calendario-prenotazioni,
  #eventi,
  #check-in,
  #plantina-interattiva,
  #analytics,
  #storico,
  #impostazioni
) :is(.muted, .meta, .subtitle, .card-subtitle, .panel-subtitle, small, p, span) {
  -webkit-text-fill-color: currentColor;
}

html[data-theme="light"] :is(
  #dashboard,
  #prenotazioni,
  #calendario-prenotazioni,
  #eventi,
  #check-in,
  #plantina-interattiva,
  #analytics,
  #storico,
  #impostazioni
) :is(.hero-card, .sol-service-hero, .dashboard-card, .panel, .card, .form-card, .sol-events-calendar-panel, .sol-stable-management, .sol-plantina-operations) {
  color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(
  #dashboard,
  #prenotazioni,
  #calendario-prenotazioni,
  #eventi,
  #check-in,
  #plantina-interattiva,
  #analytics,
  #storico,
  #impostazioni
) :is(.hero-card, .sol-service-hero, .dashboard-card, .panel, .card, .form-card, .sol-events-calendar-panel, .sol-stable-management, .sol-plantina-operations) :is(h1, h2, h3, h4, strong, b, label) {
  color: var(--sol-light-text) !important;
  -webkit-text-fill-color: var(--sol-light-text) !important;
}

html[data-theme="light"] :is(
  #dashboard,
  #prenotazioni,
  #calendario-prenotazioni,
  #eventi,
  #check-in,
  #plantina-interattiva,
  #analytics,
  #storico,
  #impostazioni
) :is(.hero-card, .sol-service-hero, .dashboard-card, .panel, .card, .form-card, .sol-events-calendar-panel, .sol-stable-management, .sol-plantina-operations) :is(p, small, span, td, li) {
  color: var(--sol-light-muted) !important;
  -webkit-text-fill-color: var(--sol-light-muted) !important;
}

html[data-theme="light"] :is(button.primary, .btn.primary, .cmd-btn.active, .bottom-nav .active, .mobile-bottom-nav .active, [aria-current="page"]) :is(span, small, strong, b) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-theme="light"] .sol-pwa-update-card.is-visible {
  background: #ffffff !important;
  border-color: rgba(20, 125, 120, .34) !important;
  color: var(--sol-light-text) !important;
  box-shadow: 0 18px 54px rgba(20, 32, 28, .22) !important;
}

html[data-theme="light"] .sol-pwa-update-card.is-visible strong {
  color: var(--sol-light-text) !important;
  -webkit-text-fill-color: var(--sol-light-text) !important;
}

html[data-theme="light"] .sol-pwa-update-card.is-visible p {
  color: var(--sol-light-muted) !important;
  -webkit-text-fill-color: var(--sol-light-muted) !important;
}

/* v105: booking slot picker, enterprise edit modal, table states and mobile modal top safety. */
.sol-booking-slot-toggle {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--sol-border);
  border-radius: 12px;
  background: var(--sol-panel-soft);
  color: var(--sol-text);
  text-align: left;
  box-shadow: none;
}

.sol-booking-slot-toggle::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: #7ac144;
  box-shadow: 0 0 0 4px rgba(122, 193, 68, .13);
}

.sol-booking-slot-toggle[data-status="warn"]::before { background: #f39a18; box-shadow: 0 0 0 4px rgba(243, 154, 24, .15); }
.sol-booking-slot-toggle[data-status="full"]::before { background: #d24842; box-shadow: 0 0 0 4px rgba(210, 72, 66, .15); }
.sol-booking-slot-toggle[data-status="empty"]::before { background: #77817e; box-shadow: 0 0 0 4px rgba(119, 129, 126, .12); }
.sol-booking-slot-toggle span { color: var(--sol-muted); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.sol-booking-slot-toggle strong { color: var(--sol-text); font-size: 1.1rem; font-weight: 900; }
.sol-booking-slot-toggle small { color: var(--sol-muted); font-weight: 800; text-align: right; }
.sol-booking-slot-grid[hidden] { display: none !important; }

#modal-modifica-pren:not(:empty) #modal-overlay-modifica.sol-edit-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
  background: rgba(0, 0, 0, .72) !important;
  overflow: auto !important;
}

.sol-edit-dialog {
  width: min(760px, 100%) !important;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  overflow: auto !important;
  border: 1px solid var(--sol-border) !important;
  border-radius: 16px !important;
  background: var(--sol-panel) !important;
  color: var(--sol-text) !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42) !important;
  -webkit-overflow-scrolling: touch !important;
}

.sol-edit-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 3 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--sol-border) !important;
  background: var(--sol-panel) !important;
}

.sol-edit-head h2 { margin: 0 !important; font-size: 1.15rem !important; color: var(--sol-text) !important; }
.sol-edit-head p { margin: 3px 0 0 !important; color: var(--sol-muted) !important; font-size: .85rem !important; }
.sol-edit-close { width: 42px !important; height: 42px !important; min-width: 42px !important; border-radius: 999px !important; padding: 0 !important; display: grid !important; place-items: center !important; background: rgba(210,72,66,.14) !important; color: #ffb3ad !important; border: 1px solid rgba(210,72,66,.34) !important; }
.sol-edit-body { padding: 16px !important; }
.sol-edit-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
.sol-edit-field { display: grid !important; gap: 6px !important; min-width: 0 !important; }
.sol-edit-field.full, .sol-edit-total.full { grid-column: 1 / -1 !important; }
.sol-edit-field span { color: var(--sol-muted) !important; font-size: .72rem !important; font-weight: 900 !important; text-transform: uppercase !important; }
.sol-edit-field input, .sol-edit-field select, .sol-edit-field textarea {
  width: 100% !important;
  min-height: 44px !important;
  border: 1px solid var(--sol-border) !important;
  border-radius: 10px !important;
  background: rgba(0,0,0,.14) !important;
  color: var(--sol-text) !important;
  padding: 10px 11px !important;
  font: inherit !important;
}
.sol-edit-field textarea { min-height: 88px !important; resize: vertical !important; }
.sol-edit-slot-hint { color: var(--sol-muted) !important; font-size: .82rem !important; line-height: 1.35 !important; }
.sol-edit-total { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 10px 12px !important; border: 1px solid var(--sol-border) !important; border-radius: 10px !important; background: rgba(46,165,153,.1) !important; }
.sol-edit-total span { color: var(--sol-muted) !important; font-weight: 900 !important; text-transform: uppercase !important; font-size: .75rem !important; }
.sol-edit-total strong { color: var(--sol-text) !important; font-size: 1.15rem !important; }
.sol-edit-actions { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 10px !important; margin-top: 16px !important; }
.sol-edit-actions button { min-height: 44px !important; border-radius: 10px !important; font-weight: 900 !important; }
.sol-edit-save { background: #2f938c !important; color: #fff !important; border: 1px solid rgba(46,165,153,.36) !important; }
.sol-edit-danger { background: rgba(210,72,66,.16) !important; color: #ffb3ad !important; border: 1px solid rgba(210,72,66,.34) !important; }
.sol-edit-cancel { background: transparent !important; color: var(--sol-text) !important; border: 1px solid var(--sol-border) !important; }

.sol-plantina-table-chips button.free {
  border-color: rgba(51,182,121,.65) !important;
  background: rgba(51,182,121,.12) !important;
}
.sol-plantina-table-chips button.free span { color: #33b679 !important; }
.sol-plantina-table-chips button.occupied {
  border-color: rgba(210,72,66,.7) !important;
  background: rgba(210,72,66,.16) !important;
}
.sol-plantina-table-chips button.occupied span { color: #ff7971 !important; }
.sol-plantina-table-chips button.event {
  border-color: rgba(14,165,233,.55) !important;
  background: rgba(14,165,233,.18) !important;
}
.sol-plantina-table-chips button.event span { color: #38bdf8 !important; }
.sol-plantina-table-chips button.unavailable {
  border-color: rgba(0,0,0,.72) !important;
  background: #050505 !important;
  color: #858585 !important;
}
.sol-plantina-table-chips button.unavailable span { color: #9a9a9a !important; }

html[data-theme="light"] .sol-booking-slot-toggle,
html[data-theme="light"] .sol-edit-dialog,
html[data-theme="light"] .sol-edit-head {
  background: #ffffff !important;
  color: #111817 !important;
  border-color: rgba(28,43,39,.18) !important;
}
html[data-theme="light"] .sol-booking-slot-toggle strong,
html[data-theme="light"] .sol-edit-head h2,
html[data-theme="light"] .sol-edit-total strong { color: #111817 !important; }
html[data-theme="light"] .sol-booking-slot-toggle span,
html[data-theme="light"] .sol-booking-slot-toggle small,
html[data-theme="light"] .sol-edit-head p,
html[data-theme="light"] .sol-edit-field span,
html[data-theme="light"] .sol-edit-slot-hint,
html[data-theme="light"] .sol-edit-total span { color: #40514c !important; }
html[data-theme="light"] .sol-edit-field input,
html[data-theme="light"] .sol-edit-field select,
html[data-theme="light"] .sol-edit-field textarea {
  background: #f8faf8 !important;
  color: #111817 !important;
  border-color: rgba(28,43,39,.18) !important;
}
html[data-theme="light"] .sol-plantina-table-chips button.occupied { background: #fff1ef !important; border-color: rgba(190,55,47,.42) !important; }
html[data-theme="light"] .sol-plantina-table-chips button.occupied span { color: #b42318 !important; }
html[data-theme="light"] .sol-plantina-table-chips button.event { background: #e0f2fe !important; border-color: rgba(14,116,144,.42) !important; }
html[data-theme="light"] .sol-plantina-table-chips button.event span { color: #0369a1 !important; }
html[data-theme="light"] .sol-plantina-table-chips button.free { background: #edf9f1 !important; border-color: rgba(39,151,94,.42) !important; }
html[data-theme="light"] .sol-plantina-table-chips button.free span { color: #137a42 !important; }
html[data-theme="light"] .sol-plantina-table-chips button.unavailable { background: #111 !important; color: #aaa !important; border-color: #000 !important; }

@media (max-width: 768px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    align-items: flex-start !important;
    padding: max(12px, env(safe-area-inset-top)) 10px max(12px, env(safe-area-inset-bottom)) !important;
    overflow: auto !important;
  }
  #modal-evento .lux-modal {
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    margin: 0 auto !important;
  }
  .sol-edit-grid { grid-template-columns: 1fr !important; }
  .sol-edit-actions { grid-template-columns: 1fr !important; }
}

/* v107: tablet-safe event modal and booking form operational order. */
@media (min-width: 769px) and (max-width: 1180px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    align-items: flex-start !important;
    justify-content: center !important;
    padding: max(28px, calc(env(safe-area-inset-top) + 24px)) 18px max(18px, env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
  }
  #modal-evento .lux-modal {
    width: min(860px, calc(100vw - 36px)) !important;
    max-height: calc(100dvh - 56px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }
  #modal-evento .lux-modal-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
  }
  #modal-evento #form-evento,
  #modal-evento .lux-form-eventi {
    max-height: calc(100dvh - 142px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-top: 16px !important;
  }
}

@media (max-width: 768px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    padding-top: max(18px, calc(env(safe-area-inset-top) + 16px)) !important;
  }
  #modal-evento .lux-modal {
    max-height: calc(100dvh - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }
}

/* v108: compact booking time row and guided booking menu selector. */
#prenotazioni .sol-booking-time-col {
  display: grid;
  gap: 8px;
  align-content: start;
}

#prenotazioni .sol-booking-time-col.full {
  grid-column: 1 / -1 !important;
  max-width: 460px;
}

#prenotazioni .sol-booking-time-col .sol-booking-slot-toggle {
  min-height: 44px;
  padding: 8px 11px;
  margin-top: 4px;
}

#prenotazioni .sol-booking-time-col .sol-booking-slot-toggle strong {
  font-size: 1rem;
}

#prenotazioni .sol-booking-time-col .sol-booking-slot-toggle small {
  font-size: .76rem;
}

#prenotazioni .sol-booking-time-col .sol-booking-slot-hint {
  margin-top: 0;
  max-width: 420px;
  font-size: .76rem;
  line-height: 1.28;
}

#prenotazioni .sol-booking-time-col .sol-booking-slot-grid {
  max-width: 460px;
}

#prenotazioni .sol-booking-menu-col {
  display: grid;
  gap: 8px;
}

#prenotazioni .sol-booking-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#prenotazioni .sol-booking-menu-actions .btn {
  min-height: 38px;
  padding: 8px 12px;
}

html[data-theme="light"] #prenotazioni .sol-booking-menu-actions .btn {
  background: #f4f7f6 !important;
  color: #10211e !important;
  border-color: rgba(28, 43, 39, .18) !important;
}

@media (max-width: 768px) {
  #prenotazioni .sol-booking-time-col.full,
  #prenotazioni .sol-booking-time-col .sol-booking-slot-grid,
  #prenotazioni .sol-booking-time-col .sol-booking-slot-hint {
    max-width: 100%;
  }
}

/* v109: event modal top safety and booking custom menu popup. */
#modal-evento.lux-modal-backdrop:not(.closed) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: max(14px, calc(env(safe-area-inset-top) + 12px)) 14px max(14px, env(safe-area-inset-bottom)) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

#modal-evento .lux-modal {
  width: min(860px, calc(100vw - 28px)) !important;
  max-width: 860px !important;
  max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}

#modal-evento .lux-modal-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 25 !important;
  min-height: 60px !important;
  padding: 14px 18px !important;
}

#modal-evento [data-action="close-event-form"] {
  position: static !important;
  margin-left: auto !important;
  z-index: 30 !important;
}

#modal-evento #form-evento,
#modal-evento .lux-form-eventi {
  max-height: calc(100dvh - 126px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scroll-padding-top: 18px !important;
  padding: 14px 16px calc(18px + env(safe-area-inset-bottom)) !important;
}

#modal-evento .lux-section-title:first-of-type {
  margin-top: 0 !important;
}

.sol-booking-menu-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 10, 13, 0.68);
  backdrop-filter: blur(8px);
}

.sol-booking-menu-sheet {
  width: min(640px, calc(100vw - 28px));
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 16, 12, 0.98), rgba(12, 12, 12, 0.98));
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.34);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.sol-booking-menu-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sol-booking-menu-sheet-head strong,
.sol-booking-menu-sheet-head span,
.sol-booking-menu-sheet label span {
  display: block;
}

.sol-booking-menu-sheet-head strong {
  font-size: 1.05rem;
}

.sol-booking-menu-sheet-head span {
  margin-top: 4px;
  color: var(--sol-text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.sol-booking-menu-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sol-booking-menu-sheet label {
  display: grid;
  gap: 6px;
}

.sol-booking-menu-sheet-full {
  grid-column: 1 / -1;
}

.sol-booking-menu-sheet input,
.sol-booking-menu-sheet textarea {
  width: 100%;
}

.sol-booking-menu-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

html[data-theme="light"] .sol-booking-menu-sheet {
  background: #fffdfa;
  border-color: rgba(28, 43, 39, 0.12);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .sol-booking-menu-sheet-head span {
  color: #4c5a58;
}

@media (max-width: 768px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    padding: max(10px, calc(env(safe-area-inset-top) + 8px)) 10px max(10px, env(safe-area-inset-bottom)) !important;
  }

  #modal-evento .lux-modal {
    width: min(100%, 640px) !important;
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
  }

  #modal-evento #form-evento,
  #modal-evento .lux-form-eventi {
    max-height: calc(100dvh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    padding: 12px 12px calc(18px + env(safe-area-inset-bottom)) !important;
  }

  .sol-booking-menu-modal {
    padding: 10px;
  }

  .sol-booking-menu-sheet {
    width: min(100%, 100%);
    padding: 14px;
  }

  .sol-booking-menu-sheet-grid {
    grid-template-columns: 1fr;
  }
}

/* v111 enterprise layout guardrails: final layer after all legacy patches. */
html,
body,
#app,
main,
.main-content,
.view,
.view-section {
  max-width: 100% !important;
  overflow-x: clip !important;
}

#plantina-interattiva .container,
#plantina-interattiva .sol-plantina-hero,
#plantina-interattiva .sol-plantina-layout,
#plantina-interattiva .sol-plantina-map,
#plantina-interattiva .sol-plantina-shell,
#storico .sol-v29-history-shell,
#storico .sol-v29-content,
#storico #sol-history-content,
#storico #sol-history-panel,
#storico .sol-history-two-col,
#analytics .sol-enterprise-analytics,
#analytics .sol-analytics-grid-main {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

#plantina-interattiva .sol-plantina-hero {
  margin-left: 0 !important;
  margin-right: 0 !important;
  inline-size: auto !important;
}

#storico .sol-history-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#storico .sol-history-two-col > section,
#storico .sol-enterprise-table-wrap,
#analytics .sol-enterprise-table-wrap {
  min-width: 0 !important;
  max-width: 100% !important;
}

#storico .sol-history-two-col .sol-enterprise-table {
  min-width: 0 !important;
  width: 100% !important;
  table-layout: fixed !important;
}

@media (max-width: 1100px) {
  #storico .sol-history-two-col {
    grid-template-columns: 1fr !important;
  }
}

/* v112 absolute final desktop/tablet polish. Keep this as the last runtime layer. */
body #app .site-header {
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 8px clamp(12px, 2.2vw, 28px) !important;
  overflow: visible !important;
}

body #app .site-header .header-inner {
  display: grid !important;
  grid-template-columns: minmax(170px, 320px) minmax(0, 1fr) auto minmax(150px, 220px) !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  gap: clamp(10px, 1.6vw, 20px) !important;
  width: min(100%, 1540px) !important;
  max-width: 1540px !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 auto !important;
  overflow: visible !important;
}

body #app .site-header .brand,
body #app .site-header .brand-title,
body #app .site-header .lux-badge-supabase,
body #app .site-header .sol-weather-widget,
body #app .site-header .brand-main {
  position: static !important;
  inset: auto !important;
  top: auto !important;
  transform: none !important;
}

body #app .site-header .brand-logo {
  width: auto !important;
  max-width: min(100%, 310px) !important;
  max-height: 70px !important;
  object-fit: contain !important;
}

body #app .site-header .brand-title {
  width: 100% !important;
  min-width: 0 !important;
  justify-self: stretch !important;
  text-align: center !important;
  overflow: visible !important;
}

body #app .site-header .brand-main {
  display: block !important;
  margin: 0 0 4px !important;
  padding: 2px 0 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  white-space: normal !important;
  font-size: clamp(1.42rem, 2.65vw, 2.5rem) !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

body #app .site-header .brand-sub {
  display: inline-flex !important;
  min-height: 24px !important;
  padding: 3px 13px !important;
  font-size: clamp(.78rem, 1vw, .92rem) !important;
  line-height: 1.1 !important;
}

body #app .site-header .brand-datetime {
  margin-top: 5px !important;
  font-size: clamp(.74rem, .95vw, .9rem) !important;
  line-height: 1.2 !important;
}

body #app .site-header .lux-badge-supabase {
  justify-self: end !important;
  min-height: 36px !important;
}

body #app .site-header .sol-weather-widget {
  justify-self: end !important;
  width: 100% !important;
  max-width: 220px !important;
  min-height: 70px !important;
  padding: 10px 12px !important;
}

body #app .site-header #sol-stable-theme-flag,
body #app .site-header .sol-stable-theme-flag {
  position: absolute !important;
  left: clamp(12px, 2.2vw, 28px) !important;
  bottom: -25px !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
}

body #app #dashboard .sol-service-hero {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  aspect-ratio: auto !important;
  block-size: auto !important;
  height: auto !important;
  min-height: 0 !important;
  min-block-size: 0 !important;
  max-height: none !important;
  padding: 12px 16px !important;
  margin: 0 0 10px !important;
  gap: 12px !important;
  overflow: hidden !important;
}

body #app #dashboard .sol-service-copy {
  display: grid !important;
  align-content: center !important;
  gap: 3px !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
}

body #app #dashboard .sol-service-copy h2 {
  margin: 0 !important;
  font-size: clamp(1.15rem, 1.75vw, 1.5rem) !important;
  line-height: 1.08 !important;
}

body #app #dashboard .sol-service-copy p {
  margin: 0 !important;
  font-size: .82rem !important;
  line-height: 1.25 !important;
}

@media (max-width: 1100px) {
  body #app .site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body #app .site-header .brand,
  body #app .site-header .sol-weather-widget {
    display: none !important;
  }
}

@media (max-width: 760px) {
  body #app .site-header {
    padding: 8px 10px !important;
  }

  body #app .site-header .brand-title {
    text-align: left !important;
  }

  body #app .site-header .brand-main {
    font-size: clamp(1.18rem, 7vw, 1.72rem) !important;
    line-height: 1.02 !important;
  }

  body #app .site-header .brand-sub,
  body #app .site-header .brand-datetime {
    justify-content: flex-start !important;
    font-size: .72rem !important;
  }

  body #app #dashboard .sol-service-hero {
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }
}

/* v113 mobile hardening: no app chrome over forms/modals on very narrow devices. */
@media (max-width: 760px) {
  body #app .site-header #sol-stable-theme-flag,
  body #app .site-header .sol-stable-theme-flag {
    display: none !important;
  }

  body.modal-open #app {
    padding-bottom: 0 !important;
  }

  body.modal-open #app .site-header,
  body.modal-open #app header.site-header,
  body.modal-open #app .header-inner,
  body.modal-open #app .command-bar,
  body.modal-open #app #sol-stable-theme-flag,
  body.modal-open .sol-pwa-install-card,
  body.modal-open .sol-pwa-update-card {
    display: none !important;
  }

  body.modal-open .main-content {
    padding: 0 !important;
  }

  body.modal-open #modal-evento,
  body.modal-open #modal-evento * {
    box-sizing: border-box !important;
  }

  body.modal-open #modal-evento.lux-modal-backdrop:not(.closed) {
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #070806 !important;
  }

  body.modal-open #modal-evento .lux-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  body.modal-open #modal-evento .lux-modal-header {
    flex: 0 0 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    padding: 7px 10px !important;
    gap: 8px !important;
    position: sticky !important;
    top: 0 !important;
    background: #101511 !important;
    border-bottom: 1px solid rgba(212, 175, 55, .26) !important;
  }

  body.modal-open #modal-evento .lux-modal-header h2 {
    display: block !important;
    margin: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 1rem !important;
    line-height: 1.08 !important;
  }

  body.modal-open #modal-evento [data-action="close-event-form"] {
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
  }

  body.modal-open #modal-evento #form-evento,
  body.modal-open #modal-evento .lux-form-eventi {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 9px 10px calc(16px + env(safe-area-inset-bottom)) !important;
    scroll-padding-top: 12px !important;
  }

  body.modal-open #modal-evento .lux-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.modal-open #modal-evento .lux-section-title {
    margin: 8px 0 6px !important;
    font-size: .8rem !important;
    line-height: 1.16 !important;
  }

  body.modal-open #modal-evento .lux-form-group {
    margin: 0 !important;
    min-width: 0 !important;
  }

  body.modal-open #modal-evento label {
    margin: 0 0 4px !important;
    font-size: .78rem !important;
    line-height: 1.18 !important;
  }

  body.modal-open #modal-evento input,
  body.modal-open #modal-evento select,
  body.modal-open #modal-evento textarea {
    min-height: 34px !important;
    width: 100% !important;
    padding: 7px 9px !important;
    font-size: .88rem !important;
    line-height: 1.2 !important;
    border-radius: 9px !important;
  }

  body.modal-open #modal-evento textarea {
    min-height: 72px !important;
  }

  .sol-pwa-update-card.is-visible {
    max-height: 34dvh !important;
    overflow: auto !important;
  }
}

@media (max-width: 340px) {
  body #app .site-header .brand-main {
    font-size: 1rem !important;
  }

  .command-bar {
    height: 62px !important;
    padding: 5px 6px calc(5px + env(safe-area-inset-bottom)) !important;
  }

  .cmd-btn {
    min-width: 46px !important;
    max-width: 54px !important;
    min-height: 50px !important;
    padding: 5px 4px !important;
    border-radius: 9px !important;
  }

  .cmd-btn::after {
    font-size: .52rem !important;
  }
}

/* v114 mobile header: centered brand, compact weather, accessible theme toggle. */
@media (max-width: 760px) {
  body:not(.modal-open) #app .site-header {
    padding: 6px 8px 7px !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  body:not(.modal-open) #app .site-header .header-inner {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 32px !important;
    grid-template-areas:
      "title title"
      "weather theme" !important;
    align-items: center !important;
    justify-items: center !important;
    gap: 5px 7px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body:not(.modal-open) #app .site-header .brand,
  body:not(.modal-open) #app .site-header .lux-badge-supabase {
    display: none !important;
  }

  body:not(.modal-open) #app .site-header .brand-title {
    grid-area: title !important;
    width: 100% !important;
    display: grid !important;
    justify-items: center !important;
    gap: 3px !important;
    text-align: center !important;
  }

  body:not(.modal-open) #app .site-header .brand-main {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: clamp(1rem, 5.8vw, 1.25rem) !important;
    line-height: 1.04 !important;
  }

  body:not(.modal-open) #app .site-header .brand-sub {
    display: inline-flex !important;
    justify-content: center !important;
    width: fit-content !important;
    max-width: min(220px, 82vw) !important;
    min-height: 20px !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: .6rem !important;
    line-height: 1.05 !important;
  }

  body:not(.modal-open) #app .site-header .brand-datetime {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 7px !important;
    max-width: 100% !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    font-size: .58rem !important;
    line-height: 1.05 !important;
  }

  body:not(.modal-open) #app .site-header .sol-weather-widget {
    grid-area: weather !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    justify-self: end !important;
    width: min(100%, 214px) !important;
    max-width: 214px !important;
    min-height: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 4px 8px !important;
    gap: 6px !important;
    border-radius: 999px !important;
    text-align: left !important;
    background: color-mix(in srgb, var(--sol-panel-2) 88%, transparent) !important;
    border: 1px solid rgba(185, 147, 66, .28) !important;
    box-shadow: none !important;
  }

  body:not(.modal-open) #app .site-header #weather-widget .weather-info,
  body:not(.modal-open) #app .site-header .sol-weather-widget .weather-info {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body:not(.modal-open) #app .site-header #weather-widget .weather-icon,
  body:not(.modal-open) #app .site-header .sol-weather-widget .weather-icon {
    width: 18px !important;
    height: 18px !important;
    display: inline-grid !important;
    place-items: center !important;
    font-size: 14px !important;
    line-height: 1 !important;
    margin: 0 !important;
    filter: none !important;
  }

  body:not(.modal-open) #app .site-header #weather-widget .weather-details,
  body:not(.modal-open) #app .site-header .sol-weather-widget .weather-details {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body:not(.modal-open) #app .site-header #weather-widget .weather-temp,
  body:not(.modal-open) #app .site-header .sol-weather-widget .weather-temp {
    flex: 0 0 auto !important;
    margin: 0 !important;
    font-size: .7rem !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    color: var(--sol-text) !important;
    white-space: nowrap !important;
  }

  body:not(.modal-open) #app .site-header #weather-widget .weather-desc,
  body:not(.modal-open) #app .site-header .sol-weather-widget .weather-desc {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: .58rem !important;
    line-height: 1 !important;
    color: var(--sol-muted) !important;
  }

  body:not(.modal-open) #app .site-header #weather-widget .weather-meta,
  body:not(.modal-open) #app .site-header .sol-weather-widget .weather-meta {
    display: none !important;
  }

  body:not(.modal-open) #app .site-header .sol-weather-temp {
    margin: 0 !important;
    font-size: .72rem !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    color: var(--sol-text) !important;
  }

  body:not(.modal-open) #app .site-header .sol-weather-desc {
    min-width: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: .62rem !important;
    line-height: 1 !important;
    color: var(--sol-muted) !important;
  }

  body:not(.modal-open) #app .site-header .sol-weather-hint {
    display: none !important;
  }

  body:not(.modal-open) #app .site-header #sol-stable-theme-flag,
  body:not(.modal-open) #app .site-header .sol-stable-theme-flag {
    grid-area: theme !important;
    display: inline-grid !important;
    position: static !important;
    inset: auto !important;
    justify-self: start !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--sol-panel-2) 92%, transparent) !important;
    border-color: rgba(185, 147, 66, .3) !important;
  }

  body:not(.modal-open) #app #weather-widget .weather-info {
    display: grid !important;
  }

  body:not(.modal-open) #app #weather-widget .weather-info .weather-details {
    display: flex !important;
  }

  body:not(.modal-open) #app #weather-widget .weather-info .weather-details .weather-temp,
  body:not(.modal-open) #app #weather-widget .weather-info .weather-details .weather-desc {
    display: block !important;
  }

  body:not(.modal-open) #app #weather-widget .weather-info .weather-details .weather-meta {
    display: none !important;
  }
}

@media (max-width: 340px) {
  body:not(.modal-open) #app .site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) 30px !important;
    gap: 4px 6px !important;
  }

  body:not(.modal-open) #app .site-header .brand-main {
    font-size: 1rem !important;
  }

  body:not(.modal-open) #app .site-header .brand-sub {
    max-width: 190px !important;
    font-size: .56rem !important;
  }

  body:not(.modal-open) #app .site-header .brand-datetime {
    font-size: .54rem !important;
    gap: 5px !important;
  }

  body:not(.modal-open) #app .site-header .sol-weather-widget {
    width: min(100%, 205px) !important;
    max-width: 205px !important;
    padding-inline: 7px !important;
  }
}

/* v116 weather bottom sheet: always open from bottom, never off-screen. */
#weather-backdrop:not(.hidden) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  display: block !important;
  background: rgba(0, 0, 0, .56) !important;
  backdrop-filter: blur(6px) !important;
}

#weather-dropdown:not(.hidden) {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: max(16px, env(safe-area-inset-bottom)) !important;
  transform: translateX(-50%) !important;
  z-index: 2147483001 !important;
  box-sizing: border-box !important;
  width: min(760px, calc(100vw - 28px)) !important;
  max-width: calc(100vw - 28px) !important;
  max-height: min(68dvh, 560px) !important;
  overflow: auto !important;
  overscroll-behavior: contain !important;
  padding: 16px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(215, 196, 163, .34) !important;
  background: linear-gradient(180deg, rgba(19, 24, 29, .99), rgba(8, 10, 12, .99)) !important;
  box-shadow: 0 -20px 70px rgba(0, 0, 0, .58) !important;
}

#weather-dropdown * {
  box-sizing: border-box !important;
}

#weather-dropdown .forecast-row {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
}

#weather-dropdown .forecast-box {
  min-width: 0 !important;
  min-height: 108px !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 4px !important;
  padding: 10px 8px !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .05) !important;
  border: 1px solid rgba(215, 196, 163, .18) !important;
  color: var(--sol-text, #f4f7f5) !important;
  text-align: center !important;
}

#weather-dropdown .forecast-hour,
#weather-dropdown .forecast-temp {
  font-size: .88rem !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
}

#weather-dropdown .forecast-icon {
  font-size: 1.45rem !important;
  line-height: 1 !important;
}

#weather-dropdown .forecast-desc,
#weather-dropdown .forecast-wind {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  font-size: .72rem !important;
  line-height: 1.16 !important;
}

#weather-dropdown .close-dropdown-btn {
  position: sticky !important;
  top: 0 !important;
  margin-left: auto !important;
  margin-top: -4px !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  background: rgba(255, 255, 255, .08) !important;
  color: #fff !important;
  cursor: pointer !important;
}

@media (max-width: 900px) {
  #weather-dropdown:not(.hidden) {
    width: min(620px, calc(100vw - 20px)) !important;
    max-width: calc(100vw - 20px) !important;
    max-height: min(70dvh, 520px) !important;
    padding: 12px !important;
    border-radius: 16px !important;
  }

  #weather-dropdown .forecast-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 520px) {
  #weather-dropdown:not(.hidden) {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    max-height: min(74dvh, 520px) !important;
    padding: 10px !important;
    border-radius: 14px !important;
  }

  #weather-dropdown .forecast-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #weather-dropdown .forecast-box {
    min-height: 96px !important;
    padding: 9px 6px !important;
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  body:not(.modal-open) #app .site-header .sol-weather-widget,
  body:not(.modal-open) #app .site-header #weather-widget {
    display: flex !important;
    width: min(100%, 176px) !important;
    min-width: 132px !important;
    max-width: 176px !important;
    min-height: 42px !important;
    padding: 7px 9px !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: end !important;
    gap: 4px !important;
    overflow: hidden !important;
  }

  body:not(.modal-open) #app .site-header .sol-weather-widget .sol-weather-temp,
  body:not(.modal-open) #app .site-header #weather-temp {
    font-size: .82rem !important;
    line-height: 1 !important;
  }

  body:not(.modal-open) #app .site-header .sol-weather-widget .sol-weather-desc,
  body:not(.modal-open) #app .site-header .sol-weather-widget .sol-weather-hint {
    display: none !important;
  }
}

/* v141 hotfix: keep the event form below the fixed header and the close button reachable. */
#modal-evento.lux-modal-backdrop:not(.closed) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding: clamp(118px, 15dvh, 148px) 16px 18px !important;
  overflow: hidden !important;
  background: rgba(0, 0, 0, .72) !important;
}

#modal-evento .lux-modal {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  width: min(860px, calc(100vw - 32px)) !important;
  max-width: 860px !important;
  max-height: calc(100dvh - clamp(136px, 17dvh, 166px)) !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#modal-evento .lux-modal-header {
  flex: 0 0 auto !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 58px !important;
  padding: 12px 16px !important;
}

#modal-evento [data-action="close-event-form"] {
  flex: 0 0 auto !important;
  min-width: 38px !important;
  min-height: 38px !important;
  margin-left: auto !important;
  z-index: 60 !important;
}

#modal-evento #form-evento,
#modal-evento .lux-form-eventi {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 16px 16px calc(22px + env(safe-area-inset-bottom)) !important;
}

@media (max-width: 760px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    padding: clamp(96px, 13dvh, 124px) 10px 10px !important;
  }

  #modal-evento .lux-modal {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - clamp(108px, 15dvh, 138px)) !important;
  }
}

/* v144 enterprise foundation: restrained palette, less gold, tighter readable surfaces. */
:root[data-theme="dark"],
:root:not([data-theme]) {
  color-scheme: dark;
  --bg: #0f1417;
  --surface: #151c20;
  --surface-2: #1b2428;
  --text: #f5efe3;
  --muted: #aab5b2;
  --border: rgba(245, 239, 227, .12);
  --accent: #2f7d7b;
  --warm: #c6a04a;
  --sol-bg: var(--bg);
  --sol-bg-alt: #11191d;
  --sol-panel: var(--surface);
  --sol-panel-2: var(--surface-2);
  --sol-panel-3: #202b30;
  --sol-text: var(--text);
  --sol-muted: var(--muted);
  --sol-border: var(--border);
  --sol-border-strong: rgba(245, 239, 227, .2);
  --sol-accent: var(--accent);
  --sol-accent-soft: rgba(47, 125, 123, .18);
  --sol-warm: var(--warm);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6f2;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --text: #101817;
  --muted: #53635f;
  --border: rgba(21, 36, 32, .16);
  --accent: #2f7d7b;
  --warm: #9a762b;
  --sol-bg: var(--bg);
  --sol-bg-alt: #e8eeea;
  --sol-panel: var(--surface);
  --sol-panel-2: var(--surface-2);
  --sol-panel-3: #e3ebe6;
  --sol-text: var(--text);
  --sol-muted: var(--muted);
  --sol-border: var(--border);
  --sol-border-strong: rgba(21, 36, 32, .28);
  --sol-accent: var(--accent);
  --sol-accent-soft: rgba(47, 125, 123, .12);
  --sol-warm: var(--warm);
}

html[data-theme] body,
html[data-theme] #app,
html[data-theme] main,
html[data-theme] .view,
html[data-theme] .view-section {
  background: var(--bg) !important;
  color: var(--text) !important;
}

html[data-theme] body {
  font-size: 15px !important;
  letter-spacing: 0 !important;
}

html[data-theme] :is(.container, .sol-booking-shell, .sol-checkin-shell, .sol-service-sheet, .sol-settings-shell) {
  width: min(100%, 1180px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}

html[data-theme] :is(
  .site-header,
  .command-bar,
  .panel,
  .card,
  .status-card,
  .kpi-card,
  .dashboard-card,
  .form-grid,
  .sol-action-card,
  .sol-service-hero,
  .sol-strip-card,
  .sol-v22-panel,
  .sol-checkin-hero,
  .checkin-kpi-card,
  .checkin-table-wrapper,
  .sol-checkin-events-panel,
  .sol-stable-checkin-cards article,
  .sol-plantina-hero,
  .sol-plantina-quick-note,
  .sol-plantina-operations,
  .sol-plantina-operations-head,
  .sol-plantina-op-card,
  #plantina-interactive-container,
  #tavolo-interactive-detail,
  #lista-attesa-panel,
  .modal-content,
  .lux-modal
) {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

html[data-theme] :is(.panel, .card, .status-card, .kpi-card, .sol-action-card, .sol-strip-card, .sol-v22-panel, .checkin-kpi-card, .sol-stable-checkin-cards article) {
  border-radius: 8px !important;
}

html[data-theme] :is(input, select, textarea, .checkin-search) {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

html[data-theme] :is(button, .btn, .cmd-btn, .plantina-btn, .checkin-scan-btn, .quick-filter-btn) {
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html[data-theme] :is(.cmd-btn.active, .btn.primary, button.primary, .quick-filter-btn.active, .bottom-nav .active, .mobile-bottom-nav .active, [aria-current="page"]) {
  background: var(--accent) !important;
  border-color: rgba(47, 125, 123, .65) !important;
  color: #ffffff !important;
}

html[data-theme] :is(h1, h2, h3, h4, h5, h6, strong, b, label, th, .section-title, .page-title, .panel-title, .status-title, .kpi-value) {
  color: var(--text) !important;
  text-shadow: none !important;
  letter-spacing: 0 !important;
}

html[data-theme] :is(p, small, span, td, li, .muted, .sol-muted, .status-sub, .panel-subtitle, .card-subtitle, .eventi-card-meta, .eventi-card-note) {
  text-shadow: none !important;
}

html[data-theme] :is(p, small, .muted, .sol-muted, .status-sub, .panel-subtitle, .card-subtitle, .eventi-card-meta, .eventi-card-note) {
  color: var(--muted) !important;
}

html[data-theme] :is(.sol-eyebrow, .sol-checkin-events-kicker, .status-kicker, .kpi-title, .sol-v22-chip) {
  color: var(--warm) !important;
}

html[data-theme] :is(.site-header, .command-bar, .bottom-nav, .mobile-bottom-nav) {
  background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
  border-color: var(--border) !important;
}

html[data-theme] :is(.brand-main, .brand-sub, .brand-datetime) {
  color: var(--text) !important;
  text-shadow: none !important;
}

html[data-theme] :is(.cmd-btn, .btn, .plantina-btn, .checkin-scan-btn) {
  border-radius: 999px !important;
}

html[data-theme] :is(.badge, .chip, .sol-status-pill, .prenotazione-stato, .sol-events-status, .sol-checkin-event-status) {
  background: var(--sol-accent-soft) !important;
  border-color: rgba(47, 125, 123, .28) !important;
  color: var(--text) !important;
}

html[data-theme] :is(.status-card, .kpi-card, .sol-strip-card, .checkin-kpi-card) {
  min-height: 92px !important;
}

html[data-theme] :is(.checkin-table, .sol-enterprise-table, table) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

html[data-theme] :is(.checkin-table th, .sol-enterprise-table th) {
  background: var(--surface-2) !important;
  color: var(--muted) !important;
  border-color: var(--border) !important;
}

html[data-theme] :is(.checkin-table td, .sol-enterprise-table td) {
  color: var(--text) !important;
  border-color: var(--border) !important;
}

html[data-theme] :is(.sol-booking-calendar-root, .sol-events-calendar, .sol-events-calendar-panel, .sol-booking-calendar-shell) {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

html[data-theme] :is(.sol-calendar-day, .sol-calendar-cell, .sol-events-day, .sol-events-calendar-item) {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

html[data-theme] :is(.sol-service-hero, .sol-plantina-hero, .eventi-header, .sol-booking-hero, .sol-checkin-hero) {
  background-image: none !important;
}

html[data-theme] #plantina-interactive-container {
  background: #10171a !important;
  border-color: rgba(47, 125, 123, .38) !important;
}

html[data-theme] #plantina-toolbar.plantina-toolbar {
  background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
  border-color: var(--border) !important;
}

html[data-theme] a {
  color: var(--accent);
}

@media (max-width: 760px) {
  html[data-theme] body {
    font-size: 14px !important;
  }

  html[data-theme] :is(.container, .sol-booking-shell, .sol-checkin-shell) {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* v145 check-in operativo: card grandi, colori di stato e avviso ritardi. */
#check-in .sol-checkin-legacy-hidden {
  display: none !important;
}

#check-in #sol-stable-checkin-cards {
  display: grid !important;
  gap: 12px !important;
  margin: 18px 0 22px !important;
}

#check-in #sol-stable-checkin-cards > article {
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(130px, 160px) minmax(0, 1fr) minmax(180px, 220px) !important;
  gap: 16px !important;
  align-items: stretch !important;
  min-height: 138px !important;
  padding: 16px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: none !important;
}

#check-in #sol-stable-checkin-cards > article.is-arrived {
  background: linear-gradient(90deg, rgba(32, 111, 63, .34), var(--surface) 54%) !important;
  border-color: rgba(54, 168, 96, .72) !important;
  box-shadow: inset 6px 0 0 #36a860 !important;
}

#check-in #sol-stable-checkin-cards > article.is-late {
  background: linear-gradient(90deg, rgba(160, 48, 42, .38), var(--surface) 54%) !important;
  border-color: rgba(225, 82, 72, .76) !important;
  box-shadow: inset 6px 0 0 #e15248 !important;
}

#check-in #sol-stable-checkin-cards > article.is-next {
  background: linear-gradient(90deg, rgba(198, 160, 74, .22), var(--surface) 54%) !important;
  border-color: rgba(198, 160, 74, .52) !important;
  box-shadow: inset 6px 0 0 var(--warm) !important;
}

#check-in .sol-checkin-card-status {
  display: grid !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 8px !important;
  padding: 12px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .035) !important;
  border: 1px solid var(--border) !important;
}

#check-in .sol-checkin-card-status span {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  font-size: .82rem !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
  letter-spacing: 0 !important;
}

#check-in .sol-checkin-card-status span.ok {
  background: rgba(54, 168, 96, .18) !important;
  color: #72d996 !important;
  border: 1px solid rgba(54, 168, 96, .34) !important;
}

#check-in .sol-checkin-card-status span.late {
  background: rgba(225, 82, 72, .18) !important;
  color: #ff9a92 !important;
  border: 1px solid rgba(225, 82, 72, .38) !important;
}

#check-in .sol-checkin-card-status span.next,
#check-in .sol-checkin-card-status span.wait {
  background: rgba(198, 160, 74, .16) !important;
  color: #e7c36f !important;
  border: 1px solid rgba(198, 160, 74, .34) !important;
}

#check-in .sol-checkin-card-status small {
  color: var(--muted) !important;
  font-size: .86rem !important;
  font-weight: 800 !important;
}

#check-in .sol-stable-checkin-main {
  display: grid !important;
  grid-template-columns: minmax(90px, 120px) minmax(180px, 260px) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

#check-in .sol-checkin-primary,
#check-in .sol-checkin-client,
#check-in .sol-checkin-fields > div {
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
}

#check-in .sol-checkin-primary {
  justify-items: center !important;
  border-right: 1px solid var(--border) !important;
}

#check-in .sol-checkin-primary span,
#check-in .sol-checkin-client span,
#check-in .sol-checkin-fields span {
  color: var(--muted) !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

#check-in .sol-checkin-primary strong {
  color: var(--text) !important;
  font-size: clamp(1.7rem, 4vw, 2.35rem) !important;
  line-height: 1 !important;
}

#check-in .sol-checkin-client strong {
  color: var(--text) !important;
  font-size: clamp(1.25rem, 2vw, 1.65rem) !important;
  line-height: 1.08 !important;
  overflow-wrap: anywhere !important;
}

#check-in .sol-checkin-client small {
  color: var(--muted) !important;
  font-size: .92rem !important;
}

#check-in .sol-checkin-fields {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(88px, 1fr)) !important;
  gap: 8px !important;
}

#check-in .sol-checkin-fields > div {
  min-height: 54px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
}

#check-in .sol-checkin-fields strong {
  color: var(--text) !important;
  font-size: 1rem !important;
  line-height: 1.12 !important;
  overflow-wrap: anywhere !important;
}

#check-in .sol-checkin-fields .sol-checkin-note {
  grid-column: span 2 !important;
}

#check-in .sol-stable-checkin-actions {
  display: grid !important;
  gap: 8px !important;
  align-content: center !important;
  justify-items: stretch !important;
}

#check-in .sol-stable-checkin-actions :is(button, a) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface-2) !important;
  color: var(--text) !important;
  font-size: .86rem !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

#check-in .sol-stable-checkin-actions [data-sol-checkin] {
  background: var(--accent) !important;
  border-color: rgba(47, 125, 123, .66) !important;
  color: #fff !important;
}

#check-in .sol-stable-checkin-actions .sol-checkin-whatsapp {
  background: rgba(32, 111, 63, .22) !important;
  border-color: rgba(32, 111, 63, .44) !important;
  color: #baf2ce !important;
}

#check-in .sol-stable-checkin-actions :is(button:disabled, a[aria-disabled="true"]) {
  opacity: .45 !important;
  cursor: not-allowed !important;
}

.sol-late-checkin-popup {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483400 !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
  background: rgba(0, 0, 0, .58) !important;
  backdrop-filter: blur(7px) !important;
}

.sol-late-checkin-dialog {
  width: min(620px, 100%) !important;
  max-height: min(680px, calc(100dvh - 36px)) !important;
  overflow: auto !important;
  border-radius: 8px !important;
  border: 1px solid rgba(225, 82, 72, .48) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .45) !important;
}

.sol-late-checkin-dialog header,
.sol-late-checkin-dialog footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px !important;
  border-bottom: 1px solid var(--border) !important;
}

.sol-late-checkin-dialog footer {
  border-top: 1px solid var(--border) !important;
  border-bottom: 0 !important;
}

.sol-late-checkin-dialog header span {
  color: #ff9a92 !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

.sol-late-checkin-dialog h3 {
  margin: 2px 0 0 !important;
  color: var(--text) !important;
}

.sol-late-checkin-list {
  display: grid !important;
  gap: 8px !important;
  padding: 12px 14px !important;
}

.sol-late-checkin-list article {
  display: grid !important;
  gap: 5px !important;
  padding: 11px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(225, 82, 72, .28) !important;
  background: rgba(225, 82, 72, .10) !important;
}

.sol-late-checkin-list span {
  color: var(--muted) !important;
}

.sol-late-checkin-dialog :is(button, a) {
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface-2) !important;
  color: var(--text) !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

@media (max-width: 980px) {
  #check-in #sol-stable-checkin-cards > article {
    grid-template-columns: 1fr !important;
  }

  #check-in .sol-stable-checkin-main {
    grid-template-columns: minmax(90px, 120px) minmax(0, 1fr) !important;
  }

  #check-in .sol-checkin-fields {
    grid-column: 1 / -1 !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  #check-in #sol-stable-checkin-cards > article {
    min-height: 0 !important;
    padding: 12px !important;
  }

  #check-in .sol-stable-checkin-main,
  #check-in .sol-checkin-fields {
    grid-template-columns: 1fr !important;
  }

  #check-in .sol-checkin-primary {
    justify-items: start !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 10px !important;
  }

  #check-in .sol-checkin-fields .sol-checkin-note {
    grid-column: auto !important;
  }
}

/* v146 check-in: lista piu sobria e leggibile su desktop/mobile. */
#check-in #sol-stable-checkin-cards {
  gap: 10px !important;
  margin-top: 14px !important;
}

#check-in #sol-stable-checkin-cards > article {
  grid-template-columns: 112px minmax(0, 1fr) 168px !important;
  gap: 14px !important;
  min-height: 112px !important;
  padding: 12px 14px !important;
  overflow: hidden !important;
}

#check-in #sol-stable-checkin-cards > article.is-arrived {
  background: linear-gradient(90deg, rgba(34, 120, 76, .18), var(--surface) 36%) !important;
  border-color: rgba(54, 168, 96, .52) !important;
  box-shadow: inset 5px 0 0 #36a860 !important;
}

#check-in #sol-stable-checkin-cards > article.is-late {
  background: linear-gradient(90deg, rgba(185, 58, 52, .20), var(--surface) 38%) !important;
  border-color: rgba(225, 82, 72, .52) !important;
  box-shadow: inset 5px 0 0 #e15248 !important;
}

#check-in #sol-stable-checkin-cards > article.is-next {
  background: linear-gradient(90deg, rgba(198, 160, 74, .14), var(--surface) 36%) !important;
  border-color: rgba(198, 160, 74, .42) !important;
  box-shadow: inset 5px 0 0 var(--warm) !important;
}

#check-in .sol-checkin-card-status {
  align-content: center !important;
  padding: 8px !important;
  gap: 5px !important;
  background: transparent !important;
}

#check-in .sol-checkin-card-status span {
  min-height: 24px !important;
  padding: 4px 8px !important;
  font-size: .68rem !important;
}

#check-in .sol-checkin-card-status small {
  font-size: .72rem !important;
  line-height: 1.2 !important;
}

#check-in .sol-stable-checkin-main {
  grid-template-columns: 96px minmax(150px, 230px) minmax(0, 1fr) !important;
  gap: 12px !important;
}

#check-in .sol-checkin-primary {
  border-right-color: rgba(245, 239, 227, .12) !important;
}

#check-in .sol-checkin-primary strong {
  font-size: 2rem !important;
}

#check-in .sol-checkin-client strong {
  font-size: 1.32rem !important;
}

#check-in .sol-checkin-client-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 78px !important;
  gap: 10px !important;
  align-items: center !important;
  width: 100% !important;
}

#check-in .sol-checkin-client-name {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

#check-in .sol-checkin-table-square {
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
  gap: 2px !important;
  width: 78px !important;
  min-height: 64px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(198, 160, 74, .58) !important;
  background: rgba(198, 160, 74, .14) !important;
  color: var(--text) !important;
}

#check-in .sol-checkin-table-square span {
  color: #d7bd76 !important;
  font-size: .58rem !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

#check-in .sol-checkin-table-square strong {
  color: #f2d58a !important;
  font-size: 1.85rem !important;
  line-height: 1 !important;
}

#check-in .sol-checkin-fields {
  grid-template-columns: repeat(4, minmax(68px, 1fr)) !important;
  gap: 7px !important;
}

#check-in .sol-checkin-fields > div {
  min-height: 44px !important;
  padding: 7px 9px !important;
}

#check-in .sol-checkin-fields span {
  font-size: .62rem !important;
}

#check-in .sol-checkin-fields strong {
  font-size: .92rem !important;
}

#check-in .sol-stable-checkin-actions {
  gap: 7px !important;
}

#check-in .sol-stable-checkin-actions :is(button, a) {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  font-size: .78rem !important;
}

@media (max-width: 980px) {
  #check-in #sol-stable-checkin-cards > article {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #check-in .sol-checkin-card-status {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  #check-in .sol-stable-checkin-main {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    grid-template-areas:
      "time client"
      "fields fields" !important;
  }

  #check-in .sol-checkin-primary {
    grid-area: time !important;
  }

  #check-in .sol-checkin-client {
    grid-area: client !important;
  }

  #check-in .sol-checkin-fields {
    grid-area: fields !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #check-in .sol-stable-checkin-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 620px) {
  #check-in #sol-stable-checkin-cards {
    gap: 9px !important;
    margin: 10px 0 76px !important;
  }

  #check-in #sol-stable-checkin-cards > article {
    padding: 11px !important;
    border-radius: 8px !important;
    min-height: 0 !important;
    box-shadow: none !important;
  }

  #check-in #sol-stable-checkin-cards > article.is-late {
    background: linear-gradient(90deg, rgba(185, 58, 52, .18), var(--surface) 46%) !important;
    border-color: rgba(225, 82, 72, .38) !important;
    box-shadow: inset 4px 0 0 #e15248 !important;
  }

  #check-in #sol-stable-checkin-cards > article.is-arrived {
    box-shadow: inset 4px 0 0 #36a860 !important;
  }

  #check-in #sol-stable-checkin-cards > article.is-next {
    box-shadow: inset 4px 0 0 var(--warm) !important;
  }

  #check-in .sol-checkin-card-status {
    padding: 0 !important;
    border: 0 !important;
    gap: 7px !important;
  }

  #check-in .sol-checkin-card-status span {
    min-height: 20px !important;
    padding: 3px 7px !important;
    font-size: .62rem !important;
  }

  #check-in .sol-checkin-card-status small {
    font-size: .66rem !important;
  }

  #check-in .sol-stable-checkin-main {
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 9px 12px !important;
  }

  #check-in .sol-checkin-primary {
    align-content: start !important;
    justify-items: start !important;
    padding: 0 !important;
    border: 0 !important;
  }

  #check-in .sol-checkin-primary span,
  #check-in .sol-checkin-client span {
    font-size: .58rem !important;
  }

  #check-in .sol-checkin-primary strong {
    font-size: 1.72rem !important;
    letter-spacing: 0 !important;
  }

  #check-in .sol-checkin-client strong {
    font-size: 1.34rem !important;
    line-height: 1.05 !important;
  }

  #check-in .sol-checkin-client small {
    font-size: .74rem !important;
  }

  #check-in .sol-checkin-client-head {
    grid-template-columns: minmax(0, 1fr) 76px !important;
    gap: 8px !important;
  }

  #check-in .sol-checkin-table-square {
    width: 76px !important;
    min-height: 58px !important;
    border-radius: 8px !important;
  }

  #check-in .sol-checkin-table-square span {
    font-size: .55rem !important;
  }

  #check-in .sol-checkin-table-square strong {
    font-size: 1.85rem !important;
  }

  #check-in .sol-checkin-fields {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  #check-in .sol-checkin-fields > div {
    flex: 1 1 auto !important;
    min-height: 30px !important;
    padding: 5px 8px !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    align-content: center !important;
  }

  #check-in .sol-checkin-fields > div span {
    font-size: .56rem !important;
  }

  #check-in .sol-checkin-fields > div strong {
    font-size: .78rem !important;
    line-height: 1 !important;
  }

  #check-in .sol-checkin-fields .sol-checkin-note {
    flex-basis: 100% !important;
    border-radius: 8px !important;
  }

  #check-in .sol-stable-checkin-actions {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  #check-in .sol-stable-checkin-actions [data-sol-checkin],
  #check-in .sol-stable-checkin-actions [data-sol-undo-checkin] {
    grid-column: 1 / -1 !important;
  }

  #check-in .sol-stable-checkin-actions :is(button, a) {
    min-height: 36px !important;
    font-size: .78rem !important;
    border-radius: 8px !important;
  }
}

/* v146.1 check-in density pass: meno altezza, azioni compatte, stato senza vuoti. */
#check-in #sol-stable-checkin-cards > article {
  grid-template-columns: 92px minmax(0, 1fr) 260px !important;
  min-height: 98px !important;
  padding: 11px 14px !important;
}

#check-in .sol-checkin-card-status {
  border: 0 !important;
  justify-content: center !important;
  min-height: 0 !important;
}

#check-in .sol-stable-checkin-main {
  grid-template-columns: 92px minmax(150px, 220px) minmax(0, 1fr) !important;
}

#check-in .sol-checkin-fields {
  align-content: center !important;
}

#check-in .sol-stable-checkin-actions {
  grid-template-columns: 1fr 1fr !important;
  align-content: center !important;
}

#check-in .sol-stable-checkin-actions [data-sol-checkin],
#check-in .sol-stable-checkin-actions [data-sol-undo-checkin] {
  grid-column: 1 / -1 !important;
}

#check-in .sol-stable-checkin-actions :is(button, a) {
  min-height: 33px !important;
}

@media (max-width: 620px) {
  #check-in #sol-stable-checkin-cards > article {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
  }

  #check-in .sol-stable-checkin-main {
    grid-template-columns: 82px minmax(0, 1fr) !important;
  }

  #check-in .sol-checkin-fields > div {
    min-height: 28px !important;
  }

  #check-in .sol-stable-checkin-actions {
    grid-template-columns: 1fr 1fr !important;
  }

  #check-in .sol-stable-checkin-actions .sol-checkin-whatsapp {
    grid-column: auto !important;
  }

  #check-in .sol-stable-checkin-actions [data-sol-checkin],
  #check-in .sol-stable-checkin-actions [data-sol-undo-checkin] {
    grid-column: auto !important;
  }

  #check-in .sol-stable-checkin-actions :is(button, a) {
    min-height: 34px !important;
    padding: 6px 8px !important;
  }
}

/* v148 check-in: filtro operativo e ricerca collegata alle card nuove. */
#check-in .sol-checkin-list-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 10px 14px !important;
}

#check-in .sol-checkin-list-head > span {
  grid-column: 1 !important;
}

#check-in .sol-checkin-filter {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  display: inline-grid !important;
  grid-template-columns: repeat(2, minmax(92px, auto)) !important;
  gap: 6px !important;
  padding: 4px !important;
  border-radius: 10px !important;
  border: 1px solid var(--border) !important;
  background: rgba(255, 255, 255, .035) !important;
}

#check-in .sol-checkin-filter button {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

#check-in .sol-checkin-filter button.active {
  background: var(--accent) !important;
  border-color: rgba(47, 125, 123, .7) !important;
  color: #fff !important;
}

html[data-theme="light"] #check-in .sol-checkin-filter {
  background: rgba(15, 20, 23, .035) !important;
}

@media (max-width: 620px) {
  #check-in .sol-checkin-list-head {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  #check-in .sol-checkin-list-head > span,
  #check-in .sol-checkin-filter {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  #check-in .sol-checkin-filter {
    width: 100% !important;
    grid-template-columns: 1fr 1fr !important;
  }
}

/* v149 waitlist: stato operativo senza scalare capienza o occupare tavoli. */
#check-in #sol-stable-checkin-cards > article.is-waitlist {
  background: linear-gradient(90deg, rgba(198, 160, 74, .18), var(--surface) 40%) !important;
  border-color: rgba(198, 160, 74, .58) !important;
  box-shadow: inset 5px 0 0 var(--warm) !important;
}

@media (max-width: 620px) {
  #check-in #sol-stable-checkin-cards > article.is-waitlist {
    box-shadow: inset 4px 0 0 var(--warm) !important;
  }
}

#prenotazioni #sol-booking-status-pill.is-waitlist {
  background: rgba(198, 160, 74, .16) !important;
  border-color: rgba(198, 160, 74, .46) !important;
  color: #f2d58a !important;
}

.sol-plantina-op-card.waitlist {
  border-color: rgba(198, 160, 74, .46) !important;
  background: rgba(198, 160, 74, .10) !important;
}

.sol-plantina-op-card.waitlist .sol-plantina-op-table {
  color: #f2d58a !important;
  border-color: rgba(198, 160, 74, .5) !important;
}

.sol-management-card.is-waitlist {
  border-color: rgba(198, 160, 74, .46) !important;
  background: rgba(198, 160, 74, .08) !important;
}

[data-sol-confirm-waitlist] {
  background: rgba(198, 160, 74, .18) !important;
  border-color: rgba(198, 160, 74, .55) !important;
  color: #f2d58a !important;
}


/* v154: event modal tablet/mobile guard, close always reachable. */
#modal-evento.lux-modal-backdrop:not(.closed) {
  padding-top: clamp(78px, 10dvh, 104px) !important;
  padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
  overflow-y: auto !important;
}

#modal-evento .lux-modal {
  width: min(940px, calc(100vw - 20px)) !important;
  max-width: 940px !important;
  max-height: calc(100dvh - clamp(92px, 12dvh, 118px)) !important;
  border-radius: 10px !important;
}

#modal-evento .lux-modal-header {
  min-height: 52px !important;
  padding: 9px 14px !important;
  background: var(--surface-2, #1b2428) !important;
  border-bottom: 1px solid var(--border, rgba(245, 239, 227, .12)) !important;
}

#modal-evento .lux-modal-header h2 {
  font-size: clamp(17px, 2.2vw, 22px) !important;
  line-height: 1.05 !important;
  margin: 0 !important;
}

#modal-evento [data-action="close-event-form"] {
  position: sticky !important;
  top: 8px !important;
  right: 8px !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
}

#modal-evento #form-evento,
#modal-evento .lux-form-eventi {
  padding-top: 12px !important;
  padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
}

@media (max-width: 900px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    padding: clamp(68px, 9dvh, 92px) 8px 8px !important;
  }

  #modal-evento .lux-modal {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - clamp(78px, 11dvh, 104px)) !important;
  }
}

@media (max-width: 560px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    padding-top: max(58px, env(safe-area-inset-top)) !important;
  }

  #modal-evento .lux-modal {
    width: calc(100vw - 10px) !important;
    max-height: calc(100dvh - 68px) !important;
  }
}

/* v155: calendar colored time slots */
#calendario-prenotazioni .sol-calendar-slot-panel {
  border: 1px solid var(--border, rgba(245, 239, 227, .12)) !important;
  background: rgba(15, 20, 23, .32) !important;
  border-radius: 8px !important;
  padding: 10px !important;
  margin: 10px 0 !important;
}

#calendario-prenotazioni .sol-calendar-slot-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
}

#calendario-prenotazioni .sol-calendar-slot-head strong {
  color: var(--text, #f5efe3) !important;
  font-size: .94rem !important;
}

#calendario-prenotazioni .sol-calendar-slot-head span {
  color: var(--muted, #aab5b2) !important;
  font-size: .74rem !important;
  font-weight: 800 !important;
}

#calendario-prenotazioni .sol-calendar-slot-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)) !important;
  gap: 6px !important;
}

#calendario-prenotazioni .sol-calendar-slot-chip {
  min-height: 58px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(245, 239, 227, .1) !important;
  background: var(--surface-2, #1b2428) !important;
  padding: 7px 8px !important;
  display: grid !important;
  align-content: center !important;
  gap: 2px !important;
}

#calendario-prenotazioni .sol-calendar-slot-chip strong {
  color: var(--text, #f5efe3) !important;
  font-size: .88rem !important;
  line-height: 1 !important;
}

#calendario-prenotazioni .sol-calendar-slot-chip span,
#calendario-prenotazioni .sol-calendar-slot-chip small {
  font-size: .68rem !important;
  line-height: 1.05 !important;
  font-weight: 850 !important;
}

#calendario-prenotazioni .sol-calendar-slot-chip.empty {
  border-color: rgba(47, 125, 123, .34) !important;
  background: rgba(47, 125, 123, .12) !important;
}

#calendario-prenotazioni .sol-calendar-slot-chip.ok {
  border-color: rgba(51, 182, 121, .45) !important;
  background: rgba(51, 182, 121, .16) !important;
}

#calendario-prenotazioni .sol-calendar-slot-chip.warn {
  border-color: rgba(198, 160, 74, .58) !important;
  background: rgba(198, 160, 74, .18) !important;
}

#calendario-prenotazioni .sol-calendar-slot-chip.full {
  border-color: rgba(225, 82, 72, .58) !important;
  background: rgba(225, 82, 72, .18) !important;
}

#calendario-prenotazioni .sol-calendar-slot-chip.empty span,
#calendario-prenotazioni .sol-calendar-slot-chip.ok span { color: #7ee0ae !important; }
#calendario-prenotazioni .sol-calendar-slot-chip.warn span { color: #e6c76e !important; }
#calendario-prenotazioni .sol-calendar-slot-chip.full span { color: #ff9b92 !important; }
#calendario-prenotazioni .sol-calendar-slot-chip small { color: var(--muted, #aab5b2) !important; }

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-panel {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .16) !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-head strong,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-chip strong { color: #101716 !important; }
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-head span,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-chip small { color: #4d5d58 !important; }
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-chip.empty { background: #eef8f6 !important; border-color: rgba(20,125,120,.28) !important; }
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-chip.ok { background: #edf9f1 !important; border-color: rgba(39,151,94,.38) !important; }
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-chip.warn { background: #fff8e6 !important; border-color: rgba(166,125,32,.38) !important; }
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-slot-chip.full { background: #fff1ef !important; border-color: rgba(190,55,47,.42) !important; }

/* v162: premium booking calendar day cells */
#calendario-prenotazioni .sol-calendar-day {
  align-content: start !important;
  justify-items: stretch !important;
  gap: 10px !important;
  padding: 14px 12px !important;
  min-height: 126px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .006)),
    var(--surface, #151c20) !important;
}

#calendario-prenotazioni .sol-calendar-day-num {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  min-height: 34px !important;
  font-size: 1rem !important;
  line-height: 1 !important;
}

#calendario-prenotazioni .sol-calendar-day-num > span {
  display: inline-grid !important;
  place-items: center !important;
  min-width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  color: var(--text, #f5efe3) !important;
  font-size: 1.22rem !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
}

#calendario-prenotazioni .sol-calendar-day.is-today {
  border-color: rgba(47, 125, 123, .86) !important;
  box-shadow: inset 0 0 0 1px rgba(47, 125, 123, .55), 0 12px 32px rgba(0, 0, 0, .22) !important;
}

#calendario-prenotazioni .sol-calendar-day.is-today .sol-calendar-day-num > span {
  background: var(--accent, #2f7d7b) !important;
  color: #f7fffd !important;
}

#calendario-prenotazioni .sol-calendar-day.selected:not(.is-today) .sol-calendar-day-num > span {
  background: rgba(198, 160, 74, .20) !important;
  color: var(--text, #f5efe3) !important;
  box-shadow: inset 0 0 0 1px rgba(198, 160, 74, .45) !important;
}

#calendario-prenotazioni .sol-calendar-day-body {
  display: block !important;
  min-height: 46px !important;
}

#calendario-prenotazioni .sol-calendar-day-summary {
  display: grid !important;
  gap: 4px !important;
  align-content: start !important;
  color: var(--muted, #aab5b2) !important;
  font-size: .74rem !important;
  line-height: 1.12 !important;
  font-weight: 850 !important;
}

#calendario-prenotazioni .sol-calendar-day-summary span,
#calendario-prenotazioni .sol-calendar-day-summary strong {
  display: block !important;
  white-space: normal !important;
}

#calendario-prenotazioni .sol-calendar-day-summary strong {
  color: var(--text, #f5efe3) !important;
  font-size: .82rem !important;
}

#calendario-prenotazioni .sol-calendar-day.muted .sol-calendar-day-num > span {
  color: rgba(245, 239, 227, .42) !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day {
  background: #ffffff !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day-num > span,
html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day-summary strong {
  color: #101716 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day-summary {
  color: #566761 !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-day.is-today .sol-calendar-day-num > span {
  color: #ffffff !important;
}

/* v163: mobile booking calendar occupancy indicators */
#calendario-prenotazioni .sol-calendar-day-summary {
  display: none !important;
}

#calendario-prenotazioni .sol-calendar-load {
  display: block !important;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(245, 239, 227, .12);
  box-shadow: inset 0 0 0 1px rgba(245, 239, 227, .08);
}

#calendario-prenotazioni .sol-calendar-load i {
  display: block;
  width: var(--sol-calendar-load, 0%);
  min-width: 7px;
  height: 100%;
  border-radius: inherit;
  background: var(--accent, #2f7d7b);
}

#calendario-prenotazioni .sol-calendar-load.load-empty i {
  width: 16%;
  min-width: 10px;
  background: rgba(170, 181, 178, .42);
}

#calendario-prenotazioni .sol-calendar-load.load-low i {
  background: #2f7d7b;
}

#calendario-prenotazioni .sol-calendar-load.load-mid i {
  background: #c6a04a;
}

#calendario-prenotazioni .sol-calendar-load.load-high i {
  background: #d9793f;
}

#calendario-prenotazioni .sol-calendar-load.load-full i {
  background: #d9534f;
}

#calendario-prenotazioni .sol-calendar-day {
  align-content: center !important;
  justify-items: center !important;
}

#calendario-prenotazioni .sol-calendar-day-num {
  position: relative !important;
  justify-content: center !important;
  width: 100% !important;
}

#calendario-prenotazioni .sol-calendar-day-body {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-height: 10px !important;
}

#calendario-prenotazioni .sol-calendar-load {
  width: min(54px, 74%) !important;
}

#calendario-prenotazioni .sol-calendar-event-dot {
  display: block !important;
  position: absolute !important;
  top: 1px !important;
  right: max(6px, calc(50% - 31px)) !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 999px !important;
  background: #c6a04a !important;
  box-shadow: 0 0 0 2px rgba(21, 28, 32, .95) !important;
}

html[data-theme="light"] #calendario-prenotazioni .sol-calendar-event-dot {
  box-shadow: 0 0 0 2px #ffffff !important;
}

@media (max-width: 720px) {
  #calendario-prenotazioni .sol-calendar-day {
    min-height: 74px !important;
    padding: 8px 7px !important;
    gap: 6px !important;
    align-content: center !important;
    justify-items: center !important;
  }

  #calendario-prenotazioni .sol-calendar-day-num {
    position: relative !important;
    justify-content: center !important;
    min-height: 35px !important;
    width: 100% !important;
  }

  #calendario-prenotazioni .sol-calendar-day-num > span {
    min-width: 35px !important;
    height: 35px !important;
    font-size: 1.18rem !important;
    line-height: 1 !important;
  }

  #calendario-prenotazioni .sol-calendar-day-body {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    min-height: 8px !important;
  }

  #calendario-prenotazioni .sol-calendar-load {
    display: block !important;
    width: min(38px, 84%) !important;
  }

  #calendario-prenotazioni .sol-calendar-event-dot {
    top: 1px !important;
    right: max(1px, calc(50% - 24px)) !important;
    width: 7px !important;
    height: 7px !important;
  }
}

/* v164: premium event calendar day cells */
#eventi .sol-events-calendar-grid {
  align-items: stretch !important;
}

#eventi .sol-events-day {
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 10px !important;
  min-height: 96px !important;
  padding: 12px 10px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .006)),
    var(--surface-2, #151c20) !important;
}

#eventi .sol-events-day-num {
  position: relative !important;
  display: inline-grid !important;
  place-items: center !important;
  min-width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  color: var(--text, #f5efe3) !important;
  font-size: 1.2rem !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}

#eventi .sol-events-day.is-today {
  border-color: rgba(47, 125, 123, .86) !important;
  box-shadow: inset 0 0 0 1px rgba(47, 125, 123, .55), 0 12px 32px rgba(0, 0, 0, .22) !important;
}

#eventi .sol-events-day.is-today .sol-events-day-num {
  background: var(--accent, #2f7d7b) !important;
  color: #f7fffd !important;
}

#eventi .sol-events-day.selected:not(.is-today) .sol-events-day-num {
  background: rgba(198, 160, 74, .20) !important;
  color: var(--text, #f5efe3) !important;
  box-shadow: inset 0 0 0 1px rgba(198, 160, 74, .45) !important;
}

#eventi .sol-events-day-body {
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  min-height: 8px !important;
}

#eventi .sol-events-day-load {
  display: block !important;
  width: min(52px, 74%) !important;
  height: 5px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: rgba(245, 239, 227, .12) !important;
  box-shadow: inset 0 0 0 1px rgba(245, 239, 227, .08) !important;
}

#eventi .sol-events-day-load i {
  display: block !important;
  width: var(--sol-events-day-load, 0%) !important;
  min-width: 7px !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: var(--accent, #2f7d7b) !important;
}

#eventi .sol-events-day-load.load-empty i {
  width: 16% !important;
  min-width: 10px !important;
  background: rgba(170, 181, 178, .42) !important;
}

#eventi .sol-events-day-load.load-low i {
  background: #2f7d7b !important;
}

#eventi .sol-events-day-load.load-mid i {
  background: #c6a04a !important;
}

#eventi .sol-events-day-load.load-high i {
  background: #d9793f !important;
}

#eventi .sol-events-day-load.load-full i {
  background: #d9534f !important;
}

#eventi .sol-events-day-dot {
  display: block !important;
  position: absolute !important;
  top: 1px !important;
  right: -3px !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 999px !important;
  background: #c6a04a !important;
  box-shadow: 0 0 0 2px rgba(21, 28, 32, .95) !important;
}

#eventi .sol-events-day.muted .sol-events-day-num {
  color: rgba(245, 239, 227, .38) !important;
}

html[data-theme="light"] #eventi .sol-events-day {
  background: #ffffff !important;
}

html[data-theme="light"] #eventi .sol-events-day-num {
  color: #101716 !important;
}

html[data-theme="light"] #eventi .sol-events-day.is-today .sol-events-day-num {
  color: #ffffff !important;
}

html[data-theme="light"] #eventi .sol-events-day-dot {
  box-shadow: 0 0 0 2px #ffffff !important;
}

@media (max-width: 720px) {
  #eventi .sol-events-day {
    min-height: 72px !important;
    padding: 8px 7px !important;
    gap: 6px !important;
  }

  #eventi .sol-events-day-num {
    min-width: 35px !important;
    height: 35px !important;
    font-size: 1.16rem !important;
  }

  #eventi .sol-events-day-load {
    width: min(38px, 84%) !important;
  }

  #eventi .sol-events-day-dot {
    width: 7px !important;
    height: 7px !important;
    right: -2px !important;
  }
}

/* v156: mobile analytics history operational layout */
#analytics .sol-enterprise-table-wrap,
#storico .sol-enterprise-table-wrap {
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  border-radius: 8px !important;
}

#analytics .sol-enterprise-table,
#storico .sol-enterprise-table {
  min-width: 560px !important;
}

#storico .sol-v29-kpi-row {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 12px 0 !important;
}

#storico .sol-v29-kpi,
#storico .sol-enterprise-kpi {
  min-height: 86px !important;
  padding: 12px !important;
}

#storico .sol-v29-history-sidebar {
  gap: 8px !important;
}

@media (max-width: 760px) {
  #analytics,
  #storico {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  #analytics .sol-enterprise-analytics,
  #storico .sol-history-enterprise,
  #storico .sol-v29-history-shell,
  #storico .sol-v29-hero {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #analytics .sol-enterprise-head,
  #storico .sol-v29-hero {
    padding: 14px !important;
    border-radius: 8px !important;
    gap: 10px !important;
  }

  #analytics .sol-enterprise-head h1,
  #storico .sol-v29-hero h1 {
    font-size: 1.55rem !important;
    line-height: 1.05 !important;
  }

  #analytics .sol-enterprise-head p,
  #storico .sol-v29-hero p {
    font-size: .86rem !important;
    line-height: 1.32 !important;
  }

  #analytics .sol-enterprise-freshness {
    width: 100% !important;
    border-radius: 8px !important;
    text-align: center !important;
    white-space: normal !important;
  }

  #analytics .sol-analytics-kpi-grid,
  #storico .sol-v29-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  #analytics .sol-enterprise-kpi,
  #storico .sol-v29-kpi,
  #storico .sol-enterprise-kpi {
    min-height: 78px !important;
    padding: 10px !important;
    border-radius: 8px !important;
  }

  #analytics .sol-enterprise-kpi strong,
  #storico .sol-enterprise-kpi strong {
    font-size: 1.28rem !important;
  }

  #analytics .sol-analytics-grid-main,
  #storico .sol-history-two-col {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #analytics .sol-analytics-panel,
  #storico .sol-history-panel,
  #storico .sol-history-two-col > section {
    padding: 11px !important;
    border-radius: 8px !important;
  }

  #analytics .sol-panel-title,
  #storico .sol-panel-title {
    align-items: flex-start !important;
    gap: 4px !important;
  }

  #analytics .sol-panel-title strong,
  #storico .sol-panel-title strong {
    font-size: .98rem !important;
    line-height: 1.1 !important;
  }

  #storico .sol-v29-history-shell {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #storico .sol-v29-history-sidebar {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 8px !important;
    border-radius: 8px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important;
  }

  #storico .sol-v29-tab {
    flex: 0 0 auto !important;
    min-height: 38px !important;
    padding: 8px 10px !important;
    white-space: nowrap !important;
    border-radius: 8px !important;
  }

  #storico .sol-v29-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #storico .sol-v29-search-wrap,
  #storico #sol-history-search,
  #storico #sol-history-range {
    width: 100% !important;
    min-width: 0 !important;
  }

  #analytics .sol-enterprise-table,
  #storico .sol-enterprise-table {
    min-width: 520px !important;
  }

  #analytics .sol-enterprise-table th,
  #analytics .sol-enterprise-table td,
  #storico .sol-enterprise-table th,
  #storico .sol-enterprise-table td {
    font-size: .74rem !important;
    padding: 7px 6px !important;
  }
}

@media (max-width: 430px) {
  #analytics .sol-analytics-kpi-grid,
  #storico .sol-v29-kpi-row {
    grid-template-columns: 1fr 1fr !important;
  }

  #analytics .sol-enterprise-table,
  #storico .sol-enterprise-table {
    min-width: 500px !important;
  }
}

/* v179: event form enterprise modal, stable on desktop/tablet/mobile. */
#modal-evento.lux-modal-backdrop:not(.closed) {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5000 !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: center !important;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
  background: rgba(6, 10, 12, .78) !important;
  backdrop-filter: blur(10px) !important;
}

#modal-evento .lux-modal {
  width: min(1040px, calc(100vw - 28px)) !important;
  max-width: 1040px !important;
  height: min(900px, calc(100dvh - 28px)) !important;
  max-height: calc(100dvh - 28px) !important;
  margin: auto !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
  border-radius: 12px !important;
  border: 1px solid rgba(245, 239, 227, .12) !important;
  background: #151c20 !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .54) !important;
}

#modal-evento .lux-modal-header {
  position: relative !important;
  z-index: 5 !important;
  min-height: 58px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 16px !important;
  background: #1b2428 !important;
  border-bottom: 1px solid rgba(245, 239, 227, .12) !important;
}

#modal-evento .lux-modal-header h2 {
  margin: 0 !important;
  color: #f5efe3 !important;
  font-size: clamp(18px, 2vw, 24px) !important;
  line-height: 1.05 !important;
  letter-spacing: 0 !important;
}

#modal-evento .lux-modal-header [data-action="close-event-form"] {
  position: static !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  border: 1px solid rgba(245, 239, 227, .16) !important;
  background: #151c20 !important;
  color: #f5efe3 !important;
  box-shadow: none !important;
}

#modal-evento #form-evento,
#modal-evento .lux-form-eventi {
  min-height: 0 !important;
  height: 100% !important;
  display: block !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 16px 18px 0 !important;
  background: #151c20 !important;
  scrollbar-gutter: stable !important;
}

#modal-evento .lux-section-title {
  margin: 14px 0 9px !important;
  padding: 0 0 7px !important;
  border-bottom: 1px solid rgba(245, 239, 227, .10) !important;
  color: #f5efe3 !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
}

#modal-evento .lux-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 !important;
}

#modal-evento .lux-form-group {
  min-width: 0 !important;
  margin: 0 0 12px !important;
}

#modal-evento .lux-form-group label {
  display: block !important;
  margin: 0 0 5px !important;
  color: rgba(245, 239, 227, .78) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

#modal-evento input,
#modal-evento select,
#modal-evento textarea {
  width: 100% !important;
  min-height: 40px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(245, 239, 227, .14) !important;
  background: #0f1417 !important;
  color: #f5efe3 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  box-shadow: none !important;
}

#modal-evento textarea {
  min-height: 76px !important;
  resize: vertical !important;
}

#modal-evento input:focus,
#modal-evento select:focus,
#modal-evento textarea:focus {
  outline: 2px solid rgba(47, 125, 123, .48) !important;
  border-color: rgba(47, 125, 123, .9) !important;
}

#modal-evento .sol-menu-manager-panel {
  border-radius: 10px !important;
  border: 1px solid rgba(245, 239, 227, .12) !important;
  background: #10181b !important;
}

#modal-evento .lux-modal-footer {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 6 !important;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  align-items: stretch !important;
  margin: 16px -18px 0 !important;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom)) !important;
  border-top: 1px solid rgba(245, 239, 227, .12) !important;
  background: linear-gradient(180deg, rgba(21, 28, 32, .86), #1b2428 32%) !important;
}

#modal-evento .lux-modal-footer .btn,
#modal-evento .lux-modal-footer button,
#modal-evento .lux-modal-footer label.btn {
  min-height: 42px !important;
  margin: 0 !important;
  padding: 9px 10px !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

#modal-evento .lux-modal-footer .btn.primary {
  background: #2f7d7b !important;
  border-color: rgba(47, 125, 123, .95) !important;
  color: #fff !important;
}

#modal-evento .sol-event-print-options {
  grid-column: span 2 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 42px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(245, 239, 227, .12) !important;
  background: #151c20 !important;
}

#modal-evento .sol-event-print-options label {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  color: rgba(245, 239, 227, .82) !important;
  font-size: 12px !important;
}

@media (max-width: 900px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)) !important;
  }

  #modal-evento .lux-modal {
    width: calc(100vw - 20px) !important;
    height: calc(100dvh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
  }

  #modal-evento .lux-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  #modal-evento .lux-modal-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #modal-evento .lux-modal-footer .btn.primary,
  #modal-evento .sol-event-print-options {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 560px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    padding: 0 !important;
  }

  #modal-evento .lux-modal {
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  #modal-evento .lux-modal-header {
    min-height: 56px !important;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px !important;
  }

  #modal-evento #form-evento,
  #modal-evento .lux-form-eventi {
    padding: 12px 12px 0 !important;
  }

  #modal-evento .lux-section-title {
    font-size: 14px !important;
    margin-top: 12px !important;
  }

  #modal-evento .lux-modal-footer {
    margin: 14px -12px 0 !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
  }

  #modal-evento .lux-modal-footer .btn,
  #modal-evento .lux-modal-footer button,
  #modal-evento .lux-modal-footer label.btn {
    min-height: 40px !important;
    font-size: 11px !important;
  }
}

/* v179b: compact mobile event actions strip. */
@media (max-width: 560px) {
  #modal-evento .lux-modal-footer {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    min-height: 64px !important;
    margin: 14px -12px 0 !important;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) !important;
    scroll-snap-type: x proximity !important;
  }

  #modal-evento .lux-modal-footer .btn,
  #modal-evento .lux-modal-footer button,
  #modal-evento .lux-modal-footer label.btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 116px !important;
    min-height: 40px !important;
    white-space: nowrap !important;
    scroll-snap-align: start !important;
  }

  #modal-evento .lux-modal-footer .btn.primary {
    min-width: 148px !important;
  }

  #modal-evento .sol-event-print-options {
    flex: 0 0 260px !important;
    grid-column: auto !important;
    min-height: 40px !important;
  }

  #modal-evento .sol-event-print-options label {
    white-space: nowrap !important;
  }
}

/* v179c: enforce one-line event action strip on narrow mobile. */
@media (max-width: 560px) {
  #modal-evento .lux-modal-footer {
    height: calc(62px + env(safe-area-inset-bottom)) !important;
    min-height: calc(62px + env(safe-area-inset-bottom)) !important;
    max-height: calc(62px + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    padding-top: 10px !important;
    padding-bottom: calc(10px + env(safe-area-inset-bottom)) !important;
  }

  #modal-evento .lux-modal-footer .btn,
  #modal-evento .lux-modal-footer button,
  #modal-evento .lux-modal-footer label.btn,
  #modal-evento .sol-event-print-options {
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  #modal-evento .sol-event-print-options {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  #modal-evento .sol-event-print-options input {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
  }
}

/* v180: smaller event form action footer on desktop/tablet. */
@media (min-width: 561px) {
  #modal-evento .lux-modal-footer {
    grid-template-columns: minmax(160px, 1.2fr) minmax(128px, .9fr) minmax(220px, 1.3fr) repeat(4, minmax(118px, .9fr)) !important;
    grid-auto-rows: 38px !important;
    align-items: center !important;
    gap: 7px !important;
    min-height: 62px !important;
    max-height: 74px !important;
    overflow: hidden !important;
    margin-top: 10px !important;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom)) !important;
  }

  #modal-evento .lux-modal-footer .btn,
  #modal-evento .lux-modal-footer button,
  #modal-evento .lux-modal-footer label.btn {
    min-height: 38px !important;
    height: 38px !important;
    padding: 7px 9px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  #modal-evento .lux-modal-footer .btn.primary {
    grid-column: auto !important;
  }

  #modal-evento .sol-event-print-options {
    grid-column: auto !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 6px 8px !important;
    gap: 8px !important;
    overflow: hidden !important;
  }

  #modal-evento .sol-event-print-options label {
    font-size: 11px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  #modal-evento .sol-event-print-options input {
    width: 16px !important;
    min-width: 16px !important;
    height: 16px !important;
    min-height: 16px !important;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  #modal-evento .lux-modal-footer {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: 38px !important;
    max-height: 116px !important;
    overflow-y: auto !important;
  }

  #modal-evento .sol-event-print-options {
    grid-column: span 2 !important;
  }
}

/* v181: keep primary event save button visible first on mobile. */
@media (max-width: 560px) {
  #modal-evento .lux-modal-footer {
    justify-content: flex-start !important;
    scroll-padding-left: 12px !important;
  }

  #modal-evento .lux-modal-footer .btn.primary {
    order: -2 !important;
    flex: 0 0 148px !important;
    min-width: 148px !important;
  }

  #modal-evento .sol-event-print-options {
    order: -1 !important;
  }
}

/* v182: mobile event actions flow inside the form, no sticky overlap. */
@media (max-width: 560px) {
  #modal-evento #form-evento,
  #modal-evento .lux-form-eventi {
    padding-bottom: max(18px, env(safe-area-inset-bottom)) !important;
  }

  #modal-evento .lux-modal-footer {
    position: static !important;
    bottom: auto !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-auto-flow: row !important;
    grid-auto-rows: auto !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 14px 0 0 !important;
    padding: 12px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(245, 239, 227, .12) !important;
    background: #1b2428 !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #modal-evento .lux-modal-footer .btn,
  #modal-evento .lux-modal-footer button,
  #modal-evento .lux-modal-footer label.btn {
    position: static !important;
    flex: initial !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 8px 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #modal-evento .lux-modal-footer .btn.primary {
    order: -3 !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    min-height: 44px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  #modal-evento .sol-event-print-options {
    order: -2 !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 40px !important;
    max-height: none !important;
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  #modal-evento .sol-event-print-options label {
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 6px 7px !important;
    border-radius: 7px !important;
    border: 1px solid rgba(245, 239, 227, .12) !important;
    background: #151c20 !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }

  #modal-evento .sol-event-print-options input {
    width: 15px !important;
    min-width: 15px !important;
    height: 15px !important;
    min-height: 15px !important;
  }
}

/* v182b: respect hidden event buttons and stretch mobile grid buttons. */
@media (max-width: 560px) {
  #modal-evento .lux-modal-footer > button,
  #modal-evento .lux-modal-footer > .btn,
  #modal-evento .lux-modal-footer > label.btn {
    justify-self: stretch !important;
    inline-size: 100% !important;
  }

  #modal-evento .lux-modal-footer button[style*="display:none"],
  #modal-evento .lux-modal-footer button[style*="display: none"],
  #modal-evento .lux-modal-footer #btn-annulla-evento[style*="display:none"],
  #modal-evento .lux-modal-footer #btn-annulla-evento[style*="display: none"],
  #modal-evento .lux-modal-footer #btn-elimina-evento[style*="display:none"],
  #modal-evento .lux-modal-footer #btn-elimina-evento[style*="display: none"] {
    display: none !important;
  }
}

/* v182c: footer close action must not inherit round modal-close sizing. */
@media (max-width: 560px) {
  #modal-evento .lux-modal-footer > button[data-action="close-event-form"] {
    position: static !important;
    top: auto !important;
    right: auto !important;
    display: flex !important;
    justify-self: stretch !important;
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 8px !important;
  }
}

/* v183: tablet event actions flow with the form, no clipped sticky footer. */
#modal-evento .lux-modal-footer button[style*="display:none"],
#modal-evento .lux-modal-footer button[style*="display: none"],
#modal-evento .lux-modal-footer #btn-annulla-evento[style*="display:none"],
#modal-evento .lux-modal-footer #btn-annulla-evento[style*="display: none"],
#modal-evento .lux-modal-footer #btn-elimina-evento[style*="display:none"],
#modal-evento .lux-modal-footer #btn-elimina-evento[style*="display: none"] {
  display: none !important;
}

@media (min-width: 561px) and (max-width: 1100px) {
  #modal-evento #form-evento,
  #modal-evento .lux-form-eventi {
    padding-bottom: 18px !important;
  }

  #modal-evento .lux-modal-footer {
    position: static !important;
    bottom: auto !important;
    z-index: auto !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-rows: auto !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    width: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 14px 0 0 !important;
    padding: 12px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(245, 239, 227, .12) !important;
    background: #1b2428 !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #modal-evento .lux-modal-footer > .btn,
  #modal-evento .lux-modal-footer > button,
  #modal-evento .lux-modal-footer > label.btn {
    position: static !important;
    justify-self: stretch !important;
    width: 100% !important;
    inline-size: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #modal-evento .lux-modal-footer > button[data-action="close-event-form"] {
    top: auto !important;
    right: auto !important;
  }

  #modal-evento .lux-modal-footer .btn.primary {
    grid-column: 1 / -1 !important;
    height: 44px !important;
    min-height: 44px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  #modal-evento .sol-event-print-options {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    max-height: none !important;
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  #modal-evento .sol-event-print-options label {
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 6px 8px !important;
    border-radius: 7px !important;
    border: 1px solid rgba(245, 239, 227, .12) !important;
    background: #151c20 !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }
}

@media (min-width: 561px) and (max-width: 760px) {
  #modal-evento .lux-modal-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* v183b: tablet portrait event actions use two balanced columns. */
@media (min-width: 561px) and (max-width: 900px) {
  #modal-evento .lux-modal-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* v184: event modal tablet/browser alignment polish. */
@media (min-width: 561px) and (max-width: 1366px) {
  #modal-evento.lux-modal-backdrop:not(.closed) {
    align-items: center !important;
    justify-content: center !important;
    padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
  }

  #modal-evento .lux-modal {
    width: min(980px, calc(100vw - 36px)) !important;
    height: min(860px, calc(100svh - 36px)) !important;
    max-height: calc(100svh - 36px) !important;
    margin: auto !important;
  }

  #modal-evento .lux-modal-header {
    flex: 0 0 auto !important;
    min-height: 60px !important;
  }

  #modal-evento #form-evento,
  #modal-evento .lux-form-eventi {
    padding: 16px 20px 20px !important;
    scrollbar-gutter: stable both-edges !important;
  }

  #modal-evento .lux-modal-footer {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    width: min(760px, 100%) !important;
    max-width: 760px !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 16px auto 0 !important;
    padding: 12px !important;
    overflow: visible !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-rows: auto !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: center !important;
    border-radius: 10px !important;
    border: 1px solid rgba(245, 239, 227, .12) !important;
    background: #1b2428 !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #modal-evento .lux-modal-footer > .btn,
  #modal-evento .lux-modal-footer > button,
  #modal-evento .lux-modal-footer > label.btn {
    position: static !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-align: center !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #modal-evento .lux-modal-footer .btn.primary {
    grid-column: 1 / -1 !important;
    height: 44px !important;
    min-height: 44px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
  }

  #modal-evento .sol-event-print-options {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 42px !important;
    max-height: none !important;
    padding: 8px !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  #modal-evento .sol-event-print-options label {
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 6px 8px !important;
    border-radius: 7px !important;
    border: 1px solid rgba(245, 239, 227, .12) !important;
    background: #151c20 !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  #modal-evento .lux-modal-footer {
    width: min(640px, 100%) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* v184b: keep event action footer centered on every non-mobile width. */
@media (min-width: 561px) {
  #modal-evento .lux-modal-footer {
    position: static !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: min(760px, 100%) !important;
    max-width: 760px !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 16px auto 0 !important;
    padding: 12px !important;
    overflow: visible !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: auto !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: center !important;
    border-radius: 10px !important;
    border: 1px solid rgba(245, 239, 227, .12) !important;
    background: #1b2428 !important;
    box-sizing: border-box !important;
    transform: none !important;
  }

  #modal-evento .lux-modal-footer .btn.primary,
  #modal-evento .sol-event-print-options {
    grid-column: 1 / -1 !important;
  }

  #modal-evento .lux-modal-footer > .btn,
  #modal-evento .lux-modal-footer > button,
  #modal-evento .lux-modal-footer > label.btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  #modal-evento .lux-modal-footer {
    width: min(640px, 100%) !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* v185: event modal must own the screen on tablet/browser too. */
body.sol-event-modal-open,
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) body {
  overflow: hidden !important;
}

body.sol-event-modal-open #app > .site-header,
body.sol-event-modal-open #app > header.site-header,
body.sol-event-modal-open #app > .command-bar,
body.sol-event-modal-open .sol-pwa-install-card,
body.sol-event-modal-open .sol-pwa-update-card,
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #app > .site-header,
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #app > header.site-header,
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #app > .command-bar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.sol-event-modal-open #modal-evento.lux-modal-backdrop:not(.closed),
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #modal-evento.lux-modal-backdrop:not(.closed) {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100svh !important;
  max-height: 100svh !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
  overflow: hidden !important;
  background: rgba(6, 10, 12, .88) !important;
  box-sizing: border-box !important;
}

body.sol-event-modal-open #modal-evento .lux-modal,
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #modal-evento .lux-modal {
  position: relative !important;
  z-index: 2147483647 !important;
  width: min(980px, calc(100vw - 24px)) !important;
  max-width: min(980px, calc(100vw - 24px)) !important;
  height: min(860px, calc(100svh - 24px)) !important;
  max-height: calc(100svh - 24px) !important;
  margin: auto !important;
  transform: none !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
}

body.sol-event-modal-open #modal-evento .lux-modal-header,
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #modal-evento .lux-modal-header {
  display: flex !important;
  min-height: 60px !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 2147483647 !important;
}

body.sol-event-modal-open #modal-evento #form-evento,
body.sol-event-modal-open #modal-evento .lux-form-eventi,
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #modal-evento #form-evento,
html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #modal-evento .lux-form-eventi {
  min-height: 0 !important;
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

@media (max-width: 560px) {
  body.sol-event-modal-open #modal-evento.lux-modal-backdrop:not(.closed),
  html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #modal-evento.lux-modal-backdrop:not(.closed) {
    padding: 0 !important;
  }

  body.sol-event-modal-open #modal-evento .lux-modal,
  html:has(#modal-evento.lux-modal-backdrop:not(.closed)) #modal-evento .lux-modal {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100svh !important;
    max-height: 100svh !important;
    border-radius: 0 !important;
  }
}

/* v187 storico: periodo personalizzato, confronti e stampa operativa */
.sol-history-period-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid rgba(47, 125, 123, .28);
  border-radius: 10px;
  background: rgba(18, 28, 31, .72);
}
.sol-history-period-controls label {
  display: grid;
  gap: 4px;
  min-width: 136px;
  color: var(--muted, rgba(245, 239, 227, .68));
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.sol-history-period-controls input {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(245, 239, 227, .16);
  background: rgba(8, 13, 15, .74);
  color: var(--text, #f5efe3);
  padding: 7px 9px;
}
.sol-history-date-pair {
  display: grid;
  grid-template-columns: minmax(168px, 1fr) 66px;
  gap: 7px;
  align-items: end;
}
.sol-history-day-select {
  min-height: 38px;
  border: 1px solid rgba(245, 239, 227, .16);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(24, 34, 37, .96), rgba(11, 17, 19, .96));
  color: var(--text, #f5efe3);
  padding: 8px 8px;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}
.sol-history-day-select:disabled {
  opacity: .48;
  cursor: default;
}
html[data-theme="light"] .sol-history-day-select {
  background: #f7faf8 !important;
  color: #101716 !important;
  border-color: rgba(28, 43, 39, .18) !important;
}
.sol-history-month-picker {
  position: relative;
  min-width: 168px;
}
.sol-history-month-picker input[type="hidden"] { display: none !important; }
.sol-history-month-trigger {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(245, 239, 227, .16);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(24, 34, 37, .96), rgba(11, 17, 19, .96));
  color: var(--text, #f5efe3);
  padding: 8px 34px 8px 10px;
  text-align: left;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  cursor: pointer;
}
.sol-history-month-trigger::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #55a7a2;
  pointer-events: none;
}
.sol-history-month-panel {
  position: absolute;
  z-index: 80;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  display: none;
  max-height: 258px;
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(47, 125, 123, .42);
  border-radius: 10px;
  background: #10181b;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .38);
}
.sol-history-month-picker.open .sol-history-month-panel { display: grid; gap: 4px; }
.sol-history-month-panel button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(245, 239, 227, .82);
  padding: 7px 9px;
  text-align: left;
  font-weight: 750;
  cursor: pointer;
}
.sol-history-month-panel button:hover,
.sol-history-month-panel button.active {
  background: rgba(47, 125, 123, .24);
  color: #fff;
}
html[data-theme="light"] .sol-history-month-trigger {
  background: #f7faf8 !important;
  color: #101716 !important;
  border-color: rgba(28, 43, 39, .18) !important;
}
html[data-theme="light"] .sol-history-month-panel {
  background: #ffffff !important;
  border-color: rgba(28, 43, 39, .18) !important;
  box-shadow: 0 18px 36px rgba(20, 30, 28, .16) !important;
}
html[data-theme="light"] .sol-history-month-panel button { color: #182421 !important; }
html[data-theme="light"] .sol-history-month-panel button:hover,
html[data-theme="light"] .sol-history-month-panel button.active {
  background: rgba(47, 125, 123, .13) !important;
}
.sol-v29-btn.compact {
  min-height: 36px;
  padding: 8px 12px;
}
.sol-history-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.sol-history-chart-grid > section {
  min-width: 0;
  border: 1px solid rgba(245, 239, 227, .08);
  border-radius: 10px;
  background: rgba(15, 20, 23, .58);
  padding: 12px;
}
.sol-history-chart-grid h3 {
  margin: 0 0 10px;
  color: var(--text, #f5efe3);
  font-size: .96rem;
}
.sol-history-bars {
  display: grid;
  gap: 8px;
}
.sol-history-bar-row {
  display: grid;
  grid-template-columns: 168px minmax(90px, 1fr) 70px 116px;
  gap: 8px;
  align-items: center;
  color: rgba(245, 239, 227, .84);
  font-size: .82rem;
}
.sol-history-bar-row span { line-height: 1.15; }
.sol-history-bar-row > div {
  height: 11px;
  border-radius: 999px;
  background: rgba(245, 239, 227, .09);
  overflow: hidden;
}
.sol-history-bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7d7b, #55a7a2);
}
.sol-history-bar-row strong {
  color: var(--text, #f5efe3);
  text-align: right;
}
.sol-history-bar-row small {
  color: var(--muted, rgba(245, 239, 227, .58));
}
.sol-history-compare {
  display: grid;
  gap: 0;
  border: 1px solid rgba(245, 239, 227, .08);
  border-radius: 8px;
  overflow: hidden;
}
.sol-history-compare-head,
.sol-history-compare div {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 86px 118px 62px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(245, 239, 227, .08);
  font-size: .8rem;
}
.sol-history-compare-head {
  background: rgba(47, 125, 123, .18);
  color: var(--muted, rgba(245, 239, 227, .7));
  font-weight: 800;
  text-transform: uppercase;
}
.sol-history-compare div:last-child { border-bottom: 0; }
.sol-history-compare strong { color: var(--text, #f5efe3); }
.sol-history-compare em { font-style: normal; font-weight: 900; }
.sol-history-compare em.up { color: #68d391; }
.sol-history-compare em.down { color: #f87171; }
.sol-history-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sol-history-summary-list div {
  border: 1px solid rgba(245, 239, 227, .08);
  border-radius: 9px;
  padding: 10px;
  background: rgba(255, 255, 255, .035);
}
.sol-history-summary-list span {
  display: block;
  color: var(--muted, rgba(245, 239, 227, .62));
  font-size: .75rem;
  text-transform: uppercase;
}
.sol-history-summary-list strong {
  display: block;
  margin-top: 4px;
  color: var(--text, #f5efe3);
  font-size: 1.35rem;
}
html[data-theme="light"] .sol-history-period-controls,
html[data-theme="light"] .sol-history-chart-grid > section,
html[data-theme="light"] .sol-history-summary-list div {
  background: #fff !important;
  border-color: rgba(28, 43, 39, .14) !important;
}
html[data-theme="light"] .sol-history-period-controls input {
  background: #f7faf8 !important;
  color: #101716 !important;
  border-color: rgba(28, 43, 39, .18) !important;
}
html[data-theme="light"] .sol-history-chart-grid h3,
html[data-theme="light"] .sol-history-bar-row,
html[data-theme="light"] .sol-history-bar-row strong,
html[data-theme="light"] .sol-history-compare strong,
html[data-theme="light"] .sol-history-summary-list strong {
  color: #101716 !important;
}
html[data-theme="light"] .sol-history-bar-row span { line-height: 1.15; }
.sol-history-bar-row > div { background: #e4ebe8 !important; }
@media (max-width: 980px) {
  .sol-history-chart-grid { grid-template-columns: 1fr; }
  .sol-history-bar-row { grid-template-columns: 112px minmax(80px, 1fr) 64px; }
  .sol-history-bar-row small { grid-column: 2 / -1; }
}
@media (max-width: 760px) {
  .sol-v29-toolbar { align-items: stretch !important; }
  .sol-history-period-controls { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .sol-history-period-controls button { grid-column: 1 / -1; }
  .sol-history-compare-head,
  .sol-history-compare div { grid-template-columns: 1fr 64px 78px 52px; font-size: .72rem; gap: 5px; padding: 7px; }
  .sol-history-summary-list { grid-template-columns: 1fr; }
}





/* Storico clienti provvisorio: nome/cognome prima del telefono */
.sol-history-clients-panel .sol-panel-title strong { color: var(--text, #f5efe3); }
.sol-history-client-note { margin: 0 0 12px; padding: 10px 12px; border: 1px solid rgba(47, 125, 123, .28); border-radius: 9px; background: rgba(47, 125, 123, .10); color: var(--muted, rgba(245, 239, 227, .68)); font-size: .84rem; line-height: 1.35; }
.sol-history-client-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.sol-history-client-strip article, .sol-history-client-card { border: 1px solid rgba(245, 239, 227, .10); border-radius: 10px; background: rgba(255, 255, 255, .035); }
.sol-history-client-strip article { padding: 11px 12px; }
.sol-history-client-strip span, .sol-history-client-card span { display: block; color: var(--muted, rgba(245, 239, 227, .62)); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.sol-history-client-strip strong { display: block; margin-top: 3px; color: var(--text, #f5efe3); font-size: 1.45rem; }
.sol-history-client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sol-history-client-card { padding: 13px; }
.sol-history-client-card.needs-review { border-color: rgba(198, 160, 74, .42); background: linear-gradient(135deg, rgba(198, 160, 74, .08), rgba(255, 255, 255, .025)); }
.sol-history-client-card header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding-bottom: 9px; margin-bottom: 10px; border-bottom: 1px solid rgba(245, 239, 227, .08); }
.sol-history-client-card header strong { display: block; color: var(--text, #f5efe3); font-size: 1.04rem; }
.sol-history-client-card header small { display: block; margin-top: 2px; color: var(--muted, rgba(245, 239, 227, .62)); font-size: .78rem; }
.sol-history-client-card header b { white-space: nowrap; color: #55a7a2; font-size: .86rem; }
.sol-history-client-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sol-history-client-metrics div { min-width: 0; border: 1px solid rgba(245, 239, 227, .08); border-radius: 8px; padding: 8px; background: rgba(15, 20, 23, .36); }
.sol-history-client-metrics strong { display: block; margin-top: 3px; color: var(--text, #f5efe3); font-size: .86rem; overflow-wrap: anywhere; }
.sol-history-client-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sol-history-client-flags em { border: 1px solid rgba(198, 160, 74, .42); border-radius: 999px; padding: 4px 7px; color: #f4d787; background: rgba(198, 160, 74, .10); font-size: .72rem; font-style: normal; font-weight: 800; }
.sol-history-client-notes { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(245, 239, 227, .08); }
.sol-history-client-notes p { margin: 5px 0 0; color: var(--text, #f5efe3); font-size: .82rem; line-height: 1.3; }
html[data-theme="light"] .sol-history-client-note, html[data-theme="light"] .sol-history-client-strip article, html[data-theme="light"] .sol-history-client-card, html[data-theme="light"] .sol-history-client-metrics div { background: #fff !important; border-color: rgba(28, 43, 39, .14) !important; }
html[data-theme="light"] .sol-history-client-strip strong, html[data-theme="light"] .sol-history-client-card header strong, html[data-theme="light"] .sol-history-client-metrics strong, html[data-theme="light"] .sol-history-client-notes p { color: #101716 !important; }
@media (max-width: 980px) { .sol-history-client-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .sol-history-client-strip { grid-template-columns: 1fr; } .sol-history-client-card { padding: 11px; } .sol-history-client-metrics { grid-template-columns: 1fr; } }

/* v194 storico clienti: visite e contatto locale modificabile */
.sol-history-client-strip small { display:block; margin-top:3px; color:var(--muted, rgba(245,239,227,.62)); font-size:.76rem; font-weight:800; }
.sol-history-client-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.sol-history-client-actions button,
.sol-history-client-form button { border:1px solid rgba(47,125,123,.44); border-radius:8px; padding:7px 10px; background:rgba(47,125,123,.18); color:var(--text,#f5efe3); font-weight:850; font-size:.78rem; cursor:pointer; }
.sol-history-client-actions button.muted,
.sol-history-client-form button.muted { border-color:rgba(245,239,227,.16); background:rgba(245,239,227,.055); color:var(--muted, rgba(245,239,227,.70)); }
.sol-history-client-form[hidden] { display:none !important; }
.sol-history-client-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:10px; padding:10px; border:1px solid rgba(47,125,123,.30); border-radius:10px; background:rgba(47,125,123,.08); }
.sol-history-client-form label { display:grid; gap:5px; min-width:0; }
.sol-history-client-form label span { font-size:.68rem; }
.sol-history-client-form input { width:100%; min-height:36px; border:1px solid rgba(245,239,227,.14); border-radius:8px; padding:7px 9px; background:rgba(15,20,23,.54); color:var(--text,#f5efe3); font-weight:750; }
.sol-history-client-form > div { display:flex; gap:7px; align-items:end; grid-column:1 / -1; }
.sol-history-client-visits { margin-top:10px; padding-top:9px; border-top:1px solid rgba(245,239,227,.08); }
.sol-history-client-visits ul { list-style:none; padding:0; margin:6px 0 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
.sol-history-client-visits li,
.sol-history-client-visits p { margin:0; border:1px solid rgba(245,239,227,.08); border-radius:7px; padding:6px 7px; background:rgba(15,20,23,.32); color:var(--text,#f5efe3); font-size:.78rem; font-weight:760; }
html[data-theme="light"] .sol-history-client-actions button,
html[data-theme="light"] .sol-history-client-form button { color:#101716; background:rgba(47,125,123,.12); }
html[data-theme="light"] .sol-history-client-form,
html[data-theme="light"] .sol-history-client-form input,
html[data-theme="light"] .sol-history-client-visits li,
html[data-theme="light"] .sol-history-client-visits p { background:#fff !important; border-color:rgba(28,43,39,.14) !important; color:#101716 !important; }
@media (max-width:760px) { .sol-history-client-form, .sol-history-client-visits ul { grid-template-columns:1fr; } .sol-history-client-form > div { display:grid; grid-template-columns:1fr 1fr; } .sol-history-client-actions button, .sol-history-client-form button { width:100%; } }
@media print { .sol-history-client-actions, .sol-history-client-form { display:none !important; } .sol-history-client-visits ul { grid-template-columns:repeat(2,1fr); } }

/* v195 storico clienti: azioni piu visibili e righe visita con tavolo */
.sol-history-client-actions { margin:12px 0 4px !important; padding:8px !important; border:1px solid rgba(47,125,123,.28); border-radius:10px; background:rgba(47,125,123,.075); }
.sol-history-client-actions button { min-height:36px; padding:8px 12px !important; border-color:rgba(47,125,123,.70) !important; background:linear-gradient(135deg, rgba(47,125,123,.34), rgba(47,125,123,.18)) !important; color:#f5efe3 !important; box-shadow:0 8px 18px rgba(0,0,0,.16); }
.sol-history-client-actions button.muted { border-color:rgba(198,160,74,.42) !important; background:rgba(198,160,74,.11) !important; color:#f4d787 !important; }
.sol-history-client-form:not([hidden]) { box-shadow:0 0 0 1px rgba(47,125,123,.22), 0 14px 30px rgba(0,0,0,.20); }
.sol-history-client-visits li { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:30px; }
html[data-theme="light"] .sol-history-client-actions { background:rgba(47,125,123,.08); border-color:rgba(47,125,123,.22); }
html[data-theme="light"] .sol-history-client-actions button { color:#10201f !important; background:linear-gradient(135deg, rgba(47,125,123,.20), rgba(47,125,123,.09)) !important; }
@media (max-width:760px) { .sol-history-client-actions { display:grid !important; grid-template-columns:1fr; } .sol-history-client-visits li { display:block; } }

/* v196: Storico solo analisi, Rubrica operativa piu leggibile */
.sol-history-client-actions,
.sol-history-client-form { display: none !important; }
.sol-history-client-card { padding: 16px !important; }
.sol-history-client-card header strong { font-size: 1.18rem !important; }
.sol-history-client-visits li { min-height: 34px; font-size: .86rem !important; }

.sol-rubrica-letter { margin: 0 0 18px; }
.sol-rubrica-letter .rubrica-letter-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 10px; padding:10px 12px; border:1px solid rgba(47,125,123,.28); border-radius:10px; background:rgba(47,125,123,.08); }
.sol-rubrica-letter .rubrica-letter-header h3 { margin:0; color:var(--text,#f5efe3); font-size:1.1rem; }
.sol-rubrica-letter .rubrica-letter-header span { color:var(--muted,rgba(245,239,227,.65)); font-size:.82rem; font-weight:800; }
.sol-rubrica-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(360px,1fr)); gap:14px; }
.sol-rubrica-card { border:1px solid rgba(245,239,227,.11); border-radius:12px; padding:16px; background:linear-gradient(135deg, rgba(255,255,255,.055), rgba(47,125,123,.045)); box-shadow:0 14px 32px rgba(0,0,0,.18); }
.sol-rubrica-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding-bottom:10px; margin-bottom:12px; border-bottom:1px solid rgba(245,239,227,.09); }
.sol-rubrica-card-head strong { display:block; color:var(--text,#f5efe3); font-size:1.22rem; line-height:1.15; }
.sol-rubrica-card-head small { display:block; margin-top:4px; color:var(--muted,rgba(245,239,227,.64)); font-size:.86rem; font-weight:760; }
.sol-rubrica-card-head b { white-space:nowrap; color:#63b8b2; font-size:.9rem; }
.sol-rubrica-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.sol-rubrica-fields div { min-width:0; border:1px solid rgba(245,239,227,.08); border-radius:9px; padding:9px 10px; background:rgba(15,20,23,.34); }
.sol-rubrica-fields span, .sol-rubrica-visits span, .sol-rubrica-edit span { display:block; color:var(--muted,rgba(245,239,227,.62)); font-size:.7rem; font-weight:850; text-transform:uppercase; }
.sol-rubrica-fields strong { display:block; margin-top:4px; color:var(--text,#f5efe3); font-size:.94rem; overflow-wrap:anywhere; }
.sol-rubrica-flags { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 0; }
.sol-rubrica-flags em { border:1px solid rgba(198,160,74,.42); border-radius:999px; padding:4px 8px; color:#f4d787; background:rgba(198,160,74,.10); font-size:.72rem; font-style:normal; font-weight:850; }
.sol-rubrica-actions { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:12px; }
.sol-rubrica-action, .sol-rubrica-edit button, .sol-rubrica-more { min-height:38px; border:1px solid rgba(47,125,123,.45); border-radius:9px; padding:8px 10px; background:rgba(47,125,123,.16); color:var(--text,#f5efe3); font-weight:850; font-size:.82rem; text-align:center; text-decoration:none; cursor:pointer; }
.sol-rubrica-action.success { background:rgba(14,117,62,.18); border-color:rgba(42,180,105,.35); }
.sol-rubrica-action.danger { background:rgba(150,49,49,.13); border-color:rgba(230,93,93,.34); }
.sol-rubrica-action[disabled] { opacity:.45; cursor:not-allowed; }
.sol-rubrica-edit[hidden] { display:none !important; }
.sol-rubrica-edit { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; padding:11px; border:1px solid rgba(47,125,123,.32); border-radius:10px; background:rgba(47,125,123,.075); }
.sol-rubrica-edit label { display:grid; gap:5px; min-width:0; }
.sol-rubrica-edit input { width:100%; min-height:38px; border:1px solid rgba(245,239,227,.14); border-radius:8px; padding:8px 10px; background:rgba(15,20,23,.54); color:var(--text,#f5efe3); font-weight:760; }
.sol-rubrica-edit > div { display:grid; grid-template-columns:1fr 1fr; gap:8px; grid-column:1 / -1; }
.sol-rubrica-visits { margin-top:12px; padding-top:10px; border-top:1px solid rgba(245,239,227,.09); }
.sol-rubrica-visits ul { list-style:none; padding:0; margin:8px 0 0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.sol-rubrica-visits li, .sol-rubrica-visits p { margin:0; border:1px solid rgba(245,239,227,.08); border-radius:8px; padding:7px 8px; background:rgba(15,20,23,.30); color:var(--text,#f5efe3); font-size:.82rem; font-weight:760; line-height:1.28; }
.sol-rubrica-more { margin-top:8px; min-height:34px; width:100%; background:rgba(245,239,227,.055); border-color:rgba(245,239,227,.14); color:var(--muted,rgba(245,239,227,.72)); }
.letter-btn.empty { opacity:.35; cursor:not-allowed; }
.letter-btn span { margin-left:3px; opacity:.78; }
html[data-theme="light"] .sol-rubrica-card,
html[data-theme="light"] .sol-rubrica-fields div,
html[data-theme="light"] .sol-rubrica-visits li,
html[data-theme="light"] .sol-rubrica-visits p,
html[data-theme="light"] .sol-rubrica-edit { background:#fff !important; border-color:rgba(28,43,39,.14) !important; color:#101716 !important; }
html[data-theme="light"] .sol-rubrica-card-head strong,
html[data-theme="light"] .sol-rubrica-fields strong,
html[data-theme="light"] .sol-rubrica-visits li,
html[data-theme="light"] .sol-rubrica-visits p { color:#101716 !important; }
@media (max-width: 900px) { .sol-rubrica-grid { grid-template-columns:1fr; } .sol-rubrica-actions { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 560px) { .sol-rubrica-card { padding:13px; } .sol-rubrica-fields, .sol-rubrica-edit, .sol-rubrica-visits ul { grid-template-columns:1fr; } .sol-rubrica-actions { grid-template-columns:1fr 1fr; } }

/* v197: ripristino layout rubrica originale con azioni compatte */
.rubrica-letters { display:flex !important; flex-wrap:wrap; gap:7px; margin:10px 0 14px; padding:10px; border:1px solid rgba(198,160,74,.22); border-radius:12px; background:rgba(15,20,23,.28); }
.rubrica-letters .letter-btn { min-height:32px; border:1px solid rgba(245,239,227,.14); border-radius:8px; padding:6px 9px; background:rgba(245,239,227,.055); color:var(--text,#f5efe3); font-weight:850; font-size:.82rem; cursor:pointer; }
.rubrica-letters .letter-btn.active { border-color:rgba(47,125,123,.48); background:rgba(47,125,123,.18); }
.rubrica-letters .letter-btn.selected { border-color:rgba(198,160,74,.66); background:rgba(198,160,74,.16); color:#f4d787; }
.rubrica-letters .letter-btn:disabled { opacity:.35; cursor:not-allowed; }
.rubrica-letters .count { margin-left:3px; opacity:.75; font-size:.72rem; }
.sol-rubrica-legacy-card .rubrica-card-badge { border:1px solid rgba(198,160,74,.42); border-radius:999px; padding:7px 10px; background:rgba(198,160,74,.12); color:#f4d787; font-weight:900; cursor:pointer; }
.sol-rubrica-legacy-meta { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 0; }
.sol-rubrica-legacy-meta span, .sol-rubrica-legacy-meta em { border:1px solid rgba(245,239,227,.10); border-radius:999px; padding:4px 7px; background:rgba(15,20,23,.30); color:var(--muted,rgba(245,239,227,.68)); font-size:.72rem; font-style:normal; font-weight:800; }
.sol-rubrica-legacy-meta em { border-color:rgba(198,160,74,.38); color:#f4d787; background:rgba(198,160,74,.10); }
.sol-rubrica-legacy-actions { display:grid !important; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px !important; margin-top:10px; }
.sol-rubrica-legacy-actions a, .sol-rubrica-legacy-actions button { min-height:34px; border-radius:8px; text-align:center; text-decoration:none; font-size:.78rem; font-weight:850; }
.rubrica-btn-edit, .rubrica-btn-hide { border:1px solid rgba(47,125,123,.40); background:rgba(47,125,123,.14); color:var(--text,#f5efe3); cursor:pointer; }
.rubrica-btn-hide { border-color:rgba(230,93,93,.32); background:rgba(150,49,49,.12); }
.sol-rubrica-legacy-edit[hidden], .sol-rubrica-legacy-details[hidden] { display:none !important; }
.sol-rubrica-legacy-edit { display:grid; grid-template-columns:1fr 1fr auto auto; gap:8px; margin-top:10px; padding:10px; border:1px solid rgba(47,125,123,.28); border-radius:10px; background:rgba(47,125,123,.075); }
.sol-rubrica-legacy-edit input { min-width:0; min-height:34px; border:1px solid rgba(245,239,227,.14); border-radius:8px; padding:7px 9px; background:rgba(15,20,23,.48); color:var(--text,#f5efe3); }
.sol-rubrica-legacy-edit button { border:1px solid rgba(47,125,123,.42); border-radius:8px; background:rgba(47,125,123,.16); color:var(--text,#f5efe3); font-weight:850; }
.sol-rubrica-legacy-details { margin-top:10px; padding:10px; border:1px solid rgba(245,239,227,.10); border-radius:10px; background:rgba(15,20,23,.24); }
.sol-rubrica-legacy-details strong { display:block; margin-bottom:7px; color:var(--text,#f5efe3); font-size:.82rem; }
.sol-rubrica-legacy-details ul { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
.sol-rubrica-legacy-details li { border:1px solid rgba(245,239,227,.08); border-radius:7px; padding:6px 7px; background:rgba(15,20,23,.30); color:var(--text,#f5efe3); font-size:.76rem; font-weight:760; }
@media (max-width:760px) { .sol-rubrica-legacy-actions { grid-template-columns:1fr 1fr; } .sol-rubrica-legacy-edit, .sol-rubrica-legacy-details ul { grid-template-columns:1fr; } }

/* v198: rubrica leggibile con popup scheda cliente */
.sol-rubrica-v198-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px !important;
  align-items: stretch;
}
.sol-rubrica-v198-card {
  min-height: 235px;
  padding: 18px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(198,160,74,.30) !important;
  background: linear-gradient(135deg, rgba(245,239,227,.055), rgba(47,125,123,.065)) !important;
  box-shadow: 0 18px 38px rgba(0,0,0,.22) !important;
  display: grid;
  gap: 14px;
}
.sol-rubrica-v198-head {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: start;
  gap: 13px;
}
.sol-rubrica-v198-title h3 {
  margin: 0;
  color: var(--text,#f5efe3);
  font-size: 1.28rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.sol-rubrica-v198-title p {
  margin: 5px 0 0;
  color: var(--muted,rgba(245,239,227,.68));
  font-size: .95rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}
.sol-rubrica-v198-visit-badge {
  min-height: 34px;
  border: 1px solid rgba(198,160,74,.45);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(198,160,74,.12);
  color: #f4d787;
  font-size: .82rem;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.sol-rubrica-v198-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.sol-rubrica-v198-stats div {
  min-width: 0;
  border: 1px solid rgba(245,239,227,.10);
  border-radius: 10px;
  padding: 9px 10px;
  background: rgba(15,20,23,.36);
}
.sol-rubrica-v198-stats span,
.sol-rubrica-v198-modal-grid span {
  display: block;
  color: var(--muted,rgba(245,239,227,.62));
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}
.sol-rubrica-v198-stats strong,
.sol-rubrica-v198-modal-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--text,#f5efe3);
  font-size: .96rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}
.sol-rubrica-v198-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 24px;
}
.sol-rubrica-v198-flags em {
  border: 1px solid rgba(198,160,74,.40);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(198,160,74,.10);
  color: #f4d787;
  font-size: .76rem;
  font-style: normal;
  font-weight: 850;
}
.sol-rubrica-v198-actions,
.sol-rubrica-v198-modal-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: auto;
}
.sol-rubrica-v198-btn {
  min-height: 44px;
  border: 1px solid rgba(245,239,227,.14);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(245,239,227,.055);
  color: var(--text,#f5efe3);
  font-size: .92rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sol-rubrica-v198-btn.primary { background: rgba(47,125,123,.24); border-color: rgba(47,125,123,.55); }
.sol-rubrica-v198-btn.success { background: rgba(14,117,62,.20); border-color: rgba(42,180,105,.42); }
.sol-rubrica-v198-btn.danger { background: rgba(150,49,49,.14); border-color: rgba(230,93,93,.38); }
.sol-rubrica-v198-btn[disabled] { opacity: .42; cursor: not-allowed; }
.sol-rubrica-v198-modal[hidden] { display: none !important; }
.sol-rubrica-v198-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 22px;
}
.sol-rubrica-v198-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.66);
  backdrop-filter: blur(5px);
}
.sol-rubrica-v198-dialog {
  position: relative;
  width: min(980px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid rgba(47,125,123,.42);
  border-radius: 18px;
  padding: 22px;
  background: #151c20;
  color: var(--text,#f5efe3);
  box-shadow: 0 28px 80px rgba(0,0,0,.55);
}
.sol-rubrica-v198-close {
  position: sticky;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(245,239,227,.16);
  background: rgba(245,239,227,.08);
  color: var(--text,#f5efe3);
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
}
.sol-rubrica-v198-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(245,239,227,.10);
  margin-bottom: 16px;
}
.sol-rubrica-v198-modal-head span {
  color: #63b8b2;
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 900;
}
.sol-rubrica-v198-modal-head h2 {
  margin: 5px 0;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.05;
}
.sol-rubrica-v198-modal-head p { margin: 0; color: var(--muted,rgba(245,239,227,.70)); font-weight: 800; }
.sol-rubrica-v198-modal-kpi {
  min-width: 138px;
  border: 1px solid rgba(198,160,74,.34);
  border-radius: 12px;
  padding: 12px;
  background: rgba(198,160,74,.10);
  text-align: center;
}
.sol-rubrica-v198-modal-kpi b { display:block; font-size: 1.9rem; color:#f4d787; }
.sol-rubrica-v198-modal-kpi small { color: var(--muted,rgba(245,239,227,.65)); font-weight: 850; }
.sol-rubrica-v198-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}
.sol-rubrica-v198-modal-grid label,
.sol-rubrica-v198-modal-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(245,239,227,.10);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15,20,23,.38);
}
.sol-rubrica-v198-modal-grid input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(47,125,123,.44);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(15,20,23,.62);
  color: var(--text,#f5efe3);
  font-weight: 850;
  font-size: 1rem;
}
.sol-rubrica-v198-visits { margin-top: 18px; }
.sol-rubrica-v198-visits h3 { margin: 0 0 10px; font-size: 1.15rem; }
.sol-rubrica-v198-visits ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sol-rubrica-v198-visits li {
  border: 1px solid rgba(245,239,227,.10);
  border-radius: 10px;
  padding: 10px;
  background: rgba(15,20,23,.35);
}
.sol-rubrica-v198-visits li strong,
.sol-rubrica-v198-visits li span { display:block; overflow-wrap:anywhere; }
.sol-rubrica-v198-visits li span { margin-top:4px; color:var(--muted,rgba(245,239,227,.68)); font-weight:760; }
.sol-rubrica-v198-modal-actions {
  grid-template-columns: 1.2fr 1fr 1.2fr;
  margin-top: 18px;
}
body.sol-rubrica-v198-modal-open { overflow: hidden; }
html[data-theme="light"] .sol-rubrica-v198-card,
html[data-theme="light"] .sol-rubrica-v198-dialog,
html[data-theme="light"] .sol-rubrica-v198-stats div,
html[data-theme="light"] .sol-rubrica-v198-modal-grid label,
html[data-theme="light"] .sol-rubrica-v198-modal-grid div,
html[data-theme="light"] .sol-rubrica-v198-visits li {
  background: #fff !important;
  color: #101716 !important;
  border-color: rgba(28,43,39,.14) !important;
}
html[data-theme="light"] .sol-rubrica-v198-title h3,
html[data-theme="light"] .sol-rubrica-v198-stats strong,
html[data-theme="light"] .sol-rubrica-v198-modal-grid strong,
html[data-theme="light"] .sol-rubrica-v198-modal-head h2,
html[data-theme="light"] .sol-rubrica-v198-visits li strong { color:#101716 !important; }
@media (max-width: 980px) {
  .sol-rubrica-v198-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .sol-rubrica-v198-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sol-rubrica-v198-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .sol-rubrica-v198-grid { grid-template-columns: 1fr; gap: 14px !important; }
  .sol-rubrica-v198-card { min-height: auto; padding: 15px !important; }
  .sol-rubrica-v198-head { grid-template-columns: 48px 1fr; }
  .sol-rubrica-v198-visit-badge { grid-column: 1 / -1; width: 100%; }
  .sol-rubrica-v198-modal { padding: 10px; place-items: end center; }
  .sol-rubrica-v198-dialog { width: 100%; max-height: 92vh; padding: 16px; border-radius: 16px 16px 0 0; }
  .sol-rubrica-v198-modal-head { display: grid; }
  .sol-rubrica-v198-modal-grid,
  .sol-rubrica-v198-visits ul,
  .sol-rubrica-v198-modal-actions { grid-template-columns: 1fr; }
}

/* v198 hotfix: la scheda cliente deve stare sopra ai banner PWA */
.sol-rubrica-v198-modal { z-index: 2147483646 !important; }
body.sol-rubrica-v198-modal-open #sol-pwa-update-card,
body.sol-rubrica-v198-modal-open .sol-pwa-update-card { display: none !important; }

/* v200: card rubrica stile classico, meno blocchi e azioni leggibili */
.sol-rubrica-v200-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
  gap: 16px !important;
}
.sol-rubrica-v200-card {
  min-height: 0 !important;
  padding: 16px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(198,160,74,.34) !important;
  background: linear-gradient(135deg, rgba(198,160,74,.105), rgba(27,36,40,.90) 46%, rgba(47,125,123,.055)) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.20) !important;
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}
.sol-rubrica-v200-head {
  display: grid !important;
  grid-template-columns: 46px 1fr auto;
  align-items: start;
  gap: 12px;
}
.sol-rubrica-v200-info .rubrica-card-name {
  font-size: 1.15rem !important;
  line-height: 1.15;
  margin-top: 2px;
  color: var(--text,#f5efe3) !important;
}
.sol-rubrica-v200-info .rubrica-card-phone {
  margin-top: 3px;
  font-size: .86rem !important;
  font-weight: 800;
  color: var(--muted,rgba(245,239,227,.68)) !important;
  overflow-wrap: anywhere;
}
.sol-rubrica-v200-card .rubrica-card-badge {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 999px;
  border: 1px solid rgba(245,239,227,.14);
  background: rgba(27,36,40,.92);
  color: var(--text,#f5efe3);
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}
.sol-rubrica-v200-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.sol-rubrica-v200-summary span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid rgba(245,239,227,.10);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(15,20,23,.30);
  color: var(--muted,rgba(245,239,227,.70));
  font-size: .78rem;
  font-weight: 820;
  max-width: 100%;
}
.sol-rubrica-v200-summary b {
  color: var(--text,#f5efe3);
  overflow-wrap: anywhere;
}
.sol-rubrica-v200-visits {
  list-style: none;
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.sol-rubrica-v200-visits li {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(245,239,227,.08);
  border-radius: 8px;
  padding: 6px 8px;
  background: rgba(15,20,23,.24);
  color: var(--text,#f5efe3);
  font-size: .78rem;
  font-weight: 790;
}
.sol-rubrica-v200-visits li b { color: #f4d787; }
.sol-rubrica-v200-visits li span { overflow-wrap: anywhere; }
.sol-rubrica-v200-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 24px;
}
.sol-rubrica-v200-tags em {
  border: 1px solid rgba(198,160,74,.42);
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(198,160,74,.10);
  color: #f4d787;
  font-style: normal;
  font-size: .74rem;
  font-weight: 850;
}
.sol-rubrica-v200-actions {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px !important;
  margin-top: auto;
}
.sol-rubrica-v200-actions a,
.sol-rubrica-v200-actions button {
  min-width: 0;
  min-height: 40px !important;
  border-radius: 9px !important;
  padding: 9px 8px !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
  line-height: 1.05;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow-wrap: anywhere;
}
.sol-rubrica-v200-action.rubrica-btn-call { border-color: rgba(47,125,123,.45); background: rgba(47,125,123,.16); color: var(--text,#f5efe3); }
.sol-rubrica-v200-action.rubrica-btn-whatsapp { border-color: rgba(42,180,105,.42); background: rgba(14,117,62,.20); color: var(--text,#f5efe3); }
.sol-rubrica-v200-disabled { opacity: .42 !important; cursor: not-allowed !important; }
.sol-rubrica-v200-actions .rubrica-btn-edit { border-color: rgba(47,125,123,.62) !important; background: #2f7d7b !important; color: #fff !important; }
.sol-rubrica-v200-actions .rubrica-btn-hide { border-color: rgba(245,239,227,.14) !important; background: rgba(245,239,227,.055) !important; color: var(--text,#f5efe3) !important; }
html[data-theme="light"] .sol-rubrica-v200-card,
html[data-theme="light"] .sol-rubrica-v200-summary span,
html[data-theme="light"] .sol-rubrica-v200-visits li {
  background: #fff !important;
  color: #101716 !important;
  border-color: rgba(28,43,39,.14) !important;
}
html[data-theme="light"] .sol-rubrica-v200-info .rubrica-card-name,
html[data-theme="light"] .sol-rubrica-v200-summary b,
html[data-theme="light"] .sol-rubrica-v200-visits li span { color:#101716 !important; }
@media (max-width: 980px) {
  .sol-rubrica-v200-grid { grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); }
  .sol-rubrica-v200-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .sol-rubrica-v200-grid { grid-template-columns: 1fr; }
  .sol-rubrica-v200-head { grid-template-columns: 44px 1fr; }
  .sol-rubrica-v200-card .rubrica-card-badge { grid-column: 1 / -1; width: 100%; }
  .sol-rubrica-v200-visits li { grid-template-columns: 1fr; gap: 3px; }
}

/* v202: rubrica con layout storico Solstitium e bottoni pieni */
.sol-rubrica-v200-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 18px !important;
}
.sol-rubrica-v200-card {
  min-height: 230px !important;
  padding: 18px !important;
  border: 1px solid rgba(212,175,55,.35) !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, rgba(18,18,18,.92), rgba(30,30,30,.95)) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.28) !important;
  gap: 14px !important;
}
.sol-rubrica-v200-card:hover {
  box-shadow: 0 0 20px rgba(212,175,55,.28) !important;
  transform: translateY(-2px);
}
.sol-rubrica-v200-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}
.sol-rubrica-v200-card .rubrica-card-avatar {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(212,175,55,.55) !important;
  background: rgba(212,175,55,.14) !important;
  color: #d4af37 !important;
  font-size: 1.2rem !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.sol-rubrica-v200-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}
.sol-rubrica-v200-info .rubrica-card-name {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #f4e9c6 !important;
  line-height: 1.15 !important;
}
.sol-rubrica-v200-info .rubrica-card-phone {
  margin-top: 4px !important;
  color: rgba(245,239,227,.68) !important;
  font-size: .88rem !important;
  font-weight: 700 !important;
}
.sol-rubrica-v200-card .rubrica-card-badge {
  min-height: 34px !important;
  border: 1px solid rgba(212,175,55,.35) !important;
  border-radius: 999px !important;
  padding: 7px 11px !important;
  background: rgba(212,175,55,.16) !important;
  color: #ffd700 !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}
.sol-rubrica-v200-summary {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.sol-rubrica-v200-summary span {
  min-height: 36px !important;
  border: 1px solid rgba(245,239,227,.10) !important;
  border-radius: 10px !important;
  padding: 8px 9px !important;
  background: rgba(255,255,255,.035) !important;
  color: rgba(245,239,227,.70) !important;
  font-size: .78rem !important;
  line-height: 1.15 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
}
.sol-rubrica-v200-summary span:nth-child(4) {
  grid-column: 1 / -1 !important;
}
.sol-rubrica-v200-summary b {
  color: #f5efe3 !important;
  font-weight: 900 !important;
}
.sol-rubrica-v200-visits {
  display: none !important;
}
.sol-rubrica-v200-tags {
  min-height: 0 !important;
  gap: 7px !important;
}
.sol-rubrica-v200-tags em {
  border: 1px solid rgba(212,175,55,.38) !important;
  border-radius: 999px !important;
  padding: 5px 9px !important;
  background: rgba(212,175,55,.12) !important;
  color: #f4d787 !important;
  font-size: .76rem !important;
  font-weight: 850 !important;
}
.sol-rubrica-v200-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: auto !important;
}
.sol-rubrica-v200-actions a,
.sol-rubrica-v200-actions button {
  min-height: 46px !important;
  border-radius: 11px !important;
  padding: 11px 12px !important;
  font-size: .9rem !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  border-width: 1px !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.18) !important;
}
.sol-rubrica-v200-action.rubrica-btn-call,
.sol-rubrica-v200-actions .rubrica-btn-call:not([disabled]) {
  background: #c6a04a !important;
  border-color: rgba(255,215,0,.48) !important;
  color: #101716 !important;
}
.sol-rubrica-v200-action.rubrica-btn-whatsapp,
.sol-rubrica-v200-actions .rubrica-btn-whatsapp:not([disabled]) {
  background: #16945d !important;
  border-color: rgba(42,180,105,.56) !important;
  color: #ffffff !important;
}
.sol-rubrica-v200-actions .rubrica-btn-edit {
  background: #2f7d7b !important;
  border-color: rgba(47,125,123,.72) !important;
  color: #ffffff !important;
}
.sol-rubrica-v200-actions .rubrica-btn-hide {
  background: #1b2428 !important;
  border-color: rgba(245,239,227,.18) !important;
  color: #f5efe3 !important;
}
.sol-rubrica-v200-disabled,
.sol-rubrica-v200-actions button[disabled] {
  opacity: .50 !important;
  background: #20292d !important;
  color: rgba(245,239,227,.58) !important;
  box-shadow: none !important;
}
html[data-theme="light"] .sol-rubrica-v200-card {
  background: #ffffff !important;
  color: #101716 !important;
  border-color: rgba(28,43,39,.16) !important;
  box-shadow: 0 10px 24px rgba(12,20,18,.10) !important;
}
html[data-theme="light"] .sol-rubrica-v200-info .rubrica-card-name,
html[data-theme="light"] .sol-rubrica-v200-summary b { color: #101716 !important; }
@media (max-width: 720px) {
  .sol-rubrica-v200-grid { grid-template-columns: 1fr !important; }
  .sol-rubrica-v200-head { align-items: flex-start !important; }
  .sol-rubrica-v200-summary { grid-template-columns: 1fr 1fr !important; }
  .sol-rubrica-v200-summary span:nth-child(4) { grid-column: auto !important; }
  .sol-rubrica-v200-actions { grid-template-columns: 1fr 1fr !important; }
}

/* v203: colori informativi nella rubrica senza cambiare layout */
.sol-rubrica-v200-info .rubrica-card-name {
  color: #f5efe3 !important;
  text-shadow: 0 0 14px rgba(198,160,74,.16);
}
.sol-rubrica-v200-info .rubrica-card-phone {
  color: #87c6c2 !important;
}
.sol-rubrica-v200-summary span:nth-child(1) {
  border-color: rgba(47,125,123,.44) !important;
  background: rgba(47,125,123,.16) !important;
}
.sol-rubrica-v200-summary span:nth-child(1) b {
  color: #7bd6ce !important;
}
.sol-rubrica-v200-summary span:nth-child(2) {
  border-color: rgba(198,160,74,.46) !important;
  background: rgba(198,160,74,.13) !important;
}
.sol-rubrica-v200-summary span:nth-child(2) b {
  color: #f4d787 !important;
}
.sol-rubrica-v200-summary span:nth-child(3) {
  border-color: rgba(130,156,190,.38) !important;
  background: rgba(130,156,190,.11) !important;
}
.sol-rubrica-v200-summary span:nth-child(3) b {
  color: #c8d8ec !important;
}
.sol-rubrica-v200-summary span:nth-child(4) {
  border-color: rgba(47,125,123,.34) !important;
  background: rgba(47,125,123,.10) !important;
}
.sol-rubrica-v200-summary span:nth-child(4) b {
  color: #b7e2dd !important;
}
.sol-rubrica-v200-card .rubrica-card-badge {
  background: rgba(47,125,123,.22) !important;
  border-color: rgba(47,125,123,.55) !important;
  color: #dbfffb !important;
}
.sol-rubrica-v200-tags em:first-child {
  border-color: rgba(198,160,74,.48) !important;
  background: rgba(198,160,74,.16) !important;
  color: #ffd978 !important;
}
.sol-rubrica-v200-tags em:not(:first-child) {
  border-color: rgba(47,125,123,.36) !important;
  background: rgba(47,125,123,.12) !important;
  color: #aee7e1 !important;
}
html[data-theme="light"] .sol-rubrica-v200-info .rubrica-card-name { color: #17211f !important; text-shadow: none; }
html[data-theme="light"] .sol-rubrica-v200-info .rubrica-card-phone { color: #2f7d7b !important; }
html[data-theme="light"] .sol-rubrica-v200-summary span:nth-child(1) { background: rgba(47,125,123,.10) !important; }
html[data-theme="light"] .sol-rubrica-v200-summary span:nth-child(2) { background: rgba(198,160,74,.12) !important; }
html[data-theme="light"] .sol-rubrica-v200-summary span:nth-child(3) { background: rgba(130,156,190,.12) !important; }
html[data-theme="light"] .sol-rubrica-v200-summary span:nth-child(4) { background: rgba(47,125,123,.08) !important; }
html[data-theme="light"] .sol-rubrica-v200-summary span b { color: #17211f !important; }

/* v204: storico clienti coerente con rubrica v203 */
.sol-history-clients-panel {
  max-width: 1640px;
  margin-inline: auto;
}
.sol-history-clients-panel .sol-panel-title {
  align-items: center;
  gap: 12px;
}
.sol-history-clients-panel .sol-panel-title span {
  color: #f4d787 !important;
  letter-spacing: .02em;
}
.sol-history-client-note {
  border-color: rgba(47,125,123,.38) !important;
  background: rgba(47,125,123,.12) !important;
  color: rgba(245,239,227,.78) !important;
  border-radius: 10px !important;
  font-size: .9rem !important;
}
.sol-history-client-strip {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
  gap: 12px !important;
}
.sol-history-client-strip article {
  min-height: 72px;
  border-radius: 13px !important;
  border-color: rgba(47,125,123,.32) !important;
  background: linear-gradient(145deg, rgba(24,32,35,.96), rgba(16,22,24,.95)) !important;
}
.sol-history-client-strip article:nth-child(2) { border-color: rgba(198,160,74,.34) !important; }
.sol-history-client-strip article:nth-child(3) { border-color: rgba(130,156,190,.30) !important; }
.sol-history-client-strip span {
  color: rgba(245,239,227,.62) !important;
  font-size: .72rem !important;
  letter-spacing: .04em;
}
.sol-history-client-strip strong {
  color: #f5efe3 !important;
  font-size: 1.5rem !important;
}
.sol-history-client-grid {
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)) !important;
  gap: 18px !important;
}
.sol-history-client-card {
  min-height: 0 !important;
  padding: 18px !important;
  border: 1px solid rgba(212,175,55,.34) !important;
  border-radius: 18px !important;
  background: radial-gradient(circle at top right, rgba(47,125,123,.11), transparent 36%), linear-gradient(145deg, rgba(18,18,18,.94), rgba(26,31,29,.96)) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.30) !important;
}
.sol-history-client-card.needs-review {
  border-color: rgba(212,175,55,.52) !important;
  background: radial-gradient(circle at top right, rgba(198,160,74,.13), transparent 36%), linear-gradient(145deg, rgba(22,22,18,.95), rgba(28,31,28,.96)) !important;
}
.sol-history-client-card header {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: start !important;
  gap: 12px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid rgba(245,239,227,.09) !important;
}
.sol-history-client-card header strong {
  color: #f5efe3 !important;
  font-size: 1.28rem !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  text-shadow: 0 0 14px rgba(198,160,74,.15);
}
.sol-history-client-card header small {
  margin-top: 5px !important;
  color: #87c6c2 !important;
  font-size: .88rem !important;
  font-weight: 820 !important;
}
.sol-history-client-card header b {
  align-self: start;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(47,125,123,.55);
  border-radius: 999px;
  background: rgba(47,125,123,.22);
  color: #dbfffb !important;
  font-size: .82rem !important;
  font-weight: 900;
  white-space: nowrap;
}
.sol-history-client-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 13px !important;
}
.sol-history-client-metrics div {
  min-height: 70px !important;
  padding: 10px !important;
  border-radius: 11px !important;
  background: rgba(255,255,255,.035) !important;
}
.sol-history-client-metrics div:nth-child(1) { border-color: rgba(47,125,123,.44) !important; background: rgba(47,125,123,.13) !important; }
.sol-history-client-metrics div:nth-child(2) { border-color: rgba(130,156,190,.34) !important; background: rgba(130,156,190,.10) !important; }
.sol-history-client-metrics div:nth-child(3) { border-color: rgba(198,160,74,.42) !important; background: rgba(198,160,74,.12) !important; }
.sol-history-client-metrics div:nth-child(4) { border-color: rgba(47,125,123,.34) !important; background: rgba(47,125,123,.09) !important; }
.sol-history-client-metrics span {
  color: rgba(245,239,227,.58) !important;
  font-size: .68rem !important;
  letter-spacing: .05em;
}
.sol-history-client-metrics strong {
  margin-top: 6px !important;
  font-size: .95rem !important;
  font-weight: 900 !important;
  line-height: 1.18 !important;
  overflow-wrap: anywhere;
}
.sol-history-client-metrics div:nth-child(1) strong { color: #7bd6ce !important; }
.sol-history-client-metrics div:nth-child(2) strong { color: #c8d8ec !important; }
.sol-history-client-metrics div:nth-child(3) strong { color: #f4d787 !important; }
.sol-history-client-metrics div:nth-child(4) strong { color: #b7e2dd !important; }
.sol-history-client-actions,
.sol-history-client-form {
  display: none !important;
}
.sol-history-client-flags {
  gap: 7px !important;
  margin-top: 12px !important;
}
.sol-history-client-flags em {
  border-color: rgba(198,160,74,.48) !important;
  background: rgba(198,160,74,.15) !important;
  color: #ffd978 !important;
  font-size: .78rem !important;
  font-weight: 900 !important;
}
.sol-history-client-visits {
  margin-top: 14px !important;
  padding-top: 12px !important;
  border-top: 1px solid rgba(245,239,227,.10) !important;
}
.sol-history-client-visits > span,
.sol-history-client-notes > span {
  color: rgba(245,239,227,.62) !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.sol-history-client-visits ul {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: 9px !important;
}
.sol-history-client-visits li {
  display: grid !important;
  grid-template-columns: auto auto 1fr !important;
  grid-template-areas: "date time pax" "area area table" !important;
  align-items: center !important;
  gap: 4px 8px !important;
  min-height: 54px !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(245,239,227,.10) !important;
  background: rgba(15,20,23,.35) !important;
  color: #f5efe3 !important;
  font-size: .82rem !important;
  line-height: 1.12 !important;
}
.sol-history-client-visits li b { grid-area: date; color: #f4d787; font-style: normal; font-weight: 900; }
.sol-history-client-visits li strong { grid-area: time; color: #dbfffb; font-weight: 900; }
.sol-history-client-visits li span { grid-area: area; color: #b7e2dd; font-weight: 850; overflow-wrap: anywhere; }
.sol-history-client-visits li em { grid-area: table; color: rgba(245,239,227,.80); font-style: normal; font-weight: 850; overflow-wrap: anywhere; }
.sol-history-client-visits li i { grid-area: pax; justify-self: end; color: #f5efe3; font-style: normal; font-weight: 900; }
.sol-history-client-notes p {
  border-color: rgba(198,160,74,.22) !important;
  background: rgba(198,160,74,.08) !important;
  border-radius: 9px;
  padding: 8px 10px;
}
html[data-theme="light"] .sol-history-client-card,
html[data-theme="light"] .sol-history-client-strip article,
html[data-theme="light"] .sol-history-client-metrics div,
html[data-theme="light"] .sol-history-client-visits li {
  background: #fff !important;
  color: #101716 !important;
  border-color: rgba(28,43,39,.16) !important;
  box-shadow: 0 10px 24px rgba(12,20,18,.08) !important;
}
html[data-theme="light"] .sol-history-client-card header strong,
html[data-theme="light"] .sol-history-client-visits li i { color:#101716 !important; text-shadow:none; }
html[data-theme="light"] .sol-history-client-note { color:#30423d !important; background:rgba(47,125,123,.08) !important; }
@media (max-width: 1120px) {
  .sol-history-client-grid { grid-template-columns: 1fr !important; }
  .sol-history-client-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
  .sol-history-client-strip { grid-template-columns: 1fr !important; }
  .sol-history-client-card { padding: 15px !important; }
  .sol-history-client-card header { grid-template-columns: 1fr !important; }
  .sol-history-client-card header b { justify-self: start; }
  .sol-history-client-metrics,
  .sol-history-client-visits ul { grid-template-columns: 1fr !important; }
}

/* v205: dashboard alert operativi */
#dashboard .sol-dashboard-alerts {
  margin: 14px 0 12px !important;
  padding: 14px !important;
  border: 1px solid rgba(47,125,123,.30) !important;
  border-radius: 14px !important;
  background: linear-gradient(145deg, rgba(21,28,32,.96), rgba(17,23,26,.96)) !important;
  box-shadow: 0 12px 26px rgba(0,0,0,.20) !important;
}
#dashboard .sol-dashboard-alerts.has-alerts { border-color: rgba(198,160,74,.36) !important; }
#dashboard .sol-dashboard-alerts-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 11px !important;
}
#dashboard .sol-dashboard-alerts-head span {
  display: block !important;
  color: #f4d787 !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}
#dashboard .sol-dashboard-alerts-head strong {
  display: block !important;
  margin-top: 3px !important;
  color: #f5efe3 !important;
  font-size: 1.12rem !important;
  line-height: 1.08 !important;
}
#dashboard .sol-dashboard-alerts-head small { color: rgba(245,239,227,.62) !important; font-weight: 800 !important; white-space: nowrap !important; }
#dashboard .sol-dashboard-alert-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 9px !important;
}
#dashboard .sol-dashboard-alert-card {
  min-height: 88px !important;
  border-radius: 11px !important;
  border: 1px solid rgba(245,239,227,.10) !important;
  padding: 11px 12px !important;
  background: rgba(15,20,23,.34) !important;
  color: #f5efe3 !important;
  text-align: left !important;
  display: grid !important;
  gap: 5px !important;
  align-content: start !important;
  box-shadow: none !important;
}
#dashboard button.sol-dashboard-alert-card { cursor: pointer !important; }
#dashboard button.sol-dashboard-alert-card:hover { transform: translateY(-1px); border-color: rgba(47,125,123,.54) !important; }
#dashboard .sol-dashboard-alert-card span { color: #f5efe3 !important; font-size: .94rem !important; font-weight: 900 !important; line-height: 1.1 !important; }
#dashboard .sol-dashboard-alert-card strong { color: rgba(245,239,227,.70) !important; font-size: .8rem !important; line-height: 1.22 !important; font-weight: 760 !important; }
#dashboard .sol-dashboard-alert-card em {
  justify-self: start !important;
  margin-top: 2px !important;
  border-radius: 999px !important;
  padding: 4px 8px !important;
  font-style: normal !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
}
#dashboard .sol-dashboard-alert-card.warn { border-color: rgba(198,160,74,.46) !important; background: linear-gradient(145deg, rgba(198,160,74,.16), rgba(15,20,23,.34)) !important; }
#dashboard .sol-dashboard-alert-card.warn em { background: rgba(198,160,74,.20); color: #f4d787; }
#dashboard .sol-dashboard-alert-card.critical { border-color: rgba(224,82,72,.58) !important; background: linear-gradient(145deg, rgba(120,32,32,.34), rgba(15,20,23,.38)) !important; }
#dashboard .sol-dashboard-alert-card.critical em { background: rgba(224,82,72,.20); color: #ffb1aa; }
#dashboard .sol-dashboard-alert-card.info { border-color: rgba(47,125,123,.44) !important; background: linear-gradient(145deg, rgba(47,125,123,.14), rgba(15,20,23,.34)) !important; }
#dashboard .sol-dashboard-alert-card.info em,
#dashboard .sol-dashboard-alert-card.ok em { background: rgba(47,125,123,.20); color: #9de3dc; }
#dashboard .sol-dashboard-alert-card.ok { border-color: rgba(47,125,123,.34) !important; background: rgba(47,125,123,.10) !important; }
html[data-theme="light"] #dashboard .sol-dashboard-alerts,
html[data-theme="light"] #dashboard .sol-dashboard-alert-card { background: #fff !important; color: #101716 !important; border-color: rgba(28,43,39,.14) !important; }
html[data-theme="light"] #dashboard .sol-dashboard-alerts-head strong,
html[data-theme="light"] #dashboard .sol-dashboard-alert-card span { color:#101716 !important; }
html[data-theme="light"] #dashboard .sol-dashboard-alert-card strong { color:#41524d !important; }
@media (max-width: 720px) {
  #dashboard .sol-dashboard-alerts { padding: 12px !important; }
  #dashboard .sol-dashboard-alerts-head { display: grid !important; }
  #dashboard .sol-dashboard-alert-grid { grid-template-columns: 1fr !important; }
  #dashboard .sol-dashboard-alert-card { min-height: 76px !important; }
}

/* v206: pipeline leggera richieste evento */
.sol-events-status.request,
.badge-richiesta {
  border-color: rgba(130,156,190,.42) !important;
  background: rgba(130,156,190,.14) !important;
  color: #c8d8ec !important;
}
.sol-events-status.callback,
.badge-da-richiamare {
  border-color: rgba(198,160,74,.50) !important;
  background: rgba(198,160,74,.16) !important;
  color: #f4d787 !important;
}
.sol-events-status.danger,
.badge-cancellato {
  border-color: rgba(224,82,72,.50) !important;
  background: rgba(224,82,72,.16) !important;
  color: #ffb1aa !important;
}
#eventi .sol-events-calendar-item .sol-events-status,
#eventi .sol-events-day-main .sol-events-status {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  margin-top: 5px !important;
  border-radius: 999px !important;
  padding: 4px 8px !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
}
#filter-stato-eventi option[value="Richiesta"],
#filter-stato-eventi option[value="Da richiamare"],
#filter-stato-eventi option[value="Preventivo inviato"],
#filter-stato-eventi option[value="Perso"] {
  font-weight: 800;
}

/* v207: descrizione menu nelle stampe operative */
.print-menu-detail {
  display: block !important;
  margin-top: 3px !important;
  color: #27313a !important;
  font-size: 9.6px !important;
  line-height: 1.18 !important;
  font-weight: 700 !important;
  white-space: normal !important;
}
.event-menu .print-menu-detail {
  margin-top: 4px !important;
  color: #111827 !important;
  font-size: 10.4px !important;
}
@media screen {
  .print-menu-detail { color: inherit !important; opacity: .82; }
}
