.note-meta-grid{
  display:grid;
  grid-template-columns:minmax(145px,.65fr) minmax(125px,.55fr) minmax(240px,1.5fr);
  gap:12px;
  margin-bottom:16px;
}

.note-composer .note-meta-grid label{
  display:grid;
  gap:7px;
  margin:0;
  color:#222;
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.note-meta-grid input,
.note-meta-grid select,
.note-list-toolbar select{
  width:100%;
  min-height:45px;
  border:1px solid var(--line,#d8d6d0);
  border-radius:8px;
  background:#fff;
  padding:10px 12px;
  color:#111;
  font:600 14px/1.2 Arial,sans-serif;
  text-transform:none;
  letter-spacing:normal;
}

.note-meta-grid input:focus,
.note-meta-grid select:focus,
.note-list-toolbar select:focus{
  outline:3px solid rgba(227,38,46,.18);
  border-color:#e3262e;
}

.note-composer .note-composer-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:14px;
  margin-top:10px;
}

.note-list-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
}

.note-list-toolbar label{
  color:#555;
  font-size:10px;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.note-list-toolbar select{
  width:auto;
  min-width:180px;
  min-height:40px;
}

.note-item .note-item-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.note-type-badge{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  border-radius:999px;
  background:#111;
  padding:5px 10px;
  color:#fff;
  font-size:10px;
  font-weight:900;
  letter-spacing:.06em;
  line-height:1.2;
  text-transform:uppercase;
}

@media(max-width:760px){
  .note-meta-grid{grid-template-columns:1fr 1fr}
  .note-meta-grid .note-type-field{grid-column:1/-1}
  .note-composer .note-composer-actions{align-items:stretch;flex-direction:column}
  .note-list-toolbar{align-items:stretch;flex-direction:column}
  .note-list-toolbar select{width:100%}
  .note-item .note-item-meta{align-items:flex-start;flex-direction:column;gap:7px}
  .note-item .note-item-meta time{margin-left:0}
  .note-state-badge{align-self:flex-start}
}

@media(max-width:440px){
  .note-meta-grid{grid-template-columns:1fr}
  .note-meta-grid .note-type-field{grid-column:auto}
}

.next-action-card{margin:18px 0;padding:18px;border:1px solid #dfdcd4;border-left:5px solid #e3262e;border-radius:10px;background:#faf8f4}
.next-action-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.next-action-head .kicker{margin:0 0 6px}.next-action-head h4{margin:0;font-size:22px}.next-action-head time{display:block;margin-top:6px;font-size:13px;font-weight:900}.next-action-head p{margin:9px 0 0;color:#555;line-height:1.45}
.next-action-status{border-radius:999px;background:#111;padding:7px 10px;color:#fff;font-size:10px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}.next-action-status.scaduta{background:#e3262e}.next-action-buttons,.task-actions{display:flex;flex-wrap:wrap;gap:8px}.next-action-buttons{margin-top:15px}.next-action-buttons button,.task-actions button{border:1px solid #111;border-radius:7px;background:#fff;padding:9px 12px;font-weight:900;cursor:pointer}.next-action-buttons .task-done,.task-actions .task-done{background:#168642;border-color:#168642;color:#fff}.next-action-buttons .task-cancel,.task-actions .task-cancel{border-color:#b9242b;color:#b9242b}.next-action-buttons .task-reschedule,.task-actions .task-reschedule{background:#e97912;border-color:#e97912;color:#fff}.next-action-buttons .task-delete,.task-actions .task-delete{border-color:#d8a5a8;color:#a31c22}.more-actions{display:block;margin-top:12px;color:#666}.next-action-empty{display:flex;align-items:center;gap:12px}.next-action-empty>span{display:grid;width:36px;height:36px;place-items:center;border-radius:50%;background:#dcf4e4;color:#147238;font-weight:900}.next-action-empty b{display:block}.next-action-empty p{margin:3px 0 0;color:#666;font-size:12px}
.note-composer>label small{color:#777;font-size:10px;font-weight:700}.note-schedule-help{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;margin:14px 0 0!important;padding:12px 14px;border-left:4px solid #e3262e;border-radius:7px;background:#f7f5f0}.note-schedule-help>span{display:grid;flex:0 0 27px;width:27px;height:27px;place-items:center;border-radius:50%;background:#111;color:#fff;font-weight:900}.note-schedule-help p{margin:0;color:#555;font-size:12px;line-height:1.45}.note-schedule-help b{color:#111}.note-item .note-item-meta time{margin-left:auto}.note-state-badge{display:inline-flex;align-items:center;min-height:24px;border-radius:999px;background:#ece9e2;padding:4px 9px;color:#555;font-size:9px;font-weight:900;letter-spacing:.05em;text-transform:uppercase}.note-state-badge.da-fare{background:#fff0bf;color:#725300}.note-state-badge.scaduta{background:#ffe1e3;color:#b51d24}.note-state-badge.completata{background:#def3e5;color:#176f3c}.note-state-badge.annullata{background:#e8e8e8;color:#666}.note-item.diary-da-fare{border-left-color:#d59a0b}.note-item.diary-completata{border-left-color:#168642}.note-item.diary-annullata{border-left-color:#777;opacity:.76}

.followup-dashboard{margin:24px 0;padding:26px;border:1px solid #d9d6ce;border-top:7px solid #111;border-radius:14px;background:#fff;box-shadow:0 16px 42px rgba(0,0,0,.07)}
.followup-dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.followup-dashboard-head h2{margin:4px 0 6px;font-size:30px}.followup-dashboard-head p:last-child{margin:0;color:#666}.task-counters{display:grid;grid-template-columns:repeat(3,minmax(100px,1fr));gap:8px;max-width:720px}.task-counters span{display:grid;min-width:105px;border-radius:9px;background:#f3f1ec;padding:11px;color:#555;font-size:10px;font-weight:900;text-transform:uppercase}.task-counters b{color:#111;font-size:26px;line-height:1}.task-counters .overdue{background:#ffe4e5;color:#98171d}.task-counters .overdue b{color:#d51f28}.task-counters .today{background:#fff1c9;color:#785800}.task-counters .week{background:#e5f4ea;color:#17673a}.task-counters .next-week{background:#e8edf8;color:#34537c}.task-counters .month{background:#eee8f8;color:#604388}.task-counters .quarter{background:#e3f1f4;color:#255f6c}
.followup-dashboard-filters{display:grid;grid-template-columns:190px minmax(220px,1fr) 220px;gap:10px;margin:22px 0}.followup-dashboard-filters select,.followup-dashboard-filters input{min-height:45px;border:1px solid #d7d4cd;border-radius:8px;background:#faf9f6;padding:10px 12px;font:600 14px Arial,sans-serif}
.followup-dashboard-list{display:grid;gap:18px}.task-group{display:grid;gap:8px}.task-group h3{display:flex;align-items:center;gap:8px;margin:0;padding-bottom:8px;border-bottom:1px solid #e2dfd8;font-size:15px;text-transform:uppercase}.task-group h3 span{display:grid;min-width:25px;height:25px;place-items:center;border-radius:50%;background:#111;color:#fff;font-size:11px}.task-group.overdue h3{color:#c61f27}.task-row{display:grid;grid-template-columns:auto minmax(220px,1fr) auto;align-items:center;gap:14px;padding:14px;border:1px solid #e1ded7;border-radius:10px;background:#faf9f6}.task-row.scaduta{border-left:5px solid #e3262e;background:#fff6f6}.task-row.completata{border-left:5px solid #168642}.task-icon{display:grid;width:42px;height:42px;place-items:center;border-radius:50%;background:#111;color:#fff;font-size:19px}.task-copy{display:grid;grid-template-columns:minmax(160px,1fr) auto auto;align-items:center;gap:5px 12px}.task-copy>b{font-size:16px}.task-copy strong{font-size:13px}.task-copy time{font-weight:900}.task-copy p,.task-copy small{grid-column:1/-1;margin:0;color:#656565;font-size:12px}.task-completion{color:#17703b!important;font-weight:800}.task-empty{padding:22px;border:1px dashed #c8c3b9;border-radius:10px;background:#faf9f6}.task-empty p{margin:6px 0 0;color:#666}.task-empty.error{color:#b9242b}
.followup-dialog{width:min(560px,calc(100% - 28px));border:0;border-radius:14px;padding:0;box-shadow:0 28px 90px rgba(0,0,0,.35)}.followup-dialog::backdrop{background:rgba(0,0,0,.58)}.followup-dialog form{position:relative;display:grid;gap:14px;padding:28px}.followup-dialog h2{margin:0;font-size:28px}.followup-dialog p{margin:0;color:#666;line-height:1.5}.followup-dialog label{display:grid;gap:7px;font-size:12px;font-weight:900}.followup-dialog select,.followup-dialog input,.followup-dialog textarea{width:100%;box-sizing:border-box;border:1px solid #d5d2cb;border-radius:8px;padding:11px 12px;font:600 15px Arial,sans-serif}.followup-dialog .icon-close{position:absolute;top:14px;right:14px;border:0;background:transparent;font-size:25px;cursor:pointer}.followup-dialog .dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:5px}.followup-dialog .dialog-actions button{border:1px solid #111;border-radius:8px;background:#fff;padding:12px 15px;font-weight:900}.followup-dialog .dialog-actions .primary-action{background:#111;color:#fff}

.standalone-followup-history{display:grid;gap:10px;margin-top:20px;padding-top:18px;border-top:1px solid #ddd9d1}.standalone-followup-history h4{margin:0 0 4px;font-size:14px;text-transform:uppercase}.standalone-action{background:#fbfaf7}
.note-item-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;margin-top:12px;padding-top:10px;border-top:1px solid #e6e2da}.note-item-actions button{border:1px solid #bbb6ac;border-radius:6px;background:#fff;padding:7px 10px;font-size:10px;font-weight:900;cursor:pointer}.note-item-actions .reschedule{background:#e97912;border-color:#e97912;color:#fff}.note-item-actions .delete-note{border-color:#e2b2b5;color:#a51e24}

@media(max-width:900px){.followup-dashboard-head{flex-direction:column}.task-counters{width:100%}.followup-dashboard-filters{grid-template-columns:1fr 1fr}.followup-dashboard-filters input{grid-column:1/-1}.task-row{grid-template-columns:auto 1fr}.task-actions{grid-column:1/-1;justify-content:flex-end}}
@media(max-width:620px){.followup-dashboard{padding:18px}.task-counters{grid-template-columns:repeat(2,minmax(0,1fr))}.task-counters span{min-width:0}.followup-dashboard-filters{grid-template-columns:1fr}.followup-dashboard-filters input{grid-column:auto}.task-row{grid-template-columns:1fr}.task-icon{display:none}.task-copy{grid-template-columns:1fr}.task-copy>*{grid-column:1!important}.task-actions{justify-content:stretch}.task-actions button{flex:1 1 110px}.next-action-head{flex-direction:column}.followup-dialog form{padding:24px 18px}.followup-dialog .dialog-actions{flex-direction:column-reverse}.followup-dialog .dialog-actions button{width:100%}}
@media(max-width:760px){.note-item .note-item-meta time{margin-left:0}.note-state-badge{align-self:flex-start}.note-item-actions{justify-content:flex-start}}
