/* assets/css/form.css – SJR Anmeldesystem Stylesheet */

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

:root {
  --green:      #1a5c3a;
  --green-light:#e8f4ee;
  --green-mid:  #2d7a52;
  --text:       #1a1a1a;
  --muted:      #5a5a5a;
  --hint:       #888;
  --border:     #ddd;
  --bg:         #f7f6f3;
  --white:      #ffffff;
  --red:        #c0392b;
  --amber:      #f9a825;
  --radius:     10px;
  --shadow:     0 1px 3px rgba(0,0,0,.08);
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* Header */
.site-header {
  background: var(--green);
  padding: 20px 0;
  min-height: 80px;
}
.site-header.has-image { min-height: 160px; position: relative; }
.site-header.has-image::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.header-logo img { display: block; filter: brightness(0) invert(1); }
.header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,.85);
}
.header-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Main */
.page-main { padding: 32px 16px 48px; }
.container { max-width: 680px; margin: 0 auto; }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--green);
  margin-bottom: 10px;
  line-height: 1.3;
}
.card-section-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Intro text */
.intro-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}

/* Progress */
.progress-wrap { margin-bottom: 24px; }
.progress-label {
  font-size: 12px;
  color: var(--hint);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}
.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  transition: width .4s ease;
}

/* Form fields */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
label.field-label .req { color: var(--red); margin-left: 2px; }

input[type=text], input[type=email], input[type=tel],
input[type=number], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(26,92,58,.1);
}
textarea { min-height: 80px; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.field-hint { font-size: 12px; color: var(--hint); margin-top: 4px; }
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field.has-error .field-error { display: block; }

/* Grid */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }

/* Radio / Checkbox */
.choice-group { display: flex; flex-direction: column; gap: 8px; }
.choice-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 14px;
  line-height: 1.4;
}
.choice-item:hover { border-color: var(--green); background: var(--green-light); }
.choice-item input[type=radio],
.choice-item input[type=checkbox] {
  width: auto;
  margin-top: 2px;
  accent-color: var(--green);
  flex-shrink: 0;
}
.choice-item.selected { border-color: var(--green); background: var(--green-light); }

/* Branch logic */
.branch-section {
  border-left: 3px solid var(--green);
  padding: 14px 18px;
  margin-top: 12px;
  background: var(--green-light);
  border-radius: 0 8px 8px 0;
}
.branch-section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-mid); }
.btn-secondary { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-full { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }

.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* AGB / Checkboxes */
.agb-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.agb-check input { margin-top: 2px; accent-color: var(--green); flex-shrink: 0; }
.agb-check a { color: var(--green); }

/* Summary box */
.summary-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 20px;
}
.summary-box dt { color: var(--muted); font-weight: 400; float: left; width: 140px; }
.summary-box dd { margin-left: 140px; font-weight: 500; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid #a3d9bc; }
.alert-error   { background: #fdf2f2; color: var(--red); border: 1px solid #f5b7b1; }
.alert-warning { background: #fff8e1; color: #856404; border: 1px solid #ffe082; }
.alert-info    { background: #e8f4fd; color: #1565c0; border: 1px solid #90caf9; }

/* Closed banner */
.closed-banner {
  background: #fdf2f2;
  border: 1px solid #f5b7b1;
  border-radius: 10px;
  padding: 20px 24px;
  text-align: center;
}
.closed-banner h2 { color: var(--red); margin-bottom: 8px; font-size: 18px; }
.closed-banner p { color: var(--muted); font-size: 14px; }

/* Success page */
.success-page { text-align: center; padding: 40px 24px; }
.success-icon {
  width: 64px; height: 64px;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.success-icon svg { color: var(--green); }
.success-page h1 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 24px;
  color: var(--green);
  margin-bottom: 12px;
}
.success-page p { color: var(--muted); font-size: 15px; max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  font-size: 12px;
  color: var(--hint);
}
.site-footer .container {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--hint); text-decoration: none; }
.site-footer a:hover { color: var(--green); }

/* Admin-specific (shared) */
.admin-body { background: #f0efe9; }
.admin-nav {
  background: var(--green);
  padding: 0;
  display: flex;
  align-items: center;
}
.admin-nav .nav-brand {
  padding: 14px 24px;
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.admin-nav .nav-links {
  display: flex;
  flex: 1;
  gap: 4px;
  padding: 8px 8px;
}
.admin-nav .nav-links a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  transition: background .15s;
}
.admin-nav .nav-links a:hover,
.admin-nav .nav-links a.active { background: rgba(255,255,255,.2); color: #fff; }
.admin-nav .nav-right { margin-left: auto; padding-right: 16px; font-size: 13px; color: rgba(255,255,255,.7); }

.admin-main { padding: 28px 24px; max-width: 1100px; margin: 0 auto; }
.page-heading { font-family: 'Source Serif 4', serif; font-size: 24px; font-weight: 600; margin-bottom: 20px; color: var(--text); }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-pending   { background: #fff8e1; color: #856404; }
.badge-confirmed { background: var(--green-light); color: var(--green); }
.badge-waitlist  { background: #e8f4fd; color: #1565c0; }
.badge-cancelled { background: #fdf2f2; color: var(--red); }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.stat-card .stat-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 500; color: var(--text); }
