:root {
  --rgw-dark:        #4a6878;
  --rgw-dark-hover:  #3a5868;
  --rgw-mid:         #7a8fa0;
  --rgw-light-bg:    #dce6ed;
  --rgw-mint:        #8ec4b0;
  --rgw-mint-light:  #d4ede6;
  --rgw-mint-dark:   #4a9a84;
  --rgw-gold:        #d4a800;
  --rgw-gold-light:  #fef3c7;
  --rgw-text:        #1e2d38;
  --rgw-muted:       #5a7080;
  --rgw-border:      #c8d8e0;
  --rgw-bg:          #f5f7f8;
  --rgw-white:       #ffffff;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--rgw-bg);
  color: var(--rgw-text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

/* ─── HEADER ─── */
.site-header {
  background: var(--rgw-dark);
  padding: 0 2.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.logo-squares {
  display: grid;
  grid-template-columns: 14px 14px;
  grid-template-rows: 14px 14px;
  gap: 2px;
  flex-shrink: 0;
}
.sq { border-radius: 2px; }
.sq-1 { background: #EFEF8F; }
.sq-2 { background: #B1C2E0; }
.sq-3 { background: transparent; }
.sq-4 { background: #C0EFCF; }
.logo-text-wrap { line-height: 1.2; }
.logo-school { font-family: 'Source Serif 4', serif; font-size: 15px; font-weight: 600; color: #fff; }
.logo-sub { font-size: 11px; color: rgba(255,255,255,0.55); letter-spacing: 0.04em; }
.header-badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}
.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  padding: 0.3rem 0.9rem;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-logout:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ─── PAGE HERO ─── */
.page-hero {
  background: var(--rgw-light-bg);
  border-bottom: 1px solid var(--rgw-border);
  padding: 2rem 2.5rem 1.75rem;
}
.page-hero h1 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--rgw-dark);
  margin-bottom: 0.25rem;
}
.page-hero p { font-size: 14px; color: var(--rgw-muted); }

/* ─── LOGIN ─── */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px - 44px);
  padding: 3rem 1rem;
  background: linear-gradient(160deg, #e8eff4 0%, var(--rgw-bg) 60%);
}
.login-card {
  background: var(--rgw-white);
  border: 1px solid var(--rgw-border);
  border-radius: 16px;
  padding: 2.5rem 2.75rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 2px 24px rgba(74,104,120,0.10);
}
.login-school-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-school-logo img {
  width: 100%;
  height: auto;
}
.login-card h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--rgw-dark);
  margin-bottom: 0.35rem;
}
.login-card .subtitle {
  font-size: 13.5px;
  color: var(--rgw-muted);
  margin-bottom: 2rem;
  line-height: 1.5;
}
.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--rgw-text);
  margin-bottom: 0.4rem;
}
.form-group input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--rgw-border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--rgw-text);
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--rgw-dark);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,104,120,0.12);
}
.form-group input::placeholder { color: #aab8c2; }
.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--rgw-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.5rem;
}
.btn-primary:hover { background: var(--rgw-dark-hover); }
.login-hint {
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--rgw-light-bg);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--rgw-muted);
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  line-height: 1.5;
}
.login-hint svg { flex-shrink: 0; margin-top: 1px; }

/* ─── ERROR BANNER ─── */
.error-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #991b1b;
  font-size: 13.5px;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ─── SURVEY LAYOUT ─── */
.survey-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ─── STATUS BANNER ─── */
.status-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.1rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  font-size: 13.5px;
}
.status-banner.active {
  background: var(--rgw-mint-light);
  border: 1px solid var(--rgw-mint);
  color: #1a4a3a;
}
.status-banner .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rgw-mint-dark);
  flex-shrink: 0;
}
.status-banner strong { font-weight: 500; }

/* ─── USER ROW ─── */
.user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rgw-border);
}
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--rgw-light-bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--rgw-dark);
  flex-shrink: 0;
}
.user-info p { font-size: 14px; color: var(--rgw-muted); }
.user-info strong { font-size: 15px; color: var(--rgw-text); display: block; }
.user-class-badge {
  margin-left: auto;
  background: var(--rgw-gold-light);
  border: 1px solid #f0d060;
  color: #7a5800;
  font-size: 12px;
  font-weight: 500;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
}

/* ─── QUESTION BLOCK ─── */
.question-block {
  background: var(--rgw-white);
  border: 1px solid var(--rgw-border);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.question-num {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rgw-mint-dark);
  margin-bottom: 0.4rem;
}
.question-text {
  font-family: 'Source Serif 4', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--rgw-dark);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

/* ─── CHOICES GRID ─── */
.choices-grid {
  display: grid;
  gap: 0.75rem;
}
.choices-grid.two-col { grid-template-columns: 1fr 1fr; }
.choices-grid.one-col { grid-template-columns: 1fr; }
.choices-grid.four-opt { grid-template-columns: 1fr 1fr; }

/* ─── CHOICE CARD ─── */
.choice-card {
  border: 1.5px solid var(--rgw-border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: #fafbfc;
  text-decoration: none;
}
.choice-card:hover {
  border-color: var(--rgw-mint);
  background: var(--rgw-mint-light);
}
.choice-card.selected {
  border-color: var(--rgw-dark);
  background: var(--rgw-light-bg);
  box-shadow: 0 0 0 3px rgba(74,104,120,0.15);
}
.choice-radio {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--rgw-border);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.choice-card.selected .choice-radio {
  border-color: var(--rgw-dark);
  background: var(--rgw-dark);
}
.choice-card.selected .choice-radio::after {
  content: '';
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
}
.choice-label { font-size: 15px; font-weight: 500; color: var(--rgw-text); }
.choice-desc { font-size: 13px; color: var(--rgw-muted); margin-top: 2px; }

/* Large cards (Klasse 7) */
.choice-card.large {
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  align-items: flex-start;
}
.choice-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 0.25rem;
  background: var(--rgw-light-bg);
}
.choice-card.large .choice-label { font-size: 16px; }
.choice-card.large .choice-desc { font-size: 13px; line-height: 1.4; }

