/* ===================================================
   Area Riservata - Orchestra ICNT
   Design System 2026 - Mobile First
   =================================================== */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #C41E3A;
  --primary-dark: #9e1830;
  --primary-light: #f9e8eb;
  --primary-rgb: 196, 30, 58;

  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e5e7eb;

  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;

  --success: #059669;
  --success-bg: #d1fae5;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --info: #2563eb;
  --info-bg: #dbeafe;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);

  --nav-height: 68px;
  --header-height: 56px;

  --transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1117;
    --surface: #1a1d23;
    --surface-2: #23272f;
    --border: #2d3139;
    --text: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
  }
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ===== SCREENS ===== */
.screen { display: none; }
.screen.active { display: block; }

/* ===== LOGIN ===== */
#login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 1.5rem;
}

#login-screen.active { display: flex; }

.login-container {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-emblem {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.login-emblem-img {
  width: 90px;
  height: auto;
  object-fit: contain;
  margin-bottom: 0.75rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.login-logo h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.login-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.15);
}

.error-msg {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.btn-primary {
  width: 100%;
  padding: 0.938rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  letter-spacing: 0.02em;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.35);
}

.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.65; cursor: not-allowed; }

.back-link {
  display: block;
  text-align: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-top: 1.25rem;
  transition: color var(--transition);
}

.back-link:hover { color: var(--primary); }

/* ===== DASHBOARD ===== */
#dashboard-screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}

#dashboard-screen.active { display: flex; }

/* ===== APP HEADER ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  box-shadow: var(--shadow-sm);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-logo { font-size: 1.25rem; }

.header-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.header-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.header-info {
  display: flex;
  flex-direction: column;
  max-width: 140px;
}

.member-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-instrument {
  font-size: 0.688rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.375rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.btn-logout:hover { color: var(--danger); }

/* ===== TAB CONTENT AREA ===== */
#tab-content-area {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-height) + 0.5rem);
  -webkit-overflow-scrolling: touch;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.pane-header {
  padding: 1.25rem 1rem 0.5rem;
}

.pane-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.625rem;
  font-weight: 500;
  padding: 0.5rem 0.25rem;
  transition: color var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.nav-item:active { transform: scale(0.92); }

.nav-item.active {
  color: var(--primary);
  transform: scale(1.05);
}

.nav-icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
  transition: stroke-width var(--transition);
}

.nav-item.active .nav-icon { stroke-width: 2.25; }

.nav-icon-wrap {
  position: relative;
  display: inline-flex;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--danger);
  color: white;
  border-radius: 999px;
  font-size: 0.563rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 1.5px solid var(--surface);
  line-height: 1;
}

