/* StoryHelm Client Portal Styles */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --border: #e5e4e0;
  --text: #1a1a1a;
  --text-muted: #6a6a6a;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.wrapper { max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}
.nav-brand { font-size: 1.1rem; font-weight: 600; color: var(--text); text-decoration: none; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.nav-links a:hover { color: var(--accent); }

/* Page headers */
.page-header { padding: 40px 0 24px; }
.page-header h1 { font-size: 1.75rem; font-weight: 600; margin-bottom: 4px; }
.page-header p { color: var(--text-muted); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 12px; }

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}
.status-kicked_off { background: #eff6ff; color: #2563eb; }
.status-in_progress { background: #fffbeb; color: #d97706; }
.status-review { background: #f3e8ff; color: #9333ea; }
.status-done { background: #f0fdf4; color: #16a34a; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 0.8rem; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 6px; }
.form-input, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--surface);
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { color: var(--danger); font-size: 0.85rem; margin-top: 8px; }

/* Auth pages */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}
.auth-card h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 8px; }
.auth-card p { color: var(--text-muted); margin-bottom: 24px; font-size: 0.9rem; }
.auth-footer { text-align: center; margin-top: 16px; font-size: 0.85rem; color: var(--text-muted); }
.auth-footer a { color: var(--accent); text-decoration: none; }

/* Project list */
.project-list { display: flex; flex-direction: column; gap: 12px; }
.project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}
.project-item-info { flex: 1; }
.project-item h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.project-item p { font-size: 0.8rem; color: var(--text-muted); }
.project-item-meta { display: flex; align-items: center; gap: 12px; }
.project-item a { color: var(--text); text-decoration: none; }

/* Deliverables */
.deliverable-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.deliverable-item:last-child { border-bottom: none; }
.deliverable-status { flex-shrink: 0; }
.deliverable-info { flex: 1; }
.deliverable-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.deliverable-desc { font-size: 0.85rem; color: var(--text-muted); }
.deliverable-actions { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }

/* Sections */
.section { margin-bottom: 32px; }
.section-title { font-size: 1rem; font-weight: 600; margin-bottom: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.8rem; }

/* Two-column layout for project detail */
.project-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 32px; }
.project-title-group h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 8px; }
.project-description { color: var(--text-muted); margin-bottom: 16px; line-height: 1.7; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state p { margin-bottom: 20px; }

/* Utility */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }