/* Assistente Nosu — view dedicata (#view-nosu) */

.mt-dashboard #view-nosu {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--mt-text-primary, #1d1d1f);
}

.mt-dashboard #view-nosu .mt-nosu-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 4px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hero */
.mt-dashboard #view-nosu .mt-nosu-page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: var(--mt-radius-lg, 26px);
  position: relative;
  z-index: 1;
}

.mt-dashboard #view-nosu .mt-nosu-page-hero-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.mt-dashboard #view-nosu .mt-nosu-page-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  background: linear-gradient(150deg, var(--mt-purple-soft, #a78bfa), var(--mt-purple, #7c5cff));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 6px 16px rgba(124, 92, 246, 0.35);
}

.mt-dashboard #view-nosu .mt-nosu-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--mt-purple-deep, #6647e0);
  margin-bottom: 4px;
}

.mt-dashboard #view-nosu .mt-nosu-page-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--mt-text-primary, #1d1d1f);
}

.mt-dashboard #view-nosu .mt-nosu-page-period {
  font-size: 13px;
  color: var(--mt-text-secondary, #6e6e73);
  margin: 8px 0 0;
}

.mt-dashboard #view-nosu .mt-nosu-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Bottoni */
.mt-dashboard #view-nosu .mt-btn,
.mt-dashboard #view-nosu button.mt-btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.2;
  transition: filter 0.15s, background 0.15s;
}

.mt-dashboard #view-nosu .mt-btn--primary {
  background: var(--mt-purple, #7c5cff);
  color: #fff;
  border-color: var(--mt-purple, #7c5cff);
}

.mt-dashboard #view-nosu .mt-btn--secondary {
  background: rgba(255, 255, 255, 0.85);
  color: var(--mt-text-primary);
  border-color: var(--mt-divider, rgba(0, 0, 0, 0.08));
}

.mt-dashboard #view-nosu .mt-btn--ghost {
  background: rgba(124, 92, 246, 0.08);
  color: var(--mt-purple-deep);
  border-color: rgba(124, 92, 246, 0.18);
}

.mt-dashboard #view-nosu .mt-btn--success {
  background: #388e3c;
  color: #fff;
  border-color: #388e3c;
}

.mt-dashboard #view-nosu .mt-btn:hover { filter: brightness(1.04); }
.mt-dashboard #view-nosu .mt-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Panel + section head */
.mt-dashboard #view-nosu .mt-panel {
  padding: 20px 22px;
  position: relative;
  z-index: 1;
}

.mt-dashboard #view-nosu .mt-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.mt-dashboard #view-nosu .mt-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--mt-text-primary);
}

.mt-dashboard #view-nosu .mt-nosu-report-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mt-dashboard #view-nosu .mt-nosu-report-actions .mt-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.mt-dashboard #view-nosu .mt-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.mt-dashboard #view-nosu .mt-chip--ready {
  background: rgba(124, 92, 246, 0.12);
  color: var(--mt-purple-deep);
}

/* Loading / empty */
.mt-dashboard #view-nosu .mt-nosu-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(124, 92, 246, 0.08);
  color: var(--mt-purple-deep);
  font-size: 14px;
  font-weight: 600;
}

.mt-dashboard #view-nosu .mt-nosu-loading[hidden],
.mt-dashboard #view-nosu .mt-nosu-empty[hidden],
.mt-dashboard #view-nosu .mt-nosu-content[hidden],
.mt-dashboard #view-nosu [hidden] { display: none !important; }

.mt-dashboard #view-nosu .mt-nosu-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mt-purple);
  animation: mt-nosu-pulse 1s ease-in-out infinite;
}

@keyframes mt-nosu-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.mt-dashboard #view-nosu .mt-nosu-empty {
  text-align: center;
  padding: 44px 28px !important;
}

.mt-dashboard #view-nosu .mt-nosu-empty-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 17px;
  margin: 12px 0 8px;
}

.mt-dashboard #view-nosu .mt-nosu-empty-sub {
  font-size: 14px;
  color: var(--mt-text-secondary);
  margin: 0 auto 20px;
  line-height: 1.55;
  max-width: 400px;
}

.mt-dashboard #view-nosu .mt-nosu-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* KPI */
.mt-dashboard #view-nosu .mt-nosu-page-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.mt-dashboard #view-nosu .mt-nosu-page-kpi {
  flex: 1 1 120px;
  max-width: 200px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--mt-divider);
}

.mt-dashboard #view-nosu .mt-nosu-page-kpi-val {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--mt-text-primary);
  line-height: 1.1;
}

.mt-dashboard #view-nosu .mt-nosu-page-kpi-lbl {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--mt-text-secondary);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Report body */
.mt-dashboard #view-nosu .mt-nosu-report-preview {
  margin-top: 4px;
}

