/* ========== RESET / BASIS ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f6fa;
    color: #333;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ========== HEADER / NAV ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #ddd;
    z-index: 999;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.4rem;
    font-weight: bold;
    color: #2563eb;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo a img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text {
    display: inline-block;
    line-height: 1;
}

nav ul {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav li {
    position: relative;
}

nav a {
    padding: 8px 10px;
    display: inline-block;
    font-weight: 500;
}

nav a:not(.btn):hover {
    color: #2563eb;
    background: #f1f5f9;
    border-radius: 4px;
}

/* + bei Dropdown */
nav li > a:after {
    content: ' +';
}

nav li > a:only-child:after {
    content: '';
}

/* Dropdown */
nav li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    z-index: 10;
}

nav li:hover ul {
    display: block;
}

nav li ul li a {
    padding: 10px 14px;
    display: block;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    z-index: 10;
}

nav li:hover ul {
    display: block;
}

nav li ul li a {
    white-space: nowrap;
}

nav li ul li a:hover {
    background: #f1f5f9;
}

/* Contact Button */
.btn {
    background: #2563eb;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    font-weight: 600;
}

.btn:hover {
    background: #1e40af;
}

/* ========== PAGE HEADER / HERO ========== */
.page-header {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #ffffff;
    padding: 48px 16px;
    border-radius: 10px;
}

.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
}

/* ========== MAIN / FOOTER ========== */
main {
    max-width: 1100px;
    margin: 100px auto 85px auto;
    padding: 0 16px;
}

footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #ddd;
    text-align: center;
    padding: 16px;
    font-size: 0.9rem;
    color: #666;
}

/* ========== MAIN CONTENT ========== */
.content {
    max-width: 1200px;    /* begrenzt Breite für bessere Lesbarkeit */
    margin: 0 auto;       /* zentriert */
    padding: 24px 16px;   /* innenabstand: oben/unten + links/rechts */
    background: #ffffff;  /* optional, Hintergrund für Content-Box */
    border-radius: 8px;   /* abgerundete Ecken */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* leichter Schatten */
}

/* ========== mt-8 utility ========== */
.mt-8 {
    margin-top: 32px; /* ca. 2rem / ausreichend Abstand unter Page Header */
}

/* ========== ALERT ========== */
.alert {
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border: 1px solid transparent;
    position: relative;
    font-family: Arial, sans-serif;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-message {
    flex: 1;
}

.alert .btn-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: inherit;
    cursor: pointer;
    line-height: 1;
}

.alert.fade.show { opacity: 1; transition: opacity 0.3s ease-out; }
.alert.fade.hide { opacity: 0; height: 0; padding: 0; margin: 0; overflow: hidden; transition: all 0.3s ease; }

.alert-success { background: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.alert-danger { background: #f8d7da; color: #842029; border-color: #f5c2c7; }
.alert-warning { background: #fff3cd; color: #664d03; border-color: #ffecb5; }
.alert-info { background: #cff4fc; color: #055160; border-color: #b6effb; }


/* ========== FORMS ========== */

.form {
    max-width: 500px;
    margin: 0 auto;
    padding: 24px;
    border-radius: 8px;
}

.form input[type="password"],
.form input[type="text"],
.form input[type="email"],
.form select,
.form textarea {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border-radius: 8px;
    border: 1px solid #ccc;       /* hellgrau */
    background: #f9f9f9;          /* hellgrau Hintergrund */
    color: #333;                   /* dunkle Schrift */
    font-size: 14px;
    line-height: 1.2;
    appearance: none;
}

.form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><polygon points='0,0 12,0 6,6' style='fill:%23888'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
}

.form input::placeholder,
.form textarea::placeholder {
    color: #888;      /* mittleres Grau */
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #666;      /* Icon grau */
    font-size: 16px;
    pointer-events: none;
}

.input-wrapper {
    margin-bottom: 15px;
    width: 100%;
}

.input-wrapper label {
    display: block;
    margin-left: 5px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;      /* Label dunkelgrau */
}

.form button {
    width: 100%;
    padding: 12px;
    background: #2563eb;   /* Hauptblau */
    border: none;
    border-radius: 8px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.form button:hover {
    background: #1e40af;   /* dunkleres Blau beim Hover */
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========== GRID ========== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ========== TICKET PAGE ========== */
.ticket-page {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.ticket-left {
    flex: 2;
    min-width: 300px;
}

.ticket-right {
    flex: 1;
    min-width: 250px;
    background: #f9f9f9;
    padding: 16px;
    border-radius: 8px;
}

.ticket-messages {
    margin-bottom: 16px;
    max-height: 600px;
    overflow-y: auto;
}

.message {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #eee;
}

.message.user {
    background: #dbeafe; /* hellblau für User */
}

.message.admin {
    background: #fef3c7; /* hellgelb für Admin */
}

.message p {
    margin: 2px 0;
}

.message .time {
    font-size: 12px;
    color: #666;
}

.ticket-left form .input-wrapper textarea {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    resize: vertical;
}

.ticket-left form button {
    margin-top: 8px;
    padding: 10px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.ticket-left form button:hover {
    background: #1e40af;
}

/* ========== TICKET AUTH (LIGHT / MATCHING DESIGN) ========== */

.ticket-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Popup Box */
.ticket-auth-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 32px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    animation: popupFade 0.2s ease-out;
}

/* Animation */
@keyframes popupFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Titel */
.ticket-auth-box h2 {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #2563eb;
}

/* Beschreibung */
.ticket-auth-box p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: #555;
}

/* Inputs – exakt wie Form */
.ticket-auth-box .input-wrapper {
    margin-bottom: 15px;
}

.ticket-auth-box label {
    display: block;
    margin-left: 5px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.ticket-auth-box input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #f9f9f9;
    color: #333;
    font-size: 14px;
}

.ticket-auth-box input::placeholder {
    color: #888;
}

.ticket-auth-box input:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
}

/* Button – identisch zu Form */
.ticket-auth-box button {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.ticket-auth-box button:hover {
    background: #1e40af;
}

/* ========== ERROR PAGES ========== */
.error-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px 20px;
}

.error-container h1 {
    font-size: 8rem;
    color: #2563eb; /* Blau passend zu Buttons */
    margin: 0;
}

.error-container h2 {
    font-size: 2rem;
    margin: 10px 0 20px;
    color: #333;
}

.error-container p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 30px;
}

.error-container .btn-home {
    display: inline-block;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
}

.error-container .btn-home:hover {
    background: #1e40af;
}

/* ========== RESPONSIVE ========== */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-toggle-label {
        display: block;
    }

    nav {
        display: none;
        width: 100%;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        margin-top: 16px;
    }

    nav li {
        width: 100%;
    }

    nav a {
        width: 100%;
        padding: 12px;
    }

    nav a:not(.btn):hover {
        color: #2563eb;
        background: #f1f5f9;
        border-radius: 4px;
    }

    nav li ul {
        position: static;
        box-shadow: none;
        border: none;
    }

    nav li:hover ul {
        display: none;
    }

    nav li input:checked + ul {
        display: block;
    }

    .nav-toggle:checked + nav {
        display: block;
    }
    
    .form {
        padding: 0 16px;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .error-container h1 {
        font-size: 5rem;
    }

    .error-container h2 {
        font-size: 1.5rem;
    }
}