/* =========================================================
   Elternsprechtag – Modernes Design
   ========================================================= */

:root {
    --green: #1d507f;
    --green-dark: #163e63;
    --green-light: #eaf2f8;
    --text: #1f2933;
    --muted: #68737d;
    --border: #dfe5eb;
    --background: #f3f6f9;
    --white: #ffffff;
    --danger-bg: #fff4f2;
    --danger: #c7463c;
    --shadow: 0 20px 60px rgba(29, 80, 127, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 10% 10%, rgba(29, 80, 127, 0.10), transparent 32%),
        radial-gradient(circle at 90% 90%, rgba(29, 80, 127, 0.08), transparent 30%),
        var(--background);
    line-height: 1.6;
}

button,
input {
    font: inherit;
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.card {
    width: min(100%, 760px);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: cardIn 0.45s ease-out;
}

.header {
    position: relative;
    text-align: center;
    padding: 42px 40px 34px;
    border-bottom: 1px solid var(--border);
}

.logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70px;
    margin-bottom: 22px;
}

.logo-wrap img {
    display: block;
    max-width: 260px;
    max-height: 90px;
    width: auto;
    height: auto;
}

.event-badge {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

h1 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.event-info {
    margin: 14px 0 0;
    color: var(--green);
    font-size: 1rem;
    font-weight: 700;
}

.content {
    padding: 38px 48px 42px;
}

.greeting {
    margin: 0 0 14px;
    font-size: 1.1rem;
    font-weight: 750;
}

.content > p:not(.greeting) {
    margin: 0;
    color: var(--muted);
}

.deadline {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 28px 0 32px;
    padding: 18px 20px;
    border: 1px solid rgba(199, 70, 60, 0.18);
    border-radius: 16px;
    background: var(--danger-bg);
}

.deadline-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    font-weight: 800;
}

.deadline strong {
    color: var(--danger);
}

.deadline p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.actions {
    display: grid;
    gap: 24px;
}

.actions form {
    margin: 0;
}

.btn {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 750;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px 0 24px;
    background: var(--green);
    color: white;
    box-shadow: 0 8px 20px rgba(29, 80, 127, 0.22);
    font-size: 1.05rem;
}

.btn-primary:hover {
    background: var(--green-dark);
    box-shadow: 0 12px 26px rgba(29, 80, 127, 0.28);
}

.arrow {
    font-size: 1.5rem;
    line-height: 1;
}

.teacher-section {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.teacher-label {
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.teacher-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.teacher-form .btn {
    width: auto;
    min-width: 220px;
    padding: 0 18px;
    white-space: normal;
}

.teacher-form input {
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: #fafcfe;
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.teacher-form input::placeholder {
    color: #9aa3aa;
}

.teacher-form input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(29, 80, 127, 0.10);
}

.btn-secondary {
    height: 52px;
    background: var(--text);
    color: white;
}

.btn-secondary:hover {
    background: #111820;
}

.footer {
    display: flex;
    justify-content: center;
    gap: 9px;
    padding: 20px 30px;
    background: #f7f9fc;
    color: var(--muted);
    font-size: 0.78rem;
}

.separator {
    opacity: 0.5;
}

/* Tastaturbedienung */
button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(29, 80, 127, 0.35);
    outline-offset: 2px;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smartphone */
@media (max-width: 600px) {
    .page {
        align-items: flex-start;
        padding: 16px 12px;
    }

    .card {
        border-radius: 18px;
    }

    .header {
        padding: 30px 22px 26px;
    }

    .logo-wrap {
        margin-bottom: 18px;
    }

    .logo-wrap img {
        max-width: 210px;
        max-height: 75px;
    }

    h1 {
        font-size: 1.65rem;
    }

    .content {
        padding: 28px 22px 30px;
    }

    .deadline {
        margin: 24px 0 28px;
        padding: 16px;
    }

    .teacher-form {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-wrap: wrap;
        text-align: center;
    }
}
/* Formularseite */

.form-hint {
    margin: -4px 0 28px;
    color: var(--muted);
}

.required-mark {
    color: var(--danger);
    font-weight: 800;
}

fieldset {
    min-width: 0;
    margin: 0 0 28px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
}

legend {
    padding: 0 8px;
    color: var(--green-dark);
    font-size: 1.1rem;
    font-weight: 800;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field label,
.teacher-row label {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
}

.form-field input,
.form-field select,
.teacher-row input,
.teacher-row select {
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    outline: none;
    background: #fafcfe;
    color: var(--text);
}

.form-field input:focus,
.form-field select:focus,
.teacher-row input:focus,
.teacher-row select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(29, 80, 127, 0.1);
}

.form-field small {
    color: var(--muted);
    font-size: 0.8rem;
}

.teacher-fields {
    display: grid;
    gap: 18px;
}

.teacher-row {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    align-items: center;
    gap: 10px;
}

.form-actions {
    margin-top: 8px;
}

.back-form {
    margin-top: 12px;
}

.back-form .btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
}

.back-form .btn:hover {
    background: var(--green-light);
    color: var(--green-dark);
}

/* Smartphone */

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-wide {
        grid-column: auto;
    }

    fieldset {
        padding: 17px;
    }

    .teacher-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .teacher-row label {
        margin-top: 4px;
    }
}

