/* public/style.css */
/* Premium-Designsystem für das Gutschein-Shop-System (U-Boot Museum U-434 Theme) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-primary: #002b4e;      /* Haupt-Hintergrund: Tiefes U-Boot-Blau */
    --bg-secondary: #001f3b;    /* Dunkleres Blau für Karten/Panels */
    --bg-accent: #003a69;       /* Helleres Blau für Hover-Effekte */
    
    --color-gold: #0085df;      /* Premium-Blau für Highlights */
    --color-gold-hover: #006eb8;
    
    --text-primary: #ffffff;
    --text-muted: #a0aec0;
    --text-gold: #52b3ff;
    
    --border-white: 1px solid rgba(255, 255, 255, 0.15);
    --border-subtle: 1px solid rgba(255, 255, 255, 0.15);
    --border-gold: 1px solid #0085df;
    
    --shadow-premium: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Basis-Einstellungen */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    background-image: radial-gradient(circle at top right, rgba(0, 58, 105, 0.4) 0%, transparent 60%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Typografie */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    border-bottom: var(--border-subtle);
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Layout-Container */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 40px auto;
    padding: 30px;
    border: var(--border-white);
    background: rgba(0, 31, 59, 0.6);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-premium);
    flex: 1;
    position: relative;
}

/* Grid-Layout für Shop */
.main-wrapper {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 900px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Panel & Card Styling */
.selection-area, .cart-summary, .card {
    background: var(--bg-secondary);
    border: var(--border-white);
    padding: 25px;
    position: relative;
    transition: var(--transition-smooth);
}

.selection-area::before, .cart-summary::before, .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--color-gold);
    border-left: 2px solid var(--color-gold);
}

.selection-area::after, .cart-summary::after, .container::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--color-gold);
    border-right: 2px solid var(--color-gold);
}

/* Formular Elemente */
.form-group {
    margin-bottom: 1.25rem;
}

.admin-page .form-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

select, input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="date"], input[type="datetime-local"], textarea {
    width: 100%;
    background-color: rgba(0, 15, 30, 0.8);
    color: var(--text-primary);
    border: var(--border-white);
    padding: 12px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

/* Custom styled file inputs and select options */
input[type="file"] {
    background-color: rgba(0, 15, 30, 0.8);
    color: var(--text-primary);
    border: var(--border-white);
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

input[type="file"]::file-selector-button {
    background: var(--text-gold);
    color: #000;
    border: none;
    padding: 6px 12px;
    font-weight: bold;
    cursor: pointer;
    margin-right: 10px;
    transition: var(--transition-smooth);
}

input[type="file"]::file-selector-button:hover {
    background: #fff;
}

select option {
    background-color: #001524;
    color: #fff;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b78628' 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 16px center;
    background-size: 16px;
    padding-right: 40px !important;
    cursor: pointer;
}

select:focus, input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(183, 134, 40, 0.3);
}

/* Custom calendar icon color and styling for Webkit-based browsers */
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(340deg) opacity(0.8); /* Gold tinted calendar icon */
    cursor: pointer;
    transition: var(--transition-smooth);
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Stepper (Anzahl-Auswahl) */
.stepper {
    display: flex;
    align-items: center;
    border: var(--border-white);
    background-color: rgba(0, 15, 30, 0.8);
    max-width: 150px;
    margin: 15px 0;
}

.stepper button {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 45px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.stepper button:hover {
    background-color: var(--bg-accent);
    color: var(--text-gold);
}

.stepper input {
    width: 60px;
    height: 40px;
    border: none;
    border-left: var(--border-subtle);
    border-right: var(--border-subtle);
    background: transparent;
    text-align: center;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Optionen Checkboxen */
.option-label {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px;
    border: var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}

.option-label:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.4);
}

.option-label input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: var(--border-white);
    background: transparent;
    margin-right: 12px;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.option-label input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--color-gold);
    background-color: CanvasText;
}

.option-label input[type="checkbox"]:checked {
    border-color: var(--color-gold);
}

.option-label input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.option-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
}

