* {
    -webkit-tap-highlight-color: transparent;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #10b981;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #10b981;
}

.admin-badge {
    background: #8b5cf6;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
}

.user-badge {
    background: #3b82f6;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
}

.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateX(0);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-item {
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
}

.menu-item:hover {
    background: #f0fdf4;
    color: #10b981;
}

.menu-item:active {
    transform: scale(0.97);
}

.menu-section-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px 4px 16px;
    color: #9ca3af;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
}

/* Admin Dropdown */
.admin-dropdown {
    position: relative;
}

.admin-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 220px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.25s ease;
    border: 1px solid #f0f0f0;
    z-index: 100;
}

.admin-dropdown:hover .dropdown-menu,
.admin-dropdown .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.admin-dropdown .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: #374151;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.admin-dropdown .dropdown-menu .dropdown-item:hover {
    background: #f0fdf4;
    color: #10b981;
}

.admin-dropdown .dropdown-menu .dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 14px;
}

.admin-dropdown .dropdown-menu .dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 12px;
}

.admin-dropdown .dropdown-menu .dropdown-header {
    padding: 8px 18px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none !important;
    }

    .mobile-toggle {
        display: flex !important;
    }

    .admin-dropdown .dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        max-height: 70vh;
        overflow-y: auto;
    }

    .admin-dropdown .dropdown-menu.show {
        transform: translateY(0);
    }

    .admin-dropdown .dropdown-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .admin-dropdown .dropdown-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (min-width: 769px) {
    .mobile-toggle {
        display: none !important;
    }

    .desktop-nav {
        display: flex !important;
    }
}

/* ============================================
           ADMIN SUB NAVIGATION
           ============================================ */
.admin-sub-nav {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    padding: 8px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 2px solid #5b21b6;
}

.admin-sub-nav::-webkit-scrollbar {
    display: none;
}

.admin-sub-nav .nav-link {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    padding: 6px 18px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    position: relative;
    border-radius: 6px;
}

.admin-sub-nav .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.admin-sub-nav .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.admin-sub-nav .nav-link i {
    margin-right: 6px;
    font-size: 12px;
}

.admin-sub-nav .nav-link .badge {
    background: #ef4444;
    color: white;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 10px;
    margin-left: 4px;
    vertical-align: top;
}

.admin-sub-nav .separator {
    color: rgba(255, 255, 255, 0.15);
    font-size: 14px;
    display: inline-block;
}

/* Admin Sub Nav Mobile */
@media (max-width: 640px) {
    .admin-sub-nav .nav-link {
        font-size: 11px;
        padding: 4px 12px;
    }

    .admin-sub-nav .nav-link i {
        margin-right: 4px;
        font-size: 10px;
    }
}

.item-detail {
    max-width: 800px;
    margin: 0 auto;
}

.item-detail .back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.2s ease;
}

.item-detail .back-btn:hover {
    color: #10b981;
}

.item-card-detail {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    margin-bottom: 32px;
}

.item-card-detail .emoji {
    font-size: 72px;
    display: block;
    text-align: center;
    margin-bottom: 12px;
}

.item-card-detail .name {
    font-size: 28px;
    font-weight: 800;
    color: #1f2937;
    text-align: center;
    margin-bottom: 4px;
}

.item-card-detail .price {
    font-size: 24px;
    font-weight: 700;
    color: #10b981;
    text-align: center;
    margin-bottom: 16px;
}

.item-card-detail .rating-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 16px;
}

.item-card-detail .rating-summary .stars {
    font-size: 20px;
    color: #f59e0b;
    letter-spacing: 2px;
}

.item-card-detail .rating-summary .rating-text {
    font-size: 14px;
    color: #6b7280;
}

.item-card-detail .rating-summary .rating-text strong {
    color: #1f2937;
    font-weight: 700;
}

