@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-SemiBold.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/IBMPlexMono-Bold.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }
:root { --surface: #fff; --surface-dim: #f3f2ee; --surface-container: #eeebe5; --ink: #000; --muted: #6e5542; --outline: #c4c4c4; }
body.dashboard { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; background: var(--surface); color: var(--ink); font-family: 'IBM Plex Mono', monospace; font-size: 14px; line-height: 1.6; }
body.dashboard > .dashboard-main, body.dashboard > .settings-layout { flex: 1; }
body.dashboard > .settings-layout { align-content: start; }
.dashboard *, .dashboard *::before, .dashboard *::after { box-sizing: border-box; }
.dashboard a { color: inherit; text-underline-offset: 4px; }
.dashboard button, .dashboard input, .dashboard select, .dashboard textarea { font: inherit; }
.dashboard-header { border-bottom: 1px solid var(--outline); }
.dashboard .navbar { width: 100%; padding: 12px 32px; gap: 24px; }
.catalog-brand { display: flex; flex-shrink: 0; align-items: center; gap: 16px; }
.dashboard-logo { margin: 0; padding: 0; }
.dashboard-logo img { display: block; width: 100px; height: 51px; object-fit: contain; }
.dashboard .navbar-collapse { gap: 24px; min-width: 0; }
.catalog-switch { flex-shrink: 0; }
.dashboard #catalog-menu { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 100px; min-height: 44px; padding: 8px 12px; font-size: 12px; }
.catalog-switch .dropdown-menu { min-width: 140px; padding: 6px; margin-top: 6px; border-color: var(--outline); border-radius: 6px; }
.catalog-switch .dropdown-item { padding: 10px 12px; border-radius: 3px; font-size: 12px; }
.catalog-switch .dropdown-item.is-current { background: var(--surface-dim); font-weight: 600; }
.catalog-switch .dropdown-item:hover, .catalog-switch .dropdown-item:focus { color: var(--ink); background: var(--surface-container); }
.header-actions { display: flex; flex-shrink: 0; align-items: center; gap: 8px; margin-left: auto; }
.primary-navigation { display: flex; align-items: center; gap: 4px; }
.navigation-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 12px; border-radius: 5px; font-size: 12px; text-decoration: none; white-space: nowrap; }
.dashboard .navigation-link:hover { background: var(--surface-dim); text-decoration: none; }
.navigation-link.is-current { background: var(--surface-dim); font-weight: 600; }
.dashboard .header-actions .btn { padding: 10px 14px; font-size: 12px; }
.header-actions > .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.account-dropdown .dropdown-menu { min-width: 220px; max-width: calc(100vw - 48px); padding: 8px; border-color: var(--outline); border-radius: 6px; }
.account-dropdown .dropdown-item { padding: 10px 12px; border-radius: 3px; font-size: 12px; }
.account-dropdown .dropdown-item-text { padding: 8px 12px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--surface-container); font-size: 11px; color: var(--muted); }
.dashboard #account-menu { display: inline-flex; align-items: center; justify-content: center; max-width: 180px; }
.account-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .dashboard #account-menu { max-width: none; } }
.navigation-settings { display: inline-flex; align-items: center; gap: 8px; padding: 12px; font-size: 12px; }
.dashboard .navigation-settings { min-width: 44px; min-height: 44px; text-decoration: none; }
.navigation-settings .fa-gear { font-size: 14px; }
.dashboard .navigation-settings .navigation-alert { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; min-height: 20px; padding: 2px 5px; font-size: 11px; font-weight: 600; background: #9c3d10; color: #fff; border-radius: 10px; }
.header-actions form { margin: 0; }
@media (min-width: 1200px) { .header-price-check .btn { min-width: 180px; } }
.dashboard .header-price-check .btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 48px; padding: 4px 14px 18px; }
.last-price-update { position: absolute; left: 4px; right: 4px; bottom: 4px; font-size: 10px; line-height: 14px; font-weight: 400; color: inherit; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dashboard-main { width: 100%; padding: 24px 32px 40px; }
.eyebrow { font-size: 12px; font-weight: 600; line-height: 20px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.dashboard .btn { border-radius: 4px; padding: 12px 20px; min-height: 48px; font-size: 13px; font-weight: 600; transition: background-color 150ms, color 150ms; box-shadow: none; }
.dashboard .btn-primary, .dashboard .btn-success { color: white; background: #000; border-color: #000; }
.dashboard .btn-primary:hover, .dashboard .btn-success:hover { background: #1a1a1a; border-color: #1a1a1a; }
.dashboard .btn-outline-primary, .dashboard .btn-outline-secondary, .dashboard .btn-light { color: #000; border-color: #8a866c; background: transparent; }
.dashboard .btn-outline-primary:hover, .dashboard .btn-outline-secondary:hover, .dashboard .btn-light:hover { color: #000; background: var(--surface-container); }
.dashboard .btn-outline-danger { color: #000; border-color: var(--outline); }
.dashboard .btn-outline-danger:hover, .dashboard .btn-danger { color: #fff; background: #b71c1c; border-color: #b71c1c; }
.dashboard .btn-link { color: var(--muted); padding: 0; min-height: 32px; font-size: 12px; }
.dashboard .btn-sm { min-height: 36px; padding: 8px 10px; font-size: 12px; }
.dashboard :focus-visible { outline: 2px solid #000; outline-offset: 4px; }
.dashboard .form-control:focus, .dashboard .ts-control.focus,
.dashboard .ts-wrapper.focus .ts-control { border-color: var(--outline); box-shadow: none; }
.dashboard :is(input:not([type]), input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], textarea):focus { outline: none; box-shadow: none; border-color: var(--outline); }
.dashboard #searchInput:focus { background: #fff; }
.dashboard .btn:disabled { background: var(--surface-container); color: #6e5542; opacity: 1; }
.dashboard .btn-primary:not(:disabled):not(.disabled):active,
.dashboard .btn-success:not(:disabled):not(.disabled):active { color: #fff; background: #1a1a1a; border-color: #1a1a1a; box-shadow: none; }
.dashboard .btn-outline-primary:not(:disabled):not(.disabled):active,
.dashboard .btn-outline-secondary:not(:disabled):not(.disabled):active,
.dashboard .btn-light:not(:disabled):not(.disabled):active { color: #000; background: var(--surface-container); border-color: #8a866c; box-shadow: none; }
.dashboard .btn-outline-danger:not(:disabled):not(.disabled):active,
.dashboard .btn-danger:not(:disabled):not(.disabled):active { color: #fff; background: #921616; border-color: #921616; box-shadow: none; }
.dashboard .btn:not(:disabled):not(.disabled):active { transform: translateY(1px); transition: none; }
.dashboard .badge { background: var(--surface-container); color: #000; border-radius: 4px; font-weight: 400; padding: 4px 6px; font-size: 10px; }
.filter-panel { padding: 20px; background: var(--surface-dim); border: 1px solid var(--surface-container); margin-bottom: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.section-heading .eyebrow { margin: 0; }
.filter-panel .section-heading { margin-bottom: 20px; }
.filter-grid { display: grid; grid-template-columns: minmax(220px,2fr) repeat(3,minmax(0,1fr)); gap: 24px; }
.advanced-filters, .filter-fields { display: contents; }
.filter-heading-actions { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 8px; }
.dashboard .filter-toggle { display: none; }
.filter-search { grid-column: span 1; }
.dashboard label { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.dashboard .form-control, .dashboard .ts-control { background: #fff; border: 1px solid var(--outline); border-radius: 4px; min-height: 48px; padding: 12px; font-size: 12px; color: #000; box-shadow: none; }
.dashboard .ts-control > input { font-family: inherit; font-size: 12px; }
.dashboard .ts-dropdown { font-family: inherit; font-size: 12px; color: #000; border: 1px solid var(--outline); border-radius: 4px; box-shadow: 0 3px 8px rgba(0,0,0,.15); }
.dashboard .ts-dropdown .active, .dashboard .ts-control .item { background: var(--surface-container); color: #000; }
.dashboard .ts-dropdown .active .highlight { background: var(--surface-dim); }
.dashboard .product-category-control { appearance: auto; width: 100%; box-sizing: border-box; font-weight: 600; }
.filter-options { display: flex; flex-wrap: wrap; gap: 12px 32px; grid-column: 1 / -1; border-top: 1px solid var(--outline); padding-top: 16px; margin-top: 4px; }
.filter-check { display: flex; align-items: flex-start; gap: 10px; }
.filter-check input { width: 16px; height: 16px; margin: 2px 0 0; flex: 0 0 16px; accent-color: #000; cursor: pointer; }
.filter-check label { font-weight: 400; font-size: 12px; line-height: 20px; margin: 0; cursor: pointer; }
.dashboard .custom-control-input:checked ~ .custom-control-label::before { background: #000; border-color: #000; }
.dashboard .custom-control-input:focus ~ .custom-control-label::before { box-shadow: 0 0 0 2px var(--outline); }
.product-section-heading { margin-bottom: 24px; flex-wrap: wrap; }
.product-view-controls { display: flex; align-items: center; justify-content: end; flex-wrap: wrap; gap: 12px; max-width: 100%; }
.view-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--outline); border-radius: 6px; }
.dashboard .view-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.dashboard .view-toggle:hover { background: var(--surface-container); color: var(--ink); }
.dashboard .view-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.dashboard .active-filter { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; min-height: 44px; text-align: left; }
.active-filter span:first-child { overflow-wrap: anywhere; min-width: 0; }
.active-filter span:last-child { flex-shrink: 0; }
#product-result-count { color: var(--muted); font-size: 11px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,260px),1fr)); gap: 16px; }
.product-cell { min-width: 0; }
.dashboard .card { border: 1px solid var(--outline); border-radius: 0; background: #fff; }
.dashboard .product-hover:hover { border-color: #8a866c; }
.product-media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; background: #fff; border-bottom: 1px solid var(--surface-container); }
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.image-placeholder { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.dashboard [hidden] { display: none !important; }
.dashboard .card-body { padding: 20px; }
.dashboard .card-title { font-size: 16px; line-height: 24px; font-weight: 600; min-height: 48px; margin: 0 0 8px; overflow-wrap: anywhere; }
.product-meta { color: var(--muted); font-size: 12px; line-height: 20px; margin-bottom: 20px; overflow-wrap: anywhere; }
.product-price, .home-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.price-amount { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.dashboard .price-change-badge { width: fit-content; }
.price-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; width: 100%; }
.product-price .price-value { font-size: 26px; font-weight: 600; letter-spacing: -.04em; line-height: 36px; }
.product-price > a { width: 100%; font-size: 12px; overflow-wrap: anywhere; }
.home-price { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--surface-container); margin-bottom: 16px; }
.home-price .price-value { font-size: 20px; line-height: 28px; font-weight: 600; }
.home-price > a { width: 100%; font-size: 12px; overflow-wrap: anywhere; }
.price-age { width: 100%; color: var(--muted); font-size: 12px; line-height: 20px; }
.price-difference { display: flex; flex-direction: column; gap: 4px; color: #9c3d10; background: #fff4e8; border-left: 3px solid #b45309; padding: 12px; font-size: 12px; line-height: 20px; margin: 0 0 16px; }
.price-difference strong { font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.02em; }
.product-actions { display: flex; align-items: center; gap: 8px; padding-top: 16px; }
.product-actions .ml-1 { margin-left: 0 !important; }
.product-actions .btn-link { margin-left: auto !important; text-decoration: none; color: #000; }
/* Compact tiles keep the same small product header and stacked price comparison. */
.dashboard.compact-view .product-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,340px),1fr)); gap: 16px; }
.dashboard.compact-view .product-hover { display: grid; grid-template-columns: 72px minmax(0,1fr); gap: 8px 16px; padding: 16px; align-items: center; border: 1px solid var(--outline); }
.dashboard.compact-view .product-hover:hover { border-color: #8a866c; }
.dashboard.compact-view .product-media { grid-column: 1; grid-row: 1 / 3; aspect-ratio: 1; width: 72px; height: 72px; border: 0; }
.dashboard.compact-view .image-placeholder { font-size: 10px; text-align: center; }
.dashboard.compact-view .card-body { display: contents !important; }
.dashboard.compact-view .card-body > * { min-width: 0; }
.dashboard.compact-view .card-title { grid-column: 2; grid-row: 1; align-self: end; font-size: 15px; line-height: 22px; min-height: 0; margin: 0; }
.dashboard.compact-view .product-meta { grid-column: 2; grid-row: 2; align-self: start; margin: 0; font-size: 11px; line-height: 18px; }
.dashboard.compact-view .product-price, .dashboard.compact-view .home-price { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 12px; }
.dashboard.compact-view .product-price { grid-column: 1 / -1; grid-row: 3; }
.dashboard.compact-view .home-price { grid-column: 1 / -1; grid-row: 4; padding: 8px 0 0; margin: 0; border-top: 1px solid var(--surface-container); }
.dashboard.compact-view .price-label { grid-column: 1; grid-row: 1; font-size: 10px; }
.dashboard.compact-view .price-amount { grid-column: 2; grid-row: 1 / 3; align-self: center; align-items: flex-end; text-align: right; }
.dashboard.compact-view .product-price .price-value, .dashboard.compact-view .home-price .price-value { font-size: 20px; line-height: 26px; }
.dashboard.compact-view .product-price > a, .dashboard.compact-view .home-price > a { grid-column: 1; grid-row: 2; }
.dashboard.compact-view .price-age { grid-column: 1 / -1; font-size: 11px; line-height: 16px; }
.dashboard.compact-view .price-difference { grid-column: 1 / -1; grid-row: 5; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 6px 10px; margin: 0; font-size: 11px; line-height: 16px; }
.dashboard.compact-view .price-difference strong { font-size: 16px; line-height: 22px; }
.dashboard.compact-view .product-actions { grid-column: 1 / -1; grid-row: 6; align-self: start; flex-wrap: wrap; padding: 0; margin: 0 !important; }
@media (max-width: 600px) {
  .dashboard.compact-view .product-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .dashboard.compact-view .product-hover { grid-template-columns: 64px minmax(0,1fr); gap: 8px 12px; padding: 12px; }
  .dashboard.compact-view .product-media { width: 64px; height: 64px; }
}
.dashboard .modal-content { border: 1px solid var(--outline); border-radius: 8px; box-shadow: 0 16px 40px rgba(0,0,0,.12); }
.dashboard .modal-header, .dashboard .modal-body { padding: 24px; }
.dashboard .modal-title { font-size: 20px; font-weight: 600; line-height: 28px; }
.dashboard .modal-backdrop { background-color: #1a1a1a; }
.dashboard .text-muted, .dashboard .form-text { color: var(--muted) !important; }
.dashboard .list-group-item { border-color: var(--outline); font-size: 12px; }
.dashboard .highlight-my-store { border-left: 3px solid #000; padding-left: 16px; }
.dashboard .expensive, .dashboard .normal { background: var(--surface-dim); }
.dashboard .alert-success, .dashboard .alert-info { background: var(--surface-dim); color: #000; border-color: var(--outline); border-radius: 4px; }
.dashboard .alert-danger { background: #fff; color: #b71c1c; border-color: #b71c1c; border-radius: 4px; }
.custom-datalist { position: absolute; background: white; border: 1px solid var(--outline); box-shadow: 0 3px 8px rgba(0,0,0,.15); border-radius: 4px; max-height: 200px; overflow: auto; width: calc(100% - 48px); display: none; z-index: 1000; list-style: none; padding: 0; margin: 0; }
.custom-datalist li { padding: 12px; cursor: pointer; }
.custom-datalist li:hover { background: var(--surface-dim); }
.empty-state { grid-column: 1 / -1; padding: 64px 24px; text-align: center; background: var(--surface-dim); }
.empty-state h5 { font-size: 14px; }
.dashboard-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; width: 100%; padding: 20px 32px; border-top: 1px solid var(--outline); font-size: 10px; color: var(--muted); letter-spacing: .1em; }
.server-info { min-width: 0; overflow-wrap: anywhere; }
.back-to-top { position: fixed; bottom: 24px; right: 24px; display: none; background: #fff !important; }
@media (max-width: 1100px) { .filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 1199px) {
  .dashboard .navbar { justify-content: space-between; gap: 16px; }
  .catalog-brand { flex: 1; flex-direction: row; justify-content: space-between; gap: 16px; }
  .catalog-switch { margin-left: auto; }
  .dashboard .navbar-collapse { margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--surface-container); }
  .primary-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
  .header-actions > .btn, .header-actions > form { flex: 1 1 150px; }
  .header-price-check .btn { width: 100%; }
  .account-dropdown { margin-left: auto; }
  .dashboard .navbar-toggler { min-width: 44px; min-height: 44px; padding: 8px; border: 1px solid var(--outline); border-radius: 5px; }
}
@media (max-width: 600px) { .dashboard .navbar { padding: 12px 16px; } .dashboard-main { padding: 20px 16px 32px; } .header-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .header-actions > * { min-width: 0; } .account-dropdown { grid-column: 1 / -1; margin: 0; } .header-actions:not(:has(.header-price-check)) { grid-template-columns: 1fr; } .account-dropdown .dropdown-menu { position: static !important; transform: none !important; float: none; width: 100%; max-width: none; margin-top: 8px; } .header-actions .btn { width: 100%; }  .filter-panel { padding: 16px; margin-bottom: 20px; } .filter-grid { grid-template-columns: 1fr; gap: 8px; } .filter-options { flex-direction: column; gap: 12px; } .product-grid { grid-template-columns: 1fr; } .section-heading { gap: 12px; } .dashboard .card-body { padding: 20px; } .dashboard-footer { padding: 20px; } }
@media (prefers-reduced-motion: reduce) { .dashboard *, .dashboard *::before, .dashboard *::after { transition: none !important; animation: none !important; } }
.dashboard .ts-wrapper { min-width: 0; }
.dashboard .collapsing { transition: height 150ms ease; }
.dashboard .modal.fade .modal-dialog { transition: transform 150ms ease-out; }
.dashboard #addForm .modal-dialog {
  width: min(720px, calc(100% - 32px));
  max-width: calc(100% - 2em - 6px);
  margin-left: auto;
  margin-right: auto;
}
.add-product-form { display: grid; gap: 20px; }
.add-product-form .form-group { margin: 0; }
.add-product-form .product-preview-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.add-product-form .product-preview-row p { flex: 1; min-width: 0; margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.add-product-form .product-preview-row button { flex-shrink: 0; }
.add-product-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
@media (max-width: 600px) {
  .add-product-form .product-preview-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .add-product-form .product-preview-row button { min-height: 44px; }
  .add-product-actions .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .dashboard .collapsing, .dashboard .modal.fade .modal-dialog { transition: none; } }
@media (max-width: 600px) {
  .dashboard .navbar { gap: 8px; }
  .dashboard-logo img { width: 88px; height: 45px; }
  .catalog-switch a { padding: 8px 10px; }
  .dashboard .navbar-toggler, .dashboard .close { min-width: 44px; min-height: 44px; }
  .filter-panel .section-heading { gap: 8px; margin-bottom: 12px; }
  .filter-grid { display: block; }
  .filter-search { margin-bottom: 0; }
  .dashboard .filter-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 10px; }
  .advanced-filters { display: none; }
  .advanced-filters.is-expanded { display: block; margin-top: 16px; }
  .filter-fields { display: grid; gap: 8px; }
  .filter-check { align-items: center; }
  .filter-check label { min-height: 44px; display: flex; align-items: center; font-size: 13px; }
  .product-actions .btn { min-width: 44px; min-height: 44px; }
  .back-to-top { position: static; display: flex !important; align-items: center; justify-content: center; width: 48px; height: 48px; margin: 24px 0 0 auto; }
}
@media (pointer: coarse) { .product-actions .btn, .dashboard .close, .dashboard .navbar-toggler { min-width: 44px; min-height: 44px; } }
@media (prefers-reduced-motion: reduce) { .dashboard .btn:active { transform: none !important; } }
