:root {
    --color-background: #ffffff;
    --color-surface: #ffffff;

    --color-text: #181818;
    --color-text-muted: #666666;

    --color-border: #dddddd;
    --color-border-strong: #c5c5c5;

    --color-primary: #1769aa;
    --color-primary-hover: #12558b;

    --color-success-background: #f1f8f4;
    --color-success-border: #b8d8c3;
    --color-success-text: #245c37;

    --color-error-background: #fff4f4;
    --color-error-border: #e4bcbc;
    --color-error-text: #8a2929;

    --page-width: 1100px;
    --content-width: 1000px;
    --form-width: 460px;

    --radius: 6px;
}


/* ---------------------------------------------------------
   Grundlayout
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    background: var(--color-background);
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    font-size: 16px;
    line-height: 1.55;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
h3 {
    color: var(--color-text);
    line-height: 1.2;
}

h1 {
    margin: 0 0 16px;
    font-size: 2rem;
    font-weight: 600;
}

h2 {
    margin-top: 32px;
    font-size: 1.4rem;
}


/* ---------------------------------------------------------
   Kopfbereich
   --------------------------------------------------------- */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.site-header-inner {
    width: min(var(--page-width), calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    color: var(--color-text);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.site-brand:hover {
    color: var(--color-text);
    text-decoration: none;
}


/* ---------------------------------------------------------
   Seiteninhalt
   --------------------------------------------------------- */

.page {
    width: min(var(--content-width), calc(100% - 40px));
    margin: 0 auto;
    padding: 48px 0 64px;
}


/* ---------------------------------------------------------
   Anmeldung / Registrierung
   --------------------------------------------------------- */

.auth-page {
    display: flex;
    justify-content: center;
    padding-top: 28px;
}

.auth-card {
    width: min(100%, var(--form-width));
}

.auth-heading {
    margin-bottom: 30px;
}

.auth-heading p {
    margin: 0;
    color: var(--color-text-muted);
}

.auth-footer {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--color-border);

    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


/* ---------------------------------------------------------
   Formulare
   --------------------------------------------------------- */

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

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

label {
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;

    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);

    background: #ffffff;
    color: var(--color-text);

    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    outline: 2px solid rgba(23, 105, 170, 0.15);
    outline-offset: 1px;
}


/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius);

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}

.button-primary {
    background: var(--color-primary);
    color: #ffffff;
}

.button-primary:hover {
    background: var(--color-primary-hover);
}

button:disabled,
.button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}


/* ---------------------------------------------------------
   Meldungen
   --------------------------------------------------------- */

.message {
    margin: 0 0 24px;
    padding: 12px 14px;

    border: 1px solid;
    border-radius: var(--radius);
}

.message-success {
    background: var(--color-success-background);
    border-color: var(--color-success-border);
    color: var(--color-success-text);
}

.message-error {
    background: var(--color-error-background);
    border-color: var(--color-error-border);
    color: var(--color-error-text);
}


/* ---------------------------------------------------------
   Bestehende Mailcheck-Anwendung
   --------------------------------------------------------- */

#status {
    margin: 20px 0;
    font-weight: bold;
}

.mail-result {
    border-top: 1px solid #aaaaaa;
    padding: 20px 0;
}

.mail-result:last-child {
    border-bottom: 1px solid #aaaaaa;
}

.risk-low,
.risk-medium,
.risk-high {
    font-weight: bold;
}

.reasons {
    margin-top: 8px;
}

.technical {
    margin-top: 12px;
    font-size: 0.9em;
}

.actions {
    margin-top: 30px;
}


/* ---------------------------------------------------------
   Kleine Bildschirme
   --------------------------------------------------------- */
.form-hint {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.button-secondary {
    background: #ffffff;
    color: var(--color-text);
    border-color: var(--color-border-strong);
}

.button-secondary:hover {
    background: #f6f6f6;
}

.secondary-action {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.secondary-action p {
    margin-top: 0;
    color: var(--color-text-muted);
}

.verification-code {
    max-width: 220px;
    font-size: 1.3rem;
    letter-spacing: 0.2em;
}

/* ---------------------------------------------------------
   Hauptanwendung
   --------------------------------------------------------- */

.app-page {
    width: 100%;
}

.app-heading {
    margin-bottom: 36px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}

.app-heading p {
    max-width: 650px;
    margin: 0;
    color: var(--color-text-muted);
}

.user-info {
    padding-top: 8px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.check-panel {
    padding: 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;

    border: 1px solid var(--color-border);
    border-radius: var(--radius);

    background: var(--color-surface);
}

.check-panel h2 {
    margin: 0 0 6px;
    font-size: 1.2rem;
}

.check-panel p {
    margin: 0;
    color: var(--color-text-muted);
}

.check-status {
    margin: 24px 0;
    font-weight: 600;
}

.check-results {
    margin-top: 24px;
}

.app-footer-actions {
    margin-top: 48px;
    padding-top: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border-top: 1px solid var(--color-border);
}

.app-footer-actions form {
    margin: 0;
}

.risk-dot {
    display: inline-block;
    width: 0.72em;
    height: 0.72em;
    margin: 0 0.18em 0 0.12em;

    border-radius: 50%;
    vertical-align: 0.02em;
}

.risk-low .risk-dot {
    background: #2e9d55;
}

.risk-medium .risk-dot {
    background: #d5a000;
}

.risk-high .risk-dot {
    background: #c83d3d;
}

@media (max-width: 600px) {
    .site-header-inner {
        width: min(100% - 28px, var(--page-width));
        min-height: 64px;
    }

    .page {
        width: min(100% - 28px, var(--content-width));
        padding-top: 32px;
    }

    .auth-page {
        padding-top: 8px;
    }

    h1 {
        font-size: 1.75rem;
    }
    .app-heading {
        flex-direction: column;
        gap: 12px;
    }

    .user-info {
        padding-top: 0;
        white-space: normal;
    }

    .check-panel {
        padding: 22px;
        flex-direction: column;
        align-items: stretch;
    }

    .check-panel .button {
        width: 100%;
    }
}
