/* === Carregamento Item - CSS === */
/* Baseado em ajustedados_item.css com cores roxas/violetas para Carregamento */

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #0f172a;
    --surface: #1e293b;
    --border: #475569;
    --text: #f8fafc;
    --muted: #64748b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.game-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0e17 0%, var(--bg) 100%);
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--surface);
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.btn-back {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.header-center {
    flex: 1;
    padding: 0 1rem;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.header-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

.header-timer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 700;
}

.header-timer.running {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary-light);
}

/* Content */
.app-content {
    padding: 1.5rem;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Progress */
.progress-section {
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.progress-label {
    color: var(--muted);
    font-weight: 600;
}

.progress-count {
    color: var(--text);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.progress-bar {
    height: 8px;
    background: var(--surface);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.5s ease-out;
}

/* Product Card */
.product-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.05));
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.product-order {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
}

.product-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.product-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.product-tag {
    padding: 0.25rem 0.625rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}

.product-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-box {
    background: var(--surface);
    padding: 0.875rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
}

/* Collection Card */
.collection-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.collection-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.collection-icon {
    width: 36px;
    height: 36px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.125rem;
}

.collection-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-skip,
.btn-complete {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.875rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-skip {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
}

.btn-skip:hover {
    background: var(--warning);
    border-color: var(--warning);
    color: white;
    transform: translateY(-2px);
}

.btn-complete {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-complete:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

/* State Screens */
.state-screen {
    text-align: center;
    padding: 3rem 1.5rem;
}

.state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.state-icon.success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.state-icon.error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.state-icon.waiting {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary);
}

.state-icon.active {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.state-description {
    color: var(--muted);
    margin-bottom: 2rem;
}

.state-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.state-btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.state-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* === NOVOS ESTILOS PARA LISTA DE ITENS === */

/* Scanner Card */
.scanner-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.1));
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.scanner-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-weight: 700;
}

.scanner-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg);
    border: 2px solid var(--primary);
    border-radius: 12px;
    color: var(--text);
    font-size: 1.1rem;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s;
}

.scanner-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

.scanner-feedback {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted);
}

/* Scanner Feedback Bar (Input Invisível) */
.scanner-feedback-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(124, 58, 237, 0.1));
    border: 1px solid var(--primary);
    border-radius: 12px;
    margin-bottom: 1rem;
    color: var(--primary-light);
    font-size: 1rem;
}

.scanner-feedback-bar i {
    font-size: 1.25rem;
}

.scanner-feedback-bar .scanner-feedback {
    margin: 0;
    font-weight: 600;
}

/* Items List */
.items-list {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.list-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.item-count {
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 600;
}

/* Item Card - New Layout with Side Buttons */
.item-card {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    /* Evitar layout shift */
    contain: layout;
}

.item-selector {
    flex: 1;
    display: block;
    cursor: pointer;
}

.item-selector input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s, background-color 0.2s;
    min-height: 70px;
    /* Altura fixa para evitar pulos */
    height: auto;
}

.item-selector input[type="radio"]:checked+.item-content {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-tags {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.tag {
    padding: 0.125rem 0.375rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.625rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
}

.tag-id {
    color: var(--primary-light);
    border-color: rgba(139, 92, 246, 0.3);
}

.tag-code {
    color: var(--text);
    border-color: var(--border);
    font-weight: 700;
}

/* Quantity Display */
.item-quantity-display {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
}

.item-quantity-display .qty-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success);
}

.item-quantity-display .qty-total {
    font-size: 0.875rem;
    color: var(--muted);
}

/* Side Buttons */
.qty-btn {
    width: 48px;
    min-width: 48px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.2s;
}

.qty-btn-decrease {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.qty-btn-decrease:hover {
    background: var(--danger);
    color: white;
}

.qty-btn-increase {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.qty-btn-increase:hover {
    background: var(--success);
    color: white;
}

.qty-btn:active {
    opacity: 0.8;
}

/* Item Status */
.item-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-mini {
    width: 50px;
    height: 6px;
    background: var(--bg);
    border-radius: 99px;
    overflow: hidden;
}

.progress-mini .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #10b981);
    transition: width 0.3s ease-out;
}

/* Modal de Motivo */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-motivo-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.3s ease-out;
}

.modal-motivo-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--warning);
}

.modal-motivo-header i {
    font-size: 1.5rem;
}

