.pg-container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 24px 18px;
  padding-left: 10px !important;
  padding-right: 10px !important;
  background-color: #ffffff;
  border-radius: 6px;
  font-family: 'Open Sans', sans-serif;
}

.pg-title {
  text-align: center;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 8px;
  color: #000;
}

.pg-subtitle {
  text-align: center;
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
}

.pg-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pg-section {
  border-radius: 6px;
  padding: 16px;
}

.pg-section-inner {
  background: #fff;
  margin-top: 12px;
}

.pg-section-title {
  font-weight: 600;
  font-size: 14px;
  color: #000;
  margin: 0 0 12px 0;
}

.pg-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pg-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}

.pg-half { flex: 0 0 calc(50% - 8px); }
.pg-third { flex: 0 0 calc(33.33% - 11px); min-width: 150px; }

.pg-input-group-align .pg-label { min-height: 1.2em; }
.pg-input-group-align .pg-checkbox-label { margin-top: 0; }

.pg-label {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.pg-input,
.pg-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  color: #000;
  background-color: #fff;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.pg-input:focus,
.pg-select:focus {
  outline: none;
  border-color: #000;
}

.pg-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pg-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.pg-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #000;
}

.pg-checkbox-single { margin-top: 8px; }
.pg-checkbox-all { font-weight: 600; }

.pg-advanced {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
}

.pg-advanced-toggle {
  padding: 12px 16px;
  background: #f5f5f5;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.pg-advanced-toggle:hover { background: #eee; }
.pg-advanced[open] .pg-advanced-toggle { border-bottom: 1px solid #e0e0e0; }

.pg-button {
  background-color: #000;
  color: #fff !important;
  border: none;
  border-radius: 6px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: center;
  margin-top: 8px;
}

.pg-button:hover { background-color: #333; }
.pg-button:disabled { background-color: #999; cursor: not-allowed; }

.pg-btn-secondary {
  background-color: #fff;
  color: #000 !important;
  border: 1px solid #000;
  border-radius: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pg-btn-secondary:hover {
  background-color: #000;
  color: #fff !important;
}

.pg-loader {
  text-align: center;
  padding: 40px 20px;
}

.pg-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #000;
  border-radius: 50%;
  animation: pg-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes pg-spin {
  to { transform: rotate(360deg); }
}

.pg-results {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
}

.pg-results-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.pg-seed-info { font-size: 12px; color: #999; }

.pg-meta {
  background: linear-gradient(135deg, #f8f8f8, #fff);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  padding-left: 16px !important;
  padding-right: 16px !important;
  margin-bottom: 20px;
  font-size: 13px;
  color: #333;
}

.pg-meta strong { color: #000; }
.pg-legend { font-size: 12px; color: #666; margin: 8px 0 0 0; padding-top: 8px; border-top: 1px solid #eee; }

.pg-week-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0 0;
  margin-left: 20px;
  padding: 0;
  border-bottom: 1px solid #e0e0e0;
  list-style: none;
}
.pg-week-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  margin-bottom: -1px;
}
.pg-week-tab:hover { background: #eee; color: #333; }
.pg-week-tab.is-active {
  background: #fff;
  color: #000;
  border-color: #e0e0e0;
  border-bottom: 1px solid #fff;
}

.pg-sessions { display: flex; flex-direction: column; gap: 20px; }

.pg-empty-msg {
  background: #fff8e6;
  border: 1px solid #ffe0b2;
  border-radius: 6px;
  padding: 14px;
  font-size: 14px;
  color: #b77d00;
  margin: 0 0 16px 0;
}

.pg-session {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.pg-session-header {
  background: #000;
  color: #fff;
  padding: 12px 16px;
  padding-left: 10px !important;
  padding-right: 10px !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pg-session-name { font-weight: 700; font-size: 15px; margin: 0; }
.pg-session-meta { font-size: 12px; opacity: 0.9; }
.pg-sfi-tooltip { cursor: help; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }

.pg-session-exercises { padding: 16px; padding-left: 10px !important; padding-right: 10px !important; }
.pg-exercise {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 16px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.pg-exercise:last-child { border-bottom: none; }

.pg-exercise-img {
  flex: 0 0 33%;
  width: 33%;
  max-width: 33%;
  object-fit: contain;
  border-radius: 6px;
  align-self: flex-start;
}

.pg-exercise-content {
  flex: 1 1 60%;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
}

.pg-exercise-name { font-weight: 600; font-size: 14px; color: #000; flex: 1 1 100%; }
.pg-exercise-desc { display: block; font-size: 12px; color: #666; margin: 4px 0 6px 0; line-height: 1.4; width: 100%; }
.pg-exercise-prescription { font-size: 13px; color: #333; }
.pg-exercise-tag {
  font-size: 11px;
  text-transform: uppercase;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 4px;
  color: #666;
}

.pg-btn-replace {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
  cursor: pointer;
  margin-left: auto;
}
.pg-btn-replace:hover:not(:disabled) { background: #f5f5f5; border-color: #999; }
.pg-btn-replace:disabled { opacity: 0.7; cursor: not-allowed; }

.pg-progression {
  margin-top: 24px;
  padding: 16px;
  padding-left: 16px !important;
  padding-right: 16px !important;
  background: #f9f9f9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.pg-progression h4 { margin: 0 0 12px 0; font-size: 14px; color: #000; }
.pg-progression ul { margin: 0; padding-left: 20px; font-size: 13px; color: #333; }

.pg-error {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  border-radius: 6px;
  padding: 16px;
  color: #c62828;
  margin-top: 20px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .pg-container { padding: 16px 12px; }
  .pg-row { flex-direction: column; }
  .pg-half, .pg-third { flex: 1; min-width: 100%; }
  .pg-exercise { flex-direction: column; flex-wrap: wrap; }
  .pg-exercise-img { flex: 0 0 auto; width: 100%; max-width: 100%; }
  .pg-exercise-content { flex: 1 1 auto; }
}
