/* ==========================================================================
   SchülerHD — Registrierung
   ========================================================================== */

:root {
    --blue-dark: #1f4485;
    --blue: #3b6cbf;
    --border: #b9c6dc;
    --border-soft: #dfe4ec;
    --panel: #f5f7fa;

    --bg: #dfe6f0;
    --text: #333;
    --text-muted: #666;
}

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

body {
    padding: 20px 12px;

    font-family: Verdana, Geneva, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);

    background: var(--bg);
}

.wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;

    background: white;
    border: 1px solid #7fa0d2;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(31, 68, 133, .15);
    overflow: hidden;
}

/* ---------- Header ---------- */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;

    padding: 12px 20px;

    color: white;
    background: linear-gradient(#5580c0, #1f4485);
    border-bottom: 1px solid #17346a;
}

.logo h1 {
    font-size: 28px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

.logo span {
    font-size: 11px;
    color: #d3e0f3;
}

nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

nav a {
    padding: 5px 10px;
    border-radius: 3px;

    font-size: 12px;
    font-weight: bold;
    color: white;
    text-decoration: none;

    transition: background .15s;
}

nav a:hover {
    background: rgba(255, 255, 255, .18);
    text-decoration: underline;
}

nav a:focus-visible {
    outline: 2px solid white;
    outline-offset: 1px;
}

/* ---------- Title bar ---------- */

.title {
    padding: 14px 20px;

    font-size: 24px;
    font-weight: bold;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .25);

    background: linear-gradient(#6d97d3, #4573b5);
    border-bottom: 1px solid #2c569c;
}

/* ---------- Layout ---------- */

.content {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
}

/* ---------- Form panel ---------- */

/* Flex column purely so the h2 can be pulled above the error alert — the
   markup emits the alert first, but the title bar has to sit on top. */
.register-box {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;

    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.register-box h2 {
    order: -1;
}

.register-box h2 {
    padding: 8px 12px;

    font-size: 15px;
    color: var(--blue-dark);

    background: linear-gradient(#d7e3f4, #c0d2ea);
    border-bottom: 1px solid var(--border);
}

form {
    padding: 20px;
}

.row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.row label {
    width: 170px;
    flex: 0 0 170px;

    font-size: 12px;
    font-weight: bold;
    color: #555;
}

.row input,
.row select {
    flex: 1;
    min-width: 0;
    padding: 7px 8px;

    font-family: inherit;
    font-size: 13px;
    color: var(--text);

    background: #fcfdfe;
    border: 1px solid #a8b6cc;
    border-radius: 3px;

    transition: border-color .15s, box-shadow .15s;
}

.row input:focus,
.row select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(59, 108, 191, .2);
}

/* :user-invalid (not :invalid) — the fields have no placeholder, so an
   :invalid rule would flag every empty required field on page load. */
.row input:user-invalid,
.row select:user-invalid {
    border-color: #c98b8b;
}

button {
    margin-top: 18px;
    margin-left: 170px;
    padding: 9px 24px;

    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    color: white;

    background: linear-gradient(#5b8ad0, #3b6cbf);
    border: 1px solid #2c569c;
    border-radius: 3px;
    cursor: pointer;

    transition: background .15s;
}

button:hover {
    background: linear-gradient(#4a79c4, #2e5aa8);
}

button:active {
    background: linear-gradient(#2e5aa8, #4a79c4);
}

button:focus-visible {
    outline: 2px solid var(--blue-dark);
    outline-offset: 1px;
}

/* ---------- Alerts ---------- */

.alert {
    margin: 15px 15px 0;
    padding: 10px 12px;

    font-size: 12px;
    line-height: 1.5;

    border: 1px solid;
    border-radius: 3px;
}

.alert.error {
    color: #9c2b2b;
    background: #fdf1f1;
    border-color: #e5a3a3;
}

/* ---------- Side boxes ---------- */

.side {
    width: 250px;
    flex: 0 0 250px;
}

.info,
.tip {
    margin-bottom: 15px;

    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.info h3,
.tip h3 {
    padding: 7px 10px;

    font-size: 13px;
    color: var(--blue-dark);

    background: linear-gradient(#d7e3f4, #c0d2ea);
    border-bottom: 1px solid var(--border);
}

.info ul {
    list-style: none;
    padding: 10px 12px;
}

.info li {
    padding: 5px 0;
    font-size: 12px;
    border-bottom: 1px dotted #d5dced;
}

.info li:last-child {
    border-bottom: none;
}

.tip p {
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ---------- Footer ---------- */

footer {
    padding: 12px 15px;
    text-align: center;

    background: #d3e0ef;
    border-top: 1px solid var(--border);
}

footer a {
    margin: 0 12px;
    font-size: 12px;
    color: var(--blue-dark);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
    .content {
        flex-direction: column;
        padding: 15px;
    }

    .side {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 560px) {
    body {
        padding: 0;
    }

    .wrapper {
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    header {
        padding: 12px 15px;
    }

    .title {
        font-size: 19px;
        padding: 12px 15px;
    }

    form {
        padding: 15px;
    }

    /* Label-above-field: the 170px label column doesn't fit a phone. */
    .row {
        flex-direction: column;
        align-items: stretch;
    }

    .row label {
        width: auto;
        flex: none;
        margin-bottom: 4px;
    }

    button {
        width: 100%;
        margin-left: 0;
    }
}
