/* =================== RESET & VARIABLES =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* Colors */
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #4caf50;
    --danger: #f44336;
    --dark: #1a202c;
    --gray: #a0aec0;
    --border: #e2e8f0;
    --bg: #f5f7fa;
    --white: #ffffff;
    
    /* Responsive Spacing & Layout */
    --padding-mobile: 16px;
    --padding-desktop: 24px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Base Responsive Container */
.container {
    width: 100%;
    margin: 0 auto;
    padding-left: var(--padding-mobile);
    padding-right: var(--padding-mobile);
}

@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        padding-left: var(--padding-desktop);
        padding-right: var(--padding-desktop);
    }
}

/* Utilities */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--padding-mobile);
    box-shadow: var(--shadow);
}


html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #edf2f7 100%);
    color: var(--dark);
    line-height: 1.6;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* =================== LOADING SCREEN =================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-out forwards;
    animation-delay: 1.5s;
}

.loading-screen.hide {
    display: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
    margin-bottom: 20px;
}

.loading-screen p {
    color: white;
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.5px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* =================== BOTTOM NAVIGATION =================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    padding: 8px 4px calc(env(safe-area-inset-bottom, 8px) + 8px);
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
    border-radius: 24px 24px 0 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(255,255,255,0.97);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 10px;
    font-weight: 600;
    padding: 6px 0;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    letter-spacing: 0.2px;
}

.btn-save > *,
.det-nav-btn > *,
.chip > * {
    pointer-events: none;
}

.nav-item > * {
    /* Bu qoida ichki elementlar (ikonka, matn) click hodisasini "o'g'irlashini" oldini oladi */
    /* Click to'g'ridan-to'g'ri <button> elementiga o'tadi */
    pointer-events: none;
}

.nav-item i {
    font-size: 20px;
    transition: all 0.25s ease;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: scale(1.1) translateY(-2px);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 0 0 4px 4px;
}

.nav-badge {
    position: absolute;
    top: 0;
    right: calc(50% - 22px);
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    font-weight: 700;
    display: none;
    box-shadow: 0 2px 8px rgba(244,67,54,0.3);
    animation: badgeBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgeBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.add-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white !important;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-top: -28px;
    margin-bottom: 4px;
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
    border: 3px solid var(--white);
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex-direction: column;
    gap: 0 !important;
}

.add-btn i {
    font-size: 22px !important;
    transform: none !important;
}

.add-btn-label {
    font-size: 8px !important;
    font-weight: 700;
    margin-top: -2px;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

.add-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.5);
}

.add-btn:active {
    transform: scale(0.92);
}

/* =================== MAIN CONTENT =================== */
.main-content {
    padding: 20px 16px;
    max-width: 520px;
    margin: 0 auto;
}

