/**
 * Elev-app UI-pilot: fælles shell + weekendtilmelding (elev).
 * Kræver style.css (CSS-variabler). Ingen nyt framework.
 */

body.student-app-shell .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.student-app-shell {
  background: var(--bg-page);
  color: var(--text-primary);
}

body.student-app-shell .student-app-main {
  max-width: 42rem;
  margin: 0 auto;
  /* Halveret ift. standard --space-* (mere plads til menu/vagt/tabeller) */
  padding: 7px 10px 10px;
}

body.student-app-shell .student-app-nav {
  margin: 0 0 var(--space-md);
}

body.student-app-shell .student-app-nav a {
  color: var(--focus-ring);
  font-weight: 600;
  text-decoration: none;
}

body.student-app-shell .student-app-nav a:hover,
body.student-app-shell .student-app-nav a:focus {
  text-decoration: underline;
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

body.student-app-shell .student-app-header-subtitle {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: inherit;
  opacity: 0.92;
  text-align: center;
  z-index: 0;
}

/* Kort på elev-dashboard */
body.student-app-shell .student-app-card,
body.student-app-shell .card.student-app-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 10px;
  margin-bottom: 7px;
}

body.student-app-shell .student-app-card__title {
  margin: 0 0 5px;
  font-size: 1.25rem;
  line-height: 1.3;
}

body.student-app-shell .student-app-away-card__intro,
body.student-app-shell .student-app-away-card__active,
body.student-app-shell .student-app-away-card__deadline,
body.student-app-shell .student-app-away-card__count {
  margin: 0 0 8px;
  font-size: 0.95rem;
  line-height: 1.4;
}

body.student-app-shell .student-app-away-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

body.student-app-shell .student-app-away-list__title,
body.student-app-shell .student-app-away-form__title {
  margin: 12px 0 8px;
  font-size: 1.05rem;
}

body.student-app-shell .student-app-away-list__item {
  border: 1px solid var(--border-subtle, #e2e8f0);
  border-radius: var(--radius-md, 8px);
  padding: 10px 12px;
  margin-bottom: 8px;
}

body.student-app-shell .student-app-away-list__item.is-active {
  border-color: var(--btn-primary-border, #93c5fd);
}

body.student-app-shell .student-app-away-list__summary {
  margin: 0 0 6px;
  font-size: 0.95rem;
}

body.student-app-shell .student-app-away-list__locked {
  margin: 4px 0 0;
}

body.student-app-shell .student-app-away-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

body.student-app-shell .student-app-away-delete-form {
  display: inline;
  margin: 0;
}

body.student-app-shell .student-app-btn--danger {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

body.student-app-shell .away-from-school-elev-form label,
body.student-app-shell .away-from-school-form-fields label {
  display: block;
  margin-top: 8px;
  font-weight: 600;
}

body.student-app-shell .away-from-school-elev-form input[type="date"],
body.student-app-shell .away-from-school-elev-form input[type="time"],
body.student-app-shell .away-from-school-elev-form input.away-from-school-time-input,
body.student-app-shell .away-from-school-elev-form select,
body.student-app-shell .away-from-school-elev-form textarea,
body.student-app-shell .away-from-school-form-fields input[type="date"],
body.student-app-shell .away-from-school-form-fields input[type="time"],
body.student-app-shell .away-from-school-form-fields input.away-from-school-time-input,
body.student-app-shell .away-from-school-form-fields select,
body.student-app-shell .away-from-school-form-fields textarea {
  width: 100%;
  max-width: 20rem;
  margin-bottom: 4px;
}

body.student-app-shell .student-app-form-actions {
  margin-top: 12px;
}

/* Menu/vagt: mindre luft i indlejret .menuform og tabelceller */
body.student-app-shell .student-app-card .menuform {
  padding: 7px;
  margin: 0;
}

body.student-app-shell .student-app-card .h2_menu {
  font-size: 2.25rem;
  margin: 4px 0 6px;
  line-height: 1.1;
}

body.student-app-shell .card table td,
body.student-app-shell .card table th {
  padding: 2px 4px;
}

body.student-app-shell .card td.celleIndhold {
  height: auto;
  min-height: 1.75rem;
}

body.student-app-shell .student-app-weekend-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

body.student-app-shell .student-app-weekend-card__text {
  margin: 0 0 7px;
  line-height: 1.5;
}

body.student-app-shell .student-app-weekend-card__meta {
  margin: 0 0 7px;
  font-size: 0.9375rem;
  color: #475569;
}

/* Status */
body.student-app-shell .student-app-status {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.4;
}

body.student-app-shell .student-app-status--open {
  background: #dcfce7;
  color: #166534;
}

body.student-app-shell .student-app-status--closed {
  background: #f1f5f9;
  color: #475569;
}

body.student-app-shell .student-app-status--filled {
  background: #dbeafe;
  color: #1e40af;
}

body.student-app-shell .student-app-status--missing {
  background: #ffedd5;
  color: #c2410c;
}

body.student-app-shell .student-app-status--locked {
  background: #f1f5f9;
  color: #64748b;
}

body.student-app-shell .student-app-status--editable {
  background: #dcfce7;
  color: #166534;
}

body.student-app-shell .student-app-status--expired {
  background: #fee2e2;
  color: #991b1b;
}

body.student-app-shell .student-app-status--field {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
}

/* Weekend summary på elev-dashboard */
body.student-app-shell .student-app-summary-group-title {
  margin: 7px 0 5px;
  font-size: 1rem;
  font-weight: 700;
  color: #475569;
}

body.student-app-shell .student-app-summary-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  table-layout: auto;
  white-space: normal;
}

/* elev.css sætter max-width:0 på .card table td/th — bryder mobil-stacking */
body.student-app-shell .card .student-app-summary-table th,
body.student-app-shell .card .student-app-summary-table td,
body.student-app-shell .student-app-summary-table th,
body.student-app-shell .student-app-summary-table td {
  background-color: #fff;
  padding: 0.2rem 0.35rem;
  vertical-align: top;
  max-width: none;
  width: auto;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

body.student-app-shell .student-app-summary-table thead th {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 0.35rem;
}

body.student-app-shell .student-app-summary-table tbody th {
  text-align: left;
  font-weight: normal;
  padding-right: 0.5rem;
}

body.student-app-shell .student-app-summary-table tr:nth-child(even),
body.student-app-shell .student-app-summary-table tr:nth-child(odd),
body.student-app-shell .student-app-summary-table tr:hover {
  background-color: #fff;
}

body.student-app-shell .student-app-summary-value {
  font-weight: 600;
}

body.student-app-shell .student-app-summary-value.is-yes {
  color: #166534;
}

body.student-app-shell .student-app-summary-value.is-no {
  color: #475569;
}

body.student-app-shell .student-app-summary-value.is-choice {
  color: #1e3a5f;
}

body.student-app-shell .student-app-weekend-card__actions {
  margin-top: 7px;
}

body.student-app-shell .student-app-weekend-card__deadline-msg {
  margin: 0;
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

body.student-app-shell .student-app-weekend-status {
  margin: 0 0 var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md, 0.5rem);
  background: #f8fafc;
  border: 1px solid var(--border-soft, #e2e8f0);
}

body.student-app-shell .student-app-weekend-status__label {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
}

body.student-app-shell .student-app-weekend-status__intro {
  margin: var(--space-sm) 0 0;
  color: #475569;
  line-height: 1.45;
}

body.student-app-shell .student-app-weekend-status__parts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: var(--space-sm) 0 0;
  font-size: 0.9375rem;
}

body.student-app-shell .student-app-weekend-status__part {
  color: #64748b;
}

body.student-app-shell .student-app-weekend-status__part.is-done {
  color: #166534;
  font-weight: 600;
}

body.student-app-shell .student-app-weekend-status--ready {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

body.student-app-shell .student-app-weekend-status--ready .student-app-weekend-status__label {
  color: #166534;
}

body.student-app-shell .student-app-weekend-status--missing,
body.student-app-shell .student-app-weekend-status--missing-partial {
  background: #fff7ed;
  border-color: #fed7aa;
}

body.student-app-shell .student-app-weekend-status--missing .student-app-weekend-status__label,
body.student-app-shell .student-app-weekend-status--missing-partial .student-app-weekend-status__label {
  color: #c2410c;
}

body.student-app-shell .student-app-weekend-status--exempt {
  background: #eff6ff;
  border-color: #bfdbfe;
}

body.student-app-shell .student-app-weekend-status--exempt .student-app-weekend-status__label {
  color: #1e40af;
}

body.student-app-shell .student-app-weekend-status--locked {
  background: #f8fafc;
  border-color: #cbd5e1;
}

body.student-app-shell .student-app-weekend-summary {
  margin: 0 0 0.5rem;
}

body.student-app-shell .student-app-weekend-summary__row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 0.35rem 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
}

body.student-app-shell .student-app-weekend-summary__label,
body.student-app-shell .student-app-weekend-summary__value {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.4;
}

body.student-app-shell .student-app-weekend-summary__label {
  color: #334155;
  font-weight: 600;
}

body.student-app-shell .student-app-weekend-summary__value {
  text-align: right;
}

body.student-app-shell .student-app-weekend-summary__value.is-yes {
  color: #166534;
  font-weight: 700;
}

body.student-app-shell .student-app-weekend-summary__value.is-no {
  color: #64748b;
}

body.student-app-shell .student-app-weekend-section-status {
  margin: 0 0 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-md, 0.5rem);
  background: #f8fafc;
  border: 1px solid var(--border-soft, #e2e8f0);
}

body.student-app-shell .student-app-weekend-section-status__title {
  margin: 0 0 var(--space-sm);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}

body.student-app-shell .student-app-weekend-section-status__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

body.student-app-shell .student-app-weekend-section-status__item {
  margin: 0;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}

body.student-app-shell .student-app-weekend-section-status__item + .student-app-weekend-section-status__item {
  border-top: 1px solid var(--border-soft, #e2e8f0);
}

body.student-app-shell .student-app-weekend-section-status__label {
  font-weight: 700;
}

body.student-app-shell .student-app-weekend-section-status__item--open .student-app-weekend-section-status__hint {
  color: #166534;
}

body.student-app-shell .student-app-weekend-section-status__item--closed .student-app-weekend-section-status__hint {
  color: #64748b;
}

body.student-app-shell .student-app-weekend-long-period {
  margin: var(--space-lg) 0 var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md, 0.5rem);
  background: #fff;
  border: 1px dashed #cbd5e1;
}

body.student-app-shell .student-app-weekend-long-period__lead {
  margin: 0 0 0.35rem;
  font-weight: 700;
}

body.student-app-shell .student-app-weekend-long-period__hint {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #475569;
}

body.student-app-shell .student-app-weekend-radio-hint {
  margin: 0 0 0.65rem;
}

body.student-app-shell .student-app-weekend-long-period__link {
  font-weight: 600;
}

body.student-app-shell .student-app-form-section__number {
  color: #64748b;
  font-weight: 700;
  margin-right: 0.15rem;
}

body.student-app-shell .student-app-dashboard-card__body {
  line-height: 1.5;
}

body.student-app-shell .student-app-dashboard-subsection {
  margin-bottom: 7px;
}

body.student-app-shell .student-app-dashboard-subsection:last-child {
  margin-bottom: 0;
}

body.student-app-shell .student-app-dashboard-subtitle {
  margin: 0 0 5px;
  font-size: 1rem;
  font-weight: 600;
  color: #475569;
}

body.student-app-shell .student-app-dashboard-highlight {
  margin: 0 0 6px;
  padding: 0.5rem 0.65rem;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md, 4px);
  background: #eff6ff;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
  line-height: 1.4;
}

body.student-app-shell .student-app-duty-fold__today .student-app-dashboard-highlight,
body.student-app-shell .student-app-duty-fold__today .student-app-dashboard-empty,
body.student-app-shell .student-app-house-duty-fold__today .student-app-dashboard-highlight,
body.student-app-shell .student-app-house-duty-fold__today .student-app-dashboard-empty {
  margin: 0;
}

body.student-app-shell .student-app-fold__summary--duty,
body.student-app-shell .student-app-fold__summary--house-duty {
  display: block;
  padding: 0;
  font-weight: 400;
  color: inherit;
}

body.student-app-shell .student-app-duty-fold__cta,
body.student-app-shell .student-app-house-duty-fold__cta {
  display: block;
  margin-top: 0.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary, #1e293b);
  line-height: 1.35;
}

body.student-app-shell .student-app-fold__details--duty[open] .student-app-duty-fold__cta,
body.student-app-shell .student-app-fold__details--house-duty[open] .student-app-house-duty-fold__cta {
  display: none;
}

body.student-app-shell .student-app-duty-fold__week,
body.student-app-shell .student-app-house-duty-fold__week {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border-soft, #e2e8f0);
}

body.student-app-shell .student-app-house-duty-fold__day {
  margin: 0.5rem 0 0.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
}

body.student-app-shell .student-app-house-duty-fold__week .student-app-house-duty-fold__day:first-child {
  margin-top: 0;
}

body.student-app-shell .student-app-dashboard-empty,
body.student-app-shell .student-app-dashboard-card__body .staff-app-card__empty {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  color: #64748b;
}

body.student-app-shell .student-app-fold__details {
  margin: 6px 0 0;
}

body.student-app-shell .student-app-fold__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary, #1e293b);
  padding: 0.35rem 0;
  list-style: none;
}

body.student-app-shell .student-app-fold__summary::-webkit-details-marker {
  display: none;
}

body.student-app-shell .student-app-fold__details[open] .student-app-fold__summary {
  margin-bottom: 4px;
}

body.student-app-shell .student-app-fold__body .menuform {
  margin: 0;
}

body.student-app-shell .student-app-status-banner {
  padding: 7px;
  border-radius: var(--radius-md);
  margin-bottom: 7px;
  border: 1px solid var(--border-soft);
  line-height: 1.45;
}

body.student-app-shell .student-app-status-banner__label {
  margin: 0 0 0.35rem;
}

body.student-app-shell .student-app-status-banner__text {
  margin: 0;
  font-size: 0.9375rem;
  color: #475569;
}

body.student-app-shell .student-app-status-banner--open {
  background: #ecfdf5;
  border-color: #86efac;
}

body.student-app-shell .student-app-status-banner--closed {
  background: #f8fafc;
}

/* Knapper */
body.student-app-shell .student-app-btn {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.3;
}

body.student-app-shell .student-app-btn--primary {
  background: var(--btn-primary-bg);
  border-color: var(--btn-primary-border);
  color: var(--text-primary);
  min-height: 2.75rem;
}

body.student-app-shell .student-app-btn--secondary {
  background: var(--btn-secondary-bg);
  border-color: var(--btn-secondary-border);
  color: var(--text-primary);
}

body.student-app-shell .student-app-btn:hover,
body.student-app-shell .student-app-btn:focus {
  filter: brightness(0.97);
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

body.student-app-shell .student-app-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.student-app-shell .student-app-footer {
  margin-top: 10px;
  padding-top: 7px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}

/* Elev-header — samme grid som lærerappen (logo venstre, titel midt, ikoner højre) */
body.student-app-shell #header-block,
body.student-app-shell .student-app-header {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.5rem;
  row-gap: 0.35rem;
  max-width: 52rem;
  margin: 0 auto;
  padding: calc(0.45rem + env(safe-area-inset-top, 0px)) 10px 0.55rem;
  text-align: center;
  box-sizing: border-box;
}

body.student-app-shell .student-app-header__logo,
body.student-app-shell #logo-header.student-app-header__logo,
body.student-app-shell #logo-header {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  justify-self: start;
  float: none;
  display: block;
  width: auto;
  max-width: 4.5rem;
  max-height: 3.75rem;
  height: auto;
  object-fit: contain;
  margin: 0;
  padding: 0;
  cursor: pointer;
  z-index: 1;
}

body.student-app-shell .student-app-header__logo-spacer {
  grid-column: 1;
  grid-row: 1 / -1;
  display: none;
}

body.student-app-shell .student-app-header__school,
body.student-app-shell #h2 {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0;
  padding: 0;
  float: none;
  font-size: clamp(1.7rem, 6.5vw, 2.5rem);
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  z-index: 0;
}

body.student-app-shell .student-app-header__actions {
  grid-column: 3;
  grid-row: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  align-self: center;
  justify-self: end;
  z-index: 1;
}

body.student-app-shell #sub {
  visibility: hidden;
  position: static;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  max-width: 3.25rem;
  max-height: 3.25rem;
  object-fit: contain;
  cursor: pointer;
}

body.student-app-shell #fravaerIndikator {
  position: relative;
  float: none;
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
}

body.student-app-shell #fravaerIndikator img[id$="Fravaer"],
body.student-app-shell #fravaerIndikator #sortFravaer {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: auto !important;
  height: 3.25rem !important;
  width: auto !important;
  max-width: 3.25rem;
}

body.student-app-shell #tjekBillede {
  position: absolute !important;
  top: auto !important;
  bottom: 0 !important;
  right: 0 !important;
  height: 1.5rem !important;
  width: auto !important;
}

/* Weekendtilmelding: fraværsikoner skjules ikke længere — push-chrome på alle elev-sider */

body.student-app-shell .student-app-push-message {
  max-width: 42rem;
  margin: var(--space-sm) auto;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  font-size: 0.9375rem;
  color: #475569;
  min-height: 0;
}

body.student-app-shell .student-app-push-message:empty {
  display: none;
}

body.student-app-shell.student-app-weekend-page .student-app-page-intro {
  margin-bottom: 7px;
}

body.student-app-shell.student-app-weekend-page .student-app-page-intro h2 {
  margin: 0 0 var(--space-xs);
  font-size: 1.35rem;
}

body.student-app-shell.student-app-weekend-page .student-app-page-intro p {
  margin: 0;
  color: #475569;
}

body.student-app-shell.student-app-weekend-page .student-app-page-intro__meta {
  font-weight: 600;
}

body.student-app-shell.student-app-weekend-page .student-app-page-intro__hint {
  margin-top: var(--space-xs);
  font-size: 0.9375rem;
  line-height: 1.45;
}

body.student-app-shell .student-app-nav__back {
  display: inline-block;
  padding: 0.35rem 0;
}

body.student-app-shell #beskedBox {
  margin-bottom: 7px;
}

body.student-app-shell #student-app-push-open-notice.student-app-push-notice {
  margin: 0 0 7px;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: #eff6ff;
  border: 1px solid #93c5fd;
  line-height: 1.45;
  transition: opacity 0.35s ease;
}

body.student-app-shell #student-app-push-open-notice.student-app-push-notice.is-hiding {
  opacity: 0;
}

body.student-app-shell #student-app-push-open-notice .student-app-push-notice__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: #1e3a8a;
}

body.student-app-shell #student-app-push-open-notice .student-app-push-notice__body {
  margin: 0;
  color: #1e40af;
}

body.student-app-shell .student-app-legacy-actions {
  margin-top: 7px;
}

body.student-app-shell .student-app-legacy-actions button {
  min-height: 2.75rem;
  padding: 0.65rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--btn-secondary-border);
  background: var(--btn-secondary-bg);
  cursor: pointer;
}

body.student-app-shell .student-app-flash {
  padding: 7px;
  border-radius: var(--radius-md);
  margin-bottom: 7px;
  line-height: 1.45;
}

body.student-app-shell .student-app-flash--ok {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #86efac;
}

body.student-app-shell .student-app-flash--auto-dismiss {
  transition: opacity 0.45s ease;
}

body.student-app-shell .student-app-flash--auto-dismiss.is-hiding {
  opacity: 0;
}

body.student-app-shell .student-app-flash--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

body.student-app-shell .student-app-flash--warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

body.student-app-shell .student-app-section-error {
  margin: 0;
  padding: 7px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  line-height: 1.45;
}

body.student-app-shell .student-app-section-error--header {
  margin: 0 0 7px;
}

body.student-app-shell .student-app-form-section {
  margin-bottom: 10px;
}

body.student-app-shell .student-app-form-section > h2 {
  margin: 0 0 7px;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 3px;
}

body.student-app-shell .student-app-fieldset,
body.student-app-shell.weekend-signup-pilot-layout .weekend-signup-pilot-day,
body.student-app-shell.weekend-signup-pilot-layout .weekend-signup-pilot-overnights {
  margin: 0 0 7px;
  padding: 7px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--bg-card, #fff);
}

body.student-app-shell .student-app-fieldset:disabled {
  opacity: 0.75;
}

body.student-app-shell .student-app-fieldset legend {
  font-weight: 700;
  padding: 0 var(--space-xs);
}

/* style.css sætter ul { background: #054c9b } til topnav — neutraliser i elev-app */
body.student-app-shell ul {
  background: transparent;
  overflow: visible;
}

body.student-app-shell .student-app-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  background: transparent;
}

/* Weekend-formular: dage og valg side om side (typisk 3 kolonner) */
body.student-app-shell .student-app-days-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  align-items: start;
}

body.student-app-shell .student-app-days-grid .student-app-fieldset {
  margin-bottom: 0;
  min-width: 0;
}

