/* style.css - Refined for Mobile/Tablet UX */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* Navbar Tweaks to match clean style */
.commetoi-navbar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 15px;
}

/* SCANNER BODY SPECIFIC */
.scanner-body {
    height: 100vh;
    overflow: hidden;
    /* Prevent scrolling on scanner page for app-like feel */
    display: flex;
    flex-direction: column;
}

.scanner-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center vertically */
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    gap: 15px;
}

.input-block {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 15px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}

.input-block:focus-within {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.input-block label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 600;
}

.huge-input {
    width: 100%;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    padding: 15px;
    /* Comfortable touch area */
    font-size: 1.8rem;
    /* Big text */
    text-align: center;
    background: #fdfdfd;
    box-sizing: border-box;
    outline: none;
    font-family: monospace;
    /* Better for codes */
    font-weight: bold;
    color: #2d3748;
    transition: all 0.2s;
}

/* Specific Colors */
.internal-block .huge-input:focus {
    border-color: #48bb78;
    /* Green focus */
    background-color: #f0fff4;
}

.supplier-block .huge-input:focus {
    border-color: #4299e1;
    /* Blue focus */
    background-color: #ebf8ff;
}

.huge-input:disabled {
    background: #edf2f7;
    color: #a0aec0;
    border-color: transparent;
}

.huge-input.valid {
    border-color: #48bb78;
    background-color: #f0fff4;
    color: #2f855a;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%2348bb78" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.connector-arrow {
    text-align: center;
    color: #cbd5e0;
    font-size: 1.5rem;
    margin: -5px 0;
}

.instructions-footer {
    text-align: center;
    color: #a0aec0;
    margin-top: 20px;
    font-size: 0.85rem;
}

/* OVERLAY */
#status_overlay {
    position: fixed;
    inset: 0;
    /* Cover screen */
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

#status_overlay.show-status {
    opacity: 1;
}

#status_text {
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    padding: 20px;
}

.bg-success {
    background: rgba(72, 187, 120, 0.95) !important;
}

.bg-error {
    background: rgba(245, 101, 101, 0.95) !important;
}

/* Dashboard & Other Pages (Keep existing styles mostly but refined) */
.container {
    width: 90%;
    max-width: 1200px;
    background: #fff;
    padding: 2rem;
    margin: 2rem auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn {
    display: inline-block;
    background: #4299e1;
    color: #fff;
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.btn:hover {
    background: #3182ce;
}

.btn-danger {
    background: #e53e3e;
}

.btn-danger:hover {
    background: #c53030;
}

.missing-container {
    padding: 10px;
    max-width: 800px;
    margin: 0 auto;
}

.item-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .huge-input {
        font-size: 1.4rem;
        padding: 12px;
    }

    .scanner-container {
        padding: 10px;
    }
}