/* Warenkorb-Liste */
.cart-list {
    list-style: none;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: var(--border-subtle);
    animation: fadeIn 0.3s ease-out;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 1rem;
}

.cart-item-options {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-item-price-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-item-price {
    font-weight: 700;
    color: var(--text-gold);
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.cart-item-remove:hover {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.cart-total-section {
    padding: 15px 0;
    border-top: var(--border-white);
    margin-top: 15px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.cart-total-row.grand-total {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-gold);
    border-top: var(--border-subtle);
    padding-top: 10px;
}

/* Radio-Buttons (Versand) */
.shipping-options {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.shipping-label {
    flex: 1;
    display: flex !important;
    align-items: center !important;
    padding: 12px;
    border: var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.shipping-label input[type="radio"] {
    margin-right: 8px;
    accent-color: var(--color-gold);
}

.shipping-label:hover {
    border-color: var(--color-gold);
}

/* Knöpfe (Buttons) */
.btn-primary, button.btn-primary, input[type="submit"].btn-primary {
    background-color: var(--color-gold);
    color: var(--text-primary);
    border: var(--border-gold);
    padding: 14px 28px;
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    transition: var(--transition-smooth);
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover, button.btn-primary:hover, input[type="submit"].btn-primary:hover {
    background-color: var(--color-gold-hover);
    border-color: var(--color-gold-hover);
    box-shadow: 0 6px 15px rgba(183, 134, 40, 0.4);
}

.btn-secondary, button.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: var(--border-white);
    padding: 12px 24px;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary:hover, button.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Header & Footer */
header {
    text-align: center;
    padding: 30px 20px;
    border-bottom: var(--border-subtle);
    background: rgba(0, 15, 30, 0.4);
}

header img {
    max-height: 80px;
    transition: var(--transition-smooth);
}

header img:hover {
    transform: scale(1.05);
}

footer {
    text-align: center;
    padding: 25px;
    margin-top: auto;
    font-size: 0.85rem;
    border-top: var(--border-subtle);
    background: rgba(0, 15, 30, 0.6);
    color: var(--text-muted);
}

footer a {
    color: var(--text-primary);
    margin: 0 10px;
    text-decoration: none;
    transition: var(--transition-smooth);
}

footer a:hover {
    color: var(--text-gold);
    text-decoration: underline;
}

/* Checkout Formular-Bereich */
.checkout-section {
    margin-top: 30px;
    border-top: var(--border-white);
    padding-top: 30px;
    animation: slideUp 0.4s ease-out;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    .grid-span-2 {
        grid-column: span 1 !important;
    }
}

.grid-span-2 {
    grid-column: span 2;
}

/* Admin Styling & Tabs */
.admin-page .container {
    max-width: 1600px;
    width: 96%;
    margin: 20px auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: var(--border-subtle);
    padding-bottom: 10px;
    overflow-x: auto;
}

.admin-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--text-gold);
    border-bottom-color: var(--color-gold);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

/* Tabellen Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: var(--border-white);
    background: var(--bg-secondary);
    margin-bottom: 25px;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

th, td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* Sanftere Trennlinie */
    vertical-align: middle;
}

tbody tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.015); /* Zebra-Streifen für sanfte visuelle Trennung */
}

.text-center {
    text-align: center !important;
}

.nowrap {
    white-space: nowrap !important;
}

th {
    background-color: rgba(0, 15, 30, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: var(--border-white);
    text-align: center;
}

tr:hover td {
    background-color: var(--bg-accent);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 2px;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid #10b981;
}

.badge-pending {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: var(--border-subtle);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    min-width: 120px;
    text-align: center;
    box-sizing: border-box;
    border-radius: 4px;
    line-height: 1.2;
    height: 34px;
    white-space: nowrap;
}

.action-cell .btn-action {
    width: 140px !important;
}

.btn-action:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.btn-action.btn-danger-action:hover {
    background: #ef4444;
    border-color: #ef4444;
}

/* Login-Screen Styling */
.login-card {
    max-width: 450px;
    margin: 80px auto;
    padding: 40px;
    border: var(--border-white);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-premium);
    position: relative;
}

.login-card h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-primary);
}

