.training-calendar-wrapper {
  font-family: 'Work Sans', sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  color: #072643;
}

/* Header */
.tc-header {
  text-align: center;
  margin-bottom: 2rem;
}
.tc-title {
  font-size: 2rem;
  font-weight: 700;
  color: #072643;
  margin-bottom: 0.25rem;
}
.tc-subtitle {
  color: #5a5b5e;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.tc-toggle {
  display: inline-flex;
  background: #f0f0e0;
  border-radius: 6px;
  overflow: hidden;
}
.tc-toggle-btn {
  padding: 0.5rem 1.5rem;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #5a5b5e;
  cursor: pointer;
  transition: all 0.2s;
}
.tc-toggle-btn.active {
  background: #0054c5;
  color: #fff;
  border-radius: 6px;
}

/* Month Navigation */
.tc-month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.tc-nav-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #0054c5;
  border-radius: 50%;
  background: #fff;
  color: #0054c5;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.tc-nav-btn:hover {
  background: #0054c5;
  color: #fff;
}
.tc-month-label {
  font-size: 1.4rem;
  font-weight: 700;
  color: #072643;
  min-width: 200px;
  text-align: center;
}

/* Calendar Grid */
.tc-grid-header {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #5a5b5e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #d5e6fd;
}
.tc-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: #e8e8e8;
  border: 1px solid #e8e8e8;
  border-top: none;
}
.tc-day {
  background: #fff;
  min-height: 100px;
  padding: 4px;
  position: relative;
}
.tc-day.other-month {
  background: #fafafa;
}
.tc-day.today {
  box-shadow: inset 0 0 0 2px #0054c5;
}
.tc-day-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: #5a5b5e;
  margin-bottom: 2px;
}
.tc-day.other-month .tc-day-num {
  color: #c0c0c0;
}
.tc-pill {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: #fff;
  padding: 2px 4px;
  border-radius: 3px;
  margin-bottom: 2px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s;
  line-height: 1.3;
}
.tc-pill:hover {
  opacity: 0.85;
}
.tc-pill.cat-sqf { background: #0054c5; }
.tc-pill.cat-haccp { background: #007449; }
.tc-pill.cat-pcqi { background: #072643; }
.tc-pill.cat-audit { background: #5a5b5e; }
.tc-pill.cat-cgmp { background: #ffdc14; color: #072643; }
.tc-pill.cat-specialty { background: #e40e20; }
.tc-more {
  font-size: 0.6rem;
  color: #0054c5;
  font-weight: 600;
  cursor: pointer;
  padding: 1px 4px;
}

/* List View */
.tc-list-view { margin-top: 0.5rem; }
.tc-list-month {
  font-size: 1.2rem;
  font-weight: 700;
  color: #072643;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #d5e6fd;
}
.tc-list-card {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.tc-list-card:hover {
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.tc-list-bar {
  width: 5px;
  flex-shrink: 0;
}
.tc-list-bar.cat-sqf { background: #0054c5; }
.tc-list-bar.cat-haccp { background: #007449; }
.tc-list-bar.cat-pcqi { background: #072643; }
.tc-list-bar.cat-audit { background: #5a5b5e; }
.tc-list-bar.cat-cgmp { background: #ffdc14; }
.tc-list-bar.cat-specialty { background: #e40e20; }
.tc-list-content {
  padding: 1rem 1.25rem;
  flex: 1;
}
.tc-list-name {
  font-size: 1rem;
  font-weight: 700;
  color: #072643;
  margin-bottom: 0.35rem;
}
.tc-list-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.85rem;
  color: #5a5b5e;
}
.tc-list-detail { display: flex; align-items: center; gap: 0.35rem; }
.tc-list-detail strong { font-weight: 600; color: #072643; }

/* Modal */
.tc-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(7,38,67,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: tcFadeIn 0.2s;
}
@keyframes tcFadeIn { from { opacity: 0; } to { opacity: 1; } }
.tc-modal {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  animation: tcSlideUp 0.25s;
}
@keyframes tcSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.tc-modal-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: none; border: none;
  font-size: 1.5rem;
  color: #5a5b5e;
  cursor: pointer;
  line-height: 1;
}
.tc-modal-close:hover { color: #072643; }
.tc-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #072643;
  margin-bottom: 1rem;
  padding-right: 2rem;
}
.tc-modal-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0e0;
  font-size: 0.9rem;
}
.tc-modal-row:last-child { border-bottom: none; }
.tc-modal-label { font-weight: 600; color: #5a5b5e; }
.tc-modal-value { color: #072643; font-weight: 500; }

/* Responsive */

/* ===== RESPONSIVE: TABLET (768px) ===== */
@media (max-width: 768px) {
  .training-calendar-wrapper { padding: 0 0.5rem; }
  .tc-title { font-size: 1.35rem; }
  .tc-subtitle { font-size: 0.85rem; }
  .tc-month-nav { gap: 0.75rem; margin-bottom: 0.75rem; }
  .tc-month-label { font-size: 1.1rem; min-width: 140px; }
  .tc-nav-btn { width: 32px; height: 32px; font-size: 0.95rem; }
  .tc-grid-header { font-size: 0.6rem; padding: 6px 0; letter-spacing: 0.02em; }
  .tc-grid-header > div { text-align: center; }
  .tc-day { min-height: 60px; padding: 3px; }
  .tc-day-num { font-size: 0.65rem; margin-bottom: 1px; }
  .tc-pill {
    font-size: 0.5rem;
    padding: 2px 3px;
    border-radius: 2px;
    margin-bottom: 1px;
    line-height: 1.3;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
  }
  .tc-toggle { gap: 0.25rem; }
  .tc-toggle-btn { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
  .tc-list-details { flex-direction: column; gap: 0.25rem; }
  .tc-list-name { font-size: 0.95rem; }
  .tc-list-detail { font-size: 0.8rem; }
  .tc-filter-bar { margin-top: 0.75rem; }
  .tc-filter-select { min-width: 180px; font-size: 0.85rem; padding: 0.4rem 1.75rem 0.4rem 0.6rem; }
  .tc-filter-label { font-size: 0.85rem; }
}

/* ===== RESPONSIVE: MOBILE (480px) ===== */
@media (max-width: 480px) {
  .tc-header { margin-bottom: 1rem; }
  .tc-title { font-size: 1.15rem; }
  .tc-subtitle { font-size: 0.75rem; }
  .tc-month-nav { gap: 0.5rem; }
  .tc-month-label { font-size: 1rem; min-width: 120px; }
  .tc-nav-btn { width: 28px; height: 28px; font-size: 0.85rem; border-width: 1.5px; }
  .tc-grid-header { font-size: 0.5rem; padding: 5px 0; letter-spacing: 0; }
  .tc-grid { gap: 1px; }
  .tc-day { min-height: 52px; padding: 2px; }
  .tc-day-num { font-size: 0.55rem; }
  .tc-pill {
    font-size: 0.42rem;
    padding: 1px 2px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: unset;
    letter-spacing: -0.01em;
  }
  .tc-toggle-btn { padding: 0.3rem 0.6rem; font-size: 0.75rem; }
  .tc-filter-bar { flex-direction: column; gap: 0.4rem; }
  .tc-filter-select { width: 100%; min-width: unset; }
  .tc-list-card { padding: 0.75rem; }
}

 100%; min-width: unset; }
  .tc-list-card { padding: 0.75rem; }
}

/* Course Filter */
.tc-filter-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.tc-filter-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #072643;
}
.tc-filter-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.95rem;
  font-family: 'Work Sans', sans-serif;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #072643;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23072643' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  min-width: 220px;
  transition: border-color 0.2s;
}
.tc-filter-select:hover {
  border-color: #009bd2;
}
.tc-filter-select:focus {
  outline: none;
  border-color: #009bd2;
  box-shadow: 0 0 0 3px rgba(0, 155, 210, 0.15);
}
    min-width: unset;
  }
}

@media (max-width: 600px) {
  .tc-filter-bar {
    flex-direction: column;
    gap: 0.5rem;
  }
  .tc-filter-select {
    width: 100%;
    min-width: unset;
  }
}

/* View Training Button - List */
.tc-list-btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: #009bd2;
  color: #fff;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}
.tc-list-btn:hover {
  background: #0054c5;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

/* View Training Button - Modal */
.tc-modal-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.5rem;
  background: #009bd2;
  color: #fff;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
}
.tc-modal-btn:hover {
  background: #0054c5;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 480px) {
  .tc-list-btn { font-size: 0.8rem; padding: 0.4rem 1rem; }
}