/*
|--------------------------------------------------------------------------
| Basis
|--------------------------------------------------------------------------
*/

:root {
    --bg: #f4f6fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #778196;
    --line: #e4e8f0;
    --primary: #1d4ed8;
    --primary-dark: #153eaa;
    --danger: #dc2626;
    --success: #15803d;
    --shadow: 0 20px 60px rgba(23, 32, 51, .10);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/*
|--------------------------------------------------------------------------
| Login
|--------------------------------------------------------------------------
*/

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, .18), transparent 34%),
        linear-gradient(135deg, #f8fbff, #eef3ff);
}

.login-card {
    width: min(420px, 100%);
    padding: 34px;
    border-radius: 28px;
    background: rgba(255, 255, 255, .88);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, .7);
    backdrop-filter: blur(18px);
}

.login-logo,
.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    font-weight: 900;
}

.login-card h1 {
    margin: 18px 0 6px;
}

.login-card p {
    margin: 0 0 22px;
    color: var(--muted);
}

/*
|--------------------------------------------------------------------------
| Formulare & Buttons
|--------------------------------------------------------------------------
*/

label {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(29, 78, 216, .14);
    border-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
}

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

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px 1fr;
}

.sidebar {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #101827;
    color: #fff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
}

.brand span {
    display: block;
    color: #aab5c8;
    font-size: 13px;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav a {
    padding: 12px 14px;
    color: #dbe5f6;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
}

.nav a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.powered {
    margin-top: auto;
    padding-top: 24px;
}

.powered a {
    color: #aab5c8;
    font-size: 13px;
}

/*
|--------------------------------------------------------------------------
| Hauptbereich
|--------------------------------------------------------------------------
*/

.main {
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 28px 34px;
    background: rgba(255, 255, 255, .72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.topbar h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
}

.topbar p {
    margin: 4px 0 0;
    color: var(--muted);
}

.userbox {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.userbox a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.content {
    padding: 34px;
}

/*
|--------------------------------------------------------------------------
| Komponenten
|--------------------------------------------------------------------------
*/

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.stat-card,
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 36px rgba(23, 32, 51, .06);
}

.stat-card {
    padding: 22px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-weight: 800;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 38px;
}

.panel {
    padding: 24px;
}

.panel h2 {
    margin: 0 0 10px;
}

.panel p {
    color: var(--muted);
}

.flash {
    margin: 20px 34px 0;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 800;
}

.flash-error {
    color: #991b1b;
    background: #fee2e2;
}

.flash-success {
    color: #166534;
    background: #dcfce7;
}

/*
|--------------------------------------------------------------------------
| Responsiv
|--------------------------------------------------------------------------
*/

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .content {
        padding: 22px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