/* PayPal Simulations-Design */
.paypal-wrapper {
    max-width: 550px;
    margin: 60px auto;
    border: 1px solid #0079C1;
    background: #ffffff;
    color: #333333;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.paypal-header {
    background: #fcfcfc;
    padding: 20px;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.paypal-logo {
    font-size: 1.5rem;
    font-weight: 900;
    font-style: italic;
    color: #003087;
}

.paypal-logo span {
    color: #0079C1;
}

.paypal-content {
    padding: 30px;
}

.paypal-order-box {
    background: #f5f7fa;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    border: 1px solid #e1e5eb;
}

.paypal-btn-success {
    background: #ffc439;
    color: #000000;
    border: none;
    border-radius: 20px;
    padding: 12px;
    width: 100%;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 10px;
}

.paypal-btn-success:hover {
    background: #f2b522;
}

.paypal-btn-cancel {
    background: transparent;
    color: #0079C1;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    text-align: center;
    text-decoration: underline;
}

/* Status-Seiten (Erfolg / Fehler) */
.status-card {
    text-align: center;
    padding: 40px;
}

.status-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.status-icon.success {
    color: #10b981;
}

.status-icon.error {
    color: #ef4444;
}

/* CRUD Formulare */
.crud-form-inline {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 15px;
    align-items: end;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: var(--border-subtle);
}

@media (max-width: 768px) {
    .crud-form-inline {
        grid-template-columns: 1fr;
    }
}

/* Benachrichtigungen */
.alert {
    padding: 12px 18px;
    margin-bottom: 20px;
    border-radius: 2px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid #10b981;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid #f87171;
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animated {
    animation: fadeIn 0.4s ease-out;
}

/* Responsive Mobile Hamburger Menu for Admin Tabs */
.mobile-tabs-container {
    position: relative;
    margin-bottom: 25px;
}

.admin-page .hamburger-menu-btn {
    display: none !important;
    background: var(--bg-secondary);
    border: var(--border-gold);
    color: var(--text-gold);
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 4px;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    transition: var(--transition-smooth);
}

.hamburger-menu-btn:hover {
    background: rgba(183, 134, 40, 0.1);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
}

.hamburger-icon .bar {
    height: 2px;
    width: 100%;
    background-color: var(--text-gold);
    transition: var(--transition-smooth);
}

/* Transform Hamburger to X when open */
.hamburger-menu-btn.open .hamburger-icon .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
.hamburger-menu-btn.open .hamburger-icon .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu-btn.open .hamburger-icon .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
    .admin-page .hamburger-menu-btn {
        display: flex !important;
    }
    
    .admin-tabs {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
        background: rgba(0, 15, 30, 0.98);
        border: var(--border-gold);
        border-top: none;
        border-radius: 0 0 4px 4px;
        padding: 10px 0;
        flex-direction: column;
        gap: 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.8);
        backdrop-filter: blur(10px);
    }
    
    .admin-tabs.open {
        display: flex;
    }
    
    .admin-tab {
        width: 100%;
        text-align: left;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-left: 3px solid transparent;
        border-bottom-color: rgba(255,255,255,0.05);
        white-space: normal; /* Enable wrapping for labels on mobile */
    }
    
    .admin-tab:last-child {
        border-bottom: none;
    }
    
    .admin-tab.active {
        border-bottom-color: rgba(255,255,255,0.05);
        border-left-color: var(--color-gold);
        background: rgba(183, 134, 40, 0.05);
    }
    
    /* Layout Adjustments for Mobile Viewports */
    .container {
        padding: 15px !important;
        width: 95% !important;
        margin: 15px auto !important;
    }
    
    .admin-page .container {
        padding: 10px !important;
        margin-top: 10px !important;
    }
    
    .selection-area, .cart-summary, .card {
        padding: 15px !important;
    }
    
    .main-wrapper {
        gap: 15px !important;
    }
    
    .admin-page .form-group {
        height: auto !important;
        justify-content: flex-start !important;
    }
    
    header {
        padding: 15px 10px !important;
    }
    
    header img {
        max-height: 50px !important;
    }
    
    .admin-page header {
        padding: 10px 15px !important;
    }
    
    .admin-page header img {
        max-height: 40px !important;
    }
    
    .admin-page header div {
        font-size: 0.75rem !important;
    }
    
    .admin-header h2 {
        font-size: 1.5rem;
        margin: 5px 0;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .admin-header div {
        display: flex;
        width: 100%;
        gap: 10px;
    }
    
    .admin-header div .btn-action {
        flex: 1;
        text-align: center;
    }
    
    /* Table responsive adjustments */
    .admin-page table th, .admin-page table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .badge {
        font-size: 0.65rem;
    }
    
    .admin-page .card {
        padding: 15px !important;
    }
}

/* Responsive grid system to replace inline double column grids */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Fluid Layout & Table Width Enhancements for Desktop and Mobile viewports */
.table-responsive table {
    min-width: 100%;
    width: 100%;
}

.table-responsive table.bestellungen-table {
    min-width: 1420px;
    table-layout: fixed;
}

.table-responsive table.bestellungen-table th:nth-child(1),
.table-responsive table.bestellungen-table td:nth-child(1) { width: 110px; } /* Rechnungs-Nr. */
.table-responsive table.bestellungen-table th:nth-child(2),
.table-responsive table.bestellungen-table td:nth-child(2) { width: 220px; } /* Kunde */
.table-responsive table.bestellungen-table th:nth-child(3),
.table-responsive table.bestellungen-table td:nth-child(3) { width: 250px; } /* Positionen */
.table-responsive table.bestellungen-table th:nth-child(4),
.table-responsive table.bestellungen-table td:nth-child(4) { width: 120px; } /* Gesamtbetrag */
.table-responsive table.bestellungen-table th:nth-child(5),
.table-responsive table.bestellungen-table td:nth-child(5) { width: 140px; } /* Zahlungsstatus */
.table-responsive table.bestellungen-table th:nth-child(6),
.table-responsive table.bestellungen-table td:nth-child(6) { width: 220px; } /* Zustellung */
.table-responsive table.bestellungen-table th:nth-child(7),
.table-responsive table.bestellungen-table td:nth-child(7) { width: 130px; } /* Bestell-Datum */
.table-responsive table.bestellungen-table th:nth-child(8),
.table-responsive table.bestellungen-table td:nth-child(8) { width: 270px; } /* Aktionen */

.action-cell {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    justify-content: center !important;
}

.action-cell .btn-action, .action-cell form {
    margin: 0 !important;
}

.table-responsive table.bestellungen-table th:nth-child(1),
.table-responsive table.bestellungen-table td:nth-child(1),
.table-responsive table.bestellungen-table th:nth-child(4),
.table-responsive table.bestellungen-table td:nth-child(4),
.table-responsive table.bestellungen-table th:nth-child(5),
.table-responsive table.bestellungen-table td:nth-child(5),
.table-responsive table.bestellungen-table th:nth-child(7),
.table-responsive table.bestellungen-table td:nth-child(7),
.table-responsive table.bestellungen-table th:nth-child(8),
.table-responsive table.bestellungen-table td:nth-child(8) {
    text-align: center;
}

/* Tabellen-Layout für Zusatzoptionen, Produkte und Freikarten */
.table-responsive table.optionen-table,
.table-responsive table.produkte-table,
.table-responsive table.freikarten-table {
    table-layout: fixed;
    width: 100%;
}

/* Zusatzoptionen Spaltenbreiten */
.table-responsive table.optionen-table th:nth-child(1),
.table-responsive table.optionen-table td:nth-child(1) { width: auto; } /* Option */
.table-responsive table.optionen-table th:nth-child(2),
.table-responsive table.optionen-table td:nth-child(2) { width: 90px; text-align: center; } /* Preis */
.table-responsive table.optionen-table th:nth-child(3),
.table-responsive table.optionen-table td:nth-child(3) { width: 140px; text-align: center; } /* Manager-Zus. */
.table-responsive table.optionen-table th:nth-child(4),
.table-responsive table.optionen-table td:nth-child(4) { width: 90px; text-align: center; } /* Status */
.table-responsive table.optionen-table th:nth-child(5),
.table-responsive table.optionen-table td:nth-child(5) { width: 140px; text-align: center; } /* Aktionen */

/* Produkte Spaltenbreiten */
.table-responsive table.produkte-table th:nth-child(1),
.table-responsive table.produkte-table td:nth-child(1) { width: 30%; } /* Name */
.table-responsive table.produkte-table th:nth-child(2),
.table-responsive table.produkte-table td:nth-child(2) { width: auto; } /* Zusatztext */
.table-responsive table.produkte-table th:nth-child(3),
.table-responsive table.produkte-table td:nth-child(3) { width: 100px; text-align: center; } /* Preis */
.table-responsive table.produkte-table th:nth-child(4),
.table-responsive table.produkte-table td:nth-child(4) { width: 100px; text-align: center; } /* Status */
.table-responsive table.produkte-table th:nth-child(5),
.table-responsive table.produkte-table td:nth-child(5) { width: 140px; text-align: center; } /* Aktionen */

/* Freikarten Spaltenbreiten */
.table-responsive table.freikarten-table th:nth-child(1),
.table-responsive table.freikarten-table td:nth-child(1) { width: 18%; } /* Code / Typ */
.table-responsive table.freikarten-table th:nth-child(2),
.table-responsive table.freikarten-table td:nth-child(2) { width: auto; } /* Empfänger Details */
.table-responsive table.freikarten-table th:nth-child(3),
.table-responsive table.freikarten-table td:nth-child(3) { width: 16%; text-align: center; } /* Zustellungs-Status */
.table-responsive table.freikarten-table th:nth-child(4),
.table-responsive table.freikarten-table td:nth-child(4) { width: 16%; text-align: center; } /* Validierungs-Status */
.table-responsive table.freikarten-table th:nth-child(5),
.table-responsive table.freikarten-table td:nth-child(5) { width: 18%; text-align: center; } /* Aktionen */

/* Zentrierung der Inhalte für Tabellen-Überschriften und Daten */
.table-responsive table.optionen-table th,
.table-responsive table.produkte-table th,
.table-responsive table.freikarten-table th {
    text-align: left;
}
.table-responsive table.optionen-table th:nth-child(2),
.table-responsive table.optionen-table th:nth-child(3),
.table-responsive table.optionen-table th:nth-child(4),
.table-responsive table.optionen-table th:nth-child(5),
.table-responsive table.produkte-table th:nth-child(3),
.table-responsive table.produkte-table th:nth-child(4),
.table-responsive table.produkte-table th:nth-child(5),
.table-responsive table.freikarten-table th:nth-child(3),
.table-responsive table.freikarten-table th:nth-child(4),
.table-responsive table.freikarten-table th:nth-child(5) {
    text-align: center;
}

/* Tabellen-Layout für Sicherheits-Audit und E-Mail-Logbuch */
.table-responsive table.audit-table,
.table-responsive table.email-log-table {
    table-layout: fixed;
    width: 100%;
    min-width: 950px;
}

/* Sicherheits-Audit Spaltenbreiten */
.table-responsive table.audit-table th:nth-child(1),
.table-responsive table.audit-table td:nth-child(1) { width: 120px; } /* Zeitpunkt */
.table-responsive table.audit-table th:nth-child(2),
.table-responsive table.audit-table td:nth-child(2) { width: 150px; } /* Bereich (System) */
.table-responsive table.audit-table th:nth-child(3),
.table-responsive table.audit-table td:nth-child(3) { width: 140px; text-align: center; } /* Ereignis */
.table-responsive table.audit-table th:nth-child(4),
.table-responsive table.audit-table td:nth-child(4) { width: 140px; text-align: center; } /* IP-Adresse */
.table-responsive table.audit-table th:nth-child(5),
.table-responsive table.audit-table td:nth-child(5) { width: 100px; text-align: center; } /* Nutzer */
.table-responsive table.audit-table th:nth-child(6),
.table-responsive table.audit-table td:nth-child(6) { width: auto; } /* Details */

/* E-Mail-Log Spaltenbreiten */
.table-responsive table.email-log-table th:nth-child(1),
.table-responsive table.email-log-table td:nth-child(1) { width: 120px; } /* Zeitpunkt */
.table-responsive table.email-log-table th:nth-child(2),
.table-responsive table.email-log-table td:nth-child(2) { width: 180px; } /* Empfänger */
.table-responsive table.email-log-table th:nth-child(3),
.table-responsive table.email-log-table td:nth-child(3) { width: 100px; text-align: center; } /* Bestell-Nr. */
.table-responsive table.email-log-table th:nth-child(4),
.table-responsive table.email-log-table td:nth-child(4) { width: 220px; } /* Betreff */
.table-responsive table.email-log-table th:nth-child(5),
.table-responsive table.email-log-table td:nth-child(5) { width: 100px; text-align: center; } /* Status */
.table-responsive table.email-log-table th:nth-child(6),
.table-responsive table.email-log-table td:nth-child(6) { width: auto; } /* Details/Fehler */

/* Alignment overrides for Audit & Email tables */
.table-responsive table.audit-table th,
.table-responsive table.email-log-table th {
    text-align: left;
}
.table-responsive table.audit-table th:nth-child(3),
.table-responsive table.audit-table th:nth-child(4),
.table-responsive table.audit-table th:nth-child(5),
.table-responsive table.email-log-table th:nth-child(3),
.table-responsive table.email-log-table th:nth-child(5) {
    text-align: center;
}
.table-responsive table.audit-table td:nth-child(3),
.table-responsive table.audit-table td:nth-child(4),
.table-responsive table.audit-table td:nth-child(5),
.table-responsive table.email-log-table td:nth-child(3),
.table-responsive table.email-log-table td:nth-child(5) {
    text-align: center;
}

/* Custom styling updates for Admin Backend */

/* Eckige Buttons */
.btn-primary, 
button.btn-primary, 
input[type="submit"].btn-primary, 
.btn-secondary, 
button.btn-secondary, 
.btn-action, 
.hamburger-menu-btn {
    border-radius: 0px !important;
}

/* Tabellen-Überschriften und Zell-Inhalte im Backend */
.admin-page table th {
    font-size: 0.8rem !important;
    font-weight: bold !important;
    text-align: left !important;
    padding: 10px 8px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    color: var(--text-gold) !important;
    border-bottom: 2px solid var(--border-gold) !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-wrap: break-word !important;
}
.admin-page table th > span {
    display: inline-block !important;
    white-space: normal !important;
}

/* Uniform Button Styles inside Admin Backend */
.admin-page button,
.admin-page input[type="submit"],
.admin-page .btn-action,
.admin-page .btn-primary,
.admin-page .btn-secondary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 34px !important;
    padding: 0 16px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
    border-radius: 0px !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

/* Retain Large Buttons styling */
.admin-page .btn-large,
.admin-page button.btn-large,
.admin-page input[type="submit"].btn-large,
.admin-page a.btn-large {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 48px !important;
    padding: 0 40px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    width: auto !important;
    box-sizing: border-box !important;
}
.admin-page table td {
    font-size: 0.8rem !important;
    padding: 6px 8px !important;
}

/* Sanfte vertikale Spaltenlinie */
.admin-page table td:not(:last-child), 
.admin-page table th:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Neue Badge-Farbe (Storniert) */
.badge-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    border: 1px solid #ef4444 !important;
}

