﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* === Globale Variablen === */
:root {
    --topbar-height: 3.5rem; /* statt 56px */
    --sidebar-width: 15rem; /* statt 240px */
    --content-padding: 1.5rem;
    --brand-color: #1B87E0;
}

/* === Base Styles === */
html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(to bottom, #e9ecef 0%, #ffffff 100%);
    overflow-x: hidden;
    height: 100%;
    font-size: 12px; /* Basisgröße für rem */
    line-height: 1.4; /* konsistent in allen Browsern */
}

/* === TopBar === */
.navbar, header.navbar, .topbar {
    height: var(--topbar-height);
    background-color: #fff !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    z-index: 1030;
}

/* === Layout-Struktur === */
.layout-root {
    padding-top: var(--topbar-height);
    height: 100vh;
    box-sizing: border-box;
}

.layout-main {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    height: calc(100vh - var(--topbar-height));
    overflow: auto;
    overflow-x: hidden;
    background: transparent;
}

/* Sidebar-Spalte */
.sidebar-panel {
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #fff;
    border-right: 0.0625rem solid #dee2e6; /* statt 1px */
    box-shadow: 0 0 0.625rem rgba(0,0,0,0.05); /* statt 10px */
    scrollbar-gutter: stable both-edges;
}

/* Content-Spalte */
.content-panel {
    min-width: 0;
    overflow: visible;
    background: transparent;
}

/* === Content-Bereich === */
.content {
    min-height: 100%;
    padding: var(--content-padding);
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0 0.75rem rgba(0,0,0,0.05); /* statt 12px */
    overflow-x: hidden;
}

/* === Layout Utilities === */
.bg-hero-blue {
    background-color: var(--brand-color);
}

.logo {
    max-width: 11.25rem; /* statt 180px */
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.session-sidebar {
    max-width: 15.625rem; /* statt 250px */
    width: 100%;
}

.diagnosis-panel {
    max-width: 18.75rem; /* statt 300px */
    width: 100%;
}

/* === Sidebar Basis === */
.sidebar {
    width: 100%;
    background-color: #fff;
    border-right: 0;
    box-shadow: none;
    transition: box-shadow 0.3s ease;
}
/* === Auth Pages === */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fa;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 25rem; /* statt 400px */
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
    padding: 2rem;
}

    .auth-card h3 {
        font-weight: 600;
        margin-bottom: 1.5rem;
    }

.input-group-sm > .form-control,
.input-group-sm > .form-select {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25;
}

.toggle-password {
    cursor: pointer;
}

/* === Links & Buttons === */
a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* === Validation === */
.valid.modified:not([type=checkbox]) {
    outline: 0.0625rem solid #26b050; /* statt 1px */
}

.invalid {
    outline: 0.0625rem solid red; /* statt 1px */
}

.validation-message {
    color: red;
}

/* === Blazor Error UI === */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -0.0625rem 0.125rem rgba(0,0,0,0.2);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,...) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.75rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

/* Differenz-Spalte Styling */
.table td.text-danger {
    background-color: #f8d7da;
}

.table td.text-success {
    background-color: #d4edda;
}

.table td.text-muted {
    background-color: #fdfdfe;
}

.table td {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* === Responsive: Mobile/Tablet === */
@media (max-width: 62em) {
    .layout-main {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .sidebar-panel {
        display: none;
    }

    .content {
        padding: 1rem;
    }
}