/* Måltider: lodret i hver dag; overnatning: tre kolonner side om side */
body.student-app-shell .student-app-checklist--meals {
  grid-template-columns: 1fr;
}

body.student-app-shell .weekend-signup-pilot-overnights .student-app-checklist {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.student-app-shell.student-app-weekend-page .student-app-checklist--meals .student-app-check label {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  min-height: 2.25rem;
  font-size: 0.875rem;
}

body.student-app-shell.student-app-weekend-page .weekend-signup-pilot-overnights .student-app-check label {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.35rem 0.4rem;
  min-height: 0;
  font-size: 0.8125rem;
}

body.student-app-shell.student-app-weekend-page .student-app-fieldset legend {
  font-size: 0.875rem;
  width: 100%;
}

body.student-app-shell.student-app-weekend-page .student-app-status--field {
  font-size: 0.625rem;
  padding: 0.08rem 0.3rem;
}

body.student-app-shell .student-app-checklist li {
  margin: 0;
}

body.student-app-shell .student-app-check label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: #fafafa;
  cursor: pointer;
  min-height: 2.75rem;
}

body.student-app-shell .student-app-check--locked label {
  background: #f8fafc;
  cursor: not-allowed;
  opacity: 0.92;
}

body.student-app-shell .student-app-check__text {
  flex: 1 1 auto;
  min-width: 0;
}

body.student-app-shell .student-app-check label:has(input:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

body.student-app-shell .student-app-check input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  accent-color: var(--focus-ring);
}

body.student-app-shell .student-app-form-actions {
  margin-top: var(--space-lg);
}

body.student-app-shell .student-app-hint {
  margin: var(--space-md) 0 0;
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.45;
}

body.student-app-shell .student-app-form-actions .weekend-signup-pilot-submit,
body.student-app-shell .student-app-form-actions .student-app-btn--primary {
  width: 100%;
  max-width: 20rem;
}

@media (max-width: 600px) {
  body.student-app-shell .student-app-main {
    padding-left: 7px;
    padding-right: 7px;
  }

  body.student-app-shell .student-app-card,
  body.student-app-shell .card.student-app-card {
    padding: 6px;
    margin-bottom: 6px;
  }

  body.student-app-shell .student-app-card .menuform {
    padding: 5px;
  }

  body.student-app-shell #h2 {
    font-size: 1.75rem;
  }

  /* Tre kolonner (Valg | Svar | Status) — ikke stablet én kolonne */
  body.student-app-shell .card .student-app-summary-table,
  body.student-app-shell .student-app-summary-table {
    display: table;
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    font-size: 0.875rem;
    white-space: normal;
  }

  body.student-app-shell .student-app-summary-table thead {
    display: table-header-group;
  }

  body.student-app-shell .student-app-summary-table tbody {
    display: table-row-group;
  }

  body.student-app-shell .student-app-summary-table tr {
    display: table-row;
  }

  body.student-app-shell .card .student-app-summary-table th,
  body.student-app-shell .card .student-app-summary-table td,
  body.student-app-shell .student-app-summary-table th,
  body.student-app-shell .student-app-summary-table td {
    display: table-cell;
    max-width: none;
    white-space: normal;
    vertical-align: middle;
    padding: 0.4rem 0.25rem;
    border-bottom: 1px solid var(--border-soft);
  }

  body.student-app-shell .student-app-summary-table thead th:first-child,
  body.student-app-shell .student-app-summary-table tbody th {
    width: 46%;
    font-weight: 600;
  }

  body.student-app-shell .student-app-summary-table thead th:nth-child(2),
  body.student-app-shell .student-app-summary-table tbody td:nth-child(2) {
    width: 22%;
  }

  body.student-app-shell .student-app-summary-table thead th:nth-child(3),
  body.student-app-shell .student-app-summary-table tbody td:nth-child(3) {
    width: 32%;
  }

  body.student-app-shell .student-app-summary-table td[data-label]::before {
    content: none;
  }

  body.student-app-shell .student-app-summary-table .student-app-status--field {
    font-size: 0.6875rem;
    padding: 0.12rem 0.4rem;
  }

  body.student-app-shell .student-app-btn,
  body.student-app-shell .student-app-form-actions .student-app-btn--primary {
    width: 100%;
    max-width: none;
  }

  body.student-app-shell .student-app-dashboard-subsection table {
    min-width: 0;
    width: 100%;
  }

  body.student-app-shell .student-app-days-grid {
    grid-template-columns: 1fr;
  }

  body.student-app-shell .weekend-signup-pilot-overnights .student-app-checklist {
    grid-template-columns: 1fr;
  }

  body.student-app-shell #header-block,
  body.student-app-shell .student-app-header {
    grid-template-columns: 3rem 1fr auto;
    column-gap: 0.35rem;
    row-gap: 0.15rem;
    padding: calc(0.35rem + env(safe-area-inset-top, 0px)) 0.25rem 0.5rem;
    min-height: 3.5rem;
  }

  body.student-app-shell .student-app-header__logo,
  body.student-app-shell #logo-header {
    max-width: 2.75rem;
    max-height: 2.75rem;
  }

  body.student-app-shell .student-app-header__school,
  body.student-app-shell #h2 {
    font-size: 1.35rem;
    line-height: 1.15;
  }

  body.student-app-shell .student-app-header-subtitle {
    font-size: 0.875rem;
  }

  body.student-app-shell #sub {
    width: 2.75rem;
    height: 2.75rem;
    max-width: 2.75rem;
    max-height: 2.75rem;
  }

  body.student-app-shell #fravaerIndikator {
    width: 2.75rem;
    height: 2.75rem;
  }

  body.student-app-shell #fravaerIndikator img[id$="Fravaer"],
  body.student-app-shell #fravaerIndikator #sortFravaer {
    height: 2.75rem !important;
    max-width: 2.75rem;
  }

  body.student-app-shell #tjekBillede {
    height: 1.35rem !important;
  }
}

