/* Grundlayout und Kopfbereich des Ticketformulars. */

.ticket-create {
    color: #1A1D32;
    margin-bottom: 48px;
}

.ticket-create-heading {
    margin-bottom: 28px;
}

.ticket-create-eyebrow {
    font-size: .75rem;
    letter-spacing: .12em;
    font-weight: 700;
}

.ticket-create-heading h1 {
    margin: 10px 0 16px;
    font-weight: 700;
}

.ticket-create-heading .lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: #5c6070;
    max-width: none;
}

.ticket-create-heading hr, .ticket-create-form > hr {
    display: none;
}

/* Pflichtfelder und gegliederte Formularabschnitte. */

.ticket-required-note {
    font-size: .85rem;
    color: #5c6070;
    margin-bottom: 16px;
}

.ticket-form-section {
    min-width: 0;
    padding: 26px;
    margin-bottom: 24px;
    border: 1px solid #d5e9ec;
    border-top: 4px solid #32AEBE;
    border-radius: 16px;
    background: white;
    box-shadow: 0 3px 12px #1a1d3208;
}

.ticket-form-section legend {
    float: none;
    width: auto;
    padding: 0 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1A1D32;
}

.ticket-form-section legend > span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    margin-right: 8px;
    background: #32AEBE;
    color: #1A1D32;
    font-size: .9rem;
}

.ticket-form-section legend small {
    font-size: .75rem;
    font-weight: 400;
    margin-left: 6px;
    color: #5c6070;
}

/* Eingabefelder, Hilfetexte und Fokusmarkierung. */

.ticket-create .form-control, .ticket-create .form-select {
    border-color: #cbd6da;
    border-radius: 9px;
    padding: 11px 14px;
    color: #1A1D32;
    background-color: #f8fbfc;
}

.ticket-create .form-select {
    padding-right: 40px;
}

.ticket-create .form-control:focus, .ticket-create .form-select:focus {
    background-color: white;
    border-color: #32AEBE;
    box-shadow: 0 0 0 3px #32aebe26;
}

.ticket-create .form-text {
    display: block;
    margin-top: 8px;
    font-size: .8rem;
    line-height: 1.6;
}

.ticket-create .col-form-label {
    font-size: .9rem;
}

.ticket-required {
    color: #E41F20;
    margin-left: 3px;
}

/* Optionaler Bildupload mit Amber-Akzent. */

.ticket-upload-section {
    border-top-color: #FFBD2E;
    background: #fffdf6;
}

.ticket-upload-section legend > span {
    background: #FFBD2E;
}

.ticket-create input[type="file"] {
    background: white;
}

.ticket-create input[type="file"]::file-selector-button {
    background: #FFBD2E;
    color: #1A1D32;
    font-weight: 600;
    border: 0;
}

.ticket-create textarea {
    min-height: 160px;
    resize: vertical;
}

/* Abschlussbereich und Absenden-Button. */

.ticket-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.ticket-form-actions p {
    margin: 0;
    color: #5c6070;
    font-size: .9rem;
}

.ticket-create .ticket-submit {
    background: #1A1D32;
    border: 1px solid #1A1D32;
    color: white;
    border-radius: 9px;
    padding: 12px 22px;
    font-weight: 600;
}

.ticket-create .ticket-submit:hover {
    background: #32AEBE;
    border-color: #32AEBE;
    color: #1A1D32;
}

.ticket-create .ticket-submit:focus-visible {
    outline: 3px solid #32AEBE;
    outline-offset: 3px;
    box-shadow: none;
}

/* Vorgeschaltete Eingabe der dienstlichen E-Mail-Adresse. */

.ticket-email-step {
    background: #f5fafb;
}

.ticket-email-step h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.ticket-email-step p {
    color: #5c6070;
    line-height: 1.6;
}

.ticket-email-step label {
    font-weight: 600;
    margin-bottom: 8px;
}

/* Anpassungen für schmale Bildschirme. */

/* Kompakte Formularansicht auf kleinen Smartphones. */

@media (max-width: 575px) {
    .ticket-form-section {
        padding: 18px 16px;
    }

    .ticket-form-section legend {
        font-size: 1rem;
    }

    .ticket-form-actions .ticket-submit {
        width: 100%;
    }

    .ticket-create-heading h1 {
        font-size: 1.8rem;
    }

}

/* Smartphone: gut lesbare Eingaben und große Berührungsflächen. */

.ticket-create .form-control, .ticket-create .form-select {
    min-height: 48px;
    font-size: 16px;
    width: 100%;
    min-width: 0;
}

.ticket-create .ticket-submit {
    min-height: 48px;
}

.ticket-create .form-group > div {
    min-width: 0;
}

.ticket-create input[type="file"] {
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 767px) {
    .ticket-create .col-form-label {
        padding-bottom: 8px;
    }

    .ticket-create .ticket-submit {
        width: 100%;
    }

    .ticket-create-heading {
        margin-top: 28px !important;
    }

    .ticket-form-section {
        margin-bottom: 18px;
    }

    .ticket-form-section legend {
        max-width: 100%;
        line-height: 1.6;
    }

}

/* Fehlerkategorie als auswählbare Karten mit Radio-Buttons. */

.ticket-category-group {
    min-width: 0;
    border: 0;
    padding: 0;
}

.ticket-category-group > legend {
    float: left;
    font-size: .9rem;
    width: 100%;
}

.ticket-category-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ticket-category-choice {
    position: relative;
    cursor: pointer;
    min-width: 0;
}

.ticket-category-choice input {
    position: absolute;
    left: 16px;
    top: 16px;
    width: 20px;
    height: 20px;
    opacity: 0;
}

