/* Shared, compact portal finish. Loaded last on every page. */
:root {
    --portal-radius: 3px;
    --portal-surface-muted: #f5f8fa;
    --portal-focus: #d49a35;
}

body { color: var(--portal-text); }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--portal-focus);
    outline-offset: 2px;
}
.table-scroll:focus-visible, .inventory-table-wrap:focus-visible {
    outline: 2px solid var(--portal-focus);
    outline-offset: -2px;
}

/* The same header and active section on each protected page. */
.dashboard-header { gap: 14px; }
.dashboard-header .right { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.dashboard-header .title { white-space: nowrap; }
.dashboard-header .navbar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 11px;
    border-color: #7893a9;
    color: #fff;
    background: #345671;
    font-weight: 700;
}
.dashboard-header .navbar-link:hover { background: #477392; }
.dashboard-header .navbar-link.is-active,
.versa-page .dashboard-header .navbar-link.is-active {
    color: var(--portal-navy-dark);
    background: #fff;
    border-color: #fff;
}
.dashboard-header .navbar_username {
    margin-left: 7px;
    padding-left: 12px;
    border-left: 1px solid #698096;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dashboard-header .logout-link { min-height: 34px; padding: 6px 8px; }
.dashboard-header .logout-link:hover { text-decoration: underline; }

/* Page titles, panels and controls share a restrained, squared-off treatment. */
.inventory-page-heading, .product-hub-heading, .product-detail-header,
.repricer-heading, .versa-page-heading {
    border: 1px solid var(--portal-border);
    border-left: 5px solid var(--portal-blue);
    border-radius: 0;
    box-shadow: var(--portal-shadow);
}
.inventory-page-heading h1, .product-hub-heading h1,
.product-detail-title h1, .repricer-heading h1,
.versa-page-title h1 { font-size: 25px; line-height: 1.2; overflow-wrap: anywhere; }
.repricer-heading .inventory-eyebrow { margin: 0 0 4px; color: var(--portal-blue-dark); }
.versa-page-heading { padding: 20px 22px; margin-bottom: 16px; }
.versa-page-title { gap: 12px; }
.versa-page-icon, .versa-tool-icon {
    border-radius: var(--portal-radius);
    border: 1px solid #d4e0e9;
}
.versa-page-icon { width: 46px; height: 46px; }
.versa-page-icon .versa-icon { width: 24px; height: 24px; }
.versa-catalog-count { border-color: var(--portal-border); border-radius: var(--portal-radius); }

.inventory-list-panel, .inventory-detail-panel, .product-card,
.offer-detail-list, .repricer-shell .panel, .versa-products-card,
.versa-tools-card, .supplier-order-card {
    border-color: var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
}
.product-card:hover { box-shadow: 0 2px 7px rgba(29, 48, 67, .18); transform: none; }
.offer-detail-card, .decision-card, .fulfilment-summary-item,
.versa-file-field { border-radius: var(--portal-radius); }
.versa-file-field { border-style: solid; background: var(--portal-surface-muted); }
.versa-empty-icon { border-radius: var(--portal-radius); }
.versa-products-heading, .repricer-shell .section-bar,
.inventory-panel-heading { background: var(--portal-surface-muted); }
.versa-products-heading { padding: 16px 20px 12px; }
.versa-table-toolbar { padding: 0 20px 16px; background: var(--portal-surface-muted); }
.versa-table-footer { background: var(--portal-surface-muted); }
.versa-tools-card { padding: 18px; }

.button, .product-search button, .inventory-link-form button,
.repricer-shell .panel button, .login-form button,
.versa-export-shell .button {
    border-radius: var(--portal-radius);
    font-weight: 700;
}
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; }
.product-search button, .inventory-link-form button { min-height: 36px; }
.product-search button:hover, .inventory-link-form button:hover { background: var(--portal-blue-dark); }
.versa-export-shell .button { min-height: 36px; padding: 7px 11px; }
.button:disabled, .product-search button:disabled,
.inventory-link-form button:disabled, .login-form button:disabled {
    color: #5d6b77;
    background: #e2e8ed;
    border-color: #bdc8d1;
    cursor: not-allowed;
    opacity: 1;
}
.product-search input, .product-sort-form select,
.inventory-sort-form select, .inventory-search .search-input,
.inventory-filter-bar select, .repricer-shell .panel input,
.repricer-shell .panel select, .repricer-shell .search-form input,
.repricer-shell .search-form select, .versa-search input,
.versa-file-field input[type=file], .login-field input,
.add-product-form input, .add-product-form textarea {
    border-radius: var(--portal-radius);
}
.versa-search input { min-height: 36px; background: #fff; }
.versa-products-table th { color: var(--portal-navy-dark); background: #e7eef4; }
.versa-products-table tbody tr:nth-child(even) { background: #f7f9fb; }
.versa-products-table tbody tr:hover { background: #e9f1f8; }
.versa-products-table th, .versa-products-table td { padding: 10px 12px; }
.history-table-scroll table { min-width: 540px; }
.versa-stock, .versa-products-table .article span, .inventory-source,
.inventory-alert-difference { border-radius: var(--portal-radius); }

/* One pagination language for Voorraad, Producten, Repricer and Versa. */
.inventory-pagination, .product-pagination, .repricer-shell .pagination,
.versa-pagination { align-items: center; flex-wrap: wrap; gap: 5px; }
.inventory-pagination :is(a, span), .product-pagination :is(a, span),
.repricer-shell .pagination :is(a, span), .versa-pagination :is(a, span) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: 6px 9px;
    color: var(--portal-blue-dark);
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}
.inventory-pagination a:hover, .product-pagination a:hover,
.repricer-shell .pagination a:hover, .versa-pagination a:hover {
    color: var(--portal-navy-dark);
    background: #e9f1f8;
    border-color: var(--portal-blue);
    text-decoration: none;
}
.inventory-pagination a.active, .product-pagination a.active,
.repricer-shell .pagination a.active, .versa-pagination .active {
    color: #fff;
    background: var(--portal-navy);
    border-color: var(--portal-navy);
}
.inventory-pagination .disabled, .product-pagination .disabled,
.repricer-shell .pagination .disabled, .versa-pagination .disabled {
    color: #8a96a0;
    background: #f1f4f6;
    border-color: #d3dce3;
}
.inventory-pagination .ellipsis, .product-pagination .ellipsis,
.repricer-shell .pagination .ellipsis, .versa-pagination .ellipsis {
    min-width: 24px;
    border-color: transparent;
    background: transparent;
}
.product-pagination { margin-top: 16px; }
.repricer-shell .pagination { border-top: 1px solid var(--portal-border); background: var(--portal-surface-muted); }

.inventory-flash, .product-flash, .repricer-shell .flash,
.versa-flash, .error-message { border-radius: var(--portal-radius); }
body.login-page { background: var(--portal-bg); }
.login-container {
    border: 1px solid var(--portal-border);
    border-top: 5px solid var(--portal-blue);
    border-radius: var(--portal-radius);
    box-shadow: 0 5px 18px rgba(11, 25, 39, .22);
}
.login-form button { border-radius: var(--portal-radius); }

@media (max-width: 900px) {
    .dashboard-header .right { width: 100%; justify-content: flex-start; }
    .dashboard-header .navbar_username { margin-left: 0; padding-left: 0; border-left: 0; }
}
@media (max-width: 640px) {
    .dashboard-header .title { white-space: normal; }
    .dashboard-header .navbar-link { flex: 1 1 auto; }
    .inventory-page-heading h1, .product-hub-heading h1,
    .product-detail-title h1, .repricer-heading h1,
    .versa-page-title h1 { font-size: 22px; }
    .versa-page-heading { padding: 16px; }
    .versa-page-icon { width: 40px; height: 40px; }
    .versa-products-heading { padding: 14px 16px 10px; }
    .versa-table-toolbar { padding: 0 16px 14px; }
    .versa-tools-card { padding: 16px; }
}
