/* ==================== CSS VARIABLES ==================== */
:root {
    --primary: #ff6b35;
    --primary-dark: #f7931e;
    --success: #22c55e;
    --danger: #dc2626;
    --warning: #f59e0b;
}

/* ==================== BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d9 100%);
    min-height: 100vh;
    padding-bottom: 30px;
}

#map {
    height: 100vh;
    width: 100%;
}

#shopLat, #shopLng {
    display: none;
}

/* ==================== NAVIGATION ==================== */
.top-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.nav-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.nav-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}

/* ==================== HEADER ==================== */
.header {
    background: linear-gradient(135deg, var(--primary), #ff8c42);
    color: white;
    padding: 32px 24px 40px;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.header-content {
    position: relative;
    z-index: 1;
}

.greeting {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-info {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 500;
}

.route-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.25);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== STATS & CARDS ==================== */
.stats-card {
    position: absolute;
    top: 80px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    justify-content: space-around;
    gap: 12px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card {
    background: white;
    padding: 20px 16px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 107, 53, 0.1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #fff5f0, #ffe8d9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
}

.stats-section {
    margin: 24px 0;
    animation: fadeInUp 0.6s ease-out 0.1s;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    padding: 0 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* ==================== EARNINGS CARD ==================== */
.earnings-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    margin: -20px 20px 20px;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

.earnings-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.earnings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.earning-item h4 {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.earning-item .amount {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.earning-item .subtext {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 4px;
}

/* ==================== INFO CARDS ==================== */
.info-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 24px 0;
}

.info-card {
    background: white;
    padding: 18px;
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.info-card-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card-value {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.info-card-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

/* ==================== GPS INDICATOR ==================== */
.gps-indicator {
    position: absolute;
    top: 160px;
    left: 20px;
    background: white;
    padding: 8px 14px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--success);
}

.gps-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: gray;
    animation: pulse 1s infinite;
}

.gps-active .gps-dot {
    background: var(--success);
}

.gps-inactive .gps-dot {
    background: var(--danger);
}

/* ==================== FAB ==================== */
.fab-container {
    position: absolute;
    bottom: 30px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.fab-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.fab-secondary {
    background: white;
    color: var(--primary);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.fab:active {
    transform: scale(0.95);
}

/* ==================== BOTTOM SHEET ==================== */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

.bottom-sheet.active {
    transform: translateY(0);
}

.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sheet-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto;
}

.sheet-content {
    padding: 0 24px 32px;
}

.shop-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.shop-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #fff5f0, #ffe8d9);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.shop-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.shop-info p {
    font-size: 13px;
    color: #666;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-input::placeholder {
    color: #aaa;
}

.input-hint {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #999;
}

.input-wrapper .form-input {
    padding-left: 48px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #999;
}

.sale-form, .no-sale-form {
    display: none;
}

.sale-form.active, .no-sale-form.active {
    display: block;
}

.add-shop-form {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: white;
    padding: 24px;
    border-radius: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    z-index: 1002;
    display: none;
}

.add-shop-form.active {
    display: block;
}

.add-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-form-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: #fff5f0;
}

.btn-danger {
    background: white;
    color: var(--danger);
    border: 2px solid var(--danger);
}

.btn-danger:hover {
    background: #fef2f2;
}

.close-btn {
    background: #fee;
    color: var(--danger);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
}

.save-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

/* ==================== QUICK ACTIONS ==================== */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.quick-btn {
    flex: 1;
    padding: 16px;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-btn:hover {
    border-color: var(--primary);
    background: #fff5f0;
}

.quick-btn.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.quick-btn .icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.quick-btn .label {
    font-size: 13px;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.actions {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeInUp 0.6s ease-out 0.2s;
}

/* ==================== COMMISSION ==================== */
.commission-display {
    background: linear-gradient(135deg, #fff5f0, #ffe8d9);
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.commission-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.commission-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 2px solid #fee;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 2px solid #dcfce7;
}

.alert-warning {
    background: #fef3c7;
    border: 2px solid var(--warning);
    color: #92400e;
}

.alert-icon {
    font-size: 20px;
}

.warning-box {
    background: #fef2f2;
    border: 2px solid #fee;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 20px;
}

.warning-box .icon {
    font-size: 32px;
    text-align: center;
    margin-bottom: 12px;
}

.warning-box p {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.info-box {
    background: linear-gradient(135deg, #fff5f0, #ffe8d9);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #666;
    border: 2px solid #ffe8d9;
}

.info-icon {
    font-size: 18px;
    margin-top: 2px;
}

/* ==================== STATUS ==================== */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-nosale {
    background: #fee;
    color: #991b1b;
}

/* ==================== AUTH PAGES ==================== */
.register-page, .login-page {
    display: flex;
    justify-content: center;
    align-items: center;
}

.register-container, .login-container {
    width: 100%;
    max-width: 420px;
}

.logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.3);
    animation: float 3s ease-in-out infinite;
}

.logo-icon {
    font-size: 40px;
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.logo-section p {
    font-size: 15px;
    color: #666;
}

.footer-text {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #666;
}

.footer-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-text a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}

.remember-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.remember-checkbox {
    margin-right: 0.5rem;
}

.remember-label span {
    font-size: 0.875rem;
    color: #6b7280;
}

.security-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

.security-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.password-box {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.password-title {
    display: block;
    margin-bottom: 0.5rem;
}

.password-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: disc;
}

/* ==================== UTILITIES ==================== */
.note {
    color: #6b7280;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.center-box {
    text-align: center;
    margin-top: 20px;
}

/* ==================== LEAFLET ==================== */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 12px;
    font-family: 'Inter', sans-serif;
}

/* ==================== ANIMATIONS ==================== */
@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(0.9);
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.2);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .form-card {
        padding: 24px;
    }
    
    .logo-section h1 {
        font-size: 24px;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .logo-icon {
        font-size: 36px;
    }
}

@media (max-width: 400px) {
    .stats-card {
        padding: 12px;
        gap: 8px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .earnings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .quick-actions, .action-buttons {
        flex-direction: column;
    }
}

/* Add to your existing CSS file */

/* Sync Status Badge */
#syncBadge {
    position: fixed;
    top: 70px;
    right: 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    display: none;
    animation: pulse 2s infinite;
    cursor: pointer;
    transition: all 0.3s ease;
}

#syncBadge:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Online/Offline Indicator */
.connection-status {
    position: fixed;
    top: 120px;
    right: 16px;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.connection-status.online {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.connection-status.offline {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.connection-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

.connection-status.online .connection-status-dot {
    background: #22c55e;
}

.connection-status.offline .connection-status-dot {
    background: #ef4444;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Toast Notifications Enhancement */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    color: #1f2937;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideUp 0.3s ease;
    max-width: 90%;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Loading Spinner for Background Sync */
.sync-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Queue Summary Modal */
.queue-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    max-width: 90%;
    width: 400px;
    display: none;
}

.queue-modal.active {
    display: block;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.queue-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f3f4f6;
}

.queue-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.queue-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9ca3af;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.queue-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.queue-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.queue-item-type {
    font-weight: 600;
    color: #374151;
}

.queue-item-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.queue-item-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.queue-item-status.completed {
    background: #d1fae5;
    color: #065f46;
}

.queue-item-status.failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Offline Banner */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    z-index: 9997;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.offline-banner.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Success Checkmark Animation */
@keyframes checkmark {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-checkmark {
    animation: checkmark 0.4s ease;
}