/* ============================================================
   Cone App — Additional Styles
   Inherits all design tokens from theme.css
   ============================================================ */

/* App shell */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 80px;
}

/* Page header */
.page-header {
  background: var(--cream);
  padding: 3rem;
  border-bottom: 1px solid rgba(107,158,138,0.15);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}
.page-header-left { max-width: 560px; }
.page-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}
.page-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--fg);
}
.page-subtitle {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--warm-gray);
  line-height: 1.6;
}

/* Main content */
.page-content {
  flex: 1;
  padding: 3rem;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
}

/* Form styles */
.form-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 2px 20px rgba(26,26,26,0.06);
}
.form-group { margin-bottom: 1.75rem; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.form-hint {
  font-size: 0.8125rem;
  color: var(--warm-gray);
  margin-top: 0.375rem;
}
.form-input, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(154,144,136,0.3);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--fg);
  background: white;
  transition: border-color 0.15s;
  appearance: none;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--sage);
}
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(154,144,136,0.3);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--fg);
  background: white;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.15s;
}
.form-textarea:focus { outline: none; border-color: var(--sage); }

/* Severity selector (radio cards) */
.severity-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}
.severity-card {
  position: relative;
  cursor: pointer;
}
.severity-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.severity-card-inner {
  border: 1.5px solid rgba(154,144,136,0.3);
  border-radius: 10px;
  padding: 0.875rem 0.5rem;
  text-align: center;
  transition: all 0.15s;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--warm-gray);
}
.severity-card input:checked + .severity-card-inner {
  border-color: var(--sage);
  background: rgba(107,158,138,0.08);
  color: var(--sage-dark);
}
.severity-card:hover .severity-card-inner { border-color: var(--sage-light); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--sage);
  color: white;
}
.btn-primary:hover:not(:disabled) { background: var(--sage-dark); transform: translateY(-1px); }
.btn-secondary {
  background: white;
  color: var(--fg);
  border: 1.5px solid rgba(154,144,136,0.3);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--sage-light); }
.btn-full { width: 100%; }

/* Delivery type cards */
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.delivery-card {
  position: relative;
  cursor: pointer;
}
.delivery-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.delivery-card-inner {
  border: 1.5px solid rgba(154,144,136,0.3);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  transition: all 0.15s;
}
.delivery-card:hover .delivery-card-inner { border-color: var(--sage-light); }
.delivery-card input:checked + .delivery-card-inner {
  border-color: var(--sage);
  background: rgba(107,158,138,0.08);
}
.delivery-icon { font-size: 1.75rem; display: block; margin-bottom: 0.5rem; }
.delivery-label { font-size: 0.875rem; font-weight: 500; color: var(--fg); display: block; }
.delivery-sub { font-size: 0.75rem; color: var(--warm-gray); margin-top: 0.25rem; display: block; }

/* Check-in card */
.checkin-card {
  background: var(--cream);
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 2rem;
}
.checkin-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}
.checkin-prompt {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.55;
  color: var(--fg);
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Response slider */
.response-row {
  margin-bottom: 1.5rem;
}
.response-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.response-label { font-size: 0.875rem; font-weight: 500; color: var(--fg); }
.response-value { font-size: 0.8125rem; font-weight: 600; color: var(--sage); min-width: 2rem; text-align: right; }
.response-slider {
  width: 100%;
  height: 6px;
  border-radius: 99px;
  appearance: none;
  background: linear-gradient(90deg, var(--sage) 50%, rgba(154,144,136,0.2) 50%);
  cursor: pointer;
  outline: none;
}
.response-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sage);
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  cursor: pointer;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  color: var(--warm-gray);
}

/* Score display */
.score-display {
  background: var(--fg);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  color: var(--bg);
  margin-bottom: 2rem;
}
.score-big {
  font-family: var(--serif);
  font-size: 5rem;
  font-weight: 700;
  color: var(--sage-light);
  line-height: 1;
}
.score-label {
  font-size: 0.875rem;
  color: rgba(250,247,242,0.5);
  margin-top: 0.5rem;
}
.score-bar {
  height: 6px;
  background: rgba(250,247,242,0.12);
  border-radius: 99px;
  margin-top: 1.5rem;
  overflow: hidden;
}
.score-fill { height: 100%; background: linear-gradient(90deg, var(--sage-dark), var(--sage)); border-radius: 99px; transition: width 0.8s ease; }

/* Exercise list */
.exercise-list { display: flex; flex-direction: column; gap: 0.75rem; }
.exercise-item {
  background: white;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}
.exercise-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(107,158,138,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sage-dark);
  flex-shrink: 0;
}
.exercise-body { flex: 1; }
.exercise-name { font-size: 0.9375rem; font-weight: 500; color: var(--fg); }
.exercise-meta { font-size: 0.8125rem; color: var(--warm-gray); margin-top: 0.125rem; }
.exercise-notes { font-size: 0.8125rem; color: var(--warm-gray); margin-top: 0.375rem; font-style: italic; }

/* Dashboard */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.dash-card {
  background: white;
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.dash-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-bottom: 0.75rem;
}
.dash-card-value {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}
.dash-card-sub { font-size: 0.8125rem; color: var(--warm-gray); margin-top: 0.375rem; }
.dash-score-card {
  background: var(--fg);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.dash-score-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(107,158,138,0.12);
  filter: blur(30px);
}
.dash-score-card .dash-card-value { color: var(--sage-light); }
.dash-score-card .dash-card-sub { color: rgba(250,247,242,0.4); }

/* Score history chart */
.score-history {
  background: white;
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}
.history-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 1.25rem;
}
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
}
.chart-bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.chart-bar {
  width: 100%;
  background: var(--sage);
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.chart-bar:hover { opacity: 1; }
.chart-bar-label { font-size: 0.625rem; color: var(--warm-gray); margin-top: 4px; }

/* Loading states */
.skeleton {
  background: linear-gradient(90deg, var(--cream) 25%, rgba(154,144,136,0.1) 50%, var(--cream) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Alert/feedback */
.alert {
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}
.alert-error { background: rgba(196,114,92,0.1); color: var(--terra); border: 1px solid rgba(196,114,92,0.2); }
.alert-success { background: rgba(107,158,138,0.1); color: var(--sage-dark); border: 1px solid rgba(107,158,138,0.2); }

/* Responsive */
@media (max-width: 600px) {
  .page-header { padding: 2rem 1.5rem; }
  .page-content { padding: 2rem 1.5rem; }
  .form-card { padding: 1.5rem; }
  .severity-grid { grid-template-columns: repeat(5, 1fr); }
  .delivery-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}