/* Vereinheitlichte Backend-Button-Farben */
.btn-blue-action {
    background-color: #0085df !important;
    border-color: #0085df !important;
    color: #ffffff !important;
}
.btn-blue-action:hover {
    background-color: #006eb8 !important;
    border-color: #006eb8 !important;
}

.btn-green-action {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}
.btn-green-action:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
}

.btn-danger-action {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}
.btn-danger-action:hover {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
}

.btn-orange-action {
    background-color: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}
.btn-orange-action:hover {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 133, 223, 0.4);
    border: 1px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 133, 223, 0.7);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 133, 223, 0.4) var(--bg-secondary);
}

/* Scanner-Header-Elemente (Vereinheitlichung) */
.scanner-header-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 16px;
    font-size: 0.85rem;
    font-weight: 600;
    box-sizing: border-box;
    border-radius: 0px !important;
    text-decoration: none;
    line-height: 1;
    margin: 0;
}

.scanner-user-badge {
    background: rgba(0, 133, 223, 0.15);
    border: 1px solid var(--border-gold);
    color: var(--text-gold);
}

.scanner-btn-action {
    background: rgba(183, 134, 40, 0.05);
    border: 1px solid var(--border-gold);
    color: var(--text-gold);
    cursor: pointer;
    transition: var(--transition-smooth);
}
.scanner-btn-action:hover {
    background: rgba(183, 134, 40, 0.15);
}

