body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background: #f4f6f8;
}

h1 {
  text-align: center;
}

h2, h3, h4 {
  margin-top: 20px;
}

.block {
  background: #fff;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 8px;
  border: 1px solid #ddd;
}

td input {
  width: 90%;
  padding: 4px;
}

button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  margin-top: 12px;
  border-radius: 8px;
  border: none;
  background: #1e88e5;
  color: white;
}

button:active {
  transform: scale(0.98);
}

input[type="number"] {
  width: 45%;
  padding: 14px;
  font-size: 18px;
  margin: 6px 2%;
  border-radius: 8px;
  border: 1px solid #ccc;
}

textarea {
  width: 100%;
  min-height: 90px;
  font-size: 16px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.exercise-card {
  background: white;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.sticky-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  padding: 12px;
  border-top: 1px solid #ddd;
}

.back-link {
  display: inline-block;
  margin-bottom: 10px;
  color: #007aff;
  text-decoration: none;
}

.day-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.day-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.day-btn span {
  font-size: 14px;
  opacity: 0.8;
}

.day-btn.cardio { background: #3498db; }
.day-btn.upper { background: #e74c3c; }
.day-btn.lower { background: #9b59b6; }
.day-btn.full { background: #f39c12; }
.day-btn.recovery { background: #1abc9c; }

.history-item, .calendar-item {
  background: white;
  padding: 14px 16px;
  margin-bottom: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.history-item:active, .calendar-item:active {
  background: #f0f0f0;
}

.no-history {
  color: #888;
  text-align: center;
  padding: 20px;
}

.exercise-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.exercise-title h4 {
  margin: 0;
  flex: 1;
}

.progress-btn {
  padding: 6px 12px;
  font-size: 12px;
  background: #3498db;
  margin: 0;
  width: auto;
}

.notes-section {
  margin-top: 20px;
}

.notes-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.chart-container {
  background: white;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.calendar-btn {
  background: #3498db;
}

.export-btn {
  background: #9b59b6;
}

.auth-form {
  max-width: 400px;
  margin: 40px auto;
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.switch-text {
  text-align: center;
  margin-top: 16px;
  color: #666;
}

.switch-text a {
  color: #007aff;
}

.error-message {
  color: #e74c3c;
  text-align: center;
  margin-top: 12px;
}

.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px;
  background: white;
  border-radius: 8px;
}

.user-info {
  font-weight: 600;
}

.logout-btn {
  background: #e74c3c;
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
}

.client-card {
  background: white;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.client-card h4 {
  margin: 0 0 8px 0;
}

.client-card p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: #ddd;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.tab-btn.active {
  background: #007aff;
  color: white;
}

.client-header {
  margin-bottom: 12px;
}

.client-email {
  font-size: 12px;
  color: #666;
}

.client-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat {
  background: #f5f5f5;
  padding: 8px;
  border-radius: 4px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 10px;
  color: #666;
  text-transform: uppercase;
}

.stat-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

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

.client-actions button {
  flex: 1;
  min-width: 80px;
  padding: 8px;
  font-size: 12px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-top: 0;
}

.day-config {
  background: #f5f5f5;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
}

.day-config label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.day-config input[type="text"],
.day-config textarea {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.day-config textarea {
  height: 60px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.form-actions button {
  flex: 1;
}

.program-card {
  background: white;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.program-card h4 {
  margin: 0 0 8px 0;
}

.program-days {
  font-size: 13px;
}

.program-day {
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.program-day:last-child {
  border-bottom: none;
}

.exercise-count {
  color: #666;
  font-size: 12px;
}

/* Invite styles */
.invite-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.invite-form input {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.invite-form button {
  width: auto;
  padding: 12px 20px;
  margin: 0;
}

.invite-result {
  background: #e8f5e9;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.invite-result input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin: 8px 0;
}

.invite-result button {
  width: auto;
  padding: 10px 16px;
  margin: 0;
}

.invite-card {
  background: white;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.invite-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.invite-dates {
  font-size: 12px;
  color: #666;
}

.status-active {
  background: #4caf50;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-used {
  background: #2196f3;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.status-expired {
  background: #9e9e9e;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

/* Auth container for invite page */
.auth-container {
  max-width: 400px;
  margin: 40px auto;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-container h1 {
  margin-top: 0;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

.invite-info-text {
  text-align: center;
  margin-bottom: 20px;
  color: #666;
}

.error-message {
  color: #d32f2f;
  text-align: center;
}

.success-message {
  color: #388e3c;
  text-align: center;
  font-size: 18px;
}

.link-btn {
  display: block;
  text-align: center;
  padding: 14px;
  background: #007aff;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  margin-top: 16px;
}

/* Payment required styles */
.payment-required {
  background: white;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.payment-required h2 {
  margin-top: 0;
  color: #d32f2f;
}

.payment-required p {
  color: #666;
  margin-bottom: 20px;
}

.payment-required button {
  background: #4caf50;
  font-weight: bold;
}

/* Legal pages styles */
.legal-page {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.legal-page h1 {
  margin-top: 0;
  color: #333;
}

.legal-page h2 {
  font-size: 18px;
  margin-top: 24px;
  color: #444;
}

.legal-page p {
  line-height: 1.6;
  color: #555;
}

.legal-page ul {
  padding-left: 24px;
  color: #555;
}

.legal-page li {
  margin-bottom: 8px;
}

.effective-date {
  color: #888;
  font-size: 14px;
}

.legal-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.legal-footer a {
  color: #007aff;
  text-decoration: none;
}

/* Footer links */
.footer-links {
  text-align: center;
  padding: 20px;
  margin-top: 20px;
  font-size: 12px;
  color: #888;
}

.footer-links a {
  color: #666;
  text-decoration: none;
  margin: 0 8px;
}

.footer-links a:hover {
  text-decoration: underline;
}
