/* =============================================
   INTAKEFORMULIER – STYLESHEET
   ============================================= */

:root {
  --navy: #41655D;
  --navy-dark: #2E4741;
  --navy-light: #557971;
  --accent: #6B9E96;
  --bg: #D5D1C5;
  --white: #FFFFFF;
  --border: #C4C0B5;
  --text: #2D3A4A;
  --text-muted: #7A8899;
  --green: #27AE60;
  --orange: #E67E22;
  --red: #E74C3C;
  --shadow: 0 2px 8px rgba(65,101,93,0.10);
  --shadow-md: 0 4px 16px rgba(65,101,93,0.13);
  --radius: 8px;
  --radius-sm: 5px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
}

/* =============================================
   LOGIN
   ============================================= */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--navy);
}

.login-box {
  background: var(--white);
  padding: 40px;
  border-radius: 12px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.login-logo {
  max-height: 60px;
  max-width: 180px;
  margin-bottom: 20px;
  object-fit: contain;
}

.login-box h1 {
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 4px;
}

.login-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

/* =============================================
   ADMIN NAV
   ============================================= */

.admin-nav {
  background: var(--navy);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  height: 40px;
  width: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.nav-title {
  color: rgba(255,255,255,0.85);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

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

.nav-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: all 0.15s;
}

.nav-link:hover { background: rgba(255,255,255,0.12); color: white; }

.nav-link-logout {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
}

/* =============================================
   ADMIN LAYOUT
   ============================================= */

.admin-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header h1 {
  font-size: 26px;
  color: var(--navy);
  font-weight: 700;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 2px;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  display: block;
  margin-bottom: 6px;
}

.back-link:hover { text-decoration: underline; }

/* =============================================
   CARDS
   ============================================= */

.card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.invite-card { background: #E8E5DE; }
.invite-card h3 { font-size: 16px; color: var(--navy); margin-bottom: 6px; }

.invite-link-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.invite-url {
  flex: 1;
  min-width: 200px;
  background: white;
  font-size: 13px;
  color: var(--text-muted);
}

/* =============================================
   TABLE
   ============================================= */

.table-container { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table th {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #EBE8E3; }

/* =============================================
   BADGES
   ============================================= */

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-green { background: #e8f8ef; color: #1a7f41; }
.badge-orange { background: #fef3e2; color: #a0540e; }

/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary { background: var(--navy); color: white; }
.btn-primary:hover { background: var(--navy-dark); }

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

.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: white; }

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger-outline { background: transparent; color: var(--red); border: 1.5px solid var(--red); }
.btn-danger-outline:hover { background: var(--red); color: white; }

.btn-success { background: var(--green) !important; color: white !important; }
.btn-danger { background: var(--red) !important; color: white !important; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-large { padding: 14px 36px; font-size: 16px; font-weight: 600; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.action-buttons { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* =============================================
   FORMS
   ============================================= */

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.required { color: var(--red); }

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: border-color 0.15s;
  font-family: inherit;
}

.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(65,101,93,0.15); }

.form-textarea { resize: vertical; min-height: 80px; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.form-actions-sm { display: flex; gap: 8px; margin-top: 10px; }

.form-row { display: flex; gap: 16px; }

.inline-form { display: flex; gap: 10px; align-items: center; padding-top: 12px; }

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

/* =============================================
   ALERTS
   ============================================= */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.alert-success { background: #e8f8ef; color: #1a7f41; border: 1px solid #b4e1c3; }
.alert-error { background: #fdecea; color: #c0392b; border: 1px solid #f5c6c2; }
.alert-close { background: none; border: none; cursor: pointer; font-size: 18px; color: inherit; opacity: 0.6; }

/* =============================================
   EMPTY STATE
   ============================================= */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 20px; margin-bottom: 8px; color: var(--navy); }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; }

.empty-state-small { text-align: center; padding: 24px; color: var(--text-muted); }

/* =============================================
   FORM BUILDER
   ============================================= */

.section-builder-card { padding: 0; overflow: hidden; }

.section-builder-header {
  background: #E8E5DE;
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}

.section-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-move-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.section-edit-details summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.section-edit-details summary::-webkit-details-marker { display: none; }
.section-title-text { font-weight: 700; color: var(--navy); font-size: 15px; }
.section-edit-hint { font-size: 12px; color: var(--accent); }

.questions-list { padding: 8px 20px; }

.question-builder-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #E3E0DA;
}

.question-builder-row:last-child { border-bottom: none; }

.question-builder-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
  padding-top: 6px;
}

.q-num { font-size: 12px; color: var(--text-muted); font-weight: 600; }

.q-type-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.q-type-open { background: #DDE6E4; color: #2E5450; }
.q-type-single_choice { background: #f0e8fa; color: #5a1a8a; }
.q-type-multiple_choice { background: #e8faf0; color: #1a6a3a; }
.q-type-moodboard { background: #faf0e8; color: #8a4a1a; }

.question-builder-content { flex: 1; min-width: 0; }

.question-summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  padding: 6px 0;
  list-style: none;
}
.question-summary::-webkit-details-marker { display: none; }

.question-builder-move {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

.btn-move {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  width: 24px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}
.btn-move:hover:not(:disabled) { background: var(--bg); color: var(--text); }
.btn-move:disabled { opacity: 0.3; cursor: default; }

.add-question-details { border-top: 1px dashed var(--border); }
.add-question-details summary { padding: 12px 20px; }

.details-toggle {
  cursor: pointer;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  display: block;
}
.details-toggle::-webkit-details-marker { display: none; }

.details-body { padding: 12px 20px 16px; }

.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.btn-remove-option {
  background: none;
  border: none;
  color: var(--red);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 4px;
}

/* =============================================
   PROJECT VIEW - ANSWERS
   ============================================= */

.section-card { padding: 0; overflow: hidden; }

.section-header-admin {
  background: var(--navy);
  padding: 14px 24px;
}

.section-header-admin h3 { color: white; font-size: 15px; }

.answer-row {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.answer-row:last-child { border-bottom: none; }

.answer-question {
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 6px;
}

.answer-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

.moodboard-gallery-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.moodboard-item-admin {
  width: 160px;
}

.moodboard-item-admin img {
  width: 160px;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.img-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* =============================================
   CLIENT FORM PAGE
   ============================================= */

.form-page { background: var(--bg); }

.form-header {
  background: var(--navy);
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.form-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.form-logo {
  height: 52px;
  max-width: 130px;
  object-fit: contain;
  flex-shrink: 0;
}

.form-title {
  color: white;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.form-project {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  margin-top: 2px;
}

.form-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 28px 24px 60px;
}

.intro-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  border-left: 4px solid var(--navy);
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  box-shadow: var(--shadow);
}

.meta-card {
  background: white;
  border-radius: var(--radius);
  padding: 16px 24px 8px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.meta-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.meta-row .form-group { flex: 1; min-width: 200px; margin-bottom: 8px; }

/* Sections */
.form-section { margin-bottom: 24px; }

.form-section-header {
  background: var(--navy);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 24px;
}

.form-section-header h2 {
  color: white;
  font-size: 16px;
  font-weight: 600;
}

.question-card {
  background: white;
  border: 1px solid var(--border);
  border-top: none;
  padding: 18px 24px;
}

.question-card:last-child { border-radius: 0 0 var(--radius) var(--radius); }

.question-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Radio / Checkbox */
.radio-group, .checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  transition: all 0.15s;
}

.radio-option:hover, .checkbox-option:hover {
  border-color: var(--accent);
  background: #E8EBE9;
}

.radio-option input, .checkbox-option input { display: none; }

.radio-custom, .checkbox-custom {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.15s;
  position: relative;
}

.checkbox-custom { border-radius: 4px; }

.radio-option input:checked ~ .radio-custom {
  border-color: var(--navy);
  background: var(--navy);
  box-shadow: inset 0 0 0 3px white;
}

.checkbox-option input:checked ~ .checkbox-custom {
  border-color: var(--navy);
  background: var(--navy);
}

.checkbox-option input:checked ~ .checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

.radio-option input:checked ~ .radio-label,
.checkbox-option input:checked ~ .checkbox-label {
  font-weight: 600;
  color: var(--navy);
}

.radio-label, .checkbox-label-text { font-size: 14px; }

/* Moodboard */
.moodboard-section { }

.moodboard-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.moodboard-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.moodboard-item { width: 180px; }

.moodboard-img-wrap {
  position: relative;
  width: 180px;
  height: 135px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border);
}

.moodboard-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.moodboard-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0,0,0,0.55);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.moodboard-delete:hover { background: var(--red); }

.caption-input {
  margin-top: 6px;
  font-size: 12px;
  padding: 6px 8px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--accent);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.15s;
}
.upload-btn:hover { border-color: var(--accent); background: #E8EBE9; }

.upload-progress { margin-top: 10px; }

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
  width: 0;
}

.progress-text { font-size: 12px; color: var(--text-muted); }

/* Submit area */
.form-submit-area {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.submit-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Thank you */
.thanks-card {
  background: white;
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-width: 520px;
  margin: 0 auto;
}

.thanks-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e8f8ef;
  color: var(--green);
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.thanks-card h2 { font-size: 22px; color: var(--navy); margin-bottom: 12px; }
.thanks-card p { color: var(--text); font-size: 15px; line-height: 1.6; margin-bottom: 8px; }

/* Footer */
.form-footer {
  background: var(--navy);
  padding: 16px;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

/* =============================================
   UTILITIES
   ============================================= */

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 640px) {
  .admin-main { padding: 20px 16px; }
  .form-container { padding: 20px 16px 40px; }
  .form-header-inner { padding: 16px; gap: 12px; }
  .form-logo { height: 40px; }
  .form-title { font-size: 15px; }
  .page-header { flex-direction: column; }
  .page-header .action-buttons { width: 100%; }
  .form-row { flex-direction: column; }
  .meta-row { flex-direction: column; }
  .invite-link-row { flex-direction: column; }
  .admin-nav { padding: 0 16px; }
  .nav-title { display: none; }
  .moodboard-item { width: calc(50% - 7px); }
  .moodboard-img-wrap { width: 100%; height: 100px; }
}
