.sauber-cust-dash-wrapper {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(88, 49, 155, 0.1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cust-login-card {
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
}

.sauber-cust-dash-wrapper h2 {
    color: #58319b;
    margin: 0;
}

.user-email {
    color: #7f8c8d;
    font-size: 14px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0ecf7;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.sauber-btn-primary {
    background: #58319b;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s;
}

.sauber-btn-primary:hover {
    background: #46267c;
    transform: translateY(-2px);
}

.sauber-btn-logout {
    background: #fff;
    color: #58319b;
    border: 2px solid #58319b;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.sauber-btn-logout:hover {
    background: #58319b;
    color: #fff;
}

.error-msg {
    color: #d63031;
    margin-top: 15px;
    font-size: 14px;
}

.table-responsive {
    overflow-x: auto;
}

.cust-bookings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border: 1px solid #f0ecf7;
}

.cust-bookings-table th {
    text-align: left;
    background: #f8f7ff;
    padding: 15px;
    color: #58319b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #efebff;
    border-bottom: 1px solid #efebff;
}

.cust-bookings-table th:last-child {
    border-right: none;
    text-align: center;
}

.cust-bookings-table td {
    padding: 15px;
    border-bottom: 1px solid #f0ecf7;
    border-right: 1px solid #f0ecf7;
    font-size: 14px;
    color: #2d3436;
}

.cust-bookings-table td:last-child {
    border-right: none;
    text-align: center;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending {
    background: #fff8e1;
    color: #f39c12;
}

.status-confirmed {
    background: #e8f5e9;
    color: #27ae60;
}

.status-completed {
    background: #e3f2fd;
    color: #2980b9;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.sauber-btn-view,
.sauber-btn-invoice,
.sauber-btn-cancel {
    padding: 6px 12px;
    font-size: 12px;
    border: 1px solid #58319b;
    background: #fff;
    color: #58319b;
    cursor: pointer;
    border-radius: 6px;
    margin-right: 5px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sauber-btn-cancel {
    border-color: #d63031;
    color: #d63031;
}

.sauber-btn-view:hover,
.sauber-btn-invoice:hover {
    background: #58319b;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(88, 49, 155, 0.2);
}

.sauber-btn-cancel:hover {
    background: #d63031;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(214, 48, 49, 0.2);
}

.actions-wrapper {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Modal Styles */
.sauber-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.sauber-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.sauber-close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 10px;
}

.sauber-close-modal:hover,
.sauber-close-modal:focus {
    color: #58319b;
    text-decoration: none;
    cursor: pointer;
}

.sauber-modal-content h3 {
    color: #58319b;
    margin-top: 0;
    margin-bottom: 10px;
}

.sauber-modal-content p {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 20px;
}

.sauber-modal-content input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: inherit;
    margin-bottom: 15px;
}

.msg-box {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
}

.msg-box.success {
    background: #e8f5e9;
    color: #27ae60;
    border: 1px solid #c8e6c9;
}

.msg-box.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* Booking Detail Modal Improvements */
.detail-modal {
    max-width: 500px;
    text-align: left;
}

.booking-details-box {
    background: #fbfaff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #f0ecf7;
    margin-top: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.highlight {
    background: #f0ebf7;
    margin: 10px -20px -20px;
    padding: 20px;
    border-radius: 0 0 12px 12px;
    border-top: 2px solid #58319b;
}

.detail-label {
    font-weight: 700;
    color: #58319b;
    font-size: 13px;
    text-transform: uppercase;
}

.detail-value {
    color: #2d3436;
    font-weight: 500;
    text-align: right;
    max-width: 60%;
}

.detail-row.highlight .detail-value {
    font-size: 18px;
    font-weight: 800;
    color: #58319b;
}

/* Invoice Modal Styles */
.invoice-modal {
    max-width: 800px !important;
    padding: 40px !important;
}

.invoice-actions {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-end;
}

.invoice-box {
    background: #fff;
    color: #333;
    font-family: 'Inter', sans-serif;
    padding: 20px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #58319b;
    padding-bottom: 20px;
}

.invoice-logo {
    max-width: 160px;
    height: auto;
}

.invoice-meta {
    text-align: right;
}

.invoice-meta h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
}

.invoice-meta p {
    margin: 2px 0;
    font-size: 14px;
}

.invoice-info-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.invoice-bill-to,
.invoice-from {
    width: 48%;
}

.invoice-bill-to strong,
.invoice-from strong {
    display: block;
    margin-bottom: 10px;
    color: #58319b;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.invoice-bill-to p,
.invoice-from p {
    margin: 2px 0;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-items-table th {
    background: #f8f7ff;
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #efebff;
    color: #58319b;
}

.invoice-items-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
}

.invoice-total {
    margin-left: auto;
    width: 300px;
    border-top: 2px solid #58319b;
    padding-top: 15px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.status-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.status-row .value {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.status-row .value.status-bezahlt {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-row .value.status-offen {
    background: #fff3e0;
    color: #ef6c00;
}

.invoice-footer {
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
    font-size: 12px;
    color: #999;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden !important;
    }

    #sauber-invoice-modal,
    #sauber-invoice-modal * {
        visibility: visible !important;
    }

    #sauber-invoice-modal {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        z-index: 999999 !important;
    }

    .invoice-modal {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .no-print,
    .sauber-close-modal,
    .invoice-actions {
        display: none !important;
    }
}

/* ==========================================================================
   Mobile Responsive Adjustments (Max-width 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {

    /* 1. Main Dashboard Wrapper */
    .sauber-cust-dash-wrapper {
        margin: 10px auto;
        padding: 15px;
        border-radius: 12px;
    }

    /* 2. Header Stack */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .sauber-btn-logout {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    /* 3. Card View for Booking Table */
    .cust-bookings-table,
    .cust-bookings-table tbody,
    .cust-bookings-table tr,
    .cust-bookings-table td {
        display: block;
        width: 100%;
    }

    .cust-bookings-table thead {
        display: none;
        /* Hide standard table headers */
    }

    .cust-bookings-table tr {
        background: #fff;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
        padding: 15px;
        position: relative;
    }

    .cust-bookings-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* Vertical align label and content */
        text-align: right;
        padding: 10px 0;
        border-bottom: 1px solid #f5f5f5;
        font-size: 14px;
    }

    .cust-bookings-table td:last-child {
        border-bottom: none;
        padding-top: 15px;
        justify-content: flex-end;
        /* Buttons align right or full */
        gap: 10px;
    }

    /* Pseudo-element for Labels (from data-label attribute) */
    .cust-bookings-table td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #58319b;
        /* Brand color for labels */
        font-size: 12px;
        text-transform: uppercase;
        margin-right: 10px;
        text-align: left;
        flex-shrink: 0;
        /* Prevent label shrinking */
    }

    /* Buttons in Card View - specific adjustments */
    .cust-bookings-table td .sauber-btn-view,
    .cust-bookings-table td .sauber-btn-invoice {
        padding: 12px 15px;
        /* Larger tap area */
        font-size: 14px;
        flex: 1;
        /* Stretch buttons to fill space */
        text-align: center;
        margin: 0;
    }

    /* 4. Modal Mobile Improvements */
    .sauber-modal-content {
        width: 96%;
        /* Maximize width */
        margin: 2% auto;
        /* Less vertical margin to move it up */
        padding: 15px;
        max-height: 95vh;
        /* Ensure it fits in viewport */
        overflow-y: auto;
        /* Scrollable internal content */
    }

    /* 5. Invoice Modal Specifics - Tighter & Cleaner */
    .invoice-modal {
        padding: 10px !important;
        /* Minimal wrapper padding */
    }

    /* Adjust close button position */
    .invoice-modal .sauber-close-modal {
        top: 5px;
        right: 10px;
        font-size: 26px;
        padding: 5px;
    }

    /* Validating visual hierarchy inside invoice box */
    .invoice-box {
        padding: 15px;
        /* Reduced padding for the paper sheet */
    }

    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 15px;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
    }

    .invoice-logo {
        max-width: 140px;
        /* Scale logo down for mobile */
        height: auto;
    }

    .invoice-meta {
        text-align: left;
        width: 100%;
    }

    .invoice-meta h2 {
        font-size: 22px;
        margin-bottom: 5px;
    }

    .invoice-info-section {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .invoice-bill-to,
    .invoice-from {
        width: 100%;
        font-size: 13px;
    }

    /* Invoice Items Table text size */
    .invoice-items-table th,
    .invoice-items-table td {
        padding: 8px 5px;
        font-size: 13px;
        word-break: break-word;
        /* Prevent overflow */
    }

    /* End Table Cells */

    .invoice-total {
        width: 100%;
        margin-top: 15px;
        border-top: 2px solid #58319b;
        padding-top: 15px;
    }

    .total-row {
        font-size: 16px;
        display: flex;
        justify-content: space-between;
    }

    .invoice-footer {
        margin-top: 30px;
        font-size: 11px;
    }
}

/* Premium Customer Login Redesign */
.sauber-cust-login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    padding: 20px;
    background: radial-gradient(circle at top left, #f4efff 0%, #f8fafc 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cust-login-card {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(88, 49, 155, 0.05), 0 10px 10px -5px rgba(88, 49, 155, 0.02);
    border: 1px solid rgba(88, 49, 155, 0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.cust-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #58319b, #7b4dc4);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: #f4efff;
    color: #58319b;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 16px rgba(88, 49, 155, 0.1);
}

.login-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px 0 !important;
    letter-spacing: -0.025em;
}

.login-header h2 span {
    color: #58319b;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.cust-login-card .form-group {
    margin-bottom: 24px;
    text-align: left;
}

.cust-login-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    margin-left: 2px;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: #1e293b;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
    height: 48px;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #58319b;
    box-shadow: 0 0 0 4px #f4efff;
}

.input-with-icon input:focus + .input-icon,
.input-with-icon input:not(:placeholder-shown) + .input-icon {
    color: #58319b;
}

.sauber-cust-login-btn {
    width: 100%;
    padding: 14px;
    background: #58319b;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 15px -3px rgba(88, 49, 155, 0.2);
}

.sauber-cust-login-btn:hover {
    background: #46267c;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(88, 49, 155, 0.25);
}

.sauber-cust-login-btn:active {
    transform: translateY(0);
}

.sauber-cust-login-btn svg {
    transition: transform 0.2s ease;
}

.sauber-cust-login-btn:hover svg {
    transform: translateX(4px);
}

.form-footer {
    margin-top: 24px;
}

#sauber-forgot-password-link {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

#sauber-forgot-password-link:hover {
    color: #58319b;
    text-decoration: underline;
}

.feedback-msg {
    margin-top: 20px;
    font-size: 13px;
    text-align: center;
    min-height: 20px;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px;
}

.feedback-msg.error {
    color: #df1b41;
    background: #fff5f7;
    border: 1px solid #ffe4e9;
}

@media screen and (max-width: 768px) {
    /* Existing desktop-above-mobile styles that were inside here... wait, I'll just close it properly */

    /* Login Card Mobile Fixes */
    .cust-login-card {
        padding: 40px 24px;
        border-radius: 20px;
        max-width: 100%;
    }

    .login-header h2 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .dashboard-header h2 {
        font-size: 22px;
    }
}