/* The web dashboard: dead stock, expired stock and Expiry Genie drafts. */

.dash-body { background: #f6f7fb; }
.dash-loading { padding: 80px 0; text-align: center; color: #6c757d; }

.dash-signin { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.dash-signin-card { width: min(420px, 100%); padding: 28px; background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(16, 24, 40, .08); }
.dash-signin-card h1 { margin: 12px 0 4px; font-size: 1.5rem; }
.dash-signin-card label { margin-top: 12px; }
.dash-logo { height: 34px; }

.dash-header {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
    padding: 12px 20px; background: #fff; border-bottom: 1px solid #e9ecef;
}
.dash-brand img { height: 30px; }
.dash-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-tab {
    padding: 7px 14px; border: 1px solid transparent; border-radius: 8px;
    background: transparent; color: #495057; font-weight: 500;
}
.dash-tab:hover { background: #f1f3f5; }
.dash-tab.is-active { background: #eef2ff; border-color: #c7d2fe; color: #4338ca; }
.dash-badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: #4338ca; color: #fff; font-size: .75rem; }
.dash-user { display: flex; align-items: center; gap: 10px; margin-left: auto; color: #495057; }

.dash-main { max-width: 1200px; margin: 0 auto; padding: 22px 20px 60px; }
.dash-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.dash-toolbar h2 { margin: 0; font-size: 1.3rem; }
.dash-toolbar-end { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dash-search { width: min(320px, 100%); margin-left: auto; }
.dash-table { background: #fff; border-radius: 10px; overflow: hidden; }
.dash-table .ph { cursor: pointer; font-size: 1.15rem; }
.dash-table tr.is-problem td:first-child { box-shadow: inset 3px 0 0 #ffc107; }
.dash-paging { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; color: #6c757d; }
.dash-dup-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #e9ecef; }
.dash-merge-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 18px; }

.dash-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: #eef2ff; color: #4338ca; font-size: .72rem; font-weight: 600; }

/* Drafts: the same shapes as the extension's page, so the two match. */
.ed-draft-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-bottom: 10px; background: #fff; border: 1px solid #dee2e6; border-radius: 10px; }
.ed-draft-card.is-open { border-color: #4338ca; }
.ed-draft-card h6 { margin: 0 0 2px; }
.ed-empty { padding: 32px 16px; text-align: center; color: #6c757d; background: #fff; border: 1px dashed #ced4da; border-radius: 10px; }

.ed-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .72rem; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.ed-tag-draft { background: #e7f1ff; color: #0a58ca; }
.ed-tag-listed { background: #f1f3f5; color: #495057; border: 1px solid #dee2e6; }
.ed-tag-warn { background: #fff3cd; color: #997404; }
.ed-tag-ok { background: #d1e7dd; color: #0f5132; }
.ed-tag-muted { background: #f1f3f5; color: #6c757d; }

/* Stays in reach while scrolling a long review. */
.ed-bulk-bar {
    position: sticky; top: 0; z-index: 5;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px; margin-bottom: 12px;
    background: #e7f1ff; border: 1px solid #b6d4fe; border-radius: 10px; color: #0a58ca;
}
.ed-bulk-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.ed-pair { background: #fff; border: 1px solid #dee2e6; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.ed-pair.is-selected { border-color: #0d6efd; box-shadow: 0 0 0 1px #0d6efd; }
.ed-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 80px 56px; gap: 10px; align-items: center; padding: 9px 12px; }
.ed-row .ed-name { overflow: hidden; text-overflow: ellipsis; }
.ed-row .ed-ean { display: block; color: #6c757d; font-size: .8rem; }
.ed-row .ed-qty { text-align: right; font-weight: 600; }
.ed-row-draft { background: #f3f8ff; }
.ed-row-listed { border-top: 1px dashed #ced4da; }
.ed-row-listed.is-target { background: #fffbea; }
.ed-row-new { grid-template-columns: minmax(0, 1fr) 80px 56px; background: #fff; border: 1px solid #f1f3f5; border-radius: 8px; margin-top: 6px; }

.ed-pair-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-top: 1px solid #f1f3f5; }
.ed-choice { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ed-choice button { padding: 2px 10px; font-size: .8rem; }
.ed-choice button.active { background: #0d6efd; border-color: #0d6efd; color: #fff; }

@media (max-width: 640px) {
    .dash-search { margin-left: 0; }
    .dash-user { width: 100%; margin-left: 0; }
}

/* v1.1.46 -- both ranges behind one button, the chosen columns behind another,
   and chips saying what is currently narrowing the list. The panel expands
   under the toolbar rather than floating: it is read while the table below it
   changes, so it should not cover the table. */
.dash-filterbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dash-filters { display: grid; gap: 10px; padding: 12px; margin-bottom: 10px; border: 1px solid #dee2e6; border-radius: .5rem; background: #f8f9fa; }
.dash-filter-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-filter-title { min-width: 4.5rem; font-weight: 600; font-size: .875rem; }
.dash-filters input[type="date"] { width: auto; min-width: 9.5rem; }
.dash-filters .dash-month { width: 6rem; }
.dash-filters .btn.active { color: #fff; background: #0f766e; border-color: #0f766e; }
.dash-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-chip { padding: 3px 10px; border-radius: 999px; background: #e1f5ee; border: 1px solid #0f766e; color: #0b5f59; font-size: .8rem; font-weight: 600; }
.dash-columns-menu { min-width: 13rem; }
.dash-column-row { display: flex; align-items: center; padding: 4px 2px; font-size: .9rem; cursor: pointer; }