.modal-motivo-header h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.modal-motivo-desc {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.motivo-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.motivo-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.motivo-btn:hover {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.motivo-btn i {
    font-size: 1.125rem;
    color: var(--warning);
}

.modal-motivo-cancel {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-motivo-cancel:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Quantity Controls */
.tag-id {
    color: var(--primary-light);
    border-color: rgba(139, 92, 246, 0.3);
}

.tag-code {
    color: var(--text);
    border-color: var(--border);
    font-weight: 700;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-display {
    text-align: center;
}

.qty-label {
    display: block;
    font-size: 0.625rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.qty-btn:hover {
    color: var(--primary-light);
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--success);
    min-width: 32px;
    text-align: center;
}

.qty-total {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: var(--muted);
}

/* Item Status */
.item-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-mini {
    width: 60px;
    height: 6px;
    background: var(--bg);
    border-radius: 99px;
    overflow: hidden;
}

.progress-mini .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #10b981);
    transition: width 0.3s ease-out;
}

/* Animações de Feedback da Bipagem */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-10px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(10px);
    }
}

@keyframes success-flash {

    0%,
    100% {
        background-color: transparent;
        border-color: var(--primary);
    }

    50% {
        background-color: rgba(34, 197, 94, 0.1);
        border-color: var(--success);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

.success-flash {
    animation: success-flash 0.5s ease-in-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Melhorias no input do scanner */
#scannerInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* === Toggle de Código de Barras === */
.list-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-toggle-barcode {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.125rem;
}

.btn-toggle-barcode:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-toggle-barcode.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

/* Barcode Display no Item */
.barcode-display {
    margin-top: 0.5rem;
    padding: 0.375rem 0.5rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
}

.barcode-display i {
    color: var(--primary);
    font-size: 0.875rem;
}

.barcode-display .barcode-value {
    color: var(--primary-light);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Barcode visible state */
.barcode-visible .barcode-display {
    display: flex !important;
}

/* Error Highlight Animation */
.highlight-error {
    animation: shakeError 0.5s ease-in-out;
}

.highlight-error .item-content {
    border-color: var(--danger) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

@keyframes shakeError {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* =====================================================
   RESPONSIVIDADE - MODO PORTRAIT E TELAS PEQUENAS
   ===================================================== */

/* Telas médias (tablets portrait) */
@media screen and (max-width: 600px) {
    .app-content {
        padding: 1rem;
    }

    .app-header {
        padding: 0.75rem;
    }

    .header-title {
        font-size: 1rem;
    }

    .header-timer {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    /* Item Card mais compacto */
    .item-card {
        gap: 0.375rem;
    }

    .item-content {
        padding: 0.625rem;
        gap: 0.5rem;
        min-height: 60px;
        flex-wrap: wrap;
    }

    .item-info {
        flex: 1 1 100%;
        order: 1;
    }

    .item-quantity-display {
        order: 2;
        flex: 0 0 auto;
    }

    .item-status {
        order: 3;
        flex: 0 0 auto;
    }

    .item-name {
        font-size: 0.8rem;
    }

    .tag {
        font-size: 0.5625rem;
        padding: 0.125rem 0.25rem;
    }

    .qty-btn {
        width: 40px;
        min-width: 40px;
        font-size: 1rem;
    }

    .item-quantity-display .qty-value {
        font-size: 1rem;
    }

    .item-quantity-display .qty-total {
        font-size: 0.75rem;
    }

    .progress-mini {
        width: 40px;
    }

    /* Scanner feedback */
    .scanner-feedback-bar {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    /* Botão toggle barcode */
    .btn-toggle-barcode {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    /* Barcode display menor */
    .barcode-display {
        font-size: 0.625rem;
        padding: 0.25rem 0.375rem;
    }

    /* Lista header */
    .list-header h4 {
        font-size: 0.875rem;
    }

    .item-count {
        font-size: 0.75rem;
    }
}

/* Telas muito pequenas (smartphones portrait) */
@media screen and (max-width: 400px) {
    .app-content {
        padding: 0.75rem;
    }

    .items-list {
        padding: 0.75rem;
    }

    /* Layout empilhado para cards muito estreitos */
    .item-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.5rem;
        min-height: auto;
    }

    .item-info {
        flex: none;
        width: 100%;
    }

    .item-name {
        white-space: normal;
        line-height: 1.3;
    }

    /* Quantidade e status lado a lado */
    .item-quantity-display,
    .item-status {
        flex: 1;
    }

    /* Row para quantidade e progresso */
    .item-content::after {
        content: "";
        display: flex;
        width: 100%;
    }

    .qty-btn {
        width: 36px;
        min-width: 36px;
        font-size: 0.875rem;
        border-radius: 8px;
    }

    /* Action buttons */
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-complete {
        padding: 0.875rem;
        font-size: 0.8rem;
    }

    /* Header mais compacto */
    .header-title {
        font-size: 0.875rem;
    }

    .btn-back {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }
}

/* Orientação portrait específica */
@media screen and (orientation: portrait) and (max-height: 700px) {

    /* Para telas portrait muito curtas (ex: smartphones pequenos) */
    .app-header {
        padding: 0.5rem;
        position: relative;
        /* Remove sticky para ganhar espaço */
    }

    .scanner-feedback-bar {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.75rem;
    }

    .items-list {
        margin-bottom: 1rem;
    }

    .item-card {
        margin-bottom: 0.5rem;
    }
}