/* Hidden radio button (visually replaced by card) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── SUBMIT AREA ─── */
.submit-area {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.submit-note { font-size: 13px; color: var(--rgw-muted); }
.btn-submit {
  padding: 0.75rem 2rem;
  background: var(--rgw-dark);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.btn-submit:hover { background: var(--rgw-dark-hover); }

/* ─── CONFIRMATION ─── */
.confirm-box {
  background: var(--rgw-mint-light);
  border: 1.5px solid var(--rgw-mint);
  border-radius: 14px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.confirm-icon {
  width: 36px; height: 36px;
  background: var(--rgw-mint);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.confirm-box h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1a4a3a;
  margin-bottom: 0.3rem;
}
.confirm-box p { font-size: 14px; color: #2a5a4a; }

/* ─── SUMMARY CARD ─── */
.summary-card {
  background: var(--rgw-white);
  border: 1px solid var(--rgw-border);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
}
.summary-card h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rgw-muted);
  margin-bottom: 1rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  font-size: 14.5px;
  border-bottom: 1px solid #f0f4f6;
  gap: 1rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-row span:first-child { color: var(--rgw-muted); }
.summary-row span:last-child { font-weight: 500; color: var(--rgw-text); text-align: right; }

/* ─── CHANGE BUTTON ─── */
.btn-change {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  background: transparent;
  border: 1.5px solid var(--rgw-border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--rgw-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-change:hover {
  border-color: var(--rgw-dark);
  color: var(--rgw-dark);
  background: var(--rgw-light-bg);
}

/* ─── FOOTER ─── */
.site-footer {
  background: var(--rgw-dark);
  padding: 1rem 2.5rem;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
}
.site-footer a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.site-footer a:hover { color: rgba(255,255,255,0.85); }

/* ─── STAFF NAV ─── */
.staff-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-right: 1rem;
  margin-right: 0.75rem;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.staff-nav-link {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  padding: 0.3rem 0.9rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.staff-nav-link:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}
.staff-nav-link.active {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

/* ─── DEPUTAT TABLES ─── */
.deputat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.deputat-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rgw-muted);
  border-bottom: 1px solid var(--rgw-border);
  background: var(--rgw-bg);
}
.deputat-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--rgw-border);
  vertical-align: middle;
}
.deputat-table tr:last-child td { border-bottom: none; }
.deputat-table input[type="text"],
.deputat-table input[type="number"],
.deputat-table input[type="time"],
.deputat-table select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--rgw-border);
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--rgw-text);
  background: #fafbfc;
}
.deputat-table input:focus,
.deputat-table select:focus {
  outline: none;
  border-color: var(--rgw-dark);
  box-shadow: 0 0 0 2px rgba(74,104,120,0.12);
}
.deputat-table--full {
  border-radius: 0;
}

/* ─── FORM INPUTS (deputat) ─── */
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--rgw-border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--rgw-text);
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-group select:focus,
.form-group textarea:focus,
.form-group input[type="number"]:focus {
  border-color: var(--rgw-dark);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(74,104,120,0.12);
}

/* ─── CLASS LEADERSHIP TABLE ─── */
.cl-name { font-size: 14px; }
.cl-name--me { font-weight: 600; color: var(--rgw-mint-dark); margin-right: 0.5rem; }
.cl-name--other { color: var(--rgw-muted); }
.cl-name--locked { color: var(--rgw-muted); }
.cl-empty { color: var(--rgw-border); }
.btn-change--small {
  padding: 0.3rem 0.75rem;
  font-size: 13px;
}

/* ─── TEACHER HOME CARDS ─── */
.teacher-home-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--rgw-white);
  border: 1px solid var(--rgw-border);
  border-radius: 14px;
  padding: 1.75rem;
  text-decoration: none;
  color: var(--rgw-text);
  transition: border-color 0.15s;
}
.teacher-home-card:hover { border-color: var(--rgw-dark); }
.teacher-home-card__body { flex: 1; }
.teacher-home-card__title {
  font-family: 'Source Serif 4', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--rgw-dark);
  margin-bottom: 0.25rem;
}
.teacher-home-card__sub {
  font-size: 13px;
  color: var(--rgw-muted);
  margin-bottom: 0.65rem;
}
.teacher-home-card__badge {
  display: inline-block;
  font-size: 11.5px;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  background: var(--rgw-light-bg);
  color: var(--rgw-muted);
  border: 1px solid var(--rgw-border);
}
.teacher-home-card__badge--active {
  background: var(--rgw-mint-light);
  color: var(--rgw-mint-dark);
  border-color: var(--rgw-mint);
}
.teacher-home-card__arrow {
  flex-shrink: 0;
  color: var(--rgw-border);
  transition: color 0.15s;
}
.teacher-home-card:hover .teacher-home-card__arrow { color: var(--rgw-dark); }

/* ─── RESPONSIVE ─── */
@media (max-width: 560px) {
  .choices-grid.two-col,
  .choices-grid.four-opt { grid-template-columns: 1fr; }
  .login-card { padding: 1.75rem 1.5rem; }
  .submit-area { flex-direction: column; align-items: stretch; }
  .btn-submit { text-align: center; }
  .site-header { padding: 0 1rem; }
  .page-hero { padding: 1.5rem 1rem 1.25rem; }
  .survey-layout { padding: 1.5rem 1rem 3rem; }
}