.page {
    display: none;
    animation: pageIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.page.active {
    display: block;
}

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

/* =================== PAGE TITLE =================== */
.page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.queue-header .page-title {
    margin: 0;
}

.queue-total {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

/* =================== HOME PAGE =================== */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.welcome-section h1 {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.welcome-section .date {
    color: var(--gray);
    font-size: 14px;
    font-weight: 500;
}

.admin-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: linear-gradient(135deg, var(--light-secondary), var(--white));
    border-radius: 16px;
    color: var(--primary);
    font-size: 22px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.admin-btn:active {
    transform: scale(0.94);
}

/* =================== STATS CARDS =================== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--white);
    padding: 18px 12px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.stat-card i {
    font-size: 26px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
}

.stat-label {
    font-size: 12px;
    color: var(--gray);
    font-weight: 600;
}

/* =================== QUICK ACTIONS =================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.action-btn {
    background: var(--white);
    border: none;
    padding: 14px 10px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
}

.action-btn:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.action-btn:active {
    transform: scale(0.95);
}

.action-btn i {
    font-size: 28px;
    color: var(--primary);
}

.action-btn span {
    font-size: 12px;
    color: var(--dark);
    font-weight: 600;
    text-align: center;
}

/* =================== SECTION HEADER =================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    margin-top: 24px;
}

.section-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.see-all {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.see-all:hover {
    color: var(--primary-dark);
    transform: translateX(4px);
}

/* =================== SEARCH BOX =================== */
.search-box {
    background: var(--white);
    border-radius: 28px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 4px 16px rgba(102,126,234,0.2);
}

.search-box i {
    color: var(--gray);
    font-size: 18px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
    color: var(--dark);
}

.search-box input::placeholder {
    color: var(--gray-light);
}

.search-hint {
    font-size: 11px;
    color: var(--gray);
    margin-top: 5px;
    padding-left: 4px;
}

/* =================== FILTER CHIPS =================== */
.filter-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 0;
    margin-bottom: 18px;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    padding: 10px 18px;
    border: none;
    background: var(--white);
    border-radius: 28px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    white-space: nowrap;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.chip.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(102,126,234,0.3);
}

/* =================== ORDERS LIST =================== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: var(--white);
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--shadow);
    cursor: pointer;
    border-left: 6px solid var(--primary);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    border-left: 6px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.order-card.status-new { border-left-color: var(--warning); }
.order-card.status-active { border-left-color: var(--info); }
.order-card.status-ready_to_wash { border-left-color: var(--secondary); }
.order-card.status-washing { border-left-color: var(--primary); }
.order-card.status-packing { border-left-color: #795548; }
.order-card.status-ready { border-left-color: var(--success); }
.order-card.status-done { border-left-color: var(--gray); opacity: 0.8; }

.order-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.order-card:active {
    transform: scale(0.98);
}

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

.order-id {
    font-weight: 800;
    color: var(--primary);
    font-size: 14px;
    background: var(--light-secondary);
    padding: 4px 12px;
    border-radius: 12px;
}

.order-phone {
    font-weight: 700;
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-items-summary {
    background: var(--bg);
    padding: 10px 14px;
    border-radius: 12px;
    margin: 10px 0;
    font-size: 13px;
    color: var(--dark-secondary);
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.summary-item {
    background: var(--white);
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 12px;
}

.order-details {
    font-size: 13px;
    color: var(--gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* =================== MODALS =================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 2000;
    overflow-y: auto;
    padding: 0; /* Mobile Optimization */
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show {
    display: flex;
    align-items: flex-end; /* Bottom Sheet on mobile */
}

.modal-content {
    background: var(--white);
    border-radius: 30px 30px 0 0; /* Bottom sheet style */
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    max-height: 92vh;
    overflow-y: auto;
    animation: modalSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

.modal-header h2 {
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--dark);
    margin: 0;
    font-weight: 800;
}

.modal-header h2 i {
    color: var(--primary);
    font-size: 26px;
}

.close-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: linear-gradient(135deg, var(--light-secondary), var(--white));
    border-radius: 12px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
}

.close-btn:hover {
    border-color: var(--danger-light);
    color: var(--danger);
    background: linear-gradient(135deg, #ffebee, #fff5f5);
}

.close-btn:active {
    transform: scale(0.92);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px;
    border-top: 2px solid var(--border);
    display: flex;
    gap: 12px;
    background: linear-gradient(135deg, var(--light) 0%, var(--white) 100%);
}

/* =================== FORMS =================== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--dark);
    font-weight: 700;
    font-size: 15px;
}

.form-group label i {
    color: var(--primary);
    margin-right: 8px;
    font-size: 18px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--dark);
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(102,126,234,0.1);
    background: linear-gradient(135deg, rgba(102,126,234,0.02), rgba(118,75,162,0.02));
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-row .form-group {
    margin-bottom: 0;
}

/* =================== CALCULATOR =================== */
.live-calculator {
    background: linear-gradient(135deg, var(--light-secondary) 0%, var(--white) 100%);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 22px;
    border: 2px solid var(--border);
}

.calc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-weight: 600;
}

.calc-item.total {
    border-top: 2px dashed var(--border);
    margin-top: 10px;
    padding-top: 16px;
}

.calc-item strong {
    font-size: 18px;
    color: var(--primary);
}

.calc-item.total strong {
    color: var(--success);
    font-size: 24px;
}

/* =================== UPLOAD =================== */
.upload-area {
    border: 3px dashed var(--border);
    border-radius: 20px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(135deg, var(--light-secondary) 0%, var(--white) 100%);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.upload-area:hover {
    border-color: var(--primary-light);
    background: linear-gradient(135deg, rgba(102,126,234,0.05), rgba(118,75,162,0.05));
    transform: translateY(-2px);
}

.upload-area:active {
    border-color: var(--primary);
    transform: scale(0.98);
}

.upload-area i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.upload-area p {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 15px;
}

.upload-area small {
    color: var(--gray);
    font-size: 13px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.preview-item:hover img {
    transform: scale(1.08);
}

.remove-preview {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.remove-preview:hover {
    transform: scale(1.1);
}

/* =================== BUTTONS =================== */
.btn-save {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102,126,234,0.4);
}

.btn-save:active {
    transform: scale(0.96);
}

.btn-cancel {
    flex: 1;
    background: linear-gradient(135deg, var(--light-secondary), var(--white));
    color: var(--gray);
    border: 2px solid var(--border);
    padding: 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-cancel:hover {
    border-color: var(--gray-light);
    background: var(--light-secondary);
}

.btn-cancel:active {
    transform: scale(0.96);
}

/* =================== ADMIN HINT =================== */
.admin-hint {
    background: linear-gradient(135deg, #f0f3ff, #e3f2fd);
    padding: 14px;
    border-radius: 14px;
    margin-bottom: 18px;
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow);
}

.admin-hint i {
    color: var(--primary);
    font-size: 20px;
}

.admin-hint small {
    color: var(--dark-secondary);
    font-weight: 600;
}

/* =================== DETAILS MODAL =================== */
.details-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.details-img-wrap {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.details-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.details-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: background 0.2s;
}

.details-img-wrap:active .details-img-overlay {
    background: rgba(0,0,0,0.4);
}

.det-header-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 14px;
    color: white;
}

.det-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.det-order-id {
    display: flex;
    flex-direction: column;
}

.det-id-label {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.75;
    letter-spacing: 1.5px;
}

.det-id-num {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.det-status-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.det-header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 600;
}

.det-header-phone i {
    font-size: 14px;
    opacity: 0.75;
}

.det-last4 {
    margin-left: auto;
    font-size: 12px;
    opacity: 0.65;
    background: rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: 10px;
}

.det-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.det-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.det-info-card--full {
    grid-column: 1 / -1;
}

.det-info-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.det-info-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.det-info-label {
    font-size: 10px;
    color: var(--gray);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.det-info-val {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    word-break: break-word;
}

.det-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.det-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.det-progress-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.3s;
}

.det-progress-step span {
    font-size: 9px;
    color: var(--gray);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.det-progress-step.done .det-progress-dot {
    background: #4caf50;
    color: white;
    font-size: 14px;
}

.det-progress-step.done span {
    color: #4caf50;
}

.det-progress-step.active .det-progress-dot {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
    transform: scale(1.15);
}

.det-progress-step.active span {
    color: #667eea;
    font-weight: 700;
}

.det-progress-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 3px;
    margin-bottom: 18px;
}

.det-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 14px;
    padding: 14px 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.det-nav-btn:active {
    transform: scale(0.96);
}

.det-nav-call {
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
}

.det-nav-status {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.det-nav-delete {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    flex: 0 0 52px;
    max-width: 52px;
}

#detailsNavigation {
    display: flex;
    gap: 10px;
    padding: 12px 16px 16px;
}

/* =================== SWIPE BUTTON =================== */
.swipe-container {
    margin: 24px 0;
    border-radius: 40px;
    background: linear-gradient(135deg, #f0f3ff, #e8f0ff);
    padding: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
    animation: containerGlow 3s ease-in-out infinite;
}

@keyframes containerGlow {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
    }
    50% {
        box-shadow: 0 8px 28px rgba(102, 126, 234, 0.3);
    }
}

.swipe-track {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 40px;
    height: 64px;
    position: relative;
    width: 100%;
    user-select: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.swipe-track::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 40px;
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.swipe-thumb {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all 0.1s linear;
    user-select: none;
    -webkit-user-select: none;
    cursor: grab;
}

.swipe-thumb:active {
    cursor: grabbing;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.swipe-thumb i {
    transition: all 0.2s ease;
    animation: thumbPulse 2s ease-in-out infinite;
}

@keyframes thumbPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.swipe-label {
    position: absolute;
    left: 70px;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: 700;
    font-size: 16px;
    z-index: 1;
    user-select: none;
    -webkit-user-select: none;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.swipe-label i {
    font-size: 18px;
    animation: arrowSlide 1.5s ease-in-out infinite;
}

@keyframes arrowSlide {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(8px); }
}

.swipe-label span {
    white-space: nowrap;
}

.swipe-success {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #4caf50 0%, #45a049 100%);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    gap: 12px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    z-index: 3;
    letter-spacing: 0.5px;
}

.swipe-success.show {
    opacity: 1;
    transform: scale(1);
    animation: successBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successBounce {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.swipe-success i {
    font-size: 26px;
    animation: checkmark 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* =================== GALLERY =================== */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}

.gallery-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
}

.gallery-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    z-index: 100001;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100001;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.92);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 100001;
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.gallery-close:active {
    transform: scale(0.92);
}

/* =================== PRODUCT TYPE SELECTOR =================== */
.product-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.product-type-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    user-select: none;
    -webkit-user-select: none;
}

.product-type-card:hover {
    border-color: var(--primary-light);
    background: linear-gradient(135deg, rgba(102,126,234,0.03), rgba(118,75,162,0.02));
}

.product-type-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.05));
    box-shadow: 0 2px 12px rgba(102,126,234,0.15);
}

.product-type-card.selected .pt-check {
    display: flex;
}

.pt-emoji {
    font-size: 24px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.pt-info {
    flex: 1;
    min-width: 0;
}

.pt-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-price {
    font-size: 11px;
    color: var(--success);
    font-weight: 600;
    margin-top: 2px;
}

.pt-check {
    display: none;
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    flex-shrink: 0;
}

/* =================== TOAST =================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 16px;
    right: 16px;
    background: var(--dark);
    color: white;
    padding: 16px 20px;
    border-radius: 16px;
    text-align: center;
    font-weight: 600;
    z-index: 3000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: linear-gradient(135deg, var(--success), var(--success-light));
}

.toast.error {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
}

.toast.info {
    background: linear-gradient(135deg, var(--info), var(--info-light));
}

/* =================== REPORT STATS =================== */
.report-stats-box {
    background: var(--white);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row-label {
    color: var(--gray);
}

.stat-row-value {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}

/* =================== PHONE INPUT =================== */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
    background: var(--white);
}

.phone-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102,126,234,0.12);
}

