/* ========== ESTOQUE MODE — KRUMORA POS Layout ========== */

/* Main Container */
.estoque-mode {
    min-height: 100vh;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

/* Header */
.estoque-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
}

.estoque-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.estoque-header-left .badge-estoque {
    background: rgba(168,85,247,0.12);
    color: var(--purple);
    border: 1px solid rgba(168,85,247,0.3);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 3px 10px;
    border-radius: 20px;
}

.estoque-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.estoque-sync-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
}

.estoque-sync-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--accent-glow);
}

.estoque-back-btn, .estoque-user-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.estoque-back-btn:hover { border-color: var(--info); color: var(--info); }

/* Tab bar */
.estoque-tabs {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(10,10,10,0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 100;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
}

.estoque-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 4px 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 0.6rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estoque-tab i { font-size: 1.1rem; }
.estoque-tab:hover { color: var(--text-secondary); }
.estoque-tab.active { color: var(--purple); }

/* Content area */
.estoque-body {
    margin-top: 56px;
    margin-bottom: 64px;
    padding: 12px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* Screen toggle */
.estoque-screen { display: none; }
.estoque-screen.active { display: block; }

/* Section header */
.estoque-section-header {
    margin-bottom: 12px;
}

.estoque-section-header h2 {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.estoque-section-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Card */
.est-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
}

/* Stats row */
.est-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.est-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}

.est-stat-num {
    font-size: 1.4rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.est-stat-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 2px;
}

.est-stat.warn { border-left: 3px solid var(--warn); }
.est-stat.warn .est-stat-num { color: var(--warn); }
.est-stat.danger { border-left: 3px solid var(--danger); }
.est-stat.danger .est-stat-num { color: var(--danger); }
.est-stat .est-stat-num { color: var(--accent); }

/* Input fields */
.est-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.est-input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
}

.est-input::placeholder { color: var(--text-muted); }

.est-select {
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    width: 100%;
    cursor: pointer;
}

