/* ================================================================
   styles.css — Self Competitive Coach
   ================================================================ */

/* --- Reset & Base -------------------------------------------- */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #f3f4f6;
  min-height: 100vh;
}

/* --- App Layout ---------------------------------------------- */

#app {
  max-width: 700px;
  margin: 0 auto;
  padding: 1.5rem;
}

/* --- Header -------------------------------------------------- */

.header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111827;
}

.subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* --- Status Bar ---------------------------------------------- */

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  background: #fff;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-size: 0.85rem;
}

.status-label {
  font-weight: 600;
  color: #374151;
}

.rate-display {
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* --- Card Panel ---------------------------------------------- */

.card-panel {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-panel h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
}

/* --- Inputs -------------------------------------------------- */

.input {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
  background: #fff;
}

.input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input--short {
  width: 100px;
}

select.input {
  min-width: 180px;
  cursor: pointer;
}

/* --- Session Form -------------------------------------------- */

.session-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

/* --- Buttons ------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.875rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.85;
}

.btn:active {
  opacity: 0.7;
}

.btn--small {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.btn--primary {
  background: #3b82f6;
  color: #fff;
}

.btn--complete {
  background: #22c55e;
  color: #fff;
}

.btn--danger {
  background: #ef4444;
  color: #fff;
}

.btn--action {
  background: #e5e7eb;
  color: #374151;
}

.btn--remove {
  background: transparent;
  color: #9ca3af;
  border: 1px solid #d1d5db;
  padding: 0.125rem 0.375rem;
  line-height: 1;
}

.btn--remove:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

/* --- Data Table ---------------------------------------------- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 0.5rem 0.625rem;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}

.data-table td {
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid #f3f4f6;
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* --- Review result rows -------------------------------------- */

.row--up {
  background: #f0fdf4;
}

.row--down {
  background: #fef2f2;
}

.cell--up {
  color: #16a34a;
  font-weight: 600;
}

.cell--down {
  color: #dc2626;
  font-weight: 600;
}

.cell--even {
  color: #6b7280;
}

/* --- Goal Chips ---------------------------------------------- */

.goal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.goal-chip {
  background: #fef3c7;
  color: #92400e;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* --- Goal Notification --------------------------------------- */

.goal-notification {
  margin-bottom: 1rem;
  padding: 0.875rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  animation: slideIn 0.3s ease-out;
}

.goal-notification--goal-met {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.goal-notification--all-met {
  background: #166534;
  color: #fff;
  border: 1px solid #15803d;
  text-align: center;
  font-size: 1.05rem;
}

.goal-notification--goal-close {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

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

/* --- Utility ------------------------------------------------- */

.muted {
  color: #9ca3af;
  font-size: 0.85rem;
}
