/*
 * Copyright (c) 2026 Leonardo Marchi. Tutti i diritti riservati.
 * Codice proprietario. Uso non autorizzato vietato.
 * Vedi NOTICE.txt per titolarita e condizioni d'uso.
 */

/* Classic theme - cross-tab consistency overrides */

body.theme-classic .modal-card,
body.theme-classic .modal-grid label,
body.theme-classic .agenda-edit-card {
  background: #f4f7fc;
  color: #1d2737;
  border-color: rgba(112, 129, 154, 0.22);
  box-shadow: 0 2px 6px rgba(32, 47, 70, 0.08);
}

/* Login / Accesso gestionale */
body.theme-classic .login-view {
  background: rgba(217, 225, 236, 0.72);
  backdrop-filter: blur(4px);
}

body.theme-classic .login-card {
  border-color: rgba(101, 119, 146, 0.26);
  background: linear-gradient(180deg, #f3f7fd 0%, #edf3fb 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 12px 28px rgba(28, 41, 61, 0.16);
}

body.theme-classic .login-card h1 {
  color: #1b2d45;
}

body.theme-classic .login-card p,
body.theme-classic .login-card label {
  color: #465a76;
}

body.theme-classic .login-card input,
body.theme-classic .login-card textarea,
body.theme-classic .login-card select {
  background: #ffffff;
  border-color: rgba(108, 126, 153, 0.22);
  color: #1e2f47;
}

body.theme-classic .login-card input::placeholder {
  color: #6c7d93;
}

body.theme-classic .login-card .btn,
body.theme-classic .login-card .btn-icon {
  background: #e8eef7;
  border-color: rgba(106, 124, 151, 0.26);
  color: #22344d;
}

body.theme-classic .login-card .btn:hover,
body.theme-classic .login-card .btn-icon:hover {
  background: #dfe7f2;
  border-color: rgba(96, 116, 146, 0.34);
}

body.theme-classic .login-error {
  color: #b52f49;
}

body.theme-classic .modal-head,
body.theme-classic .agenda-edit-head {
  background: #e6edf7;
  border-bottom-color: rgba(112, 129, 154, 0.18);
}

body.theme-classic #agendaEditDialog::backdrop {
  background: rgba(18, 27, 41, 0.34);
  backdrop-filter: blur(1px);
}

body.theme-classic #agendaEditDialog .agenda-edit-card {
  border: 1px solid rgba(98, 118, 147, 0.34);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 16px 34px rgba(23, 36, 55, 0.26);
}

body.theme-classic #agendaEditDialog .agenda-edit-head {
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, #dbe6f3 0%, #d1ddec 100%);
  border-bottom: 1px solid rgba(96, 117, 146, 0.26);
}

body.theme-classic #agendaEditDialog .agenda-edit-head h3 {
  margin: 0;
  color: #1f324d;
  font-weight: 800;
  letter-spacing: 0.01em;
}

body.theme-classic #agendaEditDialog .agenda-edit-subtitle {
  margin: 4px 0 0;
  color: #465a76;
}

body.theme-classic #agendaEditDialog .agenda-edit-grid {
  gap: 10px;
  padding: 12px 14px 10px;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.92), rgba(244, 248, 253, 0.94));
}

body.theme-classic #agendaEditDialog .agenda-edit-grid label {
  display: grid;
  gap: 5px;
  padding: 6px 7px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(126, 146, 174, 0.22);
  color: #2f4665;
  font-weight: 700;
}

body.theme-classic #agendaEditDialog .agenda-edit-grid .cell-input {
  min-height: 30px;
  border: 1px solid rgba(120, 141, 169, 0.34);
  border-radius: 8px;
  background: #ffffff;
  color: #1f324c;
  padding: 5px 7px;
}

body.theme-classic #agendaEditDialog .agenda-edit-grid textarea.cell-input {
  min-height: 112px;
  resize: vertical;
}

body.theme-classic #agendaEditDialog .agenda-edit-grid .cell-input:focus {
  border-color: #6c98d8;
  box-shadow: 0 0 0 2px rgba(108, 152, 216, 0.22);
}

body.theme-classic #agendaEditDialog .agenda-edit-actions {
  padding: 10px 14px 12px;
  border-top: 1px solid rgba(100, 121, 149, 0.2);
  background: #e8eef7;
}

body.theme-classic .modal-note,
body.theme-classic .cell-helper-text,
body.theme-classic .muted {
  color: #5c6b81;
}

