/* Reset / Basis */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #1f2933;
}

/* Zentrierter Auth-Container (Login/Registrierung) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    padding: 32px 28px;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 12px;
}

.auth-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 14px;
    color: #6b7280;
}

/* Formulare */
.form-group {
    margin-bottom: 16px;
}

.label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
}

.input {
    width: 100%;
    padding: 10px 11px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.input::placeholder {
    color: #9ca3af;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.button-primary {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.35);
    width: 100%;
    margin-top: 6px;
}

.button-primary:hover {
    box-shadow: 0 7px 20px rgba(139, 92, 246, 0.45);
    transform: translateY(-1px);
}

.button-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.35);
}

/* Links */
a {
    color: #8b5cf6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Fehlermeldungen / Erfolg */
.alert {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Dashboard-Layout */
.dashboard-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
    background: #f3f4f6;
}

.sidebar {
    background: #111827;
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-right: 10px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
}

.sidebar-subtitle {
    font-size: 12px;
    color: #9ca3af;
}

.sidebar-nav {
    margin-top: 8px;
    flex: 1;
}

.sidebar-link {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #e5e7eb;
    margin-bottom: 4px;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background-color: #1f2937;
}

.sidebar-link-active {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.9), rgba(139, 92, 246, 0.9));
    color: #f9fafb;
}

.sidebar-footer {
    font-size: 12px;
    color: #6b7280;
    margin-top: 24px;
}

/* Content */
.main {
    padding: 20px 24px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.main-title {
    font-size: 20px;
    font-weight: 600;
}

.main-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

.user-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #111827;
    color: #e5e7eb;
    font-size: 13px;
}

.user-pill span {
    opacity: 0.9;
}

.user-pill small {
    font-size: 11px;
    color: #9ca3af;
    margin-left: 8px;
}

/* Karten im Dashboard */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, 0.08);
}

.card-title {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
}

.card-value {
    font-size: 20px;
    font-weight: 600;
}

.card-tag {
    font-size: 11px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    display: inline-block;
    margin-top: 4px;
}

/* Tabellen / Listen */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table th {
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success {
    background: #ecfdf3;
    color: #166534;
}

.badge-warning {
    background: #fffbeb;
    color: #92400e;
}

.badge-neutral {
    background: #f3f4f6;
    color: #374151;
}

/* Kleine Helfer */
.text-muted {
    color: #9ca3af;
    font-size: 12px;
}

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

/* Responsive */
@media (max-width: 768px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
    }

    .sidebar-link {
        margin-right: 8px;
    }

    .sidebar-footer {
        display: none;
    }
}