.scanner-btn-danger {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.scanner-btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Neue Badge-Farbe (Freikarte) */
.badge-info {
    background-color: rgba(82, 179, 255, 0.15) !important;
    color: #52b3ff !important;
    border: 1px solid #52b3ff !important;
}

/* Close-Button für das Result-Panel */
.panel-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: var(--transition-smooth);
}
.panel-close-btn:hover {
    color: var(--text-primary);
    transform: scale(1.1);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-gold);
    color: var(--text-primary);
    padding: 14px 20px;
    min-width: 320px;
    max-width: 450px;
    box-shadow: var(--shadow-premium);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    border-radius: 0px !important;
    font-size: 0.9rem;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-notification.toast-success {
    border-left: 4px solid #10b981 !important;
}

.toast-notification.toast-danger {
    border-left: 4px solid #ef4444 !important;
}

.toast-close-btn {
    background: none !important;
    border: none !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    font-size: 1.3rem !important;
    font-weight: bold !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: var(--transition-smooth) !important;
}

.toast-close-btn:hover {
    color: var(--text-primary) !important;
}

.toast-notification.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

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

/* Editor Toolbar Styles */
.editor-toolbar {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.2);
    border: var(--border-subtle);
    padding: 4px;
    border-radius: 4px;
    width: fit-content;
    box-sizing: border-box;
}

