:root {
    --inventory-panel: rgba(8, 12, 28, 0.9);
    --inventory-border: rgba(255, 255, 255, 0.08);
    --inventory-muted: #8ca4cd;
}

.hero__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.consulta-page .hero__title h1 {
    font-size: 2.4rem;
}

.consulta-page .hero__title p {
    max-width: 640px;
}

.hero__title-head {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
}

.logo-pill--floating {
    margin-left: auto;
    min-width: 230px;
    justify-content: center;
    padding: 12px 20px;
}

.logo-pill--floating img {
    width: 48px;
    height: 48px;
}

.inventory {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filters__group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.consulta-page .filters__group {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--inventory-muted);
}

.consulta-page .filters label span {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.filters input,
.filters select {
    border-radius: 18px;
    border: 1px solid var(--inventory-border);
    background: rgba(5, 10, 25, 0.9);
    color: var(--text);
    padding: 10px 14px;
    font-size: 1rem;
}

.filters select option {
    background: rgba(5, 10, 25, 0.95);
    color: var(--text);
}

.filters__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.filters__actions .btn {
    min-width: 150px;
    justify-content: center;
}

.filters__status {
    font-size: 0.85rem;
    color: var(--inventory-muted);
}

.filters__status[data-variant="success"] {
    color: #7ef0c9;
}

.filters__status[data-variant="error"] {
    color: #ff8a8a;
}

.filters__status[data-variant="muted"] {
    color: var(--inventory-muted);
}

.panel__header--inventory {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.panel__header--inventory h2 {
    margin: 0 0 8px;
}

.panel__header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.panel__header-right {
    margin-left: auto;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.export-actions--stack {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.inventory-table .metrics {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.inventory-table .metrics span {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--inventory-muted);
}

.inventory-table .metrics strong {
    display: block;
    font-size: 1.25rem;
}

.inventory-table .metrics > div {
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.table-wrapper {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid var(--inventory-border);
}

.table-pagination {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    color: var(--inventory-muted);
}

.table-pagination span {
    min-width: 120px;
    text-align: center;
    font-size: 0.95rem;
}

.table-pagination .btn {
    min-width: 120px;
    justify-content: center;
}

.inventory-table .metrics > div {
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

#inventory-table th,
#inventory-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#inventory-table th {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    color: var(--inventory-muted);
    background: rgba(255, 255, 255, 0.02);
}

#inventory-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.01);
}

#inventory-table tbody tr:hover {
    background: rgba(95, 180, 255, 0.08);
}

.consulta-page #entries-table {
    font-size: 0.9rem;
    border-collapse: separate;
    border-spacing: 10px 6px;
}

.consulta-page #entries-table thead th {
    letter-spacing: 0.15em;
    font-size: 0.68rem;
    padding: 12px 16px;
    position: relative;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.consulta-page #entries-table thead th:not(:first-child)::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 28%;
    bottom: 28%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.consulta-page #entries-table tbody tr td {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.consulta-page #entries-table td:nth-child(4),
.consulta-page #entries-table td:nth-child(5),
.consulta-page #entries-table td:nth-child(6) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.consulta-page #entries-table td:nth-child(1),
.consulta-page #entries-table td:nth-child(2),
.consulta-page #entries-table td:nth-child(3),
.consulta-page #entries-table td:nth-child(7),
.consulta-page #entries-table td:nth-child(8),
.consulta-page #entries-table td:nth-child(9),
.consulta-page #entries-table td:nth-child(10) {
    text-align: center;
}

.consulta-page #entries-table td:nth-child(1) {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.barcode-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 12px;
    border-radius: 999px;
    border: 1px solid rgba(95, 180, 255, 0.5);
    background: rgba(95, 180, 255, 0.12);
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    color: #b7dcff;
}

.barcode-chip__value {
    letter-spacing: 0.1em;
}

.barcode-chip--empty {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.25);
    background: transparent;
    color: var(--inventory-muted);
}

.barcode-chip--empty .barcode-chip__label {
    display: none;
}

.barcode-chip--empty .barcode-chip__value {
    letter-spacing: normal;
}

.consulta-page .metrics strong {
    font-size: 1.3rem;
}

.history-panel label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.history-panel select {
    border-radius: 16px;
    border: 1px solid var(--inventory-border);
    background: rgba(5, 9, 22, 0.9);
    color: var(--text);
    padding: 8px 12px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-end;
}

.history-meta {
    text-align: right;
}

.history-filter-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.8rem;
}

.history-filter {
    width: min(320px, 100%);
}

.history-table-wrapper {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px;
    background: rgba(4, 7, 18, 0.65);
}

.history-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 8px 6px;
    font-size: 0.88rem;
}

.history-table thead th {
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    padding: 10px 12px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--inventory-muted, rgba(255, 255, 255, 0.65));
}

.history-table tbody td {
    text-align: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.history-table tbody tr:hover td {
    background: rgba(95, 180, 255, 0.12);
}

.history-table td:nth-child(1) {
    text-align: left;
    font-weight: 600;
}

.history-table td:nth-child(4) {
    font-variant-numeric: tabular-nums;
    text-align: right;
    background: rgba(20, 255, 243, 0.1);
    border: 1px solid rgba(20, 255, 243, 0.3);
    color: #b6fff8;
    font-weight: 600;
}

.history-table td:nth-child(5),
.history-table td:nth-child(6) {
    text-align: left;
}

@media (max-width: 720px) {
    .filters__group {
        grid-template-columns: 1fr;
    }

    #inventory-table th,
    #inventory-table td {
        padding: 10px 8px;
    }
}