body.student-app-shell .weekend-sleep-other-wrap {
  margin: 0.5rem 0 0;
}

body.student-app-shell .weekend-sleep-other-wrap--hidden {
  display: none;
}

body.student-app-shell .weekend-sleep-other-text {
  width: 100%;
  box-sizing: border-box;
}

/* Push: afvist notifikation / vejledning (elev.php) */
body.student-app-shell .student-app-push-notice-mount:not([hidden]) {
  display: block;
  margin-bottom: 7px;
}

body.student-app-shell .student-app-push-denied {
  margin-bottom: 0;
}

body.student-app-shell .student-app-push-denied__lead {
  margin: 0 0 0.5rem;
  line-height: 1.45;
}

body.student-app-shell .student-app-push-denied__details {
  margin: 0;
}

body.student-app-shell .student-app-push-denied__summary {
  cursor: pointer;
  font-weight: 600;
  color: inherit;
  line-height: 1.4;
  list-style: none;
}

body.student-app-shell .student-app-push-denied__summary::-webkit-details-marker {
  display: none;
}

body.student-app-shell .student-app-push-denied__summary::before {
  content: "▸ ";
}

body.student-app-shell .student-app-push-denied__details[open] .student-app-push-denied__summary::before {
  content: "▾ ";
}

body.student-app-shell .student-app-push-denied__guide {
  margin-top: 0.5rem;
  padding-top: 0.25rem;
}

body.student-app-shell .student-app-push-denied__steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
  list-style: decimal;
}

body.student-app-shell .student-app-push-denied__steps li {
  float: none;
  display: list-item;
  width: auto;
  font-size: inherit;
}

body.student-app-shell .student-app-push-denied__steps li + li {
  margin-top: 0.35rem;
}

/* PWA: installér appen (browser) */
body.student-app-shell .student-app-pwa-install-mount:not([hidden]) {
  display: block;
  margin-bottom: 7px;
}

body.student-app-shell .student-app-pwa-install {
  margin: 0;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  background: #eff6ff;
  border: 1px solid #93c5fd;
  line-height: 1.45;
}

body.student-app-shell .student-app-pwa-install__lead {
  margin: 0 0 0.5rem;
  color: #1e3a8a;
}

body.student-app-shell .student-app-pwa-install__details {
  margin: 0;
}

body.student-app-shell .student-app-pwa-install__summary {
  cursor: pointer;
  font-weight: 600;
  color: #1e40af;
  line-height: 1.4;
  list-style: none;
}

body.student-app-shell .student-app-pwa-install__summary::-webkit-details-marker {
  display: none;
}

body.student-app-shell .student-app-pwa-install__summary::before {
  content: "▸ ";
}

body.student-app-shell .student-app-pwa-install__details[open] .student-app-pwa-install__summary::before {
  content: "▾ ";
}

