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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 10px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
}

@media (min-width: 768px) {
    .container {
        padding: 40px;
        max-width: 1400px;
    }

    body {
        padding: 20px;
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        min-height: 100vh;
    }
}

@media (min-width: 1200px) {
    .container {
        padding: 50px;
        border-radius: 12px;
        box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    }
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #007bff;
    padding-bottom: 10px;
    font-size: 24px;
}

@media (min-width: 768px) {
    h1 {
        margin-bottom: 30px;
        font-size: 28px;
    }
}

h2 {
    color: #555;
    margin-bottom: 15px;
    font-size: 18px;
}

@media (min-width: 768px) {
    h2 {
        margin-bottom: 20px;
        font-size: 20px;
    }
}

.forms-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .forms-container {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
        margin-bottom: 40px;
    }

    .forms-container.single-form {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto 40px auto;
    }
}

@media (min-width: 1200px) {
    .forms-container {
        gap: 50px;
        max-width: 900px;
        margin: 0 auto 50px auto;
    }

    .forms-container.single-form {
        max-width: 700px;
    }
}

.checkout-form {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 0;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.checkout-form:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

@media (min-width: 768px) {
    .checkout-form {
        padding: 30px;
        border-radius: 10px;
        background: linear-gradient(145deg, #ffffff, #f8f9fa);
    }
}

@media (min-width: 1200px) {
    .checkout-form {
        padding: 35px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 16px;
}

input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 16px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

button {
    background-color: #007bff;
    color: white;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    min-height: 48px;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button:hover {
    background-color: #0056b3;
}

button:active {
    transform: translateY(1px);
}

.checked-out-carts {
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .checked-out-carts {
        margin-bottom: 30px;
    }
}

.cart-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .cart-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        margin-bottom: 15px;
        padding: 20px 25px;
        border-radius: 10px;
    }
}

@media (min-width: 1200px) {
    .cart-item {
        padding: 25px 30px;
        margin-bottom: 18px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    }

    .cart-item:hover {
        box-shadow: 0 4px 20px rgba(0, 123, 255, 0.15);
        transform: translateY(-2px);
    }
}

.cart-item.overdue {
    background-color: #ffe6e6;
    border-color: #ff6b6b;
}

.parking-item {
    background-color: #f0f8ff;
    border: 1px solid #87ceeb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.parking-item:hover {
    border-color: #4a90e2;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

@media (min-width: 768px) {
    .parking-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
        margin-bottom: 15px;
        padding: 20px 25px;
        border-radius: 10px;
    }
}

@media (min-width: 1200px) {
    .parking-item {
        padding: 25px 30px;
        margin-bottom: 18px;
        box-shadow: 0 2px 10px rgba(135, 206, 235, 0.1);
    }

    .parking-item:hover {
        box-shadow: 0 4px 20px rgba(74, 144, 226, 0.15);
        transform: translateY(-2px);
    }
}

.parking-item.overdue {
    background-color: #fff0e6;
    border-color: #ff8c00;
}

.cart-info {
    flex-grow: 1;
}

.cart-number {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

@media (min-width: 768px) {
    .cart-number {
        font-size: 20px;
    }
}

@media (min-width: 1200px) {
    .cart-number {
        font-size: 22px;
    }
}

.cart-details {
    color: #666;
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .cart-details {
        font-size: 15px;
        margin-top: 8px;
        line-height: 1.5;
    }
}

@media (min-width: 1200px) {
    .cart-details {
        font-size: 16px;
    }
}

.time-elapsed {
    font-weight: bold;
    margin-left: 0;
    display: block;
    margin-top: 4px;
}

@media (min-width: 768px) {
    .time-elapsed {
        margin-left: 10px;
        display: inline;
        margin-top: 0;
    }
}

.time-elapsed.overdue {
    color: #d32f2f;
}

.checkin-btn {
    background-color: #28a745;
    padding: 12px 20px;
    font-size: 14px;
    width: 100%;
    margin-left: 0;
    min-height: 44px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .checkin-btn {
        width: auto;
        margin-left: 15px;
        padding: 8px 16px;
        min-height: auto;
    }
}

.checkin-btn:hover {
    background-color: #218838;
}

.alerts {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 1000;
}

@media (min-width: 768px) {
    .alerts {
        top: 20px;
        right: 20px;
        left: auto;
        max-width: 350px;
    }
}

.alert {
    background-color: #ff6b6b;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    font-size: 14px;
    line-height: 1.4;
}

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

@media (min-width: 768px) {
    @keyframes slideIn {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
}

.empty-state {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 30px 20px;
    font-size: 14px;
}

@media (min-width: 768px) {
    .empty-state {
        padding: 40px;
        font-size: 16px;
    }
}

.countdown-timer {
    font-weight: bold;
    font-size: 16px;
    margin-top: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    text-align: center;
    transition: all 0.3s ease;
}

.countdown-normal {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.countdown-warning {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffb74d;
    animation: pulse-warning 2s infinite;
}

.countdown-critical {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ef5350;
    animation: pulse-critical 1s infinite;
}

@keyframes pulse-warning {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes pulse-critical {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
    }
    50% {
        transform: scale(1.03);
        box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
    }
}

@media (min-width: 768px) {
    .countdown-timer {
        margin-top: 4px;
        margin-left: 10px;
        display: inline-block;
        font-size: 14px;
        padding: 4px 8px;
    }
}

/* View Toggle Controls */
.view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding: 4px;
    background-color: #f0f0f0;
    border-radius: 10px;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.toggle-btn {
    flex: 1;
    max-width: 160px;
    background-color: transparent;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
}

.toggle-btn.active {
    background-color: #007bff;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    transform: translateY(-1px);
}

.toggle-btn:hover:not(.active) {
    background-color: #e6e6e6;
    color: #333;
}

.toggle-btn:active {
    transform: translateY(0);
}

.toggle-icon {
    font-size: 16px;
    margin-bottom: 2px;
    width: 20px;
    text-align: center;
    display: inline-block;
}

@media (min-width: 768px) {
    .view-toggle {
        max-width: 350px;
        margin: 0 auto 40px auto;
        gap: 6px;
        padding: 6px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
        background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    }

    .toggle-btn {
        flex-direction: row;
        gap: 8px;
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 10px;
        justify-content: center;
    }

    .toggle-btn.active {
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
        transform: translateY(-2px);
    }

    .toggle-icon {
        font-size: 20px;
        margin-bottom: 0;
        width: 24px;
    }
}

@media (min-width: 1200px) {
    .view-toggle {
        max-width: 380px;
        margin: 0 auto 50px auto;
        padding: 6px;
        border-radius: 15px;
    }

    .toggle-btn {
        padding: 14px 18px;
        font-size: 17px;
        font-weight: 700;
    }

    .toggle-icon {
        font-size: 22px;
        width: 26px;
    }
}

/* Sync Status Styling */
.sync-status {
    margin-bottom: 15px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.status-indicator.local {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-indicator.synced {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.status-indicator.error {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ef5350;
}

/* Staff Code Input Styling */
.staff-code-input {
    display: flex;
    gap: 8px;
    align-items: center;
}

.staff-code-input input {
    flex: 1;
}

.connect-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    width: auto;
}

.connect-btn:hover {
    background-color: #218838;
}

.connect-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .staff-code-input {
        flex-direction: row;
        gap: 8px;
    }

    .connect-btn {
        flex-shrink: 0;
    }
}