.ticket-category-choice > span {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    padding: 18px;
    border: 2px solid #d5e9ec;
    border-radius: 12px;
    background: #f8fbfc;
    overflow-wrap: anywhere;
}

.ticket-category-choice i {
    font-size: 1.25rem;
}

.ticket-category-choice strong {
    font-size: .9rem;
}

.ticket-category-choice small {
    font-size: .78rem;
}

.ticket-category-choice:hover > span {
    border-color: #32AEBE;
}

.ticket-category-choice input:checked + span {
    background: #32AEBE;
    border-color: #1A1D32;
    color: #1A1D32;
}

.ticket-category-damage input:checked + span {
    background: #FFBD2E;
}

.ticket-category-choice input:focus-visible + span {
    outline: 3px solid #1A1D32;
    outline-offset: 3px;
}

/* Navigation: Grundlayout, Logo und Menüelemente. */

.ticket-navbar {
    background: #1A1D32;
    border-bottom: 3px solid #32AEBE;
    padding: 12px 0;
    box-shadow: 0 3px 12px #1a1d3215;
}

.ticket-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 16px;
    min-width: 0;
}

.ticket-brand img {
    object-fit: contain;
    flex-shrink: 0;
}

.ticket-brand > span {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.ticket-brand small {
    display: block;
    font-size: .65rem;
    font-weight: 400;
    color: #d5e9ec;
    margin-top: 4px;
}

.ticket-nav-items {
    gap: 8px;
}

.ticket-navbar .nav-link {
    border: 1px solid transparent;
    border-radius: 9px;
    padding: 12px 16px !important;
    min-height: 48px;
    color: #f4f7fa;
    background: transparent;
    font-size: .9rem;
    text-align: left;
}

.ticket-navbar .nav-link:hover {
    background: #ffffff12;
    color: white;
}

.ticket-navbar .nav-link.active {
    background: #32AEBE;
    color: #1A1D32;
    font-weight: 600;
}

.ticket-navbar .navbar-toggler {
    min-width: 48px;
    min-height: 48px;
    border-color: #ffffff50;
    border-radius: 9px;
}

.ticket-navbar .dropdown-menu {
    border: 1px solid #d5e9ec;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 24px #1a1d3220;
}

.ticket-navbar .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 7px;
    color: #1A1D32;
    font-size: .9rem;
}

.ticket-navbar .dropdown-item:hover, .ticket-navbar .dropdown-item:focus {
    background: #e8f5f7;
    color: #1A1D32;
}

.ticket-navbar a:focus-visible, .ticket-navbar button:focus-visible {
    outline: 3px solid #FFBD2E;
    outline-offset: 3px;
    box-shadow: none;
}

/* Kategorie-Beschriftung im Desktop-Layout. */

@media (min-width: 768px) {
    .ticket-category-group > legend {
        width: 25%;
    }

}

/* Aufklappbare Navigation auf Tablets und Smartphones. */

@media (max-width: 991px) {
    .ticket-navbar .navbar-collapse {
        padding-top: 16px;
    }

    .ticket-navbar .nav-link {
        width: 100%;
    }

    .ticket-navbar .dropdown-menu {
        margin-top: 8px;
    }

}

/* Anpassungen für schmale Bildschirme. */

@media (max-width: 575px) {
    .ticket-category-options {
        grid-template-columns: 1fr;
    }

    .ticket-brand {
        gap: 8px;
        margin-right: 8px;
    }

    .ticket-brand img {
        width: 36px;
        height: 36px;
    }

    .ticket-brand > span {
        font-size: .95rem;
    }

    .ticket-brand small {
        font-size: .6rem;
    }

}

/* Einheitliche Überschriften auf allen Unterseiten. */

.ticket-create-heading {
    color: #1A1D32;
}

.ticket-create-heading > hr {
    display: none;
}

.ticket-create-heading .ticket-create-eyebrow {
    display: inline-block;
    font-size: .75rem;
    letter-spacing: .12em;
    font-weight: 700;
}

.ticket-create-heading h1, .stats-heading .ticket-create-heading h1 {
    margin: 10px 0 16px;
    font-weight: 700;
}

.ticket-create-heading .lead, .stats-heading .ticket-create-heading .lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.6;
    color: #5c6070;
    max-width: none;
    margin-bottom: 16px;
}

.stats-heading .ticket-create-heading {
    margin-bottom: 0;
}

/* Anpassungen für schmale Bildschirme. */

@media (max-width: 575px) {
    .stats-heading .ticket-create-heading h1 {
        font-size: 1.8rem;
    }

}

/* Ticketbearbeitung: Statusauswahl, Bildvorschau und Rücknavigation. */
.ticket-edit .ticket-form-section > hr {
    display: none;
}

.ticket-edit-status {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-edit-status .ticket-category-choice > span {
    justify-content: center;
    min-height: 56px;
}

.ticket-edit-open input:checked + span {
    background: #E41F20;
    color: white;
}

.ticket-edit-closed input:checked + span {
    background: #72B630;
    color: #1A1D32;
}

.ticket-edit-image {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
    border-radius: 12px;
}

.ticket-edit .form-control:disabled {
    background: #edf2f4;
}

.ticket-edit-back {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    color: #1A1D32;
    font-weight: 600;
}

.ticket-edit-back:focus-visible {
    outline: 3px solid #32AEBE;
    outline-offset: 3px;
}

/* Statusbuttons bleiben auf Smartphones bequem bedienbar. */
@media (max-width: 575px) {
    .ticket-edit-status {
        grid-template-columns: 1fr;
    }
}