/* Reusable Components for Dolphins21 */

/* App Container & Navigation */
.app-header {
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.brand-icon {
  background: var(--primary);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-foreground);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--accent);
}

/* Page Shell & Layout */
.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* Typography elements */
.eyebrow {
  color: var(--primary);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 6px;
  display: inline-block;
}

.page-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--foreground);
  margin-bottom: 12px;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 16px;
  color: var(--muted-foreground);
  max-width: 720px;
  margin-bottom: 24px;
}

/* Cards & Surfaces */
.surface-card {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.surface-card:hover {
  box-shadow: var(--shadow-md);
}

.accent-panel {
  background: var(--accent);
  border: 1px solid rgba(204, 78, 45, 0.2);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: var(--accent-foreground);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(204, 78, 45, 0.2);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #e5e5e5;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
}

/* Badges & Indicators */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-stage-1 { background: #f1f5f9; color: #475569; }
.badge-stage-2 { background: #ffedd5; color: #c2410c; }
.badge-stage-3 { background: #fef3c7; color: #b45309; }
.badge-stage-4 { background: #fee2e2; color: #b91c1c; }

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

/* Next Action Banner */
.next-action-banner {
  background: var(--accent);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

.next-action-text {
  font-size: 15px;
  color: var(--foreground);
  font-weight: 600;
}

/* Rubric Panel (4 columns) */
.rubric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .rubric-grid {
    grid-template-columns: 1fr;
  }
}

.rubric-stage-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: #ffffff;
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.rubric-stage-card:hover {
  border-color: var(--primary);
  background: var(--accent);
}

.rubric-stage-card.selected {
  border: 2px solid var(--primary);
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(204, 78, 45, 0.2);
}

.rubric-stage-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--primary);
}

/* Progress bar */
.progress-bar-bg {
  background: var(--muted);
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  background: var(--primary);
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

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

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: #fff;
  color: var(--foreground);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--primary);
  outline: none;
}