.item-card-detail .description {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.8;
    text-align: center;
    padding: 12px 0;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

/* Reviews Section */
.reviews-section {
    background: white;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
}

.reviews-section .section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reviews-section .section-title .badge {
    background: #f3f4f6;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 600;
}

.review-item {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.review-item:last-child {
    border-bottom: none;
}

.review-item .review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 4px;
}

.review-item .review-header .review-name {
    font-weight: 600;
    font-size: 15px;
    color: #1f2937;
}

.review-item .review-header .review-stars {
    font-size: 16px;
    color: #f59e0b;
    letter-spacing: 2px;
}

.review-item .review-date {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.review-item .review-comment {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.no-reviews .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* Review Form */
.review-form-container {
    margin-top: 24px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.review-form-container .form-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-form-container .form-group {
    margin-bottom: 14px;
}

.review-form-container .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 4px;
}

.review-form-container .form-group label .required {
    color: #ef4444;
}

.review-form-container .form-group input,
.review-form-container .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
}

.review-form-container .form-group input:focus,
.review-form-container .form-group textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.review-form-container .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.review-form-container .rating-select {
    display: flex;
    gap: 10px;
    margin: 6px 0 4px;
    flex-wrap: wrap;
}

.review-form-container .rating-select button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    background: white;
    font-size: 14px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.review-form-container .rating-select button:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    transform: scale(1.05);
}

.review-form-container .rating-select button.active {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #92400e;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.review-form-container .rating-select button .star-icon {
    font-size: 12px;
    display: none;
}

.review-form-container .rating-select button.active .star-icon {
    display: inline;
}

.review-form-container .rating-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    min-height: 20px;
}

.review-form-container .submit-review-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.review-form-container .submit-review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.review-form-container .submit-review-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.already-reviewed {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
}

.already-reviewed p {
    font-size: 14px;
    color: #065f46;
    margin: 0;
}

.already-reviewed .icon {
    font-size: 24px;
    display: block;
    margin-bottom: 4px;
}

.review-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    margin-top: 16px;
    display: none;
}

.review-success p {
    font-size: 14px;
    color: #065f46;
    margin: 0;
}

.review-success .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 640px) {
    .item-card-detail {
        padding: 20px;
    }

    .item-card-detail .emoji {
        font-size: 48px;
    }

    .item-card-detail .name {
        font-size: 22px;
    }

    .item-card-detail .price {
        font-size: 20px;
    }

    .reviews-section {
        padding: 20px;
    }

    .review-form-container {
        padding: 16px;
    }

    .review-form-container .rating-select button {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
}


.filter-btn {
    transition: all 0.3s ease;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.filter-btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.filter-btn:active {
    transform: scale(0.95);
}

.order-card {
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
}

.order-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Date Section */
.date-section {
    margin-bottom: 28px;
}

.date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 8px;
}

.date-header .date-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-header .date-text {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.date-header .order-count {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 10px;
    border-radius: 12px;
}

.date-header .date-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}

.date-header .date-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
}

.date-header .date-stats .stat-item .amount {
    font-weight: 700;
    color: #10b981;
    font-size: 14px;
}

.date-header .date-stats .stat-item .count {
    font-weight: 600;
    color: #1f2937;
}

/* Date Summary Card */
.date-summary {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border: 1px solid #bbf7d0;
}

.date-summary .summary-label {
    font-size: 13px;
    font-weight: 500;
    color: #065f46;
}

.date-summary .summary-numbers {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
}

.date-summary .summary-numbers span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.date-summary .summary-numbers .total-amount {
    font-weight: 700;
    color: #059669;
    font-size: 16px;
}

/* Overall Stats */
.overall-stats {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 8px 4px;
}

.stat-item .number {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.stat-item .label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.stat-item .number.green {
    color: #10b981;
}

.stat-item .number.yellow {
    color: #d97706;
}

.stat-item .number.red {
    color: #dc2626;
}

/* Day-wise Collection Summary */
.collection-summary {
    background: white;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.collection-summary .summary-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.collection-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.collection-item:hover {
    border-color: #10b981;
    background: #f0fdf4;
    transform: translateY(-2px);
}

.collection-item .day-label {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collection-item .day-label .day-name {
    font-weight: 400;
    color: #6b7280;
    font-size: 10px;
}

.collection-item .day-amount {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    margin-top: 4px;
}

.collection-item .day-counts {
    display: flex;
    gap: 12px;
    margin-top: 6px;
    font-size: 11px;
    color: #6b7280;
}

.collection-item .day-counts span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.collection-item .day-counts .count-pending {
    color: #d97706;
}

.collection-item .day-counts .count-completed {
    color: #059669;
}

.collection-item .day-counts .count-cancelled {
    color: #dc2626;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    padding: 24px;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
}

@media (max-width: 640px) {
    .date-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-header .date-stats {
        width: 100%;
        justify-content: space-between;
    }

    .date-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .date-summary .summary-numbers {
        width: 100%;
        justify-content: space-between;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}