/* style block 1  */
* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif
}

:root {
  --blue: #082765;
  --blue2: #12367a;
  --border: #dbe3ee;
  --muted: #64748b
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff, #f6f8fb);
  color: #111827
}

body.dark-mode {
  background: linear-gradient(180deg, #111827, #020617);
  color: #e5e7eb;
  --border: #374151
}

body.dark-mode header,
body.dark-mode .card,
body.dark-mode main section.card,
body.dark-mode .home-widget,
body.dark-mode .modal,
body.dark-mode .modal-popup-style,
body.dark-mode .login-card,
body.dark-mode #loggedUserLabel,
body.dark-mode .machine-year-folder-card,
body.dark-mode .machine-model-folder-card,
body.dark-mode .machine-folder-card,
body.dark-mode .stats-section-box,
body.dark-mode .user-dropdown-permissions,
body.dark-mode .machine-cost-card,
body.dark-mode .machine-custom-file-box {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .toolbar-card,
body.dark-mode .filters,
body.dark-mode .home-widget-header,
body.dark-mode .popup-modal-header,
body.dark-mode .machine-create-box,
body.dark-mode .home-user-form-card,
body.dark-mode .activity-form-box,
body.dark-mode .machine-folder-content,
body.dark-mode .machine-detail-path,
body.dark-mode .machine-custom-file-header,
body.dark-mode .permissions-create-box,
body.dark-mode .permissions-create-header,
body.dark-mode .permissions-create-group,
body.dark-mode .activity-form-field,
body.dark-mode .stats-year-filter-box {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode td,
body.dark-mode th,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea,
body.dark-mode .stat-card,
body.dark-mode .assigned-role-group,
body.dark-mode .assigned-user-option,
body.dark-mode .permission-feature-card,
body.dark-mode .machine-files-table td,
body.dark-mode .machine-files-table th {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode h2,
body.dark-mode label,
body.dark-mode .section-title,
body.dark-mode .home-widget-title,
body.dark-mode .popup-modal-title,
body.dark-mode .machine-create-title,
body.dark-mode .user-create-title,
body.dark-mode .activity-form-header h2,
body.dark-mode .machine-hours-chart-title,
body.dark-mode .machine-cost-number,
body.dark-mode .machine-cost-label,
body.dark-mode .machine-detail-path .path-current,
body.dark-mode .folder-title,
body.dark-mode .user-custom-permissions-title,
body.dark-mode .users-role-title,
body.dark-mode .activity-table-title {
  color: #dbeafe !important
}

body.dark-mode .brand-logo-text,
body.dark-mode .brand-logo-o {
  fill: #dbeafe !important
}

body.dark-mode .brand-logo-long-o,
body.dark-mode .brand-logo-long-o-hole,
body.dark-mode .brand-logo-overlap-white {
  fill: #111827 !important;
  stroke: #dbeafe !important
}

body.dark-mode .machine-folder-main,
body.dark-mode .machine-model-folder-main,
body.dark-mode .machine-year-folder-main,
body.dark-mode .machine-cost-group-header {
  background: #1f2937 !important;
  color: #e5e7eb !important
}

body.dark-mode .empty,
body.dark-mode .stat-label,
body.dark-mode .machine-folder-client-name,
body.dark-mode .activity-empty-cell {
  color: #9ca3af !important
}

body.dark-mode #usersPage .popup-modal-body,
body.dark-mode #usersPage #userContainer,
body.dark-mode #usersPage .users-page-list-title,
body.dark-mode #usersPage .users-role-section,
body.dark-mode #usersPage .users-role-body,
body.dark-mode #usersPage .users-role-table,
body.dark-mode #usersPage .users-role-table tbody,
body.dark-mode #usersPage .users-role-table tr {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode #usersPage .users-role-title,
body.dark-mode #usersPage .users-role-table th {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #dbeafe !important
}

body.dark-mode #usersPage .users-role-table td,
body.dark-mode #usersPage .users-role-table td:first-child,
body.dark-mode #usersPage .users-role-table td:last-child {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode #usersPage .users-role-table td strong,
body.dark-mode #usersPage .users-role-table td span,
body.dark-mode #usersPage .user-info-line,
body.dark-mode #usersPage .users-page-list-title h2 {
  color: #dbeafe !important
}

body.dark-mode #usersPage .user-permission-chip {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #dbeafe !important
}

body.dark-mode #usersPage .user-permission-chip[style*="background:white"],
body.dark-mode #usersPage .user-permission-chip[style*="background: white"] {
  color: #12367a !important
}

body.dark-mode #usersPage .user-permission-chip[style*="background:#eef4ff"],
body.dark-mode #usersPage .user-permission-chip[style*="background: #eef4ff"] {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
  color: white !important
}

body.dark-mode #usersPage .user-permission-chip[style*="background:#fff7ed"],
body.dark-mode #usersPage .user-permission-chip[style*="background: #fff7ed"] {
  background: #78350f !important;
  border-color: #f59e0b !important;
  color: #fde68a !important
}

body.dark-mode #usersPage .users-role-actions button,
body.dark-mode #usersPage .users-role-actions button[data-action="edit-user"],
body.dark-mode #usersPage .users-role-actions button[data-action="delete-user"] {
  background: #020617 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important
}

body.dark-mode #usersPage .users-role-actions button[data-action="edit-user"] {
  border-color: #60a5fa !important
}

body.dark-mode #usersPage .users-role-actions button[data-action="delete-user"] {
  border-color: #f87171 !important
}

body.dark-mode #usersPage .users-role-actions .edit-icon,
body.dark-mode #usersPage .users-role-actions .edit-icon path {
  stroke: #60a5fa !important
}

body.dark-mode #usersPage .users-role-actions .trash-icon,
body.dark-mode #usersPage .users-role-actions .trash-icon path {
  stroke: #f87171 !important
}

body.dark-mode #usersPage .user-custom-permissions,
body.dark-mode #usersPage #customPermissionsUtente {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode #usersPage #userForm label {
  color: #dbeafe !important
}

body.dark-mode #usersPage #userForm input,
body.dark-mode #usersPage #userForm select {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode #userStatsDropdown,
body.dark-mode .user-stats-dropdown {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .55) !important
}

body.dark-mode .user-stats-dropdown:before {
  background: #111827 !important;
  border-left-color: #374151 !important;
  border-top-color: #374151 !important
}

body.dark-mode #userStatsContent,
body.dark-mode #userStatsContent>div {
  background: transparent !important;
  color: #dbeafe !important
}

body.dark-mode #userStatsContent div[style*="color:#12367a"],
body.dark-mode #userStatsContent div[style*="color: #12367a"] {
  color: #dbeafe !important
}

body.dark-mode #userStatsContent div[style*="color:#64748b"],
body.dark-mode #userStatsContent div[style*="color: #64748b"] {
  color: #9ca3af !important
}

body.dark-mode .user-stats-dropdown .stats-section-box,
body.dark-mode .user-stats-dropdown .user-dropdown-permissions,
body.dark-mode .user-stats-dropdown .stats-year-filter-box {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .user-stats-dropdown .stats-section-title,
body.dark-mode .user-stats-dropdown .user-dropdown-permissions-title,
body.dark-mode .user-stats-dropdown .stats-year-filter-label {
  color: #dbeafe !important;
  border-bottom-color: #374151 !important
}

body.dark-mode .user-stats-dropdown .stat-card {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .user-stats-dropdown .stat-number {
  color: #93c5fd !important
}

body.dark-mode .user-stats-dropdown .stat-label {
  color: #cbd5e1 !important
}

body.dark-mode .user-stats-dropdown .user-custom-permission-btn:not(.active) {
  background: #020617 !important;
  border-color: #4b5563 !important;
  color: #94a3b8 !important
}

body.dark-mode .user-stats-dropdown .user-custom-permission-btn.active {
  background: #2563eb !important;
  border-color: #60a5fa !important;
  color: white !important
}

body.dark-mode #loginPage {
  background: linear-gradient(135deg, #020617, #111827) !important
}

body.dark-mode main,
body.dark-mode .home-widgets-drop,
body.dark-mode .home-widgets-drop.tickets-visible {
  background: transparent !important
}

body.dark-mode .machine-year-folder-content,
body.dark-mode .machine-model-folder-content,
body.dark-mode .machine-folder-dropdown,
body.dark-mode .user-role-box,
body.dark-mode .assigned-users-box,
body.dark-mode .activity-assigned-users-box,
body.dark-mode .calendar-ticket {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  text-shadow: none !important
}

body.dark-mode .calendar-ticket.transfer-ticket {
  background: #064e3b !important;
  border-color: #34d399 !important;
  color: #d1fae5 !important
}

body.dark-mode .calendar-ticket.fat-ticket {
  background: #78350f !important;
  border-color: #f59e0b !important;
  color: #fde68a !important
}

body.dark-mode .calendar-ticket svg,
body.dark-mode .calendar-ticket svg path,
body.dark-mode .calendar-ticket svg circle,
body.dark-mode .calendar-ticket svg rect {
  stroke: currentColor !important
}

body.dark-mode .calendar-ticket.calendar-segment.segment-middle,
body.dark-mode .calendar-ticket.calendar-segment.segment-end {
  color: transparent !important
}

body.dark-mode .calendar-ticket.calendar-segment.segment-start,
body.dark-mode .calendar-ticket.calendar-segment.segment-single {
  color: #ffffff !important
}

body.dark-mode .calendar-ticket.transfer-ticket.calendar-segment.segment-start,
body.dark-mode .calendar-ticket.transfer-ticket.calendar-segment.segment-single {
  color: #d1fae5 !important
}

body.dark-mode .calendar-ticket.fat-ticket {
  color: #fde68a !important
}

body.dark-mode .calendar-number {
  color: #dbeafe !important
}

body.dark-mode .calendar-day.empty-day,
body.dark-mode .schedule-day.empty-day,
body.dark-mode .calendar-filter-box,
body.dark-mode .activity-sort-box,
body.dark-mode .user-custom-permissions,
body.dark-mode .home-mini-card,
body.dark-mode .ticket-group-title,
body.dark-mode .schedule-info,
body.dark-mode .calendar-tech-item,
body.dark-mode .work-hours-edit-modal-info,
body.dark-mode #descriptionModalContent {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .main-ticket-row td,
body.dark-mode .machine-folder-row td,
body.dark-mode .activity-table td,
body.dark-mode .permissions-groups-table td,
body.dark-mode .calendar-day,
body.dark-mode .schedule-day,
body.dark-mode .transfer-year-inline,
body.dark-mode .transfer-year-row,
body.dark-mode .assigned-role-title,
body.dark-mode .users-role-title,
body.dark-mode .calendar-day-name,
body.dark-mode .schedule-day-name,
body.dark-mode .permissions-groups-table th,
body.dark-mode .machine-hours-chart,
body.dark-mode .machine-hours-chart-bars,
body.dark-mode .machine-hours-chart-empty,
body.dark-mode .machine-hours-chart-legend-item {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .modal-popup-style section.card,
body.dark-mode #ticketsPopupPage section.card,
body.dark-mode #ticketsPopupPage .modal-popup-style,
body.dark-mode #machinesPage .modal-popup-style,
body.dark-mode #usersPage .modal-popup-style {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .modal-popup-style .popup-modal-body,
body.dark-mode .ticket-modal form,
body.dark-mode #usersPage #userForm,
body.dark-mode #usersPage .user-create-wrapper,
body.dark-mode #usersPage .user-create-wrapper #userForm {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .filters input,
body.dark-mode .filters select,
body.dark-mode input::file-selector-button {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #374151 !important
}

body.dark-mode .machine-folder-tab {
  background: #0f172a !important;
  color: #dbeafe !important;
  border-color: #60a5fa !important
}

body.dark-mode .machine-folder-tab.active {
  background: #082765 !important;
  color: white !important
}

body.dark-mode #loggedUserLabel {
  border-right: none !important
}

body.dark-mode .logout-icon-btn {
  border-left: 1px solid #374151 !important
}

body.dark-mode .theme-toggle-btn,
body.dark-mode .settings-btn,
body.dark-mode #logoutBtn,
body.dark-mode .new-assistance-header-btn,
body.dark-mode .permission-choice,
body.dark-mode .delete-permission-group-btn,
body.dark-mode .work-hours-edit-btn,
body.dark-mode .machine-file-delete-btn,
body.dark-mode .activity-actions button,
body.dark-mode .actions button,
body.dark-mode .users-role-actions button {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .user-custom-permission-btn:not(.active) {
  background: #020617 !important;
  border-color: #4b5563 !important;
  color: #94a3b8 !important;
  opacity: .42 !important;
  box-shadow: none !important
}

body.dark-mode .user-custom-permission-btn:not(.active) svg {
  stroke: #94a3b8 !important
}

body.dark-mode .user-custom-permission-btn:not(.active) svg circle:not(.money-icon-circle),
body.dark-mode .user-custom-permission-btn:not(.active) svg .icon-fill-dot {
  fill: #94a3b8 !important
}

body.dark-mode .user-custom-permission-btn:not(.active) svg .money-icon-circle {
  fill: none !important;
  stroke: #94a3b8 !important
}

body.dark-mode .user-custom-permission-btn:not(.active) svg .money-icon-dollar {
  stroke: #e5e7eb !important;
  opacity: 1 !important
}

body.dark-mode .user-custom-permission-btn.active {
  background: #2563eb !important;
  border-color: #60a5fa !important;
  color: white !important;
  opacity: 1 !important;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, .28), 0 6px 16px rgba(37, 99, 235, .35) !important
}

body.dark-mode .user-custom-permission-btn.active svg {
  stroke: white !important
}

body.dark-mode .user-custom-permission-btn.active svg circle,
body.dark-mode .user-custom-permission-btn.active svg .icon-fill-dot {
  fill: white !important
}

body.dark-mode .password-toggle-btn,
body.dark-mode .machine-create-toggle,
body.dark-mode .user-create-toggle,
body.dark-mode .activity-form-toggle,
body.dark-mode .permissions-create-toggle,
body.dark-mode .machine-custom-file-toggle {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #dbeafe !important
}

body.dark-mode .popup-modal-body p,
body.dark-mode .popup-modal-body div,
body.dark-mode .home-mini-text,
body.dark-mode .activity-table-title,
body.dark-mode .permission-feature-card-title,
body.dark-mode .permission-group-name-text,
body.dark-mode .activity-machine-text,
body.dark-mode .user-permission-chip,
body.dark-mode .stat-number,
body.dark-mode .transfer-years-title,
body.dark-mode .stats-section-title,
body.dark-mode .user-dropdown-permissions-title {
  color: #dbeafe !important
}

body.dark-mode .activity-assigned-chip {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  font-weight: 900 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, .28) !important
}

body.dark-mode .activity-assigned-list {
  background: transparent !important;
  color: #ffffff !important
}

body.dark-mode .activity-assigned-list .activity-assigned-chip {
  color: #ffffff !important
}

body.dark-mode .activity-assigned-users-box .assigned-role-title {
  background: #082765 !important;
  border-color: #60a5fa !important;
  color: #ffffff !important
}

body.dark-mode .activity-assigned-users-box .assigned-user-option {
  background: #0f172a !important;
  border-color: #4b5563 !important;
  color: #ffffff !important
}

body.dark-mode .activity-assigned-users-box .assigned-user-option span {
  color: #ffffff !important
}

body.dark-mode .activity-assigned-users-box input[type="checkbox"] {
  accent-color: #60a5fa !important
}

body.dark-mode .machine-search-icon,
body.dark-mode .calendar-transfer-icon,
body.dark-mode .calendar-remote-icon,
body.dark-mode .ticket-group-icon,
body.dark-mode .user-permission-mini-icon,
body.dark-mode .machine-folder-icon {
  stroke: #dbeafe !important
}

body.dark-mode .machine-folder-icon path,
body.dark-mode .user-permission-mini-icon path,
body.dark-mode .user-permission-mini-icon circle,
body.dark-mode .ticket-group-icon path,
body.dark-mode .ticket-group-icon circle {
  stroke: #dbeafe !important
}

body.dark-mode .user-custom-permission-btn.active .money-icon .money-icon-circle {
  fill: none !important;
  stroke: white !important
}

body.dark-mode .user-custom-permission-btn.active .money-icon .money-icon-dollar {
  stroke: white !important;
  fill: none !important;
  opacity: 1 !important
}

body.dark-mode .user-custom-permission-btn.active .money-icon path.money-icon-dollar {
  stroke: white !important
}

body.dark-mode #machineDetailModal .modal-popup-style,
body.dark-mode #machineDetailModal .popup-modal-body,
body.dark-mode #machineDetailModal #machineDetailContent {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .machine-folder-content {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .machine-detail-path {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #cbd5e1 !important
}

body.dark-mode #machineDetailModal .machine-detail-path span,
body.dark-mode #machineDetailModal .machine-detail-path .path-current,
body.dark-mode #machineDetailModal .machine-detail-path-separator {
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal h3,
body.dark-mode #machineDetailModal .machine-hours-chart-title,
body.dark-mode #machineDetailModal .machine-custom-file-title {
  color: #f8fafc !important
}

body.dark-mode #machineDetailModal table {
  background: transparent !important;
  border-color: #374151 !important
}

body.dark-mode #machineDetailModal th {
  background: #1f2937 !important;
  color: #f8fafc !important;
  border-color: #4b5563 !important
}

body.dark-mode #machineDetailModal td {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #374151 !important
}

body.dark-mode #machineDetailModal td[style*="color:#082765"],
body.dark-mode #machineDetailModal div[style*="color:#082765"],
body.dark-mode #machineDetailModal span[style*="color:#082765"] {
  color: #93c5fd !important
}

body.dark-mode #machineDetailModal div[style*="color:#12367a"],
body.dark-mode #machineDetailModal span[style*="color:#12367a"] {
  color: #bfdbfe !important
}

body.dark-mode #machineDetailModal div[style*="color:#64748b"],
body.dark-mode #machineDetailModal span[style*="color:#64748b"] {
  color: #cbd5e1 !important
}

body.dark-mode #machineDetailModal .machine-cost-card {
  background: #0f172a !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .machine-cost-label {
  color: #cbd5e1 !important
}

body.dark-mode #machineDetailModal .machine-cost-number {
  color: #93c5fd !important
}

body.dark-mode #machineDetailModal .machine-cost-group-header {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
  color: #ffffff !important
}

body.dark-mode #machineDetailModal .machine-cost-group-header span,
body.dark-mode #machineDetailModal .machine-cost-group-chevron {
  color: #ffffff !important
}

body.dark-mode #machineDetailModal .machine-cost-group-body,
body.dark-mode #machineDetailModal .machine-cost-group-body table {
  background: #111827 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .machine-hours-chart {
  background: #0f172a !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .machine-hours-chart-bars {
  background: #111827 !important;
  border-color: #4b5563 !important
}

body.dark-mode #machineDetailModal .machine-hours-chart-value {
  color: #bfdbfe !important
}

body.dark-mode #machineDetailModal .machine-hours-chart-month {
  color: #cbd5e1 !important
}

body.dark-mode #machineDetailModal .machine-hours-chart-select {
  background: #020617 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .machine-hours-chart-legend-item {
  background: #111827 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .machine-custom-file-box,
body.dark-mode #machineDetailModal .machine-custom-file-body {
  background: #0f172a !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .machine-custom-file-header {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #f8fafc !important
}

body.dark-mode #machineDetailModal .machine-files-table th {
  background: #1f2937 !important;
  color: #f8fafc !important;
  border-color: #4b5563 !important
}

body.dark-mode #machineDetailModal .machine-files-table td {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #374151 !important
}

body.dark-mode #machineDetailModal .machine-custom-file-row input {
  background: #020617 !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important
}

body.dark-mode #machineDetailModal .empty {
  background: #0f172a !important;
  border: 1px dashed #4b5563 !important;
  border-radius: 12px !important;
  color: #cbd5e1 !important
}

body.dark-mode #machineDetailModal .priority-low {
  background: #1e3a8a !important;
  color: #dbeafe !important;
  border: 1px solid #60a5fa !important
}

body.dark-mode #machineDetailModal .priority-medium {
  background: #78350f !important;
  color: #fde68a !important;
  border: 1px solid #f59e0b !important
}

body.dark-mode #machineDetailModal .priority-urgent {
  background: #7f1d1d !important;
  color: #fecaca !important;
  border: 1px solid #f87171 !important
}

body.dark-mode #machineDetailModal .aperta {
  background: #334155 !important;
  color: #e2e8f0 !important
}

body.dark-mode #machineDetailModal .lavorazione {
  background: #78350f !important;
  color: #fde68a !important
}

body.dark-mode #machineDetailModal .chiusa {
  background: #064e3b !important;
  color: #d1fae5 !important
}

body.dark-mode #machineDetailModal .work-hours-edit-modal-info,
body.dark-mode #workHoursModal .work-hours-edit-modal-info {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #dbeafe !important
}

body.dark-mode #machineDetailModal .work-hours-edit-modal-info span,
body.dark-mode #workHoursModal .work-hours-edit-modal-info span {
  color: #cbd5e1 !important
}

body.dark-mode #machineDetailModal .description-cell.show-dots:not(.expanded):after,
body.dark-mode .description-cell.show-dots:not(.expanded):after {
  background: #0f172a !important;
  color: #e5e7eb !important
}

body.dark-mode #settingsModal .modal-popup-style,
body.dark-mode #settingsModal .popup-modal-body {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode #settingsModal .settings-panel {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode #settingsModal .settings-panel-title,
body.dark-mode #settingsModal .settings-panel-text {
  color: #dbeafe !important
}

body.dark-mode #settingsModal .settings-theme-btn {
  background: #0f172a !important;
  border-color: #4b5563 !important;
  color: #e5e7eb !important
}

body.dark-mode #settingsModal .settings-theme-btn.active {
  background: #2563eb !important;
  border-color: #60a5fa !important;
  color: white !important
}

.settings-panel {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 14px;
  min-width: 360px
}

.settings-panel-title {
  margin: 0;
  color: #082765;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 10px
}

.settings-panel-text {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 800
}

.settings-theme-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.settings-theme-btn {
  height: 46px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 12px !important;
  background: white !important;
  color: #082765 !important;
  border: 2px solid #c8d4e5 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-weight: 900 !important
}

.settings-theme-btn.active {
  background: #082765 !important;
  border-color: #082765 !important;
  color: white !important;
  box-shadow: 0 6px 16px rgba(8, 39, 101, .22) !important
}

.settings-theme-btn svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}

.theme-toggle-btn.theme-toggle-btn,
.settings-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: white !important;
  color: #082765 !important;
  border: 1px solid #b9c4d6 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important
}

.logout-icon-btn {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  margin-left: -12px !important;
  border-radius: 0 10px 10px 0 !important;
  background: white !important;
  color: #082765 !important;
  border: 1px solid #b9c4d6 !important;
  border-left: 1px solid #dbe3ee !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important
}

.logout-icon-btn svg {
  width: 23px;
  height: 23px;
  stroke: #dc2626;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}

.settings-btn svg {
  width: 21px;
  height: 21px;
  stroke: #082765;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}

.theme-toggle-btn svg {
  width: 21px;
  height: 21px;
  stroke: #082765;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap:
    round;
  stroke-linejoin: round
}

.theme-toggle-btn.dark-active {
  background: #111827 !important;
  border-color: #374151 !important
}

.theme-toggle-btn.dark-active svg {
  stroke: #facc15 !important
}

body.dark-mode .settings-btn svg {
  stroke: #e5e7eb !important
}

body.dark-mode .logout-icon-btn svg {
  stroke: #f87171 !important
}

#app {
  display: none
}

#loginPage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
  background: linear-gradient(135deg, #fff, #edf4ff)
}

.login-card {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 18px 45px rgba(11, 42, 99, .18);
  border: 1px solid var(--border)
}

.login-card h1 {
  display: none
}

.login-brand-logo {
  display: flex;
  justify-content: center;
  margin: 0 auto 18px;
  transform: scale(.82);
  transform-origin: center
}

.login-brand-logo .brand-logo-svg {
  width: 430px;
  height: 76px;
  max-width: 100%
}

.login-card p {
  margin-top: 0;
  color: var(--muted);
  text-align: center
}

header {
  background: #fff;
  padding: 32px 30px;
  border-bottom: 4px solid var(--blue2)
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px
}

.brand-logo {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #082765;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible
}

.brand-logo::before,
.brand-logo::after,
.brand-logo .glass-shine {
  display: none
}

.brand-logo-svg {
  width: 430px;
  height: 76px;
  display: block;
  overflow: visible
}

.brand-logo-text {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 42px;
  font-weight: 1000;
  letter-spacing: -3px;
  fill: #082765
}

.brand-logo-o {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 42px;
  font-weight: 1000;
  letter-spacing: -3px;
  fill: #082765
}

.brand-logo-overlap-white {
  font-family: 'Arial Black', Arial, sans-serif;
  font-size: 42px;
  font-weight: 1000;
  letter-spacing: -3px;
  fill: #fff;
  stroke: #082765;
  stroke-width: .65px;
  paint-order: stroke fill
}

.brand-logo-long-o {
  fill: #fff;
  stroke: #082765;
  stroke-width: 3.2px
}

.brand-logo-long-o-hole {
  fill: #fff;
  stroke: #082765;
  stroke-width: 2.4px
}

.brand-gac {
  font-size: 24px;
  font-weight: 900;
  padding: 4px 10px;
  border: 2px solid white;
  border-radius: 10px;
  color: white;
  font-family: Arial Black, Arial
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  position: relative
}

#loggedUserLabel {
  font-size: 18px !important;
  font-weight: 700;
  background: white;
  border: 1px solid #b9c4d6;
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 0 18px 0 0;
  display: inline-flex !important;
  align-items: center;
  height: 42px;
  min-height: 42px;
  gap: 8px;
  overflow: hidden
}

.user-name-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding-right: 4px
}

.logged-user-name {
  color: #082765 !important;
  font-weight: 900 !important
}

.logged-user-prefix {
  color: #111827 !important
}

body.dark-mode .logged-user-name {
  color: #60a5fa !important
}

body.dark-mode .logged-user-prefix {
  color: #e5e7eb !important
}

.user-menu-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  margin-left: 10px;
  vertical-align: middle
}

.user-table-title-with-icons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap
}

.user-info-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap
}

.user-info-line strong {
  display: inline !important;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.user-menu-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto
}

.user-menu-icon svg {
  width: 19px;
  height: 19px;
  display: block
}

.user-menu-icon-text {
  color: white;
  font-size: 18px;
  font-weight: 900;
  line-height: 1
}

.user-name-box:hover span:last-child {
  text-decoration: underline
}

.user-role-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #b9c4d6;
  border-radius: 9px 0 0 9px;
  padding: 0 16px;
  background: #f8fbff;
  margin-right: 12px;
  min-width: 76px;
  height: 42px;
  align-self: stretch
}

.role-icon {
  width: 26px;
  height: 26px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block
}

.role-icon-fill {
  width: 26px;
  height: 26px;
  fill: var(--blue);
  stroke: var(--blue);
  stroke-width: 1.8
}

.role-icon-mech {
  width: 28px;
  height: 28px;
  stroke-width: 3
}

.role-icon-electric {
  width: 28px;
  height: 28px;
  stroke-width: 3;
  transform: rotate(-45deg);
  transform-origin: center
}

.role-icon-custom {
  width: 28px;
  height: 28px;
  stroke: #082765 !important;
  fill: none !important;
  stroke-width: 2.5 !important
}

.role-icon-custom path,
.role-icon-custom circle {
  stroke: #082765 !important;
  fill: none !important
}

.user-stats-dropdown {
  display: none;
  position: absolute;
  top: 76px;
  right: 92px;
  width: 320px;
  max-width: calc(100vw - 28px);
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .22);
  padding: 14px;
  z-index: 9998;
  overflow: visible
}

.user-stats-dropdown.open {
  display: block
}

.user-stats-dropdown:before {
  content: '';
  position: absolute;
  top: -9px;
  right: 32px;
  width: 16px;
  height: 16px;
  background: white;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg)
}

.stats-section-box {
  margin: 0 auto 10px auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  padding: 9px;
  max-width: 240px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .07)
}

.stats-section-title {
  font-size: 11px;
  font-weight: 900;
  color: #082765;
  text-transform: uppercase;
  letter-spacing: .35px;
  text-align: center;
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dbe3ee
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 0;
  max-width: 220px;
  margin-left: auto;
  margin-right: auto
}

.stat-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
  min-height: 34px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

.stat-number {
  font-size: 18px;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  order: 2;
  min-width: 28px;
  text-align: right
}

.stat-label {
  margin-top: 0;
  font-size: 9.5px;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05px;
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  text-align: left;
  order: 1
}

.stats-year-filter-box {
  margin: 0 auto 12px auto;
  border: 1px dashed #9fb2d1;
  border-radius: 12px;
  background: #ffffff;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 230px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .07)
}

.stats-year-filter-label {
  font-size: 11px;
  font-weight: 900;
  color: #082765;
  text-transform: uppercase;
  letter-spacing: .35px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.transfer-years-box {
  margin-top: 12px
}

.transfer-years-title {
  font-size: 12px;
  font-weight: 900;
  color: #082765;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
  text-align: center
}

.transfer-year-select {
  width: 88px;
  height: 30px;
  margin: 0;
  border: 1px solid #9fb2d1;
  border-radius: 8px;
  background: #f8fbff;
  color: #082765;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  padding: 0 6px;
  box-shadow: none
}

.transfer-year-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 12px;
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  min-width: 0
}

.transfer-year-inline .transfer-year-days {
  background: #082765;
  color: white;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  min-width: 92px;
  text-align: center
}

.transfer-year-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  margin-top: 6px;
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  font-weight: 900;
  color: #12367a
}

.transfer-year-row span:last-child {
  background: #082765;
  color: white;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px
}

.user-dropdown-permissions {
  margin: 0 auto 12px auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
  padding: 9px;
  max-width: 240px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .07)
}

.user-dropdown-permissions-title {
  font-size: 10.5px;
  font-weight: 900;
  color: #082765;
  text-transform: uppercase;
  letter-spacing: .35px;
  text-align: center;
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dbe3ee
}

.user-dropdown-permissions-mode {
  display: none !important
}

.user-dropdown-permissions-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center
}

.user-dropdown-permissions-icons .user-custom-permission-btn {
  width: 30px;
  height: 28px;
  border-radius: 8px;
  border-width: 1.5px;
  padding: 4px !important;
  cursor: default
}

.user-dropdown-permissions-icons .user-custom-permission-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2
}

.user-dropdown-permissions-icons .user-custom-permission-btn:not(.active) {
  opacity: .38
}

main {
  padding: 56px 24px
}

.card,
main section.card {
  width: 100%;
  background: white;
  border-radius: 14px;
  padding: 26px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, .08);
  border: 1px solid var(--border)
}

.toolbar-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .10);
  margin: -36px 0 20px;
  display: flex;
  gap: 14px;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  user-select: none
}

.button-drop-zone {
  min-height: 64px;
  border: 2px dashed transparent;
  border-radius: 16px;
  transition: .18s ease
}

.button-drop-zone.drop-active {
  border-color: #082765;
  background: #eef4ff
}

.home-widgets-drop {
  margin: 0 0 20px 0;
  min-height: 78px;
  border: 2px dashed #c8d4e5;
  border-radius: 18px;
  background: #f8fbff;
  padding: 14px;
  display: grid;
  gap: 16px
}

.home-widgets-drop:empty::before {
  content: 'Trascina qui un bottone blu per mostrare la funzione direttamente in home page';
  color: #64748b;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  padding: 14px
}

.home-widgets-drop:has(.home-widget),
.home-widgets-drop.tickets-visible {
  min-height: 0;
  border-color: transparent;
  background: transparent;
  padding: 0
}

.home-widgets-drop:has(.home-widget)::before,
.home-widgets-drop.tickets-visible::before {
  display: none;
  content: none
}

.home-widgets-drop.drop-active {
  min-height: 78px;
  border-color: #082765;
  background: #eef4ff;
  padding: 14px
}

.home-widget {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .10);
  overflow: hidden
}

.home-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #f4f7fb;
  border-bottom: 1px solid var(--border)
}

.home-widget-title-icon[draggable="true"],
.title-icon[data-ticket-list-drag="true"] {
  cursor: grab
}

.home-widget-title-icon.dragging-widget-icon,
.title-icon.dragging-widget-icon {
  opacity: .55;
  transform: scale(.96)
}

.home-widget-title {
  margin: 0;
  color: #082765;
  font-size: 28px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 18px
}

.home-widget-title-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto
}

.home-widget-title-icon svg {
  width: 24px;
  height: 24px;
  display: block
}

.home-widget-body {
  padding: 16px
}

.home-widget[data-home-widget="openActivityBoardBtn"] .home-widget-body {
  overflow-x: auto
}

.home-widget[data-home-widget="openActivityBoardBtn"] .activity-list {
  max-height: none;
  overflow: visible;
  padding-right: 0
}

.home-widget[data-home-widget="openActivityBoardBtn"] .activity-table {
  min-width: 900px
}

.home-calendar-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  margin-bottom: 10px
}

.home-calendar-toolbar h2 {
  margin: 0;
  text-align: center;
  color: #082765;
  font-size: 20px;
  align-self: start;
  padding-top: 10px
}

.home-widget[data-home-widget="openCalendarBtn"] .calendar-grid {
  min-width: 960px
}

.home-widget[data-home-widget="openCalendarBtn"] .home-widget-body {
  overflow-x: auto
}

.home-widget[data-home-widget="openMachinesBtn"] .home-widget-body {
  overflow-x: auto
}

.home-widget[data-home-widget="openMachinesBtn"] .machine-folders-table {
  min-width: 900px
}

.machine-year-folder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px
}

.machine-year-folder-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  overflow: hidden
}

.machine-year-folder-main {
  width: 100%;
  margin: 0 !important;
  background: #eef4ff !important;
  color: #082765 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  text-align: left !important
}

.machine-year-folder-main:hover {
  background: #dbeafe !important
}

.machine-year-folder-title {
  font-size: 19px;
  font-weight: 900
}

.machine-year-folder-count {
  margin-left: auto;
  background: #082765;
  color: white;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 900
}

.machine-year-folder-content {
  border-top: 1px solid #dbe3ee;
  background: #f8fbff;
  padding: 14px
}

.machine-model-folder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px
}

.machine-model-folder-card {
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 15px;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .07);
  overflow: hidden
}

.machine-model-folder-main {
  width: 100%;
  margin: 0 !important;
  background: #ffffff !important;
  color: #082765 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 15px !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  text-align: left !important
}

.machine-model-folder-main:hover {
  background: #eef4ff !important
}

.machine-model-folder-title {
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.machine-model-folder-count {
  margin-left: auto;
  background: #12367a;
  color: white;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900
}

.machine-model-folder-content {
  border-top: 1px solid #dbe3ee;
  background: #f8fbff;
  padding: 12px
}

.machine-create-box {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  overflow: hidden
}

.machine-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px 0;
  color: #082765;
  cursor: pointer;
  user-select: none;
  padding-bottom: 12px;
  border-bottom: 1px solid #dbe3ee;
  background: transparent
}

.machine-create-title {
  margin: 0;
  color: #082765;
  font-size: 22px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2
}

.machine-create-folder-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #082765;
  border: 2px solid #082765;
  flex: 0 0 auto
}

.machine-create-folder-icon .machine-folder-icon {
  width: 22px;
  height: 22px;
  stroke: white !important
}

.machine-create-folder-icon .machine-folder-icon path {
  stroke: white !important
}

.machine-create-folder-icon::after {
  content: none
}

.machine-create-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef4ff !important;
  border: 1px solid #c8d4e5 !important;
  color: #082765 !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 18px !important
}

.machine-create-body {
  margin-top: 4px;
  padding: 0
}

.machine-create-box.collapsed .machine-create-body {
  display: none
}

.machine-create-box.collapsed .machine-create-toggle::before {
  content: '▾'
}

.machine-create-box:not(.collapsed) .machine-create-toggle::before {
  content: '▴'
}

.machine-create-box .filters {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important
}

.machine-search-filter {
  padding: 14px !important
}

.machine-search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center
}

.machine-search-box input {
  padding-left: 52px !important;
  height: 52px !important;
  color: #082765 !important;
  font-weight: 800 !important
}

.machine-search-icon {
  position: absolute;
  left: 17px;
  width: 23px;
  height: 23px;
  stroke: #082765;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  z-index: 2;
  pointer-events: none
}

.machine-search-box input::placeholder {
  color: #64748b;
  font-weight: 800
}

.machine-model-select {
  font-weight: 900 !important;
  color: #082765 !important
}

.machine-model-create-btn {
  height: 52px !important;
  white-space: nowrap !important
}

.machine-folder-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 0
}

.machine-folder-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  overflow: hidden
}

.machine-folder-main {
  width: 100%;
  margin: 0 !important;
  background: #f8fbff !important;
  color: #082765 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  text-align: left !important
}

.machine-folder-main:hover {
  background: #eef4ff !important
}

.machine-folder-icon {
  width: 42px;
  height: 36px;
  flex: 0 0 auto;
  stroke: #082765;
  fill: none
}

.machine-folder-icon path {
  stroke: #082765 !important
}

.machine-folder-matricola {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.machine-folder-client-name {
  color: #64748b;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.machine-folder-client-name::before {
  content: '·';
  color: #94a3b8;
  margin-right: 10px
}

.machine-folder-model {
  color: #12367a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.machine-folder-serial {
  color: white;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #082765;
  border-radius: 999px;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center
}

.machine-folder-chevron {
  margin-left: auto;
  font-size: 18px;
  font-weight: 900;
  color: #082765
}

.machine-folder-main[data-action="open-machine-folder-modal"] .machine-folder-chevron::before {
  content: 'Apri';
  font-size: 13px;
  font-weight: 900;
  background: #082765;
  color: white;
  border-radius: 999px;
  padding: 7px 12px
}

.machine-folder-main[data-action="open-machine-folder-modal"] .machine-folder-chevron {
  font-size: 0
}

.machine-folder-dropdown {
  border-top: 1px solid #dbe3ee;
  background: white;
  padding: 14px
}

.machine-detail-path {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px 0;
  padding: 12px 14px;
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  color: #64748b;
  font-size: 14px;
  font-weight: 900
}

.machine-detail-path span {
  display: inline-flex;
  align-items: center;
  gap: 8px
}

.machine-detail-path .path-current {
  color: #082765
}

.machine-detail-path-separator {
  color: #94a3b8;
  font-weight: 900
}

.machine-folder-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px
}

.machine-folder-tab {
  margin: 0 !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  background: white !important;
  color: #082765 !important;
  border: 2px solid #082765 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 900 !important
}

.machine-folder-tab.active {
  background: #082765 !important;
  color: white !important
}

.machine-folder-content {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 14px;
  overflow: auto
}

.machine-costs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px
}

