@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* { font-family: 'Inter', sans-serif; }

/* ===== GLASSMORPHISM ===== */
.glass { 
    backdrop-filter: blur(12px); 
    background: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.3);
}
.dark .glass { 
    background: rgba(15,23,42,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ===== UPLOAD ZONE ===== */
.upload-zone { 
    border: 2px dashed #cbd5e1; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255,255,255,0.5);
}
.upload-zone:hover, .upload-zone.dragover { 
    border-color: #3b82f6; 
    background: #eff6ff; 
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(59,130,246,0.3);
}
.dark .upload-zone { border-color: #334155; background: rgba(30,41,59,0.5); }
.dark .upload-zone:hover { 
    border-color: #60a5fa; 
    background: rgba(30,58,138,0.3);
    box-shadow: 0 10px 30px -10px rgba(96,165,250,0.2);
}

/* ===== PRODUCT CARD ===== */
.stock-card { 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}
.stock-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
    transform: scaleX(0);
    transition: transform 0.3s;
}
.stock-card:hover { 
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
}
.stock-card:hover::before {
    transform: scaleX(1);
}
.dark .stock-card:hover {
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.4);
}

/* ===== SEARCH HIGHLIGHT ===== */
.search-highlight { 
    background: linear-gradient(120deg, rgba(59,130,246,0.3) 0%, rgba(59,130,246,0.2) 100%);
    padding: 0 3px;
    border-radius: 4px;
    font-weight: 600;
    color: inherit;
}
.dark .search-highlight {
    background: linear-gradient(120deg, rgba(96,165,250,0.4) 0%, rgba(96,165,250,0.2) 100%);
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn { 
    from { transform: translateX(100%); opacity: 0; } 
    to { transform: translateX(0); opacity: 1; } 
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(2); opacity: 0; }
}

.toast { 
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* ===== SPEC ROWS ===== */
.spec-row { 
    display: flex; 
    justify-content: space-between; 
    padding: 12px 0; 
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}
.spec-row:hover {
    background-color: rgba(59,130,246,0.03);
    margin: 0 -12px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 8px;
}
.dark .spec-row { border-bottom-color: #334155; }
.dark .spec-row:hover {
    background-color: rgba(96,165,250,0.05);
}
.spec-row:last-child { border-bottom: none; }

/* ===== UTQG BADGES ===== */
.utqg-badge { 
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: transform 0.2s;
}
.utqg-badge:hover {
    transform: scale(1.05);
}

/* ===== FILTER BUTTONS ===== */
.filter-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.filter-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
}
.filter-btn:hover::after {
    animation: shimmer 0.6s ease-out;
}
@keyframes shimmer {
    to { transform: translateX(100%); }
}
.filter-btn.active {
    box-shadow: 0 4px 14px -4px rgba(59,130,246,0.4);
}

/* ===== WAREHOUSE BADGES ===== */
.warehouse-badge {
    transition: all 0.2s;
}
.warehouse-badge:hover {
    transform: translateY(-1px);
}

/* ===== MODAL ===== */
.modal-backdrop {
    backdrop-filter: blur(4px);
    transition: opacity 0.3s;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb {
    background: #475569;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ===== OPERATOR MODE ===== */
.operator-mode { 
    user-select: none;
}
.operator-mode .stock-card {
    position: relative;
}
.operator-mode .stock-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0,0,0,0.01) 10px,
        rgba(0,0,0,0.01) 20px
    );
}

/* ===== BUTTONS ===== */
button, .btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
button:active, .btn:active {
    transform: scale(0.98);
}

/* ===== INPUTS ===== */
input, select, textarea {
    transition: all 0.2s;
}
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* ===== DASHBOARD CARDS (Analytics) ===== */
.dashboard-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.15);
}
.dark .dashboard-card:hover {
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.4);
}

/* ===== HEATMAP CELLS ===== */
.heatmap-cell {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.heatmap-cell:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(59,130,246,0.02) 100%);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
    transform: translate(30%, -30%);
}
.dark .stat-card {
    background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(30,41,59,0.5) 100%);
}

/* ===== SIDEBAR LINKS ===== */
.sidebar-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: #3b82f6;
    border-radius: 0 3px 3px 0;
    transition: height 0.2s;
}
.sidebar-link:hover, .sidebar-link.active {
    background: rgba(59,130,246,0.08);
    color: #3b82f6;
}
.sidebar-link.active::before {
    height: 60%;
}
.dark .sidebar-link:hover, .dark .sidebar-link.active {
    background: rgba(59,130,246,0.15);
}

/* ===== PERIOD BUTTONS ===== */
.period-btn {
    transition: all 0.2s;
}
.period-btn:not(.bg-blue-600):hover {
    background-color: rgba(59,130,246,0.1);
}

/* ===== TAB BUTTONS ===== */
.tab-btn {
    position: relative;
}
.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
}

/* ===== PROGRESS BARS ===== */
.progress-bar {
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LOADING SKELETON ===== */
@keyframes skeleton {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s infinite;
}
.dark .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200px 100%;
}

/* ===== TOOLTIPS ===== */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 6px 12px;
    background: #1e293b;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
}
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 640px) {
    .stock-card {
        padding: 1rem;
    }
    .stock-card h3 {
        font-size: 1rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .glass, header, footer, button {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
