body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #007cba;
    color: white;
    padding: 15px 0;
    margin-bottom: 30px;
}

header h1 {
    margin: 0;
    font-size: 1.8em;
}

header h1 a {
    color: white;
    text-decoration: none;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

nav ul li {
    display: inline;
    margin-right: 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline;
}

main {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #007cba;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    width: 100%;
    max-width: 500px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

.form-group .helptext {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    display: block;
}

.required-info {
    color: #d00;
    margin: 20px 0;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1em;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #005a87;
}

.btn-primary {
    background: #005a87;
}

.btn-primary:hover {
    background: #003d5f;
}

.submission-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.submission-table th,
.submission-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.submission-table th {
    background: #f4f4f4;
    font-weight: bold;
}

.submission-table tr:nth-child(even) {
    background: #f9f9f9;
}

.messages {
    margin-bottom: 20px;
}

.message {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.message.success {
    background: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.message.error {
    background: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

footer {
    margin-top: 50px;
    text-align: center;
    padding: 20px;
    background: #f4f4f4;
    color: #666;
    font-size: 0.9em;
}

footer a {
    color: #007cba;
    text-decoration: none;
}

/* Eingabefeld größer und schöner */
textarea.form-control {
    min-height: 220px;
    /* deutlich höher – vorher ca. 120px bei rows=6 */
    font-size: 1.1rem;
    /* etwas größerer Text */
    padding: 1rem;
    /* mehr Innenabstand */
    resize: vertical;
    /* User kann Höhe selbst ziehen */
}

/* Drop-Down-Menüs: bündig untereinander + gleiche Breite */
.form-select {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

/* Labels größer und fetter */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Mehr Luft um die Form */
.form-group {
    margin-bottom: 1.5rem;
}

/* Submit-Button größer */
.btn-primary.btn-lg {
    font-size: 1.2rem;
    padding: 0.75rem 1.5rem;
}

/* Responsive: Auf kleinen Bildschirmen alles untereinander */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1.25rem;
    }
}

/* Drop-Downs: linksbündig, gleiche Breite, bündig untereinander */
.style-select-group {
    max-width: 400px;
    /* oder 100% – je nach gewünschter Breite */
    margin: 0 auto;
    /* zentriert die Gruppe, falls gewünscht */
}

.style-select-group .form-label {
    text-align: left;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.style-select-group .form-select {
    width: 100%;
    /* volle Breite der Gruppe */
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

/* Mehr Abstand zwischen den Feldern */
.style-select-group .mb-4 {
    margin-bottom: 1.25rem !important;
}

/* Drop-Downs: perfekt linksbündig und bündig untereinander */
.style-dropdowns {
    max-width: 420px;
    /* feste Breite – passe an deine Seite an */
    margin: 0 auto;
    /* zentriert die ganze Gruppe, falls gewünscht */
}

.style-dropdowns .form-group {
    margin-bottom: 1.25rem;
    /* gleichmäßiger Abstand zwischen den Feldern */
    text-align: left;
    /* alles linksbündig */
}

.style-dropdowns .form-label {
    display: block;
    /* Label immer volle Breite */
    text-align: left;
    font-weight: 600;
    margin-bottom: 0.375rem;
}

.style-dropdowns .form-select {
    width: 100%;
    /* immer volle Breite des Containers */
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
}

#loading-overlay {
    backdrop-filter: blur(4px);
    /* Schöner Effekt, optional */
}

@media (max-width: 576px) {
    .style-dropdowns {
        max-width: 100%;
    }

    .form-label {
        font-size: 1rem;
    }
}

/* Eingabefeld fixieren – nie breiter als Container */
#id_text_input,
textarea.form-control {
    width: 100% !important;
    /* erzwingt volle Breite des Parents */
    max-width: 100%;
    /* verhindert Overflow */
    box-sizing: border-box;
    /* Padding + Border zählen zur Breite */
    overflow-x: hidden;
    /* kein horizontaler Scroll */
}

/* Container der Form nicht überlappen lassen */
.needs-validation,
form {
    max-width: 100%;
    overflow: hidden;
}

html,
body {
    overflow-x: hidden;
    /* kein horizontaler Scroll der Seite */
    width: 100%;
}

.result-text {
    white-space: pre-wrap;
    /* behält Leerzeichen & Umbrüche */
    word-wrap: break-word;
    /* lange Wörter brechen um */
    line-height: 1.6;
    /* angenehmer Zeilenabstand */
    font-size: 1.05rem;
}

.result-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.7;
    font-size: 1.05rem;
    min-height: 120px;
    /* falls Text sehr kurz ist */
}

.result-text hr {
    margin: 1rem 0;
}

/* ===========================
   CI-Machine Navigation – Plattform
   =========================== */

.ci-navbar {
    background-color: #0084c7 !important;
    min-height: 96px;
}

.ci-navbar .container {
    align-items: center;
}

.ci-navbar .navbar-brand.ci-brand {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.05;
    margin-right: 2rem;
    text-decoration: none;
}

.ci-navbar .ci-brand-title {
    display: block;
    color: #ffffff !important;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.ci-navbar .ci-brand-subtitle {
    display: block;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-top: 4px;
}

.ci-navbar .nav-link {
    color: #ffffff !important;
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.ci-navbar .nav-link:hover,
.ci-navbar .nav-link:focus {
    color: #ffffff !important;
    opacity: 0.85;
}

.ci-navbar #accountDropdown {
    font-weight: 700;
}

.ci-navbar .dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    padding: .5rem;
}

.ci-navbar .dropdown-item {
    border-radius: 8px;
    padding: .55rem .9rem;
}

.ci-navbar .dropdown-item:hover {
    background: #eef7fc;
}