.machine-costs-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  margin: 0 auto 14px auto
}

.machine-costs-summary .machine-cost-card {
  min-width: 150px
}

.machine-cost-card {
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 12px;
  text-align: center
}

.machine-cost-label {
  font-size: 13px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 8px
}

.machine-cost-number {
  font-size: 26px;
  font-weight: 900;
  color: #082765
}

.machine-cost-group-header {
  width: 100%;
  margin: 0 !important;
  padding: 10px 12px !important;
  background: #eef4ff !important;
  color: #082765 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  text-align: left !important;
  font-size: 15px !important;
  font-weight: 900 !important
}

.machine-cost-group-header:hover {
  background: #dbeafe !important
}

.machine-cost-group-chevron {
  font-size: 16px;
  font-weight: 900;
  color: #082765
}

.machine-cost-group-body {
  padding: 10px
}

.machine-cost-group-body.collapsed {
  display: none
}

.work-hours-edit-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap
}

.work-hours-edit-btn {
  width: 28px !important;
  height: 26px !important;
  min-width: 28px !important;
  margin: 0 !important;
  padding: 4px !important;
  border-radius: 7px !important;
  background: white !important;
  border: 2px solid #0057c8 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important
}

.work-hours-edit-btn svg {
  width: 15px;
  height: 15px;
  stroke: #0057c8;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}

.work-hours-manual-badge {
  display: inline-block;
  margin-left: 4px;
  color: #d97706;
  font-size: 10px;
  font-weight: 900;
  vertical-align: middle
}

.work-hours-edit-modal-info {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 12px 14px;
  color: #12367a;
  font-weight: 900;
  margin-bottom: 12px
}

.work-hours-edit-modal-info span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-top: 4px
}

.work-hours-auto-btn {
  background: #64748b !important
}

.machine-hours-chart {
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: white
}

.machine-hours-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px
}

.machine-hours-chart-title {
  margin: 0;
  color: #082765;
  font-size: 15px;
  font-weight: 900
}

.machine-hours-chart-select {
  width: auto !important;
  min-width: 150px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 5px 10px !important;
  border-radius: 9px !important;
  border: 1px solid #c8d4e5 !important;
  color: #082765 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  background: #f8fbff !important
}

.machine-hours-chart-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 150px;
  padding: 10px 6px 4px;
  border-bottom: 1px solid #dbe3ee;
  background: #f8fbff;
  border-radius: 10px
}

.machine-hours-chart-bar-wrap {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0
}

.machine-hours-chart-value {
  font-size: 10px;
  font-weight: 900;
  color: #082765;
  min-height: 12px;
  white-space: nowrap
}

.machine-hours-chart-bar {
  width: 100%;
  max-width: 34px;
  min-height: 3px;
  border-radius: 7px 7px 0 0;
  background: #082765
}

.machine-hours-stacked-bar {
  width: 100%;
  max-width: 38px;
  min-height: 3px;
  border-radius: 7px 7px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column-reverse;
  background: #dbe3ee
}

.machine-hours-stacked-segment {
  width: 100%;
  min-height: 2px
}

.machine-hours-grouped-month {
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 100%;
  max-width: 58px
}

.machine-hours-group-bar {
  width: 9px;
  min-height: 3px;
  border-radius: 6px 6px 0 0
}

.machine-hours-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px
}

.machine-hours-chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 900;
  color: #12367a;
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  padding: 5px 8px
}

.machine-hours-chart-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block
}

.machine-hours-chart-month {
  font-size: 10px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  white-space: nowrap
}

.machine-hours-chart-empty {
  padding: 18px;
  text-align: center;
  color: #64748b;
  font-weight: 900;
  background: #f8fbff;
  border-radius: 12px;
  border: 1px dashed #dbe3ee
}

.home-widget[data-home-widget="openUsersPageBtnTable"] .home-widget-body {
  overflow-x: auto
}

.home-widget[data-home-widget="openUsersPageBtnTable"] .users-role-table {
  min-width: 720px
}

.home-user-form-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  overflow: hidden
}

.user-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px 0;
  color: #082765;
  cursor: pointer;
  user-select: none;
  padding-bottom: 12px;
  border-bottom: 1px solid #dbe3ee;
  background: transparent
}

.user-create-title {
  margin: 0;
  color: #082765;
  font-size: 22px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2
}

.user-create-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto
}

.user-create-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round
}

.user-create-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef4ff !important;
  border: 1px solid #c8d4e5 !important;
  color: #082765 !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 18px !important
}

.user-create-body {
  margin-top: 4px;
  padding: 0
}

.home-user-form-card.collapsed .user-create-body {
  display: none
}

.home-user-form-card.collapsed .user-create-toggle::before {
  content: '▾'
}

.home-user-form-card:not(.collapsed) .user-create-toggle::before {
  content: '▴'
}

.home-user-form-card form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 16px
}

.home-user-form-card form label {
  margin-top: 0
}

.home-user-form-card .user-form-actions {
  grid-column: 1/-1
}

.user-custom-permissions {
  display: none;
  grid-column: 1/-1;
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 14px;
  margin-top: 6px
}

.user-custom-permissions.visible {
  display: block
}

.user-custom-permissions-title {
  font-size: 13px;
  font-weight: 900;
  color: #082765;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: 10px
}

.user-custom-permissions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.user-custom-permission-btn {
  width: 44px;
  height: 40px;
  border-radius: 11px;
  border: 2px solid #082765;
  background: white;
  color: #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px !important;
  margin: 0 !important;
  box-shadow: none !important
}

.user-custom-permission-btn svg {
  width: 22px;
  height: 22px;
  stroke: #082765;
  fill: none;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round
}

.users-role-table .user-custom-permission-btn {
  width: 30px;
  height: 28px;
  border-radius: 8px;
  border-width: 1.5px;
  padding: 4px !important
}

.users-role-table .user-custom-permission-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2
}

.users-role-table .user-custom-permissions-grid {
  gap: 5px
}

.user-custom-permission-btn .user-menu-icon-text {
  color: #082765
}

.user-custom-permission-btn {
  transition: .15s ease !important
}

.user-custom-permission-btn:not(.active) {
  background: white !important;
  color: #082765 !important;
  border-color: #cbd5e1 !important;
  opacity: .55 !important
}

.user-custom-permission-btn:not(.active) svg {
  stroke: #64748b !important
}

.user-custom-permission-btn:not(.active) svg circle:not(.money-icon-circle),
.user-custom-permission-btn:not(.active) svg .icon-fill-dot {
  fill: #64748b !important
}

.user-custom-permission-btn:not(.active) svg .money-icon-circle {
  fill: none !important;
  stroke: #64748b !important
}

.user-custom-permission-btn:not(.active) svg .money-icon-dollar {
  stroke: #082765 !important;
  opacity: 1 !important
}

.user-custom-permission-btn.active svg .money-icon-circle {
  fill: none !important;
  stroke: white !important
}

.user-custom-permission-btn.active svg .money-icon-dollar {
  stroke: white !important
}

.user-custom-permission-btn.active {
  background: #082765 !important;
  color: white !important;
  border-color: #082765 !important;
  opacity: 1 !important;
  box-shadow: 0 4px 12px rgba(8, 39, 101, .28) !important;
  transform: translateY(-1px)
}

.user-custom-permission-btn.active svg {
  stroke: white !important
}

.user-custom-permission-btn.active svg circle[fill="#082765"],
.user-custom-permission-btn.active svg .icon-fill-dot {
  fill: white !important
}

.user-custom-permission-btn.active .user-menu-icon-text {
  color: white
}

.home-users-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 12px
}

.home-users-title h2 {
  margin: 0;
  color: #12367a
}

.permissions-grid {
  display: grid;
  gap: 18px
}

.permissions-create-box {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  padding: 18px;
  margin: 0 0 14px 0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  overflow: hidden
}

.permissions-create-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px 0;
  color: #082765;
  cursor: pointer;
  user-select: none;
  padding-bottom: 12px;
  border-bottom: 1px solid #dbe3ee;
  background: transparent
}

.permissions-create-title {
  margin: 0;
  color: #082765;
  font-size: 22px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1.2
}

.permissions-create-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto
}

.permissions-create-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none
}

.permissions-create-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef4ff !important;
  border: 1px solid #c8d4e5 !important;
  color: #082765 !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 18px !important
}

.permissions-create-body {
  margin-top: 4px;
  padding: 0
}

.permissions-create-box.collapsed .permissions-create-body {
  display: none
}

.permissions-create-box.collapsed .permissions-create-toggle::before {
  content: '▾'
}

.permissions-create-box:not(.collapsed) .permissions-create-toggle::before {
  content: '▴'
}

.permissions-create-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 0;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 14px
}

.permissions-create-group input {
  margin: 0;
  height: 46px;
  border-radius: 10px;
  font-weight: 800;
  color: #082765
}

.permissions-create-group button {
  height: 46px;
  margin: 0;
  padding: 10px 18px;
  border-radius: 10px;
  white-space: nowrap
}

.permission-group-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%
}

.permission-group-name-text {
  flex: 1;
  min-width: 0
}

.permission-group-actions-cell {
  display: flex;
  align-items: center;
  justify-content: center
}

.permission-group-actions-cell .delete-permission-group-btn {
  margin: 0 auto !important
}

.delete-permission-group-btn {
  width: 34px !important;
  height: 30px !important;
  min-width: 34px !important;
  margin: 0 !important;
  padding: 4px !important;
  border-radius: 8px !important;
  background: white !important;
  border: 2px solid red !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important
}

.delete-permission-group-btn .trash-icon {
  width: 18px !important;
  height: 18px !important;
  stroke: red !important
}

.permissions-groups-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  border: none;
  margin: 0
}

.permissions-groups-table th {
  background: #f4f7fb;
  color: #082765;
  font-size: 15px;
  font-weight: 900;
  text-transform: none;
  letter-spacing: .3px;
  padding: 14px 16px;
  border: 1px solid #dbe3ee
}

.permissions-groups-table th:first-child {
  border-radius: 14px 0 0 14px;
  width: 22%;
  text-align: left
}

.permissions-groups-table th:nth-child(2) {
  text-align: left
}

.permissions-groups-table th:last-child {
  border-radius: 0 14px 14px 0;
  width: 90px;
  text-align: center
}

.permissions-groups-table td {
  background: white;
  border-top: 1px solid #dbe3ee;
  border-bottom: 1px solid #dbe3ee;
  padding: 14px 16px;
  vertical-align: middle
}

.permissions-groups-table td:first-child {
  border-left: 1px solid #dbe3ee;
  border-radius: 14px 0 0 14px;
  color: #082765;
  font-size: 17px;
  font-weight: 900;
  text-transform: none;
  white-space: nowrap;
  width: 22%
}

.permissions-groups-table td:nth-child(2) {
  text-align: left
}

.permissions-groups-table td:last-child {
  border-right: 1px solid #dbe3ee;
  border-radius: 0 14px 14px 0;
  width: 90px;
  text-align: center
}

.permissions-groups-table .permissions-role-icons {
  margin-left: 0
}

.permissions-role-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .07);
  padding: 14px
}

.permissions-role-title {
  margin: 0;
  color: #082765;
  font-size: 19px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .3px;
  background: #f4f7fb;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  flex-wrap: wrap
}

.permissions-role-name {
  display: inline-flex;
  align-items: center;
  white-space: nowrap
}

.permissions-role-icons {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-left: 8px
}

.permissions-role-icons .user-custom-permission-btn {
  width: 34px;
  height: 32px;
  border-radius: 9px;
  border-width: 1.5px;
  padding: 5px !important;
  cursor: default
}

.permissions-role-icons .user-custom-permission-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2
}

.permissions-role-title .role-icon,
.permissions-role-title .role-icon-fill,
.permissions-role-title .role-icon-mech,
.permissions-role-title .role-icon-electric {
  display: none !important
}

.permissions-role-title .role-icon,
.permissions-role-title .role-icon-fill {
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px
}

.permissions-role-title .role-icon-mech,
.permissions-role-title .role-icon-electric {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px
}

.permissions-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px
}

.permission-feature-card {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px
}

.permission-feature-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #12367a;
  font-weight: 900;
  font-size: 15px;
  justify-content: center;
  text-align: center
}

.permission-feature-card-title .user-custom-permission-btn {
  display: none !important
}

.permission-feature-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap
}

.permissions-table-wrap {
  display: none
}

.permissions-table {
  display: none
}

.permissions-table th {
  background: #f8fbff;
  color: #082765;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 12px
}

.permissions-table td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
  font-size: 15px
}

.permissions-table tr:last-child td {
  border-bottom: none
}

.permission-feature-name {
  text-align: left !important;
  font-weight: 900;
  color: #12367a;
  width: 34%
}

.permission-feature-label {
  display: inline-flex;
  align-items: center;
  gap: 10px
}

.permission-feature-label .user-custom-permission-btn {
  width: 34px;
  height: 32px;
  border-radius: 9px;
  border-width: 1.5px;
  padding: 5px !important;
  cursor: default
}

.permission-feature-label .user-custom-permission-btn svg {
  width: 18px;
  height: 18px
}

.permission-cell {
  text-align: center !important;
  width: 16.5%
}

.permission-choice {
  width: auto;
  min-width: 86px;
  height: 40px;
  border-radius: 11px;
  border: 2px solid #082765;
  background: white;
  color: #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
  box-shadow: none !important;
  padding: 7px 12px !important;
  margin: 0 auto !important;
  transition: .15s ease
}

.permission-choice:hover {
  background: #eef4ff;
  transform: translateY(-1px)
}

.permission-icon {
  display: none
}

.permission-choice span.permission-text {
  display: inline !important
}

.permission-choice.active {
  background: #082765 !important;
  color: white;
  border-color: #082765 !important;
  box-shadow: 0 4px 10px rgba(8, 39, 101, .22) !important
}

.permission-choice.active .permission-icon {
  stroke: white
}

.permission-choice.active .permission-icon circle,
.permission-choice.active .permission-icon .icon-fill-dot {
  fill: white !important
}

.permission-choice.permission-create.active .permission-icon .permission-fill {
  fill: white;
  stroke: white
}

.permission-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px
}

.permission-legend span {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 11px 12px;
  color: #12367a;
  font-size: 14px;
  font-weight: 900;
  text-align: center
}

.permission-legend b {
  display: block;
  color: #082765;
  font-size: 15px;
  margin-bottom: 3px
}

.permissions-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px
}

.permissions-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  margin-bottom: 14px
}

.home-widget-remove {
  display: none !important
}

.home-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px
}

.home-mini-card {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px
}

.home-mini-title {
  font-weight: 900;
  color: #082765;
  margin-bottom: 8px
}

.home-mini-text {
  font-weight: 800;
  color: #12367a
}

.primary-action-btn[draggable="true"] {
  cursor: grab
}

.primary-action-btn.dragging-button {
  opacity: .55;
  transform: scale(.98)
}

.toolbar-card .primary-action-btn.toolbar-drop-before {
  box-shadow: -6px 0 0 #082765, 0 10px 24px rgba(11, 42, 99, .30), inset 0 1px 0 rgba(255, 255, 255, .35)
}

.toolbar-card .primary-action-btn.toolbar-drop-after {
  box-shadow: 6px 0 0 #082765, 0 10px 24px rgba(11, 42, 99, .30), inset 0 1px 0 rgba(255, 255, 255, .35)
}

.toolbar-card::-webkit-scrollbar {
  display: none
}

.toolbar-card.dragging {
  cursor: grabbing;
  scroll-behavior: auto
}

.toolbar-card .primary-action-btn {
  flex: 0 0 auto
}

.toolbar-card {
  position: relative
}

.toolbar-lock-badge {
  position: absolute;
  top: 0;
  left: 4px;
  z-index: 20;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #082765 !important;
  border: none !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  user-select: none;
  cursor: pointer !important;
  pointer-events: auto !important
}

.toolbar-card {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important
}

.toolbar-card .primary-action-btn {
  flex: 0 0 auto !important
}

main {
  position: relative
}

.toolbar-lock-badge svg {
  width: 32px;
  height: 32px;
  stroke: #082765 !important;
  fill: none;
  stroke-width: 2.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(8, 39, 101, .18))
}

.toolbar-lock-badge:hover svg {
  transform: translateY(-1px);
  filter: drop-shadow(0 4px 6px rgba(8, 39, 101, .24))
}

.toolbar-lock-badge.is-unlocked svg {
  stroke: #0057c8 !important
}

.toolbar-card.menu-locked .primary-action-btn[draggable="true"] {
  cursor: default
}

.toolbar-card.menu-unlocked .primary-action-btn[draggable="true"] {
  cursor: grab
}

body.dark-mode .toolbar-lock-badge {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #60a5fa !important
}

.toolbar-lock-badge svg rect,
.toolbar-lock-badge svg path {
  stroke: currentColor !important
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 31px
}

.section-title {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--blue2);
  font-size: 28px;
  font-weight: 900;
  margin: 0
}

.section-title.marked-title {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  flex: 0 0 auto;
  min-width: 0;
  width: auto
}

#ticketsHomeSection {
  border-radius: 16px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .10) !important
}

#ticketsPopupPage section.card {
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: visible;
  border: none !important;
  background: white !important
}

#ticketsPopupPage .tickets-list-header {
  display: none
}

.tickets-list-header {
  width: 100%;
  background: #f4f7fb;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 0
}

.tickets-list-header+.filters {
  margin: 18px 26px 26px
}

.tickets-list-header+.filters+#ticketContainer,
.tickets-list-header+.filters+#popupTicketContainer {
  padding: 0 26px 26px
}

#ticketContainer,
#popupTicketContainer {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%
}

#ticketContainer .main-tickets-table,
#popupTicketContainer .main-tickets-table {
  min-width: 1450px;
  width: max-content
}

#ticketContainer .ticket-section-body,
#popupTicketContainer .ticket-section-body {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px
}

.tickets-title-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  flex-wrap: wrap
}

.tickets-title-row .section-title {
  font-size: 28px;
  gap: 18px;
  line-height: 1;
  margin: 0
}

.tickets-title-row .title-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px
}

.tickets-title-row .new-assistance-header-btn {
  margin-left: 0
}

.title-icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center
}

h2 {
  margin-top: 0;
  font-size: 22px;
  color: #061b49
}

label {
  display: block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #061b49
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  margin-top: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  background: white
}

.password-field-wrap {
  position: relative;
  width: 100%;
  display: block
}

.password-field-wrap input {
  padding-right: 52px !important;
  margin-top: 5px !important
}

.password-toggle-btn {
  position: absolute;
  right: 8px;
  top: calc(50% + 2.5px);
  transform: translateY(-50%);
  width: 36px !important;
  height: 32px !important;
  min-width: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 9px !important;
  background: #eef4ff !important;
  color: #082765 !important;
  border: 1px solid #c8d4e5 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  z-index: 3
}

.password-toggle-btn:hover {
  background: #dbeafe !important
}

.password-toggle-btn svg {
  width: 19px;
  height: 19px;
  stroke: #082765;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}

.password-toggle-btn::after {
  content: '';
  position: absolute;
  width: 23px;
  height: 2.4px;
  background: #082765;
  border-radius: 999px;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 2px #eef4ff
}

.password-toggle-btn.password-visible::after {
  display: none
}

.password-toggle-btn.password-visible {
  background: #dbeafe !important;
  border-color: #082765 !important
}

textarea {
  resize: vertical;
  min-height: 80px
}

.assigned-users-box {
  margin-top: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px;
  background: #f8fbff;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
  align-items: start
}

.ticket-modal .assigned-users-box {
  max-height: 125px;
  grid-template-columns: repeat(4, 1fr);
  padding: 7px;
  gap: 7px
}

.assigned-role-group {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  align-self: start
}

.assigned-role-title {
  font-size: 13px;
  font-weight: 900;
  color: #082765;
  text-transform: uppercase;
  letter-spacing: .4px;
  text-align: center;
  cursor: pointer;
  padding: 12px 10px;
  border-radius: 10px;
  background: #f4f7fb;
  border: 1px solid #dbe3ee;
  user-select: none
}

.assigned-role-title:hover {
  background: #eef4ff
}

.assigned-role-title::after {
  content: ' ▾';
  font-size: 12px
}

.assigned-role-group.open .assigned-role-title::after {
  content: ' ▴'
}

.assigned-role-users {
  display: none;
  gap: 8px;
  margin-top: 8px
}

.assigned-role-group.open .assigned-role-users {
  display: grid
}

.assigned-user-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue2);
  cursor: pointer
}

.assigned-user-option input {
  width: auto;
  margin: 0
}

button {
  margin-top: 0;
  padding: 16px 26px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #0068d8, #004eaa);
  color: white;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(0, 80, 170, .18)
}

button:disabled {
  cursor: not-allowed;
  opacity: .55
}

form button {
  width: 100%;
  margin-top: 16px
}

.primary-action-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .35);
  background: linear-gradient(135deg, #1d4590, #082765) !important;
  color: white !important;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(11, 42, 99, .30), inset 0 1px 0 rgba(255, 255, 255, .35)
}

.primary-action-btn span:first-child {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  display: inline-flex;
  align-items: center;
  justify-content: center
}

.new-assistance-header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 2px solid #082765;
  background: white !important;
  color: #082765 !important;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(8, 39, 101, .14)
}

.new-assistance-header-btn:hover {
  background: #eef4ff !important;
  transform: translateY(-1px)
}

.new-assistance-header-btn span:first-child {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #082765;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1
}

.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
  margin: 18px 0 26px;
  padding: 18px;
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 14px
}

.filters input,
.filters select {
  margin-top: 0;
  height: 52px;
  border-radius: 12px;
  border: 1px solid #c8d4e5;
  background: white;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue2)
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden
}

th,
td {
  text-align: center;
  padding: 18px 16px;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid var(--border);
  font-size: 17px;
  vertical-align: middle
}

th {
  background: #f4f7fb;
  color: var(--blue2);
  font-size: 17px;
  font-weight: 900
}

td {
  background: white
}

.badge {
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  display: inline-block;
  white-space: nowrap
}

.aperta {
  background: #eef2f7;
  color: #334155
}

.lavorazione {
  background: #fef3c7;
  color: #a16207
}

.chiusa {
  background: #d7f4df;
  color: #04712f
}

.priority-badge {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  display: inline-block;
  min-width: 90px
}

.priority-low {
  background: #dbeafe;
  color: #1d4ed8
}

.priority-medium {
  background: #fef3c7;
  color: #b45309
}

.priority-urgent {
  background: #fee2e2;
  color: #dc2626
}

.subscription-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  min-width: 150px;
  text-align: center
}

.subscription-bronze {
  background: #f7e4d0;
  color: #9a5a18;
  border: 1px solid #b87333
}

.subscription-silver {
  background: #f1f5f9;
  color: #8a94a6;
  border: 1px solid #aeb8c8
}

.subscription-gold {
  background: #fff3bf;
  color: #b8860b;
  border: 1px solid #d4af37
}

.subscription-paid {
  background: #dcfce7;
  color: #047857;
  border: 1px solid #10b981
}

.subscription-warranty {
  background: white;
  color: #111827;
  border: 2px solid #000
}

.subscription-token {
  width: 54px;
  min-width: 54px !important;
  height: 54px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #7c8aa0;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #eef2f7 45%, #d7dee8 100%);
  color: var(--blue2);
  font-weight: 900;
  box-shadow: inset 0 2px 2px rgba(255, 255, 255, .85), inset 0 -2px 2px rgba(0, 0, 0, .05), 0 2px 6px rgba(100, 116, 139, .18)
}

.timer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 900;
  min-width: 140px
}

.description-cell {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.4;
  cursor: pointer;
  position: relative
}

.description-cell.show-dots:not(.expanded):after {
  content: '...';
  position: absolute;
  right: 0;
  bottom: 0;
  background: white;
  padding-left: 6px;
  font-weight: bold
}

.description-cell.expanded {
  display: block;
  overflow: visible
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 72px
}

.actions button {
  margin: 0;
  background: white !important;
  box-shadow: none
}

.trash-icon,
.edit-icon {
  width: 23px;
  height: 23px;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block
}

.users-role-actions .trash-icon,
.users-role-actions .edit-icon {
  width: 19px;
  height: 19px;
  stroke-width: 2.3
}

.trash-icon {
  stroke: red
}

.edit-icon {
  stroke: #0057c8
}

.actions button[data-action="delete-ticket"],
.actions button[data-action="edit-ticket"],
.actions button[data-action="close-ticket"] {
  padding: 6px 9px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 38px;
  min-width: 42px
}

.actions button[data-action="delete-ticket"] {
  border: 2px solid red
}

.actions button[data-action="edit-ticket"] {
  border: 2px solid #0057c8
}

.actions button[data-action="close-ticket"] {
  color: #00a651;
  border: 2px solid #00a651;
  font-size: 16px;
  font-weight: 900
}

.users-role-section {
  margin-top: 8px;
  padding: 7px
}

.users-role-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #082765;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .2px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f4f7fb;
  border: 1px solid #dbe3ee
}

.users-role-title:hover {
  background: #eef4ff
}

.users-role-title::after {
  content: '▾';
  font-size: 13px;
  margin-left: 6px
}

.users-role-section.collapsed .users-role-title::after {
  content: '▸'
}

.users-role-section.collapsed .users-role-body {
  display: none
}

.users-role-count {
  display: none
}

.users-role-table {
  margin-top: 6px;
  table-layout: fixed;
  width: 100%
}

.users-role-table th:nth-child(1),
.users-role-table td:nth-child(1) {
  width: 28%;
  text-align: left
}

.users-role-table th:nth-child(2),
.users-role-table td:nth-child(2) {
  width: 48%;
  text-align: center
}

.users-role-table th:nth-child(3),
.users-role-table td:nth-child(3) {
  width: 24%;
  text-align: center
}

.user-permissions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center
}

.user-permission-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  padding: 5px 8px;
  color: #12367a;
  font-size: 11px !important;
  font-weight: 900;
  white-space: nowrap
}

.user-permission-chip.hidden-permission {
  opacity: .45
}

.user-permission-mini-icon {
  width: 16px;
  height: 16px;
  stroke: #082765;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block
}

.user-permission-level {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #082765;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900
}

.users-role-table td {
  vertical-align: middle
}

.users-role-table td:first-child strong,
.users-role-table td:first-child span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.users-role-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  white-space: nowrap
}

.users-role-actions button {
  margin: 0;
  background: white !important;
  box-shadow: none;
  padding: 5px 7px !important;
  border-radius: 7px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  min-width: 36px;
  font-size: 0 !important
}

.users-role-actions button[data-action="edit-user"] {
  border: 2px solid #0057c8
}

.users-role-actions button[data-action="delete-user"] {
  border: 2px solid red
}

.users-role-table th,
.users-role-table td {
  padding: 7px 9px;
  font-size: 13px
}

.users-role-table th {
  font-size: 12px
}

.users-role-table td span {
  font-size: 11px !important
}

.inline-user-edit-btn {
  background: linear-gradient(180deg, #0068d8, #004eaa) !important;
  color: white !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 800 !important
}

.machine-custom-file-box {
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 0;
  margin-bottom: 14px;
  overflow: hidden
}

.machine-custom-file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f4f7fb;
  border-bottom: 1px solid #dbe3ee;
  cursor: pointer;
  user-select: none
}

.machine-custom-file-title {
  margin: 0;
  color: #082765;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px
}

.machine-custom-file-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #082765;
  border: 2px solid #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto
}

.machine-custom-file-icon svg {
  width: 22px;
  height: 22px;
  stroke: white !important;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}

.machine-custom-file-icon svg path {
  stroke: white !important
}

.machine-custom-file-plus {
  display: none !important
}

.machine-custom-file-toggle {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 9px !important;
  background: #eef4ff !important;
  border: 1px solid #c8d4e5 !important;
  color: #082765 !important;
  box-shadow: none !important;
  font-size: 17px !important;
  font-weight: 900 !important
}

.machine-custom-file-body {
  padding: 12px
}

.machine-custom-file-box.collapsed .machine-custom-file-body {
  display: none
}

.machine-custom-file-box.collapsed .machine-custom-file-toggle::before {
  content: '▾'
}

.machine-custom-file-box:not(.collapsed) .machine-custom-file-toggle::before {
  content: '▴'
}

.machine-custom-file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end
}

.machine-custom-file-row input {
  margin: 0 !important;
  height: 42px !important
}

.machine-custom-file-row button {
  height: 42px !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  white-space: nowrap
}

.machine-files-table {
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
  border: none !important;
  background: transparent !important;
  margin-top: 10px !important
}

.machine-files-table th {
  border: 1px solid #dbe3ee !important;
  background: #f4f7fb !important
}

.machine-files-table th:first-child {
  border-radius: 12px 0 0 12px !important
}

.machine-files-table th:last-child {
  border-radius: 0 12px 12px 0 !important
}

.machine-files-table td {
  background: white !important;
  border-top: 1px solid #dbe3ee !important;
  border-bottom: 1px solid #dbe3ee !important;
  border-right: 1px solid #dbe3ee !important
}

.machine-files-table td:first-child {
  border-left: 1px solid #dbe3ee !important;
  border-radius: 12px 0 0 12px !important
}

.machine-files-table td:last-child {
  border-radius: 0 12px 12px 0 !important
}

.machine-files-table tr {
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06) !important
}

.machine-file-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap
}

.machine-files-table th:nth-child(1),
.machine-files-table td:nth-child(1) {
  width: 110px !important
}

.machine-files-table th:nth-child(3),
.machine-files-table td:nth-child(3) {
  width: 150px !important;
  max-width: 150px !important
}

.machine-files-table .inline-user-edit-btn {
  padding: 6px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  white-space: nowrap !important
}

.machine-files-table .machine-file-delete-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 5px !important
}

.machine-files-table .machine-file-delete-btn .trash-icon {
  width: 16px !important;
  height: 16px !important
}

.machine-file-delete-btn {
  background: white !important;
  color: red !important;
  border: 2px solid red !important;
  box-shadow: none !important;
  padding: 6px !important;
  border-radius: 8px !important;
  font-size: 0 !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 30px !important;
  min-width: 34px !important
}

.machine-file-delete-btn .trash-icon {
  width: 18px !important;
  height: 18px !important;
  stroke: red !important
}

.inline-user-edit-btn.user-update-mode,
#userForm button.user-update-mode {
  background: linear-gradient(180deg, #facc15, #d97706) !important;
  color: #111827 !important;
  box-shadow: 0 5px 12px rgba(217, 119, 6, .24) !important
}

.user-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px
}

.user-form-actions button {
  margin-top: 0
}

.user-form-actions #userSubmitBtn {
  flex: 1
}

.user-cancel-edit-btn {
  display: none !important;
  width: auto !important;
  min-width: 0;
  flex: 1;
  background: #64748b !important
}

.user-cancel-edit-btn.visible {
  display: inline-flex !important;
  align-items: center;
  justify-content: center
}

.inline-user-delete-btn {
  background: linear-gradient(180deg, #ff3b30, #d70000) !important;
  color: white !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 800 !important
}

.file-intervention-btn {
  margin-top: 10px;
  background: white !important;
  color: #d4af37 !important;
  padding: 8px 12px !important;
  border: 2px solid #d4af37 !important;
  border-radius: 8px !important;
  font-size: 22px !important;
  display: inline-flex
}

.attachment-icon {
  width: 26px;
  height: 26px;
  stroke: #d4af37;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}

.secondary {
  background: #0057b8 !important
}

.danger {
  background: #ef0000 !important
}

.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted)
}

.ticket-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 10px;
  padding: 14px 18px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid var(--border);
  color: #082765;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  user-select: none
}

.ticket-group-icon {
  width: 30px;
  height: 30px;
  stroke: #082765;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  flex: 0 0 auto
}

.ticket-group-title:hover {
  background: #eef4ff
}

.ticket-group-title::after {
  content: '▾';
  margin-left: 10px;
  font-size: 16px
}

.ticket-section.collapsed .ticket-group-title::after {
  content: '▸'
}

.ticket-section.collapsed .ticket-section-body {
  display: none
}

.ticket-group-count {
  margin-left: auto;
  background: #082765;
  color: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px
}

.main-tickets-table,
.machine-folders-table {
  border-collapse: separate;
  border-spacing: 0 14px;
  border: none;
  overflow: visible;
  background: transparent
}

.main-tickets-table {
  table-layout: fixed
}

.main-tickets-table th:nth-child(2),
.main-tickets-table td:nth-child(2) {
  width: 135px;
  max-width: 135px
}

.main-tickets-table td:nth-child(2) div {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.main-tickets-table th:nth-child(5),
.main-tickets-table td:nth-child(5) {
  width: 330px
}

.main-tickets-table th:nth-child(9),
.main-tickets-table td:nth-child(9) {
  width: 150px
}

.main-ticket-row,
.machine-folder-row {
  box-shadow: 0 5px 18px rgba(15, 23, 42, .08)
}

.main-ticket-row td,
.machine-folder-row td {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border)
}

.main-ticket-row td:first-child,
.machine-folder-row td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 14px 0 0 14px
}

.main-ticket-row td:last-child,
.machine-folder-row td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 14px 14px 0
}

.machine-history-row td {
  border: 1px solid var(--border);
  border-radius: 14px
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .65);
  align-items: flex-start;
  justify-content: center;
  z-index: 9999;
  padding: 14px 20px;
  overflow: hidden
}

#schedulePickerModal {
  z-index: 10050
}

#schedulePickerModal .modal {
  box-shadow: 0 24px 70px rgba(0, 0, 0, .42)
}

.modal {
  background: white;
  width: 380px;
  max-width: calc(100% - 30px);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
  border: 1px solid var(--border)
}

.modal-popup-style {
  width: max-content !important;
  min-width: min(380px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100vh - 32px) !important;
  border-radius: 16px !important;
  padding: 0 !important;
  overflow: auto !important;
  border: 1px solid var(--border) !important;
  background: white !important
}

.modal-popup-style.popup-size-locked {
  width: var(--locked-popup-width) !important;
  min-width: var(--locked-popup-width) !important;
  max-width: var(--locked-popup-width) !important;
  height: var(--locked-popup-height) !important;
  max-height: var(--locked-popup-height) !important;
  overflow: auto !important
}

.modal-popup-style.popup-size-locked .popup-modal-body {
  max-height: calc(var(--locked-popup-height) - var(--locked-popup-header-height, 75px)) !important;
  overflow: auto !important
}

.modal-popup-style .popup-modal-header {
  width: 100%;
  background: #f4f7fb;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 !important
}

.modal-popup-style .popup-modal-title {
  margin: 0;
  color: #082765;
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 18px
}

#ticketsPopupPage .section-title,
.tickets-title-row .section-title {
  font-size: 28px !important;
  line-height: 1 !important
}

#permissionsPage .popup-modal-title {
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 900 !important
}

#usersPage .popup-modal-title {
  font-size: 28px !important;
  line-height: 1 !important;
  font-weight: 900 !important
}

.modal-popup-style .popup-modal-body {
  padding: 18px 26px 26px;
  width: max-content;
  max-width: 100%;
  overflow: visible
}

.modal-popup-style .popup-modal-header {
  min-width: 100%
}

#descriptionModal .modal-popup-style {
  width: min(720px, calc(100vw - 32px)) !important
}

#permissionsPage .modal-popup-style {
  width: max-content !important
}

#activityBoardPage .modal-popup-style {
  width: max-content !important
}

#calendarPage .modal-popup-style {
  width: max-content !important
}

#calendarTechModal .modal-popup-style {
  width: max-content !important
}

#schedulePickerModal .modal-popup-style {
  width: 580px !important;
  min-width: 580px !important;
  max-width: 580px !important;
  overflow: hidden !important;
  max-height: calc(100vh - 24px) !important
}

#ticketPage .modal-popup-style {
  width: 1120px !important;
  min-width: 1120px !important;
  max-width: calc(100vw - 32px) !important
}

#schedulePickerModal .popup-modal-body {
  overflow: hidden !important;
  padding: 14px 22px 22px !important;
  width: 580px !important;
  max-width: 580px !important
}

#schedulePickerModal .popup-modal-header {
  width: 580px !important;
  min-width: 580px !important;
  max-width: 580px !important
}

#schedulePickerModal .schedule-arrow-btn {
  border: 2px solid #082765 !important;
  background: linear-gradient(180deg, #0068d8, #004eaa) !important;
  color: white !important;
  border-radius: 12px !important;
  box-shadow: 0 5px 12px rgba(0, 80, 170, .18) !important
}

#schedulePickerModal .popup-modal-header {
  padding: 12px 18px !important
}

#schedulePickerModal .popup-modal-title {
  font-size: 24px !important;
  gap: 12px !important
}

#schedulePickerModal .home-widget-title-icon {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important
}

#schedulePickerModal .home-widget-title-icon svg {
  width: 20px !important;
  height: 20px !important
}

#schedulePickerModal .schedule-calendar-grid {
  grid-template-columns: repeat(7, 70px);
  gap: 6px
}

#schedulePickerModal .schedule-day-name {
  padding: 7px 4px;
  font-size: 13px;
  border-radius: 8px
}

#schedulePickerModal .schedule-day {
  min-height: 54px;
  height: 54px;
  padding: 8px;
  border-radius: 10px;
  font-size: 15px
}

#schedulePickerModal .schedule-info {
  margin: 8px 0;
  padding: 9px 12px;
  font-size: 13px;
  border-radius: 10px;
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  overflow: hidden;
  display: flex;
  align-items: center;
  line-height: 1.25
}

#schedulePickerModal .modal-actions {
  margin-top: 10px;
  gap: 8px
}

#schedulePickerModal .modal-actions button,
#schedulePickerModal #clearScheduleBtn,
#schedulePickerModal #confirmScheduleBtn {
  padding: 10px 14px !important;
  font-size: 14px !important;
  border-radius: 9px !important
}

#schedulePickerModal #prevScheduleMonthBtn,
#schedulePickerModal #nextScheduleMonthBtn {
  border-radius: 9px !important
}

#schedulePickerModal #scheduleMonthTitle {
  font-size: 18px !important;
  white-space: nowrap
}

#schedulePickerModal .popup-modal-body>div:first-child {
  gap: 12px !important;
  margin-bottom: 10px !important;
  width: 100%;
  display: grid !important;
  grid-template-columns: 46px 1fr 46px !important;
  align-items: center !important
}

#schedulePickerModal #prevScheduleMonthBtn,
#schedulePickerModal #nextScheduleMonthBtn {
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  height: 46px !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  text-align: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  font-size: 34px !important;
  font-weight: 900 !important;
  overflow: hidden !important;
  word-break: normal !important
}

#schedulePickerModal #scheduleCalendarContainer {
  width: 526px !important;
  min-width: 526px !important;
  max-width: 526px !important
}

#machinesPage .modal-popup-style {
  width: 1100px !important;
  min-width: 1100px !important;
  max-width: calc(100vw - 32px) !important;
  height: 92vh !important;
  max-height: 92vh !important;
  overflow: auto !important
}

