/* --- Global Styles --- */
:root {
    --primary-color: #2563eb;
    --success-color: #16a34a;
    --dark-bg: #1e293b;
    --thermal-width: 80mm;
}

body {
    background-color: #f8fafc;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
}

/* --- Login Page Styling --- */
.login-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: white;
}

/* --- Main Dashboard & Forms --- */
.container {
    max-width: 800px;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.btn-primary {
    background-color: var(--primary-color);
    border: none;
    padding: 12px;
    font-weight: 600;
}

.form-label {
    font-weight: 500;
    color: #475569;
}

/* --- QR Tracking Scanner View --- */
#reader {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--primary-color) !important;
}

/* --- 80mm Thermal Invoice Preview --- */
#invoice-print {
    width: var(--thermal-width);
    margin: 20px auto;
    background: #ffffff;
    padding: 15px;
    border: 1px dashed #cbd5e1;
    color: #000;
}

.invoice-header {
    text-align: center;
    border-bottom: 1px dashed #000;
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.invoice-body p {
    margin: 5px 0;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
}

.qr-holder {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
}

/* --- Printing Logic (The most important part) --- */
@media print {
    /* Hide everything except the invoice */
    body * {
        visibility: hidden;
    }
    
    #invoice-print, #invoice-print * {
        visibility: visible;
    }
    
    #invoice-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        border: none;
        padding: 0;
        margin: 0;
    }

    /* Hide buttons and navigation during print */
    .no-print {
        display: none !important;
    }
}

/* --- PWA "App-like" Feel --- */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}


@media (min-width: 992px) {
    #mainSearch {
        border-radius: 20px 0 0 20px !important;
    }
    .input-group button {
        border-radius: 0 20px 20px 0 !important;
    }
}
@media print {
    /* Hide everything that isn't the invoice */
    body * { visibility: hidden; }
    .no-print, nav, footer, .btn, input { display: none !important; }

    /* Show the invoice template specifically */
    #printableInvoice, #printableInvoice * { 
        visibility: visible; 
    }
    #printableInvoice {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
    }
}

/* On-screen styling */
.cursor-pointer { cursor: pointer; transition: 0.2s; }
.cursor-pointer:hover { transform: scale(1.05); }
/* Login Page Styles */
        body { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); height: 100vh; display: flex; align-items: center; }
        .login-card { border-radius: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
        .btn-primary { background: #2563eb; border: none; padding: 12px; }
        /* Styling to make the eye button look clean */
    .input-group-text {
        background: transparent;
        border-left: none;
        cursor: pointer;
    }
    .password-input {
        border-right: none;
    }

    @keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
    100% { transform: translateX(0); }
}