/* Buttons */
.est-btn {
    padding: 11px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.est-btn-primary {
    background: var(--purple);
    color: #fff;
}
.est-btn-primary:hover { box-shadow: 0 4px 16px rgba(168,85,247,0.3); transform: translateY(-1px); }
.est-btn-primary:active { transform: scale(0.97); }

.est-btn-accent {
    background: var(--accent);
    color: #000;
}

.est-btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.est-btn-danger { background: var(--danger); color: #fff; }
.est-btn-sm { padding: 8px 14px; font-size: 0.78rem; }
.est-btn-lg { padding: 14px 24px; font-size: 0.95rem; width: 100%; }

/* Scanner area */
.est-scanner-box {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    max-height: 240px;
    margin-bottom: 10px;
}

.est-scanner-box video { width: 100%; height: 100%; object-fit: cover; }

.est-scanner-toggle {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    transition: all 0.2s;
}

.est-scanner-toggle:hover { border-color: var(--purple); color: var(--purple); }
.est-scanner-toggle.active { background: var(--purple); color: #fff; border-style: solid; }

/* Manual barcode row */
.est-manual-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.est-manual-row input { flex: 1; }

/* Qty row */
.est-qty-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.est-qty-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.est-qty-btn:hover { border-color: var(--purple); color: var(--purple); }

.est-qty-input {
    width: 80px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 800;
    padding: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    outline: none;
}

.est-qty-input:focus { border-color: var(--purple); }

/* Scanned product result */
.est-product-result {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.est-product-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 1.8rem;
}

.est-product-img img { width: 100%; height: 100%; object-fit: cover; }

.est-product-info { flex: 1; min-width: 0; }

.est-product-info h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.est-product-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.est-product-stock {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.est-product-stock strong {
    font-size: 1.1rem;
    color: var(--accent);
}

/* Stock list items */
.est-stock-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.est-stock-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.est-stock-item:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.02); }
.est-stock-item.zero-stock { border-left: 3px solid var(--danger); }
.est-stock-item.low-stock { border-left: 3px solid var(--warn); }

.est-stock-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.est-stock-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

.est-stock-info { flex: 1; min-width: 0; }

.est-stock-name {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.est-stock-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.est-stock-qty {
    text-align: right;
    flex-shrink: 0;
}

.est-stock-qty-num {
    font-size: 1.2rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.est-stock-qty-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.est-stock-item.zero-stock .est-stock-qty-num { color: var(--danger); }
.est-stock-item.low-stock .est-stock-qty-num { color: var(--warn); }

/* Search & filter row */
.est-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.est-search-row input { flex: 2; }
.est-search-row select { flex: 1; }

/* History items */
.est-history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.est-history-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.est-history-icon.entrada { background: var(--accent-dim); color: var(--accent); }
.est-history-icon.saida { background: var(--danger-dim); color: var(--danger); }
.est-history-icon.ajuste_positivo { background: var(--info-dim); color: var(--info); }
.est-history-icon.ajuste_negativo { background: var(--warn-dim); color: var(--warn); }
.est-history-icon.perda { background: rgba(255,255,255,0.05); color: var(--text-muted); }
.est-history-icon.estorno { background: rgba(255,165,0,0.12); color: #FFA500; }

.est-history-info { flex: 1; min-width: 0; }

.est-history-product {
    font-size: 0.85rem;
    font-weight: 700;
}

.est-history-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.est-history-qty {
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.est-history-qty.positive { color: var(--accent); }
.est-history-qty.negative { color: var(--danger); }

/* Operator badge in history */
.est-operator-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid;
    background: rgba(0,0,0,0.3);
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.est-operator-badge i {
    font-size: 0.55rem;
}

/* Filter row */
.est-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.est-filter-row input, .est-filter-row select {
    flex: 1;
    min-width: 100px;
}

/* Success feedback */
.est-success {
    text-align: center;
    padding: 30px;
    animation: feedSlide 0.3s ease;
}

.est-success i {
    font-size: 3rem;
    color: var(--accent);
    display: block;
    margin-bottom: 12px;
}

.est-success p {
    font-size: 0.9rem;
    font-weight: 700;
}

/* Not found */
.est-not-found {
    text-align: center;
    padding: 30px;
}

.est-not-found i {
    font-size: 2rem;
    color: var(--warn);
    display: block;
    margin-bottom: 12px;
}

.est-not-found-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

/* Modal */
.est-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.est-modal-overlay.open { display: flex; }

.est-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl, 16px);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.est-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.est-modal-header h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.est-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.est-modal-body {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.est-modal-footer {
    padding: 12px 18px 18px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Fardo badge */
.est-fardo-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(168,85,247,0.12);
    color: var(--purple);
    margin-left: 6px;
}

/* Fardo calc info */
.est-fardo-calc {
    padding: 8px 12px;
    background: rgba(168,85,247,0.08);
    border: 1px solid rgba(168,85,247,0.2);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--purple);
    margin-bottom: 8px;
}

/* Extra barcode badge */
.est-extra-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(0,191,255,0.12);
    color: var(--info);
    margin-left: 4px;
}

/* Shopping list items */
.est-compras-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

.est-compras-item.unchecked { opacity: 0.4; }
.est-compras-check { flex-shrink: 0; }
.est-compras-check input { width: 18px; height: 18px; cursor: pointer; accent-color: var(--purple); }
.est-compras-badge { font-size: 1.2rem; flex-shrink: 0; }
.est-compras-info { flex: 1; min-width: 0; }

.est-compras-name {
    font-size: 0.85rem;
    font-weight: 700;
}

.est-compras-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.est-compras-qty-edit {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.est-compras-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.est-compras-qty-val {
    font-size: 1rem;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
}

.est-compras-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.8rem;
}

.est-compras-remove:hover { color: var(--danger); }

/* Shopping list summary */
.est-compras-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.est-compras-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.est-compras-actions .est-btn { flex: 1; min-width: 120px; }

/* Config section */
.est-config-section {
    margin-bottom: 16px;
}

.est-config-section h3 {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.est-config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    gap: 12px;
}

.est-config-row span { font-size: 0.82rem; color: var(--text-secondary); flex: 1; }
.est-config-row input, .est-config-row select { max-width: 180px; }

.est-config-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Empty state */
.est-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.est-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

/* Toast */
.est-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20,20,20,0.95);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 300;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    animation: toastIn 0.3s ease;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* USB scanner flash */
.est-usb-flash {
    animation: usbFlash 0.6s ease;
}

@keyframes usbFlash {
    0%,100% { border-color: var(--border); }
    50% { border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
}

/* Pack Type Modal */
.est-pack-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.est-pack-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.est-pack-type-btn i { font-size: 1.8rem; }
.est-pack-type-btn:hover { border-color: var(--purple); color: var(--purple); }
.est-pack-type-btn.selected {
    border-color: var(--purple);
    background: rgba(168,85,247,0.1);
    color: var(--purple);
    box-shadow: 0 0 20px rgba(168,85,247,0.15);
}

.est-pack-auto-detect {
    font-size: 0.8rem;
    padding: 8px 12px;
    background: rgba(168,85,247,0.08);
    border: 1px solid rgba(168,85,247,0.2);
    border-radius: var(--radius-sm);
    color: var(--purple);
    margin-bottom: 4px;
}

.est-fardo-presets {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.est-fardo-preset {
    min-width: 40px;
}

/* Barcode action buttons in scanner */
.est-barcode-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.est-barcode-actions .est-btn {
    font-size: 0.7rem;
    padding: 5px 10px;
}

/* Barcode extras in modals */
.est-barcode-extras-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.est-barcode-extra-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0,191,255,0.06);
    border: 1px solid rgba(0,191,255,0.15);
    border-radius: var(--radius-sm);
}

.est-barcode-code {
    font-family: 'SF Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--info);
    flex: 1;
}

.est-barcode-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.est-barcode-remove {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255,77,106,0.1);
    border: none;
    color: var(--danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.est-barcode-remove:hover { background: rgba(255,77,106,0.2); }
/* Camera Scanner */
.est-camera-section {
    margin-bottom: 10px;
}

.est-camera-container {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: #111;
    height: 180px;
    cursor: pointer;
    border: 2px dashed rgba(168,85,247,0.3);
    transition: border-color 0.2s;
}

.est-camera-container:hover {
    border-color: rgba(168,85,247,0.6);
}

.est-camera-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.est-camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.est-camera-placeholder i {
    font-size: 2rem;
    color: var(--purple);
    opacity: 0.6;
}

.est-camera-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 2px solid rgba(168,85,247,0.4);
    border-radius: var(--radius);
}

.est-scan-line {
    position: absolute;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple), transparent);
    box-shadow: 0 0 8px var(--purple);
    animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {
    0%, 100% { top: 20%; }
    50% { top: 80%; }
}

.est-camera-stop-btn {
    margin-top: 6px;
    width: 100%;
    background: rgba(255,68,68,0.1);
    border-color: rgba(255,68,68,0.3);
    color: var(--danger);
}

/* Name search results */
.est-name-results {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.est-name-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.15s;
}

.est-name-result-item:last-child { border-bottom: none; }
.est-name-result-item:hover, .est-name-result-item:active { background: rgba(168,85,247,0.08); }

.est-name-result-item .result-emoji {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.est-name-result-item .result-info { flex: 1; min-width: 0; }

.est-name-result-item .result-name {
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.est-name-result-item .result-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.est-name-result-item .result-stock {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent);
    flex-shrink: 0;
}

.est-name-results-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 640px) {
    .est-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .est-stat { padding: 8px; }
    .est-stat-num { font-size: 1.1rem; }
    .est-compras-summary { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .estoque-body { padding: 8px; }
    .est-search-row { flex-direction: column; }
    .est-filter-row { flex-direction: column; }
}