#machinesPage .popup-modal-body {
  width: 100% !important;
  max-width: 100% !important;
  min-height: calc(92vh - 82px) !important;
  overflow: auto !important
}

#machineDetailModal .modal-popup-style {
  width: 980px !important;
  min-width: 980px !important;
  max-width: calc(100vw - 32px) !important;
  height: 88vh !important;
  max-height: 88vh !important;
  overflow: hidden !important
}

#machineDetailModal .popup-modal-body {
  width: 100% !important;
  max-width: 100% !important;
  height: calc(88vh - 82px) !important;
  max-height: calc(88vh - 82px) !important;
  overflow: hidden !important;
  padding: 14px 20px 20px !important
}

#machineDetailModal #machineDetailContent {
  height: 100% !important;
  max-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  overflow: hidden !important
}

#machineDetailModal .machine-detail-path {
  flex: 0 0 auto !important
}

#machineDetailModal .machine-folder-tabs {
  flex: 0 0 auto !important
}

#machineDetailModal .machine-folder-content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: auto !important;
  min-width: 0 !important;
  padding: 10px !important;
  border-radius: 12px !important
}

#machineDetailModal .machine-folder-content table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important
}

#machineDetailModal .machine-folder-content th,
#machineDetailModal .machine-folder-content td {
  padding: 7px 6px !important;
  font-size: 12px !important;
  white-space: normal !important;
  word-break: break-word !important
}

#machineDetailModal .machine-costs-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
  gap: 8px !important
}

#machineDetailModal .machine-costs-summary {
  justify-content: center !important;
  margin: 0 auto 14px auto !important;
  gap: 8px !important
}

#machineDetailModal .machine-cost-card {
  padding: 9px !important;
  border-radius: 10px !important
}

#machineDetailModal .machine-cost-label {
  font-size: 11px !important;
  margin-bottom: 6px !important
}

#machineDetailModal .machine-cost-number {
  font-size: 20px !important
}

#machineDetailModal .machine-detail-path {
  padding: 9px 11px !important;
  margin-bottom: 10px !important;
  font-size: 12px !important;
  border-radius: 11px !important
}

#machineDetailModal .machine-folder-tabs {
  gap: 6px !important;
  margin-bottom: 10px !important
}

#machineDetailModal .machine-folder-tab {
  padding: 8px 11px !important;
  font-size: 12px !important;
  border-radius: 9px !important
}

#ticketsPopupPage .modal-popup-style {
  width: max-content !important
}

#usersPage .modal-popup-style {
  width: 980px !important;
  min-width: 980px !important;
  max-width: calc(100vw - 32px) !important;
  overflow: auto !important
}

#usersPage .popup-modal-body {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding: 0 22px 22px !important
}

#usersPage #userForm {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  padding: 20px 22px 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  background: #f8fbff !important;
  border-bottom: 1px solid #dbe3ee !important;
  align-items: end !important
}

#usersPage .user-create-wrapper {
  background: #f8fbff !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  padding: 18px !important;
  margin: 18px 22px 18px !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08) !important;
  overflow: hidden !important
}

#usersPage .user-create-wrapper #userForm {
  border-bottom: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin-top: 4px !important
}

#usersPage .user-create-wrapper.collapsed #userForm {
  display: none !important
}

#usersPage .user-create-wrapper.collapsed .user-create-toggle::before {
  content: '▾'
}

#usersPage .user-create-wrapper:not(.collapsed) .user-create-toggle::before {
  content: '▴'
}

#usersPage #userForm .user-field {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important
}

#usersPage #userForm label {
  margin: 0 0 5px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #082765 !important;
  text-transform: uppercase !important;
  letter-spacing: .25px !important
}

#usersPage #userForm input,
#usersPage #userForm select {
  height: 42px !important;
  padding: 8px 10px !important;
  margin: 0 !important;
  font-size: 13px !important;
  border-radius: 10px !important;
  border: 1px solid #c8d4e5 !important;
  background: white !important
}

#usersPage #customPermissionsUtente {
  grid-column: 1/-1 !important;
  margin-top: 0 !important;
  padding: 12px !important;
  border-radius: 12px !important
}

#usersPage .user-form-actions {
  grid-column: 3 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin: 0 !important;
  align-self: end !important
}

#usersPage .user-form-actions button {
  width: 100% !important;
  height: 42px !important;
  padding: 8px 12px !important;
  font-size: 13px !important;
  border-radius: 10px !important
}

.users-page-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0 10px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important
}

.users-page-list-title h2 {
  margin: 0;
  color: #12367a;
  font-size: 20px;
  font-weight: 900 !important
}

.users-role-table {
  min-width: 0 !important
}

.users-role-table th,
.users-role-table td {
  padding: 6px 7px !important;
  font-size: 12px !important
}

.users-role-table th {
  font-size: 11px !important
}

.users-role-section {
  padding: 6px !important;
  margin-top: 6px !important
}

.users-role-title {
  margin-bottom: 5px !important;
  padding: 6px 8px !important
}

.users-role-table .user-custom-permission-btn {
  width: 27px !important;
  height: 25px !important;
  border-radius: 7px !important;
  padding: 3px !important
}

.users-role-table .user-custom-permission-btn svg {
  width: 14px !important;
  height: 14px !important
}

.users-role-table .user-custom-permissions-grid {
  gap: 4px !important
}

.users-role-actions button {
  width: 32px !important;
  height: 28px !important;
  min-width: 32px !important;
  padding: 4px 6px !important
}

.users-role-actions .trash-icon,
.users-role-actions .edit-icon {
  width: 17px !important;
  height: 17px !important
}

.user-form-actions {
  align-self: end !important;
  margin-top: 0 !important
}

.user-form-actions button {
  height: 40px !important;
  padding: 8px 12px !important;
  font-size: 13px !important
}

#fileViewerModal {
  z-index: 12000 !important
}

#fileViewerModal .modal-popup-style {
  width: min(1000px, calc(100vw)) !important;
  height: calc(100vh) !important
}

#deleteTicketModal .modal-popup-style,
#closeModal .modal-popup-style {
  width: max-content !important
}

body.dark-mode #closeModal .popup-modal-body,
body.dark-mode #closeModal .popup-modal-body p,
body.dark-mode #closeModal .popup-modal-body label,
body.dark-mode #closeModal .popup-modal-body span {
  background: #111827 !important;
  color: #e5e7eb !important
}

@media(max-width:768px) {
  #closeModal.modal-backdrop {
    padding: 0 !important;
    align-items: stretch !important;
  }

  #closeModal .modal-popup-style {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
}

.modal-popup-style .popup-close-btn {
  margin-left: auto
}

.modal-popup-style section.card {
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important
}

.modal-popup-style form {
  padding: 18px 26px 26px
}

.modal-popup-style>h2:first-child {
  display: none
}

.ticket-modal {
  width: 1120px !important;
  min-width: 1120px !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: auto;
  padding: 0 !important
}

.ticket-modal .popup-modal-body {
  padding: 12px 18px 18px
}

.ticket-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 12px;
  width: 100%;
}

.ticket-form-grid label {
  margin-top: 0;
  font-size: 12px
}

.ticket-form-grid input,
.ticket-form-grid select,
.ticket-form-grid textarea {
  padding: 9px 10px;
  margin-top: 4px;
  font-size: 13px;
  border-radius: 8px
}

.ticket-form-grid button {
  padding: 12px 18px
}

.ticket-form-grid .full-row {
  grid-column: 1/-1
}

#descrizione {
  min-height: 58px;
  max-height: 90px;
  overflow-y: auto;
  resize: vertical
}

.ticket-modal #interventoFile {
  padding: 7px 10px
}

.ticket-modal form button[type="submit"] {
  margin-top: 8px;
  height: 44px !important;
  padding: 10px 18px !important
}

.ticket-modal form button[type="submit"].ticket-update-mode {
  background: linear-gradient(180deg, #facc15, #d97706) !important;
  color: #111827 !important;
  box-shadow: 0 5px 12px rgba(217, 119, 6, .24) !important
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px
}

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

.calendar-day-name {
  text-align: center;
  font-weight: 900;
  color: var(--blue2);
  padding: 7px 4px;
  background: #f4f7fb;
  border-radius: 8px;
  font-size: 13px
}

.calendar-day {
  min-height: 76px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  padding: 6px;
  overflow: visible
}

.calendar-day.empty-day {
  background: #f8fafc
}

.calendar-number {
  font-weight: 900;
  color: var(--blue);
  margin-bottom: 4px;
  font-size: 13px
}

.calendar-ticket {
  font-size: 10px;
  font-weight: 800;
  color: var(--blue2);
  background: #eef4ff;
  border: 1px solid #c8d4e5;
  border-radius: 6px;
  padding: 3px 4px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15
}

.calendar-ticket.calendar-segment {
  position: relative;
  z-index: 5;
  margin-left: -10px;
  margin-right: -10px;
  border-radius: 0;
  border-left: 0;
  border-right: 0
}

.calendar-ticket.calendar-segment.segment-start {
  margin-left: 0;
  margin-right: -10px;
  border-left: 1px solid #c8d4e5;
  border-right: 0;
  border-radius: 6px 0 0 6px
}

.calendar-ticket.calendar-segment.segment-end {
  margin-left: -10px;
  margin-right: 0;
  border-left: 0;
  border-right: 1px solid #c8d4e5;
  border-radius: 0 6px 6px 0
}

.calendar-ticket.calendar-segment.segment-single {
  margin-left: 0;
  margin-right: 0;
  border-left: 1px solid #c8d4e5;
  border-right: 1px solid #c8d4e5;
  border-radius: 6px
}

.calendar-ticket.calendar-segment.segment-hover {
  filter: brightness(.92);
  transform: none
}

.calendar-ticket.calendar-segment.segment-hover::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: #082765;
  z-index: 20
}

.calendar-ticket.calendar-segment.segment-start.segment-hover::before {
  left: 0;
  right: -10px
}

.calendar-ticket.calendar-segment.segment-middle.segment-hover::before {
  left: -10px;
  right: -10px
}

.calendar-ticket.calendar-segment.segment-end.segment-hover::before {
  left: -10px;
  right: 0
}

.calendar-ticket.calendar-segment.segment-single.segment-hover::before {
  left: 0;
  right: 0
}

.calendar-ticket.calendar-segment.segment-middle,
.calendar-ticket.calendar-segment.segment-end {
  color: transparent;
  text-indent: -999px
}

.calendar-ticket.calendar-segment.segment-middle svg,
.calendar-ticket.calendar-segment.segment-end svg {
  display: none
}

.calendar-ticket.calendar-segment.segment-middle::after,
.calendar-ticket.calendar-segment.segment-end::after {
  content: ' ';
}

.calendar-ticket-placeholder {
  visibility: hidden;
  pointer-events: none;
  margin-top: 3px;
  padding: 3px 4px;
  border: 1px solid transparent;
  font-size: 10px;
  line-height: 1.15
}

.calendar-ticket.transfer-ticket {
  background: #ecfdf5;
  border-color: #10b981;
  color: #047857
}

.calendar-ticket.transfer-ticket.segment-start {
  border-left-color: #10b981
}

.calendar-ticket.transfer-ticket.segment-end {
  border-right-color: #10b981
}

.calendar-ticket.transfer-ticket.segment-single {
  border-left-color: #10b981;
  border-right-color: #10b981
}

.calendar-ticket.fat-ticket {
  background: #fff7ed;
  border-color: #f97316;
  color: #c2410c
}

.calendar-filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px
}

.calendar-filter-box label {
  margin: 0;
  color: #082765;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap
}

.calendar-filter-box select {
  width: 170px;
  height: 38px;
  margin: 0;
  border-radius: 10px;
  font-weight: 900;
  color: #082765;
  padding: 0 10px
}

.calendar-transfer-icon {
  width: 12px;
  height: 12px;
  stroke: #082765;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
  margin-right: 3px;
  display: inline-block
}

.calendar-transfer-label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 900
}

.calendar-remote-icon {
  width: 12px;
  height: 12px;
  stroke: #082765;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
  margin-right: 3px;
  display: inline-block
}

.calendar-ticket {
  cursor: pointer
}

.calendar-ticket:hover {
  filter: brightness(.96);
  transform: translateY(-1px)
}

.calendar-tech-list {
  display: grid;
  gap: 10px;
  margin-top: 14px
}

.calendar-tech-item {
  padding: 12px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fbff;
  color: #12367a;
  font-weight: 900;
  text-align: center
}

.schedule-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px
}

.schedule-day-name {
  text-align: center;
  font-weight: 900;
  color: var(--blue2);
  padding: 10px;
  background: #f4f7fb;
  border-radius: 10px
}

.schedule-day {
  min-height: 74px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  padding: 10px;
  font-weight: 900;
  color: #082765;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start
}

.schedule-day:hover {
  background: #eef4ff;
  border-color: #12367a
}

.schedule-day.empty-day {
  background: #f8fafc;
  cursor: default
}

.schedule-day.selected-start,
.schedule-day.selected-end {
  background: #082765;
  color: white;
  border-color: #082765
}

.schedule-day.in-range {
  background: #dbeafe;
  border-color: #93c5fd
}

.schedule-info {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fbff;
  color: #12367a;
  font-weight: 800
}

.schedule-action-btn {
  height: 52px;
  margin-top: 17px !important;
  width: 100% !important
}

.schedule-row {
  grid-column: 1/-1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px 12px;
  align-items: end
}

.ticket-modal .schedule-row {
  grid-column: 1/-1;
  grid-template-columns: repeat(3, 1fr)
}

.ticket-modal .schedule-action-btn {
  height: 42px !important;
  margin-top: 16px !important;
  padding: 9px 12px !important;
  font-size: 13px !important
}

.schedule-readonly {
  background: #f8fbff !important;
  color: #12367a !important;
  font-weight: 800;
  cursor: default;
  pointer-events: none
}

.activity-fat-picker .schedule-readonly {
  cursor: pointer !important;
  pointer-events: auto !important
}

.schedule-readonly::placeholder {
  color: #64748b
}

.activity-board {
  display: block
}

.activity-form-box {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08)
}

.activity-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px 0;
  color: #082765;
  cursor: pointer;
  user-select: none;
  padding-bottom: 12px;
  border-bottom: 1px solid #dbe3ee
}

.activity-form-header h2 {
  margin: 0;
  color: #082765
}

.activity-form-title-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px
}

.activity-create-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto
}

.activity-create-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round
}

.activity-create-icon svg rect,
.activity-create-icon svg path {
  stroke: white
}

.activity-form-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #eef4ff;
  border: 1px solid #c8d4e5;
  color: #082765;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center
}

.activity-form-body {
  margin-top: 4px
}

.activity-form-box.collapsed .activity-form-body {
  display: none
}

.activity-form-box.collapsed .activity-form-toggle::before {
  content: '▾'
}

.activity-form-box:not(.collapsed) .activity-form-toggle::before {
  content: '▴'
}

.activity-grid-form {
  display: grid;
  grid-template-columns: minmax(260px, .85fr) 210px 240px;
  gap: 16px 18px;
  align-items: start
}

.activity-form-field {
  min-width: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px
}

.activity-fat-picker {
  display: block
}

.activity-fat-picker input {
  margin-top: 5px;
  cursor: pointer;
  pointer-events: auto !important;
  font-size: 14px;
  padding: 11px 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  min-width: 210px
}

.activity-fat-btn {
  display: none !important
}

.activity-form-field label {
  margin-top: 0
}

.activity-users-field {
  grid-column: 1/-1;
  grid-row: auto;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 2px solid #dbe3ee
}

.activity-users-field label {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #082765;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 10px
}

.activity-form-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #dbe3ee;
  padding-top: 14px
}

.activity-cancel-edit-btn {
  display: none;
  width: auto !important;
  min-width: 130px;
  height: 48px !important;
  margin-top: 0 !important;
  padding: 12px 20px !important;
  border-radius: 12px !important;
  white-space: nowrap;
  background: #64748b !important
}

.activity-cancel-edit-btn.visible {
  display: inline-flex !important;
  align-items: center;
  justify-content: center
}

.activity-form-submit {
  width: auto !important;
  min-width: 180px;
  height: 48px !important;
  margin-top: 0 !important;
  padding: 12px 20px !important;
  border-radius: 12px !important;
  white-space: nowrap
}

.activity-form-submit.editing-submit {
  background: linear-gradient(180deg, #facc15, #d97706) !important;
  color: #111827 !important;
  box-shadow: 0 5px 12px rgba(217, 119, 6, .24) !important
}

.activity-list {
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 6px
}

.activity-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  border: none;
  background: transparent;
  table-layout: fixed
}

.activity-table th {
  background: #f4f7fb;
  color: #082765;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 12px 10px
}

.activity-table td {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 12px 10px;
  font-size: 14px
}

.activity-table th:nth-child(1),
.activity-table td:nth-child(1) {
  width: 16%;
  text-align: left
}

.activity-table th:nth-child(2),
.activity-table td:nth-child(2) {
  width: 14%
}

.activity-table th:nth-child(3),
.activity-table td:nth-child(3) {
  width: 14%
}

.activity-table th:nth-child(4),
.activity-table td:nth-child(4) {
  width: 42%
}

.activity-table th:nth-child(5),
.activity-table td:nth-child(5) {
  width: 14%
}

.activity-table td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 14px 0 0 14px;
  font-weight: 900;
  color: #082765
}

.activity-table td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 14px 14px 0
}

.activity-table tbody tr {
  box-shadow: 0 4px 14px rgba(15, 23, 42, .07)
}

.activity-machine-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0
}

.activity-machine-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.activity-assigned-users-box {
  margin-top: 5px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 10px;
  background: white;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: 220px;
  overflow-y: auto;
  align-items: start
}

.activity-assigned-users-box .assigned-role-group {
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06)
}

.activity-assigned-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center
}

.activity-assigned-chip {
  background: #f8fbff;
  color: #12367a;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900
}

.activity-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px
}

.activity-actions button {
  margin: 0;
  background: white !important;
  box-shadow: none;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 38px;
  min-width: 42px;
  font-size: 0 !important
}

.activity-actions button[data-action="edit-activity"] {
  border: 2px solid #0057c8
}

.activity-actions button[data-action="edit-activity"].editing-activity-button {
  border: 2px solid #9ca3af !important;
  background: #f3f4f6 !important
}

.activity-actions button[data-action="edit-activity"].editing-activity-button .edit-icon,
.activity-actions button[data-action="edit-activity"].editing-activity-button .edit-icon path {
  stroke: #9ca3af !important
}

.activity-actions button[data-action="delete-activity"] {
  border: 2px solid red
}

.activity-empty-cell {
  color: #64748b;
  font-weight: 800
}

.activity-table-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap
}

.activity-table-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px
}

.activity-table-title {
  margin: 0;
  color: #082765;
  font-size: 20px;
  font-weight: 900
}

.activity-sort-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 12px;
  min-width: 360px
}

.activity-sort-box label {
  margin: 0;
  color: #082765;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap
}

.activity-sort-box select {
  width: 240px;
  min-width: 240px;
  height: 42px;
  margin: 0;
  border-radius: 10px;
  font-weight: 900;
  color: #082765;
  padding: 0 34px 0 12px;
  white-space: nowrap
}

.activity-count-badge {
  background: #082765;
  color: white;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 900
}

@media(max-width:900px) {
  .activity-grid-form {
    grid-template-columns: 1fr
  }

  .activity-users-field {
    grid-column: auto;
    grid-row: auto
  }

  .activity-form-actions {
    justify-content: stretch
  }

  .activity-form-submit {
    width: 100% !important
  }

  .activity-assigned-users-box {
    grid-template-columns: 1fr
  }

  .activity-table {
    table-layout: auto
  }
}

@media(max-width:900px) {
  .schedule-row {
    grid-template-columns: 1fr
  }
}

@media(max-width:900px) {
  .topbar {
    flex-direction: column
  }

  .filters {
    grid-template-columns: 1fr
  }

  table {
    display: block;
    overflow-x: auto
  }

  .modal-popup-style {
    width: calc(100vw - 24px) !important;
    min-width: 0 !important
  }

  .modal-popup-style .popup-modal-body {
    width: 100%
  }

  .ticket-modal {
    width: calc(100vw - 24px) !important;
    min-width: 0
  }

  .ticket-form-grid {
    grid-template-columns: 1fr;
    width: 100%
  }

  .ticket-modal .schedule-row {
    grid-template-columns: 1fr
  }

  .assigned-users-box {
    grid-template-columns: 1fr;
    max-height: 220px
  }
}

.fixed-transfers-widget:empty {
  display: none
}

.fixed-transfers-widget {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
  overflow: hidden;
  margin: 12px 0 26px
}

.fixed-transfers-header {
  width: 100%;
  margin: 0 !important;
  background: #f8fbff !important;
  color: #082765 !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  text-align: left !important;
  cursor: pointer;
  user-select: none
}

.fixed-transfers-header:hover {
  background: #eef4ff !important
}

.fixed-transfers-title {
  margin: 0;
  color: #082765;
  font-size: 19px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1.15
}

.fixed-transfers-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 6px 16px rgba(11, 42, 99, .28)
}

.fixed-transfers-icon svg {
  width: 23px;
  height: 23px;
  stroke: white;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round
}

.fixed-transfers-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto
}

.fixed-transfers-count {
  background: #082765;
  color: white;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap
}

.fixed-transfers-toggle {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  color: #082765 !important;
  box-shadow: none !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  pointer-events: none
}

.fixed-transfers-toggle-icon {
  font-size: 18px;
  font-weight: 900;
  line-height: 1
}

.fixed-transfers-widget.collapsed .fixed-transfers-body {
  display: none
}

.fixed-transfers-body {
  padding: 14px 16px;
  overflow-x: auto
}

.fixed-transfers-list {
  display: grid;
  gap: 10px
}

.fixed-transfer-columns {
  display: grid;
  grid-template-columns: 1.05fr .8fr .45fr 1.25fr .7fr .85fr .55fr;
  gap: 10px;
  align-items: center;
  min-width: 1240px;
  background: #f4f7fb;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 10px 14px;
  color: #082765;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .25px;
  text-align: center
}

.fixed-transfer-columns span:first-child {
  text-align: left
}

.fixed-transfer-row {
  display: grid;
  grid-template-columns: 1.05fr .8fr .45fr 1.25fr .7fr .85fr .55fr;
  gap: 10px;
  align-items: start;
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 12px 14px;
  color: #12367a;
  font-weight: 900;
  min-width: 1240px
}

.fixed-transfer-columns span:not(:first-child),
.fixed-transfer-row>div:not(:first-child) {
  border-left: 1px solid #dbe3ee;
  padding-left: 12px
}

.fixed-transfer-columns span,
.fixed-transfer-row>div {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center
}

.fixed-transfer-row .fixed-transfer-main,
.fixed-transfer-row .fixed-transfer-description {
  align-items: flex-start;
  justify-content: flex-start
}

.fixed-transfer-row .fixed-transfer-main {
  display: flex;
  flex-direction: column
}

body.dark-mode .fixed-transfer-columns span:not(:first-child),
body.dark-mode .fixed-transfer-row>div:not(:first-child) {
  border-left-color: #374151 !important
}

.fixed-transfer-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  text-align: left
}

.fixed-transfer-client {
  color: #082765;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.fixed-transfer-machine {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.fixed-transfer-date,
.fixed-transfer-days {
  font-size: 13px;
  text-align: center;
  color: #12367a
}

.fixed-transfer-description {
  font-size: 13px;
  line-height: 1.35;
  color: #12367a;
  font-weight: 800;
  white-space: normal;
  word-break: break-word;
  text-align: left
}

.fixed-transfer-description.description-cell {
  max-height: 4.05em;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  position: relative
}

.fixed-transfer-description.description-cell.expanded {
  max-height: none
}

.fixed-transfer-description.description-cell.show-dots:not(.expanded):after {
  background: #f8fbff
}

.fixed-transfer-description.description-cell:hover {
  text-decoration: underline
}

body.dark-mode .fixed-transfer-description.description-cell.show-dots:not(.expanded):after {
  background: #0f172a !important;
  color: #ffffff !important
}

.fixed-transfer-actions,
.fixed-transfer-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center
}

.transfer-action-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px
}

.transfer-action-buttons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.transfer-action-icon-btn {
  width: 38px !important;
  height: 36px !important;
  min-width: 38px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 10px !important;
  background: white !important;
  border: 2px solid #082765 !important;
  color: #082765 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
  line-height: 1 !important
}

.transfer-action-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: #082765;
  fill: none;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round
}

.transfer-action-icon-btn:hover {
  background: #eef4ff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(8, 39, 101, .16) !important
}

.transfer-action-icon-btn.transfer-delivery-disabled,
.transfer-action-icon-btn:disabled {
  opacity: .38 !important;
  cursor: not-allowed !important;
  filter: grayscale(.35) !important;
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #64748b !important;
  transform: none !important;
  box-shadow: none !important
}

.transfer-action-icon-btn.transfer-delivery-disabled svg,
.transfer-action-icon-btn:disabled svg {
  stroke: #64748b !important
}

.transfer-action-icon-btn.transfer-delivery-disabled:hover,
.transfer-action-icon-btn:disabled:hover {
  background: #f1f5f9 !important;
  transform: none !important;
  box-shadow: none !important
}

.transfer-hours-value {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: #64748b;
  text-align: center
}

.fixed-transfer-no-attachments {
  font-size: 12px;
  color: #64748b;
  font-weight: 900;
  text-align: center
}

.fixed-transfer-empty {
  padding: 18px;
  text-align: center;
  color: #64748b;
  font-weight: 900;
  background: #f8fbff;
  border: 1px dashed #c8d4e5;
  border-radius: 14px
}

body.dark-mode .fixed-transfers-widget {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .fixed-transfers-header {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .fixed-transfers-header {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .fixed-transfers-header:hover {
  background: #1e3a8a !important
}

body.dark-mode .fixed-transfers-toggle {
  background: transparent !important;
  color: #ffffff !important;
  border: none !important
}

body.dark-mode .fixed-transfers-icon svg {
  stroke: white !important
}

body.dark-mode .fixed-transfers-title {
  color: #dbeafe !important
}

body.dark-mode .fixed-transfer-row,
body.dark-mode .fixed-transfer-empty {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important
}

body.dark-mode .fixed-transfer-columns {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #dbeafe !important
}

body.dark-mode .fixed-transfers-title,
body.dark-mode .fixed-transfer-columns,
body.dark-mode .fixed-transfer-columns span,
body.dark-mode .fixed-transfer-row,
body.dark-mode .fixed-transfer-row>div,
body.dark-mode .fixed-transfer-client,
body.dark-mode .fixed-transfer-machine,
body.dark-mode .fixed-transfer-date,
body.dark-mode .fixed-transfer-days,
body.dark-mode .fixed-transfer-description,
body.dark-mode .fixed-transfer-actions,
body.dark-mode .transfer-hours-value,
body.dark-mode .fixed-transfer-no-attachments {
  color: #ffffff !important
}

body.dark-mode .transfer-action-icon-btn {
  background: #0f172a !important;
  border-color: #60a5fa !important;
  color: #60a5fa !important
}

body.dark-mode .transfer-action-icon-btn svg {
  stroke: #60a5fa !important
}

body.dark-mode .transfer-action-icon-btn:hover {
  background: #1e3a8a !important
}

body.dark-mode .transfer-action-icon-btn {
  background: #020617 !important;
  border-color: #60a5fa !important;
  color: #ffffff !important
}

body.dark-mode .transfer-action-icon-btn:hover {
  background: #1e3a8a !important
}

body.dark-mode .transfer-action-icon-btn.transfer-delivery-disabled,
body.dark-mode .transfer-action-icon-btn:disabled {
  background: #020617 !important;
  border-color: #4b5563 !important;
  color: #64748b !important;
  opacity: .35 !important
}

body.dark-mode .transfer-action-icon-btn.transfer-delivery-disabled svg,
body.dark-mode .transfer-action-icon-btn:disabled svg {
  stroke: #64748b !important
}

body.dark-mode .transfer-action-icon-btn.transfer-delivery-disabled:hover,
body.dark-mode .transfer-action-icon-btn:disabled:hover {
  background: #020617 !important;
  transform: none !important;
  box-shadow: none !important
}

body.dark-mode .transfer-hours-value {
  color: #dbeafe !important
}

.fixed-transfer-delivery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px
}

.fixed-transfer-delivery .transfer-action-icon-btn {
  border-color: #16a34a !important;
  color: #16a34a !important
}

.fixed-transfer-delivery .transfer-action-icon-btn svg {
  stroke: #16a34a !important
}

.fixed-transfer-delivery .transfer-delivery-disabled {
  border-color: #94a3b8 !important;
  color: #94a3b8 !important;
  opacity: .55 !important
}

.fixed-transfer-delivery .transfer-delivery-disabled svg {
  stroke: #94a3b8 !important
}

body.dark-mode .fixed-transfer-delivery .transfer-action-icon-btn {
  border-color: #34d399 !important;
  color: #34d399 !important
}

body.dark-mode .fixed-transfer-delivery .transfer-action-icon-btn svg {
  stroke: #34d399 !important
}

body.dark-mode .fixed-transfer-delivery .transfer-delivery-disabled {
  border-color: #64748b !important;
  color: #94a3b8 !important
}

body.dark-mode .fixed-transfer-delivery .transfer-delivery-disabled svg {
  stroke: #94a3b8 !important
}

@media(max-width:900px) {
  .fixed-transfers-widget {
    margin: 10px 0 22px
  }

  .fixed-transfers-title {
    font-size: 20px
  }

  .fixed-transfers-header {
    align-items: flex-start;
    flex-direction: column
  }

  .fixed-transfers-header-actions {
    width: 100%;
    justify-content: space-between;
    margin-left: 0
  }

  .fixed-transfer-row,
  .fixed-transfer-columns {
    min-width: 1040px;
    grid-template-columns: 1fr .8fr .45fr 1.15fr .7fr .85fr .55fr
  }
}

/* Fix dark mode: rimuove il contorno/sfondo bianco dal titolo Elenco Assistenze */
body.dark-mode #ticketsHomeSection,
body.dark-mode #ticketsHomeSection .tickets-list-header,
body.dark-mode #ticketsPopupPage section.card,
body.dark-mode #ticketsPopupPage .tickets-list-header {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode #ticketsHomeSection .section-title.marked-title,
body.dark-mode #ticketsPopupPage .section-title.marked-title {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: #dbeafe !important;
}

body.dark-mode #ticketsHomeSection .title-icon,
body.dark-mode #ticketsPopupPage .title-icon,
body.dark-mode #ticketsPopupPage .home-widget-title-icon {
  background: #082765 !important;
  border: none !important;
  outline: none !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28) !important;
}

body.dark-mode #ticketsHomeSection .title-icon svg,
body.dark-mode #ticketsPopupPage .title-icon svg,
body.dark-mode #ticketsPopupPage .home-widget-title-icon svg {
  filter: none !important;
}

.transfer-hours-popup {
  width: 1180px !important;
  min-width: 1180px !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100vh - 32px) !important
}

.transfer-hours-popup-body {
  width: 100% !important;
  max-width: 100% !important;
  overflow: auto !important
}

.transfer-hours-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: white
}

.transfer-hours-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  margin: 0 !important;
  border: none !important;
  table-layout: fixed
}

.transfer-hours-table th,
.transfer-hours-table td {
  border: 1px solid #cbd5e1 !important;
  padding: 6px 5px !important;
  font-size: 12px !important;
  text-align: center !important;
  vertical-align: middle !important
}

.transfer-hours-table th {
  background: #374151 !important;
  color: white !important;
  font-weight: 900 !important
}

.transfer-hours-table .transfer-hours-groups th {
  background: #1f2937 !important;
  color: white !important
}

.transfer-hours-table td {
  background: #f8fbff !important
}

.transfer-hours-table input,
.transfer-hours-table select {
  height: 30px !important;
  margin: 0 !important;
  padding: 4px 5px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-align: center !important;
  width: 100% !important;
  background: white !important
}

.transfer-hours-table input[type="time"] {
  padding: 2px !important
}

.transfer-hours-day-cell {
  font-weight: 900 !important;
  color: #082765 !important;
  background: #eef4ff !important;
  white-space: nowrap
}

.transfer-hours-total-box {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #f8fbff;
  color: #082765;
  font-weight: 900;
  text-align: right
}

.transfer-hours-total-box strong {
  font-size: 18px
}

.transfer-hours-location-input {
  min-width: 90px
}

.transfer-hours-auto-input {
  min-width: 54px
}

.transfer-hours-time-input {
  min-width: 74px
}

@media(max-width:900px) {
  .transfer-hours-popup {
    width: calc(100vw - 24px) !important;
    min-width: 0 !important
  }

  .transfer-hours-popup-body {
    padding: 12px !important
  }

  .transfer-hours-table {
    min-width: 1080px
  }
}

body.dark-mode .transfer-hours-table-wrap,
body.dark-mode .transfer-hours-total-box {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #ffffff !important
}

body.dark-mode .transfer-hours-table th {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
  color: #ffffff !important
}

body.dark-mode .transfer-hours-table .transfer-hours-groups th {
  background: #020617 !important;
  color: #dbeafe !important
}

body.dark-mode .transfer-hours-table td,
body.dark-mode .transfer-hours-table input,
body.dark-mode .transfer-hours-table select {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #ffffff !important
}

body.dark-mode .transfer-hours-day-cell {
  background: #1e3a8a !important;
  color: #ffffff !important
}

.transfer-hours-invalid-time {
  border-color: #dc2626 !important;
  background: #fee2e2 !important;
  color: #7f1d1d !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .14) !important
}

body.dark-mode .transfer-hours-invalid-time {
  border-color: #f87171 !important;
  background: #450a0a !important;
  color: #fecaca !important
}

/* Spaziatura popup Ore trasferta: evita che il campo Da tocchi la colonna seguente */
.transfer-hours-table {
  min-width: 1180px !important;
}

.transfer-hours-table th:nth-child(1),
.transfer-hours-table td:nth-child(1) {
  width: 84px !important;
  min-width: 84px !important;
  max-width: 84px !important;
}

.transfer-hours-table th:nth-child(2),
.transfer-hours-table td:nth-child(2),
.transfer-hours-table th:nth-child(10),
.transfer-hours-table td:nth-child(10) {
  width: 150px !important;
  min-width: 150px !important;
}

.transfer-hours-table th:nth-child(3),
.transfer-hours-table td:nth-child(3),
.transfer-hours-table th:nth-child(4),
.transfer-hours-table td:nth-child(4),
.transfer-hours-table th:nth-child(6),
.transfer-hours-table td:nth-child(6),
.transfer-hours-table th:nth-child(7),
.transfer-hours-table td:nth-child(7),
.transfer-hours-table th:nth-child(8),
.transfer-hours-table td:nth-child(8),
.transfer-hours-table th:nth-child(9),
.transfer-hours-table td:nth-child(9),
.transfer-hours-table th:nth-child(11),
.transfer-hours-table td:nth-child(11),
.transfer-hours-table th:nth-child(12),
.transfer-hours-table td:nth-child(12) {
  width: 82px !important;
  min-width: 82px !important;
}

.transfer-hours-table th:nth-child(5),
.transfer-hours-table td:nth-child(5),
.transfer-hours-table th:nth-child(13),
.transfer-hours-table td:nth-child(13) {
  width: 70px !important;
  min-width: 70px !important;
}

.transfer-hours-table td {
  padding: 7px 8px !important;
}

.transfer-hours-table input.transfer-hours-location-input {
  width: calc(100% - 4px) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  display: block !important;
}

.transfer-hours-table select.transfer-hours-time-input,
.transfer-hours-table select.transfer-hours-auto-input {
  width: calc(100% - 2px) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  display: block !important;
}

@media(max-width:900px) {
  .transfer-hours-table {
    min-width: 1180px !important;
  }
}

/* Ritocco popup Ore trasferta: colonne orari leggermente piu strette */
.transfer-hours-table {
  table-layout: auto !important;
  min-width: 1120px !important;
  width: 1120px !important;
}

.transfer-hours-table th:nth-child(1),
.transfer-hours-table td:nth-child(1) {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
}

.transfer-hours-table th:nth-child(2),
.transfer-hours-table td:nth-child(2),
.transfer-hours-table th:nth-child(10),
.transfer-hours-table td:nth-child(10) {
  width: 118px !important;
  min-width: 118px !important;
  max-width: 118px !important;
}

.transfer-hours-table th:nth-child(3),
.transfer-hours-table td:nth-child(3),
.transfer-hours-table th:nth-child(4),
.transfer-hours-table td:nth-child(4),
.transfer-hours-table th:nth-child(6),
.transfer-hours-table td:nth-child(6),
.transfer-hours-table th:nth-child(7),
.transfer-hours-table td:nth-child(7),
.transfer-hours-table th:nth-child(8),
.transfer-hours-table td:nth-child(8),
.transfer-hours-table th:nth-child(9),
.transfer-hours-table td:nth-child(9),
.transfer-hours-table th:nth-child(11),
.transfer-hours-table td:nth-child(11),
.transfer-hours-table th:nth-child(12),
.transfer-hours-table td:nth-child(12) {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
}

.transfer-hours-table th:nth-child(5),
.transfer-hours-table td:nth-child(5),
.transfer-hours-table th:nth-child(13),
.transfer-hours-table td:nth-child(13) {
  width: 68px !important;
  min-width: 68px !important;
  max-width: 68px !important;
}

.transfer-hours-table select.transfer-hours-time-input {
  padding-left: 3px !important;
  padding-right: 3px !important;
  font-size: 11.5px !important;
}

.transfer-hours-total-box {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center
}

.transfer-hours-total-box span {
  white-space: nowrap
}

.receipt-files-table th:nth-child(2),
.receipt-files-table td:nth-child(2) {
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  padding-left: 8px !important;
  padding-right: 8px !important
}

.receipt-total-cell {
  text-align: center !important;
  white-space: nowrap !important
}

.receipt-total-input {
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
  margin: 0 !important;
  text-align: center !important;
  font-weight: 900 !important;
  color: #082765 !important;
  padding: 8px 6px !important
}

.transfer-file-delete-btn {
  background: white !important;
  border: 2px solid #dc2626 !important;
  color: #dc2626 !important;
  box-shadow: none !important
}

.transfer-file-delete-btn svg,
.transfer-file-delete-btn svg path,
.transfer-file-delete-btn svg circle,
.transfer-file-delete-btn svg rect {
  stroke: #dc2626 !important
}

body.dark-mode .transfer-file-delete-btn {
  background: #020617 !important;
  border-color: #f87171 !important;
  color: #f87171 !important
}

body.dark-mode .transfer-file-delete-btn svg,
body.dark-mode .transfer-file-delete-btn svg path,
body.dark-mode .transfer-file-delete-btn svg circle,
body.dark-mode .transfer-file-delete-btn svg rect {
  stroke: #f87171 !important
}

