/* ============================================================
   Inventario — Base Styles
   ============================================================ */

/* Inter font via Google Fonts (loaded in HTML) */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f5f5f7;
    padding-top: 56px; /* fixed navbar offset */
    min-height: 100vh;
    color: #1d1d1f;
}

/* ============================================================
   Layout
   ============================================================ */

.inv-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* ============================================================
   Stat Cards (dashboard)
   ============================================================ */

.stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 1.25rem 1.5rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: default;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6e6e73;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.stat-card .stat-icon {
    font-size: 1.75rem;
    opacity: 0.2;
}

/* ============================================================
   Generic Card Pattern
   ============================================================ */

.inv-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.inv-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e5ea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    background: #fafafa;
}

.inv-card-body {
    padding: 1.25rem;
}

/* ============================================================
   List Items
   ============================================================ */

.inv-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.1s ease;
}

.inv-list-item:last-child {
    border-bottom: none;
}

.inv-list-item:hover {
    background: #f5f5f7;
}

.inv-list-item .item-meta {
    flex: 1;
    min-width: 0;
}

.inv-list-item .item-title {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inv-list-item .item-sub {
    font-size: 0.78rem;
    color: #6e6e73;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   Thumbnails
   ============================================================ */

.thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #e5e5ea;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #aeaeb2;
    font-size: 1.25rem;
}

/* ============================================================
   Wizard / Multi-step flow
   ============================================================ */

.wizard-progress {
    position: sticky;
    top: 56px; /* below fixed navbar */
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e5e5ea;
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.wizard-progress .progress {
    height: 6px;
    border-radius: 3px;
}

.wizard-progress .step-label {
    font-size: 0.78rem;
    color: #6e6e73;
    margin-bottom: 0.25rem;
}

.wizard-body {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    min-height: calc(100vh - 180px);
}

.wizard-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #e5e5ea;
    padding: 0.75rem 1rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn-inv {
    min-height: 44px;
    border-radius: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-inv-primary {
    background: #0891b2;
    border-color: #0891b2;
    color: #fff;
}

.btn-inv-primary:hover {
    background: #0e7490;
    border-color: #0e7490;
    color: #fff;
}

/* ============================================================
   Camera / Scanner Area
   ============================================================ */

.camera-area {
    background: #1a1a1a;
    min-height: 300px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.camera-area #qr-reader {
    width: 100%;
}

.camera-area .camera-placeholder {
    color: #6e6e73;
    text-align: center;
    padding: 2rem;
}

.camera-area .camera-placeholder i {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
    color: #aeaeb2;
}

/* ============================================================
   Estante / Shelf Cards
   ============================================================ */

.estante-card {
    border: 2px solid #e5e5ea;
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: #fff;
}

.estante-card:hover {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1);
}

.estante-card.selected {
    border-color: #0891b2;
    background: #f0f9ff;
}

.estante-card .estante-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.estante-card .estante-meta {
    font-size: 0.78rem;
    color: #6e6e73;
    margin-top: 0.2rem;
}

/* ============================================================
   Search Input
   ============================================================ */

.inv-search {
    border-radius: 10px;
    border: 1.5px solid #d1d1d6;
    padding: 0.5rem 0.9rem;
    font-size: 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: #fff;
}

.inv-search:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.15);
}

.inv-search::placeholder {
    color: #aeaeb2;
}

/* ============================================================
   Badges & misc
   ============================================================ */

.badge-stock-ok    { background: #22c55e; color: #fff; }
.badge-stock-low   { background: #f59e0b; color: #fff; }
.badge-stock-empty { background: #ef4444; color: #fff; }

/* ============================================================
   Responsive — 768px breakpoint
   ============================================================ */

@media (max-width: 768px) {
    .inv-container {
        padding: 1rem 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .wizard-body {
        padding: 1rem 0.75rem;
    }

    .wizard-actions {
        padding: 0.6rem 0.75rem;
    }

    .inv-card-body {
        padding: 1rem;
    }

    .inv-list-item {
        padding: 0.65rem 1rem;
    }

    .camera-area {
        min-height: 260px;
    }

    .btn-inv {
        min-height: 40px;
        font-size: 0.9rem;
    }
}