/* ===== SKELETONS ===== */
.pane-loading {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.skeleton-row {
  display: flex;
  gap: 0.5rem;
}

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--surface-2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-hero { height: 180px; border-radius: var(--radius); }
.skeleton-pill { height: 36px; flex: 1; border-radius: var(--radius-pill); }
.skeleton-card-sm { height: 100px; border-radius: var(--radius); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.938rem; }
.empty-state .hint { font-size: 0.813rem; margin-top: 0.5rem; }

/* ===== HOME TAB ===== */
#dash-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Hero card prossimo concerto */
.hero-card {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #e63950 100%);
  color: white;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(196, 30, 58, 0.35);
}

.hero-card::before {
  content: '🎵';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 5rem;
  opacity: 0.08;
  pointer-events: none;
}

.hero-label {
  font-size: 0.688rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.hero-countdown {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.hero-concert-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  opacity: 0.95;
}

.hero-meta {
  font-size: 0.813rem;
  opacity: 0.75;
  margin-bottom: 1rem;
}

.hero-actions {
  display: flex;
  gap: 0.625rem;
}

.hero-btn {
  flex: 1;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.hero-btn-yes {
  background: white;
  color: var(--primary);
}

.hero-btn-yes:hover { background: #f0f0f0; }

.hero-btn-no {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.35);
}

.hero-btn-no:hover { background: rgba(255,255,255,0.25); }

.hero-badge-role {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Pill stats row */
.pill-stats {
  display: flex;
  gap: 0.5rem;
}

.pill-stat {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.pill-stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.pill-stat-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Da rispondere list */
.pending-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.pending-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pending-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.pending-list li span {
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-respond {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition);
}

.btn-respond:hover { background: var(--primary-dark); }

/* Annunci preview home */
.home-announcements {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.home-ann-item {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.home-ann-item:last-child { border-bottom: none; }

.home-ann-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.125rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.home-ann-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.badge-new {
  background: var(--danger);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 0.563rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
}

.badge-pinned {
  font-size: 0.75rem;
}

.home-ann-link {
  display: block;
  text-align: center;
  padding: 0.625rem;
  font-size: 0.813rem;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.25rem;
}

/* ===== BACHECA TAB ===== */
#bacheca-list {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ann-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.ann-card:active { transform: scale(0.99); }

.ann-card.unread {
  border-left: 3px solid var(--primary);
}

.ann-card.pinned-card {
  border-top: 2px solid var(--warning);
  background: linear-gradient(to bottom, var(--warning-bg) 0%, var(--surface) 60px);
}

.ann-card-header {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.ann-card-title {
  flex: 1;
  font-size: 0.938rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.ann-card-badges {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
  align-items: center;
}

.ann-card-body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: none;
  white-space: pre-line;
  margin-top: 0.5rem;
}

.ann-card.expanded .ann-card-body { display: block; }

.ann-card-preview {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ann-card.expanded .ann-card-preview { display: none; }

.ann-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== CALENDARIO TAB ===== */
#calendar-list {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.concert-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.concert-card.status-available { border-left: 4px solid var(--success); }
.concert-card.status-unavailable { border-left: 4px solid var(--danger); }
.concert-card.status-pending { border-left: 4px solid var(--border); }

.concert-header {
  display: flex;
  gap: 0.875rem;
  padding: 1rem;
  align-items: flex-start;
}

.concert-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-sm);
  min-width: 48px;
  padding: 0.375rem 0.5rem;
  flex-shrink: 0;
}

.concert-date-badge .day {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
}

.concert-date-badge .month {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.concert-info { flex: 1; min-width: 0; }

.concert-info h3 {
  font-size: 0.938rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.meta {
  font-size: 0.813rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.role-badge {
  display: inline-block;
  background: var(--info-bg);
  color: var(--info);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.625rem;
  font-size: 0.688rem;
  font-weight: 600;
  margin-top: 0.375rem;
}

.availability-section {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
}

.availability-section label {
  font-size: 0.813rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.avail-btn {
  padding: 0.438rem 1rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.813rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.avail-btn:hover { border-color: var(--primary); color: var(--primary); }
.selected-available { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.selected-unavailable { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

/* Rehearsals */
.rehearsals-section { border-top: 1px solid var(--border); }

.rehearsals-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.rehearsals-toggle h4 {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.toggle-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.rehearsals-toggle.open .toggle-icon { transform: rotate(180deg); }

.rehearsals-body { display: none; }
.rehearsals-body.open { display: block; }

.rehearsal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--border);
  gap: 0.75rem;
}

.rehearsal-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: center;
  flex: 1;
  min-width: 0;
  font-size: 0.813rem;
}

.rehearsal-type {
  border-radius: var(--radius-pill);
  padding: 0.125rem 0.5rem;
  font-size: 0.688rem;
  font-weight: 600;
}

.type-tutti { background: var(--info-bg); color: var(--info); }
.type-sectional { background: var(--warning-bg); color: var(--warning); }
.type-dress, .type-general { background: var(--success-bg); color: var(--success); }
.type-filatura { background: #f0e6ff; color: #7c3aed; }
.type-prova_generale { background: var(--success-bg); color: var(--success); }

.rehearsal-actions {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.att-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.att-present { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.att-absent { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

/* ===== PARTI TAB ===== */
#parts-list {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.part-group {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.part-group-header {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  line-height: 1.4;
}

.concert-name {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
}

.part-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.part-item:last-child { border-bottom: none; }

.part-name {
  font-size: 0.875rem;
  color: var(--text);
  flex: 1;
}

.btn-download {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.438rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  flex-shrink: 0;
}

.btn-download:hover { background: var(--primary-dark); }

/* ===== CERTIFICATI TAB ===== */
#certs-list {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cert-info { flex: 1; min-width: 0; }

.cert-info h4 {
  font-size: 0.938rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.cert-info p {
  font-size: 0.813rem;
  color: var(--text-muted);
}

/* ===== QUICK MODAL ===== */
.quick-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.quick-modal {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 1.5rem;
  width: 100%;
  max-width: 500px;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.quick-modal h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.quick-actions {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.btn-yes, .btn-no {
  flex: 1;
  padding: 0.875rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.938rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-yes { background: var(--success); color: white; }
.btn-yes:hover { background: #047857; }
.btn-no { background: var(--danger-bg); color: var(--danger); border: 1.5px solid var(--danger); }
.btn-no:hover { background: var(--danger); color: white; }

.close-link {
  display: block;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
}

.close-link:hover { color: var(--text); }

/* ===== TOAST ===== */
.toast-notification {
  position: fixed;
  bottom: calc(var(--nav-height) + 1rem);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-error { background: var(--danger); color: white; }


@media (max-width: 400px) {
  .header-info { display: none; }
}

/* ===== VISTA DIRETTORE ===== */

/* Stats nel hero card */
.hero-member-stats {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.hms-yes, .hms-no, .hms-pending {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
}

.hms-yes { background: rgba(255,255,255,0.9); color: var(--success); }
.hms-no { background: rgba(255,255,255,0.2); color: white; border: 1px solid rgba(255,255,255,0.4); }
.hms-pending { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); border: 1px dashed rgba(255,255,255,0.3); }

/* Sezione stats per concerto (home) */
.director-stats-section {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.dir-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow var(--transition);
}

.dir-stat-card:hover { box-shadow: var(--shadow); }

.dir-stat-header {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
}

.dir-stat-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  background: var(--primary-light);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
}

.dir-stat-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Progress bar */
.dir-stat-bar {
  display: flex;
  height: 8px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--border);
  gap: 1px;
}

.dir-bar-yes { background: var(--success); transition: width 0.4s ease; }
.dir-bar-no { background: var(--danger); transition: width 0.4s ease; }
.dir-bar-pending { background: var(--border); transition: width 0.4s ease; }

/* Conteggi */
.dir-stat-counts {
  display: flex;
  gap: 0.875rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  flex-wrap: wrap;
}

.dsc-yes { color: var(--success); font-weight: 600; }
.dsc-no { color: var(--danger); font-weight: 600; }
.dsc-pending { color: var(--text-muted); }

/* Stats inline nelle schede concerto del calendario */
.dir-inline-stats {
  padding: 0 1rem 0.875rem;
}

/* ===== PIANTA TAB ===== */
.btn-request-cert {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-pill);
  font-size: 0.813rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-request-cert:hover { background: var(--primary-dark); }

.btn-pianta-edit {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: 0.813rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-pianta-edit:hover { background: var(--primary); color: white; }

#pianta-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#pianta-container svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== SCORES (Partiture) ===== */
.score-group { margin-bottom: 1.25rem; }
.score-group-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 1rem 0.5rem;
}
.score-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}
.score-info { flex: 1; min-width: 0; }
.score-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.125rem; }
.score-download {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}
.score-download:hover { background: var(--primary); color: white; }

/* ===== REPLY ANNUNCI ===== */
.btn-small-action {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary);
  background: white;
  color: var(--primary);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.btn-small-action:hover { background: var(--primary); color: white; }
.btn-small-action:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-small-action.btn-cancel { border-color: var(--border); color: var(--text-secondary); }
.btn-small-action.btn-cancel:hover { background: var(--border); color: var(--text); }
.ann-reply-btn { margin-top: 0.25rem; }
.ann-sent-replies { margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; }
.ann-my-reply { background: rgba(196,30,58,0.06); border-left: 3px solid var(--primary); border-radius: 0 6px 6px 0; padding: 0.4rem 0.65rem; }
.ann-my-reply-label { display: block; font-size: 0.68rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.2rem; }
.ann-my-reply-text { font-size: 0.8rem; color: var(--text); line-height: 1.4; white-space: pre-line; }
.ann-my-reply-date { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

