/* =========================================================
   FINPLUS OSTIA - Daily Workout, Mobile UX & PDF Patch v9
   ========================================================= */

/* --- TODAY HERO CARD --- */
.today-hero-card {
  background: linear-gradient(135deg, #0d1f35 0%, #173d66 60%, #0077b6 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(13, 31, 53, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.today-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 150, 199, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.today-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.today-hero-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.today-badge-icon {
  font-size: 26px;
  background: rgba(255, 255, 255, 0.15);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.today-hero-title h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 900;
  margin: 0;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.today-hero-title p {
  font-size: 13px;
  margin: 3px 0 0 0;
  opacity: 0.88;
  font-weight: 500;
}

.today-date-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.today-nav-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.today-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.today-nav-btn.today-reset {
  background: #0096c7;
  color: #ffffff;
}

/* --- MAIN PROGRAM BOX --- */
.today-main-program {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.today-main-label {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd166;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.today-main-text {
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: #f8fbfe;
}

/* --- TODAY SHIFTS GRID --- */
.today-shifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.today-shift-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.today-shift-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.today-shift-card.shift-mattina { border-left: 4px solid #f77f00; }
.today-shift-card.shift-pomeriggio { border-left: 4px solid #0096c7; }
.today-shift-card.shift-sera { border-left: 4px solid #9d4edd; }
.today-shift-card.shift-cancelled { border-left: 4px solid #e63946; background: rgba(230, 57, 70, 0.15); }
.today-shift-card.shift-unplanned { border-left: 4px solid #ffb703; opacity: 0.75; }

.today-shift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.today-shift-name {
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.today-shift-time {
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 3px 8px;
  border-radius: 6px;
}

.today-shift-pool {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 8px;
}

.today-shift-workout {
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-wrap;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- TODAY ACTIONS TOOLBAR --- */
.today-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-today-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-today-pdf {
  background: #ffffff;
  color: #0d1f35;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-today-pdf:hover {
  background: #eef7fb;
  transform: translateY(-1px);
}

.btn-today-wa {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-today-wa:hover {
  background: #20ba5a;
  transform: translateY(-1px);
}

.btn-today-wa-single {
  background: rgba(37, 211, 102, 0.2);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.4);
}

.btn-today-wa-single:hover {
  background: rgba(37, 211, 102, 0.3);
}

.btn-today-edit {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-today-edit:hover {
  background: rgba(255, 255, 255, 0.28);
}

/* --- VARIATION ALERTS BAR --- */
.variation-alert-card {
  background: linear-gradient(135deg, #fff3cd 0%, #ffecb5 100%);
  border: 1.5px solid #ffe69c;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  color: #664d03;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 4px 12px rgba(102, 77, 3, 0.08);
}

.variation-alert-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.variation-icon {
  font-size: 24px;
}

.variation-alert-title {
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 2px;
}

.variation-alert-desc {
  font-size: 12px;
  color: #7d5e04;
}

.variation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-alert-wa {
  background: #198754;
  color: #ffffff;
  border: none;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-alert-wa:hover {
  background: #146c43;
}

/* --- WEEKLY ACCORDION / COLLAPSIBLE CONTAINER --- */
.weekly-accordion {
  border: 1.5px solid #d4e2ef;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(13, 31, 53, 0.07), 0 2px 6px rgba(0, 150, 199, 0.06);
  transition: box-shadow 0.3s ease;
}

.weekly-accordion:hover {
  box-shadow: 0 8px 28px rgba(13, 31, 53, 0.1), 0 2px 8px rgba(0, 150, 199, 0.1);
}

.weekly-accordion-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  background: linear-gradient(135deg, #0d1f35 0%, #17406b 60%, #0077b6 100%);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: filter 0.2s ease;
  border-bottom: none;
}

.weekly-accordion-summary::-webkit-details-marker {
  display: none;
}

.weekly-accordion-summary:hover {
  filter: brightness(1.1);
}

.weekly-accordion[open] .weekly-accordion-summary {
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.weekly-accordion-title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  flex: 1;
  color: #ffffff;
}

.weekly-accordion-title-icon {
  font-size: 20px;
  background: rgba(255, 255, 255, 0.15);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.weekly-accordion-title-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.weekly-accordion-title-main {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.weekly-accordion-title-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.weekly-accordion-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: auto;
  padding-right: 16px;
}

.weekly-pill {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.weekly-pill-m { background: #f77f00; color: #fff; }
.weekly-pill-p { background: #0096c7; color: #fff; }
.weekly-pill-s { background: #9d4edd; color: #fff; }

.weekly-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 18px 0;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

.weekly-accordion-icon {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.weekly-accordion[open] .weekly-accordion-icon {
  transform: rotate(180deg);
}

.weekly-accordion-content {
  padding: 20px;
  animation: accordionSlideIn 0.25s ease;
  border-top: 1px solid #e8f0f8;
  background: #f9fbfd;
}

@keyframes accordionSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* mobile: always full width stack */
@media (max-width: 768px) {
  .weekly-accordion-pills { display: none; }
  .weekly-accordion-content { padding: 12px; }
  .weekly-accordion-title { padding: 14px 16px; }
  .weekly-accordion-title-main { font-size: 14px; }
}

/* --- WHATSAPP SINGLE RECIPIENT MODAL --- */
.wa-modal-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wa-modal-hint {
  font-size: 12px;
  color: #5b7d96;
  line-height: 1.4;
}

.wa-phone-input-group {
  display: flex;
  gap: 8px;
}

.wa-phone-prefix {
  background: #eef5fc;
  border: 1px solid #d4e2ef;
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 700;
  color: #0d1f35;
  font-size: 14px;
  display: flex;
  align-items: center;
}

/* --- MOBILE RESPONSIVE OVERRIDES --- */
@media (max-width: 768px) {
  .today-hero-card {
    padding: 16px;
    border-radius: 14px;
  }
  .today-hero-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .today-date-nav {
    width: 100%;
    justify-content: space-between;
  }
  .today-shifts-grid {
    grid-template-columns: 1fr;
  }
  .today-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-today-action {
    justify-content: center;
    width: 100%;
  }
}
