/* Catalog Admin polish: sidebar icons and badges, attention list, catalog gaps,
   command palette, and in-page confirmations. Loaded after admin-modern.css. */

/* Sidebar */
.nav-group-label { margin: 18px 0 6px 14px; color: #8c7765; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nav-group-label:first-child { margin-top: 0; }
.sidebar-nav .nav-item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; font-size: 15px; overflow: visible; }
.nav-icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.nav-item.is-active .nav-icon { opacity: 1; }
.nav-item .nav-badge { flex: none; width: auto; color: #fff; font-size: 12px; text-align: center; box-sizing: border-box; min-width: 24px; height: 22px; margin-left: auto; padding: 0 7px; white-space: nowrap; border-radius: 999px; background: var(--copper); color: #fff; font-size: 12px; font-weight: 800; line-height: 22px; text-align: center; }
.nav-item .nav-badge[hidden] { display: none; }
.sidebar-foot .nav-item { display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Topbar jump button */
.command-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.command-button:hover { border-color: var(--copper); color: var(--ink); }
.command-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.command-button kbd, .command-palette kbd { padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--muted); font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.workspace:not(:has(#catalog-view.is-hidden)) .command-button span, .workspace:not(:has(#catalog-view.is-hidden)) .command-button kbd { display: none; }

/* Overview: needs attention */
.attention-list { display: grid; gap: 8px; }
.attention-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 18px; align-items: center; width: 100%; padding: 15px 20px; border: 1px solid var(--line); border-left: 4px solid var(--copper); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.attention-row:hover { background: #f9f3eb; }
.attention-row strong { font-size: 17px; }
.attention-row span { grid-column: 1; color: var(--muted); font-size: 14px; }
.attention-row em { grid-column: 2; grid-row: 1 / span 2; min-width: 40px; padding: 4px 12px; border-radius: 999px; background: var(--copper); color: #fff; font-size: 16px; font-style: normal; font-weight: 800; text-align: center; }
.attention-row.is-static { border-left-color: var(--line); cursor: default; }
.attention-row.is-static:hover { background: var(--paper); }
.attention-row.is-static em { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.attention-empty { margin: 0; padding: 18px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }

/* Catalog: readable names and missing-data filters */
.catalog-table .bottle-name { max-width: 380px; overflow: visible; white-space: normal; text-overflow: clip; line-height: 1.35; }
.catalog-table td:nth-child(3) { min-width: 150px; }
.catalog-table td:nth-child(4) { max-width: 150px; }
.bottle-thumb img { object-fit: contain; }
.gap-group { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.gap-group > span { color: var(--muted); font-size: 13px; font-weight: 700; }
.gap-button { min-height: 34px; padding: 0 12px; border: 1px dashed #bfa78f; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.gap-button:hover { color: var(--copper); border-color: var(--copper); }
.gap-button.is-active { border-style: solid; border-color: var(--copper); background: var(--copper); color: #fff; }

/* Command palette */
.command-palette { width: min(620px, calc(100vw - 32px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(36, 22, 10, .3); }
.command-palette::backdrop { background: rgba(36, 28, 20, .35); backdrop-filter: blur(3px); }
.command-input-wrap { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.command-input-wrap svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.command-input-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 17px; }
.command-palette ul { max-height: min(420px, 55vh); margin: 0; padding: 8px; overflow-y: auto; list-style: none; }
.command-palette li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 0 10px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.command-palette li[aria-selected="true"] { background: #ead9c4; }
.command-palette li small { grid-column: 2; color: var(--muted); font-size: 13px; }
.command-kind { grid-row: span 2; color: var(--copper); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.command-palette .command-empty { display: block; color: var(--muted); cursor: default; }
.command-hint { display: flex; gap: 6px; align-items: center; margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

/* Confirmation dialog */
.confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(36, 22, 10, .3); }
.confirm-dialog::backdrop { background: rgba(36, 28, 20, .4); }
.confirm-dialog h2 { margin: 0 0 10px; font-size: 21px; letter-spacing: -.02em; }
.confirm-dialog-message { display: grid; gap: 8px; margin: 0 0 22px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.button-danger { background: #a33a2c; }
.button-danger:hover { background: #862d22; }

@media (max-width: 900px) {
  .nav-group-label { margin-left: 8px; }
  .command-button span, .command-button kbd { display: none; }
  .gap-group { margin-left: 0; }
}

/* Sections and notes with nothing to show stay hidden. */
.store-network-section[hidden], #store-network-all-clear[hidden] { display: none !important; }
/* Handled Automatically: compact tiles, the note spans the row. */
#automation-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
#automation-summary .attention-row { padding: 12px 16px; }
#automation-summary .attention-row strong { font-size: 15px; }
#automation-summary .attention-empty { grid-column: 1 / -1; }
