/* Scoped inventory styles to avoid depending on Tailwind */

.inventory-page { width: 100%; }
.inventory-wrapper { max-width: 80rem; margin: 0 auto; }
.inventory-cards { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .inventory-cards { grid-template-columns: 1fr 1fr; } }

.inventory-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.5rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.inventory-card-title { font-size: .875rem; font-weight: 600; color: #374151; }
.inventory-card-row { margin-top: 1rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; text-align: center; }
.inventory-card-number { font-size: 1.875rem; font-weight: 800; color: #111827; }
.inventory-card-sub { font-size: .875rem; color: #6b7280; }
.inventory-card-arrow { font-size: 1.5rem; color: #374151; }

.inventory-tabs { border-bottom: 1px solid #e5e7eb; background: #fff; border-radius: .75rem .75rem 0 0; overflow: hidden; }
.inventory-tabs nav { display: flex; }
.inventory-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1rem 1.5rem; border-bottom: 2px solid transparent; color: #6b7280; text-decoration: none; }
.inventory-tab.active { border-bottom-color: #16a34a; color: #16a34a; font-weight: 700; }
.inventory-tab .badge { background: #dcfce7; color: #166534; font-size: .75rem; font-weight: 700; padding: .125rem .5rem; border-radius: 9999px; }

.inventory-content { background: #fff; border: 1px solid #e5e7eb; border-top: 0; border-radius: 0 0 .75rem .75rem; }
.inventory-header { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem; }
.inventory-header .title { font-size: 1.5rem; font-weight: 800; color: #1f2937; }
.inventory-header .rolls { text-align: right; }
.inventory-header .rolls .num { font-size: 2.25rem; font-weight: 800; color: #16a34a; }
.inventory-header .rolls .sub { font-size: .875rem; color: #6b7280; }
.inventory-button { display: inline-flex; align-items: center; gap: .5rem; background: #16a34a; color: #fff; font-weight: 700; border: 0; padding: .75rem 1.25rem; border-radius: .5rem; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.inventory-button:hover { background: #15803d; }
.inventory-button:focus { outline: 2px solid #22c55e; outline-offset: 2px; }

.inventory-metrics { border-top: 1px solid #e5e7eb; padding: 1.5rem; display: grid; grid-template-columns: repeat(4,1fr); gap: 0; text-align: center; }
.inventory-metrics .metric .num { font-size: 1.875rem; font-weight: 800; color: #111827; }
.inventory-metrics .metric .sub { font-size: .875rem; color: #6b7280; }

.inventory-infobar { background: #f9fafb; padding: 1rem 1.5rem; border-top: 1px solid #e5e7eb; display: flex; gap: 2rem; align-items: center; color: #4b5563; font-size: .875rem; }
.inventory-infobar .item { display: flex; align-items: center; gap: .5rem; }

.inventory-status-badge { display: inline-flex; align-items: center; padding: .25rem .75rem; border-radius: 9999px; font-size: .75rem; font-weight: 700; }
.inventory-status-badge.ok { background: #dcfce7; color: #166534; }
.inventory-status-badge.na { background: #e5e7eb; color: #374151; }


/* ---- Admin estado badges (generated in apps/external_db/admin.py -> estado_badge) ---- */
.estado-badge { display: inline-flex; align-items: center; padding: .25rem .75rem; border-radius: 9999px; font-size: .75rem; font-weight: 700; }

/* Fallback */
.estado-sin-estado { background: #e5e7eb; color: #374151; }

/* ---- Specific external DB estados ---- */
.estado-impreso, .estado-expandido { background: #e5e7eb; color: #374151; }
.estado-empacado { background: #F0FDF4; color: #10B981; }
.estado-preparado, .estado-aprobado-dsp-parcial, .estado-aprobado-dsp-total { background: #FEFCE8; color: #EAB308; }
.estado-anulado { background: #E5E7EB; color: #EF4444; }

/* ---- Core Orders estados ---- */
.estado-preparado { background: #fef3c7; color: #b45309; }         /* amber */
.estado-aprobado-dsp-parcial { background: #fef9c3; color: #92400e; } /* yellow */
.estado-aprobado-dsp-total { background: #dcfce7; color: #166534; }   /* green */
.estado-facturado { background: #dcfce7; color: #09943f; }   /* green */
.estado-anulado { background: #fee2e2; color: #b91c1c; }            /* red */