.editor-toolbar-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.05) !important;
    color: var(--text-primary) !important;
    border-radius: 3px !important;
    cursor: pointer !important;
    transition: background 0.2s, color 0.2s !important;
    font-size: 0.95rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

.editor-toolbar-btn:hover {
    background: var(--color-gold) !important;
    color: var(--text-primary) !important;
}

.editor-toolbar-separator {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 6px;
}

.editor-toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 4px;
}

.editor-toolbar-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    font-weight: normal;
}

.editor-toolbar-group input {
    width: 60px !important;
    height: 32px !important;
    padding: 0 6px !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    background: rgba(0, 0, 0, 0.25) !important;
    color: var(--text-primary) !important;
    border: var(--border-subtle) !important;
    border-radius: 3px !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

.editor-toolbar-group span {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Mobile Optimization for Storefront Configurator (e.g., Galaxy S24 Ultra & other smartphones) */
@media (max-width: 600px) {
    /* Main Heading */
    .container h1 {
        font-size: 1.5rem !important;
        margin-bottom: 20px !important;
        padding-bottom: 10px !important;
    }

    /* Shipping Options layout stacked */
    .shipping-options {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .shipping-label {
        width: 100% !important;
    }

    /* Additional options spacing and alignment */
    .option-label {
        padding: 10px 12px !important;
    }

    .option-info {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }

    .option-info > span {
        width: 100% !important;
    }

    .option-info > span:first-child {
        display: flex !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 10px !important;
    }

    /* Cart item mobile wrap */
    .cart-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 12px 0 !important;
    }

    .cart-item-details {
        width: 100% !important;
    }

    .cart-item-price-actions {
        width: 100% !important;
        justify-content: space-between !important;
        border-top: 1px dashed rgba(255, 255, 255, 0.05) !important;
        padding-top: 8px !important;
    }
}