/* v16 – management petty-cash ledger, search-first inventory, and cleaner POS */
:root {
  --sso-gold: #f8c600;
  --sso-ink: #0d1f36;
  --sso-surface: #ffffff;
  --sso-line: #d7e0ec;
}

.inventory-search-panel {
  max-width: 820px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid #d2dfef;
  border-radius: 16px;
  background: linear-gradient(135deg, #f7fbff 0%, #eef5ff 100%);
  box-shadow: 0 10px 24px rgba(25, 57, 102, .06);
}

.inventory-search-panel label {
  display: block;
  margin-bottom: 8px;
  color: var(--sso-ink);
  font-weight: 800;
}

.inventory-search-panel input,
.cash-filter-toolbar input[type="search"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid #9db1cc;
  border-radius: 12px;
  background: #fff;
  color: var(--sso-ink);
  font-size: 1rem;
}

.inventory-search-panel input:focus,
.cash-filter-toolbar input[type="search"]:focus {
  border-color: #f0bc00;
  box-shadow: 0 0 0 3px rgba(248, 198, 0, .24);
  outline: 0;
}

.inventory-search-panel p {
  margin: 10px 0 0;
  color: #526881;
  line-height: 1.45;
}

.inventory-search-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 13px;
  border-radius: 12px;
  background: #f4f8fc;
  color: #45617f;
}

.inventory-search-summary b { color: var(--sso-ink); font-size: 1.2rem; }
.inventory-search-summary small { margin-left: 5px; color: #6c7f95; }

.filter-summary,
.cash-ledger-summary {
  color: #5a6e86;
  font-size: .9rem;
}

.cash-filter-toolbar {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(140px, .28fr) minmax(140px, .28fr);
  gap: 10px;
  align-items: center;
}

.cash-ledger-summary { margin: -4px 0 13px; }

.list-pagination {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin: 14px 0 10px;
  padding: 10px 12px;
  border: 1px solid #d9e4f0;
  border-radius: 12px;
  background: #f8fbfe;
}

.list-pagination > div { display: flex; gap: 8px; align-items: center; }
.list-pagination button { white-space: nowrap; }
.page-info { min-width: 104px; color: #3e5877; font-size: .9rem; text-align: center; }
.cash-entry-auto { color: #167747; font-size: .76rem; font-weight: 700; }
.search-empty { padding: 42px 18px !important; color: #62758b; }

#inventoryTags { min-height: 0; margin: -5px 0 12px; }
.item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.item-tag { padding: 2px 6px; border-radius: 999px; background: #eaf2fd; color: #315f94; font-size: .74rem; }
.not-stocked { color: #66778c; font-style: italic; }

/* The original POS fields remain intact; this only reduces visual clutter. */
#pos .pos-workflow { display: none; }
#pos .pos-layout { align-items: start; }
#pos .pos-form,
#pos .pos-summary {
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(13, 31, 54, .08);
}
#pos .pos-form { padding: 20px; }
#pos .pos-summary { position: sticky; top: 18px; }
#pos .section-heading { margin-bottom: 10px; }

#closing .panel { border-radius: 16px; }
#closing .closing-guide { line-height: 1.55; }

body.dark-mode .inventory-search-panel {
  border-color: #405878;
  background: linear-gradient(135deg, #132943 0%, #0e2037 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}
body.dark-mode .inventory-search-panel label,
body.dark-mode .inventory-search-summary b { color: #fff5cf; }
body.dark-mode .inventory-search-panel p,
body.dark-mode .filter-summary,
body.dark-mode .cash-ledger-summary,
body.dark-mode .page-info { color: #c2d2e5; }
body.dark-mode .inventory-search-panel input,
body.dark-mode .cash-filter-toolbar input[type="search"] {
  border-color: #536d91;
  background: #09192c;
  color: #f7fbff;
}
body.dark-mode .inventory-search-summary,
body.dark-mode .list-pagination { border-color: #384f6c; background: #10243d; }
body.dark-mode .item-tag { background: #183b65; color: #d8ebff; }
body.dark-mode .cash-entry-auto { color: #7de8b2; }
body.dark-mode .not-stocked,
body.dark-mode .search-empty { color: #bdcade; }

@media (max-width: 780px) {
  .cash-filter-toolbar { grid-template-columns: 1fr 1fr; }
  .cash-filter-toolbar input[type="search"] { grid-column: 1 / -1; }
  .list-pagination { align-items: flex-start; flex-direction: column; }
  .inventory-search-summary { display: flex; flex-wrap: wrap; }
  #pos .pos-summary { position: static; }
}

@media (max-width: 460px) {
  .inventory-search-panel { padding: 14px; border-radius: 13px; }
  .cash-filter-toolbar { grid-template-columns: 1fr; }
  .cash-filter-toolbar input[type="search"] { grid-column: auto; }
  .list-pagination > div { width: 100%; justify-content: space-between; }
  .page-info { min-width: auto; }
}
