/* ── Global base ─────────────────────────────────────── */

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

html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #111827;
    background: #f9fafb;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: #16a34a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

/* ── Placeholder pages ───────────────────────────────── */

.placeholder-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 40vh;
}

.placeholder-icon {
    margin-bottom: 1.5rem;
}

.placeholder-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
}

.placeholder-text {
    font-size: 0.9rem;
    color: #6b7280;
    max-width: 360px;
    margin: 0 auto 1.5rem;
}

.placeholder-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: #16a34a;
    color: #ffffff;
    border-radius: 7px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.placeholder-link:hover {
    background: #15803d;
    text-decoration: none;
}

/* ── Blazor error UI ─────────────────────────────────── */

#blazor-error-ui {
    color-scheme: light only;
    background: #fef3c7;
    border-top: 1px solid #fbbf24;
    bottom: 0;
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
    color: #92400e;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ── Loading progress ────────────────────────────────── */

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #16a34a;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: 600;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Wird geladen …");
}

/* ── Blazor error boundary ───────────────────────────── */

.blazor-error-boundary {
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    background: #dc2626;
    border-radius: 8px;
    margin: 1rem;
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten.";
}

/* ── Form validation ─────────────────────────────────── */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #16a34a;
}

.invalid {
    outline: 1px solid #dc2626;
}

.validation-message {
    color: #dc2626;
    font-size: 0.8rem;
}
