/* ADHS-Portal – Stylesheet */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

/* Layout */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 0;
  margin-bottom: 2rem;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header h1 { font-size: 1.2rem; color: var(--primary); font-weight: 700; }
.site-header .logout { font-size: .9rem; color: var(--gray-600); text-decoration: none; }
.site-header .logout:hover { color: var(--danger); }

/* Cards */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.card h2 { font-size: 1.1rem; margin-bottom: 1.25rem; color: var(--gray-800); }

/* Buttons */
.btn {
  display: inline-block;
  padding: .55rem 1.25rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.btn-primary  { background: var(--primary); color: white; }
.btn-primary:hover  { background: var(--primary-dark); }
.btn-success  { background: var(--success); color: white; }
.btn-danger   { background: var(--danger); color: white; }
.btn-sm { padding: .35rem .85rem; font-size: .82rem; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

/* Forms */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .9rem; }
.form-control {
  width: 100%;
  padding: .55rem .85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  font-size: .95rem;
  transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--primary); }

/* Checkboxes (Test-Auswahl) */
.test-checkboxes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.test-check-label {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .9rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  cursor: pointer;
  font-size: .88rem;
  transition: border-color .15s, background .15s;
}
.test-check-label:hover { border-color: var(--primary); background: #eff6ff; }
.test-check-label input[type=checkbox]:checked + .test-check-text { color: var(--primary); font-weight: 600; }

/* Table */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { background: var(--gray-100); padding: .65rem 1rem; text-align: left; font-weight: 600; color: var(--gray-600); border-bottom: 2px solid var(--gray-200); }
.table td { padding: .65rem 1rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--gray-50); }

/* Badges */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 50px;
  font-size: .78rem;
  font-weight: 600;
}
.badge-success { background: #dcfce7; color: var(--success); }
.badge-warning { background: #fef9c3; color: #92400e; }
.badge-info    { background: #dbeafe; color: var(--primary); }

/* Alerts */
.alert { padding: .9rem 1.2rem; border-radius: 6px; margin-bottom: 1rem; font-size: .9rem; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }

/* Login-Seite */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
}
.login-box {
  background: white;
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  width: 100%;
  max-width: 400px;
}
.login-box h1 { font-size: 1.4rem; margin-bottom: .5rem; color: var(--primary); }
.login-box p  { color: var(--gray-600); margin-bottom: 1.75rem; font-size: .9rem; }

/* Patientenbereich */
.patient-wrap {
  max-width: 780px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}
.progress-bar-outer {
  background: var(--gray-200);
  border-radius: 50px;
  height: 10px;
  margin-bottom: 2rem;
}
.progress-bar-inner {
  height: 10px;
  border-radius: 50px;
  background: var(--primary);
  transition: width .4s;
}

/* Fragebogen */
.questionnaire { }
.q-item {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
}
.q-item .q-text { font-weight: 500; margin-bottom: .9rem; line-height: 1.5; }
.q-item .q-number { color: var(--gray-400); font-size: .82rem; margin-bottom: .3rem; }

/* Radio-Gruppe horizontal */
.radio-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.radio-label {
  display: flex; align-items: center; gap: .45rem;
  padding: .45rem .85rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  cursor: pointer;
  font-size: .88rem;
  transition: all .15s;
  white-space: nowrap;
}
.radio-label:hover { border-color: var(--primary); background: #eff6ff; }
.radio-label input[type=radio] { accent-color: var(--primary); }

/* Radio-Gruppe vertikal (für manche Tests) */
.radio-group-v { display: flex; flex-direction: column; gap: .4rem; }

/* Textarea */
.q-textarea {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 6px;
  padding: .6rem .85rem;
  font-size: .9rem;
  resize: vertical;
  min-height: 80px;
}
.q-textarea:focus { outline: none; border-color: var(--primary); }

/* Nav im Fragebogen */
.q-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 0 2rem;
}

/* Ergebnisseite */
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.result-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.3rem 1.5rem;
}
.result-card h3 { font-size: 1rem; margin-bottom: .6rem; }
.score-big { font-size: 2.2rem; font-weight: 700; color: var(--primary); }
.score-label { font-size: .85rem; color: var(--gray-600); margin-top: .2rem; }
.interp { font-size: .88rem; margin-top: .7rem; padding: .7rem; background: var(--gray-50); border-radius: 6px; border-left: 3px solid var(--primary); }
.interp.positive { border-left-color: var(--danger); background: #fff1f2; }
.interp.negative { border-left-color: var(--success); background: #f0fdf4; }

/* Test-Liste auf Startseite Patient */
.test-list { list-style: none; }
.test-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  border-radius: 6px;
  margin-bottom: .5rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.test-list li.done { background: #f0fdf4; border-color: #bbf7d0; }
.test-list li .check { font-size: 1.2rem; }
.test-list li .name { flex: 1; font-weight: 500; }

/* Responsive */
@media (max-width: 640px) {
  .result-grid { grid-template-columns: 1fr; }
  .test-checkboxes { grid-template-columns: 1fr; }
  .radio-group { flex-direction: column; }
}
