:root {
    /* Himmelfarben - Sky colors */
    --sky-light: #E3F2FD;
    --sky-medium: #90CAF9;
    --sky-blue: #5DADE2;
    --sky-dark: #3498DB;
    
    /* Sandfarben - Sand colors */
    --sand-light: #FFF9E6;
    --sand-cream: #F5E6D3;
    --sand-beige: #E8D7B8;
    --sand-medium: #D4B896;
    
    /* Akzentfarben */
    --primary-color: #5DADE2;
    --secondary-color: #D4B896;
    --success-color: #A8D5BA;
    --danger-color: #E8A598;
    --warning-color: #F9D89C;
    --info-color: #90CAF9;
    --light-color: #FFF9E6;
    --dark-color: #5A5A5A;
    --text-color: #4A4A4A;
    --text-light: #7A7A7A;
}

html, body {
    font-family: 'Segoe UI', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 300;
    height: 100%;
    background-color: var(--sand-light);
    color: var(--text-color);
}

a, .btn-link {
    color: var(--sky-blue);
    font-weight: 300;
    text-decoration: none;
}

a:hover, .btn-link:hover {
    color: var(--sky-dark);
}

/* Fokus-Outline für nicht-interaktive Elemente entfernen */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus, p:focus,
h1:focus-visible, h2:focus-visible, h3:focus-visible, h4:focus-visible, h5:focus-visible, h6:focus-visible, p:focus-visible {
    outline: none !important;
}

.btn-primary {
    color: #fff;
    background-color: var(--sand-medium);
    border-color: var(--sand-medium);
    font-weight: 300;
}

.btn-primary:hover {
    background-color: var(--sand-beige);
    border-color: var(--sand-beige);
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.top-row {
    background: linear-gradient(135deg, var(--sky-light) 0%, var(--sand-cream) 100%);
    border-bottom: 1px solid rgba(93, 173, 226, 0.2);
    height: 4rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

main > div {
    padding: 2rem !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 200;
    letter-spacing: 0.5px;
    color: var(--sky-dark) !important;
}

.content {
    padding-top: 1.5rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success-color);
}

.invalid {
    outline: 1px solid var(--danger-color);
}

.validation-message {
    color: var(--danger-color);
    font-weight: 300;
    font-size: 0.875rem;
}

/* Cards */
.card {
    border: 1px solid rgba(93, 173, 226, 0.15);
    box-shadow: 0 2px 12px rgba(93, 173, 226, 0.08);
    margin-bottom: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card-header {
    background: linear-gradient(135deg, var(--sky-light) 0%, var(--sand-cream) 100%);
    border-bottom: 1px solid rgba(93, 173, 226, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0;
}

.card-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--sky-dark);
}

/* Hover Cards */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(93, 173, 226, 0.15);
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(93, 173, 226, 0.2) !important;
    border-color: var(--sky-blue);
}

/* Icon Circle */
.icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--sky-medium) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 2.5rem;
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.3);
}

/* Tables */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    font-weight: 400;
    background-color: var(--sand-cream);
    border-bottom: 2px solid var(--sand-medium);
    color: var(--text-color);
}

.table-hover tbody tr:hover {
    background-color: var(--sky-light);
}

.table td {
    font-weight: 300;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.5rem;
    font-weight: 300;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 173, 226, 0.25);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-secondary {
    background-color: var(--sand-medium);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--sand-beige);
}

/* Forms */
.form-control,
.form-select {
    border: 1px solid rgba(93, 173, 226, 0.3);
    border-radius: 8px;
    font-weight: 300;
    padding: 0.6rem 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 0.2rem rgba(93, 173, 226, 0.15);
}

.form-label {
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    font-weight: 300;
}

/* Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.25em;
    color: var(--sky-blue);
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 300;
    border-radius: 6px;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: var(--sand-cream);
    color: var(--danger-color);
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-weight: 300;
}

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

/* Page Title */
h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
    color: var(--text-color);
}

h1.display-4 {
    font-weight: 200;
    letter-spacing: 0.5px;
    color: var(--sky-dark);
}

.lead {
    font-weight: 300;
    color: var(--text-light);
}

.card-title {
    font-weight: 400;
    color: var(--text-color);
}

.card-text {
    font-weight: 300;
}

/* Responsive */
@media (max-width: 767.98px) {
    main > div {
        padding: 1rem !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--sand-light);
}

::-webkit-scrollbar-thumb {
    background: var(--sand-medium);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--sand-beige);
}

/* Sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    background-color: white;
    z-index: 1050;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--sand-beige);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--sand-light);
}

.sidebar-header h5 {
    margin: 0;
    color: var(--text-color);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

@media (max-width: 767.98px) {
    .sidebar {
        width: 100%;
    }
}
