/* =====================================================================
    Grundstruktur & Schriftarten
===================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

@font-face {
    font-family: 'Coolvetica';
    src: url('../fonts/Coolvetica-Regular.woff2') format('woff2'),
         url('../fonts/Coolvetica-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

h1, h2, h3 {
    text-align: center;
}

h2 {
    font-family: 'Coolvetica';
}

/* =====================================================================
    Formulare & Login/Registrierung
===================================================================== */
.formcontainer {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #f5f5f5;
}

form {
    padding: 0 5px;
}

form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="number"],
form input[type="submit"],
form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    display: block;
}

button,
.filters button,
.button-pdf,
.voucher-print-btn {
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

button:hover,
.filters button:hover,
.button-pdf:hover,
.voucher-print-btn:hover {
    background-color: #213448;
}

/*Select2 Fix*/
.select2-persons {
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    color: #888;
    z-index: 10;
}

.select2-selection__choice__remove {
    text-align: left;
}

/* Zurück-Button */
.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.back-button:hover {
    background-color: #213448;
}

/* =====================================================================
    Navigation (Header / Menü / Navbar)
===================================================================== */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem;
    position: relative;
    z-index: 1100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-with-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-with-user img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.username {
    font-size: 1.5rem;
    font-family: 'Coolvetica';
    color: white;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a:hover {
    text-decoration: underline;
}

.nav-links i.mdi {
    font-size: 1.8rem;
}

.nav-version {
    font-weight: 400;
    font-size: 0.9rem;
    color: white;
    opacity: 0.7;
}

.nav-version:hover {
    opacity: 1;
    text-decoration: underline;
}

.hamburger {
    display: none;
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger span {
    display: block;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* Desktop / Mobile-Sichtbarkeit */
.desktop-only {
    display: inline;
}

.mobile-only {
    display: none;
}

/* =====================================================================
    Dashboard / Layout / Cards
===================================================================== */
.logo-large {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.logo-large img {
    max-width: 300px;
    width: 70%;
    height: auto;
}

.dashboard {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.dashboard h1 {
    margin-bottom: 2rem;
}

.dashboard-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
}

.dashboard-buttons a {
    display: block;
    padding: 1rem;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1.1rem;
}

.dashboard-buttons a:hover {
    background-color: #213448;
}

/* =====================================================================
    Popups
===================================================================== */
.popup {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.9);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 1000;
}

.popup button {
    margin-top: 10px;
    background: white;
    color: #2c3e50;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 5px;
}

/* =====================================================================
    Voucher Seiten / Listen / Details
===================================================================== */
.voucher-container {
    max-width: 1000px;
    margin: 40px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.voucher-container h2 {
    margin-top: 0;
    text-align: center;
    font-family: 'Coolvetica';
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: flex-end;
}

.filters label {
    display: flex;
    flex-direction: column;
    font-weight: bold;
}

.filters select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-width: 140px;
}

.voucher-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.voucher-table th, .voucher-table td {
    padding: 10px;
    border-bottom: 1px solid #eaeaea;
    text-align: left;
}

.voucher-table th {
    background-color: #2c3e50;
    color: white;
}

.voucher-table tr:hover {
    background-color: #f9f9f9;
}

a.voucher-link {
    color: #2c3e50;
    text-decoration: none;
}

a.voucher-link:hover {
    text-decoration: underline;
}

.voucher-box {
    max-width: 500px;
    margin: 80px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(0,0,0,0.1);
    text-align: center;
}

.voucher-box h2 {
    font-family: 'Coolvetica';
    font-size: 2rem;
    margin-bottom: 1rem;
}

.voucher-box p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.voucher-print-btn {
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s;
    text-align: center;
}

.button-pdf {
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    display: inline-block;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

/* =====================================================================
    Responsive
===================================================================== */
@media (max-width: 600px) {
    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: #2c3e50;
        flex-direction: column;
        padding-top: 2rem;
        padding-bottom: 2rem;
        display: none;
        z-index: 1050;
        height: calc(100vh - 60px);
        overflow-y: auto;
        text-align: center;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        font-size: 1.5rem;
        margin: 1rem 0;
        gap: 0;
        justify-content: center;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: inline;
    }

    .hamburger {
        display: flex;
    }

    .logo-large {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .logo-large img {
        max-width: 300px;
        width: 100%;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filters select,
    .filters button {
        width: 100%;
    }

    .voucher-table thead {
        display: none;
    }

    .voucher-table,
    .voucher-table tbody,
    .voucher-table tr,
    .voucher-table td {
        display: block;
        width: 100%;
    }

    .voucher-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid #ccc;
        border-radius: 8px;
        padding: 0.5rem;
        background: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }

    .voucher-table td {
        position: relative;
        padding-left: 50%;
        margin-bottom: 8px;
        font-size: 0.95rem;
    }

    .voucher-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        top: 0;
        font-weight: bold;
        white-space: nowrap;
        font-size: 0.85rem;
        color: #555;
    }
}