body.dark-mode .receipt-total-input {
  color: #e5e7eb !important;
  background: #0f172a !important;
  border-color: #374151 !important
}

.receipt-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 14px;
  width: 100%;
}

.receipt-summary-card {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
}

.receipt-summary-label {
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .35px;
  margin-bottom: 7px;
}

.receipt-summary-value {
  font-size: 24px;
  font-weight: 900;
  color: #082765;
  line-height: 1;
}

body.dark-mode .receipt-summary-card {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

body.dark-mode .receipt-summary-label {
  color: #cbd5e1 !important;
}

body.dark-mode .receipt-summary-value {
  color: #93c5fd !important;
}

.receipt-files-table .machine-file-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap
}

.receipt-action-icon-btn {
  width: 42px !important;
  height: 38px !important;
  min-width: 42px !important;
  margin: 0 !important;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  background: white !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important
}

.receipt-action-icon-btn svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block
}

.receipt-view-btn {
  border: 2px solid #0057c8 !important
}

.receipt-view-btn svg {
  stroke: #0057c8 !important
}

.receipt-delete-btn {
  border: 2px solid red !important
}

.receipt-delete-btn svg {
  stroke: red !important
}

body.dark-mode .receipt-action-icon-btn {
  background: #0f172a !important
}

body.dark-mode .receipt-view-btn {
  border-color: #60a5fa !important
}

body.dark-mode .receipt-view-btn svg {
  stroke: #60a5fa !important
}

body.dark-mode .receipt-delete-btn {
  border-color: #f87171 !important
}

body.dark-mode .receipt-delete-btn svg {
  stroke: #f87171 !important
}

body.dark-mode #receiptCameraVideo {
  background: #020617 !important;
  border-color: #374151 !important
}

body.dark-mode #receiptCameraMessage {
  color: #cbd5e1 !important
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

.fixed-transfers-highlight {
  outline: 3px solid #60a5fa;
  outline-offset: 4px;
  transition: outline .2s ease;
}

/* Pagina Spese/Ore trasferta: trasferte attive degli altri utenti */
.all-active-transfers-modal {
  width: min(1180px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.all-active-transfers-body {
  padding: 18px;
  overflow: auto;
  background: #f8fbff;
}

.all-active-transfers-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.all-active-transfers-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #082765;
  color: white;
  font-weight: 900;
}

.all-active-transfers-list {
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  overflow: hidden;
  background: white;
}

.all-active-transfer-columns,
.all-active-transfer-row {
  display: grid;
  grid-template-columns: 1.25fr 1.1fr 1fr .8fr 1.5fr .8fr;
  gap: 0;
  align-items: stretch;
}

.all-active-transfer-columns span {
  background: #eef4ff;
  color: #082765;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 12px;
  border-right: 1px solid #dbe3ee;
}

.all-active-transfer-columns span:last-child {
  border-right: none;
}

.all-active-transfer-row {
  border-top: 1px solid #e5edf8;
}

.all-active-transfer-row>div {
  padding: 12px;
  border-right: 1px solid #eef2f7;
  min-width: 0;
}

.all-active-transfer-row>div:last-child {
  border-right: none;
}

.all-active-transfer-client {
  font-weight: 900;
  color: #082765;
  margin-bottom: 4px;
}

.all-active-transfer-machine,
.all-active-transfer-date,
.all-active-transfer-users,
.all-active-transfer-status {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
}

.all-active-transfer-description {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.all-active-transfer-users {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.all-active-user-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eaf2ff;
  border: 1px solid #c8d8f5;
  color: #082765;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.all-active-user-chip.user-delivered {
  background: #dcfce7;
  border-color: #86efac;
  color: #15803d;
  font-weight: 900;
}

body.dark-mode .all-active-user-chip.user-delivered {
  background: #064e3b !important;
  border-color: #34d399 !important;
  color: #bbf7d0 !important;
}

.all-active-transfer-status span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 900;
}

.all-active-transfer-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.all-active-transfer-actions button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #c8d8f5;
  background: #eef4ff;
  color: #082765;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.all-active-transfer-actions button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.all-active-transfer-empty {
  padding: 28px;
  text-align: center;
  color: #64748b;
  font-weight: 900;
  background: white;
}

body.dark-mode .all-active-transfers-body {
  background: #020617 !important;
}

body.dark-mode .all-active-transfers-list,
body.dark-mode .all-active-transfer-empty {
  background: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

body.dark-mode .all-active-transfer-columns span {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #dbeafe !important;
}

body.dark-mode .all-active-transfer-row {
  border-color: #374151 !important;
}

body.dark-mode .all-active-transfer-row>div {
  border-color: #374151 !important;
  background: #0f172a !important;
}

body.dark-mode .all-active-transfer-client {
  color: #dbeafe !important;
}

body.dark-mode .all-active-transfer-machine,
body.dark-mode .all-active-transfer-date,
body.dark-mode .all-active-transfer-description,
body.dark-mode .all-active-transfer-users,
body.dark-mode .all-active-transfer-status {
  color: #e5e7eb !important;
}

body.dark-mode .all-active-user-chip {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
  color: white !important;
}

.all-transfer-card {
  border-top: 1px solid #e5edf8;
  background: white;
}

.all-transfer-card:first-child {
  border-top: none;
}

.all-transfer-main {
  display: grid;
  grid-template-columns: 1.25fr 1fr .7fr .55fr;
  gap: 0;
  align-items: stretch;
  cursor: pointer;
}

.all-transfer-main>div {
  padding: 12px;
  border-right: 1px solid #eef2f7;
  min-width: 0;
}

.all-transfer-main>div:last-child {
  border-right: none;
}

.all-transfer-expand-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #c8d8f5;
  background: #eef4ff;
  color: #082765;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease;
}

.all-transfer-card.open .all-transfer-expand-btn {
  transform: rotate(180deg);
}

.all-transfer-users-panel {
  display: none;
  padding: 12px;
  background: #f8fbff;
  border-top: 1px solid #e5edf8;
}

.all-transfer-card.open .all-transfer-users-panel {
  display: grid;
  gap: 10px;
}

.all-transfer-user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: white;
}

.all-transfer-user-name {
  font-weight: 900;
  color: #082765;
  display: flex;
  align-items: center;
  gap: 8px;
}

.all-transfer-user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.all-transfer-user-actions button {
  height: 36px;
  border-radius: 12px;
  border: 1px solid #c8d8f5;
  background: #eef4ff;
  color: #082765;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  cursor: pointer;
  padding: 0 10px;
}

.all-transfer-user-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.all-transfer-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 12px;
  font-weight: 900;
}

.all-transfer-badge.closed {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

body.dark-mode .all-transfer-card,
body.dark-mode .all-transfer-main>div,
body.dark-mode .all-transfer-user-row {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

body.dark-mode .all-transfer-users-panel {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode .all-transfer-user-name {
  color: #dbeafe !important;
}

body.dark-mode .all-transfer-expand-btn,
body.dark-mode .all-transfer-user-actions button {
  background: #1e3a8a !important;
  border-color: #60a5fa !important;
  color: white !important;
}

.all-transfer-section-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.all-transfer-section-header h3 {
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

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

.all-transfer-delete-section-btn {
  height: 34px;
  border-radius: 11px;
  border: 2px solid #dc2626;
  background: white;
  color: #dc2626;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 0 10px;
  cursor: pointer;
}

.all-transfer-delete-section-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.dark-mode .all-transfer-delete-section-btn {
  background: #020617 !important;
  border-color: #f87171 !important;
  color: #f87171 !important;
}

@media(max-width:900px) {
  .all-transfer-main {
    grid-template-columns: 1fr
  }

  .all-transfer-main>div {
    border-right: none;
    border-bottom: 1px solid #eef2f7
  }

  .all-transfer-main>div:last-child {
    border-bottom: none
  }

  .all-transfer-user-row {
    grid-template-columns: 1fr
  }

  .all-transfer-user-actions {
    justify-content: flex-start
  }
}

@media(max-width:900px) {
  .all-active-transfer-columns {
    display: none
  }

  .all-active-transfer-row {
    grid-template-columns: 1fr
  }

  .all-active-transfer-row>div {
    border-right: none;
    border-bottom: 1px solid #eef2f7
  }

  .all-active-transfer-row>div:last-child {
    border-bottom: none
  }

  .all-active-transfer-actions {
    justify-content: flex-start
  }
}

/* Popup Ore/Scontrini sempre sopra alla pagina Spese/Ore trasferta */
#transferHoursModal,
#transferReceiptsModal {
  z-index: 13000 !important;
}

#fileViewerModal {
  z-index: 14000 !important;
}

#deleteReceiptConfirmModal,
#receiptCameraModal {
  z-index: 15000 !important;
}

.home-transfer-expenses-inline {
  display: grid;
  gap: 12px;
}

.home-transfer-expenses-inline .all-active-transfers-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.home-transfer-expenses-inline .all-active-transfer-columns {
  position: sticky;
  top: 0;
  z-index: 2;
}

#transferHoursModal {
  z-index: 10100 !important;
}

#transferReceiptsModal {
  z-index: 10120 !important;
}

#receiptViewerModal,
#fileViewerModal {
  z-index: 10140 !important;
}

.all-transfer-section {
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  margin: 12px 0;
  overflow: hidden;
}

.all-transfer-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 14px;
  background: #f8fbff;
  cursor: pointer;
}

.all-transfer-section-header h3 {
  margin: 0;
  color: #082765;
  font-size: 16px;
}

.all-transfer-section-body {
  padding: 10px;
}

body.dark-mode .all-transfer-section {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode .all-transfer-section-header {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

body.dark-mode .all-transfer-section-header h3 {
  color: #dbeafe !important;
}

/* Fix Spese/Ore: frecce e badge come gli altri menu, senza colonna stato */
.all-transfer-main {
  grid-template-columns: 1.35fr 1fr .25fr !important;
}

.all-transfer-section-header {
  position: relative;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin: 18px 0 10px !important;
  padding: 14px 18px !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
  border: 1px solid var(--border) !important;
  color: #082765 !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  user-select: none !important;
}

.all-transfer-section-header:hover {
  background: #eef4ff !important;
}

.all-transfer-section-header::after {
  content: '▾';
  margin-left: 0;
  font-size: 16px;
  color: #082765;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  order: 3;
}

.all-transfer-section.collapsed .all-transfer-section-header::after {
  content: '▸';
}

.all-transfer-section-header h3 {
  margin: 0 !important;
  color: #082765 !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.all-transfer-section-header .ticket-group-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #082765;
  color: white;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  margin-left: auto;
  order: 2;
  flex: 0 0 auto;
}

.all-transfer-section-header .all-active-transfers-counter,
.all-transfer-section-header .all-transfer-expand-btn {
  display: none !important;
}

.all-transfer-card .all-transfer-expand-btn {
  font-size: 0;
}

.all-transfer-card .all-transfer-expand-btn::before {
  content: '▸';
  font-size: 16px;
  line-height: 1;
}

.all-transfer-card.open .all-transfer-expand-btn {
  transform: none !important;
}

.all-transfer-card.open .all-transfer-expand-btn::before {
  content: '▾';
}

body.dark-mode .all-transfer-section-header {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #dbeafe !important;
}

body.dark-mode .all-transfer-section-header h3,
body.dark-mode .all-transfer-section-header::after {
  color: #dbeafe !important;
}

body.dark-mode .all-transfer-section-header .ticket-group-count {
  background: #1e3a8a !important;
  color: white !important;
  border: 1px solid #60a5fa !important;
}

.transfer-readonly-value {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #dbe3ee;
  background: #f8fbff;
  color: #082765;
  font-weight: 900;
}

.receipt-readonly-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #dbe3ee;
  background: #f8fbff;
  color: #082765;
  font-weight: 900;
  white-space: nowrap;
}

body.dark-mode .transfer-readonly-value,
body.dark-mode .receipt-readonly-total {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

.fixed-transfer-referente {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
  color: #475569;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.activity-machine-client {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  word-break: break-word
}

body.dark-mode .activity-machine-client {
  color: #cbd5e1 !important
}

.machine-year-folder-count,
.machine-model-folder-count {
  background: #ffffff !important;
  color: #082765 !important;
  border: 1px solid #c8d4e5 !important
}

.machine-year-folder-count.open,
.machine-model-folder-count.open {
  background: #dbeafe !important;
  color: #082765 !important;
  border-color: #93c5fd !important
}

body.dark-mode .machine-year-folder-count,
body.dark-mode .machine-model-folder-count {
  background: #111827 !important;
  color: #dbeafe !important;
  border-color: #374151 !important
}

body.dark-mode .machine-year-folder-count.open,
body.dark-mode .machine-model-folder-count.open {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #60a5fa !important
}

/* Stato reale cartelle elenco macchine: chiusa = bianco, aperta = azzurro */
.machine-year-folder-count,
.machine-model-folder-count {
  background: #ffffff !important;
  color: #082765 !important;
  border: 1px solid #c8d4e5 !important;
  box-shadow: none !important;
}

.machine-year-folder-count.open,
.machine-model-folder-count.open {
  background: #dbeafe !important;
  color: #082765 !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, .18) !important;
}

.machine-year-folder-main:hover .machine-year-folder-count:not(.open),
.machine-model-folder-main:hover .machine-model-folder-count:not(.open) {
  background: #ffffff !important;
  color: #082765 !important;
  border-color: #c8d4e5 !important;
}

body.dark-mode .machine-year-folder-count,
body.dark-mode .machine-model-folder-count {
  background: #111827 !important;
  color: #dbeafe !important;
  border-color: #374151 !important;
}

body.dark-mode .machine-year-folder-count.open,
body.dark-mode .machine-model-folder-count.open {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
}

/* Riga cartella elenco macchine: chiusa = bianca, aperta = blu */
.machine-year-folder-main,
.machine-model-folder-main {
  background: #ffffff !important;
  color: #082765 !important;
}

.machine-year-folder-main.open,
.machine-model-folder-main.open {
  background: #dbeafe !important;
  color: #082765 !important;
  border-color: #60a5fa !important;
}

.machine-year-folder-main.open .machine-year-folder-title,
.machine-model-folder-main.open .machine-model-folder-title {
  color: #082765 !important;
}

.machine-year-folder-main.open svg path,
.machine-model-folder-main.open svg path {
  stroke: #082765 !important;
}

.machine-year-folder-main:hover:not(.open),
.machine-model-folder-main:hover:not(.open) {
  background: #ffffff !important;
  color: #082765 !important;
}

.machine-year-folder-main.open:hover,
.machine-model-folder-main.open:hover {
  background: #bfdbfe !important;
}

body.dark-mode .machine-year-folder-main,
body.dark-mode .machine-model-folder-main {
  background: #1f2937 !important;
  color: #e5e7eb !important;
}

body.dark-mode .machine-year-folder-main.open,
body.dark-mode .machine-model-folder-main.open {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
}

body.dark-mode .machine-year-folder-main.open .machine-year-folder-title,
body.dark-mode .machine-model-folder-main.open .machine-model-folder-title {
  color: #ffffff !important;
}

body.dark-mode .machine-year-folder-main.open svg path,
body.dark-mode .machine-model-folder-main.open svg path {
  stroke: #ffffff !important;
}

.login-card {
  position: relative;
}

.login-farmores-logo {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 47px;
  max-width: 30%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  pointer-events: none;
}

.login-farmores-logo img {
  width: 47px !important;
  height: auto !important;
  display: block !important;
}

@media(max-width:560px) {
  .login-farmores-logo {
    top: 12px;
    right: 12px;
    width: 43px;
  }

  .login-farmores-logo img {
    width: 43px !important;
  }
}

body.dark-mode .login-farmores-logo img {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .25));
}

.login-password-error {
  display: none;
  margin-top: 8px;
  color: #dc2626;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.login-password-error.visible {
  display: block;
}

#loginPassword.login-password-invalid {
  border-color: #dc2626 !important;
  background: #fef2f2 !important;
  color: #991b1b !important;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .28) !important;
}

#loginPassword.login-password-invalid::placeholder {
  color: #b91c1c !important;
}

.password-field-wrap.password-error {
  border-color: #dc2626 !important;
  box-shadow: 0 2px 8px rgba(220, 38, 38, .12) !important;
  border-radius: 10px;
  overflow: hidden;
}

body.dark-mode #loginPassword.login-password-invalid {
  background: #450a0a !important;
  color: #fecaca !important;
  border-color: #ef4444 !important;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .35) !important;
}

body.dark-mode .login-password-error {
  color: #fca5a5 !important;
}

.fixed-transfer-creator {
  margin-top: 3px;
  font-size: 12px !important;
  color: #64748b !important;
}

body.dark-mode .fixed-transfer-creator {
  color: #cbd5e1 !important;
}

.fixed-transfer-creator-band {
  grid-column: 1 / -1;
  background: #082765 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 7px !important;
  padding: 3px 8px !important;
  margin: 0 0 5px 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  min-height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 5px !important;
}

.fixed-transfer-creator-band span {
  color: #ffffff !important;
  font-weight: 900 !important;
}

body.dark-mode .fixed-transfer-creator-band {
  background: #082765 !important;
  color: #ffffff !important;
  border: 0 !important;
}

body.dark-mode .fixed-transfer-creator-band span {
  color: #ffffff !important;
}

/* Filtro calendario più compatto */
.calendar-filter-box {
  padding: 4px 6px !important;
  gap: 4px !important;
  min-height: 0 !important;
  border-radius: 9px !important;
}

.calendar-filter-box label {
  font-size: 10px !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.calendar-filter-box select {
  height: 26px !important;
  min-height: 26px !important;
  padding: 2px 22px 2px 7px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

/* Frecce calendario ai lati del mese/anno */
.calendar-month-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-width: 260px !important;
}

.calendar-month-nav h2 {
  margin: 0 !important;
  color: #082765 !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  text-align: center !important;
  min-width: 190px !important;
  padding: 0 !important;
  align-self: center !important;
}

.calendar-month-arrow {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 2px solid #082765 !important;
  background: #ffffff !important;
  color: #082765 !important;
  font-size: 24px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
}

.calendar-month-arrow:hover {
  background: #dbeafe !important;
}

body.dark-mode .calendar-month-nav h2 {
  color: #dbeafe !important;
}

body.dark-mode .calendar-month-arrow {
  background: #111827 !important;
  color: #dbeafe !important;
  border-color: #60a5fa !important;
}

body.dark-mode .calendar-month-arrow:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

/* Calendario: mese/anno centrato e frecce migliorate */
.calendar-toolbar-centered {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 10px !important;
}

.calendar-month-nav {
  justify-self: center !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  min-width: 0 !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  background: #eef4ff !important;
  border: 1px solid #dbeafe !important;
}

.calendar-month-nav h2 {
  margin: 0 !important;
  color: #082765 !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  text-align: center !important;
  min-width: 205px !important;
  padding: 0 !important;
  line-height: 1.15 !important;
}

.calendar-month-arrow {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 1px solid #93c5fd !important;
  background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%) !important;
  color: #082765 !important;
  font-size: 25px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 4px 10px rgba(8, 39, 101, .12) !important;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease !important;
}

.calendar-month-arrow:hover {
  background: #082765 !important;
  color: #ffffff !important;
  border-color: #082765 !important;
  box-shadow: 0 7px 14px rgba(8, 39, 101, .22) !important;
}

.calendar-month-arrow:active {
  transform: translateY(0) !important;
  box-shadow: 0 3px 8px rgba(8, 39, 101, .18) !important;
}

body.dark-mode .calendar-month-nav {
  background: #0f172a !important;
  border-color: #374151 !important;
}

body.dark-mode .calendar-month-nav h2 {
  color: #dbeafe !important;
}

body.dark-mode .calendar-month-arrow {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
  color: #dbeafe !important;
  border-color: #60a5fa !important;
}

body.dark-mode .calendar-month-arrow:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #60a5fa !important;
}

@media(max-width:720px) {
  .calendar-month-nav h2 {
    min-width: 150px !important;
    font-size: 18px !important;
  }

  .calendar-month-arrow {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    font-size: 22px !important;
  }
}

/* Frecce calendario con SVG centrato perfettamente */
.calendar-month-arrow {
  font-size: 0 !important;
  line-height: 0 !important;
  padding: 0 !important;
}

.calendar-arrow-icon {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

.calendar-arrow-icon path {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

@media(max-width:720px) {
  .calendar-arrow-icon {
    width: 16px !important;
    height: 16px !important;
  }
}

/* Dark mode: solo i valori della colonna Cliente usano il blu del lucchetto in dark mode */
body.dark-mode .fixed-transfer-main .fixed-transfer-referente {
  color: #e5e7eb !important;
}

body.dark-mode .fixed-transfer-main .fixed-transfer-referente span {
  color: #60a5fa !important;
}

.fixed-transfer-creator-band {
  justify-content: flex-start !important;
  text-align: left !important;
  flex-wrap: wrap !important;
}

.fixed-transfer-creator-band .fixed-transfer-creator-user,
.fixed-transfer-creator-band .fixed-transfer-creator-date {
  color: #ffffff !important;
  font-weight: 900 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.fixed-transfer-creator-band .fixed-transfer-creator-date {
  margin-left: 12px !important;
}

.fixed-transfer-creator-band strong {
  color: #ffffff !important;
  font-weight: 900 !important;
}

@media(max-width:720px) {
  .fixed-transfer-creator-band .fixed-transfer-creator-date {
    margin-left: 0 !important;
  }
}

/* Effetto hover bottoni blu menu senza riflesso */
.toolbar-card .primary-action-btn {
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease, background .16s ease !important;
}

.toolbar-card .primary-action-btn:hover {
  transform: translateY(-3px) scale(1.025) !important;
  box-shadow: 0 12px 26px rgba(8, 39, 101, .34), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
  filter: brightness(1.08) !important;
}

.toolbar-card .primary-action-btn:active {
  transform: translateY(-1px) scale(.99) !important;
  box-shadow: 0 7px 16px rgba(8, 39, 101, .28), inset 0 1px 0 rgba(255, 255, 255, .25) !important;
}

body.dark-mode .toolbar-card .primary-action-btn:hover {
  box-shadow: 0 12px 26px rgba(96, 165, 250, .20), inset 0 1px 0 rgba(255, 255, 255, .22) !important;
  filter: brightness(1.12) !important;
}

/* Popup nome utente: chiudi con X rossa tonda */
.user-stats-close-x {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 2px solid #dc2626 !important;
  background: #ffffff !important;
  color: #dc2626 !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: 0 3px 8px rgba(220, 38, 38, .12) !important;
  transition: background .12s ease, color .12s ease, transform .12s ease, box-shadow .12s ease !important;
}

.user-stats-close-x:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 12px rgba(220, 38, 38, .22) !important;
}

.user-stats-close-x:active {
  transform: translateY(0) !important;
  box-shadow: 0 3px 7px rgba(220, 38, 38, .18) !important;
}

body.dark-mode .user-stats-close-x {
  background: #111827 !important;
  color: #fca5a5 !important;
  border-color: #ef4444 !important;
}

body.dark-mode .user-stats-close-x:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

/* Gestione utenti: pulsante Crea utente dimensione originale ma allineato a destra */
#usersPage .user-form-actions {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  grid-column: 1 / -1 !important;
}

#usersPage #userSubmitBtn {
  width: auto !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
  margin-left: 0 !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
}

#usersPage #cancelUserEditBtn {
  width: auto !important;
  flex: 0 0 auto !important;
}

#usersPage #cancelUserEditBtn.visible {
  margin-right: 0 !important;
}

/* Elenco utenti: righe separate e non attaccate */
#usersPage .users-role-table {
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

#usersPage .users-role-table tbody tr {
  border-radius: 12px !important;
  overflow: hidden !important;
}

#usersPage .users-role-table tbody td {
  background: #ffffff !important;
  border-top: 1px solid #dbe3ee !important;
  border-bottom: 1px solid #dbe3ee !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

#usersPage .users-role-table tbody td:first-child {
  border-left: 1px solid #dbe3ee !important;
  border-top-left-radius: 12px !important;
  border-bottom-left-radius: 12px !important;
}

#usersPage .users-role-table tbody td:last-child {
  border-right: 1px solid #dbe3ee !important;
  border-top-right-radius: 12px !important;
  border-bottom-right-radius: 12px !important;
}

body.dark-mode #usersPage .users-role-table tbody td,
body.dark-mode #usersPage .users-role-table tbody td:first-child,
body.dark-mode #usersPage .users-role-table tbody td:last-child {
  background: #111827 !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
}

/* Gestione utenti: bottoni identici a Gestione attività */
#usersPage .users-role-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
}

#usersPage .users-role-actions button {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  padding: 0 !important;
  border-radius: 10px !important;
  border: 1px solid #dbe3ee !important;
  background: #ffffff !important;
  color: #082765 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background .12s ease, color .12s ease, border-color .12s ease, transform .12s ease !important;
}

#usersPage .users-role-actions button:hover {
  background: #eef4ff !important;
  border-color: #c8d4e5 !important;
  color: #082765 !important;
  transform: none !important;
  box-shadow: none !important;
}

#usersPage .users-role-actions button svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2.2 !important;
}

#usersPage .users-role-actions button[title="Elimina"] {
  color: #dc2626 !important;
}

#usersPage .users-role-actions button[title="Elimina"]:hover {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #dc2626 !important;
}

body.dark-mode #usersPage .users-role-actions button {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

body.dark-mode #usersPage .users-role-actions button:hover {
  background: #1f2937 !important;
  border-color: #4b5563 !important;
}

body.dark-mode #usersPage .users-role-actions button[title="Elimina"] {
  color: #fca5a5 !important;
}

body.dark-mode #usersPage .users-role-actions button[title="Elimina"]:hover {
  background: #450a0a !important;
  border-color: #7f1d1d !important;
}

/* Gestione utenti: Modifica/Elimina identici ai bottoni Gestione attività */
#usersPage .users-role-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 48px !important;
}

#usersPage .users-role-actions button,
#usersPage .users-role-actions button[data-action="edit-user"],
#usersPage .users-role-actions button[data-action="delete-user"] {
  margin: 0 !important;
  background: white !important;
  box-shadow: none !important;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 38px !important;
  min-width: 42px !important;
  font-size: 0 !important;
  transform: none !important;
  transition: none !important;
}

#usersPage .users-role-actions button[data-action="edit-user"] {
  border: 2px solid #0057c8 !important;
  color: #0057c8 !important;
}

#usersPage .users-role-actions button[data-action="delete-user"] {
  border: 2px solid red !important;
  color: red !important;
}

#usersPage .users-role-actions button:hover,
#usersPage .users-role-actions button[data-action="edit-user"]:hover,
#usersPage .users-role-actions button[data-action="delete-user"]:hover {
  background: white !important;
  box-shadow: none !important;
  transform: none !important;
}

#usersPage .users-role-actions .trash-icon,
#usersPage .users-role-actions .edit-icon,
#usersPage .users-role-actions button svg {
  width: 23px !important;
  height: 23px !important;
  stroke-width: 2.4 !important;
  fill: none !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  display: block !important;
}

#usersPage .users-role-actions .edit-icon,
#usersPage .users-role-actions .edit-icon path {
  stroke: #0057c8 !important;
}

#usersPage .users-role-actions .trash-icon,
#usersPage .users-role-actions .trash-icon path {
  stroke: red !important;
}

body.dark-mode #usersPage .users-role-actions button,
body.dark-mode #usersPage .users-role-actions button[data-action="edit-user"],
body.dark-mode #usersPage .users-role-actions button[data-action="delete-user"] {
  background: #0f172a !important;
  box-shadow: none !important;
}

body.dark-mode #usersPage .users-role-actions button[data-action="edit-user"] {
  border: 2px solid #0057c8 !important;
  color: #0057c8 !important;
}

body.dark-mode #usersPage .users-role-actions button[data-action="delete-user"] {
  border: 2px solid red !important;
  color: red !important;
}

/* Gestione utenti: colonna Azioni leggermente più stretta */
#usersPage .users-role-table th:last-child,
#usersPage .users-role-table td:last-child {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  text-align: center !important;
}

#usersPage .users-role-actions {
  justify-content: center !important;
  gap: 6px !important;
}

/* Gestione utenti: barra ricerca elenco utenti */
#usersPage .users-search-box {
  position: relative !important;
  margin: 0 0 12px 0 !important;
  width: 100% !important;
}

#usersPage .users-search-box input {
  width: 100% !important;
  height: 44px !important;
  padding: 0 14px 0 42px !important;
  border: 1px solid #c8d4e5 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #082765 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06) !important;
  outline: none !important;
}

#usersPage .users-search-box input:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .18) !important;
}

#usersPage .users-search-box input::placeholder {
  color: #64748b !important;
  font-weight: 800 !important;
}

#usersPage .users-search-icon {
  position: absolute !important;
  left: 14px !important;
  top: 50% !important;
  width: 18px !important;
  height: 18px !important;
  transform: translateY(-50%) !important;
  stroke: #082765 !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  pointer-events: none !important;
}

body.dark-mode #usersPage .users-search-box input {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

body.dark-mode #usersPage .users-search-icon {
  stroke: #60a5fa !important;
}

/* Dettagli macchina > Assistenze: filtro giorni più piccolo */
.machine-assistance-date-filter {
  grid-template-columns: 135px 135px auto !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 0 10px 0 !important;
  max-width: 390px !important;
}

.machine-assistance-date-filter .machine-assistance-date-input {
  height: 34px !important;
  min-height: 34px !important;
  padding: 4px 8px !important;
  font-size: 12px !important;
  border-radius: 9px !important;
  font-weight: 800 !important;
}

.machine-assistance-date-filter .machine-assistance-date-filter-btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  font-size: 12px !important;
  border-radius: 9px !important;
  white-space: nowrap !important;
  min-width: 74px !important;
}

@media(max-width:640px) {
  .machine-assistance-date-filter {
    grid-template-columns: 1fr 1fr !important;
    max-width: none !important;
  }

  .machine-assistance-date-filter .machine-assistance-date-filter-btn {
    grid-column: 1 / -1 !important;
    width: max-content !important;
  }
}

/* Dettagli macchina > Assistenze: filtro giorni a destra e contorno ridotto */
.machine-assistance-date-filter {
  margin: 0 0 8px auto !important;
  max-width: 355px !important;
  width: max-content !important;
  justify-content: end !important;
  justify-items: end !important;
  grid-template-columns: 120px 120px auto !important;
  gap: 6px !important;
}

.machine-assistance-date-filter .machine-assistance-date-input {
  height: 30px !important;
  min-height: 30px !important;
  padding: 2px 6px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
  border-width: 1px !important;
  box-shadow: none !important;
}

.machine-assistance-date-filter .machine-assistance-date-filter-btn {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
  border-width: 1px !important;
  box-shadow: none !important;
  min-width: 62px !important;
}

@media(max-width:640px) {
  .machine-assistance-date-filter {
    margin: 0 0 8px 0 !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 1fr 1fr !important;
    justify-items: stretch !important;
  }
}

