/*
 * Copyright (c) 2026 Leonardo Marchi. Tutti i diritti riservati.
 * Codice proprietario. Uso non autorizzato vietato.
 * Vedi NOTICE.txt per titolarita e condizioni d'uso.
 */

/* Agenda */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 999px;
  background: #d83e3e;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.tab-badge[hidden] {
  display: none !important;
}

.toolbar-agenda {
  grid-template-columns: auto auto minmax(220px, 1fr) auto;
}

.toolbar-ingressi {
  grid-template-columns: auto auto minmax(220px, 1fr) auto;
}

.toolbar-movimenti {
  grid-template-columns: auto auto minmax(220px, 1fr) auto auto auto;
}

.toolbar-omologhe {
  grid-template-columns: auto auto minmax(220px, 1fr);
}

.toolbar-ingressi > .datebox {
  order: 1;
}

.toolbar-ingressi > .search {
  order: 2;
}

.toolbar-ingressi > #goTodayIngressiBtn {
  order: 3;
}

.toolbar-movimenti > .datebox {
  order: 1;
}

.toolbar-movimenti > [data-action="reset-filter"][data-table="movimenti"] {
  order: 2;
}

.toolbar-movimenti > .search {
  order: 3;
}

.toolbar-movimenti > #movimentiColumnFilterCombo {
  order: 4;
}

.toolbar-movimenti > .movimenti-pager-toolbar {
  order: 5;
}

#agendaTodayBtn {
  width: auto;
  min-width: 0;
  justify-self: start;
}

#goTodayIngressiBtn {
  width: auto;
  min-width: 0;
  justify-self: start;
}

/* Make Ingressi date toolbar match Agenda sizing */
.toolbar-ingressi .datebox .date-input {
  width: auto;
  min-width: 0;
  opacity: 1;
  pointer-events: auto;
  padding: 0 clamp(6px, 0.7vw, 8px);
}

.toolbar-movimenti .movimenti-pager-toolbar {
  justify-self: start;
}

.agenda-week-wrap {
  overflow: hidden;
}

.agenda-week-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Make Ingressi weekly board align visually with Agenda spacing */
section[data-panel="ingressi"] .ingressi-week-wrap {
  overflow: hidden;
}

section[data-panel="ingressi"] .ingressi-week-head {
  padding: 8px 12px;
}

section[data-panel="ingressi"] .ingressi-week-grid .ingressi-day-col {
  min-height: 440px;
}

section[data-panel="ingressi"] .ingressi-week-grid .ingressi-day-stack {
  gap: 6px;
  padding: 6px;
}

section[data-panel="ingressi"] .ingressi-week-grid .ingressi-day-head {
  padding: 8px 8px 7px;
}

.agenda-week-grid .ingressi-day-col {
  min-height: 440px;
}

.agenda-week-grid .agenda-item {
  padding: 8px;
  gap: 6px;
}

.agenda-week-grid .agenda-item-date {
  font-size: 0.75rem;
}

.agenda-week-grid .agenda-item-title {
  font-size: 0.86rem;
}

.agenda-week-grid .agenda-item-text {
  font-size: 0.76rem;
  line-height: 1.25;
}

.agenda-week-grid .agenda-item-actions .btn {
  padding: 4px 7px;
  font-size: 0.72rem;
}

.agenda-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 14px;
}

.agenda-card {
  border: 1px solid rgba(166, 193, 237, 0.18);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  padding: 12px;
}

.agenda-card h4 {
  margin: 0 0 10px;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9cb5de;
}

.agenda-card .anag-form {
  display: grid;
  gap: 8px;
}

.agenda-card .anag-form textarea {
  min-height: 100px;
  resize: vertical;
}

.agenda-card-list {
  min-width: 0;
}

.agenda-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.agenda-list {
  display: grid;
  gap: 10px;
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
}

.agenda-empty {
  border: 1px dashed rgba(166, 193, 237, 0.2);
  border-radius: 12px;
  padding: 18px 12px;
  color: #9cb5de;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
}

.agenda-item {
  border-radius: 12px;
  border: 1px solid rgba(166, 193, 237, 0.18);
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.agenda-item.is-unseen {
  border-color: rgba(118, 156, 255, 0.55);
  box-shadow: inset 2px 0 0 rgba(118, 156, 255, 0.9);
}

.agenda-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agenda-item-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: #dce9ff;
}

.agenda-item-status {
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(166, 193, 237, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: #9cb5de;
}

.agenda-item.is-unseen .agenda-item-status {
  color: #d9e7ff;
  border-color: rgba(118, 156, 255, 0.45);
  background: rgba(80, 114, 210, 0.18);
}

.agenda-item-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.agenda-item-type-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffd7d7;
  border: 1px solid rgba(255, 104, 104, 0.28);
  background: rgba(255, 88, 88, 0.12);
}

.agenda-item-deadline {
  font-size: 0.74rem;
  color: #f6c2c2;
}

.agenda-item-owner {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(166, 193, 237, 0.2);
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.7rem;
  color: #9cb5de;
  background: rgba(255,255,255,0.02);
}

.agenda-item-text {
  margin: 0;
  color: #c8d9f5;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
  font-size: 0.84rem;
}

.agenda-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}