.mt-dashboard #view-nosu .mt-nosu-preview-lead {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--mt-text-primary);
  margin: 0 0 10px;
}

.mt-dashboard #view-nosu .mt-nosu-preview-insight {
  font-size: 14px;
  line-height: 1.55;
  color: var(--mt-text-secondary, #6e6e73);
  margin: 0;
  padding: 12px 14px;
  background: rgba(124, 92, 246, 0.06);
  border-radius: 14px;
  border-left: 3px solid var(--mt-purple, #7c5cff);
}

.mt-dashboard #view-nosu .mt-nosu-report-preview-hint {
  font-size: 13px;
  color: var(--mt-text-secondary, #6e6e73);
  margin: 14px 0 0;
}

.mt-dashboard #view-nosu .nosu-report-content { display: none !important; }

.mt-dashboard #view-nosu .nosu-report-lead {
  font-size: 15px;
  font-weight: 600;
  color: var(--mt-text-primary);
  margin: 0 0 18px;
  line-height: 1.5;
}

.mt-dashboard #view-nosu .nosu-report-kpis { display: none !important; }

.mt-dashboard #view-nosu .nosu-report-sec {
  padding: 16px 0;
  border-top: 1px solid var(--mt-divider);
}

.mt-dashboard #view-nosu .nosu-report-sec:first-of-type {
  border-top: none;
  padding-top: 0;
}

.mt-dashboard #view-nosu .nosu-report-sec-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--mt-text-primary);
}

.mt-dashboard #view-nosu .nosu-sev-high .nosu-report-sec-title { color: #b45309; }

.mt-dashboard #view-nosu .nosu-report-sec-body { margin: 0; }

/* Azioni */
.mt-dashboard #view-nosu .mt-nosu-actions-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mt-dashboard #view-nosu .mt-nosu-actions-head {
  align-items: flex-start;
}

.mt-dashboard #view-nosu .mt-nosu-actions-sub {
  font-size: 13px;
  color: var(--mt-text-secondary);
  margin: 4px 0 0;
  font-weight: 400;
}

.mt-dashboard #view-nosu .mt-nosu-actions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mt-dashboard #view-nosu .mt-nosu-actions-toolbar {
  margin-bottom: 4px;
}

.mt-dashboard #view-nosu .mt-nosu-actions-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mt-dashboard #view-nosu .mt-nosu-filter-pill {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--mt-divider);
  background: rgba(255, 255, 255, 0.55);
  color: var(--mt-text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mt-dashboard #view-nosu .mt-nosu-filter-pill:hover {
  border-color: rgba(124, 92, 246, 0.35);
  color: var(--mt-text-primary);
}

.mt-dashboard #view-nosu .mt-nosu-filter-pill.is-active {
  background: rgba(124, 92, 246, 0.14);
  border-color: rgba(124, 92, 246, 0.35);
  color: var(--mt-purple-deep);
}

/* Accordion azioni */
.mt-dashboard #view-nosu .mt-nosu-action-acc {
  padding: 0 !important;
  border-radius: var(--mt-radius-md, 18px) !important;
  overflow: hidden;
}

.mt-dashboard #view-nosu .mt-nosu-action-acc-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.mt-dashboard #view-nosu .mt-nosu-action-acc-summary::-webkit-details-marker { display: none; }

.mt-dashboard #view-nosu .mt-nosu-action-acc-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 11px;
  background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236e6e73' stroke-width='2'%3E%3Cpath d='M6 9l3 3 3-3'/%3E%3C/svg%3E");
  transition: transform 0.2s;
}

.mt-dashboard #view-nosu .mt-nosu-action-acc[open] .mt-nosu-action-acc-chevron {
  transform: rotate(180deg);
}

.mt-dashboard #view-nosu .mt-nosu-action-acc-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mt-dashboard #view-nosu .mt-nosu-action-acc-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mt-dashboard #view-nosu .mt-nosu-action-acc-snippet {
  font-size: 12px;
  color: var(--mt-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mt-dashboard #view-nosu .mt-nosu-action-acc[open] .mt-nosu-action-acc-snippet {
  display: none;
}

.mt-dashboard #view-nosu .mt-nosu-action-acc-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.mt-dashboard #view-nosu .mt-nosu-urgency-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.mt-dashboard #view-nosu .mt-nosu-urgency-pill--alta {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.mt-dashboard #view-nosu .mt-nosu-urgency-pill--media {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.mt-dashboard #view-nosu .mt-nosu-urgency-pill--bassa {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.mt-dashboard #view-nosu .mt-nosu-action-acc-body {
  padding: 4px 18px 18px 48px;
  border-top: 1px solid var(--mt-divider);
}