.phone-prefix {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 14px;
    white-space: nowrap;
    user-select: none;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.phone-input-wrapper input {
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    flex: 1;
    padding: 12px 14px;
    font-size: 16px;
    font-family: inherit;
    letter-spacing: 1.5px;
    font-weight: 600;
    color: var(--dark);
    background: var(--white);
}

/* =================== DETAILS ITEMS LIST =================== */
.det-items-list {
    grid-column: 1 / -1;
    background: var(--light-secondary);
    border-radius: 12px;
    padding: 12px;
    margin-top: -4px;
    border: 1px solid var(--border);
}

.det-items-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.det-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.det-item-name {
    font-size: 13px;
    color: var(--dark);
    font-weight: 600;
    flex: 1;
    min-width: 80px;
}

.det-item-meas {
    font-size: 11px;
    color: var(--gray);
    flex-shrink: 0;
}

.det-item-price {
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.det-comment-box {
    background: var(--light-secondary);
    border: 1px solid var(--border);
    padding: 12px;
    border-radius: 10px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--dark-secondary);
}


.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.empty-state i {
    font-size: 56px;
    color: var(--border);
    margin-bottom: 16px;
    display: block;
}

.empty-state p {
    color: var(--gray);
    font-size: 15px;
    font-weight: 600;
}

/* =================== RESPONSIVE =================== */
@media (max-width: 380px) {
    .stats-cards {
        gap: 10px;
    }
    
    .stat-card {
        padding: 16px 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .quick-actions {
        gap: 10px;
    }
    
    .action-btn {
        padding: 12px 8px;
    }
}

/* =================== TOUCH OPTIMIZATIONS =================== */
input, select, textarea, button {
    font-size: 16px !important;
}

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

::-webkit-scrollbar {
    width: 0;
}
/* =================== REPORT STATS =================== */
.report-stats-box {
    background: var(--white);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 600;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row-label {
    color: var(--gray);
}

.stat-row-value {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}

/* =================== COLLAPSE MENU =================== */
.collapse-menu {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.1);
    padding: 16px 20px;
    z-index: 999;
    min-width: 300px;
    display: none;
}

.collapse-menu.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

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

.collapse-menu-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.collapse-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collapse-menu-item:last-child {
    border-bottom: none;
}

.collapse-menu-item:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.collapse-menu-item i {
    width: 20px;
    color: var(--primary);
    text-align: center;
}

/* =================== NOTIFICATIONS =================== */
.notification-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 5000;
    font-size: 13px;
    font-weight: 600;
    animation: slideDown 0.3s ease-out;
    display: none;
}

.notification-badge.show {
    display: block;
}

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

/* =================== SPINNER =================== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102,126,234,0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

/* =================== TRANSITIONS =================== */
.fade-enter {
    opacity: 0;
    transform: translateY(10px);
}

.fade-enter-active {
    animation: fadeIn 0.3s ease-out;
}

.fade-exit {
    opacity: 1;
    transform: translateY(0);
}

.fade-exit-active {
    animation: fadeOut 0.3s ease-out;
}

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