html, body { margin: 0; font-family: Roboto, "Segoe UI", Arial, sans-serif; background: #f4f5f7; }
.portal-loading { display: flex; align-items: center; justify-content: center; height: 100vh; color: #7b8794; font-size: 1rem; }
.portal-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; box-sizing: border-box; }
.portal-auth__card { width: 100%; max-width: 420px; }
.portal-auth__logo { max-height: 64px; max-width: 220px; display: block; margin: 0 auto 12px; }
.portal-tenant-logo { max-height: 36px; max-width: 160px; display: block; }
#blazor-error-ui { background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; box-sizing: border-box; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.portal-nav { background: #fff; border-bottom: 1px solid #e4e7eb; padding: 6px 0; }
.portal-tenant-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.portal-count { cursor: pointer; transition: box-shadow .15s; height: 100%; }
.portal-count:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.portal-status { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: .78rem; font-weight: 500; color: #fff; white-space: nowrap; }
.portal-row { border-bottom: 1px solid #e4e7eb; padding: 12px 4px; cursor: pointer; }
.portal-row:hover { background: #f8f9fb; }
.portal-row:last-child { border-bottom: none; }
.portal-label { color: #7b8794; font-size: .8rem; }
.portal-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.portal-photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; display: block; background: #eef0f3; }
.portal-invoice-frame { height: 75vh; }
.portal-invoice-frame iframe { width: 100%; height: 100%; border: none; background: #fff; }
.portal-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.portal-table th { text-align: left; color: #7b8794; font-weight: 500; font-size: .8rem; border-bottom: 1px solid #e4e7eb; padding: 8px 6px; white-space: nowrap; }
.portal-table td { border-bottom: 1px solid #eef0f3; padding: 8px 6px; vertical-align: top; }
.portal-table td.num, .portal-table th.num { text-align: right; white-space: nowrap; }
.portal-table tr.clickable { cursor: pointer; }
.portal-table tr.clickable:hover { background: #f8f9fb; }
.portal-table-wrap { overflow-x: auto; }
@media (max-width: 600px) { .portal-table { font-size: .8rem; } .portal-table th, .portal-table td { padding: 6px 3px; } }
.portal-bell { width: 360px; max-width: calc(100vw - 32px); max-height: 70vh; overflow-y: auto; }
.portal-bell__item { padding: 10px 12px; border-bottom: 1px solid #eef0f3; cursor: pointer; }
.portal-bell__item:hover { background: #f8f9fb; }
.portal-bell__item--unread { background: #f3f5ff; }
.portal-bell__dot { width: 8px; height: 8px; border-radius: 50%; background: #3949ab; flex: none; }
.portal-bell__message { font-size: .8rem; color: #52606d; white-space: pre-line; margin: 2px 0; }
.portal-catalog { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.portal-catalog__cats { position: sticky; top: 8px; }
.portal-catalog__cat { display: flex; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: .875rem; color: #323f4b; }
.portal-catalog__cat:hover { background: #f0f2f5; }
.portal-catalog__cat--active { background: #e8eaf6; color: #3949ab; font-weight: 500; }
.portal-catalog__chips { display: none; }
.portal-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.portal-product { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1); cursor: pointer; display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .15s; }
.portal-product:hover { box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.portal-product__img { aspect-ratio: 1 / 1; background: #f4f5f7; display: flex; align-items: center; justify-content: center; }
.portal-product__img img { width: 100%; height: 100%; object-fit: contain; }
.portal-product__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.portal-product__name { font-weight: 500; font-size: .9rem; line-height: 1.3; }
.portal-product__price { margin-top: auto; padding-top: 6px; }
.portal-price-old { text-decoration: line-through; color: #9aa5b1; font-size: .8rem; margin-right: 6px; }
.portal-price-new { font-weight: 600; font-size: 1rem; color: #1f2933; }
.portal-price-none { color: #7b8794; font-size: .85rem; font-style: italic; }
.portal-stock { font-size: .75rem; font-weight: 500; }
.portal-stock--in { color: #2e7d32; }
.portal-stock--order { color: #b26a00; }
.portal-gallery__main { aspect-ratio: 4 / 3; background: #f4f5f7; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.portal-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.portal-gallery__thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.portal-gallery__thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; background: #f4f5f7; }
.portal-gallery__thumbs img.active { border-color: #3949ab; }
@media (max-width: 760px) {
  .portal-catalog { grid-template-columns: 1fr; }
  .portal-catalog__cats { display: none; }
  .portal-catalog__chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .portal-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}
