/* ============================================
   CookieTrack - Custom Styles
   Smart Inventory & POS Platform
   ============================================ */

/* ---- Base Styles ---- */
:root {
    --color-primary: #111827;
    --color-secondary: #2563EB;
    --color-accent: #22C55E;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ---- Typography ---- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Form Styles ---- */
input:focus, select:focus, textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--color-secondary);
}

/* ---- Table Styles ---- */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---- Loading Spinner ---- */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--color-secondary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---- POS Specific ---- */
.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .pos-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

.pos-product-card {
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.pos-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pos-product-card:active {
    transform: translateY(0);
}

/* ---- Receipt Print Styles ---- */
@media print {
    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    body {
        background: white;
        font-size: 12px;
    }

    .receipt {
        width: 80mm;
        margin: 0 auto;
        padding: 5mm;
    }

    .receipt-header {
        text-align: center;
        border-bottom: 1px dashed #000;
        padding-bottom: 5mm;
        margin-bottom: 3mm;
    }

    .receipt-footer {
        text-align: center;
        border-top: 1px dashed #000;
        padding-top: 5mm;
        margin-top: 3mm;
    }

    .receipt-items th,
    .receipt-items td {
        padding: 1mm 0;
        font-size: 11px;
    }
}

/* ---- Animations ---- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* ---- Badge Styles ---- */
.badge-pro {
    background: linear-gradient(135deg, #2563EB, #7C3AED);
    color: white;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-free {
    background: #f3f4f6;
    color: #6b7280;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ---- Status Indicators ---- */
.status-active {
    color: #22C55E;
}

.status-inactive {
    color: #EF4444;
}

.status-pending {
    color: #F59E0B;
}

/* ---- Landing Page ---- */
.hero-gradient {
    background: linear-gradient(135deg, #111827 0%, #1e3a5f 50%, #111827 100%);
}

.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* ---- Responsive Utilities ---- */
@media (max-width: 640px) {
    .mobile-full {
        width: 100% !important;
    }
}