body.student-app-shell .student-app-pwa-install__guide {
  margin-top: 0.5rem;
  padding-top: 0.25rem;
  color: #1e40af;
}

body.student-app-shell .student-app-pwa-install__steps {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.5;
  list-style: decimal;
}

body.student-app-shell .student-app-pwa-install__steps li {
  float: none;
  display: list-item;
  width: auto;
  font-size: inherit;
}

body.student-app-shell .student-app-pwa-install__steps li + li {
  margin-top: 0.35rem;
}

body.student-app-shell .student-app-pwa-install__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

body.student-app-shell .student-app-pwa-install__actions .student-app-btn {
  flex: 1 1 auto;
  min-width: 8rem;
}

body.student-app-shell .student-app-pwa-install__actions--solo .student-app-btn {
  width: 100%;
}

/* Samlet onboarding (fase D3) */
body.student-app-shell .student-app-onboarding-mount:not([hidden]) {
  margin: 0 0 0.65rem;
}

body.student-app-shell .student-app-onboarding {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md, 0.5rem);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

body.student-app-shell .student-app-onboarding__title {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

body.student-app-shell .student-app-onboarding__step + .student-app-onboarding__step {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #bfdbfe;
}

body.student-app-shell .student-app-onboarding__step--blocked {
  opacity: 0.72;
}

body.student-app-shell .student-app-onboarding__step-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
}

body.student-app-shell .student-app-onboarding__step-counter {
  font-weight: 600;
  color: #475569;
  font-size: 0.85rem;
}

body.student-app-shell .student-app-onboarding__step-lead {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

body.student-app-shell .student-app-onboarding__step-lead--muted {
  color: #475569;
}

body.student-app-shell .student-app-onboarding__step-lead--warn {
  color: #b45309;
}

body.student-app-shell .student-app-onboarding__details {
  margin: 0 0 0.5rem;
}

body.student-app-shell .student-app-onboarding__summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--focus-ring, #2563eb);
  list-style: none;
}

body.student-app-shell .student-app-onboarding__summary::-webkit-details-marker {
  display: none;
}

body.student-app-shell .student-app-onboarding__summary::before {
  content: '▸ ';
}

body.student-app-shell .student-app-onboarding__details[open] .student-app-onboarding__summary::before {
  content: '▾ ';
}

body.student-app-shell .student-app-onboarding__guide {
  margin-top: 0.45rem;
  padding: 0.45rem 0.55rem;
  background: #fff;
  border-radius: var(--radius-md, 0.5rem);
  border: 1px solid #dbeafe;
}

body.student-app-shell .student-app-onboarding__steps {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

body.student-app-shell .student-app-onboarding__steps li + li {
  margin-top: 0.35rem;
}

body.student-app-shell .student-app-onboarding__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

body.student-app-shell .student-app-onboarding__actions .student-app-btn {
  flex: 1 1 auto;
  min-width: 8rem;
}

/* Elev-login (fase C) */
body.student-app-login {
  min-height: 100vh;
  margin: 0;
  background: #d2dbe6;
}

body.student-app-login .student-app-login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  box-sizing: border-box;
}

body.student-app-login .student-app-login-card {
  width: 100%;
  max-width: 22rem;
  margin: 0;
}

body.student-app-login .student-app-login-brand {
  text-align: center;
  margin-bottom: 0.75rem;
}

body.student-app-login .student-app-login-title {
  margin: 0.5rem 0 0.15rem;
  font-size: 1.25rem;
  line-height: 1.25;
}

body.student-app-login .student-app-login-lead {
  margin: 0;
  color: #475569;
  font-size: 0.9375rem;
}

body.student-app-login .student-app-login-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

body.student-app-login .student-app-login-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

body.student-app-login .student-app-login-label {
  font-size: 0.875rem;
  font-weight: 600;
}

body.student-app-login .student-app-login-field input[type="text"],
body.student-app-login .student-app-login-field input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border-soft, #cbd5e1);
  border-radius: var(--radius-md, 6px);
  font-size: 1rem;
}

body.student-app-login .student-app-login-show-pw {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: #475569;
}

body.student-app-login .student-app-form-actions {
  margin-top: 0.25rem;
}

body.student-app-login .student-app-form-actions .student-app-btn--primary {
  width: 100%;
  max-width: none;
}
