/* ============================================================
   css/business.css — Panel de Vendedor NutriaSoft Market
   ============================================================ */

/* ── PESTAÑAS ────────────────────────────────────────────────── */
.biz-tabs {
    display: flex;
    gap: 4px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.biz-tab {
    flex: 1;
    min-width: 120px;
    background: none;
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 16px;
    transition: all 0.2s;
    text-align: center;
}

.biz-tab:hover  { color: rgba(255,255,255,0.8); }
.biz-tab.active { background: rgba(102,126,234,0.25); color: #667eea; }

.biz-panel { display: none; }
.biz-panel.active { display: block; }

/* ── CARDS PANEL ─────────────────────────────────────────────── */
.biz-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}

.biz-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.biz-card-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

/* ── PRODUCTO ITEM VENDEDOR ──────────────────────────────────── */
.prod-item-vend {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    margin-bottom: 10px;
}

.prod-item-vend img {
    width: 60px;
    height: 84px;
    object-fit: cover;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
}

.prod-item-vend .prod-info h4 {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.prod-item-vend .prod-info p {
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
    margin: 0;
}

.prod-item-vend .prod-info .precio {
    color: #10b981;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 4px;
}

.prod-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── PEDIDO ITEM ─────────────────────────────────────────────── */
.pedido-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.pedido-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.pedido-numero {
    color: #667eea;
    font-size: 0.85rem;
    font-weight: 700;
}

.pedido-comprador {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.pedido-meta {
    color: rgba(255,255,255,0.5);
    font-size: 0.78rem;
}

.pedido-total {
    color: #10b981;
    font-weight: 700;
}

/* ── BADGE ESTADO ────────────────────────────────────────────── */
.estado-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.estado-solicitado  { background: rgba(245,158,11,0.15); color: #f59e0b; }
.estado-en_proceso  { background: rgba(59,130,246,0.15);  color: #3b82f6; }
.estado-listo       { background: rgba(16,185,129,0.15);  color: #10b981; }
.estado-recibido    { background: rgba(102,126,234,0.15); color: #667eea; }
.estado-cancelado   { background: rgba(239,68,68,0.15);   color: #ef4444; }

/* ── BUSCAR CARTA ────────────────────────────────────────────── */
.carta-search-result {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px solid transparent;
}

.carta-search-result:hover {
    background: rgba(102,126,234,0.1);
    border-color: rgba(102,126,234,0.2);
}

.carta-search-result img {
    width: 44px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.carta-search-result .carta-info h5 {
    color: white;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.carta-search-result .carta-info p {
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    margin: 0;
}

.carta-search-result .carta-precio {
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: auto;
    white-space: nowrap;
}

/* ── SELECTED CARD ───────────────────────────────────────────── */
.carta-seleccionada {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(102,126,234,0.08);
    border: 1px solid rgba(102,126,234,0.2);
    border-radius: 12px;
    margin-bottom: 16px;
}

.carta-seleccionada img {
    width: 80px;
    height: 112px;
    object-fit: cover;
    border-radius: 6px;
}

/* ── TIENDAS Y RAREZAS LISTA ─────────────────────────────────── */
.list-item-simple {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
}

/* ── FORM STYLES ─────────────────────────────────────────────── */
.biz-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 640px) {
    .biz-form-grid { grid-template-columns: 1fr; }
    .prod-item-vend { grid-template-columns: 50px 1fr; }
    .prod-actions { flex-direction: row; grid-column: 1 / -1; }
    .biz-tab { min-width: 80px; font-size: 0.75rem; padding: 8px 10px; }
}

/* ── MODAL ───────────────────────────────────────────────────── */
.biz-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.biz-modal {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
}

.biz-modal-title {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── SINPE STATUS ────────────────────────────────────────────── */
.sinpe-ok {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 8px;
    color: #10b981;
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-top: 10px;
}

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.biz-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.3);
}

.biz-empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.biz-empty p { font-size: 0.88rem; }

/* ── LOGIN GATE ──────────────────────────────────────────────── */
.login-gate {
    max-width: 480px;
    margin: 60px auto;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 36px;
    text-align: center;
}

.login-gate h3 { color: white; margin-bottom: 8px; }
.login-gate p  { color: rgba(255,255,255,0.5); font-size: 0.88rem; margin-bottom: 24px; }

/* ── MISC ────────────────────────────────────────────────────── */
.stock-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}
.stock-ok  { background: rgba(16,185,129,0.15); color: #10b981; }
.stock-low { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.stock-out { background: rgba(239,68,68,0.15);   color: #ef4444; }

/* ── TIPO PRODUCTO BUTTONS ───────────────────────────────────── */
.tipo-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    transition: all 0.2s;
}
.tipo-btn:hover  { background: rgba(102,126,234,0.15); border-color: rgba(102,126,234,0.3); color: white; }
.tipo-btn.active { background: rgba(102,126,234,0.25); border-color: #667eea; color: #667eea; }

/* ── FORM INPUTS EN MODAL ────────────────────────────────────── */
.biz-modal .form-control,
.biz-modal .form-select {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: white;
    font-size: 0.88rem;
    padding: 9px 12px;
    width: 100%;
}
.biz-modal .form-control:focus,
.biz-modal .form-select:focus  { border-color: #667eea; background: rgba(255,255,255,0.09); outline: none; box-shadow: none; }
.biz-modal .form-select option { background: #1a1a2e; color: white; }
.biz-modal .form-label         { font-size: 0.82rem; margin-bottom: 5px; display: block; }
.biz-modal .text-muted         { color: rgba(255,255,255,0.35) !important; font-size: 0.75rem; }

/* ── BUSCADOR PRODUCTOS ──────────────────────────────────────── */
#buscarProductoInput {
    color: white;
}
#buscarProductoInput::placeholder {
    color: rgba(255,255,255,0.4);
}
/* ── VENTAS ──────────────────────────────────────────────────── */
#ventasResumen { display:flex; }

.biz-stat-card {
    background: rgba(102,126,234,0.08);
    border: 1px solid rgba(102,126,234,0.2);
    border-radius: 10px;
    padding: 14px 20px;
    min-width: 140px;
    text-align: center;
}
.biz-stat-label { color: rgba(255,255,255,0.5); font-size: 0.78rem; margin-bottom: 6px; }
.biz-stat-valor { color: #10b981; font-size: 1.2rem; font-weight: 700; }