/* Custom scrollbar for better UI */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1; 
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

/* Transitions */
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Checkbox styling */
.custom-checkbox {
    accent-color: #4f46e5; /* indigo-600 */
}

/* Product card hover effect */
.product-card {
    position: relative;
    border-radius: 1.25rem;
    border-color: rgba(226, 232, 240, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 20px 40px -30px rgba(15, 23, 42, 0.28);
    transition: transform 0.22s ease-in-out, box-shadow 0.22s ease-in-out, border-color 0.22s ease-in-out;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(199, 210, 254, 0.95);
    box-shadow: 0 28px 48px -32px rgba(79, 70, 229, 0.28);
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.9) 0%, rgba(129, 140, 248, 0.7) 55%, rgba(16, 185, 129, 0.65) 100%);
}

.product-card__body {
    gap: 0.2rem;
}

.product-card__header {
    gap: 0.75rem;
}

.product-card__badge {
    padding: 0.4rem 0.72rem;
    border-radius: 9999px;
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.95) 0%, rgba(224, 231, 255, 0.8) 100%);
    border-color: rgba(199, 210, 254, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.product-card__code {
    padding: 0.38rem 0.68rem;
    border-radius: 0.8rem;
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.product-card__title {
    font-size: 1.08rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.product-card__meta {
    color: #64748b;
}

.product-card__specs {
    gap: 0.7rem;
}

.product-card__spec {
    min-height: 5rem;
    padding: 0.78rem 0.8rem;
    border-radius: 1rem;
    border-color: rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.product-card__spec-label {
    margin-bottom: 0.38rem;
    letter-spacing: 0.08em;
    color: #64748b;
}

.product-card__spec-value {
    font-size: 0.98rem;
    line-height: 1.35;
}

.product-card__footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top-color: rgba(226, 232, 240, 0.95);
}

.product-card__price-label {
    color: #64748b;
}

.product-card__price {
    letter-spacing: -0.03em;
    text-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}

/* Line clamp for product descriptions */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

/* Auth overlays and modals */
.auth-overlay,
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.72);
}

.auth-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal {
    overflow-y: auto;
}

.auth-overlay.hidden,
.auth-modal.hidden {
    display: none !important;
}

.auth-overlay-card,
.auth-modal-card {
    width: 100%;
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 1);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}

.auth-modal-card {
    margin: 2rem auto;
}

.auth-modal-card-sm {
    max-width: 32rem;
}

.auth-modal-card-lg {
    max-width: 72rem;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
}

.auth-admin-layout {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
}

#adminModal .overflow-x-auto {
    max-height: calc(100vh - 17rem);
    overflow: auto;
}

@media (min-width: 1024px) {
    .auth-admin-layout {
        grid-template-columns: 20rem minmax(0, 1fr);
        align-items: start;
    }
}

.header-brand-title {
    white-space: nowrap;
}

.header-action-btn {
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
}

.mobile-menu-trigger {
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    margin-left: 0.125rem;
}

.mobile-account-trigger {
    min-width: 3.25rem;
    height: 2.75rem;
    padding: 0 0.625rem;
    flex-shrink: 0;
    box-shadow: 0 6px 18px -14px rgba(79, 70, 229, 0.45);
}

.mobile-account-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    color: #4338ca;
}

.mobile-account-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.mobile-account-caret {
    font-size: 0.72rem;
    color: #9ca3af;
}

.mobile-account-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(15, 23, 42, 0.14);
    border: 0;
}

.mobile-account-menu-card {
    overflow: hidden;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 48px -24px rgba(15, 23, 42, 0.38);
}

.mobile-account-menu-header {
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.95) 0%, rgba(255, 255, 255, 0.96) 100%);
}

.mobile-account-action {
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.mobile-account-action:active {
    transform: scale(0.99);
}

.mobile-account-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 9999px;
    background: #f3f4f6;
}

.mobile-account-action-danger .mobile-account-action-icon-danger {
    background: #fff1f2;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.96);
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 14px 30px -24px rgba(15, 23, 42, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.export-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px -24px rgba(15, 23, 42, 0.28);
}

.export-btn:disabled {
    cursor: not-allowed;
    color: #9ca3af;
    border-color: #e5e7eb;
    background: #f8fafc;
    box-shadow: none;
}

.export-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: #f3f4f6;
    font-size: 0.95rem;
}

.export-btn-csv {
    border-color: rgba(129, 140, 248, 0.28);
    color: #4338ca;
    background: linear-gradient(180deg, rgba(238, 242, 255, 0.72) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.export-btn-csv .export-btn-icon {
    background: #e0e7ff;
    color: #4338ca;
}

.export-btn-csv:hover:not(:disabled) {
    border-color: rgba(99, 102, 241, 0.4);
    background: linear-gradient(180deg, rgba(224, 231, 255, 0.9) 0%, rgba(255, 255, 255, 1) 100%);
}

.export-btn-xlsx {
    border-color: rgba(16, 185, 129, 0.24);
    color: #047857;
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.82) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.export-btn-xlsx .export-btn-icon {
    background: #d1fae5;
    color: #047857;
}

.export-btn-xlsx:hover:not(:disabled) {
    border-color: rgba(5, 150, 105, 0.38);
    background: linear-gradient(180deg, rgba(209, 250, 229, 0.92) 0%, rgba(255, 255, 255, 1) 100%);
}

.export-btn:disabled .export-btn-icon {
    background: #e5e7eb;
    color: #9ca3af;
}

.mobile-menu-trigger i {
    font-size: 1.375rem;
    line-height: 1;
}

@media (max-width: 767px) {
    .header-action-btn {
        width: 2.25rem;
        height: 2.25rem;
    }

    .mobile-account-trigger {
        min-width: 3rem;
        height: 2.625rem;
        padding: 0 0.55rem;
    }

    .mobile-account-menu-card {
        width: min(15rem, calc(100vw - 1rem));
    }

    .export-btn {
        padding: 0.85rem 1rem;
        border-radius: 1.05rem;
    }

    .product-card {
        border-radius: 1.1rem;
    }

    .product-card__body {
        padding: 1.15rem;
    }

    .product-card__title {
        font-size: 1rem;
    }

    .product-card__spec {
        min-height: 4.7rem;
        padding: 0.72rem 0.74rem;
    }

    .product-card__price {
        font-size: 1.65rem;
    }

    .header-brand-title {
        font-size: 1.125rem;
        max-width: 6.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
