/* Basic Typography & Body Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.5;
}

/* Absolute Center Spinner */
.loading {
    position: fixed;
    visibility: hidden;
    z-index: 999;
    height: 2em;
    width: 2em;
    overflow: visible;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Transparent Overlay */
.loading:before {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 999;

}

/* :not(:required) hides these rules from IE9 and below */
.loading:not(:required) { /* hide "loading..." text */
    font: 0/0 a;
    color: transparent;
    text-shadow: none;
    background-color: transparent;
    border: 0;
    visibility: hidden;
    margin: auto;
    z-index: 999;
    height: 2em;
    width: 2em;

}

.loading:not(:required):after {
    content: '';
    display: block;
    font-size: 10px;
    width: 1em;
    height: 1em;
    margin-top: -0.5em;
    -webkit-animation: spinner 1500ms infinite linear;
    -moz-animation: spinner 1500ms infinite linear;
    -ms-animation: spinner 1500ms infinite linear;
    -o-animation: spinner 1500ms infinite linear;
    animation: spinner 1500ms infinite linear;
    border-radius: 0.5em;
    -webkit-box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.5) -1.5em 0 0 0, rgba(0, 0, 0, 0.5) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0;
    box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) -1.5em 0 0 0, rgba(0, 0, 0, 0.75) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0;
}

/* Animation */
@-webkit-keyframes spinner {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@-moz-keyframes spinner {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@-o-keyframes spinner {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes spinner {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/* Skeleton Loading Screens */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 15px;
}

.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 10px;
}

.skeleton-text-short {
    height: 16px;
    width: 40%;
    margin-bottom: 10px;
}

.skeleton-button {
    height: 38px;
    width: 120px;
    display: inline-block;
    margin-right: 10px;
}

/* Modern Login Styles */
.login-card {
    max-width: 400px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.login-card .mb-4 {
    margin-bottom: 1.5rem !important;
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.form-signin .form-control {
    border-radius: 8px;
    padding: 12px 15px;
    height: auto;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-signin .form-control:focus {
    border-color: #004a99;
    box-shadow: 0 0 0 0.2rem rgba(0, 74, 153, 0.15);
}

.form-signin .btn-primary {
    padding: 12px;
    font-weight: 600;
    border-radius: 8px;
    background-color: #004a99;
    border: none;
    transition: background-color 0.2s;
}

.form-signin .btn-primary:hover {
    background-color: #003366;
}

.login-card .checkbox {
    text-align: left;
    margin-bottom: 20px;
}

.login-card .checkbox label {
    font-weight: normal;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.login-card .checkbox input {
    margin-top: 0;
    margin-right: 10px;
}

/* Fix for bootstrap-select in personal login */
#personal-login-container .bootstrap-select.form-control {
    border: none;
    padding: 0;
    margin-bottom: 15px;
}

#personal-login-container .bootstrap-select .dropdown-toggle {
    border-radius: 8px;
    padding: 12px 15px;
    height: auto;
    border: 1px solid #ddd;
    background-color: #fff;
}

/* Custom Badges for Duties - High Contrast */
.badge-pflicht {
    background-color: #d9534f;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.3em 0.8em;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(217, 83, 79, 0.2);
}

.badge-optional {
    background-color: #777;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.3em 0.8em;
    border-radius: 4px;
    text-transform: uppercase;
}