body.theme-classic .viaggio-move-card {
  background: linear-gradient(180deg, #f3f7fd 0%, #edf3fb 100%);
  border-color: rgba(104, 122, 149, 0.22);
  color: #1f3048;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.82),
    0 12px 28px rgba(28, 41, 61, 0.16);
}

body.theme-classic .viaggio-move-head {
  background: linear-gradient(180deg, #dbe6f3 0%, #d0dceb 100%);
  border-bottom-color: rgba(105, 123, 150, 0.2);
}

body.theme-classic .viaggio-move-head h3 {
  color: #1c2f47;
}

body.theme-classic .viaggio-move-message {
  color: #3a4e69;
}

body.theme-classic .viaggio-move-actions {
  border-top-color: rgba(104, 122, 149, 0.16);
}

body.theme-classic .viaggio-move-today-btn {
  color: #1e3350;
  border-color: rgba(106, 123, 148, 0.28);
  background: linear-gradient(180deg, #f7fbff 0%, #eaf2fc 100%);
}

/* Warning / notice dialogs (HP missing, delete confirmations, chat notices) */
body.theme-classic .agenda-warning-card,
body.theme-classic .chat-notice-card,
body.theme-classic .chat-forward-card {
  border-color: rgba(176, 102, 88, 0.28);
  background:
    radial-gradient(900px 240px at 0% -10%, rgba(255, 142, 96, 0.12), transparent 55%),
    radial-gradient(800px 220px at 100% -20%, rgba(255, 198, 107, 0.1), transparent 55%),
    linear-gradient(180deg, #f3f7fd 0%, #edf3fb 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.82),
    0 8px 20px rgba(27, 40, 61, 0.16);
}

body.theme-classic .agenda-warning-head,
body.theme-classic .chat-notice-head {
  background: linear-gradient(180deg, #dbe6f3 0%, #d0dceb 100%);
  border-bottom: 1px solid rgba(105, 123, 150, 0.22);
}

body.theme-classic .agenda-warning-head h4,
body.theme-classic .chat-notice-head h4 {
  color: #1c2f47;
  font-weight: 800;
}

body.theme-classic .agenda-warning-message,
body.theme-classic .chat-notice-message {
  color: #243750;
  font-weight: 700;
  line-height: 1.35;
}

body.theme-classic #agendaDeleteConfirmDialog .agenda-warning-head h3,
body.theme-classic #agendaDeleteConfirmDialog .agenda-warning-head h4,
body.theme-classic #agendaDeleteConfirmTitle {
  color: #b52f49;
}

body.theme-classic .agenda-warning-grid label {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(104, 122, 149, 0.18);
}

body.theme-classic .agenda-warning-grid label span,
body.theme-classic .agenda-warning-grid label strong,
body.theme-classic .agenda-warning-grid label small {
  color: #2a3d58;
}

body.theme-classic .agenda-warning-actions,
body.theme-classic .chat-notice-actions {
  border-top: 1px solid rgba(104, 122, 149, 0.16);
}

body.theme-classic .cell-combo-menu {
  background: #ffffff;
  border-color: rgba(95, 130, 190, 0.48);
  box-shadow: 0 10px 20px rgba(45, 84, 145, 0.2);
}

body.theme-classic .cell-combo-item {
  color: #173769;
  border-bottom-color: rgba(130, 160, 210, 0.24);
  font-size: 0.68rem;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  min-height: 24px;
  padding: 3px 7px;
}

body.theme-classic .cell-combo-item:hover,
body.theme-classic .cell-combo-item:focus {
  background: rgba(171, 204, 255, 0.42);
}

body.theme-classic .cell-combo-item.is-active {
  background: rgba(146, 188, 255, 0.58);
}

body.theme-classic .viaggio-context-menu {
  background: #ffffff;
  border-color: rgba(95, 130, 190, 0.48);
  box-shadow: 0 10px 20px rgba(45, 84, 145, 0.2);
}

body.theme-classic .viaggio-context-menu-item {
  color: #173769;
  border-bottom-color: rgba(130, 160, 210, 0.24);
  font-size: 0.68rem;
  font-family: "Rajdhani", sans-serif;
  font-weight: 700;
  min-height: 24px;
  padding: 3px 7px;
}

body.theme-classic .viaggio-context-menu-item:hover,
body.theme-classic .viaggio-context-menu-item:focus {
  background: rgba(171, 204, 255, 0.42);
}

/* Anagrafiche tables: stronger header contrast in classic theme */
body.theme-classic section[data-panel="anagrafiche"] .mini-table th {
  background: linear-gradient(180deg, #d7e2f0 0%, #cad7e8 100%);
  color: #1f324d;
  border-color: rgba(99, 121, 151, 0.34);
  text-shadow: none;
}

/* Gestione utenti: keep header labels clearly readable in classic theme */
body.theme-classic section[data-panel="utenti"] .mini-table th {
  background: linear-gradient(180deg, #d7e2f0 0%, #cad7e8 100%);
  color: #1f324d;
  border-color: rgba(99, 121, 151, 0.34);
  text-shadow: none;
}

/* Autista column compact width */
body.theme-classic section[data-panel="viaggio"] .data-table th:nth-child(2),
body.theme-classic section[data-panel="viaggio"] .data-table td:nth-child(2) {
  width: 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
}

body.theme-classic section[data-panel="viaggio"] .data-table th.viaggio-camion-col,
body.theme-classic section[data-panel="viaggio"] .data-table td:nth-child(5),
body.theme-classic section[data-panel="viaggio"] .viaggio-camion-cell {
  width: 210px !important;
  min-width: 210px !important;
  max-width: 210px !important;
}

/* Stampa etichette (iframe panel) in Classic theme */
body.theme-classic section[data-panel="stampa-etichette"].panel-iframe {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #dfe7f2 0%, #d7e0ec 100%);
  border-color: rgba(93, 111, 138, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 2px 6px rgba(32, 47, 70, 0.08);
}

body.theme-classic section[data-panel="stampa-etichette"].panel-iframe iframe {
  background: #f4f7fc;
}

/* Viaggi - active "TUTTI" button aligned with Movimenti style */
body.theme-classic #toggleSelectionFilterBtn.is-active {
  border-color: rgba(93, 222, 145, 0.45);
  background: linear-gradient(180deg, rgba(40, 146, 80, 0.35), rgba(30, 112, 61, 0.32));
  color: #dbffea;
  box-shadow: inset 0 0 0 1px rgba(140, 255, 184, 0.18);
}

body.theme-classic .viaggio-toggle-da-stabilire,
body.theme-classic .viaggio-toggle-pill {
  background: #e8eef7;
  color: #25364f;
  border-color: rgba(106, 125, 153, 0.28);
}

body.theme-classic .viaggio-toggle-da-stabilire:hover,
body.theme-classic .viaggio-toggle-pill:hover {
  background: #dfe7f2;
  color: #1f3048;
  border-color: rgba(96, 116, 146, 0.34);
}

body.theme-classic .viaggio-toggle-da-stabilire.is-active,
body.theme-classic .viaggio-toggle-pill.is-active {
  background: linear-gradient(120deg, #2f8cff 0%, #5e77ff 100%);
  color: #fff;
  border-color: transparent;
}

/* Chat */
body.theme-classic .chat-launcher,
body.theme-classic .fullscreen-toggle {
  background: #e9eff8;
  color: #22324a;
  border-color: rgba(112, 129, 154, 0.24);
  box-shadow: 0 1px 3px rgba(32, 47, 70, 0.06);
}

body.theme-classic .chat-launcher:hover {
  background: #dfe7f2;
  border-color: rgba(96, 116, 146, 0.34);
}

body.theme-classic .chat-launcher.has-unread-pulse {
  border-color: rgba(208, 88, 106, 0.45);
  animation: chatUnreadPulseSoftClassic 2.2s ease-in-out infinite;
}

body.theme-classic .chat-launcher.has-unread-pulse .chat-launcher-icon {
  color: #b6465b;
}

@keyframes chatUnreadPulseSoftClassic {
  0%, 100% {
    box-shadow: 0 1px 3px rgba(32, 47, 70, 0.06), 0 0 0 0 rgba(208, 88, 106, 0);
    background: #e9eff8;
  }
  50% {
    box-shadow: 0 1px 3px rgba(32, 47, 70, 0.06), 0 0 0 6px rgba(208, 88, 106, 0.16);
    background: #f3e9ee;
  }
}

body.theme-classic .fullscreen-toggle.is-active {
  background: #bfe9d2;
  border-color: #4f9b74;
  color: #0b4a2d;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 1px 3px rgba(34, 72, 52, 0.12);
}

body.theme-classic .fullscreen-toggle.is-active .fullscreen-toggle-label,
body.theme-classic .fullscreen-toggle.is-active .fullscreen-toggle-icon {
  color: #0b4a2d;
}

body.theme-classic .chat-panel {
  border-color: rgba(112, 129, 154, 0.22);
  background: #f4f7fc;
  box-shadow: 0 4px 10px rgba(32, 47, 70, 0.08);
}

body.theme-classic .chat-panel-head {
  background: #e7edf7;
  border-bottom-color: rgba(112, 129, 154, 0.16);
}

body.theme-classic .chat-panel-title strong,
body.theme-classic .chat-user-name,
body.theme-classic .chat-msg-author {
  color: #22324a;
}

body.theme-classic .chat-panel-title span,
body.theme-classic .chat-user-preview,
body.theme-classic .chat-msg-time,
body.theme-classic .chat-emoji-name {
  color: #5f6f86;
}

body.theme-classic .chat-msg-read.is-sent {
  color: #7c8fa9;
}

body.theme-classic .chat-msg-read.is-read {
  color: #2e78d0;
}

body.theme-classic .chat-msg-read-label.is-sent {
  color: #5f6f86;
  background: rgba(112, 129, 154, 0.16);
}

body.theme-classic .chat-msg-read-label.is-read {
  color: #1f62af;
  background: rgba(46, 120, 208, 0.2);
}

body.theme-classic .chat-sidebar {
  background: #ecf1f8;
  border-right-color: rgba(112, 129, 154, 0.16);
}

body.theme-classic .chat-sidebar-head,
body.theme-classic .chat-sidebar-search {
  border-bottom-color: rgba(112, 129, 154, 0.14);
}

body.theme-classic .chat-users-list {
  background: rgba(255, 255, 255, 0.55);
}

body.theme-classic .chat-user-item {
  background: #f8fbff;
  border-color: rgba(112, 129, 154, 0.16);
}

body.theme-classic .chat-user-item:hover {
  background: #eef3fa;
  border-color: rgba(112, 129, 154, 0.26);
}

body.theme-classic .chat-user-item.is-active {
  background: #dfe8f5;
  border-color: rgba(99, 117, 146, 0.3);
}

body.theme-classic .chat-thread-messages,
body.theme-classic .chat-empty {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(112, 129, 154, 0.14);
  color: #53637a;
}

body.theme-classic .chat-day-divider span,
body.theme-classic .chat-msg,
body.theme-classic .chat-attachment-msg {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(112, 129, 154, 0.14);
}

body.theme-classic .chat-msg.is-mine {
  background: #e8eff8;
  border-color: rgba(112, 129, 154, 0.18);
}

body.theme-classic .chat-msg-text,
body.theme-classic .chat-attachment-meta strong {
  color: #1f2b3d;
}

body.theme-classic .chat-send-form {
  background: #e9eff8;
  border-top-color: rgba(112, 129, 154, 0.14);
}

body.theme-classic .chat-send-form textarea {
  background: #fff;
  border-color: rgba(117, 134, 158, 0.22);
  color: #1d2737;
}

body.theme-classic .chat-emoji-panel {
  background: #f7faff;
  border-color: rgba(112, 129, 154, 0.2);
  box-shadow: 0 4px 10px rgba(32, 47, 70, 0.08);
}

body.theme-classic .chat-emoji-panel-head {
  background: #e9eff8;
  border-bottom-color: rgba(112, 129, 154, 0.14);
}

body.theme-classic .chat-emoji-item {
  background: #fff;
  border-color: rgba(112, 129, 154, 0.12);
  color: #22324a;
}

body.theme-classic .chat-emoji-item:hover {
  background: #eef3fa;
  border-color: rgba(112, 129, 154, 0.22);
}

/* Ingressi + Agenda weekly boards (shared visual language) */
body.theme-classic .ingressi-week-wrap {
  background: linear-gradient(180deg, #dfe7f2 0%, #d7e0ec 100%);
  border-color: rgba(93, 111, 138, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 1px 3px rgba(34, 49, 73, 0.08);
}

body.theme-classic .ingressi-week-head {
  background: linear-gradient(180deg, #cfd9e8 0%, #c4d1e2 100%);
  border-bottom-color: transparent;
  box-shadow: none;
}

body.theme-classic .ingressi-week-label,
body.theme-classic .agenda-week-meta {
  color: #1a2a41;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.45);
}

body.theme-classic .ingressi-legend-chip,
body.theme-classic .agenda-week-meta .selected-count {
  background: #eef3fa;
  border-color: rgba(93, 111, 138, 0.22);
  color: #23344d;
  font-weight: 700;
}

body.theme-classic .ingressi-color-legend {
  gap: 6px;
}

body.theme-classic .ingressi-legend-chip {
  padding: 2px 7px;
  font-size: 0.72rem;
  line-height: 1;
}

body.theme-classic .ingressi-color-manager {
  background: rgba(255, 255, 255, 0.6);
  border-top-color: rgba(112, 129, 154, 0.12);
}

body.theme-classic .ingressi-color-manager-item {
  background: #fff;
  border-color: rgba(112, 129, 154, 0.14);
  color: #22324a;
}

body.theme-classic .ingressi-week-grid {
  background: rgba(122, 139, 164, 0.26);
  margin-top: -1px;
  border-top: 0;
}

body.theme-classic .ingressi-day-col {
  background: linear-gradient(180deg, #eef3fa 0%, #e7eef7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    inset 0 0 0 1px rgba(105, 122, 147, 0.08);
}

body.theme-classic .ingressi-day-head {
  background: linear-gradient(180deg, #d3deed 0%, #c9d6e7 100%);
  border-bottom-color: rgba(93, 111, 138, 0.26);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.42);
}

body.theme-classic .ingressi-day-col.is-today .ingressi-day-head {
  background: linear-gradient(180deg, #245084 0%, #1b3f6c 100%);
  border-bottom-color: rgba(8, 22, 43, 0.55);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
}

body.theme-classic .ingressi-day-name {
  color: #41516a;
  font-weight: 700;
}

body.theme-classic .ingressi-day-date,
body.theme-classic .ingressi-card-title {
  color: #203047;
  font-weight: 800;
}

body.theme-classic .ingressi-day-col.is-today .ingressi-day-name {
  color: #dbe9ff;
}

body.theme-classic .ingressi-day-col.is-today .ingressi-day-date {
  color: #f5f9ff;
}

body.theme-classic .ingressi-day-empty {
  color: #5a6a81;
  background: #fff;
  border-color: rgba(112, 129, 154, 0.14);
}

body.theme-classic .ingressi-color-select {
  background: #fff;
  color: #22324a;
  border-color: rgba(112, 129, 154, 0.18);
}

body.theme-classic .ingressi-color-select option {
  background: #fff;
  color: #22324a;
}

/* Ingressi toolbar (date filter + week selector) */
body.theme-classic .toolbar-ingressi .datebox {
  background: #edf2f8;
  border-color: rgba(96, 114, 141, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

body.theme-classic .toolbar-ingressi .datebox .date-label {
  background: linear-gradient(180deg, #cfd9e8 0%, #c5d1e2 100%);
  color: #1d3048;
  font-weight: 700;
}

body.theme-classic .toolbar-ingressi .datebox .btn-icon {
  color: #21354f;
}

body.theme-classic .toolbar-ingressi .datebox .btn-icon:hover {
  background: rgba(103, 122, 151, 0.1);
  color: #14263d;
}

body.theme-classic .toolbar-ingressi .datebox .week-display {
  color: #1b2d45;
  background: rgba(255, 255, 255, 0.65);
  border-left: 1px solid rgba(96, 114, 141, 0.14);
  border-right: 1px solid rgba(96, 114, 141, 0.14);
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.theme-classic .toolbar-ingressi .datebox .week-display:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #11243b;
}

body.theme-classic .toolbar-ingressi .search {
  background: #ffffff;
  border-color: rgba(96, 114, 141, 0.24);
  color: #1d2c41;
}

body.theme-classic .toolbar-ingressi .search::placeholder {
  color: #68798f;
}

body.theme-classic .toolbar-ingressi #goTodayIngressiBtn {
  background: #e7edf7;
  color: #2d415d;
  border-color: rgba(102, 119, 145, 0.26);
}

body.theme-classic .toolbar-ingressi #goTodayIngressiBtn:hover {
  background: #dfe8f4;
  color: #233650;
}

/* Ingressi cards readability in Classic */
body.theme-classic .ingressi-card {
  border-color: color-mix(in srgb, var(--ingresso-color) 50%, rgba(88, 106, 133, 0.22));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ingresso-color) 16%, #ffffff 84%) 0%, #f5f8fd 100%);
}

body.theme-classic .ingressi-card-header {
  background: rgba(255, 255, 255, 0.62);
  border-bottom-color: rgba(99, 117, 144, 0.16);
}

body.theme-classic .ingressi-card-field-label {
  color: #6a7c93;
}

body.theme-classic .ingressi-cer-desc {
  color: #50647d;
}

body.theme-classic .ingressi-card-field .cell-input {
  background: rgba(255,255,255,0.92);
  color: #203049;
  border-color: rgba(104, 122, 149, 0.18);
}

/* Agenda - less flat, more depth in Classic theme */
body.theme-classic .agenda-week-wrap {
  background: linear-gradient(180deg, #dfe7f2 0%, #d7e0ec 100%);
  border-color: rgba(93, 111, 138, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    0 1px 3px rgba(34, 49, 73, 0.08);
}

body.theme-classic .agenda-week-wrap .ingressi-week-head {
  background: linear-gradient(180deg, #cfd9e8 0%, #c4d1e2 100%);
  border-bottom-color: rgba(89, 107, 133, 0.26);
}

body.theme-classic .agenda-week-wrap .ingressi-week-label {
  color: #1a2a41;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.45);
}

body.theme-classic .agenda-week-wrap .agenda-week-meta {
  color: #24364f;
}

body.theme-classic .agenda-week-wrap .agenda-week-meta .selected-count {
  background: #eef3fa;
  border-color: rgba(93, 111, 138, 0.22);
  color: #23344d;
  font-weight: 700;
}

/* Agenda toolbar (date filter + week selector) */
body.theme-classic .toolbar-agenda .datebox {
  background: #edf2f8;
  border-color: rgba(96, 114, 141, 0.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

body.theme-classic .toolbar-agenda .datebox .date-label {
  background: linear-gradient(180deg, #cfd9e8 0%, #c5d1e2 100%);
  color: #1d3048;
  font-weight: 700;
}

body.theme-classic .toolbar-agenda .datebox .btn-icon {
  color: #21354f;
  background: transparent;
}

body.theme-classic .toolbar-agenda .datebox .btn-icon:hover {
  background: rgba(103, 122, 151, 0.1);
  color: #14263d;
}

body.theme-classic .toolbar-agenda .datebox .week-display {
  color: #1b2d45;
  background: rgba(255, 255, 255, 0.65);
  border-left: 1px solid rgba(96, 114, 141, 0.14);
  border-right: 1px solid rgba(96, 114, 141, 0.14);
  font-weight: 800;
  letter-spacing: 0.02em;
}

body.theme-classic .toolbar-agenda .datebox .week-display:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #11243b;
}

body.theme-classic .toolbar-agenda .datebox .date-input {
  color: #1e2f47;
}

body.theme-classic .toolbar-agenda .search {
  background: #ffffff;
  border-color: rgba(96, 114, 141, 0.24);
  color: #1d2c41;
}

body.theme-classic .toolbar-agenda .search::placeholder {
  color: #68798f;
}

body.theme-classic .toolbar-agenda #agendaTodayBtn {
  background: #e7edf7;
  color: #2d415d;
  border-color: rgba(102, 119, 145, 0.26);
}

body.theme-classic .toolbar-agenda #agendaTodayBtn:hover {
  background: #dfe8f4;
  color: #233650;
}

/* Viaggi - date "+" button readability in Classic theme */
body.theme-classic section[data-panel="viaggio"] .date-slot-top {
  grid-template-columns: 1fr 20px;
  gap: 3px;
}

body.theme-classic section[data-panel="viaggio"] .date-plus {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 6px;
  border-color: rgba(96, 122, 166, 0.38);
  background: linear-gradient(180deg, #f8fbff 0%, #e7effa 100%);
  color: #1c3354;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.88),
    0 1px 2px rgba(43, 67, 101, 0.14);
}

body.theme-classic section[data-panel="viaggio"] .date-plus:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #dfe9f7 100%);
  border-color: rgba(82, 111, 160, 0.46);
  color: #102744;
}

body.theme-classic section[data-panel="viaggio"] .date-plus:focus-visible {
  outline: 2px solid rgba(87, 139, 216, 0.52);
  outline-offset: 1px;
}

body.theme-classic .agenda-week-grid {
  background: rgba(122, 139, 164, 0.26);
}

body.theme-classic .agenda-week-grid .ingressi-day-col {
  background: linear-gradient(180deg, #eef3fa 0%, #e7eef7 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.78),
    inset 0 0 0 1px rgba(105, 122, 147, 0.08);
}

body.theme-classic .agenda-week-grid .ingressi-day-head {
  background: linear-gradient(180deg, #d3deed 0%, #c9d6e7 100%);
  border-bottom-color: rgba(93, 111, 138, 0.26);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.42);
}

body.theme-classic .agenda-week-grid .ingressi-day-col.is-today .ingressi-day-head {
  background: linear-gradient(180deg, #245084 0%, #1b3f6c 100%);
  border-bottom-color: rgba(8, 22, 43, 0.55);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
}

body.theme-classic .agenda-week-grid .ingressi-day-name {
  color: #41516a;
  font-weight: 700;
}

body.theme-classic .agenda-week-grid .ingressi-day-date {
  color: #203047;
  font-weight: 800;
}

body.theme-classic .agenda-week-grid .ingressi-day-col.is-today .ingressi-day-name {
  color: #dbe9ff;
}

body.theme-classic .agenda-week-grid .ingressi-day-col.is-today .ingressi-day-date {
  color: #f5f9ff;
}

body.theme-classic .agenda-week-grid .ingressi-day-empty {
  color: #405066;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(95, 113, 139, 0.2);
}

body.theme-classic .agenda-week-grid .agenda-item {
  background: linear-gradient(180deg, #ffffff 0%, #edf3fb 100%);
  border: 1px solid rgba(102, 120, 146, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 1px 3px rgba(32, 47, 70, 0.08);
  border-radius: 8px;
}

body.theme-classic .agenda-week-grid .agenda-item.is-unseen {
  border-color: rgba(80, 113, 168, 0.34);
  box-shadow:
    inset 2px 0 0 rgba(74, 111, 175, 0.7),
    0 1px 3px rgba(66, 97, 145, 0.1);
}

body.theme-classic .agenda-week-grid .agenda-item-head {
  border-bottom: 1px solid rgba(98, 116, 143, 0.18);
  padding-bottom: 4px;
}

body.theme-classic .agenda-week-grid .agenda-item-date {
  color: #30425a;
  font-weight: 600;
}

body.theme-classic .agenda-week-grid .agenda-item-status {
  background: #e2eaf5;
  color: #2f435d;
  border: 1px solid rgba(104, 121, 147, 0.22);
  border-radius: 999px;
  padding: 1px 6px;
  font-weight: 700;
}

body.theme-classic .agenda-week-grid .agenda-item.is-unseen .agenda-item-status {
  background: #d3e2fb;
  color: #173e70;
  border-color: rgba(79, 116, 180, 0.28);
}

body.theme-classic .agenda-week-grid .agenda-item-title {
  color: #16263b;
  font-weight: 700;
}

body.theme-classic .agenda-week-grid .agenda-item-text {
  color: #2f4159;
  line-height: 1.3;
}

body.theme-classic .agenda-week-grid .agenda-item-type-badge {
  background: #e3ebf6;
  color: #293c56;
  border: 1px solid rgba(97, 115, 141, 0.22);
  border-radius: 999px;
  padding: 1px 6px;
  font-weight: 800;
}

body.theme-classic .agenda-week-grid .agenda-item-deadline,
body.theme-classic .agenda-week-grid .agenda-item-owner {
  color: #33465f;
}

body.theme-classic .agenda-week-grid .agenda-item-actions {
  display: flex;
  width: 100%;
  gap: 3px;
  justify-content: flex-end;
  margin-top: 4px;
  margin-left: auto;
  padding-top: 2px;
  border-top: 1px solid rgba(102, 120, 146, 0.12);
}

body.theme-classic .agenda-week-grid .agenda-item-actions .agenda-action-btn {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}

body.theme-classic .agenda-week-grid .agenda-item-actions .agenda-action-seen {
  background: #eaf4ea;
  color: #2b6a42;
  border-color: rgba(86, 151, 112, 0.22);
}

body.theme-classic .agenda-week-grid .agenda-item-actions .agenda-action-seen:hover {
  background: #dff0e1;
}

body.theme-classic .agenda-week-grid .agenda-item-actions .agenda-action-edit {
  background: #edf2fa;
  color: #2f4b74;
  border-color: rgba(98, 133, 192, 0.2);
}

body.theme-classic .agenda-week-grid .agenda-item-actions .agenda-action-edit:hover {
  background: #e2ebf8;
}

body.theme-classic .agenda-week-grid .agenda-item-actions .agenda-action-delete {
  background: #f8ecef;
  color: #9b3245;
  border-color: rgba(188, 74, 100, 0.22);
}

body.theme-classic .agenda-week-grid .agenda-item-actions .agenda-action-delete:hover {
  background: #f4dfe4;
}

/* Mezzi */
body.theme-classic section[data-panel="mezzi"] .mezzi-card,
body.theme-classic section[data-panel="mezzi"] .mezzi-scadenze-box,
body.theme-classic section[data-panel="mezzi"] .mezzi-list-block {
  background: linear-gradient(180deg, #f2f6fc 0%, #ecf2fa 100%);
  border-color: rgba(99, 117, 144, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.75),
    0 2px 6px rgba(32, 47, 70, 0.06);
}

body.theme-classic #mezziOpenDialogBtn {
  background: linear-gradient(180deg, #d8e3f1 0%, #ccd9ea 100%);
  border-color: rgba(97, 115, 142, 0.28);
  color: #1d2f47;
  font-weight: 700;
}

body.theme-classic #mezziOpenDialogBtn:hover {
  background: linear-gradient(180deg, #cfdbeb 0%, #c4d2e5 100%);
  border-color: rgba(89, 107, 133, 0.34);
}

body.theme-classic .mezzi-dialog-card {
  background: linear-gradient(180deg, #eef3fa 0%, #e7eef8 100%);
  border-color: rgba(97, 115, 142, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 10px 30px rgba(20, 30, 46, 0.2);
}

body.theme-classic .mezzi-dialog-card .mezzi-card-head {
  background: linear-gradient(180deg, #d5e0ee 0%, #cbd8e8 100%);
  border-color: rgba(99, 117, 144, 0.2);
}

body.theme-classic .mezzi-dialog-card .mezzi-card-head h4 {
  color: #1b2d45;
  font-weight: 800;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-card-head,
body.theme-classic section[data-panel="mezzi"] .mezzi-scadenze-box h5 {
  background: linear-gradient(180deg, #d5e0ee 0%, #cbd8e8 100%);
  border-color: rgba(99, 117, 144, 0.18);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.35);
}

body.theme-classic section[data-panel="mezzi"] .mezzi-card-head h4,
body.theme-classic section[data-panel="mezzi"] .mezzi-scadenze-box h5 {
  color: #1d2f47;
  font-weight: 800;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-list-block-head {
  background: linear-gradient(180deg, #d5e0ee 0%, #cbd8e8 100%);
  border-color: rgba(99, 117, 144, 0.18);
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.35);
}

body.theme-classic section[data-panel="mezzi"] .mezzi-list-block h5 {
  color: #1d2f47;
  font-weight: 800;
  letter-spacing: 0.03em;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-scadenza-item {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fe 100%);
  border-color: rgba(102, 120, 147, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

body.theme-classic section[data-panel="mezzi"] .mezzi-scadenza-head strong,
body.theme-classic section[data-panel="mezzi"] .mezzi-scadenza-meta span,
body.theme-classic section[data-panel="mezzi"] .mezzi-scadenza-meta {
  color: #263953;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-scadenza-note {
  color: #4f627d;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-list-block .mini-table-wrap {
  background: linear-gradient(180deg, #fbfdff 0%, #f3f7fc 100%);
  border-color: rgba(102, 120, 147, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

body.theme-classic section[data-panel="mezzi"] .mini-table th {
  background: linear-gradient(180deg, #d3deed 0%, #cad7e8 100%);
  color: #1f3149;
  border-color: rgba(99, 117, 144, 0.22);
}

body.theme-classic section[data-panel="mezzi"] .mini-table tbody tr:nth-child(odd) td {
  background: #fff;
}

body.theme-classic section[data-panel="mezzi"] .mini-table tbody tr:nth-child(even) td {
  background: #f7faff;
}

body.theme-classic section[data-panel="mezzi"] .mini-table tbody tr:hover td {
  background: #dfe9f6;
}

body.theme-classic section[data-panel="mezzi"] .mini-table td,
body.theme-classic section[data-panel="mezzi"] .mini-table td .muted,
body.theme-classic section[data-panel="mezzi"] .mini-table td small {
  color: #2a3a53 !important;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-scadenze-box .mezzi-stato-badge {
  border-color: rgba(102, 120, 147, 0.2);
  font-weight: 700;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-complete-inline {
  color: #41546f;
}

/* Mezzi badges: stronger contrast in Classic theme */
body.theme-classic section[data-panel="mezzi"] .mezzi-tipo-badge {
  background: #e3ebf6;
  border-color: rgba(96, 114, 141, 0.26);
  color: #25384f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

body.theme-classic section[data-panel="mezzi"] .mezzi-tipo-badge.is-revisione {
  background: #f9e4e8;
  border-color: rgba(188, 86, 106, 0.34);
  color: #8a2f42;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-tipo-badge.is-tagliando {
  background: #f8ecd6;
  border-color: rgba(198, 146, 67, 0.34);
  color: #815a15;
}

body.theme-classic section[data-panel="mezzi"] .mezzi-stato-badge {
  background: #e7edf7;
  border-color: rgba(100, 118, 145, 0.24);
  color: #2d425d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

body.theme-classic .mezzi-dialog-card .mezzi-stato-badge {
  background: #e7edf7;
  border-color: rgba(100, 118, 145, 0.28);
  color: #2d425d;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

body.theme-classic section[data-panel="mezzi"] .mezzi-stato-badge.is-active {
  background: #bfe9d2 !important;
  border-color: #4f9b74 !important;
  color: #0b4a2d !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 0 0 1px rgba(79, 155, 116, 0.08);
}

body.theme-classic .mezzi-dialog-card .mezzi-stato-badge.is-active {
  background: #bfe9d2 !important;
  border-color: #4f9b74 !important;
  color: #0b4a2d !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 0 0 1px rgba(79, 155, 116, 0.08);
}

body.theme-classic .mezzi-dialog-card .mezzi-stato-badge.is-stop {
  background: #f6dde4 !important;
  border-color: #c06b80 !important;
  color: #7f243a !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.72),
    0 0 0 1px rgba(192, 107, 128, 0.08);
}

body.theme-classic section[data-panel="mezzi"] .mezzi-stato-badge.is-stop {
  background: #f7e5ea;
  border-color: rgba(195, 84, 107, 0.3);
  color: #8f3349;
}

body.theme-classic section[data-panel="mezzi"] .mezzo-int-stato {
  font-weight: 700;
  background: #e5ecf7;
  border-color: rgba(96, 114, 141, 0.24);
  color: #2a3f5b;
}

/* Viaggi - row state coloring also in Classic theme */
body.theme-classic .data-table tbody tr.status-draft td:first-child {
  box-shadow: inset 4px 0 0 #8b97aa;
}

body.theme-classic .data-table tbody tr.status-pending td:first-child {
  box-shadow: inset 4px 0 0 #d8943d;
}

body.theme-classic .data-table tbody tr.status-going td:first-child {
  box-shadow: inset 4px 0 0 #3aad88;
}

body.theme-classic .data-table tbody tr.status-completed td:first-child {
  box-shadow: inset 4px 0 0 #9aa3b0;
}

body.theme-classic .data-table tbody tr.status-suspended td:first-child {
  box-shadow: inset 4px 0 0 #d8687c;
}

body.theme-classic .data-table tbody tr.status-leave td:first-child,
body.theme-classic .data-table tbody tr.status-vacation td:first-child {
  box-shadow: inset 4px 0 0 #7a4bd9;
}

body.theme-classic .data-table tbody tr.status-draft td {
  background: rgba(157, 168, 186, 0.18);
}

body.theme-classic .data-table tbody tr.status-pending td {
  background: rgba(233, 194, 134, 0.22);
}

body.theme-classic .data-table tbody tr.status-going td {
  background: rgba(171, 224, 205, 0.25);
}

body.theme-classic .data-table tbody tr.status-completed td {
  background: rgba(118, 130, 149, 0.56);
}

body.theme-classic section[data-panel="viaggio"] .data-table tbody tr.status-completed td:not(.note-cell) .cell-input,
body.theme-classic section[data-panel="viaggio"] .data-table tbody tr.status-completed td:not(.note-cell) .cell-select,
body.theme-classic section[data-panel="viaggio"] .data-table tbody tr.status-completed td:not(.note-cell) .cell-combo-select {
  background: rgba(145, 156, 173, 0.4) !important;
}

body.theme-classic .data-table tbody tr.status-suspended td {
  background: rgba(236, 189, 197, 0.24);
}

body.theme-classic .data-table tbody tr.status-leave td,
body.theme-classic .data-table tbody tr.status-vacation td {
  background: rgba(165, 137, 229, 0.28);
}

body.theme-classic .data-table tbody tr.status-draft:hover td {
  background: rgba(150, 162, 182, 0.24);
}

body.theme-classic .data-table tbody tr.status-pending:hover td {
  background: rgba(229, 187, 121, 0.28);
}

body.theme-classic .data-table tbody tr.status-going:hover td {
  background: rgba(159, 216, 195, 0.3);
}

body.theme-classic .data-table tbody tr.status-completed:hover td {
  background: rgba(136, 149, 167, 0.46);
}

body.theme-classic .data-table tbody tr.status-suspended:hover td {
  background: rgba(232, 177, 186, 0.28);
}

body.theme-classic .data-table tbody tr.status-leave:hover td,
body.theme-classic .data-table tbody tr.status-vacation:hover td {
  background: rgba(153, 122, 223, 0.34);
}

body.theme-classic section[data-panel="viaggio"] .data-table tbody tr.status-completed td:not(.status-cell):not(.note-cell) .cell-input,
body.theme-classic section[data-panel="viaggio"] .data-table tbody tr.status-completed td:not(.status-cell):not(.note-cell) .cell-select,
body.theme-classic section[data-panel="viaggio"] .data-table tbody tr.status-completed td:not(.status-cell):not(.note-cell) .cell-combo-select {
  background: rgba(178, 190, 210, 0.86) !important;
}
