@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Outfit', sans-serif;
    background-color: #0f172a; /* slate-900 */
    color: #f8fafc; /* slate-50 */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #1e293b; 
}
::-webkit-scrollbar-thumb {
    background: #334155; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569; 
}

/* Glassmorphism utilities */
.glass {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: linear-gradient(145deg, rgba(30,41,59,0.9) 0%, rgba(15,23,42,0.9) 100%);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
}

/* Custom Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Print Styles — 80mm Thermal Printer */
@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }

    html, body {
        width: 80mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        height: auto !important;
    }

    body * { visibility: hidden; }

    #print-modal,
    #print-modal * { visibility: visible; }

    #print-modal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 80mm !important;
        background: #fff !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #receipt-card {
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        transform: none !important;
        margin: 0 !important;
        padding: 4mm !important;
    }

    .no-print { display: none !important; }
}

/* Receipt UI Components */
.receipt-divider {
    width: 100%;
    border: none;
    border-top: 1px dashed #000;
    margin: 4px 0;
}

.receipt-divider-double {
    border-top: 3px double #000;
}

.receipt-divider-thick {
    border-top: 2px solid #000;
}

.receipt-items-body {
    display: block;
    width: 100%;
    padding: 2px 4px;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 3.5px 0;
    font-size: 15px;
    color: #000;
    border-bottom: 1px dotted #ccc;
    font-weight: 900;
}

.receipt-item-row:last-child {
    border-bottom: none;
}

.receipt-item-name {
    flex: 1;
    padding-right: 4px;
    line-height: 1.3;
    font-weight: 900;
    word-break: break-word;
}

.receipt-item-qty {
    width: 50px;
    text-align: center;
    color: #000;
    font-weight: 900;
}

.receipt-item-amount {
    width: 100px;
    text-align: right;
    font-weight: 950;
    white-space: nowrap;
}

.receipt-footer-decoration {
    text-align: center;
    font-size: 8px;
    color: #000;
    letter-spacing: 5px;
    margin: 8px 0;
}

.receipt-barcode {
    display: flex;
    justify-content: center;
    gap: 1px;
    margin: 8px auto 0;
    width: 80px;
    height: 16px;
}

.receipt-barcode::before {
    content: '||| || | ||| || | || ||| | |||| | ||| || | |||';
    font-size: 5px;
    letter-spacing: 1px;
    color: #000;
    font-family: monospace;
}

/* ── Mobile Responsive ─────────────────────────────── */
@media (max-width: 767px) {
    /* Push main content below the fixed top bar */
    main {
        padding-top: 4.5rem !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        height: 100svh !important;
    }

    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }

    /* Stack grid columns to single column */
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .sm\:grid-cols-2,
    .sm\:grid-cols-3,
    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .md\:grid-cols-4 {
        grid-template-columns: 1fr !important;
    }

    /* Make tables scrollable horizontally */
    .overflow-x-auto,
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Full-width inputs and selects */
    select, input[type="text"], input[type="number"],
    input[type="search"], input[type="email"], textarea {
        max-width: 100% !important;
    }

    /* Shrink large padding containers */
    .p-8 { padding: 1rem !important; }
    .p-6 { padding: 0.75rem !important; }
}