.mt-dashboard #view-nosu .mt-nosu-field-group {
  display: block;
  margin-top: 16px;
}

.mt-dashboard #view-nosu .mt-nosu-field-group:first-child {
  margin-top: 14px;
}

.mt-dashboard #view-nosu .mt-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mt-text-secondary);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.mt-dashboard #view-nosu .mt-field-input {
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.5;
  padding: 11px 14px;
  border-radius: var(--mt-radius-sm, 12px);
  border: 1px solid var(--mt-divider);
  background: rgba(255, 255, 255, 0.62);
  color: var(--mt-text-primary);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.mt-dashboard #view-nosu .mt-field-input::placeholder {
  color: var(--mt-text-tertiary, #9b9ba1);
}

.mt-dashboard #view-nosu .mt-field-input:hover:not(:read-only):not(:disabled) {
  border-color: rgba(124, 92, 246, 0.28);
  background: rgba(255, 255, 255, 0.78);
}

.mt-dashboard #view-nosu .mt-field-input:focus {
  outline: none;
  border-color: rgba(124, 92, 246, 0.55);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(124, 92, 246, 0.14);
}

.mt-dashboard #view-nosu textarea.mt-field-input {
  min-height: 140px;
  resize: vertical;
  white-space: pre-wrap;
  word-break: break-word;
}

.mt-dashboard #view-nosu .mt-field-input:read-only {
  background: rgba(255, 255, 255, 0.35);
  color: var(--mt-text-secondary);
  cursor: default;
  border-color: var(--mt-divider);
  box-shadow: none;
}

.mt-dashboard #view-nosu .mt-nosu-action-card {
  padding: 18px 20px !important;
  border-radius: var(--mt-radius-md, 18px) !important;
  transition: box-shadow 0.15s;
}

.mt-dashboard #view-nosu .mt-nosu-action-card:hover {
  box-shadow: 0 8px 28px rgba(31, 38, 68, 0.08);
}

.mt-dashboard #view-nosu .mt-nosu-action-card-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.mt-dashboard #view-nosu .mt-nosu-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  background: rgba(124, 92, 246, 0.1);
  color: var(--mt-purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mt-dashboard #view-nosu .mt-nosu-action-card-meta {
  flex: 1;
  min-width: 0;
}

.mt-dashboard #view-nosu .mt-nosu-action-card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 15px;
  margin: 0;
  color: var(--mt-text-primary);
}

.mt-dashboard #view-nosu .mt-nosu-action-card-recipient {
  font-size: 12px;
  color: var(--mt-text-secondary);
  margin: 6px 0 0;
}

.mt-dashboard #view-nosu .mt-nosu-channel-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(124, 92, 246, 0.1);
  color: var(--mt-purple-deep);
  white-space: nowrap;
  flex-shrink: 0;
}

.mt-dashboard #view-nosu .mt-nosu-msg-subject {
  font-size: 12px;
  font-weight: 600;
  color: var(--mt-text-primary);
  margin: 10px 0 6px;
}

.mt-dashboard #view-nosu .mt-nosu-msg-preview {
  font-size: 13px;
  line-height: 1.55;
  color: var(--mt-text-secondary);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--mt-divider);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.mt-dashboard #view-nosu .mt-nosu-action-card-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Settings */
.mt-dashboard #view-nosu .mt-nosu-settings {
  padding: 0 !important;
  overflow: hidden;
}

.mt-dashboard #view-nosu .mt-nosu-settings-summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  color: var(--mt-text-primary);
}

.mt-dashboard #view-nosu .mt-nosu-settings-summary::-webkit-details-marker { display: none; }

.mt-dashboard #view-nosu .mt-nosu-settings-body {
  padding: 0 20px 18px;
  border-top: 1px solid var(--mt-divider);
}

.mt-dashboard #view-nosu .mt-nosu-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  padding: 14px 0 12px;
}

.mt-dashboard #view-nosu .mt-nosu-schedule {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.mt-dashboard #view-nosu .mt-nosu-field {
  font-size: 13px;
  color: var(--mt-text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mt-dashboard #view-nosu .mt-nosu-field .mt-field-input {
  min-width: 140px;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .mt-dashboard #view-nosu .mt-nosu-page {
    padding: 0 16px 48px;
  }
  .mt-dashboard #view-nosu .mt-nosu-page-hero {
    padding: 18px 18px;
  }
  .mt-dashboard #view-nosu .mt-nosu-page-actions {
    width: 100%;
  }
  .mt-dashboard #view-nosu .mt-nosu-page-actions .mt-btn {
    flex: 1;
    text-align: center;
  }
}