/* Terminauswahl */

.appointment-list {
    display: grid;
    gap: 16px;
    margin: 28px 0;
}

.appointment-row {
    display: grid;
    grid-template-columns: 110px minmax(180px, 1fr) 170px;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fafcfe;
}

.appointment-row label {
    font-weight: 750;
}

.appointment-required {
    border-color: rgba(29, 80, 127, 0.35);
    background: var(--green-light);
}

.appointment-select {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
}

.teacher-name {
    color: var(--muted);
    font-size: 0.9rem;
}

.no-teacher {
    grid-column: 2 / -1;
    color: var(--muted);
    font-size: 0.9rem;
}

.message {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 14px;
    font-weight: 700;
}

.message-error {
    border: 1px solid rgba(199, 70, 60, 0.2);
    background: var(--danger-bg);
    color: var(--danger);
}

@media (max-width: 600px) {
    .appointment-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .no-teacher {
        grid-column: auto;
    }

    .teacher-name {
        font-size: 0.85rem;
    }
}

/* Bestätigungsseite */

.message-success {
    border: 1px solid rgba(29, 80, 127, 0.25);
    background: var(--green-light);
    color: var(--green-dark);
}

.message-warning {
    border: 1px solid rgba(190, 130, 20, 0.3);
    background: #fff8e6;
    color: #765200;
}

.confirmation-box,
.warning-box {
    margin: 24px 0;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fafcfe;
}

.confirmation-box h2,
.warning-box h2 {
    margin-top: 0;
    color: var(--green-dark);
}

.booking-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.booking-item {
    padding: 16px;
    border-left: 4px solid var(--green);
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 3px 10px rgba(32, 67, 48, 0.06);
}

.booking-item h3 {
    margin: 0 0 8px;
    color: var(--green-dark);
}

.booking-item p {
    margin: 5px 0;
}

.notice {
    margin: 24px 0;
    padding: 18px;
    border-radius: 14px;
    background: var(--green-light);
    color: var(--text);
}

.notice p {
    margin: 8px 0 0;
}

.warning-box {
    border-color: rgba(190, 130, 20, 0.35);
    background: #fffdf5;
}

.warning-box p:last-child {
    margin-bottom: 0;
}

/* Smartphone */

@media (max-width: 600px) {
    .confirmation-box,
    .warning-box {
        padding: 17px;
    }

    .booking-item {
        padding: 14px;
    }
}

.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;
}



/* =========================================================
   Abgeschaltete Terminbuchung
   ========================================================= */

.shutdown-content {
    text-align: center;
    padding-top: 46px;
    padding-bottom: 50px;
}

.shutdown-icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green);
    font-size: 2rem;
    font-weight: 800;
}

.shutdown-content h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.2;
}

.shutdown-message {
    max-width: 520px;
    margin: 16px auto 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.shutdown-message strong {
    color: var(--green-dark);
}

.shutdown-subtext {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

@media (max-width: 600px) {
    .shutdown-content {
        padding-top: 34px;
        padding-bottom: 38px;
    }

    .shutdown-icon {
        width: 62px;
        height: 62px;
        font-size: 1.7rem;
    }
}

/* Adminbereich */

.seite {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 42px;
}

.karte {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dce5ed;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(35, 70, 45, 0.10);
}

.kopf {
    padding: 30px 36px 26px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff, #eef4f9);
    border-bottom: 1px solid #dce5ed;
}

.logo {
    display: block;
    max-width: 190px;
    max-height: 95px;
    margin: 0 auto 18px;
    object-fit: contain;
}

.gruenlinie {
    width: 100%;
    height: 4px;
    margin: 0 auto 24px;
    border-radius: 999px;
    background: #3d76a3;
}

.veranstaltung {
    margin: 0 0 8px;
    color: #1d507f;
    font-size: 0.82rem;
    font-weight: bold;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.untertitel {
    margin: 18px 0 0;
    color: #68737d;
    font-size: 1.35rem;
    font-weight: bold;
}

.inhalt {
    padding: 30px 36px 36px;
}

.bereich {
    margin: 0 0 28px;
    padding: 24px;
    border: 1px solid #dce5ed;
    border-radius: 14px;
    background: #fcfefd;
}

.bereich h2,
.bereich h3 {
    margin-top: 0;
    color: #1d507f;
}

.bereich h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.bereich h5 {
    margin: 18px 0 8px;
    color: #68737d;
    font-size: 0.92rem;
}

.beschreibung {
    color: #68737d;
}

.feldzeile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
}

.feldzeile label {
    min-width: 135px;
    font-weight: bold;
}

select,
input[type="text"] {
    min-height: 42px;
    padding: 9px 12px;
    color: #26323d;
    background: #ffffff;
    border: 1px solid #b9c9d8;
    border-radius: 8px;
    font: inherit;
}

select {
    min-width: 230px;
}

input[name="sql"] {
    width: min(100%, 760px);
}

select:focus,
input:focus {
    outline: 3px solid rgba(101, 176, 122, 0.25);
    border-color: #1d507f;
}

.aktion {
    min-height: 42px;
    padding: 10px 18px;
    color: #ffffff;
    background: #1d507f;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-weight: bold;
}

.aktion:hover {
    background: #163e63;
}

.warnung {
    margin: 14px 0 18px;
    padding: 12px 14px;
    color: #b42318;
    background: #fff1f0;
    border-left: 4px solid #b42318;
    border-radius: 7px;
    font-weight: bold;
}

.hinweis-rot {
    color: #b42318;
    font-weight: bold;
}

.abschluss {
    padding: 26px 36px 32px;
    text-align: center;
    background: #f7f9fc;
    border-top: 1px solid #dce5ed;
}

@media (max-width: 680px) {
    .seite {
        width: calc(100% - 18px);
        padding-top: 10px;
    }

    .kopf,
    .inhalt,
    .abschluss {
        padding-left: 18px;
        padding-right: 18px;
    }

    .bereich {
        padding: 18px;
    }

    .feldzeile {
        display: block;
    }

    .feldzeile label {
        display: block;
        min-width: 0;
        margin-bottom: 6px;
    }

    select,
    input[name="sql"] {
        width: 100%;
        min-width: 0;
    }

    .aktion {
        margin-top: 8px;
    }
}

.terminliste {
    display: grid;
    gap: 16px;
}

.termin-karte {
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #dce5ed;
    border-left: 5px solid #3d76a3;
    border-radius: 10px;
}

.termin-karte p {
    margin: 7px 0;
}

.termin-karte strong {
    color: #1d507f;
}

.navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.navigation form {
    margin: 0;
}

.termin-tabelle-wrapper {
    width: 100%;
    overflow-x: auto;
}

.termin-tabelle {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.95rem;
}

.termin-tabelle th,
.termin-tabelle td {
    padding: 11px 12px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #dce5ed;
}

.termin-tabelle th {
    color: #ffffff;
    background: #1d507f;
    font-weight: bold;
    white-space: nowrap;
}

.termin-tabelle tbody tr:nth-child(even) {
    background: #f1f6fa;
}

.termin-tabelle tbody tr:hover {
    background: #e6f0f7;
}

.termin-tabelle td:first-child {
    font-weight: bold;
    color: #1d507f;
}

.termin-tabelle td:nth-child(2),
.termin-tabelle td:nth-child(3),
.termin-tabelle td:last-child {
    white-space: nowrap;
}

.erfolg {
    padding: 14px 16px;
    color: #1b527f;
    background: #eaf2f8;
    border-left: 4px solid #1d507f;
    border-radius: 7px;
    font-weight: bold;
}

.navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.navigation form {
    margin: 0;
}

.statistik-gesamt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    color: #1b527f;
    background: #eaf2f8;
    border-left: 5px solid #1d507f;
    border-radius: 8px;
    font-size: 1.1rem;
}

.statistik-gesamt span {
    font-size: 1.5rem;
    font-weight: bold;
}

.export-info {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f1f6fa;
    border: 1px solid #dce5ed;
    border-radius: 8px;
}

.export-info ul {
    margin: 8px 0 16px;
}