/* Dettagli macchina > Assistenze: contenitore filtro aderente al contenuto */
.machine-assistance-date-filter {
  display: inline-grid !important;
  grid-template-columns: 112px 112px 58px !important;
  width: auto !important;
  max-width: max-content !important;
  min-width: 0 !important;
  justify-content: end !important;
  justify-items: stretch !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 0 6px auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.machine-assistance-date-filter .machine-assistance-date-input {
  width: 112px !important;
  max-width: 112px !important;
  min-width: 112px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 1px 5px !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
}

.machine-assistance-date-filter .machine-assistance-date-filter-btn {
  width: 58px !important;
  max-width: 58px !important;
  min-width: 58px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
}

@media(max-width:640px) {
  .machine-assistance-date-filter {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .machine-assistance-date-filter .machine-assistance-date-input {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .machine-assistance-date-filter .machine-assistance-date-filter-btn {
    width: max-content !important;
    max-width: none !important;
    min-width: 58px !important;
    grid-column: 1 / -1 !important;
  }
}

/* Dettagli macchina > Assistenze: filtro realtime senza bottone */
.machine-assistance-date-filter {
  display: inline-grid !important;
  grid-template-columns: 112px 112px !important;
  width: auto !important;
  max-width: max-content !important;
  min-width: 0 !important;
  justify-content: end !important;
  justify-items: stretch !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 0 6px auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.machine-assistance-date-filter .machine-assistance-date-input {
  width: 112px !important;
  max-width: 112px !important;
  min-width: 112px !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 1px 5px !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
}

.machine-assistance-date-filter .machine-assistance-date-filter-btn,
.machine-assistance-date-filter .machine-filter-btn {
  display: none !important;
}

@media(max-width:640px) {
  .machine-assistance-date-filter {
    display: grid !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  .machine-assistance-date-filter .machine-assistance-date-input {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

/* Dettagli macchina > Assistenze: barra creatore come Le mie trasferte */
.machine-detail-assistance-table .machine-detail-creator-row td {
  padding: 0 0 4px 0 !important;
  background: transparent !important;
  border: none !important;
}

.machine-detail-creator-band {
  background: #082765 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 7px !important;
  padding: 3px 8px !important;
  margin: 6px 0 0 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  min-height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}

.machine-detail-creator-band span,
.machine-detail-creator-band strong {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.machine-detail-creator-date {
  margin-left: 12px !important;
}

.machine-detail-assistance-data-row td {
  border-top: 1px solid #dbe3ee !important;
}

body.dark-mode .machine-detail-creator-band {
  background: #082765 !important;
  color: #ffffff !important;
}

body.dark-mode .machine-detail-creator-band span,
body.dark-mode .machine-detail-creator-band strong {
  color: #ffffff !important;
}

@media(max-width:720px) {
  .machine-detail-creator-date {
    margin-left: 0 !important;
  }
}

/* Dettagli macchina > Assistenze: barra creatore integrata nello stesso riquadro */
.machine-detail-assistance-table .machine-detail-creator-row {
  display: none !important;
}

.machine-detail-assistance-table .machine-detail-assistance-main-cell {
  text-align: left !important;
  vertical-align: top !important;
  padding: 10px 12px !important;
}

.machine-detail-assistance-main-cell .machine-detail-creator-band {
  background: #082765 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 7px !important;
  padding: 3px 8px !important;
  margin: 0 0 8px 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  min-height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}

.machine-detail-assistance-main-cell .machine-detail-creator-band span,
.machine-detail-assistance-main-cell .machine-detail-creator-band strong {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.machine-detail-assistance-main-grid {
  display: grid !important;
  grid-template-columns: 120px 1fr !important;
  gap: 12px !important;
  align-items: start !important;
}

.machine-detail-mini-label {
  display: block !important;
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .2px !important;
  margin-bottom: 3px !important;
}

.machine-detail-request-date strong {
  color: #082765 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

.machine-detail-description-inline div {
  color: #082765 !important;
  font-weight: 900 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

body.dark-mode .machine-detail-mini-label {
  color: #cbd5e1 !important;
}

body.dark-mode .machine-detail-request-date strong,
body.dark-mode .machine-detail-description-inline div {
  color: #dbeafe !important;
}

@media(max-width:760px) {
  .machine-detail-assistance-main-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .machine-detail-creator-date {
    margin-left: 0 !important;
  }
}

/* Dettagli macchina > Assistenze: barra creatore lunga come prima ma unita al riquadro */
.machine-detail-assistance-table .machine-detail-assistance-band-cell {
  padding: 8px 10px 0 10px !important;
  background: #ffffff !important;
  border-top: 1px solid #dbe3ee !important;
  border-left: 1px solid #dbe3ee !important;
  border-right: 1px solid #dbe3ee !important;
  border-bottom: 0 !important;
}

.machine-detail-assistance-table .machine-detail-assistance-content-row td {
  border-top: 0 !important;
}

.machine-detail-assistance-table .machine-detail-assistance-top-row+.machine-detail-assistance-content-row td:first-child {
  border-left: 1px solid #dbe3ee !important;
}

.machine-detail-assistance-table .machine-detail-assistance-top-row+.machine-detail-assistance-content-row td:last-child {
  border-right: 1px solid #dbe3ee !important;
}

.machine-detail-assistance-band-cell .machine-detail-creator-band {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

body.dark-mode .machine-detail-assistance-table .machine-detail-assistance-band-cell {
  background: #111827 !important;
  border-color: #374151 !important;
}

/* Dettagli macchina > Assistenze: creatore lungo ma dentro lo stesso riquadro */
.machine-detail-assistance-table .machine-detail-assistance-full-cell {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.machine-detail-assistance-card {
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  padding: 8px 10px 10px 10px !important;
  margin: 6px 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.machine-detail-assistance-card .machine-detail-creator-band {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 8px 0 !important;
  box-sizing: border-box !important;
}

.machine-detail-assistance-columns {
  display: grid !important;
  grid-template-columns: 110px minmax(220px, 1.6fr) 110px minmax(170px, 1.1fr) 120px 90px 120px !important;
  gap: 10px !important;
  align-items: start !important;
}

.machine-detail-assistance-col {
  text-align: left !important;
  color: #082765 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  min-width: 0 !important;
  word-break: break-word !important;
}

.machine-detail-assistance-col .machine-detail-mini-label {
  display: block !important;
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .2px !important;
  margin-bottom: 4px !important;
}

.machine-detail-date-col strong,
.machine-detail-desc-col div {
  color: #082765 !important;
  font-weight: 900 !important;
}

.machine-detail-close-col div {
  color: #12367a !important;
}

body.dark-mode .machine-detail-assistance-card {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode .machine-detail-assistance-col,
body.dark-mode .machine-detail-date-col strong,
body.dark-mode .machine-detail-desc-col div {
  color: #dbeafe !important;
}

body.dark-mode .machine-detail-assistance-col .machine-detail-mini-label {
  color: #cbd5e1 !important;
}

@media(max-width:1100px) {
  .machine-detail-assistance-columns {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media(max-width:720px) {
  .machine-detail-assistance-columns {
    grid-template-columns: 1fr !important;
  }
}

/* Dettagli macchina > Assistenze: colonne originali + barra integrata */
.machine-detail-assistance-table .machine-detail-assistance-with-band td {
  position: relative !important;
}

.machine-detail-date-with-band {
  padding-top: 34px !important;
}

.machine-detail-creator-band-wrap {
  position: absolute !important;
  left: 0 !important;
  top: 6px !important;
  width: calc(var(--machine-detail-assistance-table-width, 100%) + 0px) !important;
  min-width: 100% !important;
  z-index: 2 !important;
  pointer-events: none !important;
}

.machine-detail-assistance-table {
  position: relative !important;
}

.machine-detail-assistance-table .machine-detail-creator-band {
  width: calc(100vw - 120px) !important;
  max-width: calc(100% * 7) !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.machine-detail-assistance-table .machine-detail-assistance-with-band {
  border-top: 1px solid #dbe3ee !important;
}

.machine-detail-assistance-table .machine-detail-assistance-with-band td {
  padding-top: 34px !important;
}

.machine-detail-assistance-table .machine-detail-assistance-with-band td:not(:first-child) {
  padding-top: 34px !important;
}

@media(min-width:900px) {
  .machine-detail-assistance-table .machine-detail-creator-band {
    width: calc(100vw - 180px) !important;
  }
}

@media(max-width:760px) {
  .machine-detail-assistance-table .machine-detail-creator-band {
    width: calc(100vw - 44px) !important;
  }
}

/* Dettagli macchina > Assistenze: barra blu senza sormonto, unita al riquadro */
.machine-detail-assistance-table .machine-detail-creator-band-wrap {
  position: static !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  pointer-events: auto !important;
}

.machine-detail-assistance-table .machine-detail-assistance-band-row td {
  padding: 8px 10px 0 10px !important;
  background: #ffffff !important;
  border-top: 1px solid #dbe3ee !important;
  border-left: 1px solid #dbe3ee !important;
  border-right: 1px solid #dbe3ee !important;
  border-bottom: 0 !important;
  border-radius: 12px 12px 0 0 !important;
}

.machine-detail-assistance-table .machine-detail-assistance-band-row .machine-detail-creator-band {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.machine-detail-assistance-table .machine-detail-assistance-content-row td {
  padding-top: 12px !important;
  border-top: 0 !important;
  border-bottom: 1px solid #dbe3ee !important;
  background: #ffffff !important;
}

.machine-detail-assistance-table .machine-detail-assistance-content-row td:first-child {
  border-left: 1px solid #dbe3ee !important;
  border-radius: 0 0 0 12px !important;
}

.machine-detail-assistance-table .machine-detail-assistance-content-row td:last-child {
  border-right: 1px solid #dbe3ee !important;
  border-radius: 0 0 12px 0 !important;
}

.machine-detail-assistance-table .machine-detail-assistance-content-row {
  margin-bottom: 8px !important;
}

.machine-detail-date-with-band {
  padding-top: 12px !important;
}

body.dark-mode .machine-detail-assistance-table .machine-detail-assistance-band-row td,
body.dark-mode .machine-detail-assistance-table .machine-detail-assistance-content-row td {
  background: #111827 !important;
  border-color: #374151 !important;
}

/* Dettagli macchina > Assistenze: unico riquadro non diviso, colonne originali dentro */
.machine-detail-assistance-table .machine-detail-assistance-unified-cell {
  padding: 6px 0 !important;
  background: transparent !important;
  border: none !important;
}

.machine-detail-assistance-unified-box {
  width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  padding: 8px 10px 10px 10px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.machine-detail-assistance-unified-box .machine-detail-creator-band {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 8px 0 !important;
  box-sizing: border-box !important;
}

.machine-detail-assistance-inner-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  margin: 0 !important;
}

.machine-detail-assistance-inner-table td {
  background: transparent !important;
  border: none !important;
  padding: 8px 10px !important;
  vertical-align: middle !important;
  text-align: center !important;
  color: #082765 !important;
  font-weight: 800 !important;
}

.machine-detail-assistance-inner-table td:nth-child(1) {
  width: 12% !important
}

.machine-detail-assistance-inner-table td:nth-child(2) {
  width: 28% !important
}

.machine-detail-assistance-inner-table td:nth-child(3) {
  width: 11% !important
}

.machine-detail-assistance-inner-table td:nth-child(4) {
  width: 20% !important
}

.machine-detail-assistance-inner-table td:nth-child(5) {
  width: 11% !important
}

.machine-detail-assistance-inner-table td:nth-child(6) {
  width: 9% !important
}

.machine-detail-assistance-inner-table td:nth-child(7) {
  width: 9% !important
}

body.dark-mode .machine-detail-assistance-unified-box {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode .machine-detail-assistance-inner-table td {
  color: #dbeafe !important;
}

/* Dettagli macchina > Assistenze: riquadro unico con colonne riallineate */
.machine-detail-assistance-table,
.machine-detail-assistance-inner-table {
  table-layout: fixed !important;
  width: 100% !important;
}

.machine-detail-assistance-table .machine-col-date,
.machine-detail-assistance-inner-table .machine-col-date {
  width: 12% !important
}

.machine-detail-assistance-table .machine-col-intervento,
.machine-detail-assistance-inner-table .machine-col-intervento {
  width: 28% !important
}

.machine-detail-assistance-table .machine-col-report,
.machine-detail-assistance-inner-table .machine-col-report {
  width: 11% !important
}

.machine-detail-assistance-table .machine-col-note,
.machine-detail-assistance-inner-table .machine-col-note {
  width: 20% !important
}

.machine-detail-assistance-table .machine-col-tipologia,
.machine-detail-assistance-inner-table .machine-col-tipologia {
  width: 11% !important
}

.machine-detail-assistance-table .machine-col-tecnici,
.machine-detail-assistance-inner-table .machine-col-tecnici {
  width: 9% !important
}

.machine-detail-assistance-table .machine-col-stato,
.machine-detail-assistance-inner-table .machine-col-stato {
  width: 9% !important
}

.machine-detail-assistance-inner-table td {
  box-sizing: border-box !important;
}

.machine-detail-assistance-inner-table td:nth-child(1),
.machine-detail-assistance-inner-table td:nth-child(2),
.machine-detail-assistance-inner-table td:nth-child(3),
.machine-detail-assistance-inner-table td:nth-child(4),
.machine-detail-assistance-inner-table td:nth-child(5),
.machine-detail-assistance-inner-table td:nth-child(6),
.machine-detail-assistance-inner-table td:nth-child(7) {
  width: auto !important;
}

.machine-detail-assistance-unified-box {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.machine-detail-assistance-unified-box .machine-detail-creator-band {
  margin-left: 10px !important;
  margin-right: 10px !important;
  width: calc(100% - 20px) !important;
}

/* Dettagli macchina > Assistenze: priorità e stato senza sormonto */
.machine-detail-assistance-table .machine-col-date,
.machine-detail-assistance-inner-table .machine-col-date {
  width: 11% !important
}

.machine-detail-assistance-table .machine-col-intervento,
.machine-detail-assistance-inner-table .machine-col-intervento {
  width: 25% !important
}

.machine-detail-assistance-table .machine-col-report,
.machine-detail-assistance-inner-table .machine-col-report {
  width: 10% !important
}

.machine-detail-assistance-table .machine-col-note,
.machine-detail-assistance-inner-table .machine-col-note {
  width: 17% !important
}

.machine-detail-assistance-table .machine-col-tipologia,
.machine-detail-assistance-inner-table .machine-col-tipologia {
  width: 10% !important
}

.machine-detail-assistance-table .machine-col-tecnici,
.machine-detail-assistance-inner-table .machine-col-tecnici {
  width: 12% !important
}

.machine-detail-assistance-table .machine-col-stato,
.machine-detail-assistance-inner-table .machine-col-stato {
  width: 15% !important
}

.machine-detail-assistance-inner-table td:nth-child(6),
.machine-detail-assistance-inner-table td:nth-child(7),
.machine-detail-assistance-table th:nth-child(6),
.machine-detail-assistance-table th:nth-child(7) {
  white-space: normal !important;
  overflow: visible !important;
  text-align: center !important;
}

.machine-detail-assistance-inner-table td:nth-child(6) .priority-badge,
.machine-detail-assistance-inner-table td:nth-child(7) .badge {
  max-width: 100% !important;
  white-space: normal !important;
  line-height: 1.15 !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.machine-detail-assistance-inner-table td:nth-child(7)>div {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 4px !important;
}

/* Dettagli macchina: Non programmata leggermente più piccolo */
.machine-not-programmed-text {
  font-size: 11px !important;
  line-height: 1.1 !important;
  font-weight: 800 !important;
  color: #64748b !important;
  white-space: normal !important;
}

body.dark-mode .machine-not-programmed-text {
  color: #cbd5e1 !important;
}

/* Dettagli macchina: linee colonne allineate ai titoli senza cambiare layout */
.machine-detail-assistance-table,
.machine-detail-assistance-inner-table {
  table-layout: fixed !important;
  width: 100% !important;
}

.machine-detail-assistance-table .machine-col-date,
.machine-detail-assistance-inner-table .machine-col-date {
  width: 11% !important
}

.machine-detail-assistance-table .machine-col-intervento,
.machine-detail-assistance-inner-table .machine-col-intervento {
  width: 25% !important
}

.machine-detail-assistance-table .machine-col-report,
.machine-detail-assistance-inner-table .machine-col-report {
  width: 10% !important
}

.machine-detail-assistance-table .machine-col-note,
.machine-detail-assistance-inner-table .machine-col-note {
  width: 17% !important
}

.machine-detail-assistance-table .machine-col-tipologia,
.machine-detail-assistance-inner-table .machine-col-tipologia {
  width: 10% !important
}

.machine-detail-assistance-table .machine-col-tecnici,
.machine-detail-assistance-inner-table .machine-col-tecnici {
  width: 12% !important
}

.machine-detail-assistance-table .machine-col-stato,
.machine-detail-assistance-inner-table .machine-col-stato {
  width: 15% !important
}

.machine-detail-assistance-table th,
.machine-detail-assistance-inner-table td {
  box-sizing: border-box !important;
}

.machine-detail-assistance-inner-table td:nth-child(1),
.machine-detail-assistance-inner-table td:nth-child(2),
.machine-detail-assistance-inner-table td:nth-child(3),
.machine-detail-assistance-inner-table td:nth-child(4),
.machine-detail-assistance-inner-table td:nth-child(5),
.machine-detail-assistance-inner-table td:nth-child(6),
.machine-detail-assistance-inner-table td:nth-child(7) {
  width: auto !important;
}

.machine-detail-assistance-unified-box {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.machine-detail-assistance-unified-box .machine-detail-creator-band {
  margin-left: 10px !important;
  margin-right: 10px !important;
  width: calc(100% - 20px) !important;
}

.machine-detail-assistance-inner-table {
  margin: 0 !important;
}

.machine-detail-assistance-inner-table td {
  border-left: 0 !important;
  border-right: 0 !important;
}

.machine-detail-assistance-inner-table td:nth-child(6),
.machine-detail-assistance-inner-table td:nth-child(7) {
  white-space: normal !important;
  overflow: visible !important;
}

.machine-detail-assistance-inner-table td:nth-child(6) .priority-badge,
.machine-detail-assistance-inner-table td:nth-child(7) .badge {
  max-width: 100% !important;
  white-space: normal !important;
  line-height: 1.15 !important;
  text-align: center !important;
}

/* Dettagli macchina: titoli colonne sempre visibili durante lo scroll */
#machineDetailModal .machine-detail-assistance-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
  background: #f4f7fb !important;
  box-shadow: 0 2px 0 #dbe3ee !important;
}

#machineDetailModal .machine-detail-assistance-table thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 12 !important;
}

body.dark-mode #machineDetailModal .machine-detail-assistance-table thead th {
  background: #1f2937 !important;
  box-shadow: 0 2px 0 #374151 !important;
}

/* Dettagli macchina: intestazione assistenze sticky corretta nel popup scrollabile */
#machineDetailModal .modal-popup-style {
  overflow: auto !important;
}

#machineDetailModal .popup-modal-body,
#machineDetailModal #machineDetailContent {
  overflow: visible !important;
}

#machineDetailModal .machine-detail-assistance-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#machineDetailModal .machine-detail-assistance-table thead {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
}

#machineDetailModal .machine-detail-assistance-table thead tr {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
}

#machineDetailModal .machine-detail-assistance-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 90 !important;
  background: #f4f7fb !important;
  box-shadow: 0 2px 0 #dbe3ee, 0 6px 12px rgba(15, 23, 42, .08) !important;
}

body.dark-mode #machineDetailModal .machine-detail-assistance-table thead th {
  background: #1f2937 !important;
  box-shadow: 0 2px 0 #374151, 0 6px 12px rgba(0, 0, 0, .35) !important;
}

/* Dettagli macchina: sticky titoli colonne testato su scroll del corpo popup */
#machineDetailModal .modal-popup-style {
  display: flex !important;
  flex-direction: column !important;
  max-height: 92vh !important;
  overflow: hidden !important;
}

#machineDetailModal .popup-modal-header {
  flex: 0 0 auto !important;
  position: relative !important;
  z-index: 120 !important;
}

#machineDetailModal .popup-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  position: relative !important;
}

#machineDetailModal #machineDetailContent {
  overflow: visible !important;
  min-height: 0 !important;
}

#machineDetailModal .machine-detail-assistance-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#machineDetailModal .machine-detail-assistance-table thead th {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: #f4f7fb !important;
  box-shadow: 0 2px 0 #dbe3ee, 0 8px 16px rgba(15, 23, 42, .10) !important;
}

#machineDetailModal .machine-detail-assistance-table thead th:first-child {
  border-top-left-radius: 12px !important;
}

#machineDetailModal .machine-detail-assistance-table thead th:last-child {
  border-top-right-radius: 12px !important;
}

body.dark-mode #machineDetailModal .machine-detail-assistance-table thead th {
  background: #1f2937 !important;
  box-shadow: 0 2px 0 #374151, 0 8px 16px rgba(0, 0, 0, .35) !important;
}

/* Dettagli macchina: filtro + titoli in riquadro esterno fisso */
#machineDetailModal .machine-assistance-panel-wrapper {
  width: 100% !important;
}

#machineDetailModal .machine-assistance-sticky-box {
  position: sticky !important;
  top: 0 !important;
  z-index: 140 !important;
  background: transparent !important;
  padding: 0 0 8px 0 !important;
}

#machineDetailModal .machine-assistance-sticky-inner {
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  padding: 10px 10px 8px 10px !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08) !important;
}

#machineDetailModal .machine-assistance-sticky-inner .machine-assistance-date-filter {
  margin: 0 0 8px auto !important;
}

#machineDetailModal .machine-assistance-header-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 0 !important;
}

#machineDetailModal .machine-assistance-header-table thead th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
  background: #f4f7fb !important;
  box-shadow: none !important;
}

#machineDetailModal .machine-assistance-header-table th {
  box-sizing: border-box !important;
}

#machineDetailModal .machine-assistance-body-table thead {
  display: none !important;
}

#machineDetailModal .machine-assistance-scroll-content {
  width: 100% !important;
}

body.dark-mode #machineDetailModal .machine-assistance-sticky-inner {
  background: #111827 !important;
  border-color: #374151 !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .32) !important;
}

body.dark-mode #machineDetailModal .machine-assistance-header-table thead th {
  background: #1f2937 !important;
}

/* Dettagli macchina: riquadro fisso copre completamente il contenuto che scorre sotto */
#machineDetailModal .machine-assistance-sticky-box {
  background: #ffffff !important;
  margin: 0 !important;
  padding: 0 0 10px 0 !important;
  z-index: 300 !important;
  box-shadow: 0 10px 14px rgba(255, 255, 255, .96) !important;
}

#machineDetailModal .machine-assistance-sticky-box::before {
  content: "" !important;
  position: absolute !important;
  left: -18px !important;
  right: -18px !important;
  top: -18px !important;
  bottom: 0 !important;
  background: #ffffff !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

#machineDetailModal .machine-assistance-sticky-inner {
  position: relative !important;
  z-index: 2 !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

#machineDetailModal .machine-assistance-scroll-content {
  position: relative !important;
  z-index: 1 !important;
}

body.dark-mode #machineDetailModal .machine-assistance-sticky-box {
  background: #111827 !important;
  box-shadow: 0 10px 14px rgba(17, 24, 39, .96) !important;
}

body.dark-mode #machineDetailModal .machine-assistance-sticky-box::before {
  background: #111827 !important;
}

body.dark-mode #machineDetailModal .machine-assistance-sticky-inner {
  background: #111827 !important;
}

/* Dettagli macchina: rimossa solo la linea sottile di contorno dei titoli */
#machineDetailModal .machine-assistance-sticky-inner {
  border-color: transparent !important;
}

#machineDetailModal .machine-assistance-header-table thead th {
  border-color: transparent !important;
}

#machineDetailModal .machine-assistance-header-table th {
  border-color: transparent !important;
}

body.dark-mode #machineDetailModal .machine-assistance-sticky-inner,
body.dark-mode #machineDetailModal .machine-assistance-header-table thead th,
body.dark-mode #machineDetailModal .machine-assistance-header-table th {
  border-color: transparent !important;
}

/* Dettagli macchina: rimozione definitiva solo linea/cornice sottile */
#machineDetailModal .machine-assistance-sticky-inner {
  border: 0 !important;
  outline: 0 !important;
}

#machineDetailModal .machine-assistance-header-table,
#machineDetailModal .machine-assistance-header-table thead,
#machineDetailModal .machine-assistance-header-table tr,
#machineDetailModal .machine-assistance-header-table th,
#machineDetailModal .machine-assistance-header-table thead th {
  border: 0 !important;
  outline: 0 !important;
}

#machineDetailModal .machine-assistance-header-table thead th {
  box-shadow: none !important;
}

body.dark-mode #machineDetailModal .machine-assistance-sticky-inner,
body.dark-mode #machineDetailModal .machine-assistance-header-table,
body.dark-mode #machineDetailModal .machine-assistance-header-table thead,
body.dark-mode #machineDetailModal .machine-assistance-header-table tr,
body.dark-mode #machineDetailModal .machine-assistance-header-table th,
body.dark-mode #machineDetailModal .machine-assistance-header-table thead th {
  border: 0 !important;
  outline: 0 !important;
}

body.dark-mode #machineDetailModal .machine-assistance-header-table thead th {
  box-shadow: none !important;
}

/* Dettagli macchina: ripristinati solo i divisori delle colonne */
#machineDetailModal .machine-assistance-header-table th:not(:last-child),
#machineDetailModal .machine-detail-assistance-table th:not(:last-child) {
  border-right: 1px solid #dbe3ee !important;
}

#machineDetailModal .machine-detail-assistance-inner-table td:not(:last-child) {
  border-right: 1px solid #e5e7eb !important;
}

body.dark-mode #machineDetailModal .machine-assistance-header-table th:not(:last-child),
body.dark-mode #machineDetailModal .machine-detail-assistance-table th:not(:last-child) {
  border-right: 1px solid #374151 !important;
}

body.dark-mode #machineDetailModal .machine-detail-assistance-inner-table td:not(:last-child) {
  border-right: 1px solid #334155 !important;
}

/* Dettagli macchina: sfondo filtro/titoli più aderente in basso */
#machineDetailModal .machine-assistance-sticky-box {
  padding-bottom: 4px !important;
}

#machineDetailModal .machine-assistance-sticky-inner {
  padding-bottom: 4px !important;
}

#machineDetailModal .machine-assistance-header-table {
  margin-bottom: 0 !important;
}

#machineDetailModal .machine-assistance-header-table thead th {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

#machineDetailModal .machine-assistance-scroll-content {
  margin-top: 0 !important;
}

/* Dettagli macchina: titoli a pari con il bordo basso del riquadro */
#machineDetailModal .machine-assistance-sticky-box {
  padding-bottom: 0 !important;
}

#machineDetailModal .machine-assistance-sticky-inner {
  padding-bottom: 0 !important;
}

#machineDetailModal .machine-assistance-header-table {
  margin-bottom: 0 !important;
  border-bottom-left-radius: 12px !important;
  border-bottom-right-radius: 12px !important;
  overflow: hidden !important;
}

#machineDetailModal .machine-assistance-header-table thead th {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  border-bottom: 0 !important;
}

#machineDetailModal .machine-assistance-header-table thead th:first-child {
  border-bottom-left-radius: 12px !important;
}

#machineDetailModal .machine-assistance-header-table thead th:last-child {
  border-bottom-right-radius: 12px !important;
}

#machineDetailModal .machine-assistance-scroll-content {
  margin-top: 6px !important;
}

/* Dettaglio macchina > Costi: titolo Ore lavoro da Bacheca attività più alto e a sinistra */
#machineDetailModal .machine-costs-work-section {
  margin-top: 4px !important;
}

#machineDetailModal .machine-costs-work-title {
  margin: 0 0 8px 0 !important;
  padding: 0 !important;
  color: #082765 !important;
  font-size: 19px !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  text-align: left !important;
}

#machineDetailModal .machine-costs-work-title .home-widget-title-icon {
  margin-left: 0 !important;
  flex: 0 0 auto !important;
}

body.dark-mode #machineDetailModal .machine-costs-work-title {
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: totali sotto il grafico */
#machineDetailModal .machine-costs-summary-after-chart {
  margin-top: 14px !important;
  margin-bottom: 10px !important;
}

#machineDetailModal .machine-costs-group-summary-after-chart {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
}

/* Dettaglio macchina > Costi: riquadri totali in fila */
#machineDetailModal .machine-costs-summary-after-chart {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-costs-group-summary-after-chart {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-costs-summary-after-chart .machine-cost-card,
#machineDetailModal .machine-costs-group-summary-after-chart .machine-cost-card {
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media(max-width:700px) {

  #machineDetailModal .machine-costs-summary-after-chart,
  #machineDetailModal .machine-costs-group-summary-after-chart {
    grid-template-columns: 1fr !important;
  }
}

/* Elenco assistenze: riga blu creatore come Le mie trasferte */
.main-tickets-table .ticket-creator-row td {
  padding: 8px 10px 0 10px !important;
  background: transparent !important;
  border: none !important;
}

.ticket-creator-band {
  width: 100% !important;
  box-sizing: border-box !important;
  background: #082765 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 7px !important;
  padding: 3px 8px !important;
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  min-height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}

.ticket-creator-band span,
.ticket-creator-band strong {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.ticket-creator-date {
  margin-left: 12px !important;
}

.main-ticket-row td {
  border-top: 0 !important;
}

body.dark-mode .ticket-creator-band {
  background: #082765 !important;
  color: #ffffff !important;
}

body.dark-mode .ticket-creator-band span,
body.dark-mode .ticket-creator-band strong {
  color: #ffffff !important;
}

@media(max-width:720px) {
  .ticket-creator-date {
    margin-left: 0 !important;
  }
}

/* Elenco assistenze: stessa grandezza font della colonna Cliente su tutte le colonne */
.main-tickets-table .main-ticket-row td,
.main-tickets-table .main-ticket-row td *,
.main-tickets-table .description-cell,
.main-tickets-table .badge,
.main-tickets-table .priority-badge,
.main-tickets-table .subscription-token,
.main-tickets-table .subscription-label,
.main-tickets-table .assigned-user-chip,
.main-tickets-table .ticket-user-chip {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

.main-tickets-table .main-ticket-row td {
  font-weight: 800 !important;
}

.main-tickets-table .main-ticket-row td strong,
.main-tickets-table .main-ticket-row td span[style*="font-weight:900"],
.main-tickets-table .main-ticket-row td div[style*="font-weight:900"] {
  font-weight: 900 !important;
}

.main-tickets-table .actions button {
  font-size: 12px !important;
}

/* Elenco assistenze: fascia blu integrata nel riquadro assistenza */
.main-tickets-table {
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
}

.main-tickets-table .ticket-creator-row td {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.main-tickets-table .ticket-creator-band {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 4px 10px !important;
  background: #082765 !important;
  color: #ffffff !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td {
  border-top: 0 !important;
  border-bottom: 1px solid #dbe3ee !important;
  background: #ffffff !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td:first-child {
  border-left: 1px solid #dbe3ee !important;
  border-radius: 0 0 0 12px !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td:last-child {
  border-right: 1px solid #dbe3ee !important;
  border-radius: 0 0 12px 0 !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row {
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06) !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td:not(:first-child) {
  border-left: 0 !important;
}

body.dark-mode .main-tickets-table .ticket-creator-row+.main-ticket-row td {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode .main-tickets-table .ticket-creator-band {
  background: #082765 !important;
}

/* Elenco assistenze: fascia blu più giù dentro il riquadro */
.main-tickets-table .ticket-creator-row td {
  padding: 10px 10px 0 10px !important;
  background: #ffffff !important;
  border-top: 1px solid #dbe3ee !important;
  border-left: 1px solid #dbe3ee !important;
  border-right: 1px solid #dbe3ee !important;
  border-bottom: 0 !important;
  border-radius: 12px 12px 0 0 !important;
}

.main-tickets-table .ticket-creator-band {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 7px !important;
  box-sizing: border-box !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td {
  border-top: 0 !important;
  padding-top: 10px !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td:first-child {
  border-left: 1px solid #dbe3ee !important;
  border-radius: 0 0 0 12px !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td:last-child {
  border-right: 1px solid #dbe3ee !important;
  border-radius: 0 0 12px 0 !important;
}

body.dark-mode .main-tickets-table .ticket-creator-row td {
  background: #111827 !important;
  border-color: #374151 !important;
}

/* Elenco assistenze: fascia blu ancora più dentro il riquadro assistenza */
.main-tickets-table .ticket-creator-row td {
  padding: 22px 14px 0 14px !important;
  background: #ffffff !important;
  border-top: 1px solid #dbe3ee !important;
  border-left: 1px solid #dbe3ee !important;
  border-right: 1px solid #dbe3ee !important;
  border-bottom: 0 !important;
  border-radius: 14px 14px 0 0 !important;
}

.main-tickets-table .ticket-creator-band {
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td {
  border-top: 0 !important;
  padding-top: 14px !important;
  background: #ffffff !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td:first-child {
  border-left: 1px solid #dbe3ee !important;
  border-radius: 0 0 0 14px !important;
}

.main-tickets-table .ticket-creator-row+.main-ticket-row td:last-child {
  border-right: 1px solid #dbe3ee !important;
  border-radius: 0 0 14px 0 !important;
}

body.dark-mode .main-tickets-table .ticket-creator-row td,
body.dark-mode .main-tickets-table .ticket-creator-row+.main-ticket-row td {
  background: #111827 !important;
  border-color: #374151 !important;
}

/* Elenco assistenze: fascia blu dentro colonna Cliente sopra Cliente */
.main-tickets-table .ticket-creator-row {
  display: none !important;
}

.main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 8px 0 !important;
  border-radius: 7px !important;
  padding: 4px 7px !important;
  background: #082765 !important;
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
}

.main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client span,
.main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client strong {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.main-tickets-table .ticket-client-sticky .ticket-creator-date {
  margin-left: 0 !important;
}

.main-tickets-table .main-ticket-row td {
  border-top: 1px solid #dbe3ee !important;
}

body.dark-mode .main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client {
  background: #082765 !important;
  color: #ffffff !important;
}

body.dark-mode .main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client span,
body.dark-mode .main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client strong {
  color: #ffffff !important;
}

/* Elenco assistenze: fascia blu posizione precedente, ma lunga su tutta la riga */
.main-tickets-table .main-ticket-row {
  position: relative !important;
}

.main-tickets-table .main-ticket-row td {
  padding-top: 34px !important;
}

.main-tickets-table .ticket-client-sticky {
  position: static !important;
}

.main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client {
  position: absolute !important;
  left: 10px !important;
  right: 10px !important;
  top: 8px !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-radius: 7px !important;
  padding: 4px 8px !important;
  background: #082765 !important;
  color: #ffffff !important;
  font-size: 10.5px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  z-index: 3 !important;
}

.main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client span,
.main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client strong {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.main-tickets-table .ticket-client-sticky .ticket-creator-date {
  margin-left: 12px !important;
}

.main-tickets-table .ticket-creator-row,
.main-tickets-table .ticket-creator-row-attached {
  display: none !important;
}

body.dark-mode .main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client {
  background: #082765 !important;
  color: #ffffff !important;
}

body.dark-mode .main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client span,
body.dark-mode .main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client strong {
  color: #ffffff !important;
}

/* Elenco assistenze: fascia blu posizionata come in Dettaglio macchina > Assistenze */
.main-tickets-unified-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.main-tickets-unified-table>tbody>.main-ticket-unified-row>.main-ticket-unified-cell {
  padding: 6px 0 !important;
  background: transparent !important;
  border: none !important;
}

.main-ticket-unified-box {
  width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  padding: 8px 10px 10px 10px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.main-ticket-unified-box .ticket-creator-band-detail-style {
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 8px 0 !important;
  box-sizing: border-box !important;
  background: #082765 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 7px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  min-height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  position: static !important;
}

.main-ticket-unified-box .ticket-creator-band-detail-style span,
.main-ticket-unified-box .ticket-creator-band-detail-style strong {
  color: #ffffff !important;
  font-weight: 900 !important;
}

.main-ticket-unified-box .ticket-creator-date {
  margin-left: 12px !important;
}

.main-ticket-inner-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  margin: 0 !important;
}

.main-ticket-inner-table td {
  background: transparent !important;
  border: none !important;
  padding: 8px 10px !important;
  vertical-align: middle !important;
  text-align: center !important;
  color: #082765 !important;
  font-weight: 800 !important;
  box-sizing: border-box !important;
}

.main-ticket-inner-table td:nth-child(1) {
  text-align: left !important;
}

.main-ticket-inner-table td:nth-child(3) {
  text-align: left !important;
}

.main-ticket-inner-table .actions {
  margin: 0 !important;
}

.main-tickets-unified-table .ticket-col-cliente,
.main-ticket-inner-table .ticket-col-cliente {
  width: 17% !important
}

.main-tickets-unified-table .ticket-col-date,
.main-ticket-inner-table .ticket-col-date {
  width: 10% !important
}

.main-tickets-unified-table .ticket-col-intervento,
.main-ticket-inner-table .ticket-col-intervento {
  width: 22% !important
}

.main-tickets-unified-table .ticket-col-costo,
.main-ticket-inner-table .ticket-col-costo {
  width: 8% !important
}

.main-tickets-unified-table .ticket-col-tipologia,
.main-ticket-inner-table .ticket-col-tipologia {
  width: 11% !important
}

.main-tickets-unified-table .ticket-col-priorita,
.main-ticket-inner-table .ticket-col-priorita {
  width: 9% !important
}

.main-tickets-unified-table .ticket-col-tecnico,
.main-ticket-inner-table .ticket-col-tecnico {
  width: 11% !important
}

.main-tickets-unified-table .ticket-col-stato,
.main-ticket-inner-table .ticket-col-stato {
  width: 7% !important
}

.main-tickets-unified-table .ticket-col-azioni,
.main-ticket-inner-table .ticket-col-azioni {
  width: 170px !important
}

.main-tickets-table .ticket-creator-row,
.main-tickets-table .ticket-creator-row-attached {
  display: none !important;
}

.main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client {
  display: none !important;
}

body.dark-mode .main-ticket-unified-box {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode .main-ticket-inner-table td {
  color: #dbeafe !important;
}

body.dark-mode .main-ticket-unified-box .ticket-creator-band-detail-style {
  background: #082765 !important;
  color: #ffffff !important;
}

@media(max-width:900px) {
  .main-ticket-unified-box {
    overflow: auto !important;
  }
}

/* Elenco assistenze: meno spazio tra fascia blu e testo sotto */
.main-ticket-unified-box {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.main-ticket-unified-box .ticket-creator-band-detail-style {
  margin-bottom: 3px !important;
}

.main-ticket-inner-table td {
  padding-top: 5px !important;
  padding-bottom: 7px !important;
}

/* Elenco assistenze: fascia blu vicinissima al testo Cliente */
.main-ticket-unified-box .ticket-creator-band-detail-style {
  margin-bottom: 0 !important;
}

.main-ticket-inner-table td {
  padding-top: 1px !important;
}

.main-ticket-inner-table .ticket-client-sticky {
  padding-top: 1px !important;
}

.main-ticket-inner-table .ticket-client-sticky>div:first-child {
  margin-top: 0 !important;
}

/* Elenco assistenze: fascia blu sottile uguale a Dettaglio macchina */
.main-ticket-unified-box .ticket-creator-band-detail-style {
  padding: 3px 8px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  min-height: 18px !important;
  height: auto !important;
  border-radius: 7px !important;
  margin: 0 0 2px 0 !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

.main-ticket-unified-box .ticket-creator-band-detail-style span,
.main-ticket-unified-box .ticket-creator-band-detail-style strong {
  font-size: 11px !important;
  line-height: 1.1 !important;
}

.main-ticket-unified-box {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.main-ticket-inner-table td {
  padding-top: 2px !important;
  padding-bottom: 7px !important;
}

.main-ticket-inner-table .ticket-client-sticky {
  padding-top: 2px !important;
}

/* Elenco assistenze: fascia blu attaccata al testo sotto */
.main-ticket-unified-box .ticket-creator-band-detail-style {
  margin-bottom: 0 !important;
}

.main-ticket-inner-table {
  margin-top: 0 !important;
}

.main-ticket-inner-table tbody,
.main-ticket-inner-table tr {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.main-ticket-inner-table td {
  padding-top: 0 !important;
}

.main-ticket-inner-table .ticket-client-sticky {
  padding-top: 0 !important;
}

.main-ticket-inner-table .ticket-client-sticky>div:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
  line-height: 1.1 !important;
}

.main-ticket-unified-box {
  padding-bottom: 8px !important;
}

/* Elenco assistenze: fascia blu dentro il riquadro della riga assistenza */
.main-tickets-unified-table {
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
}

.main-tickets-unified-table>tbody>.main-ticket-unified-row>.main-ticket-unified-cell {
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.main-ticket-unified-box {
  width: 100% !important;
  max-width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  padding: 8px 10px 10px 10px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  position: relative !important;
}

.main-ticket-unified-box .ticket-creator-band-detail-style {
  position: static !important;
  inset: auto !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 0 0 !important;
  box-sizing: border-box !important;
  background: #082765 !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 7px !important;
  padding: 3px 8px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  min-height: 18px !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  text-align: left !important;
  gap: 5px !important;
  flex-wrap: wrap !important;
  z-index: auto !important;
}

.main-ticket-unified-box .ticket-creator-band-detail-style span,
.main-ticket-unified-box .ticket-creator-band-detail-style strong {
  color: #ffffff !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
}

.main-ticket-unified-box .ticket-creator-date {
  margin-left: 12px !important;
}

.main-ticket-unified-box .main-ticket-inner-table {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
}

.main-ticket-unified-box .main-ticket-inner-table td {
  background: transparent !important;
  border: none !important;
  padding: 3px 10px 7px 10px !important;
  vertical-align: middle !important;
}

.main-ticket-unified-box .main-ticket-inner-table .ticket-client-sticky {
  padding-top: 3px !important;
}

.main-ticket-unified-box .main-ticket-inner-table .ticket-client-sticky>div:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.main-tickets-table .ticket-creator-row,
.main-tickets-table .ticket-creator-row-attached {
  display: none !important;
}

.main-tickets-table .ticket-client-sticky .ticket-creator-band-inside-client:not(.ticket-creator-band-detail-style) {
  display: none !important;
}

body.dark-mode .main-ticket-unified-box {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode .main-ticket-unified-box .ticket-creator-band-detail-style {
  background: #082765 !important;
  color: #ffffff !important;
}

/* Elenco assistenze: ripristino divisori colonne e prima colonna fissa */
.main-ticket-unified-box .main-ticket-inner-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.main-ticket-unified-box .main-ticket-inner-table td {
  border-right: 1px solid #e5e7eb !important;
}

.main-ticket-unified-box .main-ticket-inner-table td:last-child {
  border-right: 0 !important;
}

.main-ticket-unified-box .main-ticket-inner-table .ticket-client-sticky {
  position: sticky !important;
  left: 0 !important;
  z-index: 5 !important;
  background: #ffffff !important;
  box-shadow: 2px 0 0 #e5e7eb !important;
}

.main-tickets-unified-table thead th:not(:last-child) {
  border-right: 1px solid #dbe3ee !important;
}

.main-tickets-unified-table thead th:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 8 !important;
  background: #f4f7fb !important;
  box-shadow: 2px 0 0 #dbe3ee !important;
}

body.dark-mode .main-ticket-unified-box .main-ticket-inner-table td {
  border-right-color: #334155 !important;
}

body.dark-mode .main-ticket-unified-box .main-ticket-inner-table .ticket-client-sticky {
  background: #111827 !important;
  box-shadow: 2px 0 0 #334155 !important;
}

body.dark-mode .main-tickets-unified-table thead th:first-child {
  background: #1f2937 !important;
  box-shadow: 2px 0 0 #374151 !important;
}

body.dark-mode .main-tickets-unified-table thead th:not(:last-child) {
  border-right-color: #374151 !important;
}

/* Elenco assistenze: contenuto colonna Cliente realmente fisso */
.main-tickets-table,
.main-tickets-unified-table,
.ticket-section-body {
  overflow-x: auto !important;
}

.main-ticket-inner-table {
  position: relative !important;
}

.main-ticket-unified-box {
  overflow: visible !important;
}

.main-ticket-unified-box .main-ticket-inner-table .ticket-client-sticky {
  position: sticky !important;
  left: 0 !important;
  z-index: 30 !important;
  background: #ffffff !important;
  background-clip: padding-box !important;
  box-shadow: 3px 0 0 #e5e7eb, 6px 0 10px rgba(15, 23, 42, .08) !important;
}

.main-ticket-unified-box .main-ticket-inner-table .ticket-client-sticky>* {
  position: relative !important;
  z-index: 31 !important;
}

.main-tickets-unified-table thead th:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 40 !important;
  background: #f4f7fb !important;
  background-clip: padding-box !important;
  box-shadow: 3px 0 0 #dbe3ee, 6px 0 10px rgba(15, 23, 42, .08) !important;
}

.main-ticket-unified-cell {
  overflow: visible !important;
}

body.dark-mode .main-ticket-unified-box .main-ticket-inner-table .ticket-client-sticky {
  background: #111827 !important;
  box-shadow: 3px 0 0 #334155, 6px 0 10px rgba(0, 0, 0, .35) !important;
}

body.dark-mode .main-tickets-unified-table thead th:first-child {
  background: #1f2937 !important;
  box-shadow: 3px 0 0 #374151, 6px 0 10px rgba(0, 0, 0, .35) !important;
}

/* Elenco assistenze: solo funzionalità Cliente fisso, senza modifiche visuali */
.ticket-section-body {
  overflow-x: auto !important;
}

.main-tickets-table thead th:first-child,
.main-tickets-table .ticket-client-sticky {
  position: sticky !important;
  left: 0 !important;
}

.main-tickets-table thead th:first-child {
  z-index: 60 !important;
}

.main-tickets-table .ticket-client-sticky {
  z-index: 50 !important;
  background: inherit;
  background-clip: padding-box !important;
}

.main-tickets-table .ticket-client-sticky>* {
  position: relative !important;
  z-index: 51 !important;
}

body.dark-mode .main-tickets-table .ticket-client-sticky {
  background: inherit;
}

/* Elenco assistenze: supporto funzionale colonna Cliente fissa senza modifiche estetiche */
.main-tickets-table thead th:first-child,
.main-tickets-table .ticket-client-sticky {
  will-change: transform !important;
}

/* FIX PULITO: Cliente fisso reale senza overlay e senza cambiare layout */
.ticket-section-body {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  position: relative !important;
}

.main-tickets-table {
  border-collapse: separate !important;
}

.main-tickets-table thead th:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 100 !important;
  background: inherit !important;
  background-clip: padding-box !important;
}

.main-ticket-unified-cell,
.main-ticket-unified-box {
  overflow: visible !important;
}

.main-ticket-inner-table {
  position: relative !important;
  overflow: visible !important;
}

.main-ticket-inner-table .ticket-client-sticky {
  position: sticky !important;
  left: 0 !important;
  z-index: 90 !important;
  background: inherit !important;
  background-clip: padding-box !important;
}

.main-ticket-inner-table .ticket-client-sticky>* {
  position: relative !important;
  z-index: 91 !important;
}

.main-ticket-inner-table .ticket-client-sticky,
.main-tickets-table thead th:first-child {
  transform: none !important;
  will-change: auto !important;
}

.tickets-client-fixed-overlay,
.ticket-client-sticky-overlay {
  display: none !important;
}

/* Elenco assistenze: filtri più piccoli */
#ticketsHomeSection .filters,
#ticketsPopupPage .filters {
  gap: 8px !important;
  align-items: end !important;
}

#ticketsHomeSection .filters label,
#ticketsPopupPage .filters label {
  font-size: 11px !important;
  margin-bottom: 3px !important;
}

#ticketsHomeSection .filters input,
#ticketsHomeSection .filters select,
#ticketsPopupPage .filters input,
#ticketsPopupPage .filters select {
  height: 32px !important;
  min-height: 32px !important;
  padding: 5px 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

#ticketsHomeSection .filters button,
#ticketsPopupPage .filters button {
  height: 32px !important;
  min-height: 32px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
}

/* Dettaglio macchina > Assistenze: Tecnici coinvolti al posto di Priorità */
.machine-detail-assistance-table .machine-col-tecnici,
.machine-detail-assistance-inner-table .machine-col-tecnici {
  width: 9% !important;
}

.machine-detail-tech-list {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 4px !important;
}

.machine-detail-tech-chip {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: #eef4ff !important;
  border: 1px solid #c8d4e5 !important;
  color: #082765 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  max-width: 100% !important;
  word-break: break-word !important;
}

.machine-detail-tech-empty {
  color: #64748b !important;
  font-weight: 900 !important;
}

body.dark-mode .machine-detail-tech-chip {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #60a5fa !important;
}

body.dark-mode .machine-detail-tech-empty {
  color: #94a3b8 !important;
}

/* Dettaglio macchina > File: bottone visualizza con occhio */
.machine-file-view-btn {
  width: 36px !important;
  height: 32px !important;
  min-width: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  border: 1px solid #60a5fa !important;
  background: #eef4ff !important;
  color: #2563eb !important;
  cursor: pointer !important;
}

.machine-file-view-btn .eye-icon {
  width: 19px !important;
  height: 19px !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.machine-file-view-btn:hover {
  background: #dbeafe !important;
}

body.dark-mode .machine-file-view-btn {
  background: #0f172a !important;
  border-color: #60a5fa !important;
  color: #60a5fa !important;
}

body.dark-mode .machine-file-view-btn:hover {
  background: #1e293b !important;
}

/* Dettaglio macchina > File: bottone occhio senza animazione */
.machine-file-view-btn,
.machine-file-view-btn:hover {
  transform: none !important;
  transition: none !important;
}

/* Dettaglio macchina > Costi: totali sotto grafico più piccoli e uniformi */
#machineDetailModal .machine-costs-summary-after-chart,
#machineDetailModal .machine-costs-group-summary-after-chart {
  gap: 8px !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-costs-summary-after-chart .machine-cost-card,
#machineDetailModal .machine-costs-group-summary-after-chart .machine-cost-card {
  min-height: 0 !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

#machineDetailModal .machine-costs-summary-after-chart .machine-cost-label,
#machineDetailModal .machine-costs-group-summary-after-chart .machine-cost-label {
  font-size: 11px !important;
  line-height: 1.15 !important;
  margin-bottom: 4px !important;
}

#machineDetailModal .machine-costs-summary-after-chart .machine-cost-number,
#machineDetailModal .machine-costs-group-summary-after-chart .machine-cost-number {
  font-size: 16px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-costs-summary-after-chart .machine-cost-card *,
#machineDetailModal .machine-costs-group-summary-after-chart .machine-cost-card * {
  box-sizing: border-box !important;
}

/* Dettaglio macchina > Costi: totali gruppi dentro menu a tendina */
#machineDetailModal .machine-cost-total-hours-toggle {
  cursor: pointer !important;
  user-select: none !important;
}

#machineDetailModal .machine-cost-total-hours-toggle:focus {
  outline: 2px solid #60a5fa !important;
  outline-offset: 2px !important;
}

#machineDetailModal .machine-cost-dropdown-chevron {
  display: inline-flex !important;
  margin-left: 6px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-costs-group-dropdown {
  margin-top: 8px !important;
}

#machineDetailModal .machine-costs-group-dropdown.collapsed {
  display: none !important;
}

#machineDetailModal .machine-costs-group-dropdown .machine-costs-group-summary-after-chart {
  margin-top: 0 !important;
}

/* Dettaglio macchina > Costi: dropdown stesso perimetro dei totali e sfondo visibile */
#machineDetailModal .machine-costs-group-dropdown {
  margin-top: 8px !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  box-sizing: border-box !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06) !important;
}

#machineDetailModal .machine-costs-group-dropdown.collapsed {
  display: none !important;
}

#machineDetailModal .machine-costs-group-dropdown .machine-costs-group-summary-after-chart {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#machineDetailModal .machine-costs-group-dropdown .machine-cost-card {
  background: #f8fbff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 10px !important;
}

body.dark-mode #machineDetailModal .machine-costs-group-dropdown {
  background: #111827 !important;
  border-color: #374151 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .32) !important;
}

body.dark-mode #machineDetailModal .machine-costs-group-dropdown .machine-cost-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

/* Dettaglio macchina > Costi: dropdown totali gruppi uguale/più piccolo dei totali principali */
#machineDetailModal .machine-costs-summary-after-chart .machine-cost-card,
#machineDetailModal .machine-costs-group-dropdown .machine-cost-card {
  min-height: 58px !important;
  height: 58px !important;
  padding: 7px 9px !important;
  border-radius: 10px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: hidden !important;
}

