:root {
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.3);
    --text-color: #ffffff;
    --accent-color: #0a84ff; /* Apple Blue style */
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #0f0c29;  /* Fallback */
    background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animations (Lava Lamp effekt) */
.background-blobs {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: move 10s infinite alternate;
}

.blob-1 { top: 10%; left: 20%; width: 300px; height: 300px; background: #ff00cc; }
.blob-2 { bottom: 20%; right: 10%; width: 400px; height: 400px; background: #3333ff; animation-duration: 15s; }
.blob-3 { top: 40%; left: 40%; width: 250px; height: 250px; background: #00ffcc; animation-duration: 12s; }

@keyframes move {
    from { transform: translate(0, 0); }
    to { transform: translate(30px, -30px); }
}

/* Glass Main Container */
.glass-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}
.logo span { color: var(--accent-color); }

/* Search Input */
.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border-radius: 15px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 16px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Wichtig für Padding */
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(10, 132, 255, 0.3);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.7;
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.part-card {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.part-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 10px;
}

.badge { padding: 4px 8px; border-radius: 8px; }
.in-stock { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.out-stock { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }

.part-card h3 { margin: 10px 0; font-size: 18px; }

.price-calc {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 5px;
}

.price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    color: var(--accent-color);
}

.btn-primary {
    width: 100%;
    margin-top: 15px;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 15px;
    border-radius: 10px;
    cursor: pointer;
}

/* MODAL / OVERLAY STYLES */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none; /* Standardmäßig versteckt */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-glass {
    width: 90%;
    max-width: 500px;
    background: rgba(30, 30, 40, 0.85); /* Etwas dunkler für Kontrast */
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    color: white;
}

.modal-overlay.active .modal-glass {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Formular Styles */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 12px; margin-bottom: 5px; opacity: 0.7; }
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
    box-sizing: border-box; /* Wichtig */
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255,255,255,0.15);
}

.row { display: flex; gap: 10px; }
.col { flex: 1; }

.section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    margin: 20px 0 10px 0;
}
/* BOTTOM NAVIGATION */
.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    display: flex;
    padding: 10px 20px;
    gap: 20px;
    z-index: 900;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.nav-item {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 24px;
    padding: 10px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-item.active {
    background: var(--accent-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(10, 132, 255, 0.4);
}

/* VIEWS TOGGLING */
.view-section {
    display: none; /* Alle erst mal ausblenden */
    animation: fadeIn 0.4s ease;
}
.view-section.active-view {
    display: block; /* Nur die aktive zeigen */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* TICKET CARDS */
.ticket-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--accent-color);
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
    position: relative;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 5px;
}

/* OPTIMIERTES DROPDOWN DESIGN */
select.ticket-status-select, 
#customerEditForm select, 
#checkinForm select {
    width: 100%;
    height: 46px; /* Gleiche Höhe wie die Input-Felder */
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 15px;
    appearance: none; /* Entfernt den Standard-Browser-Pfeil */
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

select.ticket-status-select:focus,
#customerEditForm select:focus,
#checkinForm select:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 15px rgba(10, 132, 255, 0.2);
}

/* Styling der Optionen (Soweit vom Browser erlaubt) */
select option {
    background: #24243e; /* Dunkler Hintergrund für die Liste */
    color: white;
    padding: 10px;
}

/* Abstandshalter für Modale anpassen */
.form-group label {
    margin-top: 10px;
    margin-bottom: 6px;
    font-weight: 500;
}

/* ==========================
   PRINT STYLES (ABHOLSCHEIN)
   ========================== */

/* Standardmäßig verstecken wir den Bon auf dem Bildschirm */
#print-template {
    display: none;
}

@media print {
    /* Alles andere ausblenden */
    body * {
        visibility: hidden;
    }
    
    /* Hintergrund entfernen (spart Tinte) */
    body {
        background: white;
        color: black;
    }
    .background-blobs, .glass-container, .bottom-nav, .modal-overlay {
        display: none !important;
    }

    /* Nur den Bon anzeigen */
    #print-template, #print-template * {
        visibility: visible;
        display: block;
    }

    #print-template {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        font-family: 'Helvetica', 'Arial', sans-serif;
        color: #000;
        padding: 20px;
        box-sizing: border-box;
    }

    /* Layout des Bons */
    .print-header {
        text-align: center;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }
    
    .print-header h1 { margin: 0; font-size: 24px; }
    .print-header p { margin: 5px 0; font-size: 12px; }

    .print-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 10px;
        border-bottom: 1px dotted #ccc;
        padding-bottom: 5px;
    }
    
    .print-label { font-weight: bold; font-size: 12px; }
    .print-value { font-size: 14px; }

    .print-legal {
        margin-top: 30px;
        font-size: 10px;
        text-align: justify;
        line-height: 1.4;
    }

    .print-signature {
        margin-top: 50px;
        border-top: 1px solid #000;
        width: 200px;
        padding-top: 5px;
        font-size: 12px;
        text-align: center;
    }
}