#machineDetailModal .machine-costs-summary-after-chart .machine-cost-label,
#machineDetailModal .machine-costs-group-dropdown .machine-cost-label {
  font-size: 10px !important;
  line-height: 1.05 !important;
  margin: 0 0 3px 0 !important;
  font-weight: 900 !important;
  text-align: center !important;
}

#machineDetailModal .machine-costs-summary-after-chart .machine-cost-number,
#machineDetailModal .machine-costs-group-dropdown .machine-cost-number {
  font-size: 14px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  text-align: center !important;
  margin: 0 !important;
}

#machineDetailModal .machine-costs-group-dropdown .machine-cost-card div[style*="margin-top:6px"] {
  margin-top: 2px !important;
  font-size: 10px !important;
  line-height: 1.05 !important;
}

#machineDetailModal .machine-costs-group-dropdown {
  padding: 8px !important;
}

#machineDetailModal .machine-costs-group-dropdown .machine-costs-group-summary-after-chart {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 8px !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-costs-summary-after-chart {
  grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
  gap: 8px !important;
}

/* Dettaglio macchina > Costi: tecnici dentro il riquadro Totale ore lavorative */
#machineDetailModal .machine-cost-total-hours-toggle {
  height: auto !important;
  min-height: 58px !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-cost-number {
  text-align: center !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-dropdown {
  width: 100% !important;
  margin: 7px 0 0 0 !important;
  padding: 7px 0 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid #dbe3ee !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-dropdown.collapsed {
  display: none !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-summary-after-chart {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-summary-after-chart .machine-cost-card {
  height: auto !important;
  min-height: 0 !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  background: #f8fbff !important;
  border: 1px solid #dbe3ee !important;
  box-shadow: none !important;
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  gap: 6px !important;
  align-items: center !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-summary-after-chart .machine-cost-label {
  font-size: 9.5px !important;
  line-height: 1 !important;
  margin: 0 !important;
  text-align: left !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-summary-after-chart .machine-cost-number {
  font-size: 11px !important;
  line-height: 1 !important;
  margin: 0 !important;
  text-align: right !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-summary-after-chart .machine-cost-card div[style*="margin-top:6px"] {
  margin: 0 !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
  text-align: right !important;
}

body.dark-mode #machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-dropdown {
  border-top-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-summary-after-chart .machine-cost-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

/* Dettaglio macchina > Costi: espande meglio la finestra quando la tendina è aperta */
#machineDetailModal .machine-costs-work-section.machine-costs-dropdown-open {
  padding-bottom: 18px !important;
}

#machineDetailModal .machine-costs-work-section.machine-costs-dropdown-open .machine-cost-total-hours-toggle {
  min-height: 118px !important;
  overflow: visible !important;
}

#machineDetailModal .machine-costs-work-section.machine-costs-dropdown-open .machine-costs-summary-after-chart {
  align-items: start !important;
}

#machineDetailModal .machine-costs-work-section.machine-costs-dropdown-open .machine-costs-group-dropdown {
  max-height: none !important;
  overflow: visible !important;
}

#machineDetailModal .machine-costs-work-section.machine-costs-dropdown-open .machine-costs-group-summary-after-chart {
  max-height: none !important;
  overflow: visible !important;
}

#machineDetailModal .popup-modal-body {
  scroll-behavior: smooth !important;
}

/* Dettaglio macchina > Costi: freccia grande a destra e dropdown anche sui costi */
#machineDetailModal .machine-cost-label-with-chevron {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  gap: 8px !important;
}

#machineDetailModal .machine-cost-dropdown-chevron {
  justify-self: end !important;
  margin-left: 0 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  min-width: 22px !important;
  text-align: right !important;
  color: #082765 !important;
}

#machineDetailModal .machine-cost-total-hours-toggle,
#machineDetailModal .machine-cost-total-cost-toggle {
  cursor: pointer !important;
  user-select: none !important;
}

#machineDetailModal .machine-cost-total-hours-toggle.machine-cost-card-open,
#machineDetailModal .machine-cost-total-cost-toggle.machine-cost-card-open {
  height: auto !important;
  min-height: 118px !important;
  overflow: visible !important;
}

#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-dropdown {
  width: 100% !important;
  margin: 7px 0 0 0 !important;
  padding: 7px 0 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid #dbe3ee !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-dropdown.collapsed {
  display: none !important;
}

#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-summary-after-chart {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-summary-after-chart .machine-cost-card {
  height: auto !important;
  min-height: 0 !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  background: #f8fbff !important;
  border: 1px solid #dbe3ee !important;
  box-shadow: none !important;
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  gap: 6px !important;
  align-items: center !important;
}

#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-summary-after-chart .machine-cost-label {
  font-size: 9.5px !important;
  line-height: 1 !important;
  margin: 0 !important;
  text-align: left !important;
}

#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-summary-after-chart .machine-cost-number {
  font-size: 11px !important;
  line-height: 1 !important;
  margin: 0 !important;
  text-align: right !important;
}

#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-summary-after-chart .machine-cost-card div[style*="margin-top:6px"] {
  margin: 0 !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
  text-align: right !important;
}

body.dark-mode #machineDetailModal .machine-cost-dropdown-chevron {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-dropdown {
  border-top-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-summary-after-chart .machine-cost-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

/* Dettaglio macchina > Costi: menu ore solo ore, menu costi solo costi */
#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-summary-after-chart .machine-cost-card,
#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-summary-after-chart .machine-cost-card {
  grid-template-columns: 1fr auto !important;
}

#machineDetailModal .machine-cost-total-hours-toggle .machine-costs-group-summary-after-chart .machine-cost-card div[style*="margin-top:6px"],
#machineDetailModal .machine-cost-total-cost-toggle .machine-costs-group-summary-after-chart .machine-cost-card div[style*="margin-top:6px"] {
  display: none !important;
}


/* Dettaglio macchina > File: occhio senza animazione anche quando selezionato/premuto */
.machine-file-view-btn,
.machine-file-view-btn:hover,
.machine-file-view-btn:focus,
.machine-file-view-btn:focus-visible,
.machine-file-view-btn:active {
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

.machine-file-view-btn:focus,
.machine-file-view-btn:focus-visible,
.machine-file-view-btn:active {
  outline: none !important;
  box-shadow: none !important;
}

.machine-file-view-btn .eye-icon,
.machine-file-view-btn:hover .eye-icon,
.machine-file-view-btn:focus .eye-icon,
.machine-file-view-btn:active .eye-icon {
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

/* Dettaglio macchina > File: occhio Visualizza completamente senza animazioni */
#machineDetailModal .machine-file-actions .machine-file-view-btn,
#machineDetailModal .machine-file-actions .machine-file-view-btn:hover,
#machineDetailModal .machine-file-actions .machine-file-view-btn:focus,
#machineDetailModal .machine-file-actions .machine-file-view-btn:focus-visible,
#machineDetailModal .machine-file-actions .machine-file-view-btn:active,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"],
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:hover,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:focus,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:focus-visible,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:active {
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  rotate: 0deg !important;
  transition: none !important;
  animation: none !important;
  filter: none !important;
  outline: none !important;
  box-shadow: none !important;
}

#machineDetailModal .machine-file-actions .machine-file-view-btn::before,
#machineDetailModal .machine-file-actions .machine-file-view-btn::after,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]::before,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]::after {
  content: none !important;
  display: none !important;
  transition: none !important;
  animation: none !important;
}

#machineDetailModal .machine-file-actions .machine-file-view-btn .eye-icon,
#machineDetailModal .machine-file-actions .machine-file-view-btn .eye-icon *,
#machineDetailModal .machine-file-actions .machine-file-view-btn:hover .eye-icon,
#machineDetailModal .machine-file-actions .machine-file-view-btn:hover .eye-icon *,
#machineDetailModal .machine-file-actions .machine-file-view-btn:focus .eye-icon,
#machineDetailModal .machine-file-actions .machine-file-view-btn:focus .eye-icon *,
#machineDetailModal .machine-file-actions .machine-file-view-btn:active .eye-icon,
#machineDetailModal .machine-file-actions .machine-file-view-btn:active .eye-icon * {
  transform: none !important;
  translate: none !important;
  scale: 1 !important;
  rotate: 0deg !important;
  transition: none !important;
  animation: none !important;
  filter: none !important;
}

#machineDetailModal .machine-file-actions .machine-file-view-btn:hover,
#machineDetailModal .machine-file-actions .machine-file-view-btn:focus,
#machineDetailModal .machine-file-actions .machine-file-view-btn:active {
  background: #eef4ff !important;
  color: #2563eb !important;
  border-color: #60a5fa !important;
}

body.dark-mode #machineDetailModal .machine-file-actions .machine-file-view-btn:hover,
body.dark-mode #machineDetailModal .machine-file-actions .machine-file-view-btn:focus,
body.dark-mode #machineDetailModal .machine-file-actions .machine-file-view-btn:active {
  background: #0f172a !important;
  color: #60a5fa !important;
  border-color: #60a5fa !important;
}

/* Dettaglio macchina > Costi: dropdown ore/costi indipendenti */
#machineDetailModal .machine-costs-group-dropdown {
  cursor: default !important;
}

#machineDetailModal .machine-costs-group-dropdown * {
  cursor: default !important;
}

#machineDetailModal .machine-cost-total-hours-toggle,
#machineDetailModal .machine-cost-total-cost-toggle {
  cursor: pointer !important;
}

/* Dettaglio macchina > Costi: ore e costi aprono solo la propria tendina */
#machineDetailModal [data-action="toggle-machine-costs-hours-summary"],
#machineDetailModal [data-action="toggle-machine-costs-cost-summary"] {
  cursor: pointer !important;
}

/* Dettaglio macchina > Costi: ore e costi indipendenti, entrambe apribili insieme */
#machineDetailModal .machine-costs-work-section.machine-costs-dropdown-open .machine-cost-total-hours-toggle:not(.machine-cost-card-open),
#machineDetailModal .machine-costs-work-section.machine-costs-dropdown-open .machine-cost-total-cost-toggle:not(.machine-cost-card-open) {
  height: 58px !important;
  min-height: 58px !important;
  overflow: hidden !important;
}

#machineDetailModal .machine-cost-total-hours-toggle.machine-cost-card-open,
#machineDetailModal .machine-cost-total-cost-toggle.machine-cost-card-open {
  height: auto !important;
  min-height: 118px !important;
  overflow: visible !important;
}

#machineDetailModal .machine-cost-total-hours-toggle:not(.machine-cost-card-open) .machine-costs-group-dropdown,
#machineDetailModal .machine-cost-total-cost-toggle:not(.machine-cost-card-open) .machine-costs-group-dropdown {
  display: none !important;
}

#machineDetailModal .machine-cost-total-hours-toggle.machine-cost-card-open .machine-costs-group-dropdown,
#machineDetailModal .machine-cost-total-cost-toggle.machine-cost-card-open .machine-costs-group-dropdown {
  display: block !important;
}

/* Dettaglio macchina > File: bottone Visualizza semplice come Modifica elenco macchina */
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"] {
  background: #ffffff !important;
  color: #082765 !important;
  border: 1px solid #dbe3ee !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:hover,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:focus,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:focus-visible,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:active {
  background: #ffffff !important;
  color: #082765 !important;
  border-color: #dbe3ee !important;
  box-shadow: none !important;
  outline: none !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"] .eye-icon,
#machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"] .eye-icon * {
  stroke: currentColor !important;
  fill: none !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
}

body.dark-mode #machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"],
body.dark-mode #machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:hover,
body.dark-mode #machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:focus,
body.dark-mode #machineDetailModal button.machine-file-view-btn[data-action="open-machine-custom-file"]:active {
  background: #111827 !important;
  color: #dbeafe !important;
  border-color: #374151 !important;
  box-shadow: none !important;
}

/* Dettaglio macchina > Costi: menu esterno Costo interno */
#machineDetailModal .machine-internal-cost-menu {
  margin-top: 14px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#machineDetailModal .machine-internal-cost-header {
  width: 100% !important;
  min-height: 38px !important;
  padding: 8px 12px !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  gap: 10px !important;
  background: #f4f7fb !important;
  border: 0 !important;
  color: #082765 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-align: left !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transform: none !important;
  transition: none !important;
}

#machineDetailModal .machine-internal-cost-chevron {
  justify-self: end !important;
  font-size: 20px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-internal-cost-body {
  padding: 10px !important;
}

#machineDetailModal .machine-internal-cost-menu.collapsed .machine-internal-cost-body {
  display: none !important;
}

#machineDetailModal .machine-internal-cost-menu .machine-costs-summary-after-chart {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.dark-mode #machineDetailModal .machine-internal-cost-menu {
  background: #111827 !important;
  border-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-internal-cost-header {
  background: #1f2937 !important;
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: Costo interno fisso non espandibile */
#machineDetailModal .machine-internal-cost-menu {
  display: block !important;
}

#machineDetailModal .machine-internal-cost-header {
  cursor: default !important;
  pointer-events: none !important;
  display: flex !important;
  justify-content: flex-start !important;
}

#machineDetailModal .machine-internal-cost-chevron {
  display: none !important;
}

#machineDetailModal .machine-internal-cost-body,
#machineDetailModal .machine-internal-cost-menu.collapsed .machine-internal-cost-body {
  display: block !important;
}

/* Dettaglio macchina > Costi: sezione Costo esterno uguale a Costo interno */
#machineDetailModal .machine-external-cost-menu {
  margin-top: 12px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

#machineDetailModal .machine-external-cost-menu .machine-internal-cost-body {
  display: block !important;
}

#machineDetailModal .machine-external-cost-menu .machine-costs-summary-after-chart {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-menu {
  background: #111827 !important;
  border-color: #374151 !important;
}

/* Dettaglio macchina > Costi: ore esterne da fogli ore consegnati */
#machineDetailModal .machine-external-cost-menu .machine-cost-label {
  text-align: center !important;
}

/* Dettaglio macchina > Costi: colonne Da e A unite */
#machineDetailModal .machine-cost-date-range {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 900 !important;
  color: #082765 !important;
  line-height: 1.15 !important;
}

#machineDetailModal .machine-cost-date-range span {
  display: block !important;
  white-space: nowrap !important;
}

body.dark-mode #machineDetailModal .machine-cost-date-range {
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: tendina utenti ore esterne */
#machineDetailModal .machine-external-hours-toggle {
  cursor: pointer !important;
  user-select: none !important;
  height: auto !important;
  min-height: 58px !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-hours-toggle:not(.machine-external-hours-open) .machine-external-hours-dropdown {
  display: none !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-dropdown {
  display: block !important;
}

#machineDetailModal .machine-external-hours-dropdown {
  width: 100% !important;
  margin: 7px 0 0 0 !important;
  padding: 7px 0 0 0 !important;
  border-top: 1px solid #dbe3ee !important;
  background: transparent !important;
  box-shadow: none !important;
}

#machineDetailModal .machine-external-hours-users {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

#machineDetailModal .machine-external-hours-user-row {
  display: grid !important;
  grid-template-columns: minmax(90px, 1fr) 2fr !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 5px 6px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  background: #f8fbff !important;
  box-sizing: border-box !important;
}

#machineDetailModal .machine-external-hours-user-name {
  font-size: 10px !important;
  font-weight: 900 !important;
  color: #082765 !important;
  text-align: left !important;
  line-height: 1.05 !important;
}

#machineDetailModal .machine-external-hours-user-values {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  gap: 5px 8px !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  line-height: 1.05 !important;
  color: #64748b !important;
}

#machineDetailModal .machine-external-hours-user-values strong {
  color: #082765 !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-external-hours-empty {
  padding: 6px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  color: #64748b !important;
  text-align: center !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-dropdown {
  border-top-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-user-row {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-user-name,
body.dark-mode #machineDetailModal .machine-external-hours-user-values strong {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-user-values,
body.dark-mode #machineDetailModal .machine-external-hours-empty {
  color: #94a3b8 !important;
}

/* Dettaglio macchina > Costi: apertura funzionante tendina Ore esterne */
#machineDetailModal .machine-external-hours-toggle {
  cursor: pointer !important;
  user-select: none !important;
  height: auto !important;
  min-height: 58px !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-hours-dropdown.collapsed {
  display: none !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-dropdown,
#machineDetailModal .machine-external-hours-dropdown:not(.collapsed) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Dettaglio macchina > Costi: tendina Ore esterne uguale alle Ore interne */
#machineDetailModal .machine-external-hours-toggle .machine-external-hours-dropdown {
  width: 100% !important;
  margin: 7px 0 0 0 !important;
  padding: 7px 0 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid #dbe3ee !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#machineDetailModal .machine-external-hours-toggle .machine-external-hours-dropdown.collapsed {
  display: none !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-dropdown {
  display: block !important;
}

#machineDetailModal .machine-external-hours-toggle .machine-external-hours-users {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
}

#machineDetailModal .machine-external-hours-toggle .machine-external-hours-user-card {
  height: auto !important;
  min-height: 0 !important;
  padding: 4px 6px !important;
  border-radius: 7px !important;
  background: #f8fbff !important;
  border: 1px solid #dbe3ee !important;
  box-shadow: none !important;
  display: grid !important;
  grid-template-columns: 1fr auto auto !important;
  gap: 6px !important;
  align-items: center !important;
  width: 100% !important;
}

#machineDetailModal .machine-external-hours-toggle .machine-external-hours-user-card .machine-cost-label {
  font-size: 9.5px !important;
  line-height: 1 !important;
  margin: 0 !important;
  text-align: left !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-external-hours-toggle .machine-external-hours-user-card .machine-cost-number {
  font-size: 11px !important;
  line-height: 1 !important;
  margin: 0 !important;
  text-align: right !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-external-hours-breakdown {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  align-items: flex-end !important;
  justify-content: center !important;
  font-size: 9.5px !important;
  line-height: 1 !important;
  color: #64748b !important;
  font-weight: 800 !important;
}

#machineDetailModal .machine-external-hours-breakdown span {
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-hours-breakdown strong {
  color: #082765 !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-external-hours-user-row,
#machineDetailModal .machine-external-hours-user-values,
#machineDetailModal .machine-external-hours-user-name {
  all: unset;
}

#machineDetailModal .machine-external-hours-empty {
  padding: 6px !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  color: #64748b !important;
  text-align: center !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-toggle .machine-external-hours-dropdown {
  border-top-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-toggle .machine-external-hours-user-card {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-breakdown,
body.dark-mode #machineDetailModal .machine-external-hours-empty {
  color: #94a3b8 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-breakdown strong {
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: contenuto tendina Ore esterne ottimizzato */
#machineDetailModal .machine-external-hours-users-optimized {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

#machineDetailModal .machine-external-hours-user-card-optimized {
  width: 100% !important;
  box-sizing: border-box !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 8px !important;
  background: #f8fbff !important;
  padding: 6px 7px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

#machineDetailModal .machine-external-hours-user-title {
  font-size: 10.5px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  color: #082765 !important;
  text-align: left !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-hours-values-grid {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

#machineDetailModal .machine-external-hours-values-grid div {
  min-width: 0 !important;
  box-sizing: border-box !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  padding: 4px 5px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 5px !important;
}

#machineDetailModal .machine-external-hours-values-grid span {
  font-size: 9.5px !important;
  line-height: 1 !important;
  color: #64748b !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-hours-values-grid strong {
  font-size: 10.5px !important;
  line-height: 1 !important;
  color: #082765 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-hours-values-grid .machine-external-hours-total {
  background: #eef4ff !important;
  border-color: #c8d4e5 !important;
}

#machineDetailModal .machine-external-hours-values-grid .machine-external-hours-total span,
#machineDetailModal .machine-external-hours-values-grid .machine-external-hours-total strong {
  color: #082765 !important;
}

#machineDetailModal .machine-external-hours-user-card,
#machineDetailModal .machine-external-hours-breakdown {
  display: none !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-user-card-optimized {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-user-title,
body.dark-mode #machineDetailModal .machine-external-hours-values-grid strong,
body.dark-mode #machineDetailModal .machine-external-hours-values-grid .machine-external-hours-total span,
body.dark-mode #machineDetailModal .machine-external-hours-values-grid .machine-external-hours-total strong {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-values-grid div {
  background: #111827 !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-values-grid span {
  color: #94a3b8 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-values-grid .machine-external-hours-total {
  background: #1e293b !important;
  border-color: #475569 !important;
}

/* Dettaglio macchina > Costi: tendina Ore esterne espansa */
#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open {
  height: auto !important;
  min-height: 190px !important;
  overflow: visible !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-dropdown {
  width: 100% !important;
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-users-optimized {
  max-height: none !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-cost-menu,
#machineDetailModal .machine-external-cost-menu .machine-internal-cost-body,
#machineDetailModal .machine-external-cost-menu .machine-costs-summary-after-chart {
  overflow: visible !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-user-card-optimized {
  min-height: 92px !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-values-grid {
  grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-values-grid div {
  min-height: 30px !important;
}

/* Dettaglio macchina > Costi: ore esterne in tabella compatta */
#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open {
  min-height: 0 !important;
  height: auto !important;
}

#machineDetailModal .machine-external-hours-toggle.machine-external-hours-open .machine-external-hours-dropdown {
  padding-top: 6px !important;
}

#machineDetailModal .machine-external-hours-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  margin: 0 !important;
}

#machineDetailModal .machine-external-hours-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  margin: 0 !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  overflow: hidden !important;
}

#machineDetailModal .machine-external-hours-table th,
#machineDetailModal .machine-external-hours-table td {
  padding: 4px 5px !important;
  border-right: 1px solid #e5e7eb !important;
  border-bottom: 1px solid #e5e7eb !important;
  font-size: 9.5px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-hours-table th {
  background: #f4f7fb !important;
  color: #082765 !important;
  text-transform: uppercase !important;
}

#machineDetailModal .machine-external-hours-table td {
  color: #082765 !important;
}

#machineDetailModal .machine-external-hours-table th:first-child,
#machineDetailModal .machine-external-hours-table td:first-child {
  text-align: left !important;
  width: 28% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-hours-table th:last-child,
#machineDetailModal .machine-external-hours-table td:last-child {
  border-right: 0 !important;
  background: #eef4ff !important;
}

#machineDetailModal .machine-external-hours-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

#machineDetailModal .machine-external-hours-users-optimized,
#machineDetailModal .machine-external-hours-user-card-optimized,
#machineDetailModal .machine-external-hours-values-grid {
  display: none !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-table {
  background: #111827 !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-table th {
  background: #1f2937 !important;
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-table td {
  color: #dbeafe !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-hours-table th:last-child,
body.dark-mode #machineDetailModal .machine-external-hours-table td:last-child {
  background: #1e293b !important;
}

/* Dettaglio macchina > Costi: titoli colonne Ore esterne abbreviati */
#machineDetailModal .machine-external-hours-table th {
  font-size: 9px !important;
  letter-spacing: .01em !important;
}

/* Dettaglio macchina > Costi: Ore esterne solo Straord. e Tot. */
#machineDetailModal .machine-external-hours-table th:first-child,
#machineDetailModal .machine-external-hours-table td:first-child {
  width: 46% !important;
}

#machineDetailModal .machine-external-hours-table th:nth-child(2),
#machineDetailModal .machine-external-hours-table td:nth-child(2),
#machineDetailModal .machine-external-hours-table th:nth-child(3),
#machineDetailModal .machine-external-hours-table td:nth-child(3) {
  width: 27% !important;
}

/* Dettaglio macchina > Costi: dropdown Costo ore utente per utente */
#machineDetailModal .machine-external-cost-toggle {
  cursor: pointer !important;
  user-select: none !important;
  height: auto !important;
  min-height: 58px !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-cost-dropdown.collapsed {
  display: none !important;
}

#machineDetailModal .machine-external-cost-toggle.machine-external-cost-open .machine-external-cost-dropdown,
#machineDetailModal .machine-external-cost-dropdown:not(.collapsed) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#machineDetailModal .machine-external-cost-dropdown {
  width: 100% !important;
  margin: 7px 0 0 0 !important;
  padding: 6px 0 0 0 !important;
  border-top: 1px solid #dbe3ee !important;
  background: transparent !important;
  box-shadow: none !important;
}

#machineDetailModal .machine-external-cost-table th:first-child,
#machineDetailModal .machine-external-cost-table td:first-child {
  width: 46% !important;
}

#machineDetailModal .machine-external-cost-table th:nth-child(2),
#machineDetailModal .machine-external-cost-table td:nth-child(2),
#machineDetailModal .machine-external-cost-table th:nth-child(3),
#machineDetailModal .machine-external-cost-table td:nth-child(3) {
  width: 27% !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-dropdown {
  border-top-color: #374151 !important;
}

/* Dettaglio macchina > Costi: dropdown costo esterno visibile come Ore interne */
#machineDetailModal .machine-external-cost-menu,
#machineDetailModal .machine-external-cost-menu .machine-internal-cost-body,
#machineDetailModal .machine-external-cost-menu .machine-costs-summary-after-chart {
  overflow: visible !important;
}

#machineDetailModal .machine-external-cost-toggle {
  cursor: pointer !important;
  user-select: none !important;
  height: auto !important;
  min-height: 58px !important;
  overflow: visible !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-dropdown {
  width: 100% !important;
  margin: 7px 0 0 0 !important;
  padding: 7px 0 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid #dbe3ee !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  max-height: none !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-cost-dropdown.collapsed,
#machineDetailModal .machine-external-cost-toggle:not(.machine-external-cost-open) .machine-external-cost-dropdown {
  display: none !important;
}

#machineDetailModal .machine-external-cost-toggle.machine-external-cost-open {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-cost-toggle.machine-external-cost-open .machine-external-cost-dropdown,
#machineDetailModal .machine-external-cost-dropdown:not(.collapsed) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-hours-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  margin: 0 !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table {
  width: 100% !important;
  min-width: 0 !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  margin: 0 !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  overflow: hidden !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table th,
#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table td {
  padding: 4px 5px !important;
  border-right: 1px solid #e5e7eb !important;
  border-bottom: 1px solid #e5e7eb !important;
  font-size: 9.5px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table th {
  background: #f4f7fb !important;
  color: #082765 !important;
  text-transform: uppercase !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table td {
  color: #082765 !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table th:first-child,
#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table td:first-child {
  text-align: left !important;
  width: 46% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table th:nth-child(2),
#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table td:nth-child(2),
#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table th:nth-child(3),
#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table td:nth-child(3) {
  width: 27% !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table th:last-child,
#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table td:last-child {
  border-right: 0 !important;
  background: #eef4ff !important;
}

#machineDetailModal .machine-external-cost-toggle .machine-external-cost-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-toggle .machine-external-cost-dropdown {
  border-top-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-toggle .machine-external-cost-table {
  background: #111827 !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-toggle .machine-external-cost-table th {
  background: #1f2937 !important;
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-toggle .machine-external-cost-table td {
  color: #dbeafe !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-toggle .machine-external-cost-table th:last-child,
body.dark-mode #machineDetailModal .machine-external-cost-toggle .machine-external-cost-table td:last-child {
  background: #1e293b !important;
}

/* Dettaglio macchina > Costi: costo ore utente e spese scontrini */
#machineDetailModal .machine-external-receipts-card .machine-cost-number {
  font-size: 14px !important;
  line-height: 1.15 !important;
  word-break: break-word !important;
}

#machineDetailModal .machine-external-receipts-card {
  height: auto !important;
  min-height: 58px !important;
}

/* Dettaglio macchina > Costi: Spese scontrini dentro Costo ore utente */
#machineDetailModal .machine-external-receipts-card {
  display: none !important;
}

#machineDetailModal .machine-external-receipts-inside {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 6px 0 !important;
  padding: 5px 6px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  background: #eef4ff !important;
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  gap: 8px !important;
}

#machineDetailModal .machine-external-receipts-inside span {
  font-size: 9.5px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #64748b !important;
  text-align: left !important;
}

#machineDetailModal .machine-external-receipts-inside strong {
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  color: #082765 !important;
  text-align: right !important;
}

body.dark-mode #machineDetailModal .machine-external-receipts-inside {
  background: #1e293b !important;
  border-color: #475569 !important;
}

body.dark-mode #machineDetailModal .machine-external-receipts-inside span {
  color: #94a3b8 !important;
}

body.dark-mode #machineDetailModal .machine-external-receipts-inside strong {
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: costo ore utente con spese affiancate e specifico per utente */
#machineDetailModal .machine-external-cost-summary-inline {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin: 0 0 7px 0 !important;
}

#machineDetailModal .machine-external-cost-summary-inline>div {
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 5px 6px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  background: #eef4ff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

#machineDetailModal .machine-external-cost-summary-inline span {
  font-size: 9.5px !important;
  line-height: 1 !important;
  color: #64748b !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-cost-summary-inline strong {
  font-size: 10.5px !important;
  line-height: 1 !important;
  color: #082765 !important;
  font-weight: 900 !important;
  text-align: right !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-cost-user-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  width: 100% !important;
}

#machineDetailModal .machine-external-cost-user-row {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 5px 6px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  background: #f8fbff !important;
  display: grid !important;
  grid-template-columns: minmax(68px, 0.8fr) minmax(0, 2fr) minmax(68px, 0.9fr) !important;
  gap: 6px !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-external-cost-user-name {
  font-size: 9.5px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  color: #082765 !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-cost-user-detail {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 4px !important;
}

#machineDetailModal .machine-external-cost-user-detail div,
#machineDetailModal .machine-external-cost-user-total {
  min-width: 0 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  padding: 3px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  justify-content: center !important;
}

#machineDetailModal .machine-external-cost-user-detail span,
#machineDetailModal .machine-external-cost-user-total span {
  font-size: 8.5px !important;
  line-height: 1 !important;
  color: #64748b !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-cost-user-detail strong,
#machineDetailModal .machine-external-cost-user-total strong {
  font-size: 9.5px !important;
  line-height: 1 !important;
  color: #082765 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-cost-user-total {
  background: #eef4ff !important;
  border-color: #c8d4e5 !important;
}

#machineDetailModal .machine-external-receipts-inside,
#machineDetailModal .machine-external-cost-table {
  display: none !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-summary-inline>div,
body.dark-mode #machineDetailModal .machine-external-cost-user-total {
  background: #1e293b !important;
  border-color: #475569 !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-user-row {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-user-detail div {
  background: #111827 !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-user-name,
body.dark-mode #machineDetailModal .machine-external-cost-summary-inline strong,
body.dark-mode #machineDetailModal .machine-external-cost-user-detail strong,
body.dark-mode #machineDetailModal .machine-external-cost-user-total strong {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-cost-summary-inline span,
body.dark-mode #machineDetailModal .machine-external-cost-user-detail span,
body.dark-mode #machineDetailModal .machine-external-cost-user-total span {
  color: #94a3b8 !important;
}

/* Dettaglio macchina > Costi: esterno ore e costo uniti */
#machineDetailModal .machine-external-combined-toggle {
  cursor: pointer !important;
  user-select: none !important;
  height: auto !important;
  min-height: 58px !important;
  overflow: visible !important;
  align-items: stretch !important;
}

#machineDetailModal .machine-external-combined-totals {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  margin-top: 3px !important;
}

#machineDetailModal .machine-external-combined-totals div {
  min-width: 0 !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  background: #f8fbff !important;
  padding: 5px 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
}

#machineDetailModal .machine-external-combined-totals span,
#machineDetailModal .machine-external-combined-summary span {
  font-size: 9.5px !important;
  line-height: 1 !important;
  color: #64748b !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-combined-totals strong,
#machineDetailModal .machine-external-combined-summary strong {
  font-size: 11px !important;
  line-height: 1 !important;
  color: #082765 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-combined-dropdown.collapsed,
#machineDetailModal .machine-external-combined-toggle:not(.machine-external-combined-open) .machine-external-combined-dropdown {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-external-combined-dropdown,
#machineDetailModal .machine-external-combined-dropdown:not(.collapsed) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

#machineDetailModal .machine-external-combined-dropdown {
  width: 100% !important;
  margin: 7px 0 0 0 !important;
  padding: 7px 0 0 0 !important;
  border-top: 1px solid #dbe3ee !important;
  background: transparent !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-combined-summary {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  margin: 0 0 6px 0 !important;
}

#machineDetailModal .machine-external-combined-summary div {
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 5px 6px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  background: #eef4ff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

#machineDetailModal .machine-external-combined-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
}

#machineDetailModal .machine-external-combined-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 7px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

#machineDetailModal .machine-external-combined-table th,
#machineDetailModal .machine-external-combined-table td {
  padding: 4px 5px !important;
  border-right: 1px solid #e5e7eb !important;
  border-bottom: 1px solid #e5e7eb !important;
  font-size: 9px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-combined-table th {
  background: #f4f7fb !important;
  color: #082765 !important;
  text-transform: uppercase !important;
}

#machineDetailModal .machine-external-combined-table td {
  color: #082765 !important;
}

#machineDetailModal .machine-external-combined-table th:first-child,
#machineDetailModal .machine-external-combined-table td:first-child {
  text-align: left !important;
  width: 24% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-combined-table th:last-child,
#machineDetailModal .machine-external-combined-table td:last-child {
  border-right: 0 !important;
  background: #eef4ff !important;
}

#machineDetailModal .machine-external-hours-toggle,
#machineDetailModal .machine-external-cost-toggle,
#machineDetailModal .machine-external-hours-dropdown,
#machineDetailModal .machine-external-cost-dropdown {
  display: none !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-totals div,
body.dark-mode #machineDetailModal .machine-external-combined-summary div,
body.dark-mode #machineDetailModal .machine-external-combined-table th:last-child,
body.dark-mode #machineDetailModal .machine-external-combined-table td:last-child {
  background: #1e293b !important;
  border-color: #475569 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-dropdown {
  border-top-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-table {
  background: #111827 !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-table th {
  background: #1f2937 !important;
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-table td {
  color: #dbeafe !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-totals strong,
body.dark-mode #machineDetailModal .machine-external-combined-summary strong {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-totals span,
body.dark-mode #machineDetailModal .machine-external-combined-summary span {
  color: #94a3b8 !important;
}

/* Dettaglio macchina > Costi: esterno largo e tendina leggibile */
#machineDetailModal .machine-external-cost-menu .machine-costs-summary-after-chart {
  display: block !important;
  grid-template-columns: 1fr !important;
  width: 100% !important;
}

#machineDetailModal .machine-external-combined-toggle {
  width: 100% !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
  box-sizing: border-box !important;
}

#machineDetailModal .machine-external-combined-totals {
  grid-template-columns: repeat(2, minmax(220px, 1fr)) !important;
  gap: 10px !important;
}

#machineDetailModal .machine-external-combined-totals div {
  min-height: 42px !important;
  padding: 7px 10px !important;
}

#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-external-combined-dropdown {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  padding-top: 10px !important;
}

#machineDetailModal .machine-external-combined-summary {
  margin-bottom: 10px !important;
}

#machineDetailModal .machine-external-combined-summary div {
  min-height: 38px !important;
  padding: 7px 10px !important;
}

#machineDetailModal .machine-external-combined-table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding-bottom: 2px !important;
}

#machineDetailModal .machine-external-combined-table {
  width: 100% !important;
  min-width: 760px !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

#machineDetailModal .machine-external-combined-table th,
#machineDetailModal .machine-external-combined-table td {
  padding: 8px 9px !important;
  font-size: 11px !important;
  line-height: 1.18 !important;
  vertical-align: middle !important;
  white-space: normal !important;
  word-break: normal !important;
}

#machineDetailModal .machine-external-combined-table th {
  font-size: 10px !important;
  letter-spacing: .02em !important;
}

#machineDetailModal .machine-external-combined-table th:first-child,
#machineDetailModal .machine-external-combined-table td:first-child {
  width: 24% !important;
  min-width: 160px !important;
  white-space: normal !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(2),
#machineDetailModal .machine-external-combined-table td:nth-child(2),
#machineDetailModal .machine-external-combined-table th:nth-child(3),
#machineDetailModal .machine-external-combined-table td:nth-child(3) {
  width: 15% !important;
  min-width: 105px !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(4),
#machineDetailModal .machine-external-combined-table td:nth-child(4) {
  width: 18% !important;
  min-width: 130px !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(5),
#machineDetailModal .machine-external-combined-table td:nth-child(5) {
  width: 28% !important;
  min-width: 190px !important;
  white-space: normal !important;
}

#machineDetailModal .machine-external-combined-table td {
  background: #ffffff !important;
}

#machineDetailModal .machine-external-combined-table td:last-child {
  background: #eef4ff !important;
}

@media(max-width:760px) {
  #machineDetailModal .machine-external-combined-totals {
    grid-template-columns: 1fr !important;
  }

  #machineDetailModal .machine-external-combined-table {
    min-width: 720px !important;
  }
}

body.dark-mode #machineDetailModal .machine-external-combined-table td {
  background: #111827 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-table td:last-child {
  background: #1e293b !important;
}

/* Dettaglio macchina > Costi: rimossa sezione Spese scontrini, mantenuta colonna Scontrini */
#machineDetailModal .machine-external-combined-summary {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-external-combined-dropdown {
  padding-top: 7px !important;
}

/* Dettaglio macchina > Costi: colonna Scontrini uguale alle altre e larghezze corrette */
#machineDetailModal .machine-external-combined-table th:last-child,
#machineDetailModal .machine-external-combined-table td:last-child {
  background: #ffffff !important;
  border-right: 0 !important;
}

#machineDetailModal .machine-external-combined-table th:first-child,
#machineDetailModal .machine-external-combined-table td:first-child {
  width: 24% !important;
  min-width: 150px !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(2),
#machineDetailModal .machine-external-combined-table td:nth-child(2),
#machineDetailModal .machine-external-combined-table th:nth-child(3),
#machineDetailModal .machine-external-combined-table td:nth-child(3) {
  width: 15% !important;
  min-width: 95px !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(4),
#machineDetailModal .machine-external-combined-table td:nth-child(4) {
  width: 18% !important;
  min-width: 115px !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(5),
#machineDetailModal .machine-external-combined-table td:nth-child(5) {
  width: 18% !important;
  min-width: 115px !important;
  white-space: normal !important;
}

#machineDetailModal .machine-external-combined-table {
  min-width: 670px !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-table th:last-child,
body.dark-mode #machineDetailModal .machine-external-combined-table td:last-child {
  background: #111827 !important;
}

/* Dettaglio macchina > Costi: Ore/Costo esterno pulito e leggibile */
#machineDetailModal .machine-external-cost-menu .machine-costs-summary-after-chart {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

#machineDetailModal .machine-external-combined-toggle {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 12px !important;
  min-height: 72px !important;
  height: auto !important;
  align-items: stretch !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron {
  margin: 0 0 8px 0 !important;
}

#machineDetailModal .machine-external-combined-totals {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 !important;
}

#machineDetailModal .machine-external-combined-totals div {
  min-height: 38px !important;
  padding: 7px 9px !important;
  border-radius: 8px !important;
  background: #f8fbff !important;
  border: 1px solid #dbe3ee !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

#machineDetailModal .machine-external-combined-totals span {
  font-size: 10px !important;
  line-height: 1 !important;
  color: #64748b !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

#machineDetailModal .machine-external-combined-totals strong {
  font-size: 14px !important;
  line-height: 1 !important;
  color: #082765 !important;
  font-weight: 900 !important;
  text-align: right !important;
}

#machineDetailModal .machine-external-combined-dropdown {
  margin-top: 8px !important;
  padding-top: 8px !important;
  border-top: 1px solid #dbe3ee !important;
  width: 100% !important;
  overflow: visible !important;
}

#machineDetailModal .machine-external-combined-dropdown.collapsed,
#machineDetailModal .machine-external-combined-toggle:not(.machine-external-combined-open) .machine-external-combined-dropdown {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-external-combined-dropdown {
  display: block !important;
}

#machineDetailModal .machine-external-combined-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

#machineDetailModal .machine-external-combined-table {
  width: 100% !important;
  min-width: 620px !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  border: 0 !important;
  margin: 0 !important;
}

#machineDetailModal .machine-external-combined-table th,
#machineDetailModal .machine-external-combined-table td {
  padding: 6px 7px !important;
  font-size: 10px !important;
  line-height: 1.12 !important;
  font-weight: 900 !important;
  text-align: center !important;
  white-space: nowrap !important;
  border-right: 1px solid #e5e7eb !important;
  border-bottom: 1px solid #e5e7eb !important;
}

#machineDetailModal .machine-external-combined-table th {
  background: #f4f7fb !important;
  color: #082765 !important;
  text-transform: uppercase !important;
  font-size: 9px !important;
}

#machineDetailModal .machine-external-combined-table td {
  background: #ffffff !important;
  color: #082765 !important;
}

#machineDetailModal .machine-external-combined-table th:first-child,
#machineDetailModal .machine-external-combined-table td:first-child {
  width: 24% !important;
  text-align: left !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(2),
#machineDetailModal .machine-external-combined-table td:nth-child(2),
#machineDetailModal .machine-external-combined-table th:nth-child(3),
#machineDetailModal .machine-external-combined-table td:nth-child(3) {
  width: 16% !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(4),
#machineDetailModal .machine-external-combined-table td:nth-child(4) {
  width: 20% !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(5),
#machineDetailModal .machine-external-combined-table td:nth-child(5) {
  width: 24% !important;
  background: #ffffff !important;
}

#machineDetailModal .machine-external-combined-table th:last-child,
#machineDetailModal .machine-external-combined-table td:last-child {
  border-right: 0 !important;
}

#machineDetailModal .machine-external-combined-table tbody tr:last-child td {
  border-bottom: 0 !important;
}

@media(max-width:760px) {
  #machineDetailModal .machine-external-combined-totals {
    grid-template-columns: 1fr !important;
  }
}

body.dark-mode #machineDetailModal .machine-external-combined-totals div {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-totals strong,
body.dark-mode #machineDetailModal .machine-external-combined-table th,
body.dark-mode #machineDetailModal .machine-external-combined-table td {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-table-wrap,
body.dark-mode #machineDetailModal .machine-external-combined-table td {
  background: #111827 !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-table th {
  background: #1f2937 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-dropdown {
  border-top-color: #374151 !important;
}

/* Dettaglio macchina > Costi: titolo Ore/Costo esterno rimosso */
#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron {
  justify-content: flex-end !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron span:first-child {
  display: none !important;
}

/* Dettaglio macchina > Costi: freccia tendina accanto al Costo a destra */
#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron {
  position: absolute !important;
  right: 22px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

#machineDetailModal .machine-external-combined-toggle {
  position: relative !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 22px !important;
  line-height: 1 !important;
  min-width: 24px !important;
  margin: 0 !important;
  color: #082765 !important;
}

#machineDetailModal .machine-external-combined-totals div:nth-child(2) {
  padding-right: 42px !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: freccia Costo esterno fuori dal riquadro costo */
#machineDetailModal .machine-external-combined-toggle {
  position: relative !important;
  padding-right: 46px !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 10 !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron span:first-child {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  margin: 0 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  color: #082765 !important;
}

#machineDetailModal .machine-external-combined-totals div:nth-child(2) {
  padding-right: 9px !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: freccia Costo esterno senza sormonto testo */
#machineDetailModal .machine-external-combined-toggle {
  position: relative !important;
  padding-right: 58px !important;
}

#machineDetailModal .machine-external-combined-totals {
  width: calc(100% - 42px) !important;
  margin-right: 42px !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 20 !important;
  background: transparent !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron span:first-child {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  color: #082765 !important;
}

#machineDetailModal .machine-external-combined-totals div:nth-child(2) {
  padding-right: 10px !important;
}

#machineDetailModal .machine-external-combined-totals strong {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: freccia Costo esterno sempre nella stessa posizione */
#machineDetailModal .machine-external-combined-toggle {
  position: relative !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron {
  position: absolute !important;
  right: 12px !important;
  top: 38px !important;
  transform: none !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 30 !important;
}

#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  right: 12px !important;
  top: 38px !important;
  transform: none !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-dropdown-chevron {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* Dettaglio macchina > Costi: freccia Costo esterno posizione precedente */
#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron {
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  right: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

/* Dettaglio macchina > Costi: freccia nella posizione di prima ma ferma */
#machineDetailModal .machine-external-combined-toggle {
  position: relative !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  position: absolute !important;
  right: 12px !important;
  top: 36px !important;
  transform: none !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 40 !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron span:first-child {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* Dettaglio macchina > Costi: freccia in linea con Costo */
#machineDetailModal .machine-external-combined-toggle {
  position: relative !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  position: absolute !important;
  right: 12px !important;
  top: 54px !important;
  transform: none !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 40 !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron span:first-child {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

#machineDetailModal .machine-external-combined-totals {
  width: calc(100% - 42px) !important;
  margin-right: 42px !important;
}

/* Dettaglio macchina > Costi: freccia in linea con il totale del Costo */
#machineDetailModal .machine-external-combined-toggle {
  position: relative !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  position: absolute !important;
  right: 12px !important;
  top: 66px !important;
  transform: none !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 40 !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron span:first-child {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

#machineDetailModal .machine-external-combined-totals {
  width: calc(100% - 42px) !important;
  margin-right: 42px !important;
}

/* Dettaglio macchina > Costi: freccia alta in linea con Ore e Costo */
#machineDetailModal .machine-external-combined-toggle {
  position: relative !important;
  padding-right: 58px !important;
}

#machineDetailModal .machine-external-combined-totals {
  width: calc(100% - 42px) !important;
  margin-right: 42px !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  position: absolute !important;
  right: 12px !important;
  top: 30px !important;
  transform: none !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: none !important;
  z-index: 50 !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron span:first-child {
  display: none !important;
}

#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-size: 22px !important;
  color: #082765 !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron .machine-cost-dropdown-chevron {
  color: #dbeafe !important;
}

/* Dettaglio macchina > Costi: freccia Costo esterno leggermente più alta */
#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  top: 24px !important;
}

/* Dettaglio macchina > Costi: freccia Costo esterno ancora più alta */
#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  top: 18px !important;
}

/* Dettaglio macchina > Costi: freccia Costo esterno molto più alta */
#machineDetailModal .machine-external-combined-toggle .machine-cost-label-with-chevron,
#machineDetailModal .machine-external-combined-toggle.machine-external-combined-open .machine-cost-label-with-chevron {
  top: 12px !important;
}

/* Dettaglio macchina > Costi: ore e straordinario uniti, straordinario arancione */
#machineDetailModal .external-hours-combined-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  line-height: 1.05 !important;
}

#machineDetailModal .external-hours-combined-cell>span:first-child {
  color: #082765 !important;
  font-weight: 900 !important;
}

#machineDetailModal .external-overtime-orange {
  color: #f97316 !important;
  font-weight: 900 !important;
  font-size: 9px !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-external-combined-table th:first-child,
#machineDetailModal .machine-external-combined-table td:first-child {
  width: 28% !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(2),
#machineDetailModal .machine-external-combined-table td:nth-child(2) {
  width: 24% !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(3),
#machineDetailModal .machine-external-combined-table td:nth-child(3) {
  width: 22% !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(4),
#machineDetailModal .machine-external-combined-table td:nth-child(4) {
  width: 26% !important;
  background: #ffffff !important;
}

#machineDetailModal .machine-external-combined-table {
  min-width: 560px !important;
}

body.dark-mode #machineDetailModal .external-hours-combined-cell>span:first-child {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .external-overtime-orange {
  color: #fb923c !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-table th:nth-child(4),
body.dark-mode #machineDetailModal .machine-external-combined-table td:nth-child(4) {
  background: #111827 !important;
}

/* Dettaglio macchina > Costi: intestazione Utente */
#machineDetailModal .machine-external-combined-table th:first-child,
#machineDetailModal .machine-external-combined-table td:first-child {
  width: 30% !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(2),
#machineDetailModal .machine-external-combined-table td:nth-child(2) {
  width: 23% !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(3),
#machineDetailModal .machine-external-combined-table td:nth-child(3) {
  width: 22% !important;
}

#machineDetailModal .machine-external-combined-table th:nth-child(4),
#machineDetailModal .machine-external-combined-table td:nth-child(4) {
  width: 25% !important;
}

/* Dettaglio macchina > Costi: etichette esterne Ore totali / Costo totale */
#machineDetailModal .machine-external-combined-totals span {
  font-size: 9.8px !important;
}

/* Dettaglio macchina > Costi: aggiunto Totale scontrini nei totali esterni */
#machineDetailModal .machine-external-combined-totals {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

#machineDetailModal .machine-external-combined-totals div {
  min-width: 0 !important;
}

#machineDetailModal .machine-external-combined-totals span {
  font-size: 9px !important;
}

#machineDetailModal .machine-external-combined-totals strong {
  font-size: 13px !important;
  white-space: normal !important;
  word-break: break-word !important;
}

@media(max-width:900px) {
  #machineDetailModal .machine-external-combined-totals {
    grid-template-columns: 1fr !important;
  }
}

/* Dettaglio macchina > Costi: trasferte esterne divise e ordinate */
#machineDetailModal .machine-external-combined-totals div:nth-child(3) {
  background: #f8fbff !important;
  border: 1px solid #dbe3ee !important;
}

#machineDetailModal .machine-external-user-cell {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 2px !important;
  min-width: 0 !important;
}

#machineDetailModal .machine-external-user-name {
  color: #082765 !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

#machineDetailModal .machine-external-user-date {
  color: #64748b !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: normal !important;
}

#machineDetailModal .machine-external-combined-table td {
  vertical-align: middle !important;
}

body.dark-mode #machineDetailModal .machine-external-combined-totals div:nth-child(3) {
  background: #0f172a !important;
  border-color: #334155 !important;
}

body.dark-mode #machineDetailModal .machine-external-user-name {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-external-user-date {
  color: #93c5fd !important;
}

/* Dettaglio macchina > Costi: date trasferta compatte sotto utente */
#machineDetailModal .machine-external-user-date {
  font-size: 9.5px !important;
  color: #64748b !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

/* Dettaglio macchina > Costi: costi esterni bloccati al costo orario storico */
#machineDetailModal .machine-external-combined-table td:nth-child(3) {
  font-weight: 900 !important;
}


/* Dettaglio macchina > Costi: grafico a torta a destra del grafico mensile */
#machineDetailModal .machine-costs-top-charts {
  display: grid !important;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .95fr) !important;
  gap: 16px !important;
  align-items: stretch !important;
  margin: 8px 0 2px 0 !important;
}

#machineDetailModal .machine-costs-top-charts>.machine-hours-chart {
  min-width: 0 !important;
  height: 100% !important;
}

#machineDetailModal .machine-cost-pie-panel {
  min-width: 0 !important;
  background: #ffffff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 18px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  box-shadow: 0 8px 24px rgba(8, 39, 101, .06) !important;
}

#machineDetailModal .machine-cost-pie-head {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  margin-bottom: 12px !important;
}

#machineDetailModal .machine-cost-pie-title {
  margin: 0 !important;
  color: #082765 !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-cost-pie-subtitle {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

#machineDetailModal .machine-cost-pie-layout {
  display: grid !important;
  grid-template-columns: 160px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: center !important;
}

#machineDetailModal .machine-cost-pie-ring {
  width: 160px !important;
  height: 160px !important;
  border-radius: 50% !important;
  position: relative !important;
  margin: 0 auto !important;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, .18) !important;
}

#machineDetailModal .machine-cost-pie-hole {
  position: absolute !important;
  inset: 26px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 10px !important;
}

#machineDetailModal .machine-cost-pie-hole-label {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  margin-bottom: 4px !important;
}

#machineDetailModal .machine-cost-pie-hole-value {
  color: #082765 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
}

#machineDetailModal .machine-cost-pie-legend {
  display: grid !important;
  gap: 10px !important;
}

#machineDetailModal .machine-cost-pie-item {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  border: 1px solid #e6edf5 !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
  padding: 10px 12px !important;
}

#machineDetailModal .machine-cost-pie-dot {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  display: block !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85) !important;
}

#machineDetailModal .machine-cost-pie-item-main {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

#machineDetailModal .machine-cost-pie-item-label {
  color: #082765 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

#machineDetailModal .machine-cost-pie-item-percent {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

#machineDetailModal .machine-cost-pie-item-value {
  color: #082765 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  text-align: right !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-cost-pie-empty {
  min-height: 160px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px dashed #cbd5e1 !important;
  border-radius: 16px !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  background: #f8fbff !important;
}

@media(max-width:980px) {
  #machineDetailModal .machine-costs-top-charts {
    grid-template-columns: 1fr !important;
  }

  #machineDetailModal .machine-cost-pie-layout {
    grid-template-columns: 1fr !important;
  }
}

body.dark-mode #machineDetailModal .machine-cost-pie-panel {
  background: #111827 !important;
  border-color: #374151 !important;
  box-shadow: none !important;
}

body.dark-mode #machineDetailModal .machine-cost-pie-title,
body.dark-mode #machineDetailModal .machine-cost-pie-hole-value,
body.dark-mode #machineDetailModal .machine-cost-pie-item-label,
body.dark-mode #machineDetailModal .machine-cost-pie-item-value {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-cost-pie-subtitle,
body.dark-mode #machineDetailModal .machine-cost-pie-hole-label,
body.dark-mode #machineDetailModal .machine-cost-pie-item-percent {
  color: #9ca3af !important;
}

body.dark-mode #machineDetailModal .machine-cost-pie-hole {
  background: #0f172a !important;
  border-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-cost-pie-item {
  background: #0f172a !important;
  border-color: #374151 !important;
}

body.dark-mode #machineDetailModal .machine-cost-pie-empty {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #9ca3af !important;
}


/* Dettaglio macchina > Costi: descrizioni grafico torta senza sormonto */
#machineDetailModal .machine-cost-pie-legend {
  display: flex !important;
  flex-direction: column !important;
  gap: 9px !important;
  min-width: 0 !important;
}

#machineDetailModal .machine-cost-pie-item {
  display: grid !important;
  grid-template-columns: 14px minmax(0, 1fr) !important;
  grid-template-areas:
    "dot main"
    "dot value" !important;
  gap: 4px 9px !important;
  align-items: start !important;
  min-height: 58px !important;
  padding: 9px 10px !important;
  overflow: visible !important;
}

#machineDetailModal .machine-cost-pie-dot {
  grid-area: dot !important;
  margin-top: 3px !important;
  flex: 0 0 auto !important;
}

#machineDetailModal .machine-cost-pie-item-main {
  grid-area: main !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  line-height: 1.15 !important;
}

#machineDetailModal .machine-cost-pie-item-label {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

#machineDetailModal .machine-cost-pie-item-percent {
  display: block !important;
  font-size: 10.5px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}

#machineDetailModal .machine-cost-pie-item-value {
  grid-area: value !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  text-align: left !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  margin-top: 2px !important;
}

#machineDetailModal .machine-cost-pie-panel {
  overflow: visible !important;
}

#machineDetailModal .machine-cost-pie-layout {
  align-items: start !important;
}

/* Dettaglio macchina > Costi: grafico mensile e grafico torta allineati */
#machineDetailModal .machine-costs-top-charts {
  align-items: stretch !important;
}

#machineDetailModal .machine-costs-top-charts>.machine-hours-chart,
#machineDetailModal .machine-costs-top-charts>.machine-cost-pie-panel {
  height: 100% !important;
  min-height: 300px !important;
  box-sizing: border-box !important;
  margin-top: 0 !important;
  align-self: stretch !important;
}

#machineDetailModal .machine-costs-top-charts>.machine-hours-chart {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

#machineDetailModal .machine-costs-top-charts>.machine-cost-pie-panel {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

#machineDetailModal .machine-hours-chart-head,
#machineDetailModal .machine-cost-pie-head {
  min-height: 48px !important;
  margin-top: 0 !important;
}

#machineDetailModal .machine-hours-chart-title,
#machineDetailModal .machine-cost-pie-title {
  margin-top: 0 !important;
  line-height: 1.15 !important;
}

#machineDetailModal .machine-cost-pie-layout {
  flex: 1 !important;
  align-items: center !important;
}

/* Dettaglio macchina > Costi: grafico ore mensili con trasferte in rosso */
#machineDetailModal .machine-hours-chart-series {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 116px !important;
}

#machineDetailModal .machine-hours-chart-bar-internal,
#machineDetailModal .machine-hours-chart-bar-transfer {
  width: 18px !important;
  border-radius: 10px 10px 4px 4px !important;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .25) !important;
}

#machineDetailModal .machine-hours-chart-bar-internal {
  background: linear-gradient(180deg, #1d4ed8, #082765) !important;
}

#machineDetailModal .machine-hours-chart-bar-transfer {
  background: linear-gradient(180deg, #f87171, #dc2626) !important;
}

#machineDetailModal .machine-hours-chart-mini-values {
  min-height: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2px !important;
  margin-bottom: 6px !important;
}

#machineDetailModal .machine-hours-chart-mini-value {
  font-size: 10px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

#machineDetailModal .machine-hours-chart-mini-value.internal {
  color: #082765 !important;
}

#machineDetailModal .machine-hours-chart-mini-value.transfer {
  color: #dc2626 !important;
}

#machineDetailModal .machine-hours-chart-legend.totals-with-transfer {
  margin-top: 12px !important;
  justify-content: center !important;
}

body.dark-mode #machineDetailModal .machine-hours-chart-mini-value.internal {
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-hours-chart-mini-value.transfer {
  color: #fca5a5 !important;
}

/* Dettaglio macchina > Costi: barre grafico ore contenute nello sfondo */
#machineDetailModal .machine-hours-chart {
  overflow: hidden !important;
}

#machineDetailModal .machine-hours-chart-bars {
  min-height: 178px !important;
  max-height: 178px !important;
  align-items: end !important;
  overflow: hidden !important;
  padding-top: 4px !important;
  padding-bottom: 0 !important;
}

#machineDetailModal .machine-hours-chart-bar-wrap {
  height: 178px !important;
  min-height: 178px !important;
  max-height: 178px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  overflow: hidden !important;
}

#machineDetailModal .machine-hours-chart-mini-values {
  min-height: 24px !important;
  max-height: 24px !important;
  margin-bottom: 3px !important;
  overflow: hidden !important;
}

#machineDetailModal .machine-hours-chart-series {
  height: 100px !important;
  min-height: 100px !important;
  max-height: 100px !important;
  overflow: hidden !important;
  align-items: flex-end !important;
}

#machineDetailModal .machine-hours-chart-bar-internal,
#machineDetailModal .machine-hours-chart-bar-transfer {
  max-height: 100px !important;
}

#machineDetailModal .machine-hours-chart-month {
  min-height: 18px !important;
  max-height: 18px !important;
  margin-top: 4px !important;
}

/* Dettaglio macchina > Costi: rimosso sottotitolo Ripartizione costi */
#machineDetailModal .machine-cost-pie-subtitle {
  display: none !important;
}

#machineDetailModal .machine-cost-pie-head {
  margin-bottom: 10px !important;
}

/* Pagina principale: bottone Traffico nel menu a scorrimento */
#openTrafficBtn,
.traffic-main-menu-btn {
  background: #082765 !important;
  color: #ffffff !important;
  border-color: #082765 !important;
}

#openTrafficBtn svg,
.traffic-main-menu-btn svg {
  width: 20px !important;
  height: 20px !important;
}

#machineDetailModal .traffic-widget-title-icon,
.traffic-widget-title-icon {
  background: #082765 !important;
}

.traffic-home-panel {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 16px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
}

.traffic-home-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  background: #082765 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
}

.traffic-home-icon svg {
  width: 28px !important;
  height: 28px !important;
}

.traffic-home-title {
  color: #082765 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

.traffic-home-text {
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  margin-top: 4px !important;
}

body.dark-mode .traffic-home-panel {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

body.dark-mode .traffic-home-title {
  color: #dbeafe !important;
}

body.dark-mode .traffic-home-text {
  color: #9ca3af !important;
}

/* Pagina principale: Traffico solo nel menu dei bottoni trascinabili */
#toolbarButtons #openTrafficBtn span {
  color: #ffffff !important;
}

#toolbarButtons #openTrafficBtn svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

body.dark-mode #toolbarButtons #openTrafficBtn {
  background: #2563eb !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
}

/* Bottone Traffico: icona grafico stilizzata */
#toolbarButtons #openTrafficBtn svg,
.traffic-widget-title-icon svg,
.traffic-home-icon svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

/* Menu trascinabile: nome bottone Traffico sito */
#toolbarButtons #openTrafficBtn span:last-child {
  white-space: nowrap !important;
}

/* Traffico sito: usa lo stesso blu degli altri pulsanti e si può trascinare nella pagina principale */
#toolbarButtons #openTrafficBtn,
#openTrafficBtn.traffic-main-menu-btn {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: #ffffff !important;
}

#toolbarButtons #openTrafficBtn:hover,
#openTrafficBtn.traffic-main-menu-btn:hover {
  background: var(--blue2) !important;
  border-color: var(--blue2) !important;
}

#toolbarButtons #openTrafficBtn svg,
#openTrafficBtn.traffic-main-menu-btn svg {
  width: 20px !important;
  height: 20px !important;
}

#homeWidgets .home-widget[data-home-widget="openTrafficBtn"] {
  display: block !important;
}

/* Traffico sito trascinato in pagina principale */
.traffic-home-panel {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  padding: 16px !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
}

.traffic-home-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 12px !important;
  background: var(--blue) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
}

.traffic-home-icon svg {
  width: 28px !important;
  height: 28px !important;
}

.traffic-home-title {
  color: var(--blue) !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

.traffic-home-text {
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  margin-top: 4px !important;
}

body.dark-mode .traffic-home-panel {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

body.dark-mode .traffic-home-title {
  color: #dbeafe !important;
}

body.dark-mode .traffic-home-text {
  color: #9ca3af !important;
}

/* Traffico sito: popup accessi stile applicazione */
.traffic-access-modal {
  width: 980px !important;
  max-width: 96vw !important;
  max-height: 92vh !important;
  overflow: hidden !important;
}

.traffic-access-info {
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  margin-bottom: 12px !important;
}

#trafficAccessPopupBody {
  max-height: calc(92vh - 160px) !important;
  overflow: auto !important;
}

.traffic-access-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.traffic-access-table th {
  background: #f8fbff !important;
  color: #082765 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: .3px !important;
}

.traffic-access-table td,
.traffic-access-table th {
  padding: 10px 12px !important;
  border-bottom: 1px solid #e5e7eb !important;
  vertical-align: middle !important;
  word-break: break-word !important;
}

.traffic-access-table td {
  font-size: 13px !important;
  color: #111827 !important;
}

.traffic-access-table td strong {
  color: #082765 !important;
  font-weight: 900 !important;
}

.traffic-access-role {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  margin-top: 3px !important;
}

.traffic-access-table th:nth-child(1),
.traffic-access-table td:nth-child(1) {
  width: 24% !important;
}

.traffic-access-table th:nth-child(2),
.traffic-access-table td:nth-child(2) {
  width: 22% !important;
}

.traffic-access-table th:nth-child(3),
.traffic-access-table td:nth-child(3) {
  width: 20% !important;
}

.traffic-access-table th:nth-child(4),
.traffic-access-table td:nth-child(4) {
  width: 34% !important;
}

body.dark-mode .traffic-access-info,
body.dark-mode .traffic-access-role {
  color: #9ca3af !important;
}

body.dark-mode .traffic-access-table th {
  background: #1f2937 !important;
  color: #dbeafe !important;
  border-color: #374151 !important;
}

body.dark-mode .traffic-access-table td {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #374151 !important;
}

body.dark-mode .traffic-access-table td strong {
  color: #dbeafe !important;
}

/* Autorizzazione Traffico sito: stessa dimensione degli altri, solo icona grafico */
.user-custom-permission-btn[data-feature="traffic"] {
  width: inherit;
  min-width: inherit;
  max-width: inherit;
  height: inherit;
  min-height: inherit;
  max-height: inherit;
  padding: inherit;
  border-radius: inherit;
  gap: inherit;
  font-size: inherit;
  line-height: inherit;
}

.user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.user-custom-permissions-grid .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon {
  width: 20px !important;
  height: 20px !important;
}

.user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon .icon-fill-dot {
  fill: currentColor !important;
  stroke: none !important;
}

#toolbarButtons #openTrafficBtn[data-permission-allowed="false"] {
  display: none !important;
}

/* Fix finale: Traffico sito identico agli altri bottoni autorizzazione */
.permissions-role-icons .user-custom-permission-btn[data-feature="traffic"],
.users-role-table .user-custom-permission-btn[data-feature="traffic"],
.user-dropdown-permissions-icons .user-custom-permission-btn[title="Traffico sito"] {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 4px !important;
  border-radius: 8px !important;
}
.user-custom-permissions-grid .user-custom-permission-btn[data-feature="traffic"] {
  width: 44px;
  height: 40px;
  padding: 7px;
  border-radius: 11px;
}

.permissions-role-icons .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon,
.users-role-table .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon,
.user-dropdown-permissions-icons .user-custom-permission-btn[title="Traffico sito"] .traffic-chart-icon {
  width: 16px !important;
  height: 16px !important;
}

.user-custom-permissions-grid .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon {
  width: 20px !important;
  height: 20px !important;
}

/* Autorizzazioni: Traffico sito grande come Elenco macchine */
.permissions-role-icons .user-custom-permission-btn[data-feature="traffic"],
.permissions-buttons-grid .user-custom-permission-btn[data-feature="traffic"],
.permission-feature-card .user-custom-permission-btn[data-feature="traffic"] {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 7px !important;
  border-radius: 10px !important;
}

.permissions-role-icons .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon,
.permissions-buttons-grid .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon,
.permission-feature-card .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
}

.user-dropdown-permissions-icons .user-custom-permission-btn[title="Traffico sito"] {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 4px !important;
  border-radius: 8px !important;
}

.users-role-table .user-custom-permission-btn[data-feature="traffic"] {
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 4px !important;
  border-radius: 8px !important;
}

/* CORREZIONE DEFINITIVA: in Autorizzazioni Traffico sito uguale a Elenco macchine */
.permissions-groups-table .permissions-role-icons .user-custom-permission-btn[data-feature="traffic"],
.permissions-role-icons .user-custom-permission-btn[data-feature="traffic"] {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 5px !important;
  border-radius: 9px !important;
  border-width: 1.5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

.permissions-groups-table .permissions-role-icons .user-custom-permission-btn[data-feature="traffic"] svg,
.permissions-role-icons .user-custom-permission-btn[data-feature="traffic"] svg,
.permissions-groups-table .permissions-role-icons .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon,
.permissions-role-icons .user-custom-permission-btn[data-feature="traffic"] .traffic-chart-icon {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  stroke-width: 2.2 !important;
}

.permissions-groups-table .permissions-role-icons .user-custom-permission-btn[data-feature="machines"],
.permissions-role-icons .user-custom-permission-btn[data-feature="machines"] {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 5px !important;
  border-radius: 9px !important;
  border-width: 1.5px !important;
  box-sizing: border-box !important;
}

.permissions-groups-table .permissions-role-icons .user-custom-permission-btn[data-feature="machines"] svg,
.permissions-role-icons .user-custom-permission-btn[data-feature="machines"] svg {
  width: 18px !important;
  height: 18px !important;
  stroke-width: 2.2 !important;
}

/* style block 2 id="transfer-hours-day-fit-fix" */
.transfer-hours-table {
  min-width: 1120px !important;
}

.transfer-hours-table th:nth-child(1),
.transfer-hours-table td:nth-child(1) {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  white-space: nowrap !important;
}

.transfer-hours-day-cell {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  font-size: 11px !important;
  line-height: 1.15 !important;
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

/* style block 3 id="transfer-hours-remove-da-a-fix" */
.transfer-hours-table {
  min-width: 980px !important;
  width: 980px !important;
  table-layout: auto !important;
}

.transfer-hours-table th:nth-child(1),
.transfer-hours-table td:nth-child(1) {
  width: 84px !important;
  min-width: 84px !important;
  max-width: 84px !important;
}

.transfer-hours-table th:nth-child(2),
.transfer-hours-table td:nth-child(2),
.transfer-hours-table th:nth-child(3),
.transfer-hours-table td:nth-child(3),
.transfer-hours-table th:nth-child(5),
.transfer-hours-table td:nth-child(5),
.transfer-hours-table th:nth-child(6),
.transfer-hours-table td:nth-child(6),
.transfer-hours-table th:nth-child(7),
.transfer-hours-table td:nth-child(7),
.transfer-hours-table th:nth-child(8),
.transfer-hours-table td:nth-child(8),
.transfer-hours-table th:nth-child(9),
.transfer-hours-table td:nth-child(9),
.transfer-hours-table th:nth-child(10),
.transfer-hours-table td:nth-child(10) {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
}

.transfer-hours-table th:nth-child(4),
.transfer-hours-table td:nth-child(4),
.transfer-hours-table th:nth-child(11),
.transfer-hours-table td:nth-child(11) {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
}

.transfer-hours-table td {
  padding: 7px 8px !important;
}

.transfer-hours-table select.transfer-hours-time-input,
.transfer-hours-table select.transfer-hours-auto-input {
  width: calc(100% - 2px) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  display: block !important;
}

@media(max-width:900px) {
  .transfer-hours-table {
    min-width: 980px !important;
    width: 980px !important;
  }
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

/* style block 4 id="safe-final-auto-si-no-equal-fix" */
/* FIX SICURO: pagina valida + i due menu Auto uguali */
.transfer-hours-table th:nth-child(4),
.transfer-hours-table td:nth-child(4),
.transfer-hours-table th:nth-child(11),
.transfer-hours-table td:nth-child(11) {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}

.transfer-hours-table select.transfer-hours-auto-input {
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
  height: 32px !important;
  margin: 0 auto !important;
  display: block !important;
  padding: 4px 22px 4px 8px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  text-align: left !important;
  text-align-last: left !important;
  appearance: auto !important;
  -webkit-appearance: menulist !important;
  box-sizing: border-box !important;
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

/* style block 5 id="transfer-hours-total-cards-style" */
.transfer-hours-total-cards {
  margin-top: 12px !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) !important;
  gap: 10px !important;
  text-align: center !important;
  color: #082765 !important;
}

.transfer-hours-total-card {
  background: #f8fbff !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06) !important;
}

.transfer-hours-total-label {
  font-size: 12px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: .35px !important;
  color: #64748b !important;
  margin-bottom: 7px !important;
}

.transfer-hours-total-value {
  font-size: 24px !important;
  line-height: 1 !important;
  font-weight: 1000 !important;
  color: #082765 !important;
}

.transfer-hours-total-card-overtime .transfer-hours-total-value {
  color: #b45309 !important;
}

body.dark-mode .transfer-hours-total-cards {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
}

body.dark-mode .transfer-hours-total-card {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #ffffff !important;
}

body.dark-mode .transfer-hours-total-label {
  color: #cbd5e1 !important;
}

body.dark-mode .transfer-hours-total-value {
  color: #93c5fd !important;
}

body.dark-mode .transfer-hours-total-card-overtime .transfer-hours-total-value {
  color: #fde68a !important;
}

@media(max-width:700px) {
  .transfer-hours-total-cards {
    grid-template-columns: 1fr !important;
  }
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

/* style block 6 id="receipt-total-currency-inline-style" */
#transferReceiptsModal .receipt-total-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  white-space: nowrap;
}

#transferReceiptsModal .receipt-total-input {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 36px !important;
  min-height: 36px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 6px !important;
  line-height: 36px !important;
}

#transferReceiptsModal .receipt-currency-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 36px;
  box-sizing: border-box;
  border: 1px solid #c8d4e5;
  border-radius: 8px;
  background: #f8fbff;
  color: #082765;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}

body.dark-mode #transferReceiptsModal .receipt-currency-label {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

#transferReceiptsModal .receipt-currency-select {
  height: 36px !important;
  min-height: 36px !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 15px 0 6px !important;
  border: 1px solid #c8d4e5;
  border-radius: 8px;
  background: #f8fbff;
  color: #082765;
  font-weight: 900;
  font-size: 13px;
  line-height: 36px !important;
  appearance: auto;
}

body.dark-mode #transferReceiptsModal .receipt-currency-select {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

/* style block 7 id="receipt-actions-large-spaced-final" */
/* Popup Scontrini: pulsanti Azioni grandi e ben distanziati */
#transferReceiptsModal .receipt-files-table th:last-child,
#transferReceiptsModal .receipt-files-table td:last-child {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

#transferReceiptsModal .receipt-actions-compact,
#transferReceiptsModal .receipt-files-table .machine-file-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 14px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
}

#transferReceiptsModal .receipt-action-icon-btn {
  width: 42px !important;
  min-width: 42px !important;
  height: 38px !important;
  padding: 6px 9px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#transferReceiptsModal .receipt-action-icon-btn svg {
  width: 22px !important;
  height: 22px !important;
}


/* style block 8 id="receipt-intervention-cost-style" */
@media(max-width:900px) {
  .receipt-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

/* style block 9 id="receipt-currency-totals-style" */
.receipt-currency-totals {
  display: grid !important;
  gap: 4px !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

.receipt-currency-total-row {
  white-space: nowrap;
  font-weight: 900;
  color: #082765;
}

body.dark-mode .receipt-currency-total-row {
  color: #93c5fd !important;
}

.receipt-status-modified {
  color: #f59e0b !important;
  font-weight: 900 !important;
}

.receipt-count-totals {
  display: grid !important;
  gap: 4px !important;
  font-size: 20px !important;
  line-height: 1.15 !important;
}

.receipt-count-total-row {
  white-space: nowrap;
  font-weight: 900;
  color: #082765;
}

body.dark-mode .receipt-count-total-row {
  color: #93c5fd !important;
}

/* style block 10 id="stable-transfer-user-delete-receipts-fix" */
.transfer-user-delete-btn {
  height: 38px !important;
  margin: 0 !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  background: white !important;
  border: 2px solid #dc2626 !important;
  color: #dc2626 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  font-size: 12px !important;
  font-weight: 900 !important
}

.transfer-user-delete-btn svg {
  width: 18px;
  height: 18px;
  stroke: #dc2626;
  fill: none;
  stroke-width: 2.35;
  stroke-linecap: round;
  stroke-linejoin: round
}

body.dark-mode .transfer-user-delete-btn {
  background: #020617 !important;
  border-color: #f87171 !important;
  color: #f87171 !important
}

body.dark-mode .transfer-user-delete-btn svg {
  stroke: #f87171 !important
}

.all-transfer-badge.in-progress {
  background: #fef3c7 !important;
  color: #a16207 !important;
  border: 1px solid #f59e0b !important
}

.all-transfer-badge.closed {
  background: #dcfce7 !important;
  color: #047857 !important;
  border: 1px solid #10b981 !important
}

#transferReceiptsModal .modal-popup-style {
  width: 960px !important;
  max-width: calc(100vw - 32px) !important
}

#transferReceiptsModal .popup-modal-body {
  width: 100% !important;
  max-width: 100% !important;
  overflow: auto !important
}

#transferReceiptsModal .receipt-files-table {
  min-width: 780px !important;
  table-layout: fixed !important
}

#transferReceiptsModal .receipt-files-table th:nth-child(1),
#transferReceiptsModal .receipt-files-table td:nth-child(1) {
  width: auto !important
}

#transferReceiptsModal .receipt-files-table th:nth-child(2),
#transferReceiptsModal .receipt-files-table td:nth-child(2) {
  width: 130px !important;
  min-width: 130px !important
}

#transferReceiptsModal .receipt-files-table th:nth-child(3),
#transferReceiptsModal .receipt-files-table td:nth-child(3) {
  width: 170px !important;
  min-width: 170px !important
}

/* Fix grafica sezioni Spese/Ore trasferta: niente contorno extra da chiuse e trasferte separate */
.all-transfer-section {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  margin: 12px 0 18px !important;
}

.all-transfer-section.collapsed {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.all-transfer-section.collapsed .all-transfer-section-header {
  margin-bottom: 0 !important;
}

.all-transfer-section-body {
  padding: 0 !important;
}

.all-active-transfers-list {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
  display: grid !important;
  gap: 12px !important;
}

.all-active-transfer-columns {
  border: 1px solid #dbe3ee !important;
  border-radius: 12px !important;
  background: #f4f7fb !important;
  overflow: hidden !important;
}

.all-transfer-card {
  border: 1px solid #dbe3ee !important;
  border-radius: 16px !important;
  background: white !important;
  overflow: hidden !important;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .08) !important;
}

.all-transfer-card:first-child {
  border-top: 1px solid #dbe3ee !important;
}

.all-transfer-card+.all-transfer-card {
  margin-top: 0 !important;
}

.all-transfer-card .all-transfer-main {
  background: #ffffff !important;
}

.all-transfer-card.open {
  box-shadow: 0 8px 22px rgba(15, 23, 42, .12) !important;
}

body.dark-mode .all-transfer-section,
body.dark-mode .all-transfer-section.collapsed {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.dark-mode .all-active-transfers-list {
  background: transparent !important;
  border: none !important;
}

body.dark-mode .all-active-transfer-columns {
  background: #1f2937 !important;
  border-color: #374151 !important;
}

body.dark-mode .all-transfer-card {
  background: #0f172a !important;
  border-color: #374151 !important;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .25) !important;
}

body.dark-mode .all-transfer-card .all-transfer-main {
  background: #0f172a !important;
}

/* style block 11 id="assigned-transfers-bold-border-fix" */
/* Contorno piu evidente per il riquadro "Le mie trasferte assegnate" */
#assignedTransfersFixed.fixed-transfers-widget:not(:empty) {
  border: 3px solid #082765 !important;
  border-radius: 18px !important;
  box-shadow: 0 10px 28px rgba(8, 39, 101, .18) !important;
}

#assignedTransfersFixed.fixed-transfers-widget:not(:empty) .fixed-transfers-header {
  border-bottom: 2px solid #082765 !important;
}

body.dark-mode #assignedTransfersFixed.fixed-transfers-widget:not(:empty) {
  border-color: #60a5fa !important;
  box-shadow: 0 10px 30px rgba(96, 165, 250, .20) !important;
}

body.dark-mode #assignedTransfersFixed.fixed-transfers-widget:not(:empty) .fixed-transfers-header {
  border-bottom-color: #60a5fa !important;
}

/* style block 12 id="assigned-transfers-no-horizontal-scroll-fix" */
/* Le mie trasferte assegnate: tutte le colonne dentro il riquadro, senza barra orizzontale */
#assignedTransfersFixed .fixed-transfers-body {
  overflow-x: hidden !important;
  width: 100% !important;
}

#assignedTransfersFixed .fixed-transfers-list {
  width: 100% !important;
  max-width: 100% !important;
  gap: 8px !important;
}

#assignedTransfersFixed .fixed-transfer-columns,
#assignedTransfersFixed .fixed-transfer-row {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(135px, 1.05fr) minmax(105px, .75fr) minmax(54px, .35fr) minmax(170px, 1.35fr) minmax(72px, .45fr) minmax(150px, .95fr) minmax(82px, .48fr) !important;
  gap: 6px !important;
  padding: 9px 10px !important;
  box-sizing: border-box !important;
}

#assignedTransfersFixed .fixed-transfer-columns {
  font-size: 10.5px !important;
  letter-spacing: .12px !important;
}

#assignedTransfersFixed .fixed-transfer-row {
  font-size: 12px !important;
  align-items: stretch !important;
}

#assignedTransfersFixed .fixed-transfer-columns span:not(:first-child),
#assignedTransfersFixed .fixed-transfer-row>div:not(:first-child) {
  padding-left: 7px !important;
}

#assignedTransfersFixed .fixed-transfer-client {
  font-size: 13px !important;
}

#assignedTransfersFixed .fixed-transfer-machine,
#assignedTransfersFixed .fixed-transfer-date,
#assignedTransfersFixed .fixed-transfer-days,
#assignedTransfersFixed .fixed-transfer-description,
#assignedTransfersFixed .transfer-hours-value,
#assignedTransfersFixed .fixed-transfer-no-attachments {
  font-size: 11px !important;
}

#assignedTransfersFixed .fixed-transfer-description {
  line-height: 1.25 !important;
  max-height: 3.75em !important;
}

#assignedTransfersFixed .fixed-transfer-actions,
#assignedTransfersFixed .fixed-transfer-attachments,
#assignedTransfersFixed .fixed-transfer-delivery {
  gap: 5px !important;
}

#assignedTransfersFixed .transfer-action-buttons {
  gap: 5px !important;
  flex-wrap: wrap !important;
}

#assignedTransfersFixed .transfer-action-icon-btn,
#assignedTransfersFixed .receipt-action-icon-btn {
  width: 32px !important;
  min-width: 32px !important;
  height: 30px !important;
  padding: 0 !important;
  border-radius: 8px !important;
}

#assignedTransfersFixed .transfer-action-icon-btn svg,
#assignedTransfersFixed .receipt-action-icon-btn svg {
  width: 17px !important;
  height: 17px !important;
}

#assignedTransfersFixed .transfer-submit-btn,
#assignedTransfersFixed button[data-action="deliver-transfer"] {
  width: 100% !important;
  min-width: 0 !important;
  padding: 8px 7px !important;
  font-size: 11px !important;
  border-radius: 9px !important;
  white-space: normal !important;
  line-height: 1.1 !important;
}

@media(max-width:900px) {
  #assignedTransfersFixed .fixed-transfers-body {
    overflow-x: hidden !important;
  }

  #assignedTransfersFixed .fixed-transfer-columns,
  #assignedTransfersFixed .fixed-transfer-row {
    min-width: 0 !important;
    grid-template-columns: minmax(95px, 1fr) minmax(82px, .82fr) minmax(42px, .42fr) minmax(110px, 1.15fr) minmax(54px, .5fr) minmax(92px, .92fr) minmax(62px, .55fr) !important;
    gap: 4px !important;
    padding: 7px 6px !important;
  }

  #assignedTransfersFixed .fixed-transfer-columns {
    font-size: 8.8px !important;
  }

  #assignedTransfersFixed .fixed-transfer-row {
    font-size: 10px !important;
  }

  #assignedTransfersFixed .fixed-transfer-client {
    font-size: 11px !important;
  }

  #assignedTransfersFixed .fixed-transfer-machine,
  #assignedTransfersFixed .fixed-transfer-date,
  #assignedTransfersFixed .fixed-transfer-days,
  #assignedTransfersFixed .fixed-transfer-description {
    font-size: 9.5px !important;
  }

  #assignedTransfersFixed .transfer-action-icon-btn,
  #assignedTransfersFixed .receipt-action-icon-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 27px !important;
  }

  #assignedTransfersFixed .transfer-action-icon-btn svg,
  #assignedTransfersFixed .receipt-action-icon-btn svg {
    width: 15px !important;
    height: 15px !important;
  }

  #assignedTransfersFixed .transfer-submit-btn,
  #assignedTransfersFixed button[data-action="deliver-transfer"] {
    font-size: 9.5px !important;
    padding: 7px 4px !important;
  }
}

/* style block 13 id="assigned-transfers-attachments-in-description-fix" */
/* Le mie trasferte assegnate: allegati dentro la descrizione, come in Elenco Assistenze */
#assignedTransfersFixed .fixed-transfer-columns,
#assignedTransfersFixed .fixed-transfer-row {
  grid-template-columns: minmax(135px, 1.05fr) minmax(105px, .75fr) minmax(54px, .35fr) minmax(210px, 1.55fr) minmax(150px, .95fr) minmax(82px, .48fr) !important;
}

#assignedTransfersFixed .fixed-transfer-description-wrap {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  text-align: left !important;
}

#assignedTransfersFixed .fixed-transfer-description-wrap .fixed-transfer-description {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

#assignedTransfersFixed .fixed-transfer-description-attachments {
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding-top: 0 !important;
}

#assignedTransfersFixed .fixed-transfer-description-file-btn {
  width: 34px !important;
  min-width: 34px !important;
  height: 32px !important;
  margin: 0 !important;
  padding: 4px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#assignedTransfersFixed .fixed-transfer-description-file-btn .attachment-icon {
  width: 20px !important;
  height: 20px !important;
}

@media(max-width:900px) {

  #assignedTransfersFixed .fixed-transfer-columns,
  #assignedTransfersFixed .fixed-transfer-row {
    grid-template-columns: minmax(95px, 1fr) minmax(82px, .82fr) minmax(42px, .42fr) minmax(130px, 1.25fr) minmax(92px, .92fr) minmax(62px, .55fr) !important;
  }

  #assignedTransfersFixed .fixed-transfer-description-wrap {
    gap: 5px !important;
  }

  #assignedTransfersFixed .fixed-transfer-description-file-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 27px !important;
  }

  #assignedTransfersFixed .fixed-transfer-description-file-btn .attachment-icon {
    width: 16px !important;
    height: 16px !important;
  }
}

/* style block 14 id="assigned-transfers-bigger-action-buttons-fix" */
/* Le mie trasferte assegnate: bottoni Contabilita/Consegna piu grandi.
      Il bottone graffetta allegati resta invariato. */
#assignedTransfersFixed .fixed-transfer-actions .transfer-action-icon-btn,
#assignedTransfersFixed .fixed-transfer-actions .receipt-action-icon-btn {
  width: 40px !important;
  min-width: 40px !important;
  height: 38px !important;
  padding: 0 !important;
  border-radius: 10px !important;
}

#assignedTransfersFixed .fixed-transfer-actions .transfer-action-icon-btn svg,
#assignedTransfersFixed .fixed-transfer-actions .receipt-action-icon-btn svg {
  width: 21px !important;
  height: 21px !important;
}

#assignedTransfersFixed .fixed-transfer-actions .transfer-action-buttons {
  gap: 7px !important;
}

#assignedTransfersFixed .fixed-transfer-delivery .transfer-action-icon-btn,
#assignedTransfersFixed .fixed-transfer-delivery .receipt-action-icon-btn {
  width: 42px !important;
  min-width: 42px !important;
  height: 40px !important;
  padding: 0 !important;
  border-radius: 11px !important;
}

#assignedTransfersFixed .fixed-transfer-delivery .transfer-action-icon-btn svg,
#assignedTransfersFixed .fixed-transfer-delivery .receipt-action-icon-btn svg {
  width: 22px !important;
  height: 22px !important;
}

#assignedTransfersFixed .fixed-transfer-description-file-btn {
  width: 34px !important;
  min-width: 34px !important;
  height: 32px !important;
  padding: 4px !important;
}

#assignedTransfersFixed .fixed-transfer-description-file-btn .attachment-icon {
  width: 20px !important;
  height: 20px !important;
}

@media(max-width:900px) {

  #assignedTransfersFixed .fixed-transfer-actions .transfer-action-icon-btn,
  #assignedTransfersFixed .fixed-transfer-actions .receipt-action-icon-btn {
    width: 34px !important;
    min-width: 34px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  #assignedTransfersFixed .fixed-transfer-actions .transfer-action-icon-btn svg,
  #assignedTransfersFixed .fixed-transfer-actions .receipt-action-icon-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  #assignedTransfersFixed .fixed-transfer-delivery .transfer-action-icon-btn,
  #assignedTransfersFixed .fixed-transfer-delivery .receipt-action-icon-btn {
    width: 36px !important;
    min-width: 36px !important;
    height: 34px !important;
  }

  #assignedTransfersFixed .fixed-transfer-description-file-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 27px !important;
  }

  #assignedTransfersFixed .fixed-transfer-description-file-btn .attachment-icon {
    width: 16px !important;
    height: 16px !important;
  }
}

/* style block 15 id="fix-a-pagamento-nowrap" */
/* Mantiene la scritta "A pagamento" su una sola riga nell'elenco assistenze */
#ticketContainer .subscription-badge.subscription-paid,
#popupTicketContainer .subscription-badge.subscription-paid {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: max-content !important;
}

/* style block 16 id="fix-costo-colonna-contenuta" */
/* Elenco Assistenze: la colonna Costo deve contenere sempre il badge al suo interno. */
#ticketContainer .main-tickets-table th:nth-child(4),
#ticketContainer .main-tickets-table td:nth-child(4),
#popupTicketContainer .main-tickets-table th:nth-child(4),
#popupTicketContainer .main-tickets-table td:nth-child(4) {
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
  text-align: center !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}

#ticketContainer .main-tickets-table td:nth-child(4) *,
#popupTicketContainer .main-tickets-table td:nth-child(4) * {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#ticketContainer .main-tickets-table td:nth-child(4) .subscription-badge,
#popupTicketContainer .main-tickets-table td:nth-child(4) .subscription-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  max-width: 100% !important;
  min-width: 0 !important;
  width: auto !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}

/* style block 17 id="ticket-client-sticky-no-id-fix" */
/* Elenco Assistenze: Cliente / Matricola resta fisso durante lo scroll orizzontale. Colonna ID rimossa. */
#ticketContainer .main-tickets-table th:first-child,
#ticketContainer .main-tickets-table td:first-child,
#popupTicketContainer .main-tickets-table th:first-child,
#popupTicketContainer .main-tickets-table td:first-child {
  position: sticky !important;
  left: 0 !important;
  z-index: 6 !important;
  min-width: 200px !important;
  width: 210px !important;
  max-width: 230px !important;
  background: white !important;
  box-shadow: 8px 0 14px rgba(15, 23, 42, .10) !important;
}

#ticketContainer .main-tickets-table th:first-child,
#popupTicketContainer .main-tickets-table th:first-child {
  z-index: 9 !important;
  background: #f4f7fb !important;
}

#ticketContainer .main-ticket-row td:first-child,
#popupTicketContainer .main-ticket-row td:first-child {
  border-left: 1px solid var(--border) !important;
  border-radius: 14px 0 0 14px !important;
}

#ticketContainer .main-ticket-row td:nth-child(2),
#popupTicketContainer .main-ticket-row td:nth-child(2) {
  border-left: none !important;
  border-radius: 0 !important;
}

#ticketContainer .main-tickets-table th:nth-child(2),
#ticketContainer .main-tickets-table td:nth-child(2),
#popupTicketContainer .main-tickets-table th:nth-child(2),
#popupTicketContainer .main-tickets-table td:nth-child(2) {
  width: 150px !important;
  max-width: 150px !important;
}

body.dark-mode #ticketContainer .main-tickets-table th:first-child,
body.dark-mode #popupTicketContainer .main-tickets-table th:first-child {
  background: #1f2937 !important;
  color: #dbeafe !important;
}

body.dark-mode #ticketContainer .main-tickets-table td:first-child,
body.dark-mode #popupTicketContainer .main-tickets-table td:first-child {
  background: #0f172a !important;
  color: #e5e7eb !important;
}

body.dark-mode #ticketContainer .main-tickets-table td:first-child div,
body.dark-mode #popupTicketContainer .main-tickets-table td:first-child div {
  color: #e5e7eb !important;
}

body.dark-mode #ticketContainer .main-tickets-table td:first-child div:nth-child(2),
body.dark-mode #popupTicketContainer .main-tickets-table td:first-child div:nth-child(2) {
  color: #cbd5e1 !important;
}

/* style block 18  */
.customer-report-text:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  font-weight: 800;
}

body.dark-mode .customer-report-text {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

body.dark-mode #transferCustomerSignatureCanvas {
  background: #ffffff !important;
  border-color: #60a5fa !important;
}

body.dark-mode .client-report-page {
  background: #111827 !important;
  border-color: #60a5fa !important;
}

@media print {
  .report-no-print {
    display: none !important
  }

  .client-report-page {
    break-before: page;
    page-break-before: always
  }
}

/* style block 19 id="report-width-lock-fix" */
#transferReportModal .modal-popup-style {
  width: 940px !important;
  min-width: 940px !important;
  max-width: calc(100vw - 32px) !important;
  overflow: hidden !important;
}

#transferReportModal .popup-modal-body {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: auto !important;
}

#transferReportModalContent,
#transferReportPrintable,
#transferReportPrintable .client-report-page {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

#transferReportPrintable .report-card,
#transferReportPrintable .report-value,
#transferReportPrintable .customer-report-text {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

#transferReportPrintable .customer-report-text {
  width: 100% !important;
  overflow-x: hidden !important;
  white-space: pre-wrap !important;
}

/* style block 20 id="fit-tipologia-column-width" */
/* Elenco Assistenze: colonna Tipologia compatta, larga quanto serve al testo. */
#ticketContainer .main-tickets-table th:nth-child(5),
#ticketContainer .main-tickets-table td:nth-child(5),
#popupTicketContainer .main-tickets-table th:nth-child(5),
#popupTicketContainer .main-tickets-table td:nth-child(5) {
  width: 105px !important;
  min-width: 105px !important;
  max-width: 115px !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  text-align: center !important;
}

#ticketContainer .main-tickets-table th:nth-child(4),
#ticketContainer .main-tickets-table td:nth-child(4),
#popupTicketContainer .main-tickets-table th:nth-child(4),
#popupTicketContainer .main-tickets-table td:nth-child(4) {
  width: 118px !important;
  min-width: 118px !important;
  max-width: 130px !important;
}

/* style block 21 id="machine-detail-assistance-row-spacing-fix" */
#machineDetailModal .machine-detail-assistance-table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 12px !important;
  background: transparent !important;
  margin-top: 0 !important;
}

#machineDetailModal .machine-detail-assistance-table th {
  background: #f4f7fb !important;
  border: 1px solid #dbe3ee !important;
}

#machineDetailModal .machine-detail-assistance-table td {
  background: #fff !important;
  border-top: 1px solid #dbe3ee !important;
  border-bottom: 1px solid #dbe3ee !important;
  border-right: 1px solid #dbe3ee !important;
  vertical-align: middle;
}

#machineDetailModal .machine-detail-assistance-table td:first-child {
  border-left: 1px solid #dbe3ee !important;
  border-radius: 12px 0 0 12px !important;
}

#machineDetailModal .machine-detail-assistance-table td:last-child {
  border-radius: 0 12px 12px 0 !important;
}

#machineDetailModal .machine-detail-assistance-table tbody tr {
  box-shadow: 0 4px 12px rgba(15, 23, 42, .06) !important;
}

body.dark-mode #machineDetailModal .machine-detail-assistance-table th {
  background: #1f2937 !important;
  border-color: #374151 !important;
  color: #dbeafe !important;
}

body.dark-mode #machineDetailModal .machine-detail-assistance-table td {
  background: #0f172a !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

/* style block 22 id="traffic-button-same-as-primary-final-fix" */
/* FIX FINALE: il bottone Traffico sito deve avere lo stesso aspetto dei bottoni principali */
#toolbarButtons #openTrafficBtn,
#openTrafficBtn.traffic-main-menu-btn,
#openTrafficBtn.primary-action-btn {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 15px 24px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(255, 255, 255, .35) !important;
  background: linear-gradient(135deg, #1d4590, #082765) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(11, 42, 99, .30), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
  white-space: nowrap !important;
}

#toolbarButtons #openTrafficBtn:hover,
#openTrafficBtn.traffic-main-menu-btn:hover,
#openTrafficBtn.primary-action-btn:hover {
  background: linear-gradient(135deg, #1d4590, #082765) !important;
  border-color: rgba(255, 255, 255, .35) !important;
  transform: none !important;
}

#toolbarButtons #openTrafficBtn span:first-child,
#openTrafficBtn.primary-action-btn span:first-child {
  width: 30px !important;
  height: 30px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .18) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 30px !important;
}

#toolbarButtons #openTrafficBtn span:last-child,
#openTrafficBtn.primary-action-btn span:last-child {
  color: #ffffff !important;
  white-space: nowrap !important;
}

#toolbarButtons #openTrafficBtn svg,
#openTrafficBtn.primary-action-btn svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

body.dark-mode #toolbarButtons #openTrafficBtn,
body.dark-mode #openTrafficBtn.traffic-main-menu-btn,
body.dark-mode #openTrafficBtn.primary-action-btn {
  background: linear-gradient(135deg, #1d4590, #082765) !important;
  border-color: rgba(255, 255, 255, .35) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(11, 42, 99, .30), inset 0 1px 0 rgba(255, 255, 255, .35) !important;
}

/* style block 23 id="transfer-hours-equal-columns-fix" */
.transfer-hours-table {
  min-width: 1300px !important;
  width: 1300px !important;
  table-layout: fixed !important;
}

.transfer-hours-table col {
  width: 100px !important;
}

.transfer-hours-table th,
.transfer-hours-table td {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  padding: 6px 6px !important;
  box-sizing: border-box !important;
}

.transfer-hours-table .transfer-hours-groups th[colspan] {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

.transfer-hours-day-cell {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  white-space: nowrap !important;
}

.transfer-hours-table input.transfer-hours-location-input,
.transfer-hours-table select.transfer-hours-time-input,
.transfer-hours-table select.transfer-hours-auto-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
}

@media(max-width:900px) {
  .transfer-hours-table {
    min-width: 1300px !important;
    width: 1300px !important;
  }
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

/* style block 24 id="transfer-hours-compact-columns-final" */
/* Popup Ore trasferta: colonne piu strette dopo rimozione Da/A */
.transfer-hours-table {
  min-width: 780px !important;
  width: 780px !important;
  table-layout: fixed !important;
}

.transfer-hours-table th,
.transfer-hours-table td {
  padding: 5px 4px !important;
  box-sizing: border-box !important;
}

.transfer-hours-table th:nth-child(1),
.transfer-hours-table td:nth-child(1) {
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
}

.transfer-hours-table th:nth-child(4),
.transfer-hours-table td:nth-child(4),
.transfer-hours-table th:nth-child(11),
.transfer-hours-table td:nth-child(11) {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
}

.transfer-hours-table th:nth-child(2),
.transfer-hours-table td:nth-child(2),
.transfer-hours-table th:nth-child(3),
.transfer-hours-table td:nth-child(3),
.transfer-hours-table th:nth-child(5),
.transfer-hours-table td:nth-child(5),
.transfer-hours-table th:nth-child(6),
.transfer-hours-table td:nth-child(6),
.transfer-hours-table th:nth-child(7),
.transfer-hours-table td:nth-child(7),
.transfer-hours-table th:nth-child(8),
.transfer-hours-table td:nth-child(8),
.transfer-hours-table th:nth-child(9),
.transfer-hours-table td:nth-child(9),
.transfer-hours-table th:nth-child(10),
.transfer-hours-table td:nth-child(10) {
  width: 62px !important;
  min-width: 62px !important;
  max-width: 62px !important;
}

.transfer-hours-table .transfer-hours-groups th[colspan] {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

.transfer-hours-day-cell {
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
  font-size: 11px !important;
}

.transfer-hours-table select.transfer-hours-time-input,
.transfer-hours-table select.transfer-hours-auto-input {
  height: 28px !important;
  padding: 3px 2px !important;
  font-size: 11px !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

@media(max-width:900px) {
  .transfer-hours-table {
    min-width: 780px !important;
    width: 780px !important;
  }
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

/* style block 25 id="transfer-hours-auto-narrow-final" */
/* Popup Ore trasferta: colonna Auto piu stretta */
.transfer-hours-table {
  min-width: 756px !important;
  width: 756px !important;
}

.transfer-hours-table th:nth-child(4),
.transfer-hours-table td:nth-child(4),
.transfer-hours-table th:nth-child(11),
.transfer-hours-table td:nth-child(11) {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
}

.transfer-hours-table select.transfer-hours-auto-input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: 2px 1px !important;
  font-size: 10.5px !important;
  text-align: center !important;
}

@media(max-width:900px) {
  .transfer-hours-table {
    min-width: 756px !important;
    width: 756px !important;
  }
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

/* style block 26  */
* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif
}

body {
  margin: 24px;
  color: #111827
}

h1 {
  color: #082765;
  margin: 0 0 12px
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0
}

.report-card {
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff
}

.report-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 900;
  margin-bottom: 5px
}

.report-value {
  font-size: 16px;
  color: #082765;
  font-weight: 900
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px
}

.report-table th,
.report-table td {
  border: 1px solid #dbe3ee;
  padding: 9px;
  text-align: left
}

.report-table th {
  background: #f4f7fb;
  color: #082765
}

.report-note {
  white-space: pre-wrap;
  line-height: 1.4
}

.client-report-page {
  margin-top: 0;
  page-break-inside: avoid
}

.customer-report-text {
  min-height: 220px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.45
}

.signature-print-area {
  display: flex;
  justify-content: flex-end;
  margin-top: 45px
}

.signature-box {
  width: 280px;
  text-align: center
}

.signature-label {
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 6px
}

.report-no-print {
  display: none !important
}

@media print {
  button {
    display: none !important
  }

  body {
    margin: 14mm
  }

  .client-report-page {
    margin-top: 0;
    page-break-inside: avoid
  }
}

/* style block 27  */
* {
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif
}

body {
  margin: 24px;
  color: #111827
}

h1 {
  color: #082765;
  margin: 0 0 12px
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 14px 0
}

.report-card {
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 12px;
  background: #f8fbff
}

.report-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 900;
  margin-bottom: 5px
}

.report-value {
  font-size: 16px;
  color: #082765;
  font-weight: 900
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px
}

.report-table th,
.report-table td {
  border: 1px solid #dbe3ee;
  padding: 9px;
  text-align: left
}

.report-table th {
  background: #f4f7fb;
  color: #082765
}

.report-note {
  white-space: pre-wrap;
  line-height: 1.4
}

.client-report-page {
  margin-top: 0;
  page-break-inside: avoid
}

.customer-report-text {
  min-height: 220px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  padding: 14px;
  white-space: pre-wrap;
  line-height: 1.45
}

.signature-print-area {
  display: flex;
  justify-content: flex-end;
  margin-top: 45px
}

.signature-box {
  width: 280px;
  text-align: center
}

.signature-label {
  font-size: 12px;
  font-weight: 900;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 6px
}

.report-no-print {
  display: none !important
}

@media print {
  button {
    display: none !important
  }

  body {
    margin: 14mm
  }

  .client-report-page {
    margin-top: 0;
    page-break-inside: avoid
  }
}

/* style block 28  */
* {
  box-sizing: border-box;
  font-family: Arial,
    Helvetica,
    sans-serif
}

html,
body {
  width: 100%;
  min-width: 100%;
  min-height: 100%;
  height: 100%
}

body {
  margin: 0;
  padding: 0;
  background: #f8fbff;
  color: #111827;
  width: 100%;
  min-width: 100%;
  display: block
}

.machine-custom-file-box {
  background: white;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  width: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  min-height: 100%;
  display: flex;
  flex-direction: column
}

.machine-custom-file-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f4f7fb;
  border-bottom: 1px solid #dbe3ee
}

.machine-custom-file-title {
  margin: 0;
  color: #082765;
  font-size: 15px;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 8px
}

.machine-custom-file-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #082765;
  border: 2px solid #082765;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto
}

.machine-custom-file-icon svg {
  width: 22px;
  height: 22px;
  stroke: white !important;
  stroke-width: 2.2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round
}

.machine-custom-file-body {
  padding: 12px;
  background: white;
  flex: 1;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0
}

.machine-files-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
  border: none !important;
  background: transparent !important;
  margin-top: 0 !important
}

.machine-files-table th {
  border: 1px solid #dbe3ee !important;
  background: #f4f7fb !important;
  color: #082765 !important;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 900;
  text-align: center
}

.machine-files-table th:first-child {
  border-radius: 12px 0 0 12px !important
}

.machine-files-table th:last-child {
  border-radius: 0 12px 12px 0 !important;
  width: 130px
}

.machine-files-table td {
  background: white !important;
  border-top: 1px solid #dbe3ee !important;
  border-bottom: 1px solid #dbe3ee !important;
  border-right: 1px solid #dbe3ee !important;
  padding: 12px 10px;
  font-size: 14px;
  text-align: center;
  vertical-align: middle
}

.machine-files-table td:first-child {
  border-left: 1px solid #dbe3ee !important;
  border-radius: 12px 0 0 12px !important;
  text-align: left
}

.machine-files-table td:last-child {
  border-radius: 0 12px 12px 0 !important
}

.machine-files-table tr {
  box-shadow: 0 4px 12px rgba(15,
      23,
      42,
      .06) !important
}

.machine-files-table td strong {
  color: #12367a;
  font-weight: 900;
  word-break: break-word
}

.file-type {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  word-break: break-word
}

.inline-user-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg,
      #0068d8,
      #004eaa) !important;
  color: white !important;
  padding: 8px 14px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  white-space: nowrap
}

.file-action-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap
}

.file-action-icon {
  width: 36px;
  height: 32px;
  border-radius: 8px;
  background: white !important;
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important
}

.file-action-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round
}

.file-view-icon {
  border: 2px solid #0057c8 !important
}

.file-view-icon svg {
  stroke: #0057c8
}

.file-download-icon {
  border: 2px solid #047857 !important
}

.file-download-icon svg {
  stroke: #047857
}

@media(max-width:700px) {
  body {
    padding: 0
  }

  .machine-files-table {
    display: block;
    overflow-x: auto
  }

  .machine-files-table th,
  .machine-files-table td {
    white-space: nowrap
  }
}

.receipt-action-emoji-btn {
  font-size: 18px !important;
  line-height: 1 !important;
  font-family: "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    Arial,
    sans-serif !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important
}

.receipt-action-emoji-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: translateY(-1px)
}

.receipt-files-table th:last-child,
.receipt-files-table td:last-child {
  width: 82px !important;
  max-width: 82px !important;
  padding-left: 6px !important;
  padding-right: 6px !important
}

.receipt-actions-compact {
  gap: 4px !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important
}

.receipt-action-icon-btn {
  width: 30px !important;
  height: 28px !important;
  min-width: 30px !important;
  padding: 4px !important
}

@media(max-width:820px) {
  #ticketPage .modal.ticket-modal.modal-popup-style {
    height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #ticketPage .popup-modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    height: auto !important;
    max-height: none !important;
    padding-top: 80px !important;
  }

  #machineDetailModal .modal.modal-popup-style {
    height: 100dvh !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #machineDetailModal .popup-modal-body {
    flex: 1 !important;
    overflow-y: auto !important;
    height: auto !important;
    max-height: none !important;
    padding-top: 80px !important;
  }
}

/* === FIX: main-ticket-cell sono div, non td - applico grid layout === */
.main-ticket-inner-table .main-ticket-row,
.main-tickets-header-row {
  display: grid !important;
  grid-template-columns: 17fr 10fr 15fr 13fr 11fr 9fr 9fr 12fr 170px !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 860px !important;
}

.main-ticket-cell {
  padding: 8px 10px !important;
  text-align: center !important;
  color: #082765 !important;
  font-weight: 800 !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
  overflow: hidden !important;
}

.main-ticket-cell.ticket-client-sticky,
.main-ticket-cell:nth-child(3) {
  text-align: left !important;
}

body.dark-mode .main-ticket-cell {
  color: #e5e7eb !important;
}

/* Label "Cliente:", "Macchina:", "Referente:" leggibili in dark mode (in light va già bene) */
body.dark-mode .ticket-label-line {
  color: #ffffff !important;
}

/* Valori blu scuro (nome cliente, macchina, referente, date, tecnico) illeggibili in dark mode */
body.dark-mode .ticket-value-line,
body.dark-mode .ticket-value-line * {
  color: #ffffff !important;
}

/* === FIX: header riga usa stessa grid delle righe dati, sempre allineata === */
.main-tickets-header-row {
  background: #f1f5f9 !important;
  border-radius: 10px !important;
  margin-bottom: 8px !important;
}

.main-tickets-header-row .main-ticket-cell {
  font-size: 12px !important;
  text-transform: uppercase !important;
  color: #475569 !important;
  font-weight: 900 !important;
  text-align: center !important;
}

body.dark-mode .main-tickets-header-row {
  background: #1e293b !important;
}

body.dark-mode .main-tickets-header-row .main-ticket-cell {
  color: #cbd5e1 !important;
}

/* === Scrollbar orizzontale custom, più spessa e facile da prendere === */
.ticket-section-body,
#ticketContainer .ticket-section-body,
#popupTicketContainer .ticket-section-body {
  scrollbar-width: auto !important;
  scrollbar-color: #64748b #e2e8f0 !important;
}

.ticket-section-body::-webkit-scrollbar,
#ticketContainer .ticket-section-body::-webkit-scrollbar,
#popupTicketContainer .ticket-section-body::-webkit-scrollbar {
  height: 18px !important;
  width: 18px !important;
}

.ticket-section-body::-webkit-scrollbar-track,
#ticketContainer .ticket-section-body::-webkit-scrollbar-track,
#popupTicketContainer .ticket-section-body::-webkit-scrollbar-track {
  background: #e2e8f0 !important;
  border-radius: 9px !important;
}

.ticket-section-body::-webkit-scrollbar-thumb,
#ticketContainer .ticket-section-body::-webkit-scrollbar-thumb,
#popupTicketContainer .ticket-section-body::-webkit-scrollbar-thumb {
  background: #64748b !important;
  border-radius: 9px !important;
  border: 3px solid #e2e8f0 !important;
  min-width: 60px !important;
}

.ticket-section-body::-webkit-scrollbar-thumb:hover,
#ticketContainer .ticket-section-body::-webkit-scrollbar-thumb:hover,
#popupTicketContainer .ticket-section-body::-webkit-scrollbar-thumb:hover {
  background: #475569 !important;
}

body.dark-mode .ticket-section-body,
body.dark-mode #ticketContainer .ticket-section-body,
body.dark-mode #popupTicketContainer .ticket-section-body {
  scrollbar-color: #94a3b8 #1e293b !important;
}

body.dark-mode .ticket-section-body::-webkit-scrollbar-track,
body.dark-mode #ticketContainer .ticket-section-body::-webkit-scrollbar-track,
body.dark-mode #popupTicketContainer .ticket-section-body::-webkit-scrollbar-track {
  background: #1e293b !important;
}

body.dark-mode .ticket-section-body::-webkit-scrollbar-thumb,
body.dark-mode #ticketContainer .ticket-section-body::-webkit-scrollbar-thumb,
body.dark-mode #popupTicketContainer .ticket-section-body::-webkit-scrollbar-thumb {
  background: #94a3b8 !important;
  border: 3px solid #1e293b !important;
}

body.dark-mode .ticket-section-body::-webkit-scrollbar-thumb:hover,
body.dark-mode #ticketContainer .ticket-section-body::-webkit-scrollbar-thumb:hover,
body.dark-mode #popupTicketContainer .ticket-section-body::